fjall 11.0.0 → 12.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,29 +1,29 @@
1
1
  import { createRequire as __fjcreateRequire } from "module";
2
2
  const require = __fjcreateRequire(import.meta.url);
3
3
 
4
- var VO=Object.create;var $d=Object.defineProperty;var GO=Object.getOwnPropertyDescriptor;var ZO=Object.getOwnPropertyNames;var WO=Object.getPrototypeOf,HO=Object.prototype.hasOwnProperty;var Es=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},wt=(e,t)=>{for(var n in t)$d(e,n,{get:t[n],enumerable:!0})},YO=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ZO(t))!HO.call(e,r)&&r!==n&&$d(e,r,{get:()=>t[r],enumerable:!(i=GO(t,r))||i.enumerable});return e};var KO=(e,t,n)=>(n=e!=null?VO(WO(e)):{},YO(t||!e||!e.__esModule?$d(n,"default",{value:e,enumerable:!0}):n,e));var ce=I((Mte,uP)=>{"use strict";var{FORCE_COLOR:NF,NODE_DISABLE_COLORS:PF,TERM:wF}=process.env,K={enabled:!PF&&wF!=="dumb"&&NF!=="0",reset:re(0,0),bold:re(1,22),dim:re(2,22),italic:re(3,23),underline:re(4,24),inverse:re(7,27),hidden:re(8,28),strikethrough:re(9,29),black:re(30,39),red:re(31,39),green:re(32,39),yellow:re(33,39),blue:re(34,39),magenta:re(35,39),cyan:re(36,39),white:re(37,39),gray:re(90,39),grey:re(90,39),bgBlack:re(40,49),bgRed:re(41,49),bgGreen:re(42,49),bgYellow:re(43,49),bgBlue:re(44,49),bgMagenta:re(45,49),bgCyan:re(46,49),bgWhite:re(47,49)};function cP(e,t){let n=0,i,r="",o="";for(;n<e.length;n++)i=e[n],r+=i.open,o+=i.close,t.includes(i.close)&&(t=t.replace(i.rgx,i.close+i.open));return r+t+o}function kF(e,t){let n={has:e,keys:t};return n.reset=K.reset.bind(n),n.bold=K.bold.bind(n),n.dim=K.dim.bind(n),n.italic=K.italic.bind(n),n.underline=K.underline.bind(n),n.inverse=K.inverse.bind(n),n.hidden=K.hidden.bind(n),n.strikethrough=K.strikethrough.bind(n),n.black=K.black.bind(n),n.red=K.red.bind(n),n.green=K.green.bind(n),n.yellow=K.yellow.bind(n),n.blue=K.blue.bind(n),n.magenta=K.magenta.bind(n),n.cyan=K.cyan.bind(n),n.white=K.white.bind(n),n.gray=K.gray.bind(n),n.grey=K.grey.bind(n),n.bgBlack=K.bgBlack.bind(n),n.bgRed=K.bgRed.bind(n),n.bgGreen=K.bgGreen.bind(n),n.bgYellow=K.bgYellow.bind(n),n.bgBlue=K.bgBlue.bind(n),n.bgMagenta=K.bgMagenta.bind(n),n.bgCyan=K.bgCyan.bind(n),n.bgWhite=K.bgWhite.bind(n),n}function re(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(this.has.includes(e)||(this.has.push(e),this.keys.push(n)),i===void 0?this:K.enabled?cP(this.keys,i+""):i+""):i===void 0?kF([e],[n]):K.enabled?cP([n],i+""):i+""}}uP.exports=K});var dP=I((jte,lP)=>{"use strict";lP.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var dd=I((zte,mP)=>{"use strict";mP.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var ue=I((Lte,pP)=>{"use strict";var qy={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let n="";return e<0?n+=`\x1B[${-e}D`:e>0&&(n+=`\x1B[${e}C`),t<0?n+=`\x1B[${-t}A`:t>0&&(n+=`\x1B[${t}B`),n},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},OF={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},DF={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let n=0;n<e;n++)t+=this.line+(n<e-1?qy.up():"");return e&&(t+=qy.left),t}};pP.exports={cursor:qy,scroll:OF,erase:DF,beep:"\x07"}});var bP=I((Ute,vP)=>{"use strict";function MF(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=jF(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
5
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function jF(e,t){if(e){if(typeof e=="string")return fP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fP(e,t)}}function fP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var zF=dd(),hP=ue(),gP=hP.erase,LF=hP.cursor,UF=e=>[...zF(e)].length;vP.exports=function(e,t){if(!t)return gP.line+LF.to(0);let n=0,i=e.split(/\r?\n/);var r=MF(i),o;try{for(r.s();!(o=r.n()).done;){let a=o.value;n+=1+Math.floor(Math.max(UF(a)-1,0)/t)}}catch(a){r.e(a)}finally{r.f()}return gP.lines(n)}});var Xy=I((Fte,yP)=>{"use strict";var ds={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},FF={arrowUp:ds.arrowUp,arrowDown:ds.arrowDown,arrowLeft:ds.arrowLeft,arrowRight:ds.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},BF=process.platform==="win32"?FF:ds;yP.exports=BF});var _P=I((Bte,SP)=>{"use strict";var go=ce(),Un=Xy(),Jy=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),VF=e=>Jy[e]||Jy.default,ms=Object.freeze({aborted:go.red(Un.cross),done:go.green(Un.tick),exited:go.yellow(Un.cross),default:go.cyan("?")}),GF=(e,t,n)=>t?ms.aborted:n?ms.exited:e?ms.done:ms.default,ZF=e=>go.gray(e?Un.ellipsis:Un.pointerSmall),WF=(e,t)=>go.gray(e?t?Un.pointerSmall:"+":Un.line);SP.exports={styles:Jy,render:VF,symbols:ms,symbol:GF,delimiter:ZF,item:WF}});var xP=I((Vte,EP)=>{"use strict";var HF=dd();EP.exports=function(e,t){let n=String(HF(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var IP=I((Gte,AP)=>{"use strict";AP.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
4
+ var GO=Object.create;var $d=Object.defineProperty;var ZO=Object.getOwnPropertyDescriptor;var WO=Object.getOwnPropertyNames;var HO=Object.getPrototypeOf,YO=Object.prototype.hasOwnProperty;var _s=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},wt=(e,t)=>{for(var n in t)$d(e,n,{get:t[n],enumerable:!0})},KO=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of WO(t))!YO.call(e,r)&&r!==n&&$d(e,r,{get:()=>t[r],enumerable:!(i=ZO(t,r))||i.enumerable});return e};var qO=(e,t,n)=>(n=e!=null?GO(HO(e)):{},KO(t||!e||!e.__esModule?$d(n,"default",{value:e,enumerable:!0}):n,e));var ce=I((jte,lP)=>{"use strict";var{FORCE_COLOR:PF,NODE_DISABLE_COLORS:wF,TERM:kF}=process.env,K={enabled:!wF&&kF!=="dumb"&&PF!=="0",reset:re(0,0),bold:re(1,22),dim:re(2,22),italic:re(3,23),underline:re(4,24),inverse:re(7,27),hidden:re(8,28),strikethrough:re(9,29),black:re(30,39),red:re(31,39),green:re(32,39),yellow:re(33,39),blue:re(34,39),magenta:re(35,39),cyan:re(36,39),white:re(37,39),gray:re(90,39),grey:re(90,39),bgBlack:re(40,49),bgRed:re(41,49),bgGreen:re(42,49),bgYellow:re(43,49),bgBlue:re(44,49),bgMagenta:re(45,49),bgCyan:re(46,49),bgWhite:re(47,49)};function uP(e,t){let n=0,i,r="",o="";for(;n<e.length;n++)i=e[n],r+=i.open,o+=i.close,t.includes(i.close)&&(t=t.replace(i.rgx,i.close+i.open));return r+t+o}function OF(e,t){let n={has:e,keys:t};return n.reset=K.reset.bind(n),n.bold=K.bold.bind(n),n.dim=K.dim.bind(n),n.italic=K.italic.bind(n),n.underline=K.underline.bind(n),n.inverse=K.inverse.bind(n),n.hidden=K.hidden.bind(n),n.strikethrough=K.strikethrough.bind(n),n.black=K.black.bind(n),n.red=K.red.bind(n),n.green=K.green.bind(n),n.yellow=K.yellow.bind(n),n.blue=K.blue.bind(n),n.magenta=K.magenta.bind(n),n.cyan=K.cyan.bind(n),n.white=K.white.bind(n),n.gray=K.gray.bind(n),n.grey=K.grey.bind(n),n.bgBlack=K.bgBlack.bind(n),n.bgRed=K.bgRed.bind(n),n.bgGreen=K.bgGreen.bind(n),n.bgYellow=K.bgYellow.bind(n),n.bgBlue=K.bgBlue.bind(n),n.bgMagenta=K.bgMagenta.bind(n),n.bgCyan=K.bgCyan.bind(n),n.bgWhite=K.bgWhite.bind(n),n}function re(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(this.has.includes(e)||(this.has.push(e),this.keys.push(n)),i===void 0?this:K.enabled?uP(this.keys,i+""):i+""):i===void 0?OF([e],[n]):K.enabled?uP([n],i+""):i+""}}lP.exports=K});var mP=I((zte,dP)=>{"use strict";dP.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var dd=I((Lte,pP)=>{"use strict";pP.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var ue=I((Ute,fP)=>{"use strict";var Xy={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let n="";return e<0?n+=`\x1B[${-e}D`:e>0&&(n+=`\x1B[${e}C`),t<0?n+=`\x1B[${-t}A`:t>0&&(n+=`\x1B[${t}B`),n},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},DF={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},MF={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let n=0;n<e;n++)t+=this.line+(n<e-1?Xy.up():"");return e&&(t+=Xy.left),t}};fP.exports={cursor:Xy,scroll:DF,erase:MF,beep:"\x07"}});var yP=I((Fte,bP)=>{"use strict";function jF(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zF(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function zF(e,t){if(e){if(typeof e=="string")return gP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gP(e,t)}}function gP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var LF=dd(),vP=ue(),hP=vP.erase,UF=vP.cursor,FF=e=>[...LF(e)].length;bP.exports=function(e,t){if(!t)return hP.line+UF.to(0);let n=0,i=e.split(/\r?\n/);var r=jF(i),o;try{for(r.s();!(o=r.n()).done;){let a=o.value;n+=1+Math.floor(Math.max(FF(a)-1,0)/t)}}catch(a){r.e(a)}finally{r.f()}return hP.lines(n)}});var Jy=I((Bte,SP)=>{"use strict";var ls={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},BF={arrowUp:ls.arrowUp,arrowDown:ls.arrowDown,arrowLeft:ls.arrowLeft,arrowRight:ls.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},VF=process.platform==="win32"?BF:ls;SP.exports=VF});var EP=I((Vte,_P)=>{"use strict";var fo=ce(),Un=Jy(),Qy=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),GF=e=>Qy[e]||Qy.default,ds=Object.freeze({aborted:fo.red(Un.cross),done:fo.green(Un.tick),exited:fo.yellow(Un.cross),default:fo.cyan("?")}),ZF=(e,t,n)=>t?ds.aborted:n?ds.exited:e?ds.done:ds.default,WF=e=>fo.gray(e?Un.ellipsis:Un.pointerSmall),HF=(e,t)=>fo.gray(e?t?Un.pointerSmall:"+":Un.line);_P.exports={styles:Qy,render:GF,symbols:ds,symbol:ZF,delimiter:WF,item:HF}});var AP=I((Gte,xP)=>{"use strict";var YF=dd();xP.exports=function(e,t){let n=String(YF(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var TP=I((Zte,IP)=>{"use strict";IP.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
6
6
  `)).join(`
7
- `)}});var $P=I((Zte,TP)=>{"use strict";TP.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Nt=I((Wte,RP)=>{"use strict";RP.exports={action:dP(),clear:bP(),style:_P(),strip:dd(),figures:Xy(),lines:xP(),wrap:IP(),entriesToDisplay:$P()}});var hr=I((Hte,PP)=>{"use strict";var CP=Es("readline"),YF=Nt(),KF=YF.action,qF=Es("events"),NP=ue(),XF=NP.beep,JF=NP.cursor,QF=ce(),Qy=class extends qF{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=CP.createInterface({input:this.in,escapeCodeTimeout:50});CP.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=KF(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(JF.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(XF)}render(){this.onRender(QF),this.firstRender&&(this.firstRender=!1)}};PP.exports=Qy});var MP=I((Yte,DP)=>{"use strict";function wP(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function kP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){wP(o,i,r,a,c,"next",u)}function c(u){wP(o,i,r,a,c,"throw",u)}a(void 0)})}}var md=ce(),eB=hr(),OP=ue(),tB=OP.erase,ps=OP.cursor,pd=Nt(),eS=pd.style,tS=pd.clear,rB=pd.lines,nB=pd.figures,rS=class extends eB{constructor(t={}){super(t),this.transform=eS.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=tS("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=md.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
8
- `),this.close()}validate(){var t=this;return kP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return kP(function*(){if(t.value=t.value||t.initial,t.cursorOffset=0,t.cursor=t.rendered.length,yield t.validate(),t.error){t.red=!0,t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
9
- `),t.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ps.down(rB(this.outputError,this.out.columns)-1)+tS(this.outputError,this.out.columns)),this.out.write(tS(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[eS.symbol(this.done,this.aborted),md.bold(this.msg),eS.delimiter(this.done),this.red?md.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
7
+ `)}});var RP=I((Wte,$P)=>{"use strict";$P.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Nt=I((Hte,CP)=>{"use strict";CP.exports={action:mP(),clear:yP(),style:EP(),strip:dd(),figures:Jy(),lines:AP(),wrap:TP(),entriesToDisplay:RP()}});var hr=I((Yte,wP)=>{"use strict";var NP=_s("readline"),KF=Nt(),qF=KF.action,XF=_s("events"),PP=ue(),JF=PP.beep,QF=PP.cursor,eB=ce(),eS=class extends XF{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=NP.createInterface({input:this.in,escapeCodeTimeout:50});NP.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=qF(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(QF.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(JF)}render(){this.onRender(eB),this.firstRender&&(this.firstRender=!1)}};wP.exports=eS});var jP=I((Kte,MP)=>{"use strict";function kP(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function OP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){kP(o,i,r,a,c,"next",u)}function c(u){kP(o,i,r,a,c,"throw",u)}a(void 0)})}}var md=ce(),tB=hr(),DP=ue(),rB=DP.erase,ms=DP.cursor,pd=Nt(),tS=pd.style,rS=pd.clear,nB=pd.lines,iB=pd.figures,nS=class extends tB{constructor(t={}){super(t),this.transform=tS.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=rS("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=md.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
8
+ `),this.close()}validate(){var t=this;return OP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return OP(function*(){if(t.value=t.value||t.initial,t.cursorOffset=0,t.cursor=t.rendered.length,yield t.validate(),t.error){t.red=!0,t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
9
+ `),t.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ms.down(nB(this.outputError,this.out.columns)-1)+rS(this.outputError,this.out.columns)),this.out.write(rS(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[tS.symbol(this.done,this.aborted),md.bold(this.msg),tS.delimiter(this.done),this.red?md.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
10
10
  `).reduce((t,n,i)=>t+`
11
- ${i?" ":nB.pointerSmall} ${md.red().italic(n)}`,"")),this.out.write(tB.line+ps.to(0)+this.outputText+ps.save+this.outputError+ps.restore+ps.move(this.cursorOffset,0)))}};DP.exports=rS});var UP=I((Kte,LP)=>{"use strict";var vr=ce(),iB=hr(),fs=Nt(),jP=fs.style,zP=fs.clear,fd=fs.figures,oB=fs.wrap,aB=fs.entriesToDisplay,sB=ue(),cB=sB.cursor,nS=class extends iB{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=zP("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
11
+ ${i?" ":iB.pointerSmall} ${md.red().italic(n)}`,"")),this.out.write(rB.line+ms.to(0)+this.outputText+ms.save+this.outputError+ms.restore+ms.move(this.cursorOffset,0)))}};MP.exports=nS});var FP=I((qte,UP)=>{"use strict";var vr=ce(),oB=hr(),ps=Nt(),zP=ps.style,LP=ps.clear,fd=ps.figures,aB=ps.wrap,sB=ps.entriesToDisplay,cB=ue(),uB=cB.cursor,iS=class extends oB{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=LP("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
12
12
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
13
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(cB.hide):this.out.write(zP(this.outputText,this.out.columns)),super.render();let t=aB(this.cursor,this.choices.length,this.optionsPerPage),n=t.startIndex,i=t.endIndex;if(this.outputText=[jP.symbol(this.done,this.aborted),vr.bold(this.msg),jP.delimiter(!1),this.done?this.selection.title:this.selection.disabled?vr.yellow(this.warn):vr.gray(this.hint)].join(" "),!this.done){this.outputText+=`
13
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(uB.hide):this.out.write(LP(this.outputText,this.out.columns)),super.render();let t=sB(this.cursor,this.choices.length,this.optionsPerPage),n=t.startIndex,i=t.endIndex;if(this.outputText=[zP.symbol(this.done,this.aborted),vr.bold(this.msg),zP.delimiter(!1),this.done?this.selection.title:this.selection.disabled?vr.yellow(this.warn):vr.gray(this.hint)].join(" "),!this.done){this.outputText+=`
14
14
  `;for(let r=n;r<i;r++){let o,a,c="",u=this.choices[r];r===n&&n>0?a=fd.arrowUp:r===i-1&&i<this.choices.length?a=fd.arrowDown:a=" ",u.disabled?(o=this.cursor===r?vr.gray().underline(u.title):vr.strikethrough().gray(u.title),a=(this.cursor===r?vr.bold().gray(fd.pointer)+" ":" ")+a):(o=this.cursor===r?vr.cyan().underline(u.title):u.title,a=(this.cursor===r?vr.cyan(fd.pointer)+" ":" ")+a,u.description&&this.cursor===r&&(c=` - ${u.description}`,(a.length+o.length+c.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(c=`
15
- `+oB(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${o}${vr.gray(c)}
16
- `}}this.out.write(this.outputText)}};LP.exports=nS});var WP=I((qte,ZP)=>{"use strict";var gd=ce(),uB=hr(),VP=Nt(),FP=VP.style,lB=VP.clear,GP=ue(),BP=GP.cursor,dB=GP.erase,iS=class extends uB{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
15
+ `+aB(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${o}${vr.gray(c)}
16
+ `}}this.out.write(this.outputText)}};UP.exports=iS});var HP=I((Xte,WP)=>{"use strict";var gd=ce(),lB=hr(),GP=Nt(),BP=GP.style,dB=GP.clear,ZP=ue(),VP=ZP.cursor,mB=ZP.erase,oS=class extends lB{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
17
17
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
18
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(BP.hide):this.out.write(lB(this.outputText,this.out.columns)),super.render(),this.outputText=[FP.symbol(this.done,this.aborted),gd.bold(this.msg),FP.delimiter(this.done),this.value?this.inactive:gd.cyan().underline(this.inactive),gd.gray("/"),this.value?gd.cyan().underline(this.active):this.active].join(" "),this.out.write(dB.line+BP.to(0)+this.outputText))}};ZP.exports=iS});var qt=I((Xte,HP)=>{"use strict";var oS=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};HP.exports=oS});var KP=I((Jte,YP)=>{"use strict";var mB=qt(),aS=class extends mB{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};YP.exports=aS});var XP=I((Qte,qP)=>{"use strict";var pB=qt(),fB=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),sS=class extends pB{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+fB(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};qP.exports=sS});var QP=I((ere,JP)=>{"use strict";var gB=qt(),cS=class extends gB{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};JP.exports=cS});var tw=I((tre,ew)=>{"use strict";var hB=qt(),uS=class extends hB{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};ew.exports=uS});var nw=I((rre,rw)=>{"use strict";var vB=qt(),lS=class extends vB{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};rw.exports=lS});var ow=I((nre,iw)=>{"use strict";var bB=qt(),dS=class extends bB{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};iw.exports=dS});var sw=I((ire,aw)=>{"use strict";var yB=qt(),mS=class extends yB{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};aw.exports=mS});var uw=I((ore,cw)=>{"use strict";var SB=qt(),pS=class extends SB{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};cw.exports=pS});var dw=I((are,lw)=>{"use strict";lw.exports={DatePart:qt(),Meridiem:KP(),Day:XP(),Hours:QP(),Milliseconds:tw(),Minutes:nw(),Month:ow(),Seconds:sw(),Year:uw()}});var _w=I((sre,Sw)=>{"use strict";function mw(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function pw(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){mw(o,i,r,a,c,"next",u)}function c(u){mw(o,i,r,a,c,"throw",u)}a(void 0)})}}var fS=ce(),_B=hr(),hS=Nt(),fw=hS.style,gw=hS.clear,EB=hS.figures,yw=ue(),xB=yw.erase,hw=yw.cursor,br=dw(),vw=br.DatePart,AB=br.Meridiem,IB=br.Day,TB=br.Hours,$B=br.Milliseconds,RB=br.Minutes,CB=br.Month,NB=br.Seconds,PB=br.Year,wB=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,bw={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new IB(e),3:e=>new CB(e),4:e=>new PB(e),5:e=>new AB(e),6:e=>new TB(e),7:e=>new RB(e),8:e=>new NB(e),9:e=>new $B(e)},kB={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},gS=class extends _B{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(kB,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=gw("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=wB.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in bw?bw[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof vw)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
19
- `),this.close()}validate(){var t=this;return pw(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return pw(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
20
- `),t.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof vw)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(hw.hide):this.out.write(gw(this.outputText,this.out.columns)),super.render(),this.outputText=[fw.symbol(this.done,this.aborted),fS.bold(this.msg),fw.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?fS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
18
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(VP.hide):this.out.write(dB(this.outputText,this.out.columns)),super.render(),this.outputText=[BP.symbol(this.done,this.aborted),gd.bold(this.msg),BP.delimiter(this.done),this.value?this.inactive:gd.cyan().underline(this.inactive),gd.gray("/"),this.value?gd.cyan().underline(this.active):this.active].join(" "),this.out.write(mB.line+VP.to(0)+this.outputText))}};WP.exports=oS});var qt=I((Jte,YP)=>{"use strict";var aS=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};YP.exports=aS});var qP=I((Qte,KP)=>{"use strict";var pB=qt(),sS=class extends pB{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};KP.exports=sS});var JP=I((ere,XP)=>{"use strict";var fB=qt(),gB=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),cS=class extends fB{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+gB(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};XP.exports=cS});var ew=I((tre,QP)=>{"use strict";var hB=qt(),uS=class extends hB{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};QP.exports=uS});var rw=I((rre,tw)=>{"use strict";var vB=qt(),lS=class extends vB{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};tw.exports=lS});var iw=I((nre,nw)=>{"use strict";var bB=qt(),dS=class extends bB{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};nw.exports=dS});var aw=I((ire,ow)=>{"use strict";var yB=qt(),mS=class extends yB{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};ow.exports=mS});var cw=I((ore,sw)=>{"use strict";var SB=qt(),pS=class extends SB{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};sw.exports=pS});var lw=I((are,uw)=>{"use strict";var _B=qt(),fS=class extends _B{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};uw.exports=fS});var mw=I((sre,dw)=>{"use strict";dw.exports={DatePart:qt(),Meridiem:qP(),Day:JP(),Hours:ew(),Milliseconds:rw(),Minutes:iw(),Month:aw(),Seconds:cw(),Year:lw()}});var Ew=I((cre,_w)=>{"use strict";function pw(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function fw(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){pw(o,i,r,a,c,"next",u)}function c(u){pw(o,i,r,a,c,"throw",u)}a(void 0)})}}var gS=ce(),EB=hr(),vS=Nt(),gw=vS.style,hw=vS.clear,xB=vS.figures,Sw=ue(),AB=Sw.erase,vw=Sw.cursor,br=mw(),bw=br.DatePart,IB=br.Meridiem,TB=br.Day,$B=br.Hours,RB=br.Milliseconds,CB=br.Minutes,NB=br.Month,PB=br.Seconds,wB=br.Year,kB=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,yw={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new TB(e),3:e=>new NB(e),4:e=>new wB(e),5:e=>new IB(e),6:e=>new $B(e),7:e=>new CB(e),8:e=>new PB(e),9:e=>new RB(e)},OB={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},hS=class extends EB{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(OB,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=hw("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=kB.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in yw?yw[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof bw)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
19
+ `),this.close()}validate(){var t=this;return fw(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return fw(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
20
+ `),t.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof bw)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(vw.hide):this.out.write(hw(this.outputText,this.out.columns)),super.render(),this.outputText=[gw.symbol(this.done,this.aborted),gS.bold(this.msg),gw.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?gS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
21
21
  `).reduce((t,n,i)=>t+`
22
- ${i?" ":EB.pointerSmall} ${fS.red().italic(n)}`,"")),this.out.write(xB.line+hw.to(0)+this.outputText))}};Sw.exports=gS});var Rw=I((cre,$w)=>{"use strict";function Ew(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function xw(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){Ew(o,i,r,a,c,"next",u)}function c(u){Ew(o,i,r,a,c,"throw",u)}a(void 0)})}}var hd=ce(),OB=hr(),Tw=ue(),vd=Tw.cursor,DB=Tw.erase,bd=Nt(),vS=bd.style,MB=bd.figures,Aw=bd.clear,jB=bd.lines,zB=/[0-9]/,bS=e=>e!==void 0,Iw=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},yS=class extends OB{constructor(t={}){super(t),this.transform=vS.render(t.style),this.msg=t.message,this.initial=bS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=bS(t.min)?t.min:-1/0,this.max=bS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=hd.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${Iw(t,this.round)}`),this._value=Iw(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||zB.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
23
- `),this.close()}validate(){var t=this;return xw(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return xw(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}let n=t.value;t.value=n!==""?n:t.initial,t.done=!0,t.aborted=!1,t.error=!1,t.fire(),t.render(),t.out.write(`
24
- `),t.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(vd.down(jB(this.outputError,this.out.columns)-1)+Aw(this.outputError,this.out.columns)),this.out.write(Aw(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[vS.symbol(this.done,this.aborted),hd.bold(this.msg),vS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?hd[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
22
+ ${i?" ":xB.pointerSmall} ${gS.red().italic(n)}`,"")),this.out.write(AB.line+vw.to(0)+this.outputText))}};_w.exports=hS});var Cw=I((ure,Rw)=>{"use strict";function xw(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function Aw(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){xw(o,i,r,a,c,"next",u)}function c(u){xw(o,i,r,a,c,"throw",u)}a(void 0)})}}var hd=ce(),DB=hr(),$w=ue(),vd=$w.cursor,MB=$w.erase,bd=Nt(),bS=bd.style,jB=bd.figures,Iw=bd.clear,zB=bd.lines,LB=/[0-9]/,yS=e=>e!==void 0,Tw=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},SS=class extends DB{constructor(t={}){super(t),this.transform=bS.render(t.style),this.msg=t.message,this.initial=yS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=yS(t.min)?t.min:-1/0,this.max=yS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=hd.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${Tw(t,this.round)}`),this._value=Tw(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||LB.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
23
+ `),this.close()}validate(){var t=this;return Aw(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return Aw(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}let n=t.value;t.value=n!==""?n:t.initial,t.done=!0,t.aborted=!1,t.error=!1,t.fire(),t.render(),t.out.write(`
24
+ `),t.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(vd.down(zB(this.outputError,this.out.columns)-1)+Iw(this.outputError,this.out.columns)),this.out.write(Iw(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[bS.symbol(this.done,this.aborted),hd.bold(this.msg),bS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?hd[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
25
25
  `).reduce((t,n,i)=>t+`
26
- ${i?" ":MB.pointerSmall} ${hd.red().italic(n)}`,"")),this.out.write(DB.line+vd.to(0)+this.outputText+vd.save+this.outputError+vd.restore))}};$w.exports=yS});var _S=I((ure,Pw)=>{"use strict";var Xt=ce(),LB=ue(),UB=LB.cursor,FB=hr(),gs=Nt(),Cw=gs.clear,qr=gs.figures,Nw=gs.style,BB=gs.wrap,VB=gs.entriesToDisplay,SS=class extends FB{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=Cw("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
26
+ ${i?" ":jB.pointerSmall} ${hd.red().italic(n)}`,"")),this.out.write(MB.line+vd.to(0)+this.outputText+vd.save+this.outputError+vd.restore))}};Rw.exports=SS});var ES=I((lre,ww)=>{"use strict";var Xt=ce(),UB=ue(),FB=UB.cursor,BB=hr(),fs=Nt(),Nw=fs.clear,qr=fs.figures,Pw=fs.style,VB=fs.wrap,GB=fs.entriesToDisplay,_S=class extends BB{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=Nw("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
27
27
  `),this.close()}submit(){let t=this.value.filter(n=>n.selected);this.minSelected&&t.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
28
28
  `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let t=!this.value[this.cursor].selected;this.value.filter(n=>!n.disabled).forEach(n=>n.selected=t),this.render()}_(t,n){if(t===" ")this.handleSpaceToggle();else if(t==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
29
29
  Instructions:
@@ -31,47 +31,47 @@ Instructions:
31
31
  ${qr.arrowLeft}/${qr.arrowRight}/[space]: Toggle selection
32
32
  `+(this.maxChoices===void 0?` a: Toggle all
33
33
  `:"")+" enter/return: Complete answer":""}renderOption(t,n,i,r){let o=(n.selected?Xt.green(qr.radioOn):qr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?Xt.gray().underline(n.title):Xt.strikethrough().gray(n.title):(a=t===i?Xt.cyan().underline(n.title):n.title,t===i&&n.description&&(c=` - ${n.description}`,(o.length+a.length+c.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(c=`
34
- `+BB(n.description,{margin:o.length,width:this.out.columns})))),o+a+Xt.gray(c||"")}paginateOptions(t){if(t.length===0)return Xt.red("No matches for this query.");let n=VB(this.cursor,t.length,this.optionsPerPage),i=n.startIndex,r=n.endIndex,o,a=[];for(let c=i;c<r;c++)c===i&&i>0?o=qr.arrowUp:c===r-1&&r<t.length?o=qr.arrowDown:o=" ",a.push(this.renderOption(this.cursor,t[c],c,o));return`
34
+ `+VB(n.description,{margin:o.length,width:this.out.columns})))),o+a+Xt.gray(c||"")}paginateOptions(t){if(t.length===0)return Xt.red("No matches for this query.");let n=GB(this.cursor,t.length,this.optionsPerPage),i=n.startIndex,r=n.endIndex,o,a=[];for(let c=i;c<r;c++)c===i&&i>0?o=qr.arrowUp:c===r-1&&r<t.length?o=qr.arrowDown:o=" ",a.push(this.renderOption(this.cursor,t[c],c,o));return`
35
35
  `+a.join(`
36
- `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Xt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Xt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(UB.hide),super.render();let t=[Nw.symbol(this.done,this.aborted),Xt.bold(this.msg),Nw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Xt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=Cw(t,this.out.columns)}};Pw.exports=SS});var zw=I((lre,jw)=>{"use strict";function ww(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function GB(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){ww(o,i,r,a,c,"next",u)}function c(u){ww(o,i,r,a,c,"throw",u)}a(void 0)})}}var hs=ce(),ZB=hr(),Mw=ue(),WB=Mw.erase,kw=Mw.cursor,vs=Nt(),ES=vs.style,Ow=vs.clear,xS=vs.figures,HB=vs.wrap,YB=vs.entriesToDisplay,Dw=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),KB=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),qB=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},AS=class extends ZB{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:qB(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=ES.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ow("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=Dw(this.suggestions,t):this.value=this.fallback.value,this.fire()}complete(t){var n=this;return GB(function*(){let i=n.completing=n.suggest(n.input,n.choices),r=yield i;if(n.completing!==i)return;n.suggestions=r.map((a,c,u)=>({title:KB(u,c),value:Dw(u,c),description:a.description})),n.completing=!1;let o=Math.max(r.length-1,0);n.moveSelect(Math.min(o,n.select)),t&&t()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
36
+ `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Xt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Xt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(FB.hide),super.render();let t=[Pw.symbol(this.done,this.aborted),Xt.bold(this.msg),Pw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Xt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=Nw(t,this.out.columns)}};ww.exports=_S});var Lw=I((dre,zw)=>{"use strict";function kw(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function ZB(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){kw(o,i,r,a,c,"next",u)}function c(u){kw(o,i,r,a,c,"throw",u)}a(void 0)})}}var gs=ce(),WB=hr(),jw=ue(),HB=jw.erase,Ow=jw.cursor,hs=Nt(),xS=hs.style,Dw=hs.clear,AS=hs.figures,YB=hs.wrap,KB=hs.entriesToDisplay,Mw=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),qB=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),XB=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},IS=class extends WB{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:XB(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=xS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Dw("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=Mw(this.suggestions,t):this.value=this.fallback.value,this.fire()}complete(t){var n=this;return ZB(function*(){let i=n.completing=n.suggest(n.input,n.choices),r=yield i;if(n.completing!==i)return;n.suggestions=r.map((a,c,u)=>({title:qB(u,c),value:Mw(u,c),description:a.description})),n.completing=!1;let o=Math.max(r.length-1,0);n.moveSelect(Math.min(o,n.select)),t&&t()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
37
37
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
38
38
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
39
- `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?xS.arrowUp:r?xS.arrowDown:" ",c=n?hs.cyan().underline(t.title):t.title;return a=(n?hs.cyan(xS.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
40
- `+HB(t.description,{margin:3,width:this.out.columns}))),a+" "+c+hs.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(kw.hide):this.out.write(Ow(this.outputText,this.out.columns)),super.render();let t=YB(this.select,this.choices.length,this.limit),n=t.startIndex,i=t.endIndex;if(this.outputText=[ES.symbol(this.done,this.aborted,this.exited),hs.bold(this.msg),ES.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let r=this.suggestions.slice(n,i).map((o,a)=>this.renderOption(o,this.select===a+n,a===0&&n>0,a+n===i-1&&i<this.choices.length)).join(`
39
+ `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?AS.arrowUp:r?AS.arrowDown:" ",c=n?gs.cyan().underline(t.title):t.title;return a=(n?gs.cyan(AS.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
40
+ `+YB(t.description,{margin:3,width:this.out.columns}))),a+" "+c+gs.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Ow.hide):this.out.write(Dw(this.outputText,this.out.columns)),super.render();let t=KB(this.select,this.choices.length,this.limit),n=t.startIndex,i=t.endIndex;if(this.outputText=[xS.symbol(this.done,this.aborted,this.exited),gs.bold(this.msg),xS.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let r=this.suggestions.slice(n,i).map((o,a)=>this.renderOption(o,this.select===a+n,a===0&&n>0,a+n===i-1&&i<this.choices.length)).join(`
41
41
  `);this.outputText+=`
42
- `+(r||hs.gray(this.fallback.title))}this.out.write(WB.line+kw.to(0)+this.outputText)}};jw.exports=AS});var Bw=I((dre,Fw)=>{"use strict";var yr=ce(),XB=ue(),JB=XB.cursor,QB=_S(),TS=Nt(),Lw=TS.clear,Uw=TS.style,ho=TS.figures,IS=class extends QB{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=Lw("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
42
+ `+(r||gs.gray(this.fallback.title))}this.out.write(HB.line+Ow.to(0)+this.outputText)}};zw.exports=IS});var Vw=I((mre,Bw)=>{"use strict";var yr=ce(),JB=ue(),QB=JB.cursor,eV=ES(),$S=Nt(),Uw=$S.clear,Fw=$S.style,go=$S.figures,TS=class extends eV{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=Uw("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
43
43
  Instructions:
44
- ${ho.arrowUp}/${ho.arrowDown}: Highlight option
45
- ${ho.arrowLeft}/${ho.arrowRight}/[space]: Toggle selection
44
+ ${go.arrowUp}/${go.arrowDown}: Highlight option
45
+ ${go.arrowLeft}/${go.arrowRight}/[space]: Toggle selection
46
46
  [a,b,c]/delete: Filter choices
47
47
  enter/return: Complete answer
48
48
  `:""}renderCurrentInput(){return`
49
49
  Filtered results for: ${this.inputValue?this.inputValue:yr.gray("Enter something to filter")}
50
- `}renderOption(t,n,i){let r;return n.disabled?r=t===i?yr.gray().underline(n.title):yr.strikethrough().gray(n.title):r=t===i?yr.cyan().underline(n.title):n.title,(n.selected?yr.green(ho.radioOn):ho.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[yr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(yr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(JB.hide),super.render();let t=[Uw.symbol(this.done,this.aborted),yr.bold(this.msg),Uw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=yr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=Lw(t,this.out.columns)}};Fw.exports=IS});var Kw=I((mre,Yw)=>{"use strict";var Vw=ce(),eV=hr(),Ww=Nt(),Gw=Ww.style,tV=Ww.clear,Hw=ue(),rV=Hw.erase,Zw=Hw.cursor,$S=class extends eV{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
50
+ `}renderOption(t,n,i){let r;return n.disabled?r=t===i?yr.gray().underline(n.title):yr.strikethrough().gray(n.title):r=t===i?yr.cyan().underline(n.title):n.title,(n.selected?yr.green(go.radioOn):go.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[yr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(yr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(QB.hide),super.render();let t=[Fw.symbol(this.done,this.aborted),yr.bold(this.msg),Fw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=yr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=Uw(t,this.out.columns)}};Bw.exports=TS});var qw=I((pre,Kw)=>{"use strict";var Gw=ce(),tV=hr(),Hw=Nt(),Zw=Hw.style,rV=Hw.clear,Yw=ue(),nV=Yw.erase,Ww=Yw.cursor,RS=class extends tV{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
51
51
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
52
- `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Zw.hide):this.out.write(tV(this.outputText,this.out.columns)),super.render(),this.outputText=[Gw.symbol(this.done,this.aborted),Vw.bold(this.msg),Gw.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Vw.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(rV.line+Zw.to(0)+this.outputText))}};Yw.exports=$S});var Xw=I((pre,qw)=>{"use strict";qw.exports={TextPrompt:MP(),SelectPrompt:UP(),TogglePrompt:WP(),DatePrompt:_w(),NumberPrompt:Rw(),MultiselectPrompt:_S(),AutocompletePrompt:zw(),AutocompleteMultiselectPrompt:Bw(),ConfirmPrompt:Kw()}});var Qw=I(Jw=>{"use strict";var et=Jw,nV=Xw(),yd=e=>e;function Jt(e,t,n={}){return new Promise((i,r)=>{let o=new nV[e](t),a=n.onAbort||yd,c=n.onSubmit||yd,u=n.onExit||yd;o.on("state",t.onState||yd),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}et.text=e=>Jt("TextPrompt",e);et.password=e=>(e.style="password",et.text(e));et.invisible=e=>(e.style="invisible",et.text(e));et.number=e=>Jt("NumberPrompt",e);et.date=e=>Jt("DatePrompt",e);et.confirm=e=>Jt("ConfirmPrompt",e);et.list=e=>{let t=e.separator||",";return Jt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};et.toggle=e=>Jt("TogglePrompt",e);et.select=e=>Jt("SelectPrompt",e);et.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Jt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};et.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Jt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var iV=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));et.autocomplete=e=>(e.suggest=e.suggest||iV,e.choices=[].concat(e.choices||[]),Jt("AutocompletePrompt",e))});var sk=I((gre,ak)=>{"use strict";function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function tk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ek(Object(n),!0).forEach(function(i){oV(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ek(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function oV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aV(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=sV(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function sV(e,t){if(e){if(typeof e=="string")return rk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rk(e,t)}}function rk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function nk(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function ik(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){nk(o,i,r,a,c,"next",u)}function c(u){nk(o,i,r,a,c,"throw",u)}a(void 0)})}}var RS=Qw(),cV=["suggest","format","onState","validate","onRender","type"],ok=()=>{};function Xr(){return CS.apply(this,arguments)}function CS(){return CS=ik(function*(e=[],{onSubmit:t=ok,onCancel:n=ok}={}){let i={},r=Xr._override||{};e=[].concat(e);let o,a,c,u,l,d,p=(function(){var j=ik(function*(he,rt,_e=!1){if(!(!_e&&he.validate&&he.validate(rt)!==!0))return he.format?yield he.format(rt,i):rt});return function(rt,_e){return j.apply(this,arguments)}})();var g=aV(e),v;try{for(g.s();!(v=g.n()).done;){a=v.value;var x=a;if(u=x.name,l=x.type,typeof l=="function"&&(l=yield l(o,tk({},i),a),a.type=l),!!l){for(let j in a){if(cV.includes(j))continue;let he=a[j];a[j]=typeof he=="function"?yield he(o,tk({},i),d):he}if(d=a,typeof a.message!="string")throw new Error("prompt message is required");var G=a;if(u=G.name,l=G.type,RS[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=yield p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Xr._injected?uV(Xr._injected,a.initial):yield RS[l](a),i[u]=o=yield p(a,o,!0),c=yield t(a,o,i)}catch{c=!(yield n(a,i))}if(c)return i}}}catch(j){g.e(j)}finally{g.f()}return i}),CS.apply(this,arguments)}function uV(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function lV(e){Xr._injected=(Xr._injected||[]).concat(e)}function dV(e){Xr._override=Object.assign({},e)}ak.exports=Object.assign(Xr,{prompt:Xr,prompts:RS,inject:lV,override:dV})});var uk=I((hre,ck)=>{"use strict";ck.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var Sd=I((vre,lk)=>{"use strict";lk.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var pk=I((bre,mk)=>{"use strict";var mV=Sd(),{erase:dk,cursor:pV}=ue(),fV=e=>[...mV(e)].length;mk.exports=function(e,t){if(!t)return dk.line+pV.to(0);let n=0,i=e.split(/\r?\n/);for(let r of i)n+=1+Math.floor(Math.max(fV(r)-1,0)/t);return dk.lines(n)}});var NS=I((yre,fk)=>{"use strict";var bs={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},gV={arrowUp:bs.arrowUp,arrowDown:bs.arrowDown,arrowLeft:bs.arrowLeft,arrowRight:bs.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},hV=process.platform==="win32"?gV:bs;fk.exports=hV});var hk=I((Sre,gk)=>{"use strict";var vo=ce(),Fn=NS(),PS=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),vV=e=>PS[e]||PS.default,ys=Object.freeze({aborted:vo.red(Fn.cross),done:vo.green(Fn.tick),exited:vo.yellow(Fn.cross),default:vo.cyan("?")}),bV=(e,t,n)=>t?ys.aborted:n?ys.exited:e?ys.done:ys.default,yV=e=>vo.gray(e?Fn.ellipsis:Fn.pointerSmall),SV=(e,t)=>vo.gray(e?t?Fn.pointerSmall:"+":Fn.line);gk.exports={styles:PS,render:vV,symbols:ys,symbol:bV,delimiter:yV,item:SV}});var bk=I((_re,vk)=>{"use strict";var _V=Sd();vk.exports=function(e,t){let n=String(_V(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var Sk=I((Ere,yk)=>{"use strict";yk.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
52
+ `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Ww.hide):this.out.write(rV(this.outputText,this.out.columns)),super.render(),this.outputText=[Zw.symbol(this.done,this.aborted),Gw.bold(this.msg),Zw.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Gw.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(nV.line+Ww.to(0)+this.outputText))}};Kw.exports=RS});var Jw=I((fre,Xw)=>{"use strict";Xw.exports={TextPrompt:jP(),SelectPrompt:FP(),TogglePrompt:HP(),DatePrompt:Ew(),NumberPrompt:Cw(),MultiselectPrompt:ES(),AutocompletePrompt:Lw(),AutocompleteMultiselectPrompt:Vw(),ConfirmPrompt:qw()}});var ek=I(Qw=>{"use strict";var tt=Qw,iV=Jw(),yd=e=>e;function Jt(e,t,n={}){return new Promise((i,r)=>{let o=new iV[e](t),a=n.onAbort||yd,c=n.onSubmit||yd,u=n.onExit||yd;o.on("state",t.onState||yd),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}tt.text=e=>Jt("TextPrompt",e);tt.password=e=>(e.style="password",tt.text(e));tt.invisible=e=>(e.style="invisible",tt.text(e));tt.number=e=>Jt("NumberPrompt",e);tt.date=e=>Jt("DatePrompt",e);tt.confirm=e=>Jt("ConfirmPrompt",e);tt.list=e=>{let t=e.separator||",";return Jt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};tt.toggle=e=>Jt("TogglePrompt",e);tt.select=e=>Jt("SelectPrompt",e);tt.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Jt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};tt.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Jt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var oV=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));tt.autocomplete=e=>(e.suggest=e.suggest||oV,e.choices=[].concat(e.choices||[]),Jt("AutocompletePrompt",e))});var ck=I((hre,sk)=>{"use strict";function tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function rk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tk(Object(n),!0).forEach(function(i){aV(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tk(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function aV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sV(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=cV(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
53
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function cV(e,t){if(e){if(typeof e=="string")return nk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nk(e,t)}}function nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ik(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function ok(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){ik(o,i,r,a,c,"next",u)}function c(u){ik(o,i,r,a,c,"throw",u)}a(void 0)})}}var CS=ek(),uV=["suggest","format","onState","validate","onRender","type"],ak=()=>{};function Xr(){return NS.apply(this,arguments)}function NS(){return NS=ok(function*(e=[],{onSubmit:t=ak,onCancel:n=ak}={}){let i={},r=Xr._override||{};e=[].concat(e);let o,a,c,u,l,d,p=(function(){var j=ok(function*(he,nt,_e=!1){if(!(!_e&&he.validate&&he.validate(nt)!==!0))return he.format?yield he.format(nt,i):nt});return function(nt,_e){return j.apply(this,arguments)}})();var g=sV(e),v;try{for(g.s();!(v=g.n()).done;){a=v.value;var x=a;if(u=x.name,l=x.type,typeof l=="function"&&(l=yield l(o,rk({},i),a),a.type=l),!!l){for(let j in a){if(uV.includes(j))continue;let he=a[j];a[j]=typeof he=="function"?yield he(o,rk({},i),d):he}if(d=a,typeof a.message!="string")throw new Error("prompt message is required");var G=a;if(u=G.name,l=G.type,CS[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=yield p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Xr._injected?lV(Xr._injected,a.initial):yield CS[l](a),i[u]=o=yield p(a,o,!0),c=yield t(a,o,i)}catch{c=!(yield n(a,i))}if(c)return i}}}catch(j){g.e(j)}finally{g.f()}return i}),NS.apply(this,arguments)}function lV(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function dV(e){Xr._injected=(Xr._injected||[]).concat(e)}function mV(e){Xr._override=Object.assign({},e)}sk.exports=Object.assign(Xr,{prompt:Xr,prompts:CS,inject:dV,override:mV})});var lk=I((vre,uk)=>{"use strict";uk.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var Sd=I((bre,dk)=>{"use strict";dk.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var fk=I((yre,pk)=>{"use strict";var pV=Sd(),{erase:mk,cursor:fV}=ue(),gV=e=>[...pV(e)].length;pk.exports=function(e,t){if(!t)return mk.line+fV.to(0);let n=0,i=e.split(/\r?\n/);for(let r of i)n+=1+Math.floor(Math.max(gV(r)-1,0)/t);return mk.lines(n)}});var PS=I((Sre,gk)=>{"use strict";var vs={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},hV={arrowUp:vs.arrowUp,arrowDown:vs.arrowDown,arrowLeft:vs.arrowLeft,arrowRight:vs.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},vV=process.platform==="win32"?hV:vs;gk.exports=vV});var vk=I((_re,hk)=>{"use strict";var ho=ce(),Fn=PS(),wS=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),bV=e=>wS[e]||wS.default,bs=Object.freeze({aborted:ho.red(Fn.cross),done:ho.green(Fn.tick),exited:ho.yellow(Fn.cross),default:ho.cyan("?")}),yV=(e,t,n)=>t?bs.aborted:n?bs.exited:e?bs.done:bs.default,SV=e=>ho.gray(e?Fn.ellipsis:Fn.pointerSmall),_V=(e,t)=>ho.gray(e?t?Fn.pointerSmall:"+":Fn.line);hk.exports={styles:wS,render:bV,symbols:bs,symbol:yV,delimiter:SV,item:_V}});var yk=I((Ere,bk)=>{"use strict";var EV=Sd();bk.exports=function(e,t){let n=String(EV(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var _k=I((xre,Sk)=>{"use strict";Sk.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
54
54
  `)).join(`
55
- `)}});var Ek=I((xre,_k)=>{"use strict";_k.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Pt=I((Are,xk)=>{"use strict";xk.exports={action:uk(),clear:pk(),style:hk(),strip:Sd(),figures:NS(),lines:bk(),wrap:Sk(),entriesToDisplay:Ek()}});var Sr=I((Ire,Ik)=>{"use strict";var Ak=Es("readline"),{action:EV}=Pt(),xV=Es("events"),{beep:AV,cursor:IV}=ue(),TV=ce(),wS=class extends xV{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=Ak.createInterface({input:this.in,escapeCodeTimeout:50});Ak.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=EV(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(IV.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(AV)}render(){this.onRender(TV),this.firstRender&&(this.firstRender=!1)}};Ik.exports=wS});var $k=I((Tre,Tk)=>{var _d=ce(),$V=Sr(),{erase:RV,cursor:Ss}=ue(),{style:kS,clear:OS,lines:CV,figures:NV}=Pt(),DS=class extends $V{constructor(t={}){super(t),this.transform=kS.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=OS("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=_d.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
55
+ `)}});var xk=I((Are,Ek)=>{"use strict";Ek.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Pt=I((Ire,Ak)=>{"use strict";Ak.exports={action:lk(),clear:fk(),style:vk(),strip:Sd(),figures:PS(),lines:yk(),wrap:_k(),entriesToDisplay:xk()}});var Sr=I((Tre,Tk)=>{"use strict";var Ik=_s("readline"),{action:xV}=Pt(),AV=_s("events"),{beep:IV,cursor:TV}=ue(),$V=ce(),kS=class extends AV{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=Ik.createInterface({input:this.in,escapeCodeTimeout:50});Ik.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=xV(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(TV.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(IV)}render(){this.onRender($V),this.firstRender&&(this.firstRender=!1)}};Tk.exports=kS});var Rk=I(($re,$k)=>{var _d=ce(),RV=Sr(),{erase:CV,cursor:ys}=ue(),{style:OS,clear:DS,lines:NV,figures:PV}=Pt(),MS=class extends RV{constructor(t={}){super(t),this.transform=OS.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=DS("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=_d.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
56
56
  `),this.close()}async validate(){let t=await this.validator(this.value);typeof t=="string"&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
57
- `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Ss.down(CV(this.outputError,this.out.columns)-1)+OS(this.outputError,this.out.columns)),this.out.write(OS(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[kS.symbol(this.done,this.aborted),_d.bold(this.msg),kS.delimiter(this.done),this.red?_d.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
57
+ `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ys.down(NV(this.outputError,this.out.columns)-1)+DS(this.outputError,this.out.columns)),this.out.write(DS(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[OS.symbol(this.done,this.aborted),_d.bold(this.msg),OS.delimiter(this.done),this.red?_d.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
58
58
  `).reduce((t,n,i)=>t+`
59
- ${i?" ":NV.pointerSmall} ${_d.red().italic(n)}`,"")),this.out.write(RV.line+Ss.to(0)+this.outputText+Ss.save+this.outputError+Ss.restore+Ss.move(this.cursorOffset,0)))}};Tk.exports=DS});var Pk=I(($re,Nk)=>{"use strict";var _r=ce(),PV=Sr(),{style:Rk,clear:Ck,figures:Ed,wrap:wV,entriesToDisplay:kV}=Pt(),{cursor:OV}=ue(),MS=class extends PV{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Ck("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
59
+ ${i?" ":PV.pointerSmall} ${_d.red().italic(n)}`,"")),this.out.write(CV.line+ys.to(0)+this.outputText+ys.save+this.outputError+ys.restore+ys.move(this.cursorOffset,0)))}};$k.exports=MS});var wk=I((Rre,Pk)=>{"use strict";var _r=ce(),wV=Sr(),{style:Ck,clear:Nk,figures:Ed,wrap:kV,entriesToDisplay:OV}=Pt(),{cursor:DV}=ue(),jS=class extends wV{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Nk("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
60
60
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
61
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(OV.hide):this.out.write(Ck(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=kV(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Rk.symbol(this.done,this.aborted),_r.bold(this.msg),Rk.delimiter(!1),this.done?this.selection.title:this.selection.disabled?_r.yellow(this.warn):_r.gray(this.hint)].join(" "),!this.done){this.outputText+=`
61
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(DV.hide):this.out.write(Nk(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=OV(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Ck.symbol(this.done,this.aborted),_r.bold(this.msg),Ck.delimiter(!1),this.done?this.selection.title:this.selection.disabled?_r.yellow(this.warn):_r.gray(this.hint)].join(" "),!this.done){this.outputText+=`
62
62
  `;for(let i=t;i<n;i++){let r,o,a="",c=this.choices[i];i===t&&t>0?o=Ed.arrowUp:i===n-1&&n<this.choices.length?o=Ed.arrowDown:o=" ",c.disabled?(r=this.cursor===i?_r.gray().underline(c.title):_r.strikethrough().gray(c.title),o=(this.cursor===i?_r.bold().gray(Ed.pointer)+" ":" ")+o):(r=this.cursor===i?_r.cyan().underline(c.title):c.title,o=(this.cursor===i?_r.cyan(Ed.pointer)+" ":" ")+o,c.description&&this.cursor===i&&(a=` - ${c.description}`,(o.length+r.length+a.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(a=`
63
- `+wV(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${_r.gray(a)}
64
- `}}this.out.write(this.outputText)}};Nk.exports=MS});var Dk=I((Rre,Ok)=>{var xd=ce(),DV=Sr(),{style:wk,clear:MV}=Pt(),{cursor:kk,erase:jV}=ue(),jS=class extends DV{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
63
+ `+kV(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${_r.gray(a)}
64
+ `}}this.out.write(this.outputText)}};Pk.exports=jS});var Mk=I((Cre,Dk)=>{var xd=ce(),MV=Sr(),{style:kk,clear:jV}=Pt(),{cursor:Ok,erase:zV}=ue(),zS=class extends MV{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
65
65
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
66
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(kk.hide):this.out.write(MV(this.outputText,this.out.columns)),super.render(),this.outputText=[wk.symbol(this.done,this.aborted),xd.bold(this.msg),wk.delimiter(this.done),this.value?this.inactive:xd.cyan().underline(this.inactive),xd.gray("/"),this.value?xd.cyan().underline(this.active):this.active].join(" "),this.out.write(jV.line+kk.to(0)+this.outputText))}};Ok.exports=jS});var Qt=I((Cre,Mk)=>{"use strict";var zS=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};Mk.exports=zS});var zk=I((Nre,jk)=>{"use strict";var zV=Qt(),LS=class extends zV{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};jk.exports=LS});var Uk=I((Pre,Lk)=>{"use strict";var LV=Qt(),UV=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),US=class extends LV{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+UV(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};Lk.exports=US});var Bk=I((wre,Fk)=>{"use strict";var FV=Qt(),FS=class extends FV{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};Fk.exports=FS});var Gk=I((kre,Vk)=>{"use strict";var BV=Qt(),BS=class extends BV{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Vk.exports=BS});var Wk=I((Ore,Zk)=>{"use strict";var VV=Qt(),VS=class extends VV{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};Zk.exports=VS});var Yk=I((Dre,Hk)=>{"use strict";var GV=Qt(),GS=class extends GV{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};Hk.exports=GS});var qk=I((Mre,Kk)=>{"use strict";var ZV=Qt(),ZS=class extends ZV{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};Kk.exports=ZS});var Jk=I((jre,Xk)=>{"use strict";var WV=Qt(),WS=class extends WV{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};Xk.exports=WS});var eO=I((zre,Qk)=>{"use strict";Qk.exports={DatePart:Qt(),Meridiem:zk(),Day:Uk(),Hours:Bk(),Milliseconds:Gk(),Minutes:Wk(),Month:Yk(),Seconds:qk(),Year:Jk()}});var sO=I((Lre,aO)=>{"use strict";var HS=ce(),HV=Sr(),{style:tO,clear:rO,figures:YV}=Pt(),{erase:KV,cursor:nO}=ue(),{DatePart:iO,Meridiem:qV,Day:XV,Hours:JV,Milliseconds:QV,Minutes:eG,Month:tG,Seconds:rG,Year:nG}=eO(),iG=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,oO={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new XV(e),3:e=>new tG(e),4:e=>new nG(e),5:e=>new qV(e),6:e=>new JV(e),7:e=>new eG(e),8:e=>new rG(e),9:e=>new QV(e)},oG={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},YS=class extends HV{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(oG,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=rO("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=iG.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in oO?oO[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof iO)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
66
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(Ok.hide):this.out.write(jV(this.outputText,this.out.columns)),super.render(),this.outputText=[kk.symbol(this.done,this.aborted),xd.bold(this.msg),kk.delimiter(this.done),this.value?this.inactive:xd.cyan().underline(this.inactive),xd.gray("/"),this.value?xd.cyan().underline(this.active):this.active].join(" "),this.out.write(zV.line+Ok.to(0)+this.outputText))}};Dk.exports=zS});var Qt=I((Nre,jk)=>{"use strict";var LS=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};jk.exports=LS});var Lk=I((Pre,zk)=>{"use strict";var LV=Qt(),US=class extends LV{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};zk.exports=US});var Fk=I((wre,Uk)=>{"use strict";var UV=Qt(),FV=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),FS=class extends UV{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+FV(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};Uk.exports=FS});var Vk=I((kre,Bk)=>{"use strict";var BV=Qt(),BS=class extends BV{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};Bk.exports=BS});var Zk=I((Ore,Gk)=>{"use strict";var VV=Qt(),VS=class extends VV{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Gk.exports=VS});var Hk=I((Dre,Wk)=>{"use strict";var GV=Qt(),GS=class extends GV{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};Wk.exports=GS});var Kk=I((Mre,Yk)=>{"use strict";var ZV=Qt(),ZS=class extends ZV{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};Yk.exports=ZS});var Xk=I((jre,qk)=>{"use strict";var WV=Qt(),WS=class extends WV{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};qk.exports=WS});var Qk=I((zre,Jk)=>{"use strict";var HV=Qt(),HS=class extends HV{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};Jk.exports=HS});var tO=I((Lre,eO)=>{"use strict";eO.exports={DatePart:Qt(),Meridiem:Lk(),Day:Fk(),Hours:Vk(),Milliseconds:Zk(),Minutes:Hk(),Month:Kk(),Seconds:Xk(),Year:Qk()}});var cO=I((Ure,sO)=>{"use strict";var YS=ce(),YV=Sr(),{style:rO,clear:nO,figures:KV}=Pt(),{erase:qV,cursor:iO}=ue(),{DatePart:oO,Meridiem:XV,Day:JV,Hours:QV,Milliseconds:eG,Minutes:tG,Month:rG,Seconds:nG,Year:iG}=tO(),oG=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,aO={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new JV(e),3:e=>new rG(e),4:e=>new iG(e),5:e=>new XV(e),6:e=>new QV(e),7:e=>new tG(e),8:e=>new nG(e),9:e=>new eG(e)},aG={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},KS=class extends YV{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(aG,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=nO("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=oG.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in aO?aO[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof oO)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
67
67
  `),this.close()}async validate(){let t=await this.validator(this.value);typeof t=="string"&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
68
- `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof iO)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(nO.hide):this.out.write(rO(this.outputText,this.out.columns)),super.render(),this.outputText=[tO.symbol(this.done,this.aborted),HS.bold(this.msg),tO.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?HS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
68
+ `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof oO)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(iO.hide):this.out.write(nO(this.outputText,this.out.columns)),super.render(),this.outputText=[rO.symbol(this.done,this.aborted),YS.bold(this.msg),rO.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?YS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
69
69
  `).reduce((t,n,i)=>t+`
70
- ${i?" ":YV.pointerSmall} ${HS.red().italic(n)}`,"")),this.out.write(KV.line+nO.to(0)+this.outputText))}};aO.exports=YS});var dO=I((Ure,lO)=>{var Ad=ce(),aG=Sr(),{cursor:Id,erase:sG}=ue(),{style:KS,figures:cG,clear:cO,lines:uG}=Pt(),lG=/[0-9]/,qS=e=>e!==void 0,uO=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},XS=class extends aG{constructor(t={}){super(t),this.transform=KS.render(t.style),this.msg=t.message,this.initial=qS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=qS(t.min)?t.min:-1/0,this.max=qS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=Ad.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${uO(t,this.round)}`),this._value=uO(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||lG.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
70
+ ${i?" ":KV.pointerSmall} ${YS.red().italic(n)}`,"")),this.out.write(qV.line+iO.to(0)+this.outputText))}};sO.exports=KS});var mO=I((Fre,dO)=>{var Ad=ce(),sG=Sr(),{cursor:Id,erase:cG}=ue(),{style:qS,figures:uG,clear:uO,lines:lG}=Pt(),dG=/[0-9]/,XS=e=>e!==void 0,lO=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},JS=class extends sG{constructor(t={}){super(t),this.transform=qS.render(t.style),this.msg=t.message,this.initial=XS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=XS(t.min)?t.min:-1/0,this.max=XS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=Ad.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${lO(t,this.round)}`),this._value=lO(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||dG.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
71
71
  `),this.close()}async validate(){let t=await this.validator(this.value);typeof t=="string"&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let t=this.value;this.value=t!==""?t:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
72
- `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Id.down(uG(this.outputError,this.out.columns)-1)+cO(this.outputError,this.out.columns)),this.out.write(cO(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[KS.symbol(this.done,this.aborted),Ad.bold(this.msg),KS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Ad[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
72
+ `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Id.down(lG(this.outputError,this.out.columns)-1)+uO(this.outputError,this.out.columns)),this.out.write(uO(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[qS.symbol(this.done,this.aborted),Ad.bold(this.msg),qS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Ad[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
73
73
  `).reduce((t,n,i)=>t+`
74
- ${i?" ":cG.pointerSmall} ${Ad.red().italic(n)}`,"")),this.out.write(sG.line+Id.to(0)+this.outputText+Id.save+this.outputError+Id.restore))}};lO.exports=XS});var QS=I((Fre,fO)=>{"use strict";var er=ce(),{cursor:dG}=ue(),mG=Sr(),{clear:mO,figures:Jr,style:pO,wrap:pG,entriesToDisplay:fG}=Pt(),JS=class extends mG{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=mO("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
74
+ ${i?" ":uG.pointerSmall} ${Ad.red().italic(n)}`,"")),this.out.write(cG.line+Id.to(0)+this.outputText+Id.save+this.outputError+Id.restore))}};dO.exports=JS});var e_=I((Bre,gO)=>{"use strict";var er=ce(),{cursor:mG}=ue(),pG=Sr(),{clear:pO,figures:Jr,style:fO,wrap:fG,entriesToDisplay:gG}=Pt(),QS=class extends pG{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=pO("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
75
75
  `),this.close()}submit(){let t=this.value.filter(n=>n.selected);this.minSelected&&t.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
76
76
  `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let t=!this.value[this.cursor].selected;this.value.filter(n=>!n.disabled).forEach(n=>n.selected=t),this.render()}_(t,n){if(t===" ")this.handleSpaceToggle();else if(t==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
77
77
  Instructions:
@@ -79,28 +79,28 @@ Instructions:
79
79
  ${Jr.arrowLeft}/${Jr.arrowRight}/[space]: Toggle selection
80
80
  `+(this.maxChoices===void 0?` a: Toggle all
81
81
  `:"")+" enter/return: Complete answer":""}renderOption(t,n,i,r){let o=(n.selected?er.green(Jr.radioOn):Jr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?er.gray().underline(n.title):er.strikethrough().gray(n.title):(a=t===i?er.cyan().underline(n.title):n.title,t===i&&n.description&&(c=` - ${n.description}`,(o.length+a.length+c.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(c=`
82
- `+pG(n.description,{margin:o.length,width:this.out.columns})))),o+a+er.gray(c||"")}paginateOptions(t){if(t.length===0)return er.red("No matches for this query.");let{startIndex:n,endIndex:i}=fG(this.cursor,t.length,this.optionsPerPage),r,o=[];for(let a=n;a<i;a++)a===n&&n>0?r=Jr.arrowUp:a===i-1&&i<t.length?r=Jr.arrowDown:r=" ",o.push(this.renderOption(this.cursor,t[a],a,r));return`
82
+ `+fG(n.description,{margin:o.length,width:this.out.columns})))),o+a+er.gray(c||"")}paginateOptions(t){if(t.length===0)return er.red("No matches for this query.");let{startIndex:n,endIndex:i}=gG(this.cursor,t.length,this.optionsPerPage),r,o=[];for(let a=n;a<i;a++)a===n&&n>0?r=Jr.arrowUp:a===i-1&&i<t.length?r=Jr.arrowDown:r=" ",o.push(this.renderOption(this.cursor,t[a],a,r));return`
83
83
  `+o.join(`
84
- `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[er.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(er.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(dG.hide),super.render();let t=[pO.symbol(this.done,this.aborted),er.bold(this.msg),pO.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=er.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=mO(t,this.out.columns)}};fO.exports=JS});var yO=I((Bre,bO)=>{"use strict";var _s=ce(),gG=Sr(),{erase:hG,cursor:gO}=ue(),{style:e_,clear:hO,figures:t_,wrap:vG,entriesToDisplay:bG}=Pt(),vO=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),yG=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),SG=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},r_=class extends gG{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:SG(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=e_.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=hO("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=vO(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){let n=this.completing=this.suggest(this.input,this.choices),i=await n;if(this.completing!==n)return;this.suggestions=i.map((o,a,c)=>({title:yG(c,a),value:vO(c,a),description:o.description})),this.completing=!1;let r=Math.max(i.length-1,0);this.moveSelect(Math.min(r,this.select)),t&&t()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
84
+ `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[er.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(er.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(mG.hide),super.render();let t=[fO.symbol(this.done,this.aborted),er.bold(this.msg),fO.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=er.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=pO(t,this.out.columns)}};gO.exports=QS});var SO=I((Vre,yO)=>{"use strict";var Ss=ce(),hG=Sr(),{erase:vG,cursor:hO}=ue(),{style:t_,clear:vO,figures:r_,wrap:bG,entriesToDisplay:yG}=Pt(),bO=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),SG=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),_G=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},n_=class extends hG{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:_G(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=t_.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=vO("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=bO(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){let n=this.completing=this.suggest(this.input,this.choices),i=await n;if(this.completing!==n)return;this.suggestions=i.map((o,a,c)=>({title:SG(c,a),value:bO(c,a),description:o.description})),this.completing=!1;let r=Math.max(i.length-1,0);this.moveSelect(Math.min(r,this.select)),t&&t()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
85
85
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
86
86
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
87
- `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?t_.arrowUp:r?t_.arrowDown:" ",c=n?_s.cyan().underline(t.title):t.title;return a=(n?_s.cyan(t_.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
88
- `+vG(t.description,{margin:3,width:this.out.columns}))),a+" "+c+_s.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(gO.hide):this.out.write(hO(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=bG(this.select,this.choices.length,this.limit);if(this.outputText=[e_.symbol(this.done,this.aborted,this.exited),_s.bold(this.msg),e_.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(t,n).map((r,o)=>this.renderOption(r,this.select===o+t,o===0&&t>0,o+t===n-1&&n<this.choices.length)).join(`
87
+ `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?r_.arrowUp:r?r_.arrowDown:" ",c=n?Ss.cyan().underline(t.title):t.title;return a=(n?Ss.cyan(r_.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
88
+ `+bG(t.description,{margin:3,width:this.out.columns}))),a+" "+c+Ss.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(hO.hide):this.out.write(vO(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=yG(this.select,this.choices.length,this.limit);if(this.outputText=[t_.symbol(this.done,this.aborted,this.exited),Ss.bold(this.msg),t_.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(t,n).map((r,o)=>this.renderOption(r,this.select===o+t,o===0&&t>0,o+t===n-1&&n<this.choices.length)).join(`
89
89
  `);this.outputText+=`
90
- `+(i||_s.gray(this.fallback.title))}this.out.write(hG.line+gO.to(0)+this.outputText)}};bO.exports=r_});var xO=I((Vre,EO)=>{"use strict";var Er=ce(),{cursor:_G}=ue(),EG=QS(),{clear:SO,style:_O,figures:bo}=Pt(),n_=class extends EG{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=SO("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
90
+ `+(i||Ss.gray(this.fallback.title))}this.out.write(vG.line+hO.to(0)+this.outputText)}};yO.exports=n_});var AO=I((Gre,xO)=>{"use strict";var Er=ce(),{cursor:EG}=ue(),xG=e_(),{clear:_O,style:EO,figures:vo}=Pt(),i_=class extends xG{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=_O("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
91
91
  Instructions:
92
- ${bo.arrowUp}/${bo.arrowDown}: Highlight option
93
- ${bo.arrowLeft}/${bo.arrowRight}/[space]: Toggle selection
92
+ ${vo.arrowUp}/${vo.arrowDown}: Highlight option
93
+ ${vo.arrowLeft}/${vo.arrowRight}/[space]: Toggle selection
94
94
  [a,b,c]/delete: Filter choices
95
95
  enter/return: Complete answer
96
96
  `:""}renderCurrentInput(){return`
97
97
  Filtered results for: ${this.inputValue?this.inputValue:Er.gray("Enter something to filter")}
98
- `}renderOption(t,n,i){let r;return n.disabled?r=t===i?Er.gray().underline(n.title):Er.strikethrough().gray(n.title):r=t===i?Er.cyan().underline(n.title):n.title,(n.selected?Er.green(bo.radioOn):bo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Er.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(Er.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(_G.hide),super.render();let t=[_O.symbol(this.done,this.aborted),Er.bold(this.msg),_O.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Er.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=SO(t,this.out.columns)}};EO.exports=n_});var RO=I((Gre,$O)=>{var AO=ce(),xG=Sr(),{style:IO,clear:AG}=Pt(),{erase:IG,cursor:TO}=ue(),i_=class extends xG{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
98
+ `}renderOption(t,n,i){let r;return n.disabled?r=t===i?Er.gray().underline(n.title):Er.strikethrough().gray(n.title):r=t===i?Er.cyan().underline(n.title):n.title,(n.selected?Er.green(vo.radioOn):vo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Er.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(Er.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(EG.hide),super.render();let t=[EO.symbol(this.done,this.aborted),Er.bold(this.msg),EO.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Er.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=_O(t,this.out.columns)}};xO.exports=i_});var CO=I((Zre,RO)=>{var IO=ce(),AG=Sr(),{style:TO,clear:IG}=Pt(),{erase:TG,cursor:$O}=ue(),o_=class extends AG{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
99
99
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
100
- `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(TO.hide):this.out.write(AG(this.outputText,this.out.columns)),super.render(),this.outputText=[IO.symbol(this.done,this.aborted),AO.bold(this.msg),IO.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:AO.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(IG.line+TO.to(0)+this.outputText))}};$O.exports=i_});var NO=I((Zre,CO)=>{"use strict";CO.exports={TextPrompt:$k(),SelectPrompt:Pk(),TogglePrompt:Dk(),DatePrompt:sO(),NumberPrompt:dO(),MultiselectPrompt:QS(),AutocompletePrompt:yO(),AutocompleteMultiselectPrompt:xO(),ConfirmPrompt:RO()}});var wO=I(PO=>{"use strict";var tt=PO,TG=NO(),Td=e=>e;function tr(e,t,n={}){return new Promise((i,r)=>{let o=new TG[e](t),a=n.onAbort||Td,c=n.onSubmit||Td,u=n.onExit||Td;o.on("state",t.onState||Td),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}tt.text=e=>tr("TextPrompt",e);tt.password=e=>(e.style="password",tt.text(e));tt.invisible=e=>(e.style="invisible",tt.text(e));tt.number=e=>tr("NumberPrompt",e);tt.date=e=>tr("DatePrompt",e);tt.confirm=e=>tr("ConfirmPrompt",e);tt.list=e=>{let t=e.separator||",";return tr("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};tt.toggle=e=>tr("TogglePrompt",e);tt.select=e=>tr("SelectPrompt",e);tt.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return tr("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};tt.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return tr("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var $G=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));tt.autocomplete=e=>(e.suggest=e.suggest||$G,e.choices=[].concat(e.choices||[]),tr("AutocompletePrompt",e))});var DO=I((Hre,OO)=>{"use strict";var o_=wO(),RG=["suggest","format","onState","validate","onRender","type"],kO=()=>{};async function Qr(e=[],{onSubmit:t=kO,onCancel:n=kO}={}){let i={},r=Qr._override||{};e=[].concat(e);let o,a,c,u,l,d,p=async(g,v,x=!1)=>{if(!(!x&&g.validate&&g.validate(v)!==!0))return g.format?await g.format(v,i):v};for(a of e)if({name:u,type:l}=a,typeof l=="function"&&(l=await l(o,{...i},a),a.type=l),!!l){for(let g in a){if(RG.includes(g))continue;let v=a[g];a[g]=typeof v=="function"?await v(o,{...i},d):v}if(d=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=a,o_[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=await p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Qr._injected?CG(Qr._injected,a.initial):await o_[l](a),i[u]=o=await p(a,o,!0),c=await t(a,o,i)}catch{c=!await n(a,i)}if(c)return i}return i}function CG(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function NG(e){Qr._injected=(Qr._injected||[]).concat(e)}function PG(e){Qr._override=Object.assign({},e)}OO.exports=Object.assign(Qr,{prompt:Qr,prompts:o_,inject:NG,override:PG})});var jO=I((Yre,MO)=>{function wG(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,n=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(n[t]>e[t])return!1;if(e[t]>n[t])return!0}return!1}MO.exports=wG("8.6.0")?sk():DO()});import{join as lt,dirname as d_,normalize as XO}from"node:path";import{readFileSync as JO,existsSync as QO}from"node:fs";var qO=Object.defineProperty,Ne=(e,t)=>qO(e,"name",{value:t,configurable:!0}),en="fjall";function tn(e,t){let n=XO(e);if(n.includes("..")||n.startsWith("/"))throw new Error(`Invalid ${t}: path traversal is not allowed`)}Ne(tn,"assertNoTraversal");function eD(){return en}Ne(eD,"getFjallPath");function tD(e){let t=d_(e);return d_(t)||"."}Ne(tD,"getProjectRoot");function m_(e){if(!QO(e))throw new Error(`Infrastructure file not found: ${e}`);let t=JO(e,"utf-8").match(/const\s+appName\s*=\s*["']([^"']+)["']/);if(!t||!t[1])throw new Error(`Could not find appName in infrastructure file: ${e}. Expected format: const appName = "yourAppName";`);return t[1]}Ne(m_,"getAppNameFromInfrastructure");function rD(e){let t=lt(e,Cd);return m_(t)}Ne(rD,"getAppName");function rr(e){return tn(e,"app name"),lt(en,e,Cd)}Ne(rr,"getInfrastructurePath");function p_(e){return tn(e,"app name"),lt(en,e)}Ne(p_,"getAppPath");function nD(e,t){return lt(t??process.cwd(),p_(e))}Ne(nD,"resolveAppScaffoldPath");function iD(e){return tn(e,"component name"),lt(en,e)}Ne(iD,"getOrganisationComponentPath");function oD(e){return tn(e,"deployment type"),lt(en,e,"logs")}Ne(oD,"getDeploymentLogsPath");function aD(e){return tn(e,"deployment type"),lt(en,e,"logs","cloudformation")}Ne(aD,"getCloudFormationLogsPath");function f_(){return lt(en,"domains")}Ne(f_,"getDomainsDir");function Rd(e){return tn(e,"domain name"),lt(f_(),e)}Ne(Rd,"getDomainComponentPath");function sD(e){return lt(Rd(e),Cd)}Ne(sD,"getDomainInfrastructurePath");function cD(e){return lt(Rd(e),uD)}Ne(cD,"getDomainZoneFilePath");var Cd="infrastructure.ts",uD="zone.bind",lD="cdk.out";function dD(e){return lt(e,lD)}Ne(dD,"getCdkOutPath");var mD=Object.defineProperty,Vn=(e,t)=>mD(e,"name",{value:t,configurable:!0});function Nd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Vn(Nd,"escapeRegExp");function rn(e,t,n){let i=rr(t),r=e.read(i)?.toString();return r?new RegExp(`["']${Nd(n)}["']`).test(r):!1}Vn(rn,"resourceExists");function yo(e,t,n){let i=rr(t);if(!e.read(i)?.toString())throw new Error(`Infrastructure file not found for ${t}`);if(rn(e,t,n))throw new Error(`Resource name '${n}' already exists in ${t}. Please choose a different name or remove the existing resource first.`)}Vn(yo,"assertResourceNameUnique");function Pd(e,t,n){let i=rr(t),r=e.read(i)?.toString();if(!r)return 0;let o={database:/DatabaseFactory\.build\(/g,compute:/ComputeFactory\.build\(/g,lambda:/type:\s*["']lambda["']/g,ecs:/type:\s*["']ecs["']/g,ec2:/type:\s*["']ec2["']/g}[n];if(!o)return 0;let a=r.match(o);return a?a.length:0}Vn(Pd,"countResourcesOfType");function pD(e,t){let n=rr(t),i=e.read(n)?.toString();if(!i)return[];let r=[],o=i.matchAll(/ComputeFactory\.build\(["']([^"']+)["'],\s*\{([^}]*?)\}/gs);for(let a of o){let c=a[1],u=a[2],l="ecs";u.includes('type: "lambda"')?l="lambda":u.includes('type: "ec2"')&&(l="ec2");let d=u.includes("connections:"),p=[];if(d){let g=u.match(/connections:\s*\[([^\]]+)\]/);if(g){let v=g[1].match(/\w+/g)??[];p.push(...v)}}r.push({name:c,type:l,hasConnections:d,connectedResources:p})}return r}Vn(pD,"detectComputeResources");function fD(e,t,n){let i=rr(t),r=e.read(i)?.toString();return r?new RegExp(`databaseName:\\s*["']${Nd(n)}["']`).test(r):!1}Vn(fD,"databaseExists");import*as po from"fs";import*as eP from"path";var gD=Object.defineProperty,xr=(e,t)=>gD(e,"name",{value:t,configurable:!0});function Pe(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase()).replace(/^./,t=>t.toUpperCase())}xr(Pe,"toPascalCase");function kt(e){return e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}xr(kt,"toKebab");function Gn(e){return kt(e).replace(/-/g,"_")}xr(Gn,"toValidDatabaseName");function g_(e){return kt(e).replace(/-/g,"_").toUpperCase()}xr(g_,"toScreamingSnake");function h_(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}xr(h_,"capitalise");function v_(e){return e.split(".").join("")}xr(v_,"getSafeZoneName");function nn(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}xr(nn,"accountConstructKey");function b_(e){let t=e.replace(new RegExp("\\P{ASCII}","gu"),"");return nn(t)===nn(e)&&nn(e)!==""}xr(b_,"hasAsciiStableConstructKey");var hD=Object.defineProperty,xs=(e,t)=>hD(e,"name",{value:t,configurable:!0});function As(e){return`${Pe(e.split(".").join(""))}Domain`}xs(As,"getDomainStackName");function y_(e){return`${e}UsEast1Certificates`}xs(y_,"getDomainUsEast1CertificatesStackName");function wd(e){let t=e.replace(/\./g,"-");return{hostedZoneId:`${t}-hosted-zone-id`,certificateArn:`${t}-certificate-arn`,usEast1CertificateArn:`${t}-us-east-1-certificate-arn`,delegationRoleArn:`${t}-delegation-role-arn`,nameservers:`${t}-nameservers`}}xs(wd,"getDomainExportNames");function S_(e){return typeof e.hostedZoneId=="string"}xs(S_,"isManagedDomainBinding");var vD=Object.defineProperty,bD=(e,t)=>vD(e,"name",{value:t,configurable:!0});function __(e){return`${Pe(e)}ImageTag`}bD(__,"imageTagParameterName");var yD=Object.defineProperty,on=(e,t)=>yD(e,"name",{value:t,configurable:!0});function Zn(e){return Pe(e.replace(/[^A-Za-z0-9-]/g,""))}on(Zn,"safeExportToken");function kd(e,t){let n=Zn(e);return t===void 0?n:`${n}-${Zn(t)}-`}on(kd,"albExportScope");function E_(e,t){return`${kd(e,t)}AlbDnsName`}on(E_,"albDnsExportName");function x_(e,t){return`${kd(e,t)}AlbHostedZoneId`}on(x_,"albHostedZoneIdExportName");function A_(e){return`${Zn(e)}CdnDistributionDomainName`}on(A_,"cdnDomainExportName");function I_(e){return`${Zn(e)}WebsiteEndpoint`}on(I_,"bucketWebsiteEndpointExportName");function T_(e){return`${Zn(e)}WebsiteHostedZoneId`}on(T_,"bucketWebsiteHostedZoneIdExportName");var s={};wt(s,{$brand:()=>Dd,$input:()=>rf,$output:()=>tf,NEVER:()=>Od,TimePrecision:()=>sf,ZodAny:()=>qg,ZodArray:()=>eh,ZodBase64:()=>Xc,ZodBase64URL:()=>Jc,ZodBigInt:()=>Ei,ZodBigIntFormat:()=>tu,ZodBoolean:()=>_i,ZodCIDRv4:()=>Kc,ZodCIDRv6:()=>qc,ZodCUID:()=>Bc,ZodCUID2:()=>Vc,ZodCatch:()=>Eh,ZodCodec:()=>Xo,ZodCustom:()=>Jo,ZodCustomStringFormat:()=>yi,ZodDate:()=>Wo,ZodDefault:()=>hh,ZodDiscriminatedUnion:()=>rh,ZodE164:()=>Qc,ZodEmail:()=>Lc,ZodEmoji:()=>Uc,ZodEnum:()=>vi,ZodError:()=>qM,ZodExactOptional:()=>ph,ZodFile:()=>dh,ZodFirstPartyTypeKind:()=>Dh,ZodFunction:()=>wh,ZodGUID:()=>Fo,ZodIPv4:()=>Hc,ZodIPv6:()=>Yc,ZodISODate:()=>kc,ZodISODateTime:()=>wc,ZodISODuration:()=>Dc,ZodISOTime:()=>Oc,ZodIntersection:()=>nh,ZodIssueCode:()=>JM,ZodJWT:()=>eu,ZodKSUID:()=>Wc,ZodLazy:()=>Ch,ZodLiteral:()=>lh,ZodMAC:()=>Vg,ZodMap:()=>ch,ZodNaN:()=>Ah,ZodNanoID:()=>Fc,ZodNever:()=>Jg,ZodNonOptional:()=>su,ZodNull:()=>Yg,ZodNullable:()=>gh,ZodNumber:()=>Si,ZodNumberFormat:()=>fn,ZodObject:()=>Yo,ZodOptional:()=>au,ZodPipe:()=>qo,ZodPrefault:()=>bh,ZodPreprocess:()=>Ih,ZodPromise:()=>Ph,ZodReadonly:()=>Th,ZodRealError:()=>He,ZodRecord:()=>hi,ZodSet:()=>uh,ZodString:()=>bi,ZodStringFormat:()=>X,ZodSuccess:()=>_h,ZodSymbol:()=>Wg,ZodTemplateLiteral:()=>Rh,ZodTransform:()=>mh,ZodTuple:()=>oh,ZodType:()=>k,ZodULID:()=>Gc,ZodURL:()=>Zo,ZodUUID:()=>jt,ZodUndefined:()=>Hg,ZodUnion:()=>Ko,ZodUnknown:()=>Xg,ZodVoid:()=>Qg,ZodXID:()=>Zc,ZodXor:()=>th,_ZodString:()=>zc,_default:()=>vh,_function:()=>fA,any:()=>Zx,array:()=>Ho,base64:()=>Rx,base64url:()=>Cx,bigint:()=>Ux,boolean:()=>Zg,catch:()=>xh,check:()=>gA,cidrv4:()=>Tx,cidrv6:()=>$x,clone:()=>je,codec:()=>lA,coerce:()=>Mh,config:()=>le,core:()=>or,cuid:()=>bx,cuid2:()=>yx,custom:()=>hA,date:()=>Hx,decode:()=>Mg,decodeAsync:()=>zg,describe:()=>vA,discriminatedUnion:()=>Qx,e164:()=>Nx,email:()=>cx,emoji:()=>hx,encode:()=>Dg,encodeAsync:()=>jg,endsWith:()=>ai,enum:()=>iu,exactOptional:()=>fh,file:()=>aA,flattenError:()=>$o,float32:()=>Mx,float64:()=>jx,formatError:()=>Ro,fromJSONSchema:()=>AA,function:()=>fA,getErrorMap:()=>ej,globalRegistry:()=>Te,gt:()=>Dt,gte:()=>Le,guid:()=>ux,hash:()=>Dx,hex:()=>Ox,hostname:()=>kx,httpUrl:()=>gx,includes:()=>ii,instanceof:()=>yA,int:()=>Mc,int32:()=>zx,int64:()=>Fx,intersection:()=>ih,invertCodec:()=>dA,ipv4:()=>xx,ipv6:()=>Ix,iso:()=>gi,json:()=>_A,jwt:()=>Px,keyof:()=>Yx,ksuid:()=>Ex,lazy:()=>Nh,length:()=>mn,literal:()=>oA,locales:()=>Mo,looseObject:()=>Xx,looseRecord:()=>tA,lowercase:()=>ri,lt:()=>Ot,lte:()=>it,mac:()=>Ax,map:()=>rA,maxLength:()=>dn,maxSize:()=>Nr,meta:()=>bA,mime:()=>si,minLength:()=>ir,minSize:()=>Mt,multipleOf:()=>Cr,nan:()=>uA,nanoid:()=>vx,nativeEnum:()=>iA,negative:()=>Ec,never:()=>ru,nonnegative:()=>Ac,nonoptional:()=>Sh,nonpositive:()=>xc,normalize:()=>ci,null:()=>Kg,nullable:()=>Vo,nullish:()=>sA,number:()=>Gg,object:()=>Kx,optional:()=>Bo,overwrite:()=>It,parse:()=>Pg,parseAsync:()=>wg,partialRecord:()=>eA,pipe:()=>jc,positive:()=>_c,prefault:()=>yh,preprocess:()=>EA,prettifyError:()=>Yd,promise:()=>pA,property:()=>Ic,readonly:()=>$h,record:()=>sh,refine:()=>kh,regex:()=>ti,regexes:()=>nt,registry:()=>ec,safeDecode:()=>Ug,safeDecodeAsync:()=>Bg,safeEncode:()=>Lg,safeEncodeAsync:()=>Fg,safeParse:()=>kg,safeParseAsync:()=>Og,set:()=>nA,setErrorMap:()=>QM,size:()=>ln,slugify:()=>mi,startsWith:()=>oi,strictObject:()=>qx,string:()=>Uo,stringFormat:()=>wx,stringbool:()=>SA,success:()=>cA,superRefine:()=>Oh,symbol:()=>Vx,templateLiteral:()=>mA,toJSONSchema:()=>Cc,toLowerCase:()=>li,toUpperCase:()=>di,transform:()=>ou,treeifyError:()=>Hd,trim:()=>ui,tuple:()=>ah,uint32:()=>Lx,uint64:()=>Bx,ulid:()=>Sx,undefined:()=>Gx,union:()=>nu,unknown:()=>pn,uppercase:()=>ni,url:()=>fx,util:()=>_,uuid:()=>lx,uuidv4:()=>dx,uuidv6:()=>mx,uuidv7:()=>px,void:()=>Wx,xid:()=>_x,xor:()=>Jx});var or={};wt(or,{$ZodAny:()=>xp,$ZodArray:()=>Rp,$ZodAsyncError:()=>At,$ZodBase64:()=>pp,$ZodBase64URL:()=>fp,$ZodBigInt:()=>Ws,$ZodBigIntFormat:()=>yp,$ZodBoolean:()=>wo,$ZodCIDRv4:()=>lp,$ZodCIDRv6:()=>dp,$ZodCUID:()=>Jm,$ZodCUID2:()=>Qm,$ZodCatch:()=>Wp,$ZodCheck:()=>Q,$ZodCheckBigIntFormat:()=>Rm,$ZodCheckEndsWith:()=>Um,$ZodCheckGreaterThan:()=>Us,$ZodCheckIncludes:()=>zm,$ZodCheckLengthEquals:()=>Om,$ZodCheckLessThan:()=>Ls,$ZodCheckLowerCase:()=>Mm,$ZodCheckMaxLength:()=>wm,$ZodCheckMaxSize:()=>Cm,$ZodCheckMimeType:()=>Bm,$ZodCheckMinLength:()=>km,$ZodCheckMinSize:()=>Nm,$ZodCheckMultipleOf:()=>Tm,$ZodCheckNumberFormat:()=>$m,$ZodCheckOverwrite:()=>Vm,$ZodCheckProperty:()=>Fm,$ZodCheckRegex:()=>Dm,$ZodCheckSizeEquals:()=>Pm,$ZodCheckStartsWith:()=>Lm,$ZodCheckStringFormat:()=>Qn,$ZodCheckUpperCase:()=>jm,$ZodCodec:()=>Oo,$ZodCustom:()=>ef,$ZodCustomStringFormat:()=>vp,$ZodDate:()=>$p,$ZodDefault:()=>Bp,$ZodDiscriminatedUnion:()=>Pp,$ZodE164:()=>gp,$ZodEmail:()=>Ym,$ZodEmoji:()=>qm,$ZodEncodeError:()=>Ar,$ZodEnum:()=>Mp,$ZodError:()=>To,$ZodExactOptional:()=>Up,$ZodFile:()=>zp,$ZodFunction:()=>Xp,$ZodGUID:()=>Wm,$ZodIPv4:()=>sp,$ZodIPv6:()=>cp,$ZodISODate:()=>ip,$ZodISODateTime:()=>np,$ZodISODuration:()=>ap,$ZodISOTime:()=>op,$ZodIntersection:()=>wp,$ZodJWT:()=>hp,$ZodKSUID:()=>rp,$ZodLazy:()=>Qp,$ZodLiteral:()=>jp,$ZodMAC:()=>up,$ZodMap:()=>Op,$ZodNaN:()=>Hp,$ZodNanoID:()=>Xm,$ZodNever:()=>Ip,$ZodNonOptional:()=>Gp,$ZodNull:()=>Ep,$ZodNullable:()=>Fp,$ZodNumber:()=>Zs,$ZodNumberFormat:()=>bp,$ZodObject:()=>nE,$ZodObjectJIT:()=>Cp,$ZodOptional:()=>Ys,$ZodPipe:()=>Ks,$ZodPrefault:()=>Vp,$ZodPreprocess:()=>Yp,$ZodPromise:()=>Jp,$ZodReadonly:()=>Kp,$ZodRealError:()=>We,$ZodRecord:()=>kp,$ZodRegistry:()=>Qs,$ZodSet:()=>Dp,$ZodString:()=>un,$ZodStringFormat:()=>q,$ZodSuccess:()=>Zp,$ZodSymbol:()=>Sp,$ZodTemplateLiteral:()=>qp,$ZodTransform:()=>Lp,$ZodTuple:()=>Hs,$ZodType:()=>w,$ZodULID:()=>ep,$ZodURL:()=>Km,$ZodUUID:()=>Hm,$ZodUndefined:()=>_p,$ZodUnion:()=>ko,$ZodUnknown:()=>Ap,$ZodVoid:()=>Tp,$ZodXID:()=>tp,$ZodXor:()=>Np,$brand:()=>Dd,$constructor:()=>f,$input:()=>rf,$output:()=>tf,Doc:()=>Po,JSONSchema:()=>ox,JSONSchemaGenerator:()=>Nc,NEVER:()=>Od,TimePrecision:()=>sf,_any:()=>Rf,_array:()=>Df,_base64:()=>vc,_base64url:()=>bc,_bigint:()=>_f,_boolean:()=>yf,_catch:()=>BM,_check:()=>ix,_cidrv4:()=>gc,_cidrv6:()=>hc,_coercedBigint:()=>Ef,_coercedBoolean:()=>Sf,_coercedDate:()=>kf,_coercedNumber:()=>pf,_coercedString:()=>of,_cuid:()=>cc,_cuid2:()=>uc,_custom:()=>jf,_date:()=>wf,_decode:()=>Ns,_decodeAsync:()=>ws,_default:()=>LM,_discriminatedUnion:()=>$M,_e164:()=>yc,_email:()=>tc,_emoji:()=>ac,_encode:()=>Cs,_encodeAsync:()=>Ps,_endsWith:()=>ai,_enum:()=>kM,_file:()=>Mf,_float32:()=>gf,_float64:()=>hf,_gt:()=>Dt,_gte:()=>Le,_guid:()=>jo,_includes:()=>ii,_int:()=>ff,_int32:()=>vf,_int64:()=>xf,_intersection:()=>RM,_ipv4:()=>pc,_ipv6:()=>fc,_isoDate:()=>uf,_isoDateTime:()=>cf,_isoDuration:()=>df,_isoTime:()=>lf,_jwt:()=>Sc,_ksuid:()=>mc,_lazy:()=>WM,_length:()=>mn,_literal:()=>DM,_lowercase:()=>ri,_lt:()=>Ot,_lte:()=>it,_mac:()=>af,_map:()=>PM,_max:()=>it,_maxLength:()=>dn,_maxSize:()=>Nr,_mime:()=>si,_min:()=>Le,_minLength:()=>ir,_minSize:()=>Mt,_multipleOf:()=>Cr,_nan:()=>Of,_nanoid:()=>sc,_nativeEnum:()=>OM,_negative:()=>Ec,_never:()=>Nf,_nonnegative:()=>Ac,_nonoptional:()=>UM,_nonpositive:()=>xc,_normalize:()=>ci,_null:()=>$f,_nullable:()=>zM,_number:()=>mf,_optional:()=>jM,_overwrite:()=>It,_parse:()=>Kn,_parseAsync:()=>qn,_pipe:()=>VM,_positive:()=>_c,_promise:()=>HM,_property:()=>Ic,_readonly:()=>GM,_record:()=>NM,_refine:()=>zf,_regex:()=>ti,_safeDecode:()=>Os,_safeDecodeAsync:()=>Ms,_safeEncode:()=>ks,_safeEncodeAsync:()=>Ds,_safeParse:()=>Xn,_safeParseAsync:()=>Jn,_set:()=>wM,_size:()=>ln,_slugify:()=>mi,_startsWith:()=>oi,_string:()=>nf,_stringFormat:()=>pi,_stringbool:()=>Bf,_success:()=>FM,_superRefine:()=>Lf,_symbol:()=>If,_templateLiteral:()=>ZM,_toLowerCase:()=>li,_toUpperCase:()=>di,_transform:()=>MM,_trim:()=>ui,_tuple:()=>CM,_uint32:()=>bf,_uint64:()=>Af,_ulid:()=>lc,_undefined:()=>Tf,_union:()=>IM,_unknown:()=>Cf,_uppercase:()=>ni,_url:()=>zo,_uuid:()=>rc,_uuidv4:()=>nc,_uuidv6:()=>ic,_uuidv7:()=>oc,_void:()=>Pf,_xid:()=>dc,_xor:()=>TM,clone:()=>je,config:()=>le,createStandardJSONSchemaMethod:()=>fi,createToJSONSchemaMethod:()=>Vf,decode:()=>HD,decodeAsync:()=>KD,describe:()=>Uf,encode:()=>WD,encodeAsync:()=>YD,extractDefs:()=>wr,finalize:()=>kr,flattenError:()=>$o,formatError:()=>Ro,globalConfig:()=>an,globalRegistry:()=>Te,initializeContext:()=>Pr,isValidBase64:()=>mp,isValidBase64URL:()=>Q_,isValidJWT:()=>eE,locales:()=>Mo,meta:()=>Ff,parse:()=>$s,parseAsync:()=>Rs,prettifyError:()=>Yd,process:()=>Z,regexes:()=>nt,registry:()=>ec,safeDecode:()=>XD,safeDecodeAsync:()=>QD,safeEncode:()=>qD,safeEncodeAsync:()=>JD,safeParse:()=>Kd,safeParseAsync:()=>qd,toDotPath:()=>w_,toJSONSchema:()=>Cc,treeifyError:()=>Hd,util:()=>_,version:()=>Gm});var $_,Od=Object.freeze({status:"aborted"});function f(e,t,n){function i(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=a.prototype,d=Object.keys(l);for(let p=0;p<d.length;p++){let g=d[p];g in c||(c[g]=l[g].bind(c))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(c){var u;let l=n?.Parent?new o:this;i(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Dd=Symbol("zod_brand"),At=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};($_=globalThis).__zod_globalConfig??($_.__zod_globalConfig={});var an=globalThis.__zod_globalConfig;function le(e){return e&&Object.assign(an,e),an}var _={};wt(_,{BIGINT_FORMAT_RANGES:()=>Zd,Class:()=>jd,NUMBER_FORMAT_RANGES:()=>Gd,aborted:()=>Rr,allowsEval:()=>Ud,assert:()=>AD,assertEqual:()=>SD,assertIs:()=>ED,assertNever:()=>xD,assertNotEqual:()=>_D,assignProp:()=>Tr,base64ToUint8Array:()=>C_,base64urlToUint8Array:()=>FD,cached:()=>Hn,captureStackTrace:()=>Ts,cleanEnum:()=>UD,cleanRegex:()=>Eo,clone:()=>je,cloneDef:()=>TD,createTransparentProxy:()=>wD,defineLazy:()=>M,esc:()=>Is,escapeRegex:()=>dt,explicitlyAborted:()=>Wd,extend:()=>DD,finalizeIssue:()=>ze,floatSafeRemainder:()=>zd,getElementAtPath:()=>$D,getEnumValues:()=>_o,getLengthableOrigin:()=>Io,getParsedType:()=>PD,getSizableOrigin:()=>Ao,hexToUint8Array:()=>VD,isObject:()=>sn,isPlainObject:()=>$r,issue:()=>Yn,joinValues:()=>h,jsonStringifyReplacer:()=>Wn,merge:()=>jD,mergeDefs:()=>nr,normalizeParams:()=>E,nullish:()=>Ir,numKeys:()=>ND,objectClone:()=>ID,omit:()=>OD,optionalKeys:()=>Vd,parsedType:()=>S,partial:()=>zD,pick:()=>kD,prefixIssues:()=>Ze,primitiveTypes:()=>Bd,promiseAllObject:()=>RD,propertyKeyTypes:()=>xo,randomString:()=>CD,required:()=>LD,safeExtend:()=>MD,shallowClone:()=>Fd,slugify:()=>Ld,stringifyPrimitive:()=>y,uint8ArrayToBase64:()=>N_,uint8ArrayToBase64url:()=>BD,uint8ArrayToHex:()=>GD,unwrapMessage:()=>So});function SD(e){return e}function _D(e){return e}function ED(e){}function xD(e){throw new Error("Unexpected value in exhaustive check")}function AD(e){}function _o(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function h(e,t="|"){return e.map(n=>y(n)).join(t)}function Wn(e,t){return typeof t=="bigint"?t.toString():t}function Hn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Ir(e){return e==null}function Eo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zd(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var R_=Symbol("evaluating");function M(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==R_)return i===void 0&&(i=R_,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function ID(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Tr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nr(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function TD(e){return nr(e._zod.def)}function $D(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function RD(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function CD(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Is(e){return JSON.stringify(e)}function Ld(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ts="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ud=Hn(()=>{if(an.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function $r(e){if(sn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(sn(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Fd(e){return $r(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ND(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var PD=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},xo=new Set(["string","number","symbol"]),Bd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function dt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function je(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function E(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wD(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Vd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Gd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Zd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function kD(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=nr(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return Tr(this,"shape",a),a},checks:[]});return je(e,o)}function OD(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=nr(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return Tr(this,"shape",a),a},checks:[]});return je(e,o)}function DD(e,t){if(!$r(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=nr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Tr(this,"shape",o),o}});return je(e,r)}function MD(e,t){if(!$r(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Tr(this,"shape",i),i}});return je(e,n)}function jD(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Tr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return je(e,n)}function zD(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=nr(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(n)for(let l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Tr(this,"shape",u),u},checks:[]});return je(t,a)}function LD(e,t,n){let i=nr(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return Tr(this,"shape",o),o}});return je(t,i)}function Rr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Wd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ze(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function So(e){return typeof e=="string"?e:e?.message}function ze(e,t,n){let i=e.message?e.message:So(e.inst?._zod.def?.error?.(e))??So(t?.error?.(e))??So(n.customError?.(e))??So(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...c}=e;return c.path??(c.path=[]),c.message=i,t?.reportInput&&(c.input=a),c}function Ao(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Io(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Yn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function UD(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function C_(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function N_(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function FD(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return C_(t+n)}function BD(e){return N_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function VD(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function GD(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var jd=class{constructor(...t){}};var P_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},To=f("$ZodError",P_),We=f("$ZodError",P_,{Parent:Error});function $o(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Ro(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>i({issues:c},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let c=[...o,...a.path];if(c.length===0)n._errors.push(t(a));else{let u=n,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(a))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return i(e),n}function Hd(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,c;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let l=[...o,...u.path];if(l.length===0){n.errors.push(t(u));continue}let d=n,p=0;for(;p<l.length;){let g=l[p],v=p===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(a=d.properties)[g]??(a[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),v&&d.errors.push(t(u)),p++}}};return i(e),n}function w_(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Yd(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${w_(i.path)}`);return t.join(`
101
- `)}var Kn=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new At;if(a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>ze(u,o,le())));throw Ts(c,r?.callee),c}return a.value},$s=Kn(We),qn=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>ze(u,o,le())));throw Ts(c,r?.callee),c}return a.value},Rs=qn(We),Xn=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new At;return o.issues.length?{success:!1,error:new(e??To)(o.issues.map(a=>ze(a,r,le())))}:{success:!0,data:o.value}},Kd=Xn(We),Jn=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>ze(a,r,le())))}:{success:!0,data:o.value}},qd=Jn(We),Cs=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Kn(e)(t,n,r)},WD=Cs(We),Ns=e=>(t,n,i)=>Kn(e)(t,n,i),HD=Ns(We),Ps=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return qn(e)(t,n,r)},YD=Ps(We),ws=e=>async(t,n,i)=>qn(e)(t,n,i),KD=ws(We),ks=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Xn(e)(t,n,r)},qD=ks(We),Os=e=>(t,n,i)=>Xn(e)(t,n,i),XD=Os(We),Ds=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Jn(e)(t,n,r)},JD=Ds(We),Ms=e=>async(t,n,i)=>Jn(e)(t,n,i),QD=Ms(We);var nt={};wt(nt,{base64:()=>mm,base64url:()=>js,bigint:()=>ym,boolean:()=>_m,browserEmail:()=>s1,cidrv4:()=>lm,cidrv6:()=>dm,cuid:()=>Xd,cuid2:()=>Jd,date:()=>gm,datetime:()=>vm,domain:()=>l1,duration:()=>nm,e164:()=>fm,email:()=>om,emoji:()=>am,extendedDuration:()=>e1,guid:()=>im,hex:()=>d1,hostname:()=>u1,html5Email:()=>i1,httpProtocol:()=>pm,idnEmail:()=>a1,integer:()=>Sm,ipv4:()=>sm,ipv6:()=>cm,ksuid:()=>tm,lowercase:()=>Am,mac:()=>um,md5_base64:()=>p1,md5_base64url:()=>f1,md5_hex:()=>m1,nanoid:()=>rm,null:()=>Em,number:()=>zs,rfc5322Email:()=>o1,sha1_base64:()=>h1,sha1_base64url:()=>v1,sha1_hex:()=>g1,sha256_base64:()=>y1,sha256_base64url:()=>S1,sha256_hex:()=>b1,sha384_base64:()=>E1,sha384_base64url:()=>x1,sha384_hex:()=>_1,sha512_base64:()=>I1,sha512_base64url:()=>T1,sha512_hex:()=>A1,string:()=>bm,time:()=>hm,ulid:()=>Qd,undefined:()=>xm,unicodeEmail:()=>k_,uppercase:()=>Im,uuid:()=>cn,uuid4:()=>t1,uuid6:()=>r1,uuid7:()=>n1,xid:()=>em});var Xd=/^[cC][0-9a-z]{6,}$/,Jd=/^[0-9a-z]+$/,Qd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,em=/^[0-9a-vA-V]{20}$/,tm=/^[A-Za-z0-9]{27}$/,rm=/^[a-zA-Z0-9_-]{21}$/,nm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,e1=/^[-+]?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)?)??$/,im=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,cn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,t1=cn(4),r1=cn(6),n1=cn(7),om=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,i1=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,o1=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,k_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,a1=k_,s1=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,c1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function am(){return new RegExp(c1,"u")}var sm=/^(?:(?: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])$/,cm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,um=e=>{let t=dt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},lm=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,dm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,js=/^[A-Za-z0-9_-]*$/,u1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,l1=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pm=/^https?$/,fm=/^\+[1-9]\d{6,14}$/,O_="(?:(?:\\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])))",gm=new RegExp(`^${O_}$`);function D_(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function hm(e){return new RegExp(`^${D_(e)}$`)}function vm(e){let t=D_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${O_}T(?:${i})$`)}var bm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ym=/^-?\d+n?$/,Sm=/^-?\d+$/,zs=/^-?\d+(?:\.\d+)?$/,_m=/^(?:true|false)$/i,Em=/^null$/i;var xm=/^undefined$/i;var Am=/^[^A-Z]*$/,Im=/^[^a-z]*$/,d1=/^[0-9a-fA-F]*$/;function Co(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function No(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var m1=/^[0-9a-fA-F]{32}$/,p1=Co(22,"=="),f1=No(22),g1=/^[0-9a-fA-F]{40}$/,h1=Co(27,"="),v1=No(27),b1=/^[0-9a-fA-F]{64}$/,y1=Co(43,"="),S1=No(43),_1=/^[0-9a-fA-F]{96}$/,E1=Co(64,""),x1=No(64),A1=/^[0-9a-fA-F]{128}$/,I1=Co(86,"=="),T1=No(86);var Q=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),j_={number:"number",bigint:"bigint",object:"date"},Ls=f("$ZodCheckLessThan",(e,t)=>{Q.init(e,t);let n=j_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Us=f("$ZodCheckGreaterThan",(e,t)=>{Q.init(e,t);let n=j_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tm=f("$ZodCheckMultipleOf",(e,t)=>{Q.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):zd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$m=f("$ZodCheckNumberFormat",(e,t)=>{Q.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Gd[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=r,c.maximum=o,n&&(c.pattern=Sm)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}c<r&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),c>o&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Rm=f("$ZodCheckBigIntFormat",(e,t)=>{Q.init(e,t);let[n,i]=Zd[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Cm=f("$ZodCheckMaxSize",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:Ao(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Nm=f("$ZodCheckMinSize",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:Ao(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Pm=f("$ZodCheckSizeEquals",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:Ao(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),wm=f("$ZodCheckMaxLength",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=Io(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),km=f("$ZodCheckMinLength",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=Io(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Om=f("$ZodCheckLengthEquals",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=Io(r),c=o>t.length;i.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Qn=f("$ZodCheckStringFormat",(e,t)=>{var n,i;Q.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Dm=f("$ZodCheckRegex",(e,t)=>{Qn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Mm=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Am),Qn.init(e,t)}),jm=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Im),Qn.init(e,t)}),zm=f("$ZodCheckIncludes",(e,t)=>{Q.init(e,t);let n=dt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Lm=f("$ZodCheckStartsWith",(e,t)=>{Q.init(e,t);let n=new RegExp(`^${dt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Um=f("$ZodCheckEndsWith",(e,t)=>{Q.init(e,t);let n=new RegExp(`.*${dt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function M_(e,t,n){e.issues.length&&t.issues.push(...Ze(n,e.issues))}var Fm=f("$ZodCheckProperty",(e,t)=>{Q.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>M_(r,n,t.property));M_(i,n,t.property)}}),Bm=f("$ZodCheckMimeType",(e,t)=>{Q.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Vm=f("$ZodCheckOverwrite",(e,t)=>{Q.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var Po=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
100
+ `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write($O.hide):this.out.write(IG(this.outputText,this.out.columns)),super.render(),this.outputText=[TO.symbol(this.done,this.aborted),IO.bold(this.msg),TO.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:IO.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(TG.line+$O.to(0)+this.outputText))}};RO.exports=o_});var PO=I((Wre,NO)=>{"use strict";NO.exports={TextPrompt:Rk(),SelectPrompt:wk(),TogglePrompt:Mk(),DatePrompt:cO(),NumberPrompt:mO(),MultiselectPrompt:e_(),AutocompletePrompt:SO(),AutocompleteMultiselectPrompt:AO(),ConfirmPrompt:CO()}});var kO=I(wO=>{"use strict";var rt=wO,$G=PO(),Td=e=>e;function tr(e,t,n={}){return new Promise((i,r)=>{let o=new $G[e](t),a=n.onAbort||Td,c=n.onSubmit||Td,u=n.onExit||Td;o.on("state",t.onState||Td),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}rt.text=e=>tr("TextPrompt",e);rt.password=e=>(e.style="password",rt.text(e));rt.invisible=e=>(e.style="invisible",rt.text(e));rt.number=e=>tr("NumberPrompt",e);rt.date=e=>tr("DatePrompt",e);rt.confirm=e=>tr("ConfirmPrompt",e);rt.list=e=>{let t=e.separator||",";return tr("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};rt.toggle=e=>tr("TogglePrompt",e);rt.select=e=>tr("SelectPrompt",e);rt.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return tr("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};rt.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return tr("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var RG=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));rt.autocomplete=e=>(e.suggest=e.suggest||RG,e.choices=[].concat(e.choices||[]),tr("AutocompletePrompt",e))});var MO=I((Yre,DO)=>{"use strict";var a_=kO(),CG=["suggest","format","onState","validate","onRender","type"],OO=()=>{};async function Qr(e=[],{onSubmit:t=OO,onCancel:n=OO}={}){let i={},r=Qr._override||{};e=[].concat(e);let o,a,c,u,l,d,p=async(g,v,x=!1)=>{if(!(!x&&g.validate&&g.validate(v)!==!0))return g.format?await g.format(v,i):v};for(a of e)if({name:u,type:l}=a,typeof l=="function"&&(l=await l(o,{...i},a),a.type=l),!!l){for(let g in a){if(CG.includes(g))continue;let v=a[g];a[g]=typeof v=="function"?await v(o,{...i},d):v}if(d=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=a,a_[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=await p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Qr._injected?NG(Qr._injected,a.initial):await a_[l](a),i[u]=o=await p(a,o,!0),c=await t(a,o,i)}catch{c=!await n(a,i)}if(c)return i}return i}function NG(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function PG(e){Qr._injected=(Qr._injected||[]).concat(e)}function wG(e){Qr._override=Object.assign({},e)}DO.exports=Object.assign(Qr,{prompt:Qr,prompts:a_,inject:PG,override:wG})});var zO=I((Kre,jO)=>{function kG(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,n=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(n[t]>e[t])return!1;if(e[t]>n[t])return!0}return!1}jO.exports=kG("8.6.0")?ck():MO()});import{join as lt,dirname as m_,normalize as JO}from"node:path";import{readFileSync as QO,existsSync as eD}from"node:fs";var XO=Object.defineProperty,Ne=(e,t)=>XO(e,"name",{value:t,configurable:!0}),en="fjall";function tn(e,t){let n=JO(e);if(n.includes("..")||n.startsWith("/"))throw new Error(`Invalid ${t}: path traversal is not allowed`)}Ne(tn,"assertNoTraversal");function tD(){return en}Ne(tD,"getFjallPath");function rD(e){let t=m_(e);return m_(t)||"."}Ne(rD,"getProjectRoot");function p_(e){if(!eD(e))throw new Error(`Infrastructure file not found: ${e}`);let t=QO(e,"utf-8").match(/const\s+appName\s*=\s*["']([^"']+)["']/);if(!t||!t[1])throw new Error(`Could not find appName in infrastructure file: ${e}. Expected format: const appName = "yourAppName";`);return t[1]}Ne(p_,"getAppNameFromInfrastructure");function nD(e){let t=lt(e,Cd);return p_(t)}Ne(nD,"getAppName");function rr(e){return tn(e,"app name"),lt(en,e,Cd)}Ne(rr,"getInfrastructurePath");function f_(e){return tn(e,"app name"),lt(en,e)}Ne(f_,"getAppPath");function iD(e,t){return lt(t??process.cwd(),f_(e))}Ne(iD,"resolveAppScaffoldPath");function oD(e){return tn(e,"component name"),lt(en,e)}Ne(oD,"getOrganisationComponentPath");function aD(e){return tn(e,"deployment type"),lt(en,e,"logs")}Ne(aD,"getDeploymentLogsPath");function sD(e){return tn(e,"deployment type"),lt(en,e,"logs","cloudformation")}Ne(sD,"getCloudFormationLogsPath");function g_(){return lt(en,"domains")}Ne(g_,"getDomainsDir");function Rd(e){return tn(e,"domain name"),lt(g_(),e)}Ne(Rd,"getDomainComponentPath");function cD(e){return lt(Rd(e),Cd)}Ne(cD,"getDomainInfrastructurePath");function uD(e){return lt(Rd(e),lD)}Ne(uD,"getDomainZoneFilePath");var Cd="infrastructure.ts",lD="zone.bind",dD="cdk.out";function mD(e){return lt(e,dD)}Ne(mD,"getCdkOutPath");var pD=Object.defineProperty,Vn=(e,t)=>pD(e,"name",{value:t,configurable:!0});function Nd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Vn(Nd,"escapeRegExp");function rn(e,t,n){let i=rr(t),r=e.read(i)?.toString();return r?new RegExp(`["']${Nd(n)}["']`).test(r):!1}Vn(rn,"resourceExists");function bo(e,t,n){let i=rr(t);if(!e.read(i)?.toString())throw new Error(`Infrastructure file not found for ${t}`);if(rn(e,t,n))throw new Error(`Resource name '${n}' already exists in ${t}. Please choose a different name or remove the existing resource first.`)}Vn(bo,"assertResourceNameUnique");function Pd(e,t,n){let i=rr(t),r=e.read(i)?.toString();if(!r)return 0;let o={database:/DatabaseFactory\.build\(/g,compute:/ComputeFactory\.build\(/g,lambda:/type:\s*["']lambda["']/g,ecs:/type:\s*["']ecs["']/g,ec2:/type:\s*["']ec2["']/g}[n];if(!o)return 0;let a=r.match(o);return a?a.length:0}Vn(Pd,"countResourcesOfType");function fD(e,t){let n=rr(t),i=e.read(n)?.toString();if(!i)return[];let r=[],o=i.matchAll(/ComputeFactory\.build\(["']([^"']+)["'],\s*\{([^}]*?)\}/gs);for(let a of o){let c=a[1],u=a[2],l="ecs";u.includes('type: "lambda"')?l="lambda":u.includes('type: "ec2"')&&(l="ec2");let d=u.includes("connections:"),p=[];if(d){let g=u.match(/connections:\s*\[([^\]]+)\]/);if(g){let v=g[1].match(/\w+/g)??[];p.push(...v)}}r.push({name:c,type:l,hasConnections:d,connectedResources:p})}return r}Vn(fD,"detectComputeResources");function gD(e,t,n){let i=rr(t),r=e.read(i)?.toString();return r?new RegExp(`databaseName:\\s*["']${Nd(n)}["']`).test(r):!1}Vn(gD,"databaseExists");import*as mo from"fs";import*as tP from"path";var hD=Object.defineProperty,xr=(e,t)=>hD(e,"name",{value:t,configurable:!0});function Pe(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase()).replace(/^./,t=>t.toUpperCase())}xr(Pe,"toPascalCase");function kt(e){return e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}xr(kt,"toKebab");function Gn(e){return kt(e).replace(/-/g,"_")}xr(Gn,"toValidDatabaseName");function h_(e){return kt(e).replace(/-/g,"_").toUpperCase()}xr(h_,"toScreamingSnake");function v_(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}xr(v_,"capitalise");function b_(e){return e.split(".").join("")}xr(b_,"getSafeZoneName");function nn(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}xr(nn,"accountConstructKey");function y_(e){let t=e.replace(new RegExp("\\P{ASCII}","gu"),"");return nn(t)===nn(e)&&nn(e)!==""}xr(y_,"hasAsciiStableConstructKey");var vD=Object.defineProperty,Es=(e,t)=>vD(e,"name",{value:t,configurable:!0});function xs(e){return`${Pe(e.split(".").join(""))}Domain`}Es(xs,"getDomainStackName");function S_(e){return`${e}UsEast1Certificates`}Es(S_,"getDomainUsEast1CertificatesStackName");function wd(e){let t=e.replace(/\./g,"-");return{hostedZoneId:`${t}-hosted-zone-id`,certificateArn:`${t}-certificate-arn`,usEast1CertificateArn:`${t}-us-east-1-certificate-arn`,delegationRoleArn:`${t}-delegation-role-arn`,nameservers:`${t}-nameservers`}}Es(wd,"getDomainExportNames");function __(e){return typeof e.hostedZoneId=="string"}Es(__,"isManagedDomainBinding");var bD=Object.defineProperty,yD=(e,t)=>bD(e,"name",{value:t,configurable:!0});function E_(e){return`${Pe(e)}ImageTag`}yD(E_,"imageTagParameterName");var SD=Object.defineProperty,on=(e,t)=>SD(e,"name",{value:t,configurable:!0});function Zn(e){return Pe(e.replace(/[^A-Za-z0-9-]/g,""))}on(Zn,"safeExportToken");function kd(e,t){let n=Zn(e);return t===void 0?n:`${n}-${Zn(t)}-`}on(kd,"albExportScope");function x_(e,t){return`${kd(e,t)}AlbDnsName`}on(x_,"albDnsExportName");function A_(e,t){return`${kd(e,t)}AlbHostedZoneId`}on(A_,"albHostedZoneIdExportName");function I_(e){return`${Zn(e)}CdnDistributionDomainName`}on(I_,"cdnDomainExportName");function T_(e){return`${Zn(e)}WebsiteEndpoint`}on(T_,"bucketWebsiteEndpointExportName");function $_(e){return`${Zn(e)}WebsiteHostedZoneId`}on($_,"bucketWebsiteHostedZoneIdExportName");var s={};wt(s,{$brand:()=>Dd,$input:()=>rf,$output:()=>tf,NEVER:()=>Od,TimePrecision:()=>sf,ZodAny:()=>qg,ZodArray:()=>eh,ZodBase64:()=>qc,ZodBase64URL:()=>Xc,ZodBigInt:()=>Ei,ZodBigIntFormat:()=>eu,ZodBoolean:()=>_i,ZodCIDRv4:()=>Yc,ZodCIDRv6:()=>Kc,ZodCUID:()=>Fc,ZodCUID2:()=>Bc,ZodCatch:()=>Eh,ZodCodec:()=>qo,ZodCustom:()=>Xo,ZodCustomStringFormat:()=>yi,ZodDate:()=>Zo,ZodDefault:()=>hh,ZodDiscriminatedUnion:()=>rh,ZodE164:()=>Jc,ZodEmail:()=>zc,ZodEmoji:()=>Lc,ZodEnum:()=>vi,ZodError:()=>XM,ZodExactOptional:()=>ph,ZodFile:()=>dh,ZodFirstPartyTypeKind:()=>Dh,ZodFunction:()=>wh,ZodGUID:()=>Uo,ZodIPv4:()=>Wc,ZodIPv6:()=>Hc,ZodISODate:()=>wc,ZodISODateTime:()=>Pc,ZodISODuration:()=>Oc,ZodISOTime:()=>kc,ZodIntersection:()=>nh,ZodIssueCode:()=>QM,ZodJWT:()=>Qc,ZodKSUID:()=>Zc,ZodLazy:()=>Ch,ZodLiteral:()=>lh,ZodMAC:()=>Vg,ZodMap:()=>ch,ZodNaN:()=>Ah,ZodNanoID:()=>Uc,ZodNever:()=>Jg,ZodNonOptional:()=>au,ZodNull:()=>Yg,ZodNullable:()=>gh,ZodNumber:()=>Si,ZodNumberFormat:()=>fn,ZodObject:()=>Ho,ZodOptional:()=>ou,ZodPipe:()=>Ko,ZodPrefault:()=>bh,ZodPreprocess:()=>Ih,ZodPromise:()=>Ph,ZodReadonly:()=>Th,ZodRealError:()=>Ye,ZodRecord:()=>hi,ZodSet:()=>uh,ZodString:()=>bi,ZodStringFormat:()=>X,ZodSuccess:()=>_h,ZodSymbol:()=>Wg,ZodTemplateLiteral:()=>Rh,ZodTransform:()=>mh,ZodTuple:()=>oh,ZodType:()=>k,ZodULID:()=>Vc,ZodURL:()=>Go,ZodUUID:()=>jt,ZodUndefined:()=>Hg,ZodUnion:()=>Yo,ZodUnknown:()=>Xg,ZodVoid:()=>Qg,ZodXID:()=>Gc,ZodXor:()=>th,_ZodString:()=>jc,_default:()=>vh,_function:()=>gA,any:()=>Wx,array:()=>Wo,base64:()=>Cx,base64url:()=>Nx,bigint:()=>Fx,boolean:()=>Zg,catch:()=>xh,check:()=>hA,cidrv4:()=>$x,cidrv6:()=>Rx,clone:()=>je,codec:()=>dA,coerce:()=>Mh,config:()=>le,core:()=>or,cuid:()=>yx,cuid2:()=>Sx,custom:()=>vA,date:()=>Yx,decode:()=>Mg,decodeAsync:()=>zg,describe:()=>bA,discriminatedUnion:()=>eA,e164:()=>Px,email:()=>ux,emoji:()=>vx,encode:()=>Dg,encodeAsync:()=>jg,endsWith:()=>ai,enum:()=>nu,exactOptional:()=>fh,file:()=>sA,flattenError:()=>To,float32:()=>jx,float64:()=>zx,formatError:()=>$o,fromJSONSchema:()=>IA,function:()=>gA,getErrorMap:()=>tj,globalRegistry:()=>Te,gt:()=>Dt,gte:()=>Le,guid:()=>lx,hash:()=>Mx,hex:()=>Dx,hostname:()=>Ox,httpUrl:()=>hx,includes:()=>ii,instanceof:()=>SA,int:()=>Dc,int32:()=>Lx,int64:()=>Bx,intersection:()=>ih,invertCodec:()=>mA,ipv4:()=>Ax,ipv6:()=>Tx,iso:()=>gi,json:()=>EA,jwt:()=>wx,keyof:()=>Kx,ksuid:()=>xx,lazy:()=>Nh,length:()=>mn,literal:()=>aA,locales:()=>Do,looseObject:()=>Jx,looseRecord:()=>rA,lowercase:()=>ri,lt:()=>Ot,lte:()=>ot,mac:()=>Ix,map:()=>nA,maxLength:()=>dn,maxSize:()=>Nr,meta:()=>yA,mime:()=>si,minLength:()=>ir,minSize:()=>Mt,multipleOf:()=>Cr,nan:()=>lA,nanoid:()=>bx,nativeEnum:()=>oA,negative:()=>_c,never:()=>tu,nonnegative:()=>xc,nonoptional:()=>Sh,nonpositive:()=>Ec,normalize:()=>ci,null:()=>Kg,nullable:()=>Bo,nullish:()=>cA,number:()=>Gg,object:()=>qx,optional:()=>Fo,overwrite:()=>It,parse:()=>Pg,parseAsync:()=>wg,partialRecord:()=>tA,pipe:()=>Mc,positive:()=>Sc,prefault:()=>yh,preprocess:()=>xA,prettifyError:()=>Yd,promise:()=>fA,property:()=>Ac,readonly:()=>$h,record:()=>sh,refine:()=>kh,regex:()=>ti,regexes:()=>it,registry:()=>Qs,safeDecode:()=>Ug,safeDecodeAsync:()=>Bg,safeEncode:()=>Lg,safeEncodeAsync:()=>Fg,safeParse:()=>kg,safeParseAsync:()=>Og,set:()=>iA,setErrorMap:()=>ej,size:()=>ln,slugify:()=>mi,startsWith:()=>oi,strictObject:()=>Xx,string:()=>Lo,stringFormat:()=>kx,stringbool:()=>_A,success:()=>uA,superRefine:()=>Oh,symbol:()=>Gx,templateLiteral:()=>pA,toJSONSchema:()=>Rc,toLowerCase:()=>li,toUpperCase:()=>di,transform:()=>iu,treeifyError:()=>Hd,trim:()=>ui,tuple:()=>ah,uint32:()=>Ux,uint64:()=>Vx,ulid:()=>_x,undefined:()=>Zx,union:()=>ru,unknown:()=>pn,uppercase:()=>ni,url:()=>gx,util:()=>_,uuid:()=>dx,uuidv4:()=>mx,uuidv6:()=>px,uuidv7:()=>fx,void:()=>Hx,xid:()=>Ex,xor:()=>Qx});var or={};wt(or,{$ZodAny:()=>xp,$ZodArray:()=>Rp,$ZodAsyncError:()=>At,$ZodBase64:()=>pp,$ZodBase64URL:()=>fp,$ZodBigInt:()=>Zs,$ZodBigIntFormat:()=>yp,$ZodBoolean:()=>Po,$ZodCIDRv4:()=>lp,$ZodCIDRv6:()=>dp,$ZodCUID:()=>Jm,$ZodCUID2:()=>Qm,$ZodCatch:()=>Wp,$ZodCheck:()=>Q,$ZodCheckBigIntFormat:()=>Rm,$ZodCheckEndsWith:()=>Um,$ZodCheckGreaterThan:()=>Ls,$ZodCheckIncludes:()=>zm,$ZodCheckLengthEquals:()=>Om,$ZodCheckLessThan:()=>zs,$ZodCheckLowerCase:()=>Mm,$ZodCheckMaxLength:()=>wm,$ZodCheckMaxSize:()=>Cm,$ZodCheckMimeType:()=>Bm,$ZodCheckMinLength:()=>km,$ZodCheckMinSize:()=>Nm,$ZodCheckMultipleOf:()=>Tm,$ZodCheckNumberFormat:()=>$m,$ZodCheckOverwrite:()=>Vm,$ZodCheckProperty:()=>Fm,$ZodCheckRegex:()=>Dm,$ZodCheckSizeEquals:()=>Pm,$ZodCheckStartsWith:()=>Lm,$ZodCheckStringFormat:()=>Qn,$ZodCheckUpperCase:()=>jm,$ZodCodec:()=>ko,$ZodCustom:()=>ef,$ZodCustomStringFormat:()=>vp,$ZodDate:()=>$p,$ZodDefault:()=>Bp,$ZodDiscriminatedUnion:()=>Pp,$ZodE164:()=>gp,$ZodEmail:()=>Ym,$ZodEmoji:()=>qm,$ZodEncodeError:()=>Ar,$ZodEnum:()=>Mp,$ZodError:()=>Io,$ZodExactOptional:()=>Up,$ZodFile:()=>zp,$ZodFunction:()=>Xp,$ZodGUID:()=>Wm,$ZodIPv4:()=>sp,$ZodIPv6:()=>cp,$ZodISODate:()=>ip,$ZodISODateTime:()=>np,$ZodISODuration:()=>ap,$ZodISOTime:()=>op,$ZodIntersection:()=>wp,$ZodJWT:()=>hp,$ZodKSUID:()=>rp,$ZodLazy:()=>Qp,$ZodLiteral:()=>jp,$ZodMAC:()=>up,$ZodMap:()=>Op,$ZodNaN:()=>Hp,$ZodNanoID:()=>Xm,$ZodNever:()=>Ip,$ZodNonOptional:()=>Gp,$ZodNull:()=>Ep,$ZodNullable:()=>Fp,$ZodNumber:()=>Gs,$ZodNumberFormat:()=>bp,$ZodObject:()=>iE,$ZodObjectJIT:()=>Cp,$ZodOptional:()=>Hs,$ZodPipe:()=>Ys,$ZodPrefault:()=>Vp,$ZodPreprocess:()=>Yp,$ZodPromise:()=>Jp,$ZodReadonly:()=>Kp,$ZodRealError:()=>He,$ZodRecord:()=>kp,$ZodRegistry:()=>Js,$ZodSet:()=>Dp,$ZodString:()=>un,$ZodStringFormat:()=>q,$ZodSuccess:()=>Zp,$ZodSymbol:()=>Sp,$ZodTemplateLiteral:()=>qp,$ZodTransform:()=>Lp,$ZodTuple:()=>Ws,$ZodType:()=>w,$ZodULID:()=>ep,$ZodURL:()=>Km,$ZodUUID:()=>Hm,$ZodUndefined:()=>_p,$ZodUnion:()=>wo,$ZodUnknown:()=>Ap,$ZodVoid:()=>Tp,$ZodXID:()=>tp,$ZodXor:()=>Np,$brand:()=>Dd,$constructor:()=>f,$input:()=>rf,$output:()=>tf,Doc:()=>No,JSONSchema:()=>ax,JSONSchemaGenerator:()=>Cc,NEVER:()=>Od,TimePrecision:()=>sf,_any:()=>Rf,_array:()=>Df,_base64:()=>hc,_base64url:()=>vc,_bigint:()=>_f,_boolean:()=>yf,_catch:()=>VM,_check:()=>ox,_cidrv4:()=>fc,_cidrv6:()=>gc,_coercedBigint:()=>Ef,_coercedBoolean:()=>Sf,_coercedDate:()=>kf,_coercedNumber:()=>pf,_coercedString:()=>of,_cuid:()=>sc,_cuid2:()=>cc,_custom:()=>jf,_date:()=>wf,_decode:()=>Cs,_decodeAsync:()=>Ps,_default:()=>UM,_discriminatedUnion:()=>RM,_e164:()=>bc,_email:()=>ec,_emoji:()=>oc,_encode:()=>Rs,_encodeAsync:()=>Ns,_endsWith:()=>ai,_enum:()=>OM,_file:()=>Mf,_float32:()=>gf,_float64:()=>hf,_gt:()=>Dt,_gte:()=>Le,_guid:()=>Mo,_includes:()=>ii,_int:()=>ff,_int32:()=>vf,_int64:()=>xf,_intersection:()=>CM,_ipv4:()=>mc,_ipv6:()=>pc,_isoDate:()=>uf,_isoDateTime:()=>cf,_isoDuration:()=>df,_isoTime:()=>lf,_jwt:()=>yc,_ksuid:()=>dc,_lazy:()=>HM,_length:()=>mn,_literal:()=>MM,_lowercase:()=>ri,_lt:()=>Ot,_lte:()=>ot,_mac:()=>af,_map:()=>wM,_max:()=>ot,_maxLength:()=>dn,_maxSize:()=>Nr,_mime:()=>si,_min:()=>Le,_minLength:()=>ir,_minSize:()=>Mt,_multipleOf:()=>Cr,_nan:()=>Of,_nanoid:()=>ac,_nativeEnum:()=>DM,_negative:()=>_c,_never:()=>Nf,_nonnegative:()=>xc,_nonoptional:()=>FM,_nonpositive:()=>Ec,_normalize:()=>ci,_null:()=>$f,_nullable:()=>LM,_number:()=>mf,_optional:()=>zM,_overwrite:()=>It,_parse:()=>Kn,_parseAsync:()=>qn,_pipe:()=>GM,_positive:()=>Sc,_promise:()=>YM,_property:()=>Ac,_readonly:()=>ZM,_record:()=>PM,_refine:()=>zf,_regex:()=>ti,_safeDecode:()=>ks,_safeDecodeAsync:()=>Ds,_safeEncode:()=>ws,_safeEncodeAsync:()=>Os,_safeParse:()=>Xn,_safeParseAsync:()=>Jn,_set:()=>kM,_size:()=>ln,_slugify:()=>mi,_startsWith:()=>oi,_string:()=>nf,_stringFormat:()=>pi,_stringbool:()=>Bf,_success:()=>BM,_superRefine:()=>Lf,_symbol:()=>If,_templateLiteral:()=>WM,_toLowerCase:()=>li,_toUpperCase:()=>di,_transform:()=>jM,_trim:()=>ui,_tuple:()=>NM,_uint32:()=>bf,_uint64:()=>Af,_ulid:()=>uc,_undefined:()=>Tf,_union:()=>TM,_unknown:()=>Cf,_uppercase:()=>ni,_url:()=>jo,_uuid:()=>tc,_uuidv4:()=>rc,_uuidv6:()=>nc,_uuidv7:()=>ic,_void:()=>Pf,_xid:()=>lc,_xor:()=>$M,clone:()=>je,config:()=>le,createStandardJSONSchemaMethod:()=>fi,createToJSONSchemaMethod:()=>Vf,decode:()=>YD,decodeAsync:()=>qD,describe:()=>Uf,encode:()=>HD,encodeAsync:()=>KD,extractDefs:()=>wr,finalize:()=>kr,flattenError:()=>To,formatError:()=>$o,globalConfig:()=>an,globalRegistry:()=>Te,initializeContext:()=>Pr,isValidBase64:()=>mp,isValidBase64URL:()=>eE,isValidJWT:()=>tE,locales:()=>Do,meta:()=>Ff,parse:()=>Ts,parseAsync:()=>$s,prettifyError:()=>Yd,process:()=>Z,regexes:()=>it,registry:()=>Qs,safeDecode:()=>JD,safeDecodeAsync:()=>e1,safeEncode:()=>XD,safeEncodeAsync:()=>QD,safeParse:()=>Kd,safeParseAsync:()=>qd,toDotPath:()=>k_,toJSONSchema:()=>Rc,treeifyError:()=>Hd,util:()=>_,version:()=>Gm});var R_,Od=Object.freeze({status:"aborted"});function f(e,t,n){function i(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=a.prototype,d=Object.keys(l);for(let p=0;p<d.length;p++){let g=d[p];g in c||(c[g]=l[g].bind(c))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(c){var u;let l=n?.Parent?new o:this;i(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Dd=Symbol("zod_brand"),At=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(R_=globalThis).__zod_globalConfig??(R_.__zod_globalConfig={});var an=globalThis.__zod_globalConfig;function le(e){return e&&Object.assign(an,e),an}var _={};wt(_,{BIGINT_FORMAT_RANGES:()=>Zd,Class:()=>jd,NUMBER_FORMAT_RANGES:()=>Gd,aborted:()=>Rr,allowsEval:()=>Ud,assert:()=>ID,assertEqual:()=>_D,assertIs:()=>xD,assertNever:()=>AD,assertNotEqual:()=>ED,assignProp:()=>Tr,base64ToUint8Array:()=>N_,base64urlToUint8Array:()=>BD,cached:()=>Hn,captureStackTrace:()=>Is,cleanEnum:()=>FD,cleanRegex:()=>_o,clone:()=>je,cloneDef:()=>$D,createTransparentProxy:()=>kD,defineLazy:()=>M,esc:()=>As,escapeRegex:()=>dt,explicitlyAborted:()=>Wd,extend:()=>MD,finalizeIssue:()=>ze,floatSafeRemainder:()=>zd,getElementAtPath:()=>RD,getEnumValues:()=>So,getLengthableOrigin:()=>Ao,getParsedType:()=>wD,getSizableOrigin:()=>xo,hexToUint8Array:()=>GD,isObject:()=>sn,isPlainObject:()=>$r,issue:()=>Yn,joinValues:()=>h,jsonStringifyReplacer:()=>Wn,merge:()=>zD,mergeDefs:()=>nr,normalizeParams:()=>E,nullish:()=>Ir,numKeys:()=>PD,objectClone:()=>TD,omit:()=>DD,optionalKeys:()=>Vd,parsedType:()=>S,partial:()=>LD,pick:()=>OD,prefixIssues:()=>We,primitiveTypes:()=>Bd,promiseAllObject:()=>CD,propertyKeyTypes:()=>Eo,randomString:()=>ND,required:()=>UD,safeExtend:()=>jD,shallowClone:()=>Fd,slugify:()=>Ld,stringifyPrimitive:()=>y,uint8ArrayToBase64:()=>P_,uint8ArrayToBase64url:()=>VD,uint8ArrayToHex:()=>ZD,unwrapMessage:()=>yo});function _D(e){return e}function ED(e){return e}function xD(e){}function AD(e){throw new Error("Unexpected value in exhaustive check")}function ID(e){}function So(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function h(e,t="|"){return e.map(n=>y(n)).join(t)}function Wn(e,t){return typeof t=="bigint"?t.toString():t}function Hn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Ir(e){return e==null}function _o(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zd(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var C_=Symbol("evaluating");function M(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==C_)return i===void 0&&(i=C_,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function TD(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Tr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function nr(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function $D(e){return nr(e._zod.def)}function RD(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function CD(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function ND(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function As(e){return JSON.stringify(e)}function Ld(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Is="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ud=Hn(()=>{if(an.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function $r(e){if(sn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(sn(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Fd(e){return $r(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function PD(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var wD=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Eo=new Set(["string","number","symbol"]),Bd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function dt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function je(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function E(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function kD(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Vd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Gd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Zd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function OD(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=nr(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return Tr(this,"shape",a),a},checks:[]});return je(e,o)}function DD(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=nr(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return Tr(this,"shape",a),a},checks:[]});return je(e,o)}function MD(e,t){if(!$r(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=nr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Tr(this,"shape",o),o}});return je(e,r)}function jD(e,t){if(!$r(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Tr(this,"shape",i),i}});return je(e,n)}function zD(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=nr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Tr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return je(e,n)}function LD(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=nr(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(n)for(let l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Tr(this,"shape",u),u},checks:[]});return je(t,a)}function UD(e,t,n){let i=nr(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return Tr(this,"shape",o),o}});return je(t,i)}function Rr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Wd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function We(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function yo(e){return typeof e=="string"?e:e?.message}function ze(e,t,n){let i=e.message?e.message:yo(e.inst?._zod.def?.error?.(e))??yo(t?.error?.(e))??yo(n.customError?.(e))??yo(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...c}=e;return c.path??(c.path=[]),c.message=i,t?.reportInput&&(c.input=a),c}function xo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ao(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Yn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function FD(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function N_(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function P_(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function BD(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return N_(t+n)}function VD(e){return P_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function GD(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function ZD(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var jd=class{constructor(...t){}};var w_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Wn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Io=f("$ZodError",w_),He=f("$ZodError",w_,{Parent:Error});function To(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function $o(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>i({issues:c},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let c=[...o,...a.path];if(c.length===0)n._errors.push(t(a));else{let u=n,l=0;for(;l<c.length;){let d=c[l];l===c.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(t(a))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}}};return i(e),n}function Hd(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,c;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let l=[...o,...u.path];if(l.length===0){n.errors.push(t(u));continue}let d=n,p=0;for(;p<l.length;){let g=l[p],v=p===l.length-1;typeof g=="string"?(d.properties??(d.properties={}),(a=d.properties)[g]??(a[g]={errors:[]}),d=d.properties[g]):(d.items??(d.items=[]),(c=d.items)[g]??(c[g]={errors:[]}),d=d.items[g]),v&&d.errors.push(t(u)),p++}}};return i(e),n}function k_(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Yd(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${k_(i.path)}`);return t.join(`
101
+ `)}var Kn=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new At;if(a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>ze(u,o,le())));throw Is(c,r?.callee),c}return a.value},Ts=Kn(He),qn=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>ze(u,o,le())));throw Is(c,r?.callee),c}return a.value},$s=qn(He),Xn=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new At;return o.issues.length?{success:!1,error:new(e??Io)(o.issues.map(a=>ze(a,r,le())))}:{success:!0,data:o.value}},Kd=Xn(He),Jn=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>ze(a,r,le())))}:{success:!0,data:o.value}},qd=Jn(He),Rs=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Kn(e)(t,n,r)},HD=Rs(He),Cs=e=>(t,n,i)=>Kn(e)(t,n,i),YD=Cs(He),Ns=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return qn(e)(t,n,r)},KD=Ns(He),Ps=e=>async(t,n,i)=>qn(e)(t,n,i),qD=Ps(He),ws=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Xn(e)(t,n,r)},XD=ws(He),ks=e=>(t,n,i)=>Xn(e)(t,n,i),JD=ks(He),Os=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Jn(e)(t,n,r)},QD=Os(He),Ds=e=>async(t,n,i)=>Jn(e)(t,n,i),e1=Ds(He);var it={};wt(it,{base64:()=>mm,base64url:()=>Ms,bigint:()=>ym,boolean:()=>_m,browserEmail:()=>c1,cidrv4:()=>lm,cidrv6:()=>dm,cuid:()=>Xd,cuid2:()=>Jd,date:()=>gm,datetime:()=>vm,domain:()=>d1,duration:()=>nm,e164:()=>fm,email:()=>om,emoji:()=>am,extendedDuration:()=>t1,guid:()=>im,hex:()=>m1,hostname:()=>l1,html5Email:()=>o1,httpProtocol:()=>pm,idnEmail:()=>s1,integer:()=>Sm,ipv4:()=>sm,ipv6:()=>cm,ksuid:()=>tm,lowercase:()=>Am,mac:()=>um,md5_base64:()=>f1,md5_base64url:()=>g1,md5_hex:()=>p1,nanoid:()=>rm,null:()=>Em,number:()=>js,rfc5322Email:()=>a1,sha1_base64:()=>v1,sha1_base64url:()=>b1,sha1_hex:()=>h1,sha256_base64:()=>S1,sha256_base64url:()=>_1,sha256_hex:()=>y1,sha384_base64:()=>x1,sha384_base64url:()=>A1,sha384_hex:()=>E1,sha512_base64:()=>T1,sha512_base64url:()=>$1,sha512_hex:()=>I1,string:()=>bm,time:()=>hm,ulid:()=>Qd,undefined:()=>xm,unicodeEmail:()=>O_,uppercase:()=>Im,uuid:()=>cn,uuid4:()=>r1,uuid6:()=>n1,uuid7:()=>i1,xid:()=>em});var Xd=/^[cC][0-9a-z]{6,}$/,Jd=/^[0-9a-z]+$/,Qd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,em=/^[0-9a-vA-V]{20}$/,tm=/^[A-Za-z0-9]{27}$/,rm=/^[a-zA-Z0-9_-]{21}$/,nm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t1=/^[-+]?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)?)??$/,im=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,cn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,r1=cn(4),n1=cn(6),i1=cn(7),om=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,o1=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,a1=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,O_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,s1=O_,c1=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,u1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function am(){return new RegExp(u1,"u")}var sm=/^(?:(?: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])$/,cm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,um=e=>{let t=dt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},lm=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,dm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ms=/^[A-Za-z0-9_-]*$/,l1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,d1=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,pm=/^https?$/,fm=/^\+[1-9]\d{6,14}$/,D_="(?:(?:\\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])))",gm=new RegExp(`^${D_}$`);function M_(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function hm(e){return new RegExp(`^${M_(e)}$`)}function vm(e){let t=M_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${D_}T(?:${i})$`)}var bm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ym=/^-?\d+n?$/,Sm=/^-?\d+$/,js=/^-?\d+(?:\.\d+)?$/,_m=/^(?:true|false)$/i,Em=/^null$/i;var xm=/^undefined$/i;var Am=/^[^A-Z]*$/,Im=/^[^a-z]*$/,m1=/^[0-9a-fA-F]*$/;function Ro(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Co(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var p1=/^[0-9a-fA-F]{32}$/,f1=Ro(22,"=="),g1=Co(22),h1=/^[0-9a-fA-F]{40}$/,v1=Ro(27,"="),b1=Co(27),y1=/^[0-9a-fA-F]{64}$/,S1=Ro(43,"="),_1=Co(43),E1=/^[0-9a-fA-F]{96}$/,x1=Ro(64,""),A1=Co(64),I1=/^[0-9a-fA-F]{128}$/,T1=Ro(86,"=="),$1=Co(86);var Q=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),z_={number:"number",bigint:"bigint",object:"date"},zs=f("$ZodCheckLessThan",(e,t)=>{Q.init(e,t);let n=z_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ls=f("$ZodCheckGreaterThan",(e,t)=>{Q.init(e,t);let n=z_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Tm=f("$ZodCheckMultipleOf",(e,t)=>{Q.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):zd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$m=f("$ZodCheckNumberFormat",(e,t)=>{Q.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Gd[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=r,c.maximum=o,n&&(c.pattern=Sm)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}c<r&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),c>o&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Rm=f("$ZodCheckBigIntFormat",(e,t)=>{Q.init(e,t);let[n,i]=Zd[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Cm=f("$ZodCheckMaxSize",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:xo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Nm=f("$ZodCheckMinSize",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:xo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Pm=f("$ZodCheckSizeEquals",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:xo(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),wm=f("$ZodCheckMaxLength",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=Ao(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),km=f("$ZodCheckMinLength",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=Ao(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Om=f("$ZodCheckLengthEquals",(e,t)=>{var n;Q.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ir(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=Ao(r),c=o>t.length;i.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Qn=f("$ZodCheckStringFormat",(e,t)=>{var n,i;Q.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Dm=f("$ZodCheckRegex",(e,t)=>{Qn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Mm=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Am),Qn.init(e,t)}),jm=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Im),Qn.init(e,t)}),zm=f("$ZodCheckIncludes",(e,t)=>{Q.init(e,t);let n=dt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Lm=f("$ZodCheckStartsWith",(e,t)=>{Q.init(e,t);let n=new RegExp(`^${dt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Um=f("$ZodCheckEndsWith",(e,t)=>{Q.init(e,t);let n=new RegExp(`.*${dt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function j_(e,t,n){e.issues.length&&t.issues.push(...We(n,e.issues))}var Fm=f("$ZodCheckProperty",(e,t)=>{Q.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>j_(r,n,t.property));j_(i,n,t.property)}}),Bm=f("$ZodCheckMimeType",(e,t)=>{Q.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Vm=f("$ZodCheckOverwrite",(e,t)=>{Q.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var No=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
102
102
  `).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
103
- `))}};var Gm={major:4,minor:4,patch:3};var w=f("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Gm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,c,u)=>{let l=Rr(a),d;for(let p of c){if(p._zod.def.when){if(Wd(a)||!p._zod.def.when(a))continue}else if(l)continue;let g=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&u?.async===!1)throw new At;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=Rr(a,g)))});else{if(a.issues.length===g)continue;l||(l=Rr(a,g))}}return d?d.then(()=>a):a},o=(a,c,u)=>{if(Rr(a))return a.aborted=!0,a;let l=r(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new At;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>o(d,a,c)):o(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new At;return u.then(l=>r(l,i,c))}return r(u,i,c)}}M(e,"~standard",()=>({validate:r=>{try{let o=Kd(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return qd(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),un=f("$ZodString",(e,t)=>{w.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bm(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),q=f("$ZodStringFormat",(e,t)=>{Qn.init(e,t),un.init(e,t)}),Wm=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=im),q.init(e,t)}),Hm=f("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=cn(i))}else t.pattern??(t.pattern=cn());q.init(e,t)}),Ym=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=om),q.init(e,t)}),Km=f("$ZodURL",(e,t)=>{q.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===pm.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),qm=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=am()),q.init(e,t)}),Xm=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=rm),q.init(e,t)}),Jm=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Xd),q.init(e,t)}),Qm=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Jd),q.init(e,t)}),ep=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Qd),q.init(e,t)}),tp=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=em),q.init(e,t)}),rp=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tm),q.init(e,t)}),np=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vm(t)),q.init(e,t)}),ip=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=gm),q.init(e,t)}),op=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=hm(t)),q.init(e,t)}),ap=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=nm),q.init(e,t)}),sp=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=sm),q.init(e,t),e._zod.bag.format="ipv4"}),cp=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=cm),q.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),up=f("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=um(t.delimiter)),q.init(e,t),e._zod.bag.format="mac"}),lp=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lm),q.init(e,t)}),dp=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=dm),q.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function mp(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var pp=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=mm),q.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{mp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Q_(e){if(!js.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return mp(n)}var fp=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=js),q.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Q_(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),gp=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=fm),q.init(e,t)});function eE(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var hp=f("$ZodJWT",(e,t)=>{q.init(e,t),e._zod.check=n=>{eE(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),vp=f("$ZodCustomStringFormat",(e,t)=>{q.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Zs=f("$ZodNumber",(e,t)=>{w.init(e,t),e._zod.pattern=e._zod.bag.pattern??zs,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),bp=f("$ZodNumberFormat",(e,t)=>{$m.init(e,t),Zs.init(e,t)}),wo=f("$ZodBoolean",(e,t)=>{w.init(e,t),e._zod.pattern=_m,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Ws=f("$ZodBigInt",(e,t)=>{w.init(e,t),e._zod.pattern=ym,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),yp=f("$ZodBigIntFormat",(e,t)=>{Rm.init(e,t),Ws.init(e,t)}),Sp=f("$ZodSymbol",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),_p=f("$ZodUndefined",(e,t)=>{w.init(e,t),e._zod.pattern=xm,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Ep=f("$ZodNull",(e,t)=>{w.init(e,t),e._zod.pattern=Em,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),xp=f("$ZodAny",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),Ap=f("$ZodUnknown",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),Ip=f("$ZodNever",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Tp=f("$ZodVoid",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),$p=f("$ZodDate",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function L_(e,t,n){e.issues.length&&t.issues.push(...Ze(n,e.issues)),t.value[n]=e.value}var Rp=f("$ZodArray",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let c=r[a],u=t.element._zod.run({value:c,issues:[]},i);u instanceof Promise?o.push(u.then(l=>L_(l,n,a))):L_(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Gs(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...Ze(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function tE(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Vd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function rE(e,t,n,i,r,o){let a=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,d=u.optin==="optional",p=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){a.push(g);continue}let v=u.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(x=>Gs(x,n,g,t,d,p))):Gs(v,n,g,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var nE=f("$ZodObject",(e,t)=>{if(w.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let i=Hn(()=>tE(t));M(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let p of d.values)u[l].add(p)}}return u});let r=sn,o=t.catchall,a;e._zod.parse=(c,u)=>{a??(a=i.value);let l=c.value;if(!r(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],p=a.shape;for(let g of a.keys){let v=p[g],x=v._zod.optin==="optional",G=v._zod.optout==="optional",j=v._zod.run({value:l[g],issues:[]},u);j instanceof Promise?d.push(j.then(he=>Gs(he,c,g,l,x,G))):Gs(j,c,g,l,x,G)}return o?rE(d,l,c,u,i.value,e):d.length?Promise.all(d).then(()=>c):c}}),Cp=f("$ZodObjectJIT",(e,t)=>{nE.init(e,t);let n=e._zod.parse,i=Hn(()=>tE(t)),r=g=>{let v=new Po(["shape","payload","ctx"]),x=i.value,G=_e=>{let J=Is(_e);return`shape[${J}]._zod.run({ value: input[${J}], issues: [] }, ctx)`};v.write("const input = payload.value;");let j=Object.create(null),he=0;for(let _e of x.keys)j[_e]=`key_${he++}`;v.write("const newResult = {};");for(let _e of x.keys){let J=j[_e],ve=Is(_e),Bn=g[_e],l_=Bn?._zod?.optin==="optional",BO=Bn?._zod?.optout==="optional";v.write(`const ${J} = ${G(_e)};`),l_&&BO?v.write(`
103
+ `))}};var Gm={major:4,minor:4,patch:3};var w=f("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Gm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,c,u)=>{let l=Rr(a),d;for(let p of c){if(p._zod.def.when){if(Wd(a)||!p._zod.def.when(a))continue}else if(l)continue;let g=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&u?.async===!1)throw new At;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=Rr(a,g)))});else{if(a.issues.length===g)continue;l||(l=Rr(a,g))}}return d?d.then(()=>a):a},o=(a,c,u)=>{if(Rr(a))return a.aborted=!0,a;let l=r(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new At;return l.then(d=>e._zod.parse(d,u))}return e._zod.parse(l,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(d=>o(d,a,c)):o(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new At;return u.then(l=>r(l,i,c))}return r(u,i,c)}}M(e,"~standard",()=>({validate:r=>{try{let o=Kd(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return qd(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),un=f("$ZodString",(e,t)=>{w.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bm(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),q=f("$ZodStringFormat",(e,t)=>{Qn.init(e,t),un.init(e,t)}),Wm=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=im),q.init(e,t)}),Hm=f("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=cn(i))}else t.pattern??(t.pattern=cn());q.init(e,t)}),Ym=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=om),q.init(e,t)}),Km=f("$ZodURL",(e,t)=>{q.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===pm.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),qm=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=am()),q.init(e,t)}),Xm=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=rm),q.init(e,t)}),Jm=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Xd),q.init(e,t)}),Qm=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Jd),q.init(e,t)}),ep=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Qd),q.init(e,t)}),tp=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=em),q.init(e,t)}),rp=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=tm),q.init(e,t)}),np=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vm(t)),q.init(e,t)}),ip=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=gm),q.init(e,t)}),op=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=hm(t)),q.init(e,t)}),ap=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=nm),q.init(e,t)}),sp=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=sm),q.init(e,t),e._zod.bag.format="ipv4"}),cp=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=cm),q.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),up=f("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=um(t.delimiter)),q.init(e,t),e._zod.bag.format="mac"}),lp=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=lm),q.init(e,t)}),dp=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=dm),q.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function mp(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var pp=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=mm),q.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{mp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function eE(e){if(!Ms.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return mp(n)}var fp=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ms),q.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{eE(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),gp=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=fm),q.init(e,t)});function tE(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var hp=f("$ZodJWT",(e,t)=>{q.init(e,t),e._zod.check=n=>{tE(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),vp=f("$ZodCustomStringFormat",(e,t)=>{q.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Gs=f("$ZodNumber",(e,t)=>{w.init(e,t),e._zod.pattern=e._zod.bag.pattern??js,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),bp=f("$ZodNumberFormat",(e,t)=>{$m.init(e,t),Gs.init(e,t)}),Po=f("$ZodBoolean",(e,t)=>{w.init(e,t),e._zod.pattern=_m,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Zs=f("$ZodBigInt",(e,t)=>{w.init(e,t),e._zod.pattern=ym,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),yp=f("$ZodBigIntFormat",(e,t)=>{Rm.init(e,t),Zs.init(e,t)}),Sp=f("$ZodSymbol",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),_p=f("$ZodUndefined",(e,t)=>{w.init(e,t),e._zod.pattern=xm,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Ep=f("$ZodNull",(e,t)=>{w.init(e,t),e._zod.pattern=Em,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),xp=f("$ZodAny",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),Ap=f("$ZodUnknown",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),Ip=f("$ZodNever",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Tp=f("$ZodVoid",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),$p=f("$ZodDate",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function U_(e,t,n){e.issues.length&&t.issues.push(...We(n,e.issues)),t.value[n]=e.value}var Rp=f("$ZodArray",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let c=r[a],u=t.element._zod.run({value:c,issues:[]},i);u instanceof Promise?o.push(u.then(l=>U_(l,n,a))):U_(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Vs(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...We(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function rE(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Vd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function nE(e,t,n,i,r,o){let a=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,d=u.optin==="optional",p=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){a.push(g);continue}let v=u.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(x=>Vs(x,n,g,t,d,p))):Vs(v,n,g,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var iE=f("$ZodObject",(e,t)=>{if(w.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let i=Hn(()=>rE(t));M(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let d=c[l]._zod;if(d.values){u[l]??(u[l]=new Set);for(let p of d.values)u[l].add(p)}}return u});let r=sn,o=t.catchall,a;e._zod.parse=(c,u)=>{a??(a=i.value);let l=c.value;if(!r(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let d=[],p=a.shape;for(let g of a.keys){let v=p[g],x=v._zod.optin==="optional",G=v._zod.optout==="optional",j=v._zod.run({value:l[g],issues:[]},u);j instanceof Promise?d.push(j.then(he=>Vs(he,c,g,l,x,G))):Vs(j,c,g,l,x,G)}return o?nE(d,l,c,u,i.value,e):d.length?Promise.all(d).then(()=>c):c}}),Cp=f("$ZodObjectJIT",(e,t)=>{iE.init(e,t);let n=e._zod.parse,i=Hn(()=>rE(t)),r=g=>{let v=new No(["shape","payload","ctx"]),x=i.value,G=_e=>{let J=As(_e);return`shape[${J}]._zod.run({ value: input[${J}], issues: [] }, ctx)`};v.write("const input = payload.value;");let j=Object.create(null),he=0;for(let _e of x.keys)j[_e]=`key_${he++}`;v.write("const newResult = {};");for(let _e of x.keys){let J=j[_e],ve=As(_e),Bn=g[_e],d_=Bn?._zod?.optin==="optional",VO=Bn?._zod?.optout==="optional";v.write(`const ${J} = ${G(_e)};`),d_&&VO?v.write(`
104
104
  if (${J}.issues.length) {
105
105
  if (${ve} in input) {
106
106
  payload.issues = payload.issues.concat(${J}.issues.map(iss => ({
@@ -118,7 +118,7 @@ Filtered results for: ${this.inputValue?this.inputValue:Er.gray("Enter something
118
118
  newResult[${ve}] = ${J}.value;
119
119
  }
120
120
 
121
- `):l_?v.write(`
121
+ `):d_?v.write(`
122
122
  if (${J}.issues.length) {
123
123
  payload.issues = payload.issues.concat(${J}.issues.map(iss => ({
124
124
  ...iss,
@@ -159,66 +159,66 @@ Filtered results for: ${this.inputValue?this.inputValue:Er.gray("Enter something
159
159
  }
160
160
  }
161
161
 
162
- `)}v.write("payload.value = newResult;"),v.write("return payload;");let rt=v.compile();return(_e,J)=>rt(g,_e,J)},o,a=sn,c=!an.jitless,l=c&&Ud.value,d=t.catchall,p;e._zod.parse=(g,v)=>{p??(p=i.value);let x=g.value;return a(x)?c&&l&&v?.async===!1&&v.jitless!==!0?(o||(o=r(t.shape)),g=o(g,v),d?rE([],x,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),g)}});function U_(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!Rr(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>ze(a,i,le())))}),t)}var ko=f("$ZodUnion",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Eo(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>U_(c,i,e,r)):U_(a,i,e,r)}});function F_(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>ze(a,i,le())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Np=f("$ZodXor",(e,t)=>{ko.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(c=>F_(c,i,e,r)):F_(a,i,e,r)}}),Pp=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ko.init(e,t);let n=e._zod.parse;M(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[c,u]of Object.entries(a)){r[c]||(r[c]=new Set);for(let l of u)r[c].add(l)}}return r});let i=Hn(()=>{let r=t.options,o=new Map;for(let a of r){let c=a._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let u of c){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!sn(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let c=i.value.get(a?.[t.discriminator]);return c?c._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),wp=f("$ZodIntersection",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([u,l])=>B_(n,u,l)):B_(n,o,a)}});function Zm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($r(e)&&$r(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=Zm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Zm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function B_(e,t,n){let i=new Map,r;for(let c of t.issues)if(c.code==="unrecognized_keys"){r??(r=c);for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(c);for(let c of n.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(c);let o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&r&&e.issues.push({...r,keys:o}),Rr(e))return e;let a=Zm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Hs=f("$ZodTuple",(e,t)=>{w.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],c=V_(n,"optin"),u=V_(n,"optout");if(!t.rest){if(o.length<c)return i.issues.push({code:"too_small",minimum:c,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let l=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:o[d],issues:[]},r);p instanceof Promise?a.push(p.then(g=>{l[d]=g})):l[d]=p}if(t.rest){let d=n.length-1,p=o.slice(n.length);for(let g of p){d++;let v=t.rest._zod.run({value:g,issues:[]},r);v instanceof Promise?a.push(v.then(x=>G_(x,i,d))):G_(v,i,d)}}return a.length?Promise.all(a).then(()=>Z_(l,i,n,o,u)):Z_(l,i,n,o,u)}});function V_(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function G_(e,t,n){e.issues.length&&t.issues.push(...Ze(n,e.issues)),t.value[n]=e.value}function Z_(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],c=o<i.length;if(a.issues.length){if(!c&&o>=r){t.value.length=o;break}t.issues.push(...Ze(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var kp=f("$ZodRecord",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!$r(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let c=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(v=>ze(v,i,le())),input:l,path:[l],inst:e});continue}let p=d.value,g=t.valueType._zod.run({value:r[l],issues:[]},i);g instanceof Promise?o.push(g.then(v=>{v.issues.length&&n.issues.push(...Ze(l,v.issues)),n.value[p]=v.value})):(g.issues.length&&n.issues.push(...Ze(l,g.issues)),n.value[p]=g.value)}let u;for(let l in r)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let c of Reflect.ownKeys(r)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&zs.test(c)&&u.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?n.value[c]=r[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>ze(p,i,le())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:r[c],issues:[]},i);d instanceof Promise?o.push(d.then(p=>{p.issues.length&&n.issues.push(...Ze(c,p.issues)),n.value[u.value]=p.value})):(d.issues.length&&n.issues.push(...Ze(c,d.issues)),n.value[u.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Op=f("$ZodMap",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,c]of r){let u=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([d,p])=>{W_(d,p,n,a,r,e,i)})):W_(u,l,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function W_(e,t,n,i,r,o,a){e.issues.length&&(xo.has(typeof i)?n.issues.push(...Ze(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(c=>ze(c,a,le()))})),t.issues.length&&(xo.has(typeof i)?n.issues.push(...Ze(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(c=>ze(c,a,le()))})),n.value.set(e.value,t.value)}var Dp=f("$ZodSet",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let c=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(u=>H_(u,n))):H_(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function H_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Mp=f("$ZodEnum",(e,t)=>{w.init(e,t);let n=_o(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>xo.has(typeof r)).map(r=>typeof r=="string"?dt(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),jp=f("$ZodLiteral",(e,t)=>{if(w.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?dt(i):i?dt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),zp=f("$ZodFile",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Lp=f("$ZodTransform",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ar(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new At;return n.value=r,n.fallback=!0,n}});function Y_(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ys=f("$ZodOptional",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Eo(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>Y_(a,r)):Y_(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Up=f("$ZodExactOptional",(e,t)=>{Ys.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),Fp=f("$ZodNullable",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Eo(n.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Bp=f("$ZodDefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>K_(o,t)):K_(r,t)}});function K_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Vp=f("$ZodPrefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),Gp=f("$ZodNonOptional",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>q_(o,e)):q_(r,e)}});function q_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Zp=f("$ZodSuccess",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ar("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Wp=f("$ZodCatch",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>ze(a,i,le()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>ze(o,i,le()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Hp=f("$ZodNaN",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ks=f("$ZodPipe",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Fs(a,t.in,i)):Fs(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Fs(o,t.out,i)):Fs(r,t.out,i)}});function Fs(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Oo=f("$ZodCodec",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>Bs(a,t,i)):Bs(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Bs(a,t,i)):Bs(o,t,i)}}});function Bs(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>Vs(e,o,t.out,n)):Vs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Vs(e,o,t.in,n)):Vs(e,r,t.in,n)}}function Vs(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var Yp=f("$ZodPreprocess",(e,t)=>{Ks.init(e,t)}),Kp=f("$ZodReadonly",(e,t)=>{w.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>t.innerType?._zod?.optin),M(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(X_):X_(r)}});function X_(e){return e.value=Object.freeze(e.value),e}var qp=f("$ZodTemplateLiteral",(e,t)=>{w.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||Bd.has(typeof i))n.push(dt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Xp=f("$ZodFunction",(e,t)=>(w.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?$s(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?$s(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await Rs(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Rs(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Hs({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),Jp=f("$ZodPromise",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Qp=f("$ZodLazy",(e,t)=>{w.init(e,t),M(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),M(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),M(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),M(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),M(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),ef=f("$ZodCustom",(e,t)=>{Q.init(e,t),w.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>J_(o,n,i,e));J_(r,n,i,e)}});function J_(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Yn(r))}}var Mo={};wt(Mo,{ar:()=>iE,az:()=>oE,be:()=>sE,bg:()=>cE,ca:()=>uE,cs:()=>lE,da:()=>dE,de:()=>mE,el:()=>pE,en:()=>qs,eo:()=>fE,es:()=>gE,fa:()=>hE,fi:()=>vE,fr:()=>bE,frCA:()=>yE,he:()=>SE,hr:()=>_E,hu:()=>EE,hy:()=>AE,id:()=>IE,is:()=>TE,it:()=>$E,ja:()=>RE,ka:()=>CE,kh:()=>NE,km:()=>Xs,ko:()=>PE,lt:()=>kE,mk:()=>OE,ms:()=>DE,nl:()=>ME,no:()=>jE,ota:()=>zE,pl:()=>UE,ps:()=>LE,pt:()=>FE,ro:()=>BE,ru:()=>GE,sl:()=>ZE,sv:()=>WE,ta:()=>HE,th:()=>YE,tr:()=>KE,ua:()=>qE,uk:()=>Js,ur:()=>XE,uz:()=>JE,vi:()=>QE,yo:()=>rx,zhCN:()=>ex,zhTW:()=>tx});var R1=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${y(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function iE(){return{localeError:R1()}}var C1=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${c}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${y(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function oE(){return{localeError:C1()}}function aE(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var N1=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${y(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=aE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=aE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function sE(){return{localeError:N1()}}var P1=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${y(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function cE(){return{localeError:P1()}}var w1=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${y(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${h(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function uE(){return{localeError:w1()}}var k1=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${c}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${y(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${h(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function lE(){return{localeError:k1()}}var O1=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${y(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For stor: forventede ${c??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For lille: forventede ${c} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${c} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function dE(){return{localeError:O1()}}var D1=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${y(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function mE(){return{localeError:D1()}}var M1=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${y(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function pE(){return{localeError:M1()}}var j1=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`Invalid option: expected one of ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function qs(){return{localeError:j1()}}var z1=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${c}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${y(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function fE(){return{localeError:z1()}}var L1=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${y(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function gE(){return{localeError:L1()}}var U1=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${y(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${h(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${h(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function hE(){return{localeError:U1()}}var F1=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${y(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${h(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function vE(){return{localeError:F1()}}var B1=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${c} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${y(r.values[0])} attendu`:`Option invalide : une valeur parmi ${h(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function bE(){return{localeError:B1()}}var V1=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${c}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${y(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function yE(){return{localeError:V1()}}var G1=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?e[l]:void 0,i=l=>{let d=n(l);return d?d.label:l??e.unknown.label},r=l=>`\u05D4${i(l)}`,o=l=>(n(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,p=u[d??""]??i(d),g=S(l.input),v=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${y(l.values[0])}`;let d=l.values.map(v=>y(v));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",G=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${G}`.trim()}let g=l.inclusive?"<=":"<",v=o(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let j=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${j}`}let G=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${G}`.trim()}let g=l.inclusive?">=":">",v=o(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let p=c[d.format],g=p?.label??d.format,x=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${x}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${h(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function SE(){return{localeError:G1()}}var Z1=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${c}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${y(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${c} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function _E(){return{localeError:Z1()}}var W1=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${y(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function EE(){return{localeError:W1()}}function xE(e,t,n){return Math.abs(e)===1?t:n}function ei(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var H1=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${y(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=xE(c,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=xE(c,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${h(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ei(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${ei(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function AE(){return{localeError:H1()}}var Y1=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${y(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function IE(){return{localeError:Y1()}}var K1=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${y(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${h(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function TE(){return{localeError:K1()}}var q1=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${y(r.values[0])}`:`Opzione non valida: atteso uno tra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${h(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function $E(){return{localeError:q1()}}var X1=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${y(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${h(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function RE(){return{localeError:X1()}}var J1=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${y(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${h(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function CE(){return{localeError:J1()}}var Q1=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${y(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${h(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Xs(){return{localeError:Q1()}}function NE(){return Xs()}var eM=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${y(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${h(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${h(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function PE(){return{localeError:eM()}}var Do=e=>e.charAt(0).toUpperCase()+e.slice(1);function wE(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var tM=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,a,c){let u=e[r]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[c][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${y(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${h(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,wE(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Do(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Do(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,wE(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Do(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Do(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${h(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Do(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function kE(){return{localeError:tM()}}var rM=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function OE(){return{localeError:rM()}}var nM=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${y(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function DE(){return{localeError:nM()}}var iM=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${y(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function ME(){return{localeError:iM()}}var oM=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${y(r.values[0])}`:`Ugyldig valg: forventet en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function jE(){return{localeError:oM()}}var aM=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${y(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function zE(){return{localeError:aM()}}var sM=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${y(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${h(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function LE(){return{localeError:sM()}}var cM=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${y(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function UE(){return{localeError:cM()}}var uM=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${y(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function FE(){return{localeError:uM()}}var lM=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${c}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${y(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${h(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function BE(){return{localeError:lM()}}function VE(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var dM=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${y(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=VE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=VE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function GE(){return{localeError:dM()}}var mM=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${c}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${y(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function ZE(){return{localeError:mM()}}var pM=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${c}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${y(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function WE(){return{localeError:pM()}}var fM=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function HE(){return{localeError:fM()}}var gM=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${y(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${h(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function YE(){return{localeError:gM()}}var hM=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${y(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function KE(){return{localeError:hM()}}var vM=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${y(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Js(){return{localeError:vM()}}function qE(){return Js()}var bM=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${y(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${h(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function XE(){return{localeError:bM()}}var yM=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${y(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function JE(){return{localeError:yM()}}var SM=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${y(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${h(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function QE(){return{localeError:SM()}}var _M=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${y(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function ex(){return{localeError:_M()}}var EM=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${y(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function tx(){return{localeError:EM()}}var xM=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${y(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${h(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function rx(){return{localeError:xM()}}var nx,tf=Symbol("ZodOutput"),rf=Symbol("ZodInput"),Qs=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function ec(){return new Qs}(nx=globalThis).__zod_globalRegistry??(nx.__zod_globalRegistry=ec());var Te=globalThis.__zod_globalRegistry;function nf(e,t){return new e({type:"string",...E(t)})}function of(e,t){return new e({type:"string",coerce:!0,...E(t)})}function tc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function jo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function rc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function nc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function ic(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function oc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function zo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function ac(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function sc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function cc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function uc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function lc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function dc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function mc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function pc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function fc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function af(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function gc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function hc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function vc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function bc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function yc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function Sc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}var sf={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function cf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function uf(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function lf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function df(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function mf(e,t){return new e({type:"number",checks:[],...E(t)})}function pf(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function ff(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function gf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function hf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function vf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function bf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function yf(e,t){return new e({type:"boolean",...E(t)})}function Sf(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function _f(e,t){return new e({type:"bigint",...E(t)})}function Ef(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function xf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function Af(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function If(e,t){return new e({type:"symbol",...E(t)})}function Tf(e,t){return new e({type:"undefined",...E(t)})}function $f(e,t){return new e({type:"null",...E(t)})}function Rf(e){return new e({type:"any"})}function Cf(e){return new e({type:"unknown"})}function Nf(e,t){return new e({type:"never",...E(t)})}function Pf(e,t){return new e({type:"void",...E(t)})}function wf(e,t){return new e({type:"date",...E(t)})}function kf(e,t){return new e({type:"date",coerce:!0,...E(t)})}function Of(e,t){return new e({type:"nan",...E(t)})}function Ot(e,t){return new Ls({check:"less_than",...E(t),value:e,inclusive:!1})}function it(e,t){return new Ls({check:"less_than",...E(t),value:e,inclusive:!0})}function Dt(e,t){return new Us({check:"greater_than",...E(t),value:e,inclusive:!1})}function Le(e,t){return new Us({check:"greater_than",...E(t),value:e,inclusive:!0})}function _c(e){return Dt(0,e)}function Ec(e){return Ot(0,e)}function xc(e){return it(0,e)}function Ac(e){return Le(0,e)}function Cr(e,t){return new Tm({check:"multiple_of",...E(t),value:e})}function Nr(e,t){return new Cm({check:"max_size",...E(t),maximum:e})}function Mt(e,t){return new Nm({check:"min_size",...E(t),minimum:e})}function ln(e,t){return new Pm({check:"size_equals",...E(t),size:e})}function dn(e,t){return new wm({check:"max_length",...E(t),maximum:e})}function ir(e,t){return new km({check:"min_length",...E(t),minimum:e})}function mn(e,t){return new Om({check:"length_equals",...E(t),length:e})}function ti(e,t){return new Dm({check:"string_format",format:"regex",...E(t),pattern:e})}function ri(e){return new Mm({check:"string_format",format:"lowercase",...E(e)})}function ni(e){return new jm({check:"string_format",format:"uppercase",...E(e)})}function ii(e,t){return new zm({check:"string_format",format:"includes",...E(t),includes:e})}function oi(e,t){return new Lm({check:"string_format",format:"starts_with",...E(t),prefix:e})}function ai(e,t){return new Um({check:"string_format",format:"ends_with",...E(t),suffix:e})}function Ic(e,t,n){return new Fm({check:"property",property:e,schema:t,...E(n)})}function si(e,t){return new Bm({check:"mime_type",mime:e,...E(t)})}function It(e){return new Vm({check:"overwrite",tx:e})}function ci(e){return It(t=>t.normalize(e))}function ui(){return It(e=>e.trim())}function li(){return It(e=>e.toLowerCase())}function di(){return It(e=>e.toUpperCase())}function mi(){return It(e=>Ld(e))}function Df(e,t,n){return new e({type:"array",element:t,...E(n)})}function IM(e,t,n){return new e({type:"union",options:t,...E(n)})}function TM(e,t,n){return new e({type:"union",options:t,inclusive:!1,...E(n)})}function $M(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...E(i)})}function RM(e,t,n){return new e({type:"intersection",left:t,right:n})}function CM(e,t,n,i){let r=n instanceof w,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function NM(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...E(i)})}function PM(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...E(i)})}function wM(e,t,n){return new e({type:"set",valueType:t,...E(n)})}function kM(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...E(n)})}function OM(e,t,n){return new e({type:"enum",entries:t,...E(n)})}function DM(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(n)})}function Mf(e,t){return new e({type:"file",...E(t)})}function MM(e,t){return new e({type:"transform",transform:t})}function jM(e,t){return new e({type:"optional",innerType:t})}function zM(e,t){return new e({type:"nullable",innerType:t})}function LM(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Fd(n)}})}function UM(e,t,n){return new e({type:"nonoptional",innerType:t,...E(n)})}function FM(e,t){return new e({type:"success",innerType:t})}function BM(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function VM(e,t,n){return new e({type:"pipe",in:t,out:n})}function GM(e,t){return new e({type:"readonly",innerType:t})}function ZM(e,t,n){return new e({type:"template_literal",parts:t,...E(n)})}function WM(e,t){return new e({type:"lazy",getter:t})}function HM(e,t){return new e({type:"promise",innerType:t})}function jf(e,t,n){let i=E(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function zf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function Lf(e,t){let n=ix(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Yn(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Yn(o))}},e(i.value,i)),t);return n}function ix(e,t){let n=new Q({check:"custom",...E(t)});return n._zod.check=e,n}function Uf(e){let t=new Q({check:"describe"});return t._zod.onattach=[n=>{let i=Te.get(n)??{};Te.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function Ff(e){let t=new Q({check:"meta"});return t._zod.onattach=[n=>{let i=Te.get(n)??{};Te.add(n,{...i,...e})}],t._zod.check=()=>{},t}function Bf(e,t){let n=E(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let o=new Set(i),a=new Set(r),c=e.Codec??Oo,u=e.Boolean??wo,l=e.String??un,d=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new c({type:"pipe",in:d,out:p,transform:((v,x)=>{let G=v;return n.case!=="sensitive"&&(G=G.toLowerCase()),o.has(G)?!0:a.has(G)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:x.value,inst:g,continue:!1}),{})}),reverseTransform:((v,x)=>v===!0?i[0]||"true":r[0]||"false"),error:n.error});return g}function pi(e,t,n,i={}){let r=E(i),o={...E(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:c=>n.test(c),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Pr(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Te,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Z(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let g=a.schema,v=t.processors[r.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);v(e,t,g,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Z(p,t,d),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&Ue(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function wr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let c=e.metadataRegistry.get(a[0])?.id;if(c){let u=i.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,a[0])}}let r=a=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,g=e.external.uri??(x=>x);if(p)return{ref:g(p)};let v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(a[1]===n)return{ref:"#"};let l=`#/${c}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},o=a=>{if(a[1].schema.$ref)return;let c=a[1],{ref:u,defId:l}=r(a);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let p in d)delete d[p];d.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
162
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");let nt=v.compile();return(_e,J)=>nt(g,_e,J)},o,a=sn,c=!an.jitless,l=c&&Ud.value,d=t.catchall,p;e._zod.parse=(g,v)=>{p??(p=i.value);let x=g.value;return a(x)?c&&l&&v?.async===!1&&v.jitless!==!0?(o||(o=r(t.shape)),g=o(g,v),d?nE([],x,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),g)}});function F_(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!Rr(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>ze(a,i,le())))}),t)}var wo=f("$ZodUnion",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>_o(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>F_(c,i,e,r)):F_(a,i,e,r)}});function B_(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>ze(a,i,le())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Np=f("$ZodXor",(e,t)=>{wo.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(c=>B_(c,i,e,r)):B_(a,i,e,r)}}),Pp=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,wo.init(e,t);let n=e._zod.parse;M(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[c,u]of Object.entries(a)){r[c]||(r[c]=new Set);for(let l of u)r[c].add(l)}}return r});let i=Hn(()=>{let r=t.options,o=new Map;for(let a of r){let c=a._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let u of c){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!sn(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let c=i.value.get(a?.[t.discriminator]);return c?c._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),wp=f("$ZodIntersection",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([u,l])=>V_(n,u,l)):V_(n,o,a)}});function Zm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($r(e)&&$r(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=Zm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Zm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function V_(e,t,n){let i=new Map,r;for(let c of t.issues)if(c.code==="unrecognized_keys"){r??(r=c);for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(c);for(let c of n.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(c);let o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&r&&e.issues.push({...r,keys:o}),Rr(e))return e;let a=Zm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Ws=f("$ZodTuple",(e,t)=>{w.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],c=G_(n,"optin"),u=G_(n,"optout");if(!t.rest){if(o.length<c)return i.issues.push({code:"too_small",minimum:c,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let l=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:o[d],issues:[]},r);p instanceof Promise?a.push(p.then(g=>{l[d]=g})):l[d]=p}if(t.rest){let d=n.length-1,p=o.slice(n.length);for(let g of p){d++;let v=t.rest._zod.run({value:g,issues:[]},r);v instanceof Promise?a.push(v.then(x=>Z_(x,i,d))):Z_(v,i,d)}}return a.length?Promise.all(a).then(()=>W_(l,i,n,o,u)):W_(l,i,n,o,u)}});function G_(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Z_(e,t,n){e.issues.length&&t.issues.push(...We(n,e.issues)),t.value[n]=e.value}function W_(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],c=o<i.length;if(a.issues.length){if(!c&&o>=r){t.value.length=o;break}t.issues.push(...We(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var kp=f("$ZodRecord",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!$r(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let c=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let d=t.keyType._zod.run({value:l,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(v=>ze(v,i,le())),input:l,path:[l],inst:e});continue}let p=d.value,g=t.valueType._zod.run({value:r[l],issues:[]},i);g instanceof Promise?o.push(g.then(v=>{v.issues.length&&n.issues.push(...We(l,v.issues)),n.value[p]=v.value})):(g.issues.length&&n.issues.push(...We(l,g.issues)),n.value[p]=g.value)}let u;for(let l in r)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let c of Reflect.ownKeys(r)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&js.test(c)&&u.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?n.value[c]=r[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>ze(p,i,le())),input:c,path:[c],inst:e});continue}let d=t.valueType._zod.run({value:r[c],issues:[]},i);d instanceof Promise?o.push(d.then(p=>{p.issues.length&&n.issues.push(...We(c,p.issues)),n.value[u.value]=p.value})):(d.issues.length&&n.issues.push(...We(c,d.issues)),n.value[u.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Op=f("$ZodMap",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,c]of r){let u=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([d,p])=>{H_(d,p,n,a,r,e,i)})):H_(u,l,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function H_(e,t,n,i,r,o,a){e.issues.length&&(Eo.has(typeof i)?n.issues.push(...We(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(c=>ze(c,a,le()))})),t.issues.length&&(Eo.has(typeof i)?n.issues.push(...We(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(c=>ze(c,a,le()))})),n.value.set(e.value,t.value)}var Dp=f("$ZodSet",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let c=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(u=>Y_(u,n))):Y_(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function Y_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Mp=f("$ZodEnum",(e,t)=>{w.init(e,t);let n=So(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>Eo.has(typeof r)).map(r=>typeof r=="string"?dt(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),jp=f("$ZodLiteral",(e,t)=>{if(w.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?dt(i):i?dt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),zp=f("$ZodFile",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Lp=f("$ZodTransform",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ar(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new At;return n.value=r,n.fallback=!0,n}});function K_(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Hs=f("$ZodOptional",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${_o(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>K_(a,r)):K_(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Up=f("$ZodExactOptional",(e,t)=>{Hs.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),Fp=f("$ZodNullable",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${_o(n.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Bp=f("$ZodDefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>q_(o,t)):q_(r,t)}});function q_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Vp=f("$ZodPrefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),Gp=f("$ZodNonOptional",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>X_(o,e)):X_(r,e)}});function X_(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Zp=f("$ZodSuccess",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ar("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Wp=f("$ZodCatch",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>ze(a,i,le()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>ze(o,i,le()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Hp=f("$ZodNaN",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Ys=f("$ZodPipe",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Us(a,t.in,i)):Us(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Us(o,t.out,i)):Us(r,t.out,i)}});function Us(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var ko=f("$ZodCodec",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>Fs(a,t,i)):Fs(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Fs(a,t,i)):Fs(o,t,i)}}});function Fs(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>Bs(e,o,t.out,n)):Bs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Bs(e,o,t.in,n)):Bs(e,r,t.in,n)}}function Bs(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var Yp=f("$ZodPreprocess",(e,t)=>{Ys.init(e,t)}),Kp=f("$ZodReadonly",(e,t)=>{w.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>t.innerType?._zod?.optin),M(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(J_):J_(r)}});function J_(e){return e.value=Object.freeze(e.value),e}var qp=f("$ZodTemplateLiteral",(e,t)=>{w.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||Bd.has(typeof i))n.push(dt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Xp=f("$ZodFunction",(e,t)=>(w.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?Ts(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Ts(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await $s(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await $s(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Ws({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),Jp=f("$ZodPromise",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Qp=f("$ZodLazy",(e,t)=>{w.init(e,t),M(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),M(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),M(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),M(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),M(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),ef=f("$ZodCustom",(e,t)=>{Q.init(e,t),w.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>Q_(o,n,i,e));Q_(r,n,i,e)}});function Q_(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Yn(r))}}var Do={};wt(Do,{ar:()=>oE,az:()=>aE,be:()=>cE,bg:()=>uE,ca:()=>lE,cs:()=>dE,da:()=>mE,de:()=>pE,el:()=>fE,en:()=>Ks,eo:()=>gE,es:()=>hE,fa:()=>vE,fi:()=>bE,fr:()=>yE,frCA:()=>SE,he:()=>_E,hr:()=>EE,hu:()=>xE,hy:()=>IE,id:()=>TE,is:()=>$E,it:()=>RE,ja:()=>CE,ka:()=>NE,kh:()=>PE,km:()=>qs,ko:()=>wE,lt:()=>OE,mk:()=>DE,ms:()=>ME,nl:()=>jE,no:()=>zE,ota:()=>LE,pl:()=>FE,ps:()=>UE,pt:()=>BE,ro:()=>VE,ru:()=>ZE,sl:()=>WE,sv:()=>HE,ta:()=>YE,th:()=>KE,tr:()=>qE,ua:()=>XE,uk:()=>Xs,ur:()=>JE,uz:()=>QE,vi:()=>ex,yo:()=>nx,zhCN:()=>tx,zhTW:()=>rx});var C1=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${y(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function oE(){return{localeError:C1()}}var N1=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${c}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${y(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function aE(){return{localeError:N1()}}function sE(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var P1=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${y(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=sE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=sE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function cE(){return{localeError:P1()}}var w1=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${y(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function uE(){return{localeError:w1()}}var k1=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${y(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${h(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function lE(){return{localeError:k1()}}var O1=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${c}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${y(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${h(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function dE(){return{localeError:O1()}}var D1=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${y(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For stor: forventede ${c??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For lille: forventede ${c} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${c} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function mE(){return{localeError:D1()}}var M1=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${y(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function pE(){return{localeError:M1()}}var j1=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${y(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function fE(){return{localeError:j1()}}var z1=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`Invalid option: expected one of ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Ks(){return{localeError:z1()}}var L1=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${c}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${y(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function gE(){return{localeError:L1()}}var U1=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${y(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function hE(){return{localeError:U1()}}var F1=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${y(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${h(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${h(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function vE(){return{localeError:F1()}}var B1=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${y(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${h(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function bE(){return{localeError:B1()}}var V1=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${c} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${y(r.values[0])} attendu`:`Option invalide : une valeur parmi ${h(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function yE(){return{localeError:V1()}}var G1=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${c}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${y(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function SE(){return{localeError:G1()}}var Z1=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?e[l]:void 0,i=l=>{let d=n(l);return d?d.label:l??e.unknown.label},r=l=>`\u05D4${i(l)}`,o=l=>(n(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let d=l.expected,p=u[d??""]??i(d),g=S(l.input),v=u[g]??e[g]?.label??g;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${y(l.values[0])}`;let d=l.values.map(v=>y(v));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",G=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${G}`.trim()}let g=l.inclusive?"<=":"<",v=o(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()}`}case"too_small":{let d=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let j=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${j}`}let G=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${G}`.trim()}let g=l.inclusive?">=":">",v=o(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()}`}case"invalid_format":{let d=l;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let p=c[d.format],g=p?.label??d.format,x=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${x}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${h(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function _E(){return{localeError:Z1()}}var W1=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${c}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${y(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${c} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function EE(){return{localeError:W1()}}var H1=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${y(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function xE(){return{localeError:H1()}}function AE(e,t,n){return Math.abs(e)===1?t:n}function ei(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var Y1=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${y(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=AE(c,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=AE(c,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${ei(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${h(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${ei(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${ei(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function IE(){return{localeError:Y1()}}var K1=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${y(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function TE(){return{localeError:K1()}}var q1=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${y(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${h(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function $E(){return{localeError:q1()}}var X1=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${y(r.values[0])}`:`Opzione non valida: atteso uno tra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${h(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function RE(){return{localeError:X1()}}var J1=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${y(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${h(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function CE(){return{localeError:J1()}}var Q1=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${y(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${h(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function NE(){return{localeError:Q1()}}var eM=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${y(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${h(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function qs(){return{localeError:eM()}}function PE(){return qs()}var tM=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${y(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${h(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${h(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function wE(){return{localeError:tM()}}var Oo=e=>e.charAt(0).toUpperCase()+e.slice(1);function kE(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var rM=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,a,c){let u=e[r]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[c][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${y(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${h(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,kE(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Oo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Oo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,kE(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Oo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Oo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${h(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Oo(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function OE(){return{localeError:rM()}}var nM=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function DE(){return{localeError:nM()}}var iM=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${y(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function ME(){return{localeError:iM()}}var oM=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${y(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function jE(){return{localeError:oM()}}var aM=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${y(r.values[0])}`:`Ugyldig valg: forventet en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function zE(){return{localeError:aM()}}var sM=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${y(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function LE(){return{localeError:sM()}}var cM=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${y(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${h(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function UE(){return{localeError:cM()}}var uM=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${y(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function FE(){return{localeError:uM()}}var lM=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${y(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function BE(){return{localeError:lM()}}var dM=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${c}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${y(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${h(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function VE(){return{localeError:dM()}}function GE(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var mM=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${y(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=GE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=GE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function ZE(){return{localeError:mM()}}var pM=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${c}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${y(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function WE(){return{localeError:pM()}}var fM=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${c}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${y(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function HE(){return{localeError:fM()}}var gM=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function YE(){return{localeError:gM()}}var hM=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${y(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${h(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function KE(){return{localeError:hM()}}var vM=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${y(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function qE(){return{localeError:vM()}}var bM=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${y(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Xs(){return{localeError:bM()}}function XE(){return Xs()}var yM=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${y(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${h(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function JE(){return{localeError:yM()}}var SM=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${y(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function QE(){return{localeError:SM()}}var _M=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${y(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${h(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function ex(){return{localeError:_M()}}var EM=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${y(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function tx(){return{localeError:EM()}}var xM=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${y(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function rx(){return{localeError:xM()}}var AM=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${y(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${h(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function nx(){return{localeError:AM()}}var ix,tf=Symbol("ZodOutput"),rf=Symbol("ZodInput"),Js=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Qs(){return new Js}(ix=globalThis).__zod_globalRegistry??(ix.__zod_globalRegistry=Qs());var Te=globalThis.__zod_globalRegistry;function nf(e,t){return new e({type:"string",...E(t)})}function of(e,t){return new e({type:"string",coerce:!0,...E(t)})}function ec(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function Mo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function tc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function rc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function nc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function ic(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function jo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function oc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function ac(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function sc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function cc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function uc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function lc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function dc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function mc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function pc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function af(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function fc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function gc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function hc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function vc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function bc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function yc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}var sf={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function cf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function uf(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function lf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function df(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function mf(e,t){return new e({type:"number",checks:[],...E(t)})}function pf(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function ff(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function gf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function hf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function vf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function bf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function yf(e,t){return new e({type:"boolean",...E(t)})}function Sf(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function _f(e,t){return new e({type:"bigint",...E(t)})}function Ef(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function xf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function Af(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function If(e,t){return new e({type:"symbol",...E(t)})}function Tf(e,t){return new e({type:"undefined",...E(t)})}function $f(e,t){return new e({type:"null",...E(t)})}function Rf(e){return new e({type:"any"})}function Cf(e){return new e({type:"unknown"})}function Nf(e,t){return new e({type:"never",...E(t)})}function Pf(e,t){return new e({type:"void",...E(t)})}function wf(e,t){return new e({type:"date",...E(t)})}function kf(e,t){return new e({type:"date",coerce:!0,...E(t)})}function Of(e,t){return new e({type:"nan",...E(t)})}function Ot(e,t){return new zs({check:"less_than",...E(t),value:e,inclusive:!1})}function ot(e,t){return new zs({check:"less_than",...E(t),value:e,inclusive:!0})}function Dt(e,t){return new Ls({check:"greater_than",...E(t),value:e,inclusive:!1})}function Le(e,t){return new Ls({check:"greater_than",...E(t),value:e,inclusive:!0})}function Sc(e){return Dt(0,e)}function _c(e){return Ot(0,e)}function Ec(e){return ot(0,e)}function xc(e){return Le(0,e)}function Cr(e,t){return new Tm({check:"multiple_of",...E(t),value:e})}function Nr(e,t){return new Cm({check:"max_size",...E(t),maximum:e})}function Mt(e,t){return new Nm({check:"min_size",...E(t),minimum:e})}function ln(e,t){return new Pm({check:"size_equals",...E(t),size:e})}function dn(e,t){return new wm({check:"max_length",...E(t),maximum:e})}function ir(e,t){return new km({check:"min_length",...E(t),minimum:e})}function mn(e,t){return new Om({check:"length_equals",...E(t),length:e})}function ti(e,t){return new Dm({check:"string_format",format:"regex",...E(t),pattern:e})}function ri(e){return new Mm({check:"string_format",format:"lowercase",...E(e)})}function ni(e){return new jm({check:"string_format",format:"uppercase",...E(e)})}function ii(e,t){return new zm({check:"string_format",format:"includes",...E(t),includes:e})}function oi(e,t){return new Lm({check:"string_format",format:"starts_with",...E(t),prefix:e})}function ai(e,t){return new Um({check:"string_format",format:"ends_with",...E(t),suffix:e})}function Ac(e,t,n){return new Fm({check:"property",property:e,schema:t,...E(n)})}function si(e,t){return new Bm({check:"mime_type",mime:e,...E(t)})}function It(e){return new Vm({check:"overwrite",tx:e})}function ci(e){return It(t=>t.normalize(e))}function ui(){return It(e=>e.trim())}function li(){return It(e=>e.toLowerCase())}function di(){return It(e=>e.toUpperCase())}function mi(){return It(e=>Ld(e))}function Df(e,t,n){return new e({type:"array",element:t,...E(n)})}function TM(e,t,n){return new e({type:"union",options:t,...E(n)})}function $M(e,t,n){return new e({type:"union",options:t,inclusive:!1,...E(n)})}function RM(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...E(i)})}function CM(e,t,n){return new e({type:"intersection",left:t,right:n})}function NM(e,t,n,i){let r=n instanceof w,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function PM(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...E(i)})}function wM(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...E(i)})}function kM(e,t,n){return new e({type:"set",valueType:t,...E(n)})}function OM(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...E(n)})}function DM(e,t,n){return new e({type:"enum",entries:t,...E(n)})}function MM(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(n)})}function Mf(e,t){return new e({type:"file",...E(t)})}function jM(e,t){return new e({type:"transform",transform:t})}function zM(e,t){return new e({type:"optional",innerType:t})}function LM(e,t){return new e({type:"nullable",innerType:t})}function UM(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Fd(n)}})}function FM(e,t,n){return new e({type:"nonoptional",innerType:t,...E(n)})}function BM(e,t){return new e({type:"success",innerType:t})}function VM(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function GM(e,t,n){return new e({type:"pipe",in:t,out:n})}function ZM(e,t){return new e({type:"readonly",innerType:t})}function WM(e,t,n){return new e({type:"template_literal",parts:t,...E(n)})}function HM(e,t){return new e({type:"lazy",getter:t})}function YM(e,t){return new e({type:"promise",innerType:t})}function jf(e,t,n){let i=E(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function zf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function Lf(e,t){let n=ox(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Yn(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Yn(o))}},e(i.value,i)),t);return n}function ox(e,t){let n=new Q({check:"custom",...E(t)});return n._zod.check=e,n}function Uf(e){let t=new Q({check:"describe"});return t._zod.onattach=[n=>{let i=Te.get(n)??{};Te.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function Ff(e){let t=new Q({check:"meta"});return t._zod.onattach=[n=>{let i=Te.get(n)??{};Te.add(n,{...i,...e})}],t._zod.check=()=>{},t}function Bf(e,t){let n=E(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let o=new Set(i),a=new Set(r),c=e.Codec??ko,u=e.Boolean??Po,l=e.String??un,d=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new c({type:"pipe",in:d,out:p,transform:((v,x)=>{let G=v;return n.case!=="sensitive"&&(G=G.toLowerCase()),o.has(G)?!0:a.has(G)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:x.value,inst:g,continue:!1}),{})}),reverseTransform:((v,x)=>v===!0?i[0]||"true":r[0]||"false"),error:n.error});return g}function pi(e,t,n,i={}){let r=E(i),o={...E(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:c=>n.test(c),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Pr(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Te,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Z(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let g=a.schema,v=t.processors[r.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);v(e,t,g,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Z(p,t,d),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&Ue(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function wr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let c=e.metadataRegistry.get(a[0])?.id;if(c){let u=i.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,a[0])}}let r=a=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,g=e.external.uri??(x=>x);if(p)return{ref:g(p)};let v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(a[1]===n)return{ref:"#"};let l=`#/${c}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:l+d}},o=a=>{if(a[1].schema.$ref)return;let c=a[1],{ref:u,defId:l}=r(a);c.def={...c.schema},l&&(c.defId=l);let d=c.schema;for(let p in d)delete d[p];d.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
163
163
 
164
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let c=a[1];if(t===a[0]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(c.cycle){o(a);continue}if(c.count>1&&e.reused==="ref"){o(a);continue}}}function kr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},p=u.ref;if(u.ref=null,p){i(p);let v=e.seen.get(p),x=v.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(x)):Object.assign(l,x),Object.assign(l,d),c._zod.parent===p)for(let j in l)j==="$ref"||j==="allOf"||j in d||delete l[j];if(x.$ref&&v.def)for(let j in l)j==="$ref"||j==="allOf"||j in v.def&&JSON.stringify(l[j])===JSON.stringify(v.def[j])&&delete l[j]}let g=c._zod.parent;if(g&&g!==p){i(g);let v=e.seen.get(g);if(v?.schema.$ref&&(l.$ref=v.schema.$ref,v.def))for(let x in l)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(l[x])===JSON.stringify(v.def[x])&&delete l[x]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())i(c[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(c)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let c=JSON.parse(JSON.stringify(r));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:fi(t,"input",e.processors),output:fi(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Ue(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Ue(i.element,n);if(i.type==="set")return Ue(i.valueType,n);if(i.type==="lazy")return Ue(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Ue(i.innerType,n);if(i.type==="intersection")return Ue(i.left,n)||Ue(i.right,n);if(i.type==="record"||i.type==="map")return Ue(i.keyType,n)||Ue(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ue(i.in,n)||Ue(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Ue(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Ue(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Ue(r,n))return!0;return!!(i.rest&&Ue(i.rest,n))}return!1}var Vf=(e,t={})=>n=>{let i=Pr({...n,processors:t});return Z(e,i),wr(i,e),kr(i,e)},fi=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=Pr({...r??{},target:o,io:t,processors:n});return Z(e,a),wr(a,e),kr(a,e)};var YM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Gf=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),c&&(r.format=YM[c]??c,r.format===""&&delete r.format,c==="time"&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Zf=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?r.type="integer":r.type="number";let p=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";p?v?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof o=="number"&&(r.minimum=o),g?v?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l:typeof a=="number"&&(r.maximum=a),typeof u=="number"&&(r.multipleOf=u)},Wf=(e,t,n,i)=>{n.type="boolean"},Hf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Yf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Kf=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},qf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Xf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Jf=(e,t,n,i)=>{n.not={}},Qf=(e,t,n,i)=>{},eg=(e,t,n,i)=>{},tg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},rg=(e,t,n,i)=>{let r=e._zod.def,o=_o(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},ng=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},ig=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},og=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},ag=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(o.minLength=a),c!==void 0&&(o.maxLength=c),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(r,o)},sg=(e,t,n,i)=>{n.type="boolean"},cg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ug=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},lg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},dg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},mg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},pg=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof c=="number"&&(r.maxItems=c),r.type="array",r.items=Z(o.element,t,{...i,path:[...i.path,"items"]})},fg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let l in a)r.properties[l]=Z(a[l],t,{...i,path:[...i.path,"properties",l]});let c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{let d=o.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(r.required=Array.from(u)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Z(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},$c=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((c,u)=>Z(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=a:n.anyOf=a},gg=(e,t,n,i)=>{let r=e._zod.def,o=Z(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=Z(r.right,t,{...i,path:[...i.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(o)?o.allOf:[o],...c(a)?a.allOf:[a]];n.allOf=u},hg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,v)=>Z(g,t,{...i,path:[...i.path,a,v]})),l=o.rest?Z(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=u,l&&(r.items=l)):t.target==="openapi-3.0"?(r.items={anyOf:u},l&&r.items.anyOf.push(l),r.minItems=u.length,l||(r.maxItems=u.length)):(r.items=u,l&&(r.additionalItems=l));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},vg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,u=a._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let d=Z(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of u)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Z(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Z(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},bg=(e,t,n,i)=>{let r=e._zod.def,o=Z(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},yg=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Sg=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},_g=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Eg=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},xg=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;Z(a,t,i);let c=t.seen.get(e);c.ref=a},Ag=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Ig=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Rc=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Tg=(e,t,n,i)=>{let r=e._zod.innerType;Z(r,t,i);let o=t.seen.get(e);o.ref=r},Tc={string:Gf,number:Zf,boolean:Wf,bigint:Hf,symbol:Yf,null:Kf,undefined:qf,void:Xf,never:Jf,any:Qf,unknown:eg,date:tg,enum:rg,literal:ng,nan:ig,template_literal:og,file:ag,success:sg,custom:cg,function:ug,transform:lg,map:dg,set:mg,array:pg,object:fg,union:$c,intersection:gg,tuple:hg,record:vg,nullable:bg,nonoptional:yg,default:Sg,prefault:_g,catch:Eg,pipe:xg,readonly:Ag,promise:Ig,optional:Rc,lazy:Tg};function Cc(e,t){if("_idmap"in e){let i=e,r=Pr({...t,processors:Tc}),o={};for(let u of i._idmap.entries()){let[l,d]=u;Z(d,r)}let a={},c={registry:i,uri:t?.uri,defs:o};r.external=c;for(let u of i._idmap.entries()){let[l,d]=u;wr(r,d),a[l]=kr(r,d)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=Pr({...t,processors:Tc});return Z(e,n),wr(n,e),kr(n,e)}var Nc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Pr({processors:Tc,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Z(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),wr(this.ctx,t);let i=kr(this.ctx,t),{"~standard":r,...o}=i;return o}};var ox={};var Lo={};wt(Lo,{ZodAny:()=>qg,ZodArray:()=>eh,ZodBase64:()=>Xc,ZodBase64URL:()=>Jc,ZodBigInt:()=>Ei,ZodBigIntFormat:()=>tu,ZodBoolean:()=>_i,ZodCIDRv4:()=>Kc,ZodCIDRv6:()=>qc,ZodCUID:()=>Bc,ZodCUID2:()=>Vc,ZodCatch:()=>Eh,ZodCodec:()=>Xo,ZodCustom:()=>Jo,ZodCustomStringFormat:()=>yi,ZodDate:()=>Wo,ZodDefault:()=>hh,ZodDiscriminatedUnion:()=>rh,ZodE164:()=>Qc,ZodEmail:()=>Lc,ZodEmoji:()=>Uc,ZodEnum:()=>vi,ZodExactOptional:()=>ph,ZodFile:()=>dh,ZodFunction:()=>wh,ZodGUID:()=>Fo,ZodIPv4:()=>Hc,ZodIPv6:()=>Yc,ZodIntersection:()=>nh,ZodJWT:()=>eu,ZodKSUID:()=>Wc,ZodLazy:()=>Ch,ZodLiteral:()=>lh,ZodMAC:()=>Vg,ZodMap:()=>ch,ZodNaN:()=>Ah,ZodNanoID:()=>Fc,ZodNever:()=>Jg,ZodNonOptional:()=>su,ZodNull:()=>Yg,ZodNullable:()=>gh,ZodNumber:()=>Si,ZodNumberFormat:()=>fn,ZodObject:()=>Yo,ZodOptional:()=>au,ZodPipe:()=>qo,ZodPrefault:()=>bh,ZodPreprocess:()=>Ih,ZodPromise:()=>Ph,ZodReadonly:()=>Th,ZodRecord:()=>hi,ZodSet:()=>uh,ZodString:()=>bi,ZodStringFormat:()=>X,ZodSuccess:()=>_h,ZodSymbol:()=>Wg,ZodTemplateLiteral:()=>Rh,ZodTransform:()=>mh,ZodTuple:()=>oh,ZodType:()=>k,ZodULID:()=>Gc,ZodURL:()=>Zo,ZodUUID:()=>jt,ZodUndefined:()=>Hg,ZodUnion:()=>Ko,ZodUnknown:()=>Xg,ZodVoid:()=>Qg,ZodXID:()=>Zc,ZodXor:()=>th,_ZodString:()=>zc,_default:()=>vh,_function:()=>fA,any:()=>Zx,array:()=>Ho,base64:()=>Rx,base64url:()=>Cx,bigint:()=>Ux,boolean:()=>Zg,catch:()=>xh,check:()=>gA,cidrv4:()=>Tx,cidrv6:()=>$x,codec:()=>lA,cuid:()=>bx,cuid2:()=>yx,custom:()=>hA,date:()=>Hx,describe:()=>vA,discriminatedUnion:()=>Qx,e164:()=>Nx,email:()=>cx,emoji:()=>hx,enum:()=>iu,exactOptional:()=>fh,file:()=>aA,float32:()=>Mx,float64:()=>jx,function:()=>fA,guid:()=>ux,hash:()=>Dx,hex:()=>Ox,hostname:()=>kx,httpUrl:()=>gx,instanceof:()=>yA,int:()=>Mc,int32:()=>zx,int64:()=>Fx,intersection:()=>ih,invertCodec:()=>dA,ipv4:()=>xx,ipv6:()=>Ix,json:()=>_A,jwt:()=>Px,keyof:()=>Yx,ksuid:()=>Ex,lazy:()=>Nh,literal:()=>oA,looseObject:()=>Xx,looseRecord:()=>tA,mac:()=>Ax,map:()=>rA,meta:()=>bA,nan:()=>uA,nanoid:()=>vx,nativeEnum:()=>iA,never:()=>ru,nonoptional:()=>Sh,null:()=>Kg,nullable:()=>Vo,nullish:()=>sA,number:()=>Gg,object:()=>Kx,optional:()=>Bo,partialRecord:()=>eA,pipe:()=>jc,prefault:()=>yh,preprocess:()=>EA,promise:()=>pA,readonly:()=>$h,record:()=>sh,refine:()=>kh,set:()=>nA,strictObject:()=>qx,string:()=>Uo,stringFormat:()=>wx,stringbool:()=>SA,success:()=>cA,superRefine:()=>Oh,symbol:()=>Vx,templateLiteral:()=>mA,transform:()=>ou,tuple:()=>ah,uint32:()=>Lx,uint64:()=>Bx,ulid:()=>Sx,undefined:()=>Gx,union:()=>nu,unknown:()=>pn,url:()=>fx,uuid:()=>lx,uuidv4:()=>dx,uuidv6:()=>mx,uuidv7:()=>px,void:()=>Wx,xid:()=>_x,xor:()=>Jx});var Pc={};wt(Pc,{endsWith:()=>ai,gt:()=>Dt,gte:()=>Le,includes:()=>ii,length:()=>mn,lowercase:()=>ri,lt:()=>Ot,lte:()=>it,maxLength:()=>dn,maxSize:()=>Nr,mime:()=>si,minLength:()=>ir,minSize:()=>Mt,multipleOf:()=>Cr,negative:()=>Ec,nonnegative:()=>Ac,nonpositive:()=>xc,normalize:()=>ci,overwrite:()=>It,positive:()=>_c,property:()=>Ic,regex:()=>ti,size:()=>ln,slugify:()=>mi,startsWith:()=>oi,toLowerCase:()=>li,toUpperCase:()=>di,trim:()=>ui,uppercase:()=>ni});var gi={};wt(gi,{ZodISODate:()=>kc,ZodISODateTime:()=>wc,ZodISODuration:()=>Dc,ZodISOTime:()=>Oc,date:()=>Rg,datetime:()=>$g,duration:()=>Ng,time:()=>Cg});var wc=f("ZodISODateTime",(e,t)=>{np.init(e,t),X.init(e,t)});function $g(e){return cf(wc,e)}var kc=f("ZodISODate",(e,t)=>{ip.init(e,t),X.init(e,t)});function Rg(e){return uf(kc,e)}var Oc=f("ZodISOTime",(e,t)=>{op.init(e,t),X.init(e,t)});function Cg(e){return lf(Oc,e)}var Dc=f("ZodISODuration",(e,t)=>{ap.init(e,t),X.init(e,t)});function Ng(e){return df(Dc,e)}var ax=(e,t)=>{To.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ro(e,n)},flatten:{value:n=>$o(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Wn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Wn,2)}},isEmpty:{get(){return e.issues.length===0}}})},qM=f("ZodError",ax),He=f("ZodError",ax,{Parent:Error});var Pg=Kn(He),wg=qn(He),kg=Xn(He),Og=Jn(He),Dg=Cs(He),Mg=Ns(He),jg=Ps(He),zg=ws(He),Lg=ks(He),Ug=Os(He),Fg=Ds(He),Bg=Ms(He);var sx=new WeakMap;function Go(e,t,n){let i=Object.getPrototypeOf(e),r=sx.get(i);if(r||(r=new Set,sx.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let c=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var k=f("ZodType",(e,t)=>(w.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:fi(e,"input"),output:fi(e,"output")}}),e.toJSONSchema=Vf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Pg(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>kg(e,n,i),e.parseAsync=async(n,i)=>wg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Og(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Dg(e,n,i),e.decode=(n,i)=>Mg(e,n,i),e.encodeAsync=async(n,i)=>jg(e,n,i),e.decodeAsync=async(n,i)=>zg(e,n,i),e.safeEncode=(n,i)=>Lg(e,n,i),e.safeDecode=(n,i)=>Ug(e,n,i),e.safeEncodeAsync=async(n,i)=>Fg(e,n,i),e.safeDecodeAsync=async(n,i)=>Bg(e,n,i),Go(e,"ZodType",{check(...n){let i=this.def;return this.clone(_.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return je(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(kh(n,i))},superRefine(n,i){return this.check(Oh(n,i))},overwrite(n){return this.check(It(n))},optional(){return Bo(this)},exactOptional(){return fh(this)},nullable(){return Vo(this)},nullish(){return Bo(Vo(this))},nonoptional(n){return Sh(this,n)},array(){return Ho(this)},or(n){return nu([this,n])},and(n){return ih(this,n)},transform(n){return jc(this,ou(n))},default(n){return vh(this,n)},prefault(n){return yh(this,n)},catch(n){return xh(this,n)},pipe(n){return jc(this,n)},readonly(){return $h(this)},describe(n){let i=this.clone();return Te.add(i,{description:n}),i},meta(...n){if(n.length===0)return Te.get(this);let i=this.clone();return Te.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Te.get(e)?.description},configurable:!0}),e)),zc=f("_ZodString",(e,t)=>{un.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Gf(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Go(e,"_ZodString",{regex(...i){return this.check(ti(...i))},includes(...i){return this.check(ii(...i))},startsWith(...i){return this.check(oi(...i))},endsWith(...i){return this.check(ai(...i))},min(...i){return this.check(ir(...i))},max(...i){return this.check(dn(...i))},length(...i){return this.check(mn(...i))},nonempty(...i){return this.check(ir(1,...i))},lowercase(i){return this.check(ri(i))},uppercase(i){return this.check(ni(i))},trim(){return this.check(ui())},normalize(...i){return this.check(ci(...i))},toLowerCase(){return this.check(li())},toUpperCase(){return this.check(di())},slugify(){return this.check(mi())}})}),bi=f("ZodString",(e,t)=>{un.init(e,t),zc.init(e,t),e.email=n=>e.check(tc(Lc,n)),e.url=n=>e.check(zo(Zo,n)),e.jwt=n=>e.check(Sc(eu,n)),e.emoji=n=>e.check(ac(Uc,n)),e.guid=n=>e.check(jo(Fo,n)),e.uuid=n=>e.check(rc(jt,n)),e.uuidv4=n=>e.check(nc(jt,n)),e.uuidv6=n=>e.check(ic(jt,n)),e.uuidv7=n=>e.check(oc(jt,n)),e.nanoid=n=>e.check(sc(Fc,n)),e.guid=n=>e.check(jo(Fo,n)),e.cuid=n=>e.check(cc(Bc,n)),e.cuid2=n=>e.check(uc(Vc,n)),e.ulid=n=>e.check(lc(Gc,n)),e.base64=n=>e.check(vc(Xc,n)),e.base64url=n=>e.check(bc(Jc,n)),e.xid=n=>e.check(dc(Zc,n)),e.ksuid=n=>e.check(mc(Wc,n)),e.ipv4=n=>e.check(pc(Hc,n)),e.ipv6=n=>e.check(fc(Yc,n)),e.cidrv4=n=>e.check(gc(Kc,n)),e.cidrv6=n=>e.check(hc(qc,n)),e.e164=n=>e.check(yc(Qc,n)),e.datetime=n=>e.check($g(n)),e.date=n=>e.check(Rg(n)),e.time=n=>e.check(Cg(n)),e.duration=n=>e.check(Ng(n))});function Uo(e){return nf(bi,e)}var X=f("ZodStringFormat",(e,t)=>{q.init(e,t),zc.init(e,t)}),Lc=f("ZodEmail",(e,t)=>{Ym.init(e,t),X.init(e,t)});function cx(e){return tc(Lc,e)}var Fo=f("ZodGUID",(e,t)=>{Wm.init(e,t),X.init(e,t)});function ux(e){return jo(Fo,e)}var jt=f("ZodUUID",(e,t)=>{Hm.init(e,t),X.init(e,t)});function lx(e){return rc(jt,e)}function dx(e){return nc(jt,e)}function mx(e){return ic(jt,e)}function px(e){return oc(jt,e)}var Zo=f("ZodURL",(e,t)=>{Km.init(e,t),X.init(e,t)});function fx(e){return zo(Zo,e)}function gx(e){return zo(Zo,{protocol:nt.httpProtocol,hostname:nt.domain,..._.normalizeParams(e)})}var Uc=f("ZodEmoji",(e,t)=>{qm.init(e,t),X.init(e,t)});function hx(e){return ac(Uc,e)}var Fc=f("ZodNanoID",(e,t)=>{Xm.init(e,t),X.init(e,t)});function vx(e){return sc(Fc,e)}var Bc=f("ZodCUID",(e,t)=>{Jm.init(e,t),X.init(e,t)});function bx(e){return cc(Bc,e)}var Vc=f("ZodCUID2",(e,t)=>{Qm.init(e,t),X.init(e,t)});function yx(e){return uc(Vc,e)}var Gc=f("ZodULID",(e,t)=>{ep.init(e,t),X.init(e,t)});function Sx(e){return lc(Gc,e)}var Zc=f("ZodXID",(e,t)=>{tp.init(e,t),X.init(e,t)});function _x(e){return dc(Zc,e)}var Wc=f("ZodKSUID",(e,t)=>{rp.init(e,t),X.init(e,t)});function Ex(e){return mc(Wc,e)}var Hc=f("ZodIPv4",(e,t)=>{sp.init(e,t),X.init(e,t)});function xx(e){return pc(Hc,e)}var Vg=f("ZodMAC",(e,t)=>{up.init(e,t),X.init(e,t)});function Ax(e){return af(Vg,e)}var Yc=f("ZodIPv6",(e,t)=>{cp.init(e,t),X.init(e,t)});function Ix(e){return fc(Yc,e)}var Kc=f("ZodCIDRv4",(e,t)=>{lp.init(e,t),X.init(e,t)});function Tx(e){return gc(Kc,e)}var qc=f("ZodCIDRv6",(e,t)=>{dp.init(e,t),X.init(e,t)});function $x(e){return hc(qc,e)}var Xc=f("ZodBase64",(e,t)=>{pp.init(e,t),X.init(e,t)});function Rx(e){return vc(Xc,e)}var Jc=f("ZodBase64URL",(e,t)=>{fp.init(e,t),X.init(e,t)});function Cx(e){return bc(Jc,e)}var Qc=f("ZodE164",(e,t)=>{gp.init(e,t),X.init(e,t)});function Nx(e){return yc(Qc,e)}var eu=f("ZodJWT",(e,t)=>{hp.init(e,t),X.init(e,t)});function Px(e){return Sc(eu,e)}var yi=f("ZodCustomStringFormat",(e,t)=>{vp.init(e,t),X.init(e,t)});function wx(e,t,n={}){return pi(yi,e,t,n)}function kx(e){return pi(yi,"hostname",nt.hostname,e)}function Ox(e){return pi(yi,"hex",nt.hex,e)}function Dx(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=nt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return pi(yi,i,r,t)}var Si=f("ZodNumber",(e,t)=>{Zs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Zf(e,i,r,o),Go(e,"ZodNumber",{gt(i,r){return this.check(Dt(i,r))},gte(i,r){return this.check(Le(i,r))},min(i,r){return this.check(Le(i,r))},lt(i,r){return this.check(Ot(i,r))},lte(i,r){return this.check(it(i,r))},max(i,r){return this.check(it(i,r))},int(i){return this.check(Mc(i))},safe(i){return this.check(Mc(i))},positive(i){return this.check(Dt(0,i))},nonnegative(i){return this.check(Le(0,i))},negative(i){return this.check(Ot(0,i))},nonpositive(i){return this.check(it(0,i))},multipleOf(i,r){return this.check(Cr(i,r))},step(i,r){return this.check(Cr(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Gg(e){return mf(Si,e)}var fn=f("ZodNumberFormat",(e,t)=>{bp.init(e,t),Si.init(e,t)});function Mc(e){return ff(fn,e)}function Mx(e){return gf(fn,e)}function jx(e){return hf(fn,e)}function zx(e){return vf(fn,e)}function Lx(e){return bf(fn,e)}var _i=f("ZodBoolean",(e,t)=>{wo.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wf(e,n,i,r)});function Zg(e){return yf(_i,e)}var Ei=f("ZodBigInt",(e,t)=>{Ws.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Hf(e,i,r,o),e.gte=(i,r)=>e.check(Le(i,r)),e.min=(i,r)=>e.check(Le(i,r)),e.gt=(i,r)=>e.check(Dt(i,r)),e.gte=(i,r)=>e.check(Le(i,r)),e.min=(i,r)=>e.check(Le(i,r)),e.lt=(i,r)=>e.check(Ot(i,r)),e.lte=(i,r)=>e.check(it(i,r)),e.max=(i,r)=>e.check(it(i,r)),e.positive=i=>e.check(Dt(BigInt(0),i)),e.negative=i=>e.check(Ot(BigInt(0),i)),e.nonpositive=i=>e.check(it(BigInt(0),i)),e.nonnegative=i=>e.check(Le(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(Cr(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Ux(e){return _f(Ei,e)}var tu=f("ZodBigIntFormat",(e,t)=>{yp.init(e,t),Ei.init(e,t)});function Fx(e){return xf(tu,e)}function Bx(e){return Af(tu,e)}var Wg=f("ZodSymbol",(e,t)=>{Sp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yf(e,n,i,r)});function Vx(e){return If(Wg,e)}var Hg=f("ZodUndefined",(e,t)=>{_p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qf(e,n,i,r)});function Gx(e){return Tf(Hg,e)}var Yg=f("ZodNull",(e,t)=>{Ep.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kf(e,n,i,r)});function Kg(e){return $f(Yg,e)}var qg=f("ZodAny",(e,t)=>{xp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qf(e,n,i,r)});function Zx(){return Rf(qg)}var Xg=f("ZodUnknown",(e,t)=>{Ap.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r)});function pn(){return Cf(Xg)}var Jg=f("ZodNever",(e,t)=>{Ip.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jf(e,n,i,r)});function ru(e){return Nf(Jg,e)}var Qg=f("ZodVoid",(e,t)=>{Tp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xf(e,n,i,r)});function Wx(e){return Pf(Qg,e)}var Wo=f("ZodDate",(e,t)=>{$p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>tg(e,i,r,o),e.min=(i,r)=>e.check(Le(i,r)),e.max=(i,r)=>e.check(it(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Hx(e){return wf(Wo,e)}var eh=f("ZodArray",(e,t)=>{Rp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pg(e,n,i,r),e.element=t.element,Go(e,"ZodArray",{min(n,i){return this.check(ir(n,i))},nonempty(n){return this.check(ir(1,n))},max(n,i){return this.check(dn(n,i))},length(n,i){return this.check(mn(n,i))},unwrap(){return this.element}})});function Ho(e,t){return Df(eh,e,t)}function Yx(e){let t=e._zod.def.shape;return iu(Object.keys(t))}var Yo=f("ZodObject",(e,t)=>{Cp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fg(e,n,i,r),_.defineLazy(e,"shape",()=>t.shape),Go(e,"ZodObject",{keyof(){return iu(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:pn()})},loose(){return this.clone({...this._zod.def,catchall:pn()})},strict(){return this.clone({...this._zod.def,catchall:ru()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return _.extend(this,n)},safeExtend(n){return _.safeExtend(this,n)},merge(n){return _.merge(this,n)},pick(n){return _.pick(this,n)},omit(n){return _.omit(this,n)},partial(...n){return _.partial(au,this,n[0])},required(...n){return _.required(su,this,n[0])}})});function Kx(e,t){let n={type:"object",shape:e??{},..._.normalizeParams(t)};return new Yo(n)}function qx(e,t){return new Yo({type:"object",shape:e,catchall:ru(),..._.normalizeParams(t)})}function Xx(e,t){return new Yo({type:"object",shape:e,catchall:pn(),..._.normalizeParams(t)})}var Ko=f("ZodUnion",(e,t)=>{ko.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$c(e,n,i,r),e.options=t.options});function nu(e,t){return new Ko({type:"union",options:e,..._.normalizeParams(t)})}var th=f("ZodXor",(e,t)=>{Ko.init(e,t),Np.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$c(e,n,i,r),e.options=t.options});function Jx(e,t){return new th({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var rh=f("ZodDiscriminatedUnion",(e,t)=>{Ko.init(e,t),Pp.init(e,t)});function Qx(e,t,n){return new rh({type:"union",options:t,discriminator:e,..._.normalizeParams(n)})}var nh=f("ZodIntersection",(e,t)=>{wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gg(e,n,i,r)});function ih(e,t){return new nh({type:"intersection",left:e,right:t})}var oh=f("ZodTuple",(e,t)=>{Hs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hg(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function ah(e,t,n){let i=t instanceof w,r=i?n:t,o=i?t:null;return new oh({type:"tuple",items:e,rest:o,..._.normalizeParams(r)})}var hi=f("ZodRecord",(e,t)=>{kp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vg(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function sh(e,t,n){return!t||!t._zod?new hi({type:"record",keyType:Uo(),valueType:e,..._.normalizeParams(t)}):new hi({type:"record",keyType:e,valueType:t,..._.normalizeParams(n)})}function eA(e,t,n){let i=je(e);return i._zod.values=void 0,new hi({type:"record",keyType:i,valueType:t,..._.normalizeParams(n)})}function tA(e,t,n){return new hi({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(n)})}var ch=f("ZodMap",(e,t)=>{Op.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dg(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Mt(...n)),e.nonempty=n=>e.check(Mt(1,n)),e.max=(...n)=>e.check(Nr(...n)),e.size=(...n)=>e.check(ln(...n))});function rA(e,t,n){return new ch({type:"map",keyType:e,valueType:t,..._.normalizeParams(n)})}var uh=f("ZodSet",(e,t)=>{Dp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mg(e,n,i,r),e.min=(...n)=>e.check(Mt(...n)),e.nonempty=n=>e.check(Mt(1,n)),e.max=(...n)=>e.check(Nr(...n)),e.size=(...n)=>e.check(ln(...n))});function nA(e,t){return new uh({type:"set",valueType:e,..._.normalizeParams(t)})}var vi=f("ZodEnum",(e,t)=>{Mp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>rg(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new vi({...t,checks:[],..._.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new vi({...t,checks:[],..._.normalizeParams(r),entries:o})}});function iu(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new vi({type:"enum",entries:n,..._.normalizeParams(t)})}function iA(e,t){return new vi({type:"enum",entries:e,..._.normalizeParams(t)})}var lh=f("ZodLiteral",(e,t)=>{jp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ng(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function oA(e,t){return new lh({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var dh=f("ZodFile",(e,t)=>{zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ag(e,n,i,r),e.min=(n,i)=>e.check(Mt(n,i)),e.max=(n,i)=>e.check(Nr(n,i)),e.mime=(n,i)=>e.check(si(Array.isArray(n)?n:[n],i))});function aA(e){return Mf(dh,e)}var mh=f("ZodTransform",(e,t)=>{Lp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lg(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ar(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(_.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(_.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function ou(e){return new mh({type:"transform",transform:e})}var au=f("ZodOptional",(e,t)=>{Ys.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Bo(e){return new au({type:"optional",innerType:e})}var ph=f("ZodExactOptional",(e,t)=>{Up.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function fh(e){return new ph({type:"optional",innerType:e})}var gh=f("ZodNullable",(e,t)=>{Fp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Vo(e){return new gh({type:"nullable",innerType:e})}function sA(e){return Bo(Vo(e))}var hh=f("ZodDefault",(e,t)=>{Bp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Sg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function vh(e,t){return new hh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var bh=f("ZodPrefault",(e,t)=>{Vp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_g(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function yh(e,t){return new bh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var su=f("ZodNonOptional",(e,t)=>{Gp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Sh(e,t){return new su({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var _h=f("ZodSuccess",(e,t)=>{Zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function cA(e){return new _h({type:"success",innerType:e})}var Eh=f("ZodCatch",(e,t)=>{Wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Eg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xh(e,t){return new Eh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Ah=f("ZodNaN",(e,t)=>{Hp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ig(e,n,i,r)});function uA(e){return Of(Ah,e)}var qo=f("ZodPipe",(e,t)=>{Ks.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xg(e,n,i,r),e.in=t.in,e.out=t.out});function jc(e,t){return new qo({type:"pipe",in:e,out:t})}var Xo=f("ZodCodec",(e,t)=>{qo.init(e,t),Oo.init(e,t)});function lA(e,t,n){return new Xo({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function dA(e){let t=e._zod.def;return new Xo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Ih=f("ZodPreprocess",(e,t)=>{qo.init(e,t),Yp.init(e,t)}),Th=f("ZodReadonly",(e,t)=>{Kp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ag(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function $h(e){return new Th({type:"readonly",innerType:e})}var Rh=f("ZodTemplateLiteral",(e,t)=>{qp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>og(e,n,i,r)});function mA(e,t){return new Rh({type:"template_literal",parts:e,..._.normalizeParams(t)})}var Ch=f("ZodLazy",(e,t)=>{Qp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Nh(e){return new Ch({type:"lazy",getter:e})}var Ph=f("ZodPromise",(e,t)=>{Jp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ig(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function pA(e){return new Ph({type:"promise",innerType:e})}var wh=f("ZodFunction",(e,t)=>{Xp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ug(e,n,i,r)});function fA(e){return new wh({type:"function",input:Array.isArray(e?.input)?ah(e?.input):e?.input??Ho(pn()),output:e?.output??pn()})}var Jo=f("ZodCustom",(e,t)=>{ef.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>cg(e,n,i,r)});function gA(e){let t=new Q({check:"custom"});return t._zod.check=e,t}function hA(e,t){return jf(Jo,e??(()=>!0),t)}function kh(e,t={}){return zf(Jo,e,t)}function Oh(e,t){return Lf(e,t)}var vA=Uf,bA=Ff;function yA(e,t={}){let n=new Jo({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,..._.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var SA=(...e)=>Bf({Codec:Xo,Boolean:_i,String:bi},...e);function _A(e){let t=Nh(()=>nu([Uo(e),Gg(),Zg(),Kg(),Ho(t),sh(Uo(),t)]));return t}function EA(e,t){return new Ih({type:"pipe",in:ou(e),out:t})}var JM={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function QM(e){le({customError:e})}function ej(){return le().customError}var Dh;Dh||(Dh={});var A={...Lo,...Pc,iso:gi},tj=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function rj(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function nj(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function xA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return A.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return A.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=nj(r,t),a=we(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return A.null();if(r.length===0)return A.never();if(r.length===1)return A.literal(r[0]);if(r.every(a=>typeof a=="string"))return A.enum(r);let o=r.map(a=>A.literal(a));return o.length<2?o[0]:A.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return A.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return xA(a,t)});return r.length===0?A.never():r.length===1?r[0]:A.union(r)}if(!n)return A.any();let i;switch(n){case"string":{let r=A.string();if(e.format){let o=e.format;o==="email"?r=r.check(A.email()):o==="uri"||o==="uri-reference"?r=r.check(A.url()):o==="uuid"||o==="guid"?r=r.check(A.uuid()):o==="date-time"?r=r.check(A.iso.datetime()):o==="date"?r=r.check(A.iso.date()):o==="time"?r=r.check(A.iso.time()):o==="duration"?r=r.check(A.iso.duration()):o==="ipv4"?r=r.check(A.ipv4()):o==="ipv6"?r=r.check(A.ipv6()):o==="mac"?r=r.check(A.mac()):o==="cidr"?r=r.check(A.cidrv4()):o==="cidr-v6"?r=r.check(A.cidrv6()):o==="base64"?r=r.check(A.base64()):o==="base64url"?r=r.check(A.base64url()):o==="e164"?r=r.check(A.e164()):o==="jwt"?r=r.check(A.jwt()):o==="emoji"?r=r.check(A.emoji()):o==="nanoid"?r=r.check(A.nanoid()):o==="cuid"?r=r.check(A.cuid()):o==="cuid2"?r=r.check(A.cuid2()):o==="ulid"?r=r.check(A.ulid()):o==="xid"?r=r.check(A.xid()):o==="ksuid"&&(r=r.check(A.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?A.number().int():A.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=A.boolean();break}case"null":{i=A.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let d=we(l,t);r[u]=a.has(u)?d:d.optional()}if(e.propertyNames){let u=we(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?we(e.additionalProperties,t):A.any();if(Object.keys(r).length===0){i=A.record(u,l);break}let d=A.object(r).passthrough(),p=A.looseRecord(u,l);i=A.intersection(d,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let v=we(u[g],t),x=A.string().regex(new RegExp(g));d.push(A.looseRecord(x,v))}let p=[];if(Object.keys(r).length>0&&p.push(A.object(r).passthrough()),p.push(...d),p.length===0)i=A.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=A.intersection(p[0],p[1]);for(let v=2;v<p.length;v++)g=A.intersection(g,p[v]);i=g}break}let c=A.object(r);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(we(e.additionalProperties,t)):i=c.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(u=>we(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?we(o,t):void 0;c?i=A.tuple(a).rest(c):i=A.tuple(a),typeof e.minItems=="number"&&(i=i.check(A.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(A.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>we(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?we(e.additionalItems,t):void 0;c?i=A.tuple(a).rest(c):i=A.tuple(a),typeof e.minItems=="number"&&(i=i.check(A.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(A.maxLength(e.maxItems)))}else if(o!==void 0){let a=we(o,t),c=A.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=A.array(A.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function we(e,t){if(typeof e=="boolean")return e?A.any():A.never();let n=xA(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>we(l,t)),u=A.union(c);n=i?A.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>we(l,t)),u=A.xor(c);n=i?A.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:A.any();else{let c=i?n:we(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=A.intersection(c,we(e.allOf[l],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=A.nullable(n)),e.readOnly===!0&&(n=A.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of o)c in e&&(r[c]=e[c]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let c of a)c in e&&(r[c]=e[c]);for(let c of Object.keys(e))tj.has(c)||(r[c]=e[c]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function AA(e,t){if(typeof e=="boolean")return e?A.any():A.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=rj(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Te};return we(n,o)}var Mh={};wt(Mh,{bigint:()=>sj,boolean:()=>aj,date:()=>cj,number:()=>oj,string:()=>ij});function ij(e){return of(bi,e)}function oj(e){return pf(Si,e)}function aj(e){return Sf(_i,e)}function sj(e){return Ef(Ei,e)}function cj(e){return kf(Wo,e)}le(qs());var uj=Object.defineProperty,lj=(e,t)=>uj(e,"name",{value:t,configurable:!0});var IA=/^[A-Za-z][A-Za-z0-9]*$/,TA=128;var jh=s.object({legacyAnchor:s.string().min(1).max(TA).regex(IA,"legacyAnchor must be alphanumeric and start with a letter"),legacyOwnerId:s.string().min(1).max(512).optional(),legacySgDescription:s.string().min(1).max(255).optional()}).strict(),dj=s.record(s.string().min(1),s.record(s.string().min(1),jh)),mj=s.record(s.string().min(1),s.record(s.string().min(1),s.record(s.string().min(1),jh)));function $A(e,t){if(e===void 0)return;let n={};for(let[i,r]of Object.entries(e)){let o=r[t];o===void 0||Object.keys(o).length===0||(n[i]=o)}return Object.keys(n).length===0?void 0:n}lj($A,"projectCapacityIdentityToTarget");var pj=Object.defineProperty,fj=(e,t)=>pj(e,"name",{value:t,configurable:!0});function RA(e){let t=new Map;for(let n of e){let i=nn(n);if(i==="")return{kind:"empty-construct-key",name:n};let r=t.get(i);if(r!==void 0)return{kind:"duplicate-construct-key",name:n,existingName:r,constructKey:i};t.set(i,n)}return null}fj(RA,"findAccountNameCollision");var gj=Object.defineProperty,Qo=(e,t)=>gj(e,"name",{value:t,configurable:!0}),xi="us-east-2";var mt=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA",optIn:!1},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA",optIn:!1},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA",optIn:!1},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland",optIn:!1},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany",optIn:!1},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore",optIn:!1},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan",optIn:!1},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia",optIn:!1},{code:"us-west-1",name:"US West",city:"N. California",country:"USA",optIn:!1},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada",optIn:!1},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa",optIn:!0},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"Hong Kong",optIn:!0},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea",optIn:!1},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan",optIn:!1},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India",optIn:!1},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India",optIn:!0},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia",optIn:!0},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia",optIn:!0},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland",optIn:!0},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden",optIn:!1},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy",optIn:!0},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain",optIn:!0},{code:"eu-west-2",name:"EU West",city:"London",country:"UK",optIn:!1},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France",optIn:!1},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE",optIn:!0},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain",optIn:!0},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil",optIn:!1},{code:"ap-southeast-5",name:"Asia Pacific",city:"Kuala Lumpur",country:"Malaysia",optIn:!0},{code:"ap-southeast-6",name:"Asia Pacific",city:"Auckland",country:"New Zealand",optIn:!0},{code:"ap-southeast-7",name:"Asia Pacific",city:"Bangkok",country:"Thailand",optIn:!0},{code:"ap-east-2",name:"Asia Pacific",city:"Taipei",country:"Taiwan",optIn:!0},{code:"ca-west-1",name:"Canada West",city:"Calgary",country:"Canada",optIn:!0},{code:"il-central-1",name:"Israel",city:"Tel Aviv",country:"Israel",optIn:!0},{code:"mx-central-1",name:"Mexico",city:"Central",country:"Mexico",optIn:!0}]),ar=Object.freeze(mt.map(e=>e.code)),cu=new Set(mt.filter(e=>e.optIn).map(e=>e.code));function uu(e){return`${e} is an opt-in region: it must be enabled in the AWS account (Account settings \u2192 Regions) before deployment will succeed.`}Qo(uu,"optInRegionWarning");function Ai(e){return mt.find(t=>t.code===e)}Qo(Ai,"getRegionInfo");function Ii(e){let t=e.split("-");return t.length===3&&t[0]&&t[1]&&t[2]?`${t[0]}${t[1][0]}${t[2]}`:e}Qo(Ii,"abbreviateRegion");var hj=Object.freeze({"Europe/London":"eu-west-2","Europe/Jersey":"eu-west-2","Europe/Guernsey":"eu-west-2","Europe/Isle_of_Man":"eu-west-2","Europe/Dublin":"eu-west-1","Europe/Paris":"eu-west-3","Europe/Berlin":"eu-central-1","Europe/Amsterdam":"eu-central-1","Europe/Brussels":"eu-central-1","Europe/Luxembourg":"eu-central-1","Europe/Vienna":"eu-central-1","Europe/Prague":"eu-central-1","Europe/Warsaw":"eu-central-1","Europe/Budapest":"eu-central-1","Europe/Zurich":"eu-central-2","Europe/Stockholm":"eu-north-1","Europe/Oslo":"eu-north-1","Europe/Copenhagen":"eu-north-1","Europe/Helsinki":"eu-north-1","Europe/Tallinn":"eu-north-1","Europe/Riga":"eu-north-1","Europe/Vilnius":"eu-north-1","Europe/Rome":"eu-south-1","Europe/Malta":"eu-south-1","Europe/Athens":"eu-south-1","Europe/Madrid":"eu-south-2","Europe/Lisbon":"eu-south-2","America/New_York":"us-east-1","America/Detroit":"us-east-1","America/Toronto":"ca-central-1","America/Montreal":"ca-central-1","America/Halifax":"ca-central-1","America/Winnipeg":"ca-central-1","America/Chicago":"us-east-2","America/Indiana/Indianapolis":"us-east-2","America/Mexico_City":"us-east-2","America/Denver":"us-west-2","America/Phoenix":"us-west-2","America/Edmonton":"us-west-2","America/Vancouver":"us-west-2","America/Los_Angeles":"us-west-1","America/Tijuana":"us-west-1","America/Sao_Paulo":"sa-east-1","America/Argentina/Buenos_Aires":"sa-east-1","America/Santiago":"sa-east-1","America/Montevideo":"sa-east-1","America/Lima":"sa-east-1","America/Bogota":"us-east-1","Asia/Tokyo":"ap-northeast-1","Asia/Seoul":"ap-northeast-2","Asia/Hong_Kong":"ap-east-1","Asia/Shanghai":"ap-east-1","Asia/Taipei":"ap-east-1","Asia/Macau":"ap-east-1","Asia/Singapore":"ap-southeast-1","Asia/Kuala_Lumpur":"ap-southeast-1","Asia/Bangkok":"ap-southeast-1","Asia/Ho_Chi_Minh":"ap-southeast-1","Asia/Manila":"ap-southeast-1","Asia/Jakarta":"ap-southeast-3","Asia/Kolkata":"ap-south-1","Asia/Calcutta":"ap-south-1","Asia/Karachi":"ap-south-1","Asia/Dhaka":"ap-south-1","Asia/Colombo":"ap-south-1","Asia/Dubai":"me-central-1","Asia/Muscat":"me-central-1","Asia/Qatar":"me-south-1","Asia/Bahrain":"me-south-1","Asia/Riyadh":"me-south-1","Asia/Kuwait":"me-south-1","Asia/Jerusalem":"me-south-1","Australia/Sydney":"ap-southeast-2","Australia/Brisbane":"ap-southeast-2","Australia/Canberra":"ap-southeast-2","Australia/Melbourne":"ap-southeast-4","Australia/Hobart":"ap-southeast-4","Australia/Adelaide":"ap-southeast-4","Pacific/Auckland":"ap-southeast-2","Pacific/Honolulu":"us-west-1","Africa/Johannesburg":"af-south-1","Africa/Casablanca":"eu-south-2","Africa/Cairo":"me-south-1","Indian/Maldives":"ap-south-1"}),vj=Object.freeze({Europe:"eu-central-1",America:"us-east-1",Asia:"ap-southeast-1",Australia:"ap-southeast-2",Pacific:"ap-southeast-2",Africa:"af-south-1",Atlantic:"eu-west-1",Indian:"ap-south-1"}),bj=Object.freeze({"af-south-1":"eu-west-1","ap-east-1":"ap-southeast-1","ap-southeast-3":"ap-southeast-1","ap-southeast-4":"ap-southeast-2","eu-central-2":"eu-central-1","eu-south-1":"eu-central-1","eu-south-2":"eu-west-3","me-central-1":"ap-south-1","me-south-1":"ap-south-1"});function zh(e){return cu.has(e)?bj[e]??xi:e}Qo(zh,"toDeployableRegion");function lu(e){if(!e)return;let t=hj[e];if(t!==void 0)return zh(t);let n=e.split("/")[0];if(n===void 0)return;let i=vj[n];return i===void 0?void 0:zh(i)}Qo(lu,"suggestRegionForTimezone");var yj=Object.defineProperty,ea=(e,t)=>yj(e,"name",{value:t,configurable:!0});function du(e){return kt(e).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}ea(du,"slugifyAccountName");function CA(e,t){let n=du(e),i=du(t);return n===""?i:i===""?n:`${n}-${i}`}ea(CA,"defaultConnectedAccountName");function NA(e,t){let n=du(t);return n===""?e:`${e}-${n}`}ea(NA,"suffixedAccountName");var PA=new Set(mt.map(e=>Ii(e.code)));function wA(e){let t=e.toLowerCase().split(/[-\s_]+/).filter(i=>i.length>0),n=t[t.length-1];if(n!==void 0&&PA.has(n))return n}ea(wA,"findTrailingRegionShortCode");function kA(e){return`Account name must not end with a region code ("-${e}") \u2014 the region is added automatically when deploying. Remove the "-${e}" suffix.`}ea(kA,"regionSuffixRejectionMessage");var Sj=Object.defineProperty,Ti=(e,t)=>Sj(e,"name",{value:t,configurable:!0});function Tt(e){return e instanceof Error?e:new Error(String(e))}Ti(Tt,"normaliseError");function zt(e){return e instanceof Error?e.message:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e?String(e.message):"An unknown error occurred"}Ti(zt,"getErrorMessage");function mu(e,t){return!e||typeof e!="object"?!1:"code"in e&&e.code===t}Ti(mu,"hasErrorCode");function ta(e){if(!(!e||typeof e!="object")&&"code"in e&&typeof e.code=="string")return e.code}Ti(ta,"getErrorCode");function pu(e){return e instanceof Error?e.stack:void 0}Ti(pu,"getErrorStack");function fu(e){let t=zt(e),n=ta(e);return n&&n!=="UNKNOWN_ERROR"?`[${n}] ${t}`:t}Ti(fu,"formatErrorString");var _j=Object.defineProperty,Ej=(e,t)=>_j(e,"name",{value:t,configurable:!0});function OA(e){let t,n=!1;return()=>(n||(t=e(),n=!0),t)}Ej(OA,"singleton");var xj=Object.defineProperty,Uh=(e,t)=>xj(e,"name",{value:t,configurable:!0}),MA=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);function jA(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!MA.has(t.toUpperCase())))}Uh(jA,"filterDangerousEnvVars");var Aj=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g,ot="***",Lh="[REDACTED]",DA=`-----BEGIN ${Lh} PRIVATE KEY-----...-----END ${Lh} PRIVATE KEY-----`;function Or(e){return e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>DA).replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>DA).replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,(t,n,i)=>`${n}${ot}${i}`).replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,(t,n,i)=>`${n}${i}${ot}`).replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,(t,n)=>`${n}${ot}`).replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,(t,n,i)=>`${n}_${i}_${ot}`).replace(/\bwhsec_[A-Za-z0-9]{8,}/g,()=>`whsec_${ot}`).replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,ot).replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,(t,n)=>`${n}${ot}`).replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,ot).replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,ot).replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,ot).replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,ot).replace(Aj,(t,n)=>`${n}${ot}`)}Uh(Or,"maskSensitiveOutput");function zA(e){let t=[],n="",i=!1,r=!1,o=!1,a=!1;for(let c of e){if(o){n+=c,o=!1;continue}if(c==="\\"&&!i){o=!0;continue}if(c==="'"&&!r){i=!i,a=!0;continue}if(c==='"'&&!i){r=!r,a=!0;continue}if(c===" "&&!i&&!r){(n||a)&&(t.push(n),n="",a=!1);continue}n+=c}if(i||r)throw new Error(`Unbalanced ${i?"single":"double"} quote in command: ${e.slice(0,80)}`);if(o)throw new Error(`Trailing backslash in command: ${e.slice(0,80)}`);return(n||a)&&t.push(n),t}Uh(zA,"parseShellArgs");var Ij=Object.defineProperty,Tj=(e,t)=>Ij(e,"name",{value:t,configurable:!0}),$j=Tj(e=>new Promise(t=>setTimeout(t,e)),"sleep");var Rj=Object.defineProperty,LA=(e,t)=>Rj(e,"name",{value:t,configurable:!0});async function UA(e,t,n){let i=new Array(e.length);if(e.length===0)return i;let r=Math.max(1,Math.min(t,e.length)),o=0,a=LA(async()=>{for(;o<e.length;){let c=o++;try{let u=await n(e[c],c);i[c]={status:"fulfilled",value:u}}catch(u){i[c]={status:"rejected",reason:u}}}},"worker");return await Promise.all(Array.from({length:r},()=>a())),i}LA(UA,"mapSettledWithConcurrency");var Cj=Object.defineProperty,Dr=(e,t)=>Cj(e,"name",{value:t,configurable:!0}),Fh=["production","staging","development","platform","compliance"],FA={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"},Nj=new Set(Fh);function gu(e){return Nj.has(e)}Dr(gu,"isAccountStage");var $i={ROOT:"root",PLATFORM:"platform"},Pj=[...Fh,$i.ROOT];function BA(e){return gu(e)?FA[e]:e.charAt(0).toUpperCase()+e.slice(1)}Dr(BA,"getEnvironmentLabel");var Bh=["organisation","platform","account"],wj=s.enum(Bh),ra={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"},kj={[ra.ORGANISATION]:!0,[ra.PLATFORM]:!0,[ra.ACCOUNT]:!0},Oj=new Set(Object.keys(kj));function VA(e){return Oj.has(e)}Dr(VA,"isAccountTier");var GA=Bh.filter(e=>e!==ra.ACCOUNT),Dj=new Set(GA);function hu(e){return Dj.has(e)}Dr(hu,"isGovernanceTier");function Vh(e){return e===$i.ROOT?"organisation":e===$i.PLATFORM?"platform":"account"}Dr(Vh,"environmentToTier");function ZA(e){return e==null||e===""||e===$i.ROOT?null:gu(e)?e:null}Dr(ZA,"stageFromWireEnvironment");function Ri(e){return e.tier??Vh(e.environment)}Dr(Ri,"accountTier");function WA(e){return Ri(e)==="organisation"?$i.ROOT:e.environment??void 0}Dr(WA,"resolveSynthEnvironment");var Mj=Object.defineProperty,na=(e,t)=>Mj(e,"name",{value:t,configurable:!0});var HA=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),Gh=new Set;function YA(e){if(!e)return"compute";if(e.startsWith("Custom::"))return HA[e]??"compute";let t=HA[e];return t||Gh.add(e),t??"compute"}na(YA,"categoriseResource");function jj(){return new Set(Gh)}na(jj,"getUnmappedResourceTypes");function zj(){Gh.clear()}na(zj,"clearUnmappedResourceTypes");var Lj=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),Uj=30;function KA(e){return Lj[e]??Uj}na(KA,"getExpectedDuration");var Fj=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"});function qA(e){return Fj[e]||e.split("::").pop()||e}na(qA,"getFriendlyResourceType");var Bj=Object.defineProperty,Vj=(e,t)=>Bj(e,"name",{value:t,configurable:!0}),Gj={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},Zj=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,Wj=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,Hj=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/;function XA(e){if(!e)return null;let t=e.replace(/^(https?:\/\/)[^@]+@/,"$1"),n=t.match(Zj)??t.match(Wj)??e.match(Hj);if(!n)return null;let[,i,r,o]=n;return!i||!r||!o?null:{provider:Gj[i]??"other",owner:r,repo:o,host:i}}Vj(XA,"parseGitRemoteUrl");var Zh=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy","deploy:oidc:mint","deploy:governance"],JA={read:"user",write:"user",deploy:"user","secrets:read":"user","secrets:write":"user",destroy:"user",admin:"admin","applications:read":"user","applications:deploy":"user","deploy:oidc:mint":"machine","deploy:governance":"machine"},Yj=Zh.filter(e=>JA[e]==="machine");var Kj=Zh.filter(e=>JA[e]==="user");var qj=Object.defineProperty,Ci=(e,t)=>qj(e,"name",{value:t,configurable:!0}),bu=/^[a-zA-Z_][a-zA-Z0-9._-]*$/,Wh="Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",ia=/^[a-zA-Z][a-zA-Z0-9._-]*$/,yu="Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";var vu=s.string().regex(ia,yu),QA=s.object({app:vu.describe("Application name"),cluster:vu.optional().describe("Cluster name"),service:vu.optional().describe("Service name"),lambda:vu.optional().describe("Lambda function name")}).strict().refine(e=>!(e.service&&!e.cluster),{message:"Cluster is required when service is specified"}).refine(e=>!(e.lambda&&(e.cluster||e.service)),{message:"Lambda is mutually exclusive with cluster and service"}).refine(e=>e.cluster!=="lambda",{message:'The cluster name "lambda" is reserved for lambda-scoped parameter paths'});function Hh(e){let t=[e.app];return e.lambda?t.push("lambda",e.lambda):(e.cluster&&t.push(e.cluster),e.service&&e.cluster&&t.push(e.service)),t}Ci(Hh,"buildNamespaceParts");function Yh(e,t){let n=Hh(e);return t&&n.push(t),"/"+n.join("/")}Ci(Yh,"buildParameterPath");function Kh(e){let t=e.split("/").filter(Boolean);if(t.length<2)return null;let n=t[t.length-1]??"",i={app:t[0]??""};return t.length>=4&&t[1]==="lambda"?i.lambda=t[2]:t.length>=3&&(i.cluster=t[1],t.length>=4&&(i.service=t[2])),{namespace:i,name:n}}Ci(Kh,"parseParameterPath");function eI(e){let t=Kh(e);return t?QA.safeParse(t.namespace).success&&Yh(t.namespace,t.name)===e:!1}Ci(eI,"isManageablePath");function tI(e){let t={};for(let n of e.split(`
165
- `)){let i=n.trim();if(!i||i.startsWith("#"))continue;let r=i.replace(/^export\s+/,""),o=r.indexOf("=");if(o===-1)continue;let a=r.slice(0,o).trim();if(!bu.test(a))continue;let c=r.slice(o+1);c.length>=2&&c.startsWith('"')&&c.endsWith('"')?t[a]=c.slice(1,-1).replace(/\\([\\"$`nr])/g,(u,l)=>l==="n"?`
166
- `:l==="r"?"\r":l):c.length>=2&&c.startsWith("'")&&c.endsWith("'")?t[a]=c.slice(1,-1):t[a]=c}return t}Ci(tI,"parseDotEnv");function rI(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}Ci(rI,"escapeDotEnvValue");var nI=s.object({awsAccountId:s.string(),accountName:s.string().nullable(),status:s.string(),role:s.string(),roleArn:s.string(),environment:s.string().optional(),connectedAt:s.string()}),Xj=s.object({accounts:s.array(nI)});var Jj=Object.defineProperty,gn=(e,t)=>Jj(e,"name",{value:t,configurable:!0});function qh(e){let t=[e.primaryRegion,...e.secondaryRegions??[],e.disasterRecoveryRegion].filter(n=>n!==void 0);return[...new Set(t)]}gn(qh,"deriveRegionsFromOrgConfig");function Xh(e){return e.environment??Ri(e)}gn(Xh,"environmentOrTier");function Jh(e,t){return`${e.toLowerCase()}-${Ii(t)}`}gn(Jh,"generateTargetName");function Qh(e,t){let n=[];for(let i of e){if(Ri(i)==="organisation")continue;let r=Xh(i);for(let o of t)n.push({name:Jh(i.name,o),accountName:i.name,accountId:i.id,environment:r,region:o})}return n.sort((i,r)=>{let o=i.environment.localeCompare(r.environment);if(o!==0)return o;let a=i.accountName.localeCompare(r.accountName);return a!==0?a:i.region.localeCompare(r.region)})}gn(Qh,"deriveTargets");function iI(e){return Qh(e.providerAccounts,qh(e))}gn(iI,"deriveAllTargets");function Qj(e,t){if(t.length===0)return e;let n=new Set([e.primaryRegion,e.disasterRecoveryRegion].filter(Boolean)),i=t.filter(r=>!n.has(r));return{...e,secondaryRegions:i.length>0?i:void 0}}gn(Qj,"mergeSecondaryRegions");function oI(e,t){return e.find(n=>n.name===t)}gn(oI,"findTarget");var ez=Object.defineProperty,tz=(e,t)=>ez(e,"name",{value:t,configurable:!0});function aI(e,t){if(t!==void 0){if(t.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${t}/fjall/${e}`}return`fjall/${e}`}tz(aI,"buildAppConfigPath");var rz=Object.defineProperty,Ni=(e,t)=>rz(e,"name",{value:t,configurable:!0}),ev="infrastructure.ts",tv="fjall";function sI(e,t){let n=t?.excludedPathPrefixes,i=t?.excludedPathSegments,r=[];for(let o of e){if(!rv(o.path)||n&&uI(o.path,n)||i&&lI(o.path,i))continue;let a=nv(o.path);a!==null&&r.push({configPath:cI(o.path),boundaryPath:a})}return r}Ni(sI,"findInfrastructurePaths");function rv(e){return e===ev||e.endsWith(`/${ev}`)}Ni(rv,"isInfrastructureFile");function nv(e){let t=e.split("/");for(let n=0;n<t.length-1;n++)if(t[n]===tv)return t.slice(0,n+1).join("/");return null}Ni(nv,"findBoundaryPath");function cI(e){return e.slice(0,-`/${ev}`.length)}Ni(cI,"toConfigDir");function uI(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}Ni(uI,"hasExcludedPrefix");function lI(e,t){let n=e.split("/");for(let i=0;i<n.length-1;i++)if(t.has(n[i]))return!0;return!1}Ni(lI,"hasExcludedSegment");var nz=Object.defineProperty,iv=(e,t)=>nz(e,"name",{value:t,configurable:!0});function dI(e){if(e.length===0)return null;let t=[];for(let i of e){let r=mI(i.boundaryPath);if(r===null)return null;t.push(r)}let n=pI(t);return n.length===0?null:n.join("/")}iv(dI,"inferContainerFromCandidates");function mI(e){let t=e.split("/").filter(i=>i.length>0);if(t.length===0||t[t.length-1]!==tv)return null;let n=t.slice(0,t.length-1);return n.length===0?null:n}iv(mI,"extractContainer");function pI(e){if(e.length===0)return[];let[t,...n]=e,i=[];for(let r=0;r<t.length;r+=1){let o=t[r];for(let a of n)if(a[r]!==o)return i;i.push(o)}return i}iv(pI,"longestCommonPrefix");var iz=Object.defineProperty,fI=(e,t)=>iz(e,"name",{value:t,configurable:!0}),gI=["fjall","organisation","platform","account","domain"];function hI(e){return gI.includes(e.toLowerCase())}fI(hI,"isReservedAppName");var vI="-cache";function bI(e){return kt(e).endsWith(vI)}fI(bI,"hasReservedAppNameSuffix");var oz=Object.defineProperty,ov=(e,t)=>oz(e,"name",{value:t,configurable:!0});function SI(e){return{success:!0,data:e}}ov(SI,"success");function oa(e){return{success:!1,error:e}}ov(oa,"failure");var yI="sha256:",Su=12,az=new RegExp(`-sha-[0-9a-f]{${Su}}$`);function _I(e,t,n){if(!e.startsWith(yI))return oa(new Error(`expected sha256:... digest, got ${e.slice(0,32)}`));let i=e.slice(yI.length);if(i.length<Su)return oa(new Error(`digest hex payload too short (need >=${Su} chars, got ${i.length})`));let r=t.trim();if(r==="")return oa(new Error("serviceName must be a non-empty string"));let o;if(n!==void 0){let u=n.trim();if(u==="")return oa(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=u.toLowerCase()}let a=i.slice(0,Su).toLowerCase(),c=o!==void 0?`${r.toLowerCase()}-${o}`:r.toLowerCase();return SI(`${c}-sha-${a}`)}ov(_I,"deriveContentHashTag");var sz=Object.defineProperty,cz=(e,t)=>sz(e,"name",{value:t,configurable:!0}),EI=["full","code-only","rollback","restart"],uz=s.enum(EI),xI=/^[a-zA-Z0-9._-]+$/,AI=s.string().min(1).max(128).regex(xI),II=s.object({serviceName:s.string().min(1),imageTag:AI,imageDigest:s.string().min(1).optional(),imageUri:s.string().min(1),ecrRepositoryArn:s.string().min(1).optional(),taskDefinitionArn:s.string().min(1).optional(),previousTaskDefinitionArn:s.string().min(1).optional(),functionArn:s.string().min(1).optional(),publishedVersion:s.string().min(1).optional()}).strict(),lz=s.array(II);function TI(e,t){return`${e}${t}`}cz(TI,"artefactOutputKey");var dz=Object.defineProperty,$I=(e,t)=>dz(e,"name",{value:t,configurable:!0}),Lt=["payload","nextjs","staticsite"],av=new Set(Lt);function sv(e){return typeof e=="string"&&av.has(e)}$I(sv,"isPatternType");var Pi={payload:{label:"Payload CMS",constructIdSuffix:"Payload",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!0},nextjs:{label:"Next.js",constructIdSuffix:"Nextjs",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!1},staticsite:{label:"Static site",constructIdSuffix:"StaticSite",artefact:"static-assets",stackPlacement:"cdn",deployable:!0}},RI=Lt.filter(e=>Pi[e].deployable),cv=Lt.filter(e=>Pi[e].artefact==="opennext-lambda"),mz=new Set(cv);function uv(e){return e!=null&&mz.has(e)}$I(uv,"isOpenNextPatternType");var aa=["multipage","spa"];var pz=Object.defineProperty,lv=(e,t)=>pz(e,"name",{value:t,configurable:!0}),CI="noreply";function NI(e){return`${CI}@${e}`}lv(NI,"defaultFormsFromAddress");function PI(e){return`https://${e}`}lv(PI,"defaultFormsCorsOrigin");function _u(e,t){let n=e.split("@");if(n.length!==2)return!1;let[i,r]=n;return i===void 0||i===""||r===void 0?!1:r.toLowerCase()===t.toLowerCase()}lv(_u,"isAddressAtDomain");var wI=2;var fz=s.object({devDomain:s.string().min(1),hostedZoneId:s.string().min(1).optional(),parentDomain:s.string().min(1).optional(),parentDelegationRoleArn:s.string().min(1).optional()}).strict().superRefine((e,t)=>{if(e.hostedZoneId!==void 0){e.parentDomain!==void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDomain \u2014 the adopted zone was already delegated; omit parentDomain"}),e.parentDelegationRoleArn!==void 0&&t.addIssue({code:"custom",path:["parentDelegationRoleArn"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDelegationRoleArn \u2014 the adopted zone was already delegated; omit parentDelegationRoleArn"});return}e.parentDelegationRoleArn!==void 0&&e.parentDomain===void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDelegationRoleArn requires parentDomain \u2014 set parentDomain to the parent zone the DelegationRole belongs to"}),e.parentDomain!==void 0&&!e.devDomain.endsWith(`.${e.parentDomain}`)&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDomain must be a proper DNS suffix of devDomain \u2014 devDomain must end with `.<parentDomain>`"})}),kI={appId:s.string().min(1),appKebab:s.string().min(1),engineVersion:s.string().min(1).optional(),adoptSlotEcr:s.boolean().optional(),adoptCacheEcr:s.boolean().optional(),phase:s.enum(["zone","full"]).optional(),domain:fz.optional()},gz=s.object(kI).strict(),hz=s.object({...kI,version:s.literal(wI),appName:s.string().min(1)}).strict().refine(e=>e.appName===`fjall-dev-${e.appKebab}`,{message:"appName must equal `fjall-dev-${appKebab}` (single-source identity)",path:["appName"]});var OI=["permissions","validation","dependency","limit","network","unknown"];var vz=Object.defineProperty,hn=(e,t)=>vz(e,"name",{value:t,configurable:!0}),MI=["preflight","credentials","synth","bootstrap","image_build","image_push","cloudformation","ecs_stabilise","platform","unknown"],jI=s.enum(MI),zI=["customer_code","customer_aws","platform","indeterminate"],LI=s.enum(zI),UI=["cloudformation","ecs","ecr","iam","docker","cdk","npm","other"],FI=s.enum(UI),BI=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$/,VI=1,ie={code:128,title:120,detail:1e3,providerCode:128,providerMessage:2e3,resourceField:256,remediationStep:1024,remediationSteps:10,excerpt:2e3,logRef:512,classifierVersion:32,analysisString:2e3,analysisAffectedResources:50,analysisDependencyChain:50,analysisRemediation:20,analysisDriftSuspects:50,errorMessageWire:2e3,errorMessageDb:1e4},DI=s.object({logicalId:s.string(),resourceType:s.string(),status:s.string(),statusReason:s.string().optional(),physicalId:s.string().optional(),timestamp:s.string().optional(),group:s.string().optional(),constructPath:s.string().optional()}),bz=s.object({logicalId:s.string(),resourceType:s.string(),physicalId:s.string().optional(),failedStatus:s.string(),statusReason:s.string()}),GI=s.object({rootCause:s.object({resource:DI,reason:s.string(),category:s.enum(OI),isDirectCause:s.boolean()}),affectedResources:s.array(DI),dependencyChain:s.array(s.string()),summary:s.string(),remediation:s.array(s.string()),errorPattern:s.string().optional(),driftSuspects:s.array(bz).optional()}),ZI=s.object({source:FI,code:s.string().min(1).max(ie.providerCode).optional(),message:s.string().max(ie.providerMessage)}).strict(),WI=s.object({logicalId:s.string().min(1).max(ie.resourceField).optional(),resourceType:s.string().min(1).max(ie.resourceField).optional(),stackName:s.string().min(1).max(ie.resourceField).optional()}).strict(),HI=s.object({schemaVersion:s.literal(VI),code:s.string().min(1).max(ie.code).regex(BI,"Failure codes are dotted lowercase keys, e.g. cfn.resource_create_failed"),phase:jI,fault:LI,title:s.string().min(1).max(ie.title),detail:s.string().min(1).max(ie.detail),provider:ZI.optional(),resource:WI.optional(),remediation:s.array(s.string().min(1).max(ie.remediationStep)).max(ie.remediationSteps).default(()=>[]),excerpt:s.string().min(1).max(ie.excerpt).optional(),logRef:s.string().min(1).max(ie.logRef).optional(),analysis:GI.optional(),classifierVersion:s.string().min(1).max(ie.classifierVersion)}).strict();function YI(e){if(e==null)return null;let t=HI.safeParse(e);return t.success?t.data:null}hn(YI,"parseDeploymentFailure");var KI="https://docs.fjall.io/errors";function qI(e){return`${KI}/${e}`}hn(qI,"deploymentFailureDocsUrl");function XI(e){let t=`${e.title}: ${e.detail}`;return t.length>ie.errorMessageWire?t.slice(0,ie.errorMessageWire):t}hn(XI,"deriveErrorMessageFromFailure");function Mr(e){return e.length>ie.analysisString?e.slice(0,ie.analysisString):e}hn(Mr,"truncateAnalysisString");function dv(e){return{logicalId:e.logicalId,resourceType:e.resourceType,status:e.status,timestamp:e.timestamp.toISOString(),...e.statusReason!==void 0&&{statusReason:Mr(e.statusReason)},...e.physicalId!==void 0&&{physicalId:e.physicalId},...e.group!==void 0&&{group:e.group},...e.constructPath!==void 0&&{constructPath:e.constructPath}}}hn(dv,"toWireResourceEvent");function JI(e){return{logicalId:e.logicalId,resourceType:e.resourceType,failedStatus:e.failedStatus,statusReason:Mr(e.statusReason),...e.physicalId!==void 0&&{physicalId:e.physicalId}}}hn(JI,"toWireDriftSuspect");function QI(e){return{rootCause:{resource:dv(e.rootCause.resource),reason:Mr(e.rootCause.reason),category:e.rootCause.category,isDirectCause:e.rootCause.isDirectCause},affectedResources:e.affectedResources.slice(0,ie.analysisAffectedResources).map(dv),dependencyChain:e.dependencyChain.slice(0,ie.analysisDependencyChain).map(Mr),summary:Mr(e.summary),remediation:e.remediation.slice(0,ie.analysisRemediation).map(Mr),...e.errorPattern!==void 0&&{errorPattern:Mr(e.errorPattern)},...e.driftSuspects!==void 0&&{driftSuspects:e.driftSuspects.slice(0,ie.analysisDriftSuspects).map(JI)}}}hn(QI,"toDeploymentFailureAnalysis");var yz=Object.defineProperty,Eu=(e,t)=>yz(e,"name",{value:t,configurable:!0}),Sz=[/❌/,/Resource handler returned message/i,/(?:CREATE|UPDATE|DELETE|IMPORT)_FAILED/,/ROLLBACK_(?:IN_PROGRESS|COMPLETE|FAILED)/],_z=[/npm ERR!/,/error TS\d+/,/SyntaxError:/],Ez=[/Error occurred/i,/\berror:/i,/\bfailed:/i,/\bdenied\b/i,/\bexception\b/i],xz=[...Sz,..._z,...Ez],eT=20,jr="\u2026";function tT(e,t){let n=Math.max(0,t);if(e.length<=n)return e;let i=n,r=e.charCodeAt(i-1);return r>=55296&&r<=56319&&(i-=1),e.slice(0,i)}Eu(tT,"truncateUtf16Safe");function rT(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343?e.slice(1):e}Eu(rT,"trimLeadingLoneSurrogate");function nT(e){return xz.some(t=>t.test(e))}Eu(nT,"isAnchorLine");function iT(e,t={}){let n=t.maxLength??ie.excerpt,i=t.contextLines??eT,r=Or(e);if(r.length<=n)return r;let o=r.split(`
167
- `),a=o.findIndex(nT);if(a===-1)return jr+rT(r.slice(-(n-1)));let c=Math.min(o.length,a+i+1),u=o.slice(a,c).join(`
164
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let c=a[1];if(t===a[0]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(c.cycle){o(a);continue}if(c.count>1&&e.reused==="ref"){o(a);continue}}}function kr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,d={...l},p=u.ref;if(u.ref=null,p){i(p);let v=e.seen.get(p),x=v.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(x)):Object.assign(l,x),Object.assign(l,d),c._zod.parent===p)for(let j in l)j==="$ref"||j==="allOf"||j in d||delete l[j];if(x.$ref&&v.def)for(let j in l)j==="$ref"||j==="allOf"||j in v.def&&JSON.stringify(l[j])===JSON.stringify(v.def[j])&&delete l[j]}let g=c._zod.parent;if(g&&g!==p){i(g);let v=e.seen.get(g);if(v?.schema.$ref&&(l.$ref=v.schema.$ref,v.def))for(let x in l)x==="$ref"||x==="allOf"||x in v.def&&JSON.stringify(l[x])===JSON.stringify(v.def[x])&&delete l[x]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())i(c[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(c)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let c=JSON.parse(JSON.stringify(r));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:fi(t,"input",e.processors),output:fi(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Ue(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Ue(i.element,n);if(i.type==="set")return Ue(i.valueType,n);if(i.type==="lazy")return Ue(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Ue(i.innerType,n);if(i.type==="intersection")return Ue(i.left,n)||Ue(i.right,n);if(i.type==="record"||i.type==="map")return Ue(i.keyType,n)||Ue(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Ue(i.in,n)||Ue(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Ue(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Ue(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Ue(r,n))return!0;return!!(i.rest&&Ue(i.rest,n))}return!1}var Vf=(e,t={})=>n=>{let i=Pr({...n,processors:t});return Z(e,i),wr(i,e),kr(i,e)},fi=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=Pr({...r??{},target:o,io:t,processors:n});return Z(e,a),wr(a,e),kr(a,e)};var KM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Gf=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),c&&(r.format=KM[c]??c,r.format===""&&delete r.format,c==="time"&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){let d=[...u];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Zf=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?r.type="integer":r.type="number";let p=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";p?v?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof o=="number"&&(r.minimum=o),g?v?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l:typeof a=="number"&&(r.maximum=a),typeof u=="number"&&(r.multipleOf=u)},Wf=(e,t,n,i)=>{n.type="boolean"},Hf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Yf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Kf=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},qf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Xf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Jf=(e,t,n,i)=>{n.not={}},Qf=(e,t,n,i)=>{},eg=(e,t,n,i)=>{},tg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},rg=(e,t,n,i)=>{let r=e._zod.def,o=So(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},ng=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},ig=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},og=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},ag=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(o.minLength=a),c!==void 0&&(o.maxLength=c),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(r,o)},sg=(e,t,n,i)=>{n.type="boolean"},cg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ug=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},lg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},dg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},mg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},pg=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof c=="number"&&(r.maxItems=c),r.type="array",r.items=Z(o.element,t,{...i,path:[...i.path,"items"]})},fg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let l in a)r.properties[l]=Z(a[l],t,{...i,path:[...i.path,"properties",l]});let c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{let d=o.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(r.required=Array.from(u)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Z(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Tc=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((c,u)=>Z(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=a:n.anyOf=a},gg=(e,t,n,i)=>{let r=e._zod.def,o=Z(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=Z(r.right,t,{...i,path:[...i.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(o)?o.allOf:[o],...c(a)?a.allOf:[a]];n.allOf=u},hg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,v)=>Z(g,t,{...i,path:[...i.path,a,v]})),l=o.rest?Z(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=u,l&&(r.items=l)):t.target==="openapi-3.0"?(r.items={anyOf:u},l&&r.items.anyOf.push(l),r.minItems=u.length,l||(r.maxItems=u.length)):(r.items=u,l&&(r.additionalItems=l));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},vg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,u=a._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let d=Z(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of u)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Z(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Z(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},bg=(e,t,n,i)=>{let r=e._zod.def,o=Z(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},yg=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Sg=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},_g=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Eg=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},xg=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;Z(a,t,i);let c=t.seen.get(e);c.ref=a},Ag=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Ig=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},$c=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Tg=(e,t,n,i)=>{let r=e._zod.innerType;Z(r,t,i);let o=t.seen.get(e);o.ref=r},Ic={string:Gf,number:Zf,boolean:Wf,bigint:Hf,symbol:Yf,null:Kf,undefined:qf,void:Xf,never:Jf,any:Qf,unknown:eg,date:tg,enum:rg,literal:ng,nan:ig,template_literal:og,file:ag,success:sg,custom:cg,function:ug,transform:lg,map:dg,set:mg,array:pg,object:fg,union:Tc,intersection:gg,tuple:hg,record:vg,nullable:bg,nonoptional:yg,default:Sg,prefault:_g,catch:Eg,pipe:xg,readonly:Ag,promise:Ig,optional:$c,lazy:Tg};function Rc(e,t){if("_idmap"in e){let i=e,r=Pr({...t,processors:Ic}),o={};for(let u of i._idmap.entries()){let[l,d]=u;Z(d,r)}let a={},c={registry:i,uri:t?.uri,defs:o};r.external=c;for(let u of i._idmap.entries()){let[l,d]=u;wr(r,d),a[l]=kr(r,d)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=Pr({...t,processors:Ic});return Z(e,n),wr(n,e),kr(n,e)}var Cc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Pr({processors:Ic,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Z(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),wr(this.ctx,t);let i=kr(this.ctx,t),{"~standard":r,...o}=i;return o}};var ax={};var zo={};wt(zo,{ZodAny:()=>qg,ZodArray:()=>eh,ZodBase64:()=>qc,ZodBase64URL:()=>Xc,ZodBigInt:()=>Ei,ZodBigIntFormat:()=>eu,ZodBoolean:()=>_i,ZodCIDRv4:()=>Yc,ZodCIDRv6:()=>Kc,ZodCUID:()=>Fc,ZodCUID2:()=>Bc,ZodCatch:()=>Eh,ZodCodec:()=>qo,ZodCustom:()=>Xo,ZodCustomStringFormat:()=>yi,ZodDate:()=>Zo,ZodDefault:()=>hh,ZodDiscriminatedUnion:()=>rh,ZodE164:()=>Jc,ZodEmail:()=>zc,ZodEmoji:()=>Lc,ZodEnum:()=>vi,ZodExactOptional:()=>ph,ZodFile:()=>dh,ZodFunction:()=>wh,ZodGUID:()=>Uo,ZodIPv4:()=>Wc,ZodIPv6:()=>Hc,ZodIntersection:()=>nh,ZodJWT:()=>Qc,ZodKSUID:()=>Zc,ZodLazy:()=>Ch,ZodLiteral:()=>lh,ZodMAC:()=>Vg,ZodMap:()=>ch,ZodNaN:()=>Ah,ZodNanoID:()=>Uc,ZodNever:()=>Jg,ZodNonOptional:()=>au,ZodNull:()=>Yg,ZodNullable:()=>gh,ZodNumber:()=>Si,ZodNumberFormat:()=>fn,ZodObject:()=>Ho,ZodOptional:()=>ou,ZodPipe:()=>Ko,ZodPrefault:()=>bh,ZodPreprocess:()=>Ih,ZodPromise:()=>Ph,ZodReadonly:()=>Th,ZodRecord:()=>hi,ZodSet:()=>uh,ZodString:()=>bi,ZodStringFormat:()=>X,ZodSuccess:()=>_h,ZodSymbol:()=>Wg,ZodTemplateLiteral:()=>Rh,ZodTransform:()=>mh,ZodTuple:()=>oh,ZodType:()=>k,ZodULID:()=>Vc,ZodURL:()=>Go,ZodUUID:()=>jt,ZodUndefined:()=>Hg,ZodUnion:()=>Yo,ZodUnknown:()=>Xg,ZodVoid:()=>Qg,ZodXID:()=>Gc,ZodXor:()=>th,_ZodString:()=>jc,_default:()=>vh,_function:()=>gA,any:()=>Wx,array:()=>Wo,base64:()=>Cx,base64url:()=>Nx,bigint:()=>Fx,boolean:()=>Zg,catch:()=>xh,check:()=>hA,cidrv4:()=>$x,cidrv6:()=>Rx,codec:()=>dA,cuid:()=>yx,cuid2:()=>Sx,custom:()=>vA,date:()=>Yx,describe:()=>bA,discriminatedUnion:()=>eA,e164:()=>Px,email:()=>ux,emoji:()=>vx,enum:()=>nu,exactOptional:()=>fh,file:()=>sA,float32:()=>jx,float64:()=>zx,function:()=>gA,guid:()=>lx,hash:()=>Mx,hex:()=>Dx,hostname:()=>Ox,httpUrl:()=>hx,instanceof:()=>SA,int:()=>Dc,int32:()=>Lx,int64:()=>Bx,intersection:()=>ih,invertCodec:()=>mA,ipv4:()=>Ax,ipv6:()=>Tx,json:()=>EA,jwt:()=>wx,keyof:()=>Kx,ksuid:()=>xx,lazy:()=>Nh,literal:()=>aA,looseObject:()=>Jx,looseRecord:()=>rA,mac:()=>Ix,map:()=>nA,meta:()=>yA,nan:()=>lA,nanoid:()=>bx,nativeEnum:()=>oA,never:()=>tu,nonoptional:()=>Sh,null:()=>Kg,nullable:()=>Bo,nullish:()=>cA,number:()=>Gg,object:()=>qx,optional:()=>Fo,partialRecord:()=>tA,pipe:()=>Mc,prefault:()=>yh,preprocess:()=>xA,promise:()=>fA,readonly:()=>$h,record:()=>sh,refine:()=>kh,set:()=>iA,strictObject:()=>Xx,string:()=>Lo,stringFormat:()=>kx,stringbool:()=>_A,success:()=>uA,superRefine:()=>Oh,symbol:()=>Gx,templateLiteral:()=>pA,transform:()=>iu,tuple:()=>ah,uint32:()=>Ux,uint64:()=>Vx,ulid:()=>_x,undefined:()=>Zx,union:()=>ru,unknown:()=>pn,url:()=>gx,uuid:()=>dx,uuidv4:()=>mx,uuidv6:()=>px,uuidv7:()=>fx,void:()=>Hx,xid:()=>Ex,xor:()=>Qx});var Nc={};wt(Nc,{endsWith:()=>ai,gt:()=>Dt,gte:()=>Le,includes:()=>ii,length:()=>mn,lowercase:()=>ri,lt:()=>Ot,lte:()=>ot,maxLength:()=>dn,maxSize:()=>Nr,mime:()=>si,minLength:()=>ir,minSize:()=>Mt,multipleOf:()=>Cr,negative:()=>_c,nonnegative:()=>xc,nonpositive:()=>Ec,normalize:()=>ci,overwrite:()=>It,positive:()=>Sc,property:()=>Ac,regex:()=>ti,size:()=>ln,slugify:()=>mi,startsWith:()=>oi,toLowerCase:()=>li,toUpperCase:()=>di,trim:()=>ui,uppercase:()=>ni});var gi={};wt(gi,{ZodISODate:()=>wc,ZodISODateTime:()=>Pc,ZodISODuration:()=>Oc,ZodISOTime:()=>kc,date:()=>Rg,datetime:()=>$g,duration:()=>Ng,time:()=>Cg});var Pc=f("ZodISODateTime",(e,t)=>{np.init(e,t),X.init(e,t)});function $g(e){return cf(Pc,e)}var wc=f("ZodISODate",(e,t)=>{ip.init(e,t),X.init(e,t)});function Rg(e){return uf(wc,e)}var kc=f("ZodISOTime",(e,t)=>{op.init(e,t),X.init(e,t)});function Cg(e){return lf(kc,e)}var Oc=f("ZodISODuration",(e,t)=>{ap.init(e,t),X.init(e,t)});function Ng(e){return df(Oc,e)}var sx=(e,t)=>{Io.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>$o(e,n)},flatten:{value:n=>To(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Wn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Wn,2)}},isEmpty:{get(){return e.issues.length===0}}})},XM=f("ZodError",sx),Ye=f("ZodError",sx,{Parent:Error});var Pg=Kn(Ye),wg=qn(Ye),kg=Xn(Ye),Og=Jn(Ye),Dg=Rs(Ye),Mg=Cs(Ye),jg=Ns(Ye),zg=Ps(Ye),Lg=ws(Ye),Ug=ks(Ye),Fg=Os(Ye),Bg=Ds(Ye);var cx=new WeakMap;function Vo(e,t,n){let i=Object.getPrototypeOf(e),r=cx.get(i);if(r||(r=new Set,cx.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let c=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var k=f("ZodType",(e,t)=>(w.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:fi(e,"input"),output:fi(e,"output")}}),e.toJSONSchema=Vf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Pg(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>kg(e,n,i),e.parseAsync=async(n,i)=>wg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Og(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Dg(e,n,i),e.decode=(n,i)=>Mg(e,n,i),e.encodeAsync=async(n,i)=>jg(e,n,i),e.decodeAsync=async(n,i)=>zg(e,n,i),e.safeEncode=(n,i)=>Lg(e,n,i),e.safeDecode=(n,i)=>Ug(e,n,i),e.safeEncodeAsync=async(n,i)=>Fg(e,n,i),e.safeDecodeAsync=async(n,i)=>Bg(e,n,i),Vo(e,"ZodType",{check(...n){let i=this.def;return this.clone(_.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return je(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(kh(n,i))},superRefine(n,i){return this.check(Oh(n,i))},overwrite(n){return this.check(It(n))},optional(){return Fo(this)},exactOptional(){return fh(this)},nullable(){return Bo(this)},nullish(){return Fo(Bo(this))},nonoptional(n){return Sh(this,n)},array(){return Wo(this)},or(n){return ru([this,n])},and(n){return ih(this,n)},transform(n){return Mc(this,iu(n))},default(n){return vh(this,n)},prefault(n){return yh(this,n)},catch(n){return xh(this,n)},pipe(n){return Mc(this,n)},readonly(){return $h(this)},describe(n){let i=this.clone();return Te.add(i,{description:n}),i},meta(...n){if(n.length===0)return Te.get(this);let i=this.clone();return Te.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Te.get(e)?.description},configurable:!0}),e)),jc=f("_ZodString",(e,t)=>{un.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Gf(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Vo(e,"_ZodString",{regex(...i){return this.check(ti(...i))},includes(...i){return this.check(ii(...i))},startsWith(...i){return this.check(oi(...i))},endsWith(...i){return this.check(ai(...i))},min(...i){return this.check(ir(...i))},max(...i){return this.check(dn(...i))},length(...i){return this.check(mn(...i))},nonempty(...i){return this.check(ir(1,...i))},lowercase(i){return this.check(ri(i))},uppercase(i){return this.check(ni(i))},trim(){return this.check(ui())},normalize(...i){return this.check(ci(...i))},toLowerCase(){return this.check(li())},toUpperCase(){return this.check(di())},slugify(){return this.check(mi())}})}),bi=f("ZodString",(e,t)=>{un.init(e,t),jc.init(e,t),e.email=n=>e.check(ec(zc,n)),e.url=n=>e.check(jo(Go,n)),e.jwt=n=>e.check(yc(Qc,n)),e.emoji=n=>e.check(oc(Lc,n)),e.guid=n=>e.check(Mo(Uo,n)),e.uuid=n=>e.check(tc(jt,n)),e.uuidv4=n=>e.check(rc(jt,n)),e.uuidv6=n=>e.check(nc(jt,n)),e.uuidv7=n=>e.check(ic(jt,n)),e.nanoid=n=>e.check(ac(Uc,n)),e.guid=n=>e.check(Mo(Uo,n)),e.cuid=n=>e.check(sc(Fc,n)),e.cuid2=n=>e.check(cc(Bc,n)),e.ulid=n=>e.check(uc(Vc,n)),e.base64=n=>e.check(hc(qc,n)),e.base64url=n=>e.check(vc(Xc,n)),e.xid=n=>e.check(lc(Gc,n)),e.ksuid=n=>e.check(dc(Zc,n)),e.ipv4=n=>e.check(mc(Wc,n)),e.ipv6=n=>e.check(pc(Hc,n)),e.cidrv4=n=>e.check(fc(Yc,n)),e.cidrv6=n=>e.check(gc(Kc,n)),e.e164=n=>e.check(bc(Jc,n)),e.datetime=n=>e.check($g(n)),e.date=n=>e.check(Rg(n)),e.time=n=>e.check(Cg(n)),e.duration=n=>e.check(Ng(n))});function Lo(e){return nf(bi,e)}var X=f("ZodStringFormat",(e,t)=>{q.init(e,t),jc.init(e,t)}),zc=f("ZodEmail",(e,t)=>{Ym.init(e,t),X.init(e,t)});function ux(e){return ec(zc,e)}var Uo=f("ZodGUID",(e,t)=>{Wm.init(e,t),X.init(e,t)});function lx(e){return Mo(Uo,e)}var jt=f("ZodUUID",(e,t)=>{Hm.init(e,t),X.init(e,t)});function dx(e){return tc(jt,e)}function mx(e){return rc(jt,e)}function px(e){return nc(jt,e)}function fx(e){return ic(jt,e)}var Go=f("ZodURL",(e,t)=>{Km.init(e,t),X.init(e,t)});function gx(e){return jo(Go,e)}function hx(e){return jo(Go,{protocol:it.httpProtocol,hostname:it.domain,..._.normalizeParams(e)})}var Lc=f("ZodEmoji",(e,t)=>{qm.init(e,t),X.init(e,t)});function vx(e){return oc(Lc,e)}var Uc=f("ZodNanoID",(e,t)=>{Xm.init(e,t),X.init(e,t)});function bx(e){return ac(Uc,e)}var Fc=f("ZodCUID",(e,t)=>{Jm.init(e,t),X.init(e,t)});function yx(e){return sc(Fc,e)}var Bc=f("ZodCUID2",(e,t)=>{Qm.init(e,t),X.init(e,t)});function Sx(e){return cc(Bc,e)}var Vc=f("ZodULID",(e,t)=>{ep.init(e,t),X.init(e,t)});function _x(e){return uc(Vc,e)}var Gc=f("ZodXID",(e,t)=>{tp.init(e,t),X.init(e,t)});function Ex(e){return lc(Gc,e)}var Zc=f("ZodKSUID",(e,t)=>{rp.init(e,t),X.init(e,t)});function xx(e){return dc(Zc,e)}var Wc=f("ZodIPv4",(e,t)=>{sp.init(e,t),X.init(e,t)});function Ax(e){return mc(Wc,e)}var Vg=f("ZodMAC",(e,t)=>{up.init(e,t),X.init(e,t)});function Ix(e){return af(Vg,e)}var Hc=f("ZodIPv6",(e,t)=>{cp.init(e,t),X.init(e,t)});function Tx(e){return pc(Hc,e)}var Yc=f("ZodCIDRv4",(e,t)=>{lp.init(e,t),X.init(e,t)});function $x(e){return fc(Yc,e)}var Kc=f("ZodCIDRv6",(e,t)=>{dp.init(e,t),X.init(e,t)});function Rx(e){return gc(Kc,e)}var qc=f("ZodBase64",(e,t)=>{pp.init(e,t),X.init(e,t)});function Cx(e){return hc(qc,e)}var Xc=f("ZodBase64URL",(e,t)=>{fp.init(e,t),X.init(e,t)});function Nx(e){return vc(Xc,e)}var Jc=f("ZodE164",(e,t)=>{gp.init(e,t),X.init(e,t)});function Px(e){return bc(Jc,e)}var Qc=f("ZodJWT",(e,t)=>{hp.init(e,t),X.init(e,t)});function wx(e){return yc(Qc,e)}var yi=f("ZodCustomStringFormat",(e,t)=>{vp.init(e,t),X.init(e,t)});function kx(e,t,n={}){return pi(yi,e,t,n)}function Ox(e){return pi(yi,"hostname",it.hostname,e)}function Dx(e){return pi(yi,"hex",it.hex,e)}function Mx(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=it[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return pi(yi,i,r,t)}var Si=f("ZodNumber",(e,t)=>{Gs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Zf(e,i,r,o),Vo(e,"ZodNumber",{gt(i,r){return this.check(Dt(i,r))},gte(i,r){return this.check(Le(i,r))},min(i,r){return this.check(Le(i,r))},lt(i,r){return this.check(Ot(i,r))},lte(i,r){return this.check(ot(i,r))},max(i,r){return this.check(ot(i,r))},int(i){return this.check(Dc(i))},safe(i){return this.check(Dc(i))},positive(i){return this.check(Dt(0,i))},nonnegative(i){return this.check(Le(0,i))},negative(i){return this.check(Ot(0,i))},nonpositive(i){return this.check(ot(0,i))},multipleOf(i,r){return this.check(Cr(i,r))},step(i,r){return this.check(Cr(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Gg(e){return mf(Si,e)}var fn=f("ZodNumberFormat",(e,t)=>{bp.init(e,t),Si.init(e,t)});function Dc(e){return ff(fn,e)}function jx(e){return gf(fn,e)}function zx(e){return hf(fn,e)}function Lx(e){return vf(fn,e)}function Ux(e){return bf(fn,e)}var _i=f("ZodBoolean",(e,t)=>{Po.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wf(e,n,i,r)});function Zg(e){return yf(_i,e)}var Ei=f("ZodBigInt",(e,t)=>{Zs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Hf(e,i,r,o),e.gte=(i,r)=>e.check(Le(i,r)),e.min=(i,r)=>e.check(Le(i,r)),e.gt=(i,r)=>e.check(Dt(i,r)),e.gte=(i,r)=>e.check(Le(i,r)),e.min=(i,r)=>e.check(Le(i,r)),e.lt=(i,r)=>e.check(Ot(i,r)),e.lte=(i,r)=>e.check(ot(i,r)),e.max=(i,r)=>e.check(ot(i,r)),e.positive=i=>e.check(Dt(BigInt(0),i)),e.negative=i=>e.check(Ot(BigInt(0),i)),e.nonpositive=i=>e.check(ot(BigInt(0),i)),e.nonnegative=i=>e.check(Le(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(Cr(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Fx(e){return _f(Ei,e)}var eu=f("ZodBigIntFormat",(e,t)=>{yp.init(e,t),Ei.init(e,t)});function Bx(e){return xf(eu,e)}function Vx(e){return Af(eu,e)}var Wg=f("ZodSymbol",(e,t)=>{Sp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yf(e,n,i,r)});function Gx(e){return If(Wg,e)}var Hg=f("ZodUndefined",(e,t)=>{_p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qf(e,n,i,r)});function Zx(e){return Tf(Hg,e)}var Yg=f("ZodNull",(e,t)=>{Ep.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kf(e,n,i,r)});function Kg(e){return $f(Yg,e)}var qg=f("ZodAny",(e,t)=>{xp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qf(e,n,i,r)});function Wx(){return Rf(qg)}var Xg=f("ZodUnknown",(e,t)=>{Ap.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r)});function pn(){return Cf(Xg)}var Jg=f("ZodNever",(e,t)=>{Ip.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jf(e,n,i,r)});function tu(e){return Nf(Jg,e)}var Qg=f("ZodVoid",(e,t)=>{Tp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xf(e,n,i,r)});function Hx(e){return Pf(Qg,e)}var Zo=f("ZodDate",(e,t)=>{$p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>tg(e,i,r,o),e.min=(i,r)=>e.check(Le(i,r)),e.max=(i,r)=>e.check(ot(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Yx(e){return wf(Zo,e)}var eh=f("ZodArray",(e,t)=>{Rp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pg(e,n,i,r),e.element=t.element,Vo(e,"ZodArray",{min(n,i){return this.check(ir(n,i))},nonempty(n){return this.check(ir(1,n))},max(n,i){return this.check(dn(n,i))},length(n,i){return this.check(mn(n,i))},unwrap(){return this.element}})});function Wo(e,t){return Df(eh,e,t)}function Kx(e){let t=e._zod.def.shape;return nu(Object.keys(t))}var Ho=f("ZodObject",(e,t)=>{Cp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fg(e,n,i,r),_.defineLazy(e,"shape",()=>t.shape),Vo(e,"ZodObject",{keyof(){return nu(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:pn()})},loose(){return this.clone({...this._zod.def,catchall:pn()})},strict(){return this.clone({...this._zod.def,catchall:tu()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return _.extend(this,n)},safeExtend(n){return _.safeExtend(this,n)},merge(n){return _.merge(this,n)},pick(n){return _.pick(this,n)},omit(n){return _.omit(this,n)},partial(...n){return _.partial(ou,this,n[0])},required(...n){return _.required(au,this,n[0])}})});function qx(e,t){let n={type:"object",shape:e??{},..._.normalizeParams(t)};return new Ho(n)}function Xx(e,t){return new Ho({type:"object",shape:e,catchall:tu(),..._.normalizeParams(t)})}function Jx(e,t){return new Ho({type:"object",shape:e,catchall:pn(),..._.normalizeParams(t)})}var Yo=f("ZodUnion",(e,t)=>{wo.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tc(e,n,i,r),e.options=t.options});function ru(e,t){return new Yo({type:"union",options:e,..._.normalizeParams(t)})}var th=f("ZodXor",(e,t)=>{Yo.init(e,t),Np.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tc(e,n,i,r),e.options=t.options});function Qx(e,t){return new th({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var rh=f("ZodDiscriminatedUnion",(e,t)=>{Yo.init(e,t),Pp.init(e,t)});function eA(e,t,n){return new rh({type:"union",options:t,discriminator:e,..._.normalizeParams(n)})}var nh=f("ZodIntersection",(e,t)=>{wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gg(e,n,i,r)});function ih(e,t){return new nh({type:"intersection",left:e,right:t})}var oh=f("ZodTuple",(e,t)=>{Ws.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hg(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function ah(e,t,n){let i=t instanceof w,r=i?n:t,o=i?t:null;return new oh({type:"tuple",items:e,rest:o,..._.normalizeParams(r)})}var hi=f("ZodRecord",(e,t)=>{kp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vg(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function sh(e,t,n){return!t||!t._zod?new hi({type:"record",keyType:Lo(),valueType:e,..._.normalizeParams(t)}):new hi({type:"record",keyType:e,valueType:t,..._.normalizeParams(n)})}function tA(e,t,n){let i=je(e);return i._zod.values=void 0,new hi({type:"record",keyType:i,valueType:t,..._.normalizeParams(n)})}function rA(e,t,n){return new hi({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(n)})}var ch=f("ZodMap",(e,t)=>{Op.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dg(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Mt(...n)),e.nonempty=n=>e.check(Mt(1,n)),e.max=(...n)=>e.check(Nr(...n)),e.size=(...n)=>e.check(ln(...n))});function nA(e,t,n){return new ch({type:"map",keyType:e,valueType:t,..._.normalizeParams(n)})}var uh=f("ZodSet",(e,t)=>{Dp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mg(e,n,i,r),e.min=(...n)=>e.check(Mt(...n)),e.nonempty=n=>e.check(Mt(1,n)),e.max=(...n)=>e.check(Nr(...n)),e.size=(...n)=>e.check(ln(...n))});function iA(e,t){return new uh({type:"set",valueType:e,..._.normalizeParams(t)})}var vi=f("ZodEnum",(e,t)=>{Mp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>rg(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new vi({...t,checks:[],..._.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new vi({...t,checks:[],..._.normalizeParams(r),entries:o})}});function nu(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new vi({type:"enum",entries:n,..._.normalizeParams(t)})}function oA(e,t){return new vi({type:"enum",entries:e,..._.normalizeParams(t)})}var lh=f("ZodLiteral",(e,t)=>{jp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ng(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function aA(e,t){return new lh({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var dh=f("ZodFile",(e,t)=>{zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ag(e,n,i,r),e.min=(n,i)=>e.check(Mt(n,i)),e.max=(n,i)=>e.check(Nr(n,i)),e.mime=(n,i)=>e.check(si(Array.isArray(n)?n:[n],i))});function sA(e){return Mf(dh,e)}var mh=f("ZodTransform",(e,t)=>{Lp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lg(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ar(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(_.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(_.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function iu(e){return new mh({type:"transform",transform:e})}var ou=f("ZodOptional",(e,t)=>{Hs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$c(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Fo(e){return new ou({type:"optional",innerType:e})}var ph=f("ZodExactOptional",(e,t)=>{Up.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$c(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function fh(e){return new ph({type:"optional",innerType:e})}var gh=f("ZodNullable",(e,t)=>{Fp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Bo(e){return new gh({type:"nullable",innerType:e})}function cA(e){return Fo(Bo(e))}var hh=f("ZodDefault",(e,t)=>{Bp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Sg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function vh(e,t){return new hh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var bh=f("ZodPrefault",(e,t)=>{Vp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_g(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function yh(e,t){return new bh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var au=f("ZodNonOptional",(e,t)=>{Gp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Sh(e,t){return new au({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var _h=f("ZodSuccess",(e,t)=>{Zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function uA(e){return new _h({type:"success",innerType:e})}var Eh=f("ZodCatch",(e,t)=>{Wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Eg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function xh(e,t){return new Eh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Ah=f("ZodNaN",(e,t)=>{Hp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ig(e,n,i,r)});function lA(e){return Of(Ah,e)}var Ko=f("ZodPipe",(e,t)=>{Ys.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xg(e,n,i,r),e.in=t.in,e.out=t.out});function Mc(e,t){return new Ko({type:"pipe",in:e,out:t})}var qo=f("ZodCodec",(e,t)=>{Ko.init(e,t),ko.init(e,t)});function dA(e,t,n){return new qo({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function mA(e){let t=e._zod.def;return new qo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Ih=f("ZodPreprocess",(e,t)=>{Ko.init(e,t),Yp.init(e,t)}),Th=f("ZodReadonly",(e,t)=>{Kp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ag(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function $h(e){return new Th({type:"readonly",innerType:e})}var Rh=f("ZodTemplateLiteral",(e,t)=>{qp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>og(e,n,i,r)});function pA(e,t){return new Rh({type:"template_literal",parts:e,..._.normalizeParams(t)})}var Ch=f("ZodLazy",(e,t)=>{Qp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Nh(e){return new Ch({type:"lazy",getter:e})}var Ph=f("ZodPromise",(e,t)=>{Jp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ig(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function fA(e){return new Ph({type:"promise",innerType:e})}var wh=f("ZodFunction",(e,t)=>{Xp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ug(e,n,i,r)});function gA(e){return new wh({type:"function",input:Array.isArray(e?.input)?ah(e?.input):e?.input??Wo(pn()),output:e?.output??pn()})}var Xo=f("ZodCustom",(e,t)=>{ef.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>cg(e,n,i,r)});function hA(e){let t=new Q({check:"custom"});return t._zod.check=e,t}function vA(e,t){return jf(Xo,e??(()=>!0),t)}function kh(e,t={}){return zf(Xo,e,t)}function Oh(e,t){return Lf(e,t)}var bA=Uf,yA=Ff;function SA(e,t={}){let n=new Xo({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,..._.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var _A=(...e)=>Bf({Codec:qo,Boolean:_i,String:bi},...e);function EA(e){let t=Nh(()=>ru([Lo(e),Gg(),Zg(),Kg(),Wo(t),sh(Lo(),t)]));return t}function xA(e,t){return new Ih({type:"pipe",in:iu(e),out:t})}var QM={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ej(e){le({customError:e})}function tj(){return le().customError}var Dh;Dh||(Dh={});var A={...zo,...Nc,iso:gi},rj=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function nj(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function ij(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function AA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return A.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return A.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=ij(r,t),a=we(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return A.null();if(r.length===0)return A.never();if(r.length===1)return A.literal(r[0]);if(r.every(a=>typeof a=="string"))return A.enum(r);let o=r.map(a=>A.literal(a));return o.length<2?o[0]:A.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return A.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return AA(a,t)});return r.length===0?A.never():r.length===1?r[0]:A.union(r)}if(!n)return A.any();let i;switch(n){case"string":{let r=A.string();if(e.format){let o=e.format;o==="email"?r=r.check(A.email()):o==="uri"||o==="uri-reference"?r=r.check(A.url()):o==="uuid"||o==="guid"?r=r.check(A.uuid()):o==="date-time"?r=r.check(A.iso.datetime()):o==="date"?r=r.check(A.iso.date()):o==="time"?r=r.check(A.iso.time()):o==="duration"?r=r.check(A.iso.duration()):o==="ipv4"?r=r.check(A.ipv4()):o==="ipv6"?r=r.check(A.ipv6()):o==="mac"?r=r.check(A.mac()):o==="cidr"?r=r.check(A.cidrv4()):o==="cidr-v6"?r=r.check(A.cidrv6()):o==="base64"?r=r.check(A.base64()):o==="base64url"?r=r.check(A.base64url()):o==="e164"?r=r.check(A.e164()):o==="jwt"?r=r.check(A.jwt()):o==="emoji"?r=r.check(A.emoji()):o==="nanoid"?r=r.check(A.nanoid()):o==="cuid"?r=r.check(A.cuid()):o==="cuid2"?r=r.check(A.cuid2()):o==="ulid"?r=r.check(A.ulid()):o==="xid"?r=r.check(A.xid()):o==="ksuid"&&(r=r.check(A.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?A.number().int():A.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=A.boolean();break}case"null":{i=A.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let d=we(l,t);r[u]=a.has(u)?d:d.optional()}if(e.propertyNames){let u=we(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?we(e.additionalProperties,t):A.any();if(Object.keys(r).length===0){i=A.record(u,l);break}let d=A.object(r).passthrough(),p=A.looseRecord(u,l);i=A.intersection(d,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),d=[];for(let g of l){let v=we(u[g],t),x=A.string().regex(new RegExp(g));d.push(A.looseRecord(x,v))}let p=[];if(Object.keys(r).length>0&&p.push(A.object(r).passthrough()),p.push(...d),p.length===0)i=A.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=A.intersection(p[0],p[1]);for(let v=2;v<p.length;v++)g=A.intersection(g,p[v]);i=g}break}let c=A.object(r);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(we(e.additionalProperties,t)):i=c.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(u=>we(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?we(o,t):void 0;c?i=A.tuple(a).rest(c):i=A.tuple(a),typeof e.minItems=="number"&&(i=i.check(A.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(A.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>we(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?we(e.additionalItems,t):void 0;c?i=A.tuple(a).rest(c):i=A.tuple(a),typeof e.minItems=="number"&&(i=i.check(A.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(A.maxLength(e.maxItems)))}else if(o!==void 0){let a=we(o,t),c=A.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=A.array(A.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function we(e,t){if(typeof e=="boolean")return e?A.any():A.never();let n=AA(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>we(l,t)),u=A.union(c);n=i?A.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>we(l,t)),u=A.xor(c);n=i?A.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:A.any();else{let c=i?n:we(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=A.intersection(c,we(e.allOf[l],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=A.nullable(n)),e.readOnly===!0&&(n=A.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of o)c in e&&(r[c]=e[c]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let c of a)c in e&&(r[c]=e[c]);for(let c of Object.keys(e))rj.has(c)||(r[c]=e[c]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function IA(e,t){if(typeof e=="boolean")return e?A.any():A.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=nj(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Te};return we(n,o)}var Mh={};wt(Mh,{bigint:()=>cj,boolean:()=>sj,date:()=>uj,number:()=>aj,string:()=>oj});function oj(e){return of(bi,e)}function aj(e){return pf(Si,e)}function sj(e){return Sf(_i,e)}function cj(e){return Ef(Ei,e)}function uj(e){return kf(Zo,e)}le(Ks());var lj=Object.defineProperty,dj=(e,t)=>lj(e,"name",{value:t,configurable:!0});var TA=/^[A-Za-z][A-Za-z0-9]*$/,$A=128;var jh=s.object({legacyAnchor:s.string().min(1).max($A).regex(TA,"legacyAnchor must be alphanumeric and start with a letter"),legacyOwnerId:s.string().min(1).max(512).optional(),legacySgDescription:s.string().min(1).max(255).optional()}).strict(),mj=s.record(s.string().min(1),s.record(s.string().min(1),jh)),pj=s.record(s.string().min(1),s.record(s.string().min(1),s.record(s.string().min(1),jh)));function RA(e,t){if(e===void 0)return;let n={};for(let[i,r]of Object.entries(e)){let o=r[t];o===void 0||Object.keys(o).length===0||(n[i]=o)}return Object.keys(n).length===0?void 0:n}dj(RA,"projectCapacityIdentityToTarget");var fj=Object.defineProperty,gj=(e,t)=>fj(e,"name",{value:t,configurable:!0});function CA(e){let t=new Map;for(let n of e){let i=nn(n);if(i==="")return{kind:"empty-construct-key",name:n};let r=t.get(i);if(r!==void 0)return{kind:"duplicate-construct-key",name:n,existingName:r,constructKey:i};t.set(i,n)}return null}gj(CA,"findAccountNameCollision");var hj=Object.defineProperty,Jo=(e,t)=>hj(e,"name",{value:t,configurable:!0}),xi="us-east-2";var mt=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA",optIn:!1},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA",optIn:!1},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA",optIn:!1},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland",optIn:!1},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany",optIn:!1},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore",optIn:!1},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan",optIn:!1},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia",optIn:!1},{code:"us-west-1",name:"US West",city:"N. California",country:"USA",optIn:!1},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada",optIn:!1},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa",optIn:!0},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"Hong Kong",optIn:!0},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea",optIn:!1},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan",optIn:!1},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India",optIn:!1},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India",optIn:!0},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia",optIn:!0},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia",optIn:!0},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland",optIn:!0},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden",optIn:!1},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy",optIn:!0},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain",optIn:!0},{code:"eu-west-2",name:"EU West",city:"London",country:"UK",optIn:!1},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France",optIn:!1},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE",optIn:!0},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain",optIn:!0},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil",optIn:!1},{code:"ap-southeast-5",name:"Asia Pacific",city:"Kuala Lumpur",country:"Malaysia",optIn:!0},{code:"ap-southeast-6",name:"Asia Pacific",city:"Auckland",country:"New Zealand",optIn:!0},{code:"ap-southeast-7",name:"Asia Pacific",city:"Bangkok",country:"Thailand",optIn:!0},{code:"ap-east-2",name:"Asia Pacific",city:"Taipei",country:"Taiwan",optIn:!0},{code:"ca-west-1",name:"Canada West",city:"Calgary",country:"Canada",optIn:!0},{code:"il-central-1",name:"Israel",city:"Tel Aviv",country:"Israel",optIn:!0},{code:"mx-central-1",name:"Mexico",city:"Central",country:"Mexico",optIn:!0}]),ar=Object.freeze(mt.map(e=>e.code)),su=new Set(mt.filter(e=>e.optIn).map(e=>e.code));function cu(e){return`${e} is an opt-in region: it must be enabled in the AWS account (Account settings \u2192 Regions) before deployment will succeed.`}Jo(cu,"optInRegionWarning");function Ai(e){return mt.find(t=>t.code===e)}Jo(Ai,"getRegionInfo");function Ii(e){let t=e.split("-");return t.length===3&&t[0]&&t[1]&&t[2]?`${t[0]}${t[1][0]}${t[2]}`:e}Jo(Ii,"abbreviateRegion");var vj=Object.freeze({"Europe/London":"eu-west-2","Europe/Jersey":"eu-west-2","Europe/Guernsey":"eu-west-2","Europe/Isle_of_Man":"eu-west-2","Europe/Dublin":"eu-west-1","Europe/Paris":"eu-west-3","Europe/Berlin":"eu-central-1","Europe/Amsterdam":"eu-central-1","Europe/Brussels":"eu-central-1","Europe/Luxembourg":"eu-central-1","Europe/Vienna":"eu-central-1","Europe/Prague":"eu-central-1","Europe/Warsaw":"eu-central-1","Europe/Budapest":"eu-central-1","Europe/Zurich":"eu-central-2","Europe/Stockholm":"eu-north-1","Europe/Oslo":"eu-north-1","Europe/Copenhagen":"eu-north-1","Europe/Helsinki":"eu-north-1","Europe/Tallinn":"eu-north-1","Europe/Riga":"eu-north-1","Europe/Vilnius":"eu-north-1","Europe/Rome":"eu-south-1","Europe/Malta":"eu-south-1","Europe/Athens":"eu-south-1","Europe/Madrid":"eu-south-2","Europe/Lisbon":"eu-south-2","America/New_York":"us-east-1","America/Detroit":"us-east-1","America/Toronto":"ca-central-1","America/Montreal":"ca-central-1","America/Halifax":"ca-central-1","America/Winnipeg":"ca-central-1","America/Chicago":"us-east-2","America/Indiana/Indianapolis":"us-east-2","America/Mexico_City":"us-east-2","America/Denver":"us-west-2","America/Phoenix":"us-west-2","America/Edmonton":"us-west-2","America/Vancouver":"us-west-2","America/Los_Angeles":"us-west-1","America/Tijuana":"us-west-1","America/Sao_Paulo":"sa-east-1","America/Argentina/Buenos_Aires":"sa-east-1","America/Santiago":"sa-east-1","America/Montevideo":"sa-east-1","America/Lima":"sa-east-1","America/Bogota":"us-east-1","Asia/Tokyo":"ap-northeast-1","Asia/Seoul":"ap-northeast-2","Asia/Hong_Kong":"ap-east-1","Asia/Shanghai":"ap-east-1","Asia/Taipei":"ap-east-1","Asia/Macau":"ap-east-1","Asia/Singapore":"ap-southeast-1","Asia/Kuala_Lumpur":"ap-southeast-1","Asia/Bangkok":"ap-southeast-1","Asia/Ho_Chi_Minh":"ap-southeast-1","Asia/Manila":"ap-southeast-1","Asia/Jakarta":"ap-southeast-3","Asia/Kolkata":"ap-south-1","Asia/Calcutta":"ap-south-1","Asia/Karachi":"ap-south-1","Asia/Dhaka":"ap-south-1","Asia/Colombo":"ap-south-1","Asia/Dubai":"me-central-1","Asia/Muscat":"me-central-1","Asia/Qatar":"me-south-1","Asia/Bahrain":"me-south-1","Asia/Riyadh":"me-south-1","Asia/Kuwait":"me-south-1","Asia/Jerusalem":"me-south-1","Australia/Sydney":"ap-southeast-2","Australia/Brisbane":"ap-southeast-2","Australia/Canberra":"ap-southeast-2","Australia/Melbourne":"ap-southeast-4","Australia/Hobart":"ap-southeast-4","Australia/Adelaide":"ap-southeast-4","Pacific/Auckland":"ap-southeast-2","Pacific/Honolulu":"us-west-1","Africa/Johannesburg":"af-south-1","Africa/Casablanca":"eu-south-2","Africa/Cairo":"me-south-1","Indian/Maldives":"ap-south-1"}),bj=Object.freeze({Europe:"eu-central-1",America:"us-east-1",Asia:"ap-southeast-1",Australia:"ap-southeast-2",Pacific:"ap-southeast-2",Africa:"af-south-1",Atlantic:"eu-west-1",Indian:"ap-south-1"}),yj=Object.freeze({"af-south-1":"eu-west-1","ap-east-1":"ap-southeast-1","ap-southeast-3":"ap-southeast-1","ap-southeast-4":"ap-southeast-2","eu-central-2":"eu-central-1","eu-south-1":"eu-central-1","eu-south-2":"eu-west-3","me-central-1":"ap-south-1","me-south-1":"ap-south-1"});function zh(e){return su.has(e)?yj[e]??xi:e}Jo(zh,"toDeployableRegion");function uu(e){if(!e)return;let t=vj[e];if(t!==void 0)return zh(t);let n=e.split("/")[0];if(n===void 0)return;let i=bj[n];return i===void 0?void 0:zh(i)}Jo(uu,"suggestRegionForTimezone");var Sj=Object.defineProperty,Qo=(e,t)=>Sj(e,"name",{value:t,configurable:!0});function lu(e){return kt(e).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}Qo(lu,"slugifyAccountName");function NA(e,t){let n=lu(e),i=lu(t);return n===""?i:i===""?n:`${n}-${i}`}Qo(NA,"defaultConnectedAccountName");function PA(e,t){let n=lu(t);return n===""?e:`${e}-${n}`}Qo(PA,"suffixedAccountName");var wA=new Set(mt.map(e=>Ii(e.code)));function kA(e){let t=e.toLowerCase().split(/[-\s_]+/).filter(i=>i.length>0),n=t[t.length-1];if(n!==void 0&&wA.has(n))return n}Qo(kA,"findTrailingRegionShortCode");function OA(e){return`Account name must not end with a region code ("-${e}") \u2014 the region is added automatically when deploying. Remove the "-${e}" suffix.`}Qo(OA,"regionSuffixRejectionMessage");var _j=Object.defineProperty,Ti=(e,t)=>_j(e,"name",{value:t,configurable:!0});function Tt(e){return e instanceof Error?e:new Error(String(e))}Ti(Tt,"normaliseError");function zt(e){return e instanceof Error?e.message:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e?String(e.message):"An unknown error occurred"}Ti(zt,"getErrorMessage");function du(e,t){return!e||typeof e!="object"?!1:"code"in e&&e.code===t}Ti(du,"hasErrorCode");function ea(e){if(!(!e||typeof e!="object")&&"code"in e&&typeof e.code=="string")return e.code}Ti(ea,"getErrorCode");function mu(e){return e instanceof Error?e.stack:void 0}Ti(mu,"getErrorStack");function pu(e){let t=zt(e),n=ea(e);return n&&n!=="UNKNOWN_ERROR"?`[${n}] ${t}`:t}Ti(pu,"formatErrorString");var Ej=Object.defineProperty,xj=(e,t)=>Ej(e,"name",{value:t,configurable:!0});function DA(e){let t,n=!1;return()=>(n||(t=e(),n=!0),t)}xj(DA,"singleton");var Aj=Object.defineProperty,Uh=(e,t)=>Aj(e,"name",{value:t,configurable:!0}),jA=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);function zA(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!jA.has(t.toUpperCase())))}Uh(zA,"filterDangerousEnvVars");var Ij=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g,Fe="***",Lh="[REDACTED]",MA=`-----BEGIN ${Lh} PRIVATE KEY-----...-----END ${Lh} PRIVATE KEY-----`;function Or(e){return e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>MA).replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>MA).replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,(t,n,i)=>`${n}${Fe}${i}`).replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,(t,n,i)=>`${n}${i}${Fe}`).replace(/(?<="[a-zA-Z0-9_-]*(?:password|passwd|secret|api[_-]?key|token|auth|credential)":\s*")(?!ghu_|ghs_|ghp_|gho_|github_pat_|(?:sk|rk)_(?:live|test)_|whsec_|fjall_(?:ak|dk)_|AKIA|ASIA|%[a-zA-Z])[^"]+/gi,Fe).replace(/(?<=(?<!\/)(?:password|passwd|secret|api[_-]?key|token|auth|credential)\s*[=:]\s*["']?)(?!ghu_|ghs_|ghp_|gho_|github_pat_|(?:sk|rk)_(?:live|test)_|whsec_|fjall_(?:ak|dk)_|AKIA|ASIA|%[a-zA-Z])[^\s"']+/gi,Fe).replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,(t,n)=>`${n}${Fe}`).replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,(t,n,i)=>`${n}_${i}_${Fe}`).replace(/\bwhsec_[A-Za-z0-9]{8,}/g,()=>`whsec_${Fe}`).replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,Fe).replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,(t,n)=>`${n}${Fe}`).replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,Fe).replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,Fe).replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,Fe).replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,Fe).replace(Ij,(t,n)=>`${n}${Fe}`)}Uh(Or,"maskSensitiveOutput");function LA(e){let t=[],n="",i=!1,r=!1,o=!1,a=!1;for(let c of e){if(o){n+=c,o=!1;continue}if(c==="\\"&&!i){o=!0;continue}if(c==="'"&&!r){i=!i,a=!0;continue}if(c==='"'&&!i){r=!r,a=!0;continue}if(c===" "&&!i&&!r){(n||a)&&(t.push(n),n="",a=!1);continue}n+=c}if(i||r)throw new Error(`Unbalanced ${i?"single":"double"} quote in command: ${e.slice(0,80)}`);if(o)throw new Error(`Trailing backslash in command: ${e.slice(0,80)}`);return(n||a)&&t.push(n),t}Uh(LA,"parseShellArgs");var Tj=Object.defineProperty,$j=(e,t)=>Tj(e,"name",{value:t,configurable:!0}),Rj=$j(e=>new Promise(t=>setTimeout(t,e)),"sleep");var Cj=Object.defineProperty,UA=(e,t)=>Cj(e,"name",{value:t,configurable:!0});async function FA(e,t,n){let i=new Array(e.length);if(e.length===0)return i;let r=Math.max(1,Math.min(t,e.length)),o=0,a=UA(async()=>{for(;o<e.length;){let c=o++;try{let u=await n(e[c],c);i[c]={status:"fulfilled",value:u}}catch(u){i[c]={status:"rejected",reason:u}}}},"worker");return await Promise.all(Array.from({length:r},()=>a())),i}UA(FA,"mapSettledWithConcurrency");var Nj=Object.defineProperty,Dr=(e,t)=>Nj(e,"name",{value:t,configurable:!0}),Fh=["production","staging","development","platform","compliance"],BA={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"},Pj=new Set(Fh);function fu(e){return Pj.has(e)}Dr(fu,"isAccountStage");var $i={ROOT:"root",PLATFORM:"platform"},wj=[...Fh,$i.ROOT];function VA(e){return fu(e)?BA[e]:e.charAt(0).toUpperCase()+e.slice(1)}Dr(VA,"getEnvironmentLabel");var Bh=["organisation","platform","account"],kj=s.enum(Bh),ta={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"},Oj={[ta.ORGANISATION]:!0,[ta.PLATFORM]:!0,[ta.ACCOUNT]:!0},Dj=new Set(Object.keys(Oj));function GA(e){return Dj.has(e)}Dr(GA,"isAccountTier");var ZA=Bh.filter(e=>e!==ta.ACCOUNT),Mj=new Set(ZA);function gu(e){return Mj.has(e)}Dr(gu,"isGovernanceTier");function Vh(e){return e===$i.ROOT?"organisation":e===$i.PLATFORM?"platform":"account"}Dr(Vh,"environmentToTier");function WA(e){return e==null||e===""||e===$i.ROOT?null:fu(e)?e:null}Dr(WA,"stageFromWireEnvironment");function Ri(e){return e.tier??Vh(e.environment)}Dr(Ri,"accountTier");function HA(e){return Ri(e)==="organisation"?$i.ROOT:e.environment??void 0}Dr(HA,"resolveSynthEnvironment");var jj=Object.defineProperty,ra=(e,t)=>jj(e,"name",{value:t,configurable:!0});var YA=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),Gh=new Set;function KA(e){if(!e)return"compute";if(e.startsWith("Custom::"))return YA[e]??"compute";let t=YA[e];return t||Gh.add(e),t??"compute"}ra(KA,"categoriseResource");function zj(){return new Set(Gh)}ra(zj,"getUnmappedResourceTypes");function Lj(){Gh.clear()}ra(Lj,"clearUnmappedResourceTypes");var Uj=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),Fj=30;function qA(e){return Uj[e]??Fj}ra(qA,"getExpectedDuration");var Bj=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"});function XA(e){return Bj[e]||e.split("::").pop()||e}ra(XA,"getFriendlyResourceType");var Vj=Object.defineProperty,Gj=(e,t)=>Vj(e,"name",{value:t,configurable:!0}),Zj={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},Wj=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,Hj=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,Yj=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/;function JA(e){if(!e)return null;let t=e.replace(/^(https?:\/\/)[^@]+@/,"$1"),n=t.match(Wj)??t.match(Hj)??e.match(Yj);if(!n)return null;let[,i,r,o]=n;return!i||!r||!o?null:{provider:Zj[i]??"other",owner:r,repo:o,host:i}}Gj(JA,"parseGitRemoteUrl");var Zh=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy","deploy:oidc:mint","deploy:governance"],QA={read:"user",write:"user",deploy:"user","secrets:read":"user","secrets:write":"user",destroy:"user",admin:"admin","applications:read":"user","applications:deploy":"user","deploy:oidc:mint":"machine","deploy:governance":"machine"},Kj=Zh.filter(e=>QA[e]==="machine");var qj=Zh.filter(e=>QA[e]==="user");var Xj=Object.defineProperty,Ci=(e,t)=>Xj(e,"name",{value:t,configurable:!0}),vu=/^[a-zA-Z_][a-zA-Z0-9._-]*$/,Wh="Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",na=/^[a-zA-Z][a-zA-Z0-9._-]*$/,bu="Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";var hu=s.string().regex(na,bu),eI=s.object({app:hu.describe("Application name"),cluster:hu.optional().describe("Cluster name"),service:hu.optional().describe("Service name"),lambda:hu.optional().describe("Lambda function name")}).strict().refine(e=>!(e.service&&!e.cluster),{message:"Cluster is required when service is specified"}).refine(e=>!(e.lambda&&(e.cluster||e.service)),{message:"Lambda is mutually exclusive with cluster and service"}).refine(e=>e.cluster!=="lambda",{message:'The cluster name "lambda" is reserved for lambda-scoped parameter paths'});function Hh(e){let t=[e.app];return e.lambda?t.push("lambda",e.lambda):(e.cluster&&t.push(e.cluster),e.service&&e.cluster&&t.push(e.service)),t}Ci(Hh,"buildNamespaceParts");function Yh(e,t){let n=Hh(e);return t&&n.push(t),"/"+n.join("/")}Ci(Yh,"buildParameterPath");function Kh(e){let t=e.split("/").filter(Boolean);if(t.length<2)return null;let n=t[t.length-1]??"",i={app:t[0]??""};return t.length>=4&&t[1]==="lambda"?i.lambda=t[2]:t.length>=3&&(i.cluster=t[1],t.length>=4&&(i.service=t[2])),{namespace:i,name:n}}Ci(Kh,"parseParameterPath");function tI(e){let t=Kh(e);return t?eI.safeParse(t.namespace).success&&Yh(t.namespace,t.name)===e:!1}Ci(tI,"isManageablePath");function rI(e){let t={};for(let n of e.split(`
165
+ `)){let i=n.trim();if(!i||i.startsWith("#"))continue;let r=i.replace(/^export\s+/,""),o=r.indexOf("=");if(o===-1)continue;let a=r.slice(0,o).trim();if(!vu.test(a))continue;let c=r.slice(o+1);c.length>=2&&c.startsWith('"')&&c.endsWith('"')?t[a]=c.slice(1,-1).replace(/\\([\\"$`nr])/g,(u,l)=>l==="n"?`
166
+ `:l==="r"?"\r":l):c.length>=2&&c.startsWith("'")&&c.endsWith("'")?t[a]=c.slice(1,-1):t[a]=c}return t}Ci(rI,"parseDotEnv");function nI(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}Ci(nI,"escapeDotEnvValue");var iI=s.object({awsAccountId:s.string(),accountName:s.string().nullable(),status:s.string(),role:s.string(),roleArn:s.string(),environment:s.string().optional(),connectedAt:s.string()}),Jj=s.object({accounts:s.array(iI)});var Qj=Object.defineProperty,gn=(e,t)=>Qj(e,"name",{value:t,configurable:!0});function qh(e){let t=[e.primaryRegion,...e.secondaryRegions??[],e.disasterRecoveryRegion].filter(n=>n!==void 0);return[...new Set(t)]}gn(qh,"deriveRegionsFromOrgConfig");function Xh(e){return e.environment??Ri(e)}gn(Xh,"environmentOrTier");function Jh(e,t){return`${e.toLowerCase()}-${Ii(t)}`}gn(Jh,"generateTargetName");function Qh(e,t){let n=[];for(let i of e){if(Ri(i)==="organisation")continue;let r=Xh(i);for(let o of t)n.push({name:Jh(i.name,o),accountName:i.name,accountId:i.id,environment:r,region:o})}return n.sort((i,r)=>{let o=i.environment.localeCompare(r.environment);if(o!==0)return o;let a=i.accountName.localeCompare(r.accountName);return a!==0?a:i.region.localeCompare(r.region)})}gn(Qh,"deriveTargets");function oI(e){return Qh(e.providerAccounts,qh(e))}gn(oI,"deriveAllTargets");function ez(e,t){if(t.length===0)return e;let n=new Set([e.primaryRegion,e.disasterRecoveryRegion].filter(Boolean)),i=t.filter(r=>!n.has(r));return{...e,secondaryRegions:i.length>0?i:void 0}}gn(ez,"mergeSecondaryRegions");function aI(e,t){return e.find(n=>n.name===t)}gn(aI,"findTarget");var tz=Object.defineProperty,rz=(e,t)=>tz(e,"name",{value:t,configurable:!0});function sI(e,t){if(t!==void 0){if(t.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${t}/fjall/${e}`}return`fjall/${e}`}rz(sI,"buildAppConfigPath");var nz=Object.defineProperty,Ni=(e,t)=>nz(e,"name",{value:t,configurable:!0}),ev="infrastructure.ts",tv="fjall";function cI(e,t){let n=t?.excludedPathPrefixes,i=t?.excludedPathSegments,r=[];for(let o of e){if(!rv(o.path)||n&&lI(o.path,n)||i&&dI(o.path,i))continue;let a=nv(o.path);a!==null&&r.push({configPath:uI(o.path),boundaryPath:a})}return r}Ni(cI,"findInfrastructurePaths");function rv(e){return e===ev||e.endsWith(`/${ev}`)}Ni(rv,"isInfrastructureFile");function nv(e){let t=e.split("/");for(let n=0;n<t.length-1;n++)if(t[n]===tv)return t.slice(0,n+1).join("/");return null}Ni(nv,"findBoundaryPath");function uI(e){return e.slice(0,-`/${ev}`.length)}Ni(uI,"toConfigDir");function lI(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}Ni(lI,"hasExcludedPrefix");function dI(e,t){let n=e.split("/");for(let i=0;i<n.length-1;i++)if(t.has(n[i]))return!0;return!1}Ni(dI,"hasExcludedSegment");var iz=Object.defineProperty,iv=(e,t)=>iz(e,"name",{value:t,configurable:!0});function mI(e){if(e.length===0)return null;let t=[];for(let i of e){let r=pI(i.boundaryPath);if(r===null)return null;t.push(r)}let n=fI(t);return n.length===0?null:n.join("/")}iv(mI,"inferContainerFromCandidates");function pI(e){let t=e.split("/").filter(i=>i.length>0);if(t.length===0||t[t.length-1]!==tv)return null;let n=t.slice(0,t.length-1);return n.length===0?null:n}iv(pI,"extractContainer");function fI(e){if(e.length===0)return[];let[t,...n]=e,i=[];for(let r=0;r<t.length;r+=1){let o=t[r];for(let a of n)if(a[r]!==o)return i;i.push(o)}return i}iv(fI,"longestCommonPrefix");var oz=Object.defineProperty,gI=(e,t)=>oz(e,"name",{value:t,configurable:!0}),hI=["fjall","organisation","platform","account","domain"];function vI(e){return hI.includes(e.toLowerCase())}gI(vI,"isReservedAppName");var bI="-cache";function yI(e){return kt(e).endsWith(bI)}gI(yI,"hasReservedAppNameSuffix");var az=Object.defineProperty,ov=(e,t)=>az(e,"name",{value:t,configurable:!0});function _I(e){return{success:!0,data:e}}ov(_I,"success");function ia(e){return{success:!1,error:e}}ov(ia,"failure");var SI="sha256:",yu=12,sz=new RegExp(`-sha-[0-9a-f]{${yu}}$`);function EI(e,t,n){if(!e.startsWith(SI))return ia(new Error(`expected sha256:... digest, got ${e.slice(0,32)}`));let i=e.slice(SI.length);if(i.length<yu)return ia(new Error(`digest hex payload too short (need >=${yu} chars, got ${i.length})`));let r=t.trim();if(r==="")return ia(new Error("serviceName must be a non-empty string"));let o;if(n!==void 0){let u=n.trim();if(u==="")return ia(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=u.toLowerCase()}let a=i.slice(0,yu).toLowerCase(),c=o!==void 0?`${r.toLowerCase()}-${o}`:r.toLowerCase();return _I(`${c}-sha-${a}`)}ov(EI,"deriveContentHashTag");var cz=Object.defineProperty,uz=(e,t)=>cz(e,"name",{value:t,configurable:!0}),xI=["full","code-only","rollback","restart"],lz=s.enum(xI),AI=/^[a-zA-Z0-9._-]+$/,II=s.string().min(1).max(128).regex(AI),TI=s.object({serviceName:s.string().min(1),imageTag:II,imageDigest:s.string().min(1).optional(),imageUri:s.string().min(1),ecrRepositoryArn:s.string().min(1).optional(),taskDefinitionArn:s.string().min(1).optional(),previousTaskDefinitionArn:s.string().min(1).optional(),functionArn:s.string().min(1).optional(),publishedVersion:s.string().min(1).optional()}).strict(),dz=s.array(TI);function $I(e,t){return`${e}${t}`}uz($I,"artefactOutputKey");var mz=Object.defineProperty,RI=(e,t)=>mz(e,"name",{value:t,configurable:!0}),Lt=["payload","nextjs","staticsite"],av=new Set(Lt);function sv(e){return typeof e=="string"&&av.has(e)}RI(sv,"isPatternType");var Pi={payload:{label:"Payload CMS",constructIdSuffix:"Payload",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!0},nextjs:{label:"Next.js",constructIdSuffix:"Nextjs",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!1},staticsite:{label:"Static site",constructIdSuffix:"StaticSite",artefact:"static-assets",stackPlacement:"cdn",deployable:!0}},CI=Lt.filter(e=>Pi[e].deployable),cv=Lt.filter(e=>Pi[e].artefact==="opennext-lambda"),pz=new Set(cv);function uv(e){return e!=null&&pz.has(e)}RI(uv,"isOpenNextPatternType");var oa=["multipage","spa"];var fz=Object.defineProperty,lv=(e,t)=>fz(e,"name",{value:t,configurable:!0}),NI="noreply";function PI(e){return`${NI}@${e}`}lv(PI,"defaultFormsFromAddress");function wI(e){return`https://${e}`}lv(wI,"defaultFormsCorsOrigin");function Su(e,t){let n=e.split("@");if(n.length!==2)return!1;let[i,r]=n;return i===void 0||i===""||r===void 0?!1:r.toLowerCase()===t.toLowerCase()}lv(Su,"isAddressAtDomain");var kI=2;var gz=s.object({devDomain:s.string().min(1),hostedZoneId:s.string().min(1).optional(),parentDomain:s.string().min(1).optional(),parentDelegationRoleArn:s.string().min(1).optional()}).strict().superRefine((e,t)=>{if(e.hostedZoneId!==void 0){e.parentDomain!==void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDomain \u2014 the adopted zone was already delegated; omit parentDomain"}),e.parentDelegationRoleArn!==void 0&&t.addIssue({code:"custom",path:["parentDelegationRoleArn"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDelegationRoleArn \u2014 the adopted zone was already delegated; omit parentDelegationRoleArn"});return}e.parentDelegationRoleArn!==void 0&&e.parentDomain===void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDelegationRoleArn requires parentDomain \u2014 set parentDomain to the parent zone the DelegationRole belongs to"}),e.parentDomain!==void 0&&!e.devDomain.endsWith(`.${e.parentDomain}`)&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDomain must be a proper DNS suffix of devDomain \u2014 devDomain must end with `.<parentDomain>`"})}),OI={appId:s.string().min(1),appKebab:s.string().min(1),engineVersion:s.string().min(1).optional(),adoptSlotEcr:s.boolean().optional(),adoptCacheEcr:s.boolean().optional(),phase:s.enum(["zone","full"]).optional(),domain:gz.optional()},hz=s.object(OI).strict(),vz=s.object({...OI,version:s.literal(kI),appName:s.string().min(1)}).strict().refine(e=>e.appName===`fjall-dev-${e.appKebab}`,{message:"appName must equal `fjall-dev-${appKebab}` (single-source identity)",path:["appName"]});var DI=["permissions","validation","dependency","limit","network","unknown"];var bz=Object.defineProperty,hn=(e,t)=>bz(e,"name",{value:t,configurable:!0}),jI=["preflight","credentials","synth","bootstrap","image_build","image_push","cloudformation","ecs_stabilise","platform","unknown"],zI=s.enum(jI),LI=["customer_code","customer_aws","platform","indeterminate"],UI=s.enum(LI),FI=["cloudformation","ecs","ecr","iam","docker","cdk","npm","other"],BI=s.enum(FI),VI=/^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)*$/,GI=1,ie={code:128,title:120,detail:1e3,providerCode:128,providerMessage:2e3,resourceField:256,remediationStep:1024,remediationSteps:10,excerpt:2e3,logRef:512,classifierVersion:32,analysisString:2e3,analysisAffectedResources:50,analysisDependencyChain:50,analysisRemediation:20,analysisDriftSuspects:50,errorMessageWire:2e3,errorMessageDb:1e4},MI=s.object({logicalId:s.string(),resourceType:s.string(),status:s.string(),statusReason:s.string().optional(),physicalId:s.string().optional(),timestamp:s.string().optional(),group:s.string().optional(),constructPath:s.string().optional()}),yz=s.object({logicalId:s.string(),resourceType:s.string(),physicalId:s.string().optional(),failedStatus:s.string(),statusReason:s.string()}),ZI=s.object({rootCause:s.object({resource:MI,reason:s.string(),category:s.enum(DI),isDirectCause:s.boolean()}),affectedResources:s.array(MI),dependencyChain:s.array(s.string()),summary:s.string(),remediation:s.array(s.string()),errorPattern:s.string().optional(),driftSuspects:s.array(yz).optional()}),WI=s.object({source:BI,code:s.string().min(1).max(ie.providerCode).optional(),message:s.string().max(ie.providerMessage)}).strict(),HI=s.object({logicalId:s.string().min(1).max(ie.resourceField).optional(),resourceType:s.string().min(1).max(ie.resourceField).optional(),stackName:s.string().min(1).max(ie.resourceField).optional()}).strict(),YI=s.object({schemaVersion:s.literal(GI),code:s.string().min(1).max(ie.code).regex(VI,"Failure codes are dotted lowercase keys, e.g. cfn.resource_create_failed"),phase:zI,fault:UI,title:s.string().min(1).max(ie.title),detail:s.string().min(1).max(ie.detail),provider:WI.optional(),resource:HI.optional(),remediation:s.array(s.string().min(1).max(ie.remediationStep)).max(ie.remediationSteps).default(()=>[]),excerpt:s.string().min(1).max(ie.excerpt).optional(),logRef:s.string().min(1).max(ie.logRef).optional(),analysis:ZI.optional(),classifierVersion:s.string().min(1).max(ie.classifierVersion)}).strict();function KI(e){if(e==null)return null;let t=YI.safeParse(e);return t.success?t.data:null}hn(KI,"parseDeploymentFailure");var qI="https://docs.fjall.io/errors";function XI(e){return`${qI}/${e}`}hn(XI,"deploymentFailureDocsUrl");function JI(e){let t=`${e.title}: ${e.detail}`;return t.length>ie.errorMessageWire?t.slice(0,ie.errorMessageWire):t}hn(JI,"deriveErrorMessageFromFailure");function Mr(e){return e.length>ie.analysisString?e.slice(0,ie.analysisString):e}hn(Mr,"truncateAnalysisString");function dv(e){return{logicalId:e.logicalId,resourceType:e.resourceType,status:e.status,timestamp:e.timestamp.toISOString(),...e.statusReason!==void 0&&{statusReason:Mr(e.statusReason)},...e.physicalId!==void 0&&{physicalId:e.physicalId},...e.group!==void 0&&{group:e.group},...e.constructPath!==void 0&&{constructPath:e.constructPath}}}hn(dv,"toWireResourceEvent");function QI(e){return{logicalId:e.logicalId,resourceType:e.resourceType,failedStatus:e.failedStatus,statusReason:Mr(e.statusReason),...e.physicalId!==void 0&&{physicalId:e.physicalId}}}hn(QI,"toWireDriftSuspect");function eT(e){return{rootCause:{resource:dv(e.rootCause.resource),reason:Mr(e.rootCause.reason),category:e.rootCause.category,isDirectCause:e.rootCause.isDirectCause},affectedResources:e.affectedResources.slice(0,ie.analysisAffectedResources).map(dv),dependencyChain:e.dependencyChain.slice(0,ie.analysisDependencyChain).map(Mr),summary:Mr(e.summary),remediation:e.remediation.slice(0,ie.analysisRemediation).map(Mr),...e.errorPattern!==void 0&&{errorPattern:Mr(e.errorPattern)},...e.driftSuspects!==void 0&&{driftSuspects:e.driftSuspects.slice(0,ie.analysisDriftSuspects).map(QI)}}}hn(eT,"toDeploymentFailureAnalysis");var Sz=Object.defineProperty,_u=(e,t)=>Sz(e,"name",{value:t,configurable:!0}),_z=[/❌/,/Resource handler returned message/i,/(?:CREATE|UPDATE|DELETE|IMPORT)_FAILED/,/ROLLBACK_(?:IN_PROGRESS|COMPLETE|FAILED)/],Ez=[/npm ERR!/,/error TS\d+/,/SyntaxError:/],xz=[/Error occurred/i,/\berror:/i,/\bfailed:/i,/\bdenied\b/i,/\bexception\b/i],Az=[..._z,...Ez,...xz],tT=20,jr="\u2026";function rT(e,t){let n=Math.max(0,t);if(e.length<=n)return e;let i=n,r=e.charCodeAt(i-1);return r>=55296&&r<=56319&&(i-=1),e.slice(0,i)}_u(rT,"truncateUtf16Safe");function nT(e){let t=e.charCodeAt(0);return t>=56320&&t<=57343?e.slice(1):e}_u(nT,"trimLeadingLoneSurrogate");function iT(e){return Az.some(t=>t.test(e))}_u(iT,"isAnchorLine");function oT(e,t={}){let n=t.maxLength??ie.excerpt,i=t.contextLines??tT,r=Or(e);if(r.length<=n)return r;let o=r.split(`
167
+ `),a=o.findIndex(iT);if(a===-1)return jr+nT(r.slice(-(n-1)));let c=Math.min(o.length,a+i+1),u=o.slice(a,c).join(`
168
168
  `),l=a>0,d=c<o.length,p=n-(l?jr.length+1:0)-jr.length;if(u.length>p)return(l?`${jr}
169
- `:"")+tT(u,p)+jr;let g=Math.max(0,a-i),v=d?`
170
- ${jr}`:"",x=[],G=0;for(let rt=a-1;rt>=g;rt--){let _e=o[rt]??"",J=G+_e.length+1;if((rt>0?jr.length+1:0)+J+u.length+v.length>n)break;x.unshift(_e),G=J}let j=a-x.length>0?`${jr}
169
+ `:"")+rT(u,p)+jr;let g=Math.max(0,a-i),v=d?`
170
+ ${jr}`:"",x=[],G=0;for(let nt=a-1;nt>=g;nt--){let _e=o[nt]??"",J=G+_e.length+1;if((nt>0?jr.length+1:0)+J+u.length+v.length>n)break;x.unshift(_e),G=J}let j=a-x.length>0?`${jr}
171
171
  `:"",he=x.length>0?`${x.join(`
172
172
  `)}
173
- `:"";return j+he+u+v}Eu(iT,"extractErrorWindow");import{existsSync as f$,mkdirSync as AU,statSync as IU,appendFileSync as TU}from"fs";import{join as g$}from"path";import{join as Wv}from"path";var Iz=Object.defineProperty,oT=(e,t)=>Iz(e,"name",{value:t,configurable:!0});function aT(e){return e.mode==="cli"}oT(aT,"isCLIMode");function sT(e){return e.mode==="ink"}oT(sT,"isInkMode");function cT(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function uT(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
173
+ `:"";return j+he+u+v}_u(oT,"extractErrorWindow");import{existsSync as g$,mkdirSync as IU,statSync as TU,appendFileSync as $U}from"fs";import{join as h$}from"path";import{join as Wv}from"path";var Tz=Object.defineProperty,aT=(e,t)=>Tz(e,"name",{value:t,configurable:!0});function sT(e){return e.mode==="cli"}aT(sT,"isCLIMode");function cT(e){return e.mode==="ink"}aT(cT,"isInkMode");function uT(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function lT(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
174
174
  `:`
175
175
  `)+n,r=i+1,i=e.indexOf(`
176
- `,r)}while(i!==-1);return o+=e.slice(r),o}var lT=(e=0)=>t=>`\x1B[${t+e}m`,mv=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,pv=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,Tz=e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,H={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},QW=Object.keys(H.modifier),$z=Object.keys(H.color),Rz=Object.keys(H.bgColor),e8=Object.keys(H.underlineColor),t8=[...$z,...Rz];function Cz(){let e=new Map;for(let[t,n]of Object.entries(H)){for(let[i,r]of Object.entries(n))H[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=H[i],e.set(Number.parseInt(r[0],10),r[1]);Object.defineProperty(H,t,{value:n,enumerable:!1})}return Object.defineProperty(H,"codes",{value:e,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.underlineColor.close="\x1B[59m",H.color.ansi=lT(),H.color.ansi256=mv(),H.color.ansi16m=pv(),H.bgColor.ansi=lT(10),H.bgColor.ansi256=mv(10),H.bgColor.ansi16m=pv(10),H.underlineColor.ansi=Tz,H.underlineColor.ansi256=mv(20),H.underlineColor.ansi16m=pv(20),Object.defineProperties(H,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>H.rgbToAnsi256(...H.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>H.ansi256ToAnsi(H.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>H.ansi256ToAnsi(H.hexToAnsi256(t)),enumerable:!1}}),H}var Nz=Cz(),Ut=Nz;import fv from"node:process";import Pz from"node:os";import dT from"node:tty";function pt(e,t=globalThis.Deno?globalThis.Deno.args:fv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:ne}=fv,xu;pt("no-color")||pt("no-colors")||pt("color=false")||pt("color=never")?xu=0:(pt("color")||pt("colors")||pt("color=true")||pt("color=always"))&&(xu=1);function pT(){return/^\d+$/.test(ne.FORCE_COLOR)}function wz(){if("FORCE_COLOR"in ne){if(ne.FORCE_COLOR==="false")return 0;if(ne.FORCE_COLOR==="true"||ne.FORCE_COLOR.length===0)return 1;if(pT())return Math.min(Number.parseInt(ne.FORCE_COLOR,10),3)}}function kz(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Oz(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=wz();i!==void 0&&(xu=i);let r=n?xu:i;if(r===0)return 0;if(n){if(pt("color=16m")||pt("color=full")||pt("color=truecolor"))return 3;if(pt("color=256"))return 2}if(r!==void 0&&pT())return r;if("TF_BUILD"in ne&&"AGENT_NAME"in ne)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(ne.TERM==="dumb")return o;if(fv.platform==="win32"){let a=Pz.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ne)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ne)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ne)||ne.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ne)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(ne.TEAMCITY_VERSION)?1:0;if(ne.COLORTERM==="truecolor"||ne.TERM==="xterm-kitty"||ne.TERM==="xterm-ghostty"||ne.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ne){let a=Number.parseInt((ne.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(ne.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(ne.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ne.TERM)||"COLORTERM"in ne?1:o}function mT(e,t={}){let n=Oz(e,{streamIsTTY:e&&e.isTTY,...t});return kz(n)}var Dz={stdout:mT({isTTY:dT.isatty(1)}),stderr:mT({isTTY:dT.isatty(2)})},fT=Dz;var{stdout:gT,stderr:hT}=fT,sa=Symbol("GENERATOR"),ca=Symbol("STYLER"),Iu=Symbol("IS_EMPTY"),Au=Symbol("LEVEL"),ua=Object.create(null),vT=e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},Mz={enumerable:!0,get(){return this[Au]},set(e){vT(e),this[Au]=e}},jz=(e,t={})=>{t.level!==void 0&&vT(t.level);let n=gT?gT.level:0;e[Au]=t.level===void 0?n:t.level};var zz=e=>{let t=(...n)=>n.join(" ");return jz(t,e),Object.setPrototypeOf(t,la.prototype),t};function la(e){return zz(e)}Object.setPrototypeOf(la.prototype,Function.prototype);for(let[e,t]of Object.entries(Ut))ua[e]={get(){let n=hv(this,bT(t.open,t.close,this[ca]),this[Iu]);return Object.defineProperty(this,e,{value:n}),n}};ua.visible={get(){let e=hv(this,this[ca],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Lz=(e,t)=>{let n=Ut[t];if(e==="rgb"){let r=(a,c,u)=>n.ansi(Ut.rgbToAnsi(a,c,u));return[r,r,(a,c,u)=>n.ansi256(Ut.rgbToAnsi256(a,c,u)),n.ansi16m]}if(e==="hex"){let r=a=>n.ansi(Ut.hexToAnsi(a));return[r,r,a=>n.ansi256(Ut.hexToAnsi256(a)),a=>n.ansi16m(...Ut.hexToRgb(a))]}let i=r=>n.ansi(Ut.ansi256ToAnsi(r));return[i,i,n.ansi256,n.ansi256]},Uz=["rgb","hex","ansi256"];for(let e of Uz){let t=e[0].toUpperCase()+e.slice(1);for(let[n,i]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:r}=Ut[i],o=Lz(e,i);ua[n]={get(){let a=function(c,u,l){let d=o[this.level](c,u,l);return hv(this,bT(d,r,this[ca]),this[Iu])};return Object.defineProperty(this,n,{value:a}),a}}}}var Fz=Object.defineProperties(()=>{},{...ua,level:{enumerable:!0,get(){return this[sa].level},set(e){this[sa].level=e}}}),bT=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},hv=(e,t,n)=>{let i=(...r)=>r.length===1?gv(i,""+r[0]):r.length===2?gv(i,r[0]+" "+r[1]):gv(i,r.join(" "));return Object.setPrototypeOf(i,Fz),i[sa]=e[sa]??e,i[ca]=t,i[Iu]=n,i},gv=(e,t)=>{if(e[sa][Au]<=0||!t)return e[Iu]?"":t;let n=e[ca];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=cT(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
177
- `);return o!==-1&&(t=uT(t,r,i,o)),i+t+r};Object.defineProperties(la.prototype,{...ua,level:Mz});var Bz=la(),l8=la({level:hT?hT.level:0});var Fe=Bz;import ha from"node:process";import{stripVTControlCharacters as BL}from"node:util";var yT=(e=0)=>t=>`\x1B[${t+e}m`,ST=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_T=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,oe={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},m8=Object.keys(oe.modifier),Vz=Object.keys(oe.color),Gz=Object.keys(oe.bgColor),p8=[...Vz,...Gz];function Zz(){let e=new Map;for(let[t,n]of Object.entries(oe)){for(let[i,r]of Object.entries(n))oe[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=oe[i],e.set(r[0],r[1]);Object.defineProperty(oe,t,{value:n,enumerable:!1})}return Object.defineProperty(oe,"codes",{value:e,enumerable:!1}),oe.color.close="\x1B[39m",oe.bgColor.close="\x1B[49m",oe.color.ansi=yT(),oe.color.ansi256=ST(),oe.color.ansi16m=_T(),oe.bgColor.ansi=yT(10),oe.bgColor.ansi256=ST(10),oe.bgColor.ansi16m=_T(10),Object.defineProperties(oe,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>oe.rgbToAnsi256(...oe.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>oe.ansi256ToAnsi(oe.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>oe.ansi256ToAnsi(oe.hexToAnsi256(t)),enumerable:!1}}),oe}var Wz=Zz(),$t=Wz;import vv from"node:process";import Hz from"node:os";import ET from"node:tty";function ft(e,t=globalThis.Deno?globalThis.Deno.args:vv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:ae}=vv,Tu;ft("no-color")||ft("no-colors")||ft("color=false")||ft("color=never")?Tu=0:(ft("color")||ft("colors")||ft("color=true")||ft("color=always"))&&(Tu=1);function Yz(){if("FORCE_COLOR"in ae)return ae.FORCE_COLOR==="true"?1:ae.FORCE_COLOR==="false"?0:ae.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ae.FORCE_COLOR,10),3)}function Kz(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function qz(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=Yz();i!==void 0&&(Tu=i);let r=n?Tu:i;if(r===0)return 0;if(n){if(ft("color=16m")||ft("color=full")||ft("color=truecolor"))return 3;if(ft("color=256"))return 2}if("TF_BUILD"in ae&&"AGENT_NAME"in ae)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(ae.TERM==="dumb")return o;if(vv.platform==="win32"){let a=Hz.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ae)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ae)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ae)||ae.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ae)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ae.TEAMCITY_VERSION)?1:0;if(ae.COLORTERM==="truecolor"||ae.TERM==="xterm-kitty"||ae.TERM==="xterm-ghostty"||ae.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ae){let a=Number.parseInt((ae.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ae.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ae.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ae.TERM)||"COLORTERM"in ae?1:o}function xT(e,t={}){let n=qz(e,{streamIsTTY:e&&e.isTTY,...t});return Kz(n)}var Xz={stdout:xT({isTTY:ET.isatty(1)}),stderr:xT({isTTY:ET.isatty(2)})},AT=Xz;function IT(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function TT(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
176
+ `,r)}while(i!==-1);return o+=e.slice(r),o}var dT=(e=0)=>t=>`\x1B[${t+e}m`,mv=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,pv=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,$z=e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,H={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},e8=Object.keys(H.modifier),Rz=Object.keys(H.color),Cz=Object.keys(H.bgColor),t8=Object.keys(H.underlineColor),r8=[...Rz,...Cz];function Nz(){let e=new Map;for(let[t,n]of Object.entries(H)){for(let[i,r]of Object.entries(n))H[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=H[i],e.set(Number.parseInt(r[0],10),r[1]);Object.defineProperty(H,t,{value:n,enumerable:!1})}return Object.defineProperty(H,"codes",{value:e,enumerable:!1}),H.color.close="\x1B[39m",H.bgColor.close="\x1B[49m",H.underlineColor.close="\x1B[59m",H.color.ansi=dT(),H.color.ansi256=mv(),H.color.ansi16m=pv(),H.bgColor.ansi=dT(10),H.bgColor.ansi256=mv(10),H.bgColor.ansi16m=pv(10),H.underlineColor.ansi=$z,H.underlineColor.ansi256=mv(20),H.underlineColor.ansi16m=pv(20),Object.defineProperties(H,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>H.rgbToAnsi256(...H.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>H.ansi256ToAnsi(H.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>H.ansi256ToAnsi(H.hexToAnsi256(t)),enumerable:!1}}),H}var Pz=Nz(),Ut=Pz;import fv from"node:process";import wz from"node:os";import mT from"node:tty";function pt(e,t=globalThis.Deno?globalThis.Deno.args:fv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:ne}=fv,Eu;pt("no-color")||pt("no-colors")||pt("color=false")||pt("color=never")?Eu=0:(pt("color")||pt("colors")||pt("color=true")||pt("color=always"))&&(Eu=1);function fT(){return/^\d+$/.test(ne.FORCE_COLOR)}function kz(){if("FORCE_COLOR"in ne){if(ne.FORCE_COLOR==="false")return 0;if(ne.FORCE_COLOR==="true"||ne.FORCE_COLOR.length===0)return 1;if(fT())return Math.min(Number.parseInt(ne.FORCE_COLOR,10),3)}}function Oz(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Dz(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=kz();i!==void 0&&(Eu=i);let r=n?Eu:i;if(r===0)return 0;if(n){if(pt("color=16m")||pt("color=full")||pt("color=truecolor"))return 3;if(pt("color=256"))return 2}if(r!==void 0&&fT())return r;if("TF_BUILD"in ne&&"AGENT_NAME"in ne)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(ne.TERM==="dumb")return o;if(fv.platform==="win32"){let a=wz.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ne)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ne)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ne)||ne.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ne)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(ne.TEAMCITY_VERSION)?1:0;if(ne.COLORTERM==="truecolor"||ne.TERM==="xterm-kitty"||ne.TERM==="xterm-ghostty"||ne.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ne){let a=Number.parseInt((ne.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(ne.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(ne.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ne.TERM)||"COLORTERM"in ne?1:o}function pT(e,t={}){let n=Dz(e,{streamIsTTY:e&&e.isTTY,...t});return Oz(n)}var Mz={stdout:pT({isTTY:mT.isatty(1)}),stderr:pT({isTTY:mT.isatty(2)})},gT=Mz;var{stdout:hT,stderr:vT}=gT,aa=Symbol("GENERATOR"),sa=Symbol("STYLER"),Au=Symbol("IS_EMPTY"),xu=Symbol("LEVEL"),ca=Object.create(null),bT=e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},jz={enumerable:!0,get(){return this[xu]},set(e){bT(e),this[xu]=e}},zz=(e,t={})=>{t.level!==void 0&&bT(t.level);let n=hT?hT.level:0;e[xu]=t.level===void 0?n:t.level};var Lz=e=>{let t=(...n)=>n.join(" ");return zz(t,e),Object.setPrototypeOf(t,ua.prototype),t};function ua(e){return Lz(e)}Object.setPrototypeOf(ua.prototype,Function.prototype);for(let[e,t]of Object.entries(Ut))ca[e]={get(){let n=hv(this,yT(t.open,t.close,this[sa]),this[Au]);return Object.defineProperty(this,e,{value:n}),n}};ca.visible={get(){let e=hv(this,this[sa],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Uz=(e,t)=>{let n=Ut[t];if(e==="rgb"){let r=(a,c,u)=>n.ansi(Ut.rgbToAnsi(a,c,u));return[r,r,(a,c,u)=>n.ansi256(Ut.rgbToAnsi256(a,c,u)),n.ansi16m]}if(e==="hex"){let r=a=>n.ansi(Ut.hexToAnsi(a));return[r,r,a=>n.ansi256(Ut.hexToAnsi256(a)),a=>n.ansi16m(...Ut.hexToRgb(a))]}let i=r=>n.ansi(Ut.ansi256ToAnsi(r));return[i,i,n.ansi256,n.ansi256]},Fz=["rgb","hex","ansi256"];for(let e of Fz){let t=e[0].toUpperCase()+e.slice(1);for(let[n,i]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:r}=Ut[i],o=Uz(e,i);ca[n]={get(){let a=function(c,u,l){let d=o[this.level](c,u,l);return hv(this,yT(d,r,this[sa]),this[Au])};return Object.defineProperty(this,n,{value:a}),a}}}}var Bz=Object.defineProperties(()=>{},{...ca,level:{enumerable:!0,get(){return this[aa].level},set(e){this[aa].level=e}}}),yT=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},hv=(e,t,n)=>{let i=(...r)=>r.length===1?gv(i,""+r[0]):r.length===2?gv(i,r[0]+" "+r[1]):gv(i,r.join(" "));return Object.setPrototypeOf(i,Bz),i[aa]=e[aa]??e,i[sa]=t,i[Au]=n,i},gv=(e,t)=>{if(e[aa][xu]<=0||!t)return e[Au]?"":t;let n=e[sa];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=uT(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
177
+ `);return o!==-1&&(t=lT(t,r,i,o)),i+t+r};Object.defineProperties(ua.prototype,{...ca,level:jz});var Vz=ua(),d8=ua({level:vT?vT.level:0});var Be=Vz;import ga from"node:process";import{stripVTControlCharacters as VL}from"node:util";var ST=(e=0)=>t=>`\x1B[${t+e}m`,_T=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,ET=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,oe={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},p8=Object.keys(oe.modifier),Gz=Object.keys(oe.color),Zz=Object.keys(oe.bgColor),f8=[...Gz,...Zz];function Wz(){let e=new Map;for(let[t,n]of Object.entries(oe)){for(let[i,r]of Object.entries(n))oe[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=oe[i],e.set(r[0],r[1]);Object.defineProperty(oe,t,{value:n,enumerable:!1})}return Object.defineProperty(oe,"codes",{value:e,enumerable:!1}),oe.color.close="\x1B[39m",oe.bgColor.close="\x1B[49m",oe.color.ansi=ST(),oe.color.ansi256=_T(),oe.color.ansi16m=ET(),oe.bgColor.ansi=ST(10),oe.bgColor.ansi256=_T(10),oe.bgColor.ansi16m=ET(10),Object.defineProperties(oe,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>oe.rgbToAnsi256(...oe.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>oe.ansi256ToAnsi(oe.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>oe.ansi256ToAnsi(oe.hexToAnsi256(t)),enumerable:!1}}),oe}var Hz=Wz(),$t=Hz;import vv from"node:process";import Yz from"node:os";import xT from"node:tty";function ft(e,t=globalThis.Deno?globalThis.Deno.args:vv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:ae}=vv,Iu;ft("no-color")||ft("no-colors")||ft("color=false")||ft("color=never")?Iu=0:(ft("color")||ft("colors")||ft("color=true")||ft("color=always"))&&(Iu=1);function Kz(){if("FORCE_COLOR"in ae)return ae.FORCE_COLOR==="true"?1:ae.FORCE_COLOR==="false"?0:ae.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ae.FORCE_COLOR,10),3)}function qz(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Xz(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=Kz();i!==void 0&&(Iu=i);let r=n?Iu:i;if(r===0)return 0;if(n){if(ft("color=16m")||ft("color=full")||ft("color=truecolor"))return 3;if(ft("color=256"))return 2}if("TF_BUILD"in ae&&"AGENT_NAME"in ae)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(ae.TERM==="dumb")return o;if(vv.platform==="win32"){let a=Yz.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in ae)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in ae)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in ae)||ae.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in ae)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ae.TEAMCITY_VERSION)?1:0;if(ae.COLORTERM==="truecolor"||ae.TERM==="xterm-kitty"||ae.TERM==="xterm-ghostty"||ae.TERM==="wezterm")return 3;if("TERM_PROGRAM"in ae){let a=Number.parseInt((ae.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ae.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ae.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ae.TERM)||"COLORTERM"in ae?1:o}function AT(e,t={}){let n=Xz(e,{streamIsTTY:e&&e.isTTY,...t});return qz(n)}var Jz={stdout:AT({isTTY:xT.isatty(1)}),stderr:AT({isTTY:xT.isatty(2)})},IT=Jz;function TT(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function $T(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
178
178
  `:`
179
179
  `)+n,r=i+1,i=e.indexOf(`
180
- `,r)}while(i!==-1);return o+=e.slice(r),o}var{stdout:$T,stderr:RT}=AT,bv=Symbol("GENERATOR"),wi=Symbol("STYLER"),da=Symbol("IS_EMPTY"),CT=["ansi","ansi","ansi256","ansi16m"],ki=Object.create(null),Jz=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=$T?$T.level:0;e.level=t.level===void 0?n:t.level};var Qz=e=>{let t=(...n)=>n.join(" ");return Jz(t,e),Object.setPrototypeOf(t,ma.prototype),t};function ma(e){return Qz(e)}Object.setPrototypeOf(ma.prototype,Function.prototype);for(let[e,t]of Object.entries($t))ki[e]={get(){let n=$u(this,Sv(t.open,t.close,this[wi]),this[da]);return Object.defineProperty(this,e,{value:n}),n}};ki.visible={get(){let e=$u(this,this[wi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var yv=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?$t[n].ansi16m(...i):t==="ansi256"?$t[n].ansi256($t.rgbToAnsi256(...i)):$t[n].ansi($t.rgbToAnsi(...i)):e==="hex"?yv("rgb",t,n,...$t.hexToRgb(...i)):$t[n][e](...i),eL=["rgb","hex","ansi256"];for(let e of eL){ki[e]={get(){let{level:n}=this;return function(...i){let r=Sv(yv(e,CT[n],"color",...i),$t.color.close,this[wi]);return $u(this,r,this[da])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);ki[t]={get(){let{level:n}=this;return function(...i){let r=Sv(yv(e,CT[n],"bgColor",...i),$t.bgColor.close,this[wi]);return $u(this,r,this[da])}}}}var tL=Object.defineProperties(()=>{},{...ki,level:{enumerable:!0,get(){return this[bv].level},set(e){this[bv].level=e}}}),Sv=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},$u=(e,t,n)=>{let i=(...r)=>rL(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,tL),i[bv]=e,i[wi]=t,i[da]=n,i},rL=(e,t)=>{if(e.level<=0||!t)return e[da]?"":t;let n=e[wi];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=IT(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
181
- `);return o!==-1&&(t=TT(t,r,i,o)),i+t+r};Object.defineProperties(ma.prototype,ki);var nL=ma(),x8=ma({level:RT?RT.level:0});var NT=nL;import MT from"node:process";import Pu from"node:process";var iL=(e,t,n,i)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let r=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!oL(r,o)&&i||Object.defineProperty(e,n,o)},oL=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},aL=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},sL=(e,t)=>`/* Wrapped ${e}*/
182
- ${t}`,cL=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),uL=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),lL=(e,t,n)=>{let i=n===""?"":`with ${n.trim()}() `,r=sL.bind(null,i,t.toString());Object.defineProperty(r,"name",uL);let{writable:o,enumerable:a,configurable:c}=cL;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:a,configurable:c})};function _v(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let r of Reflect.ownKeys(t))iL(e,t,r,n);return aL(e,t),lL(e,t,i),e}var Ru=new WeakMap,PT=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,r=e.displayName||e.name||"<anonymous>",o=function(...a){if(Ru.set(o,++i),i===1)n=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return n};return _v(o,e),Ru.set(o,i),o};PT.callCount=e=>{if(!Ru.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ru.get(e)};var wT=PT;var vn=[];vn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&vn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&vn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Cu=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Ev=Symbol.for("signal-exit emitter"),xv=globalThis,dL=Object.defineProperty.bind(Object),Av=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(xv[Ev])return xv[Ev];dL(xv,Ev,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let i=this.listeners[t],r=i.indexOf(n);r!==-1&&(r===0&&i.length===1?i.length=0:i.splice(r,1))}emit(t,n,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let o of this.listeners[t])r=o(n,i)===!0||r;return t==="exit"&&(r=this.emit("afterExit",n,i)||r),r}},Nu=class{},mL=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),Iv=class extends Nu{onExit(){return()=>{}}load(){}unload(){}},Tv=class extends Nu{#o=$v.platform==="win32"?"SIGINT":"SIGHUP";#n=new Av;#r;#e;#i;#t={};#a=!1;constructor(t){super(),this.#r=t,this.#t={};for(let n of vn)this.#t[n]=()=>{let i=this.#r.listeners(n),{count:r}=this.#n,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(r+=o.__signal_exit_emitter__.count),i.length===r){this.unload();let a=this.#n.emit("exit",null,n),c=n==="SIGHUP"?this.#o:n;a||t.kill(t.pid,c)}};this.#i=t.reallyExit,this.#e=t.emit}onExit(t,n){if(!Cu(this.#r))return()=>{};this.#a===!1&&this.load();let i=n?.alwaysLast?"afterExit":"exit";return this.#n.on(i,t),()=>{this.#n.removeListener(i,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#a){this.#a=!0,this.#n.count+=1;for(let t of vn)try{let n=this.#t[t];n&&this.#r.on(t,n)}catch{}this.#r.emit=(t,...n)=>this.#d(t,...n),this.#r.reallyExit=t=>this.#c(t)}}unload(){this.#a&&(this.#a=!1,vn.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#r.removeListener(t,n)}catch{}}),this.#r.emit=this.#e,this.#r.reallyExit=this.#i,this.#n.count-=1)}#c(t){return Cu(this.#r)?(this.#r.exitCode=t||0,this.#n.emit("exit",this.#r.exitCode,null),this.#i.call(this.#r,this.#r.exitCode)):0}#d(t,...n){let i=this.#e;if(t==="exit"&&Cu(this.#r)){typeof n[0]=="number"&&(this.#r.exitCode=n[0]);let r=i.call(this.#r,t,...n);return this.#n.emit("exit",this.#r.exitCode,null),r}else return i.call(this.#r,t,...n)}},$v=globalThis.process,{onExit:kT,load:N8,unload:P8}=mL(Cu($v)?new Tv($v):new Iv);var OT=Pu.stderr.isTTY?Pu.stderr:Pu.stdout.isTTY?Pu.stdout:void 0,pL=OT?wT(()=>{kT(()=>{OT.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},DT=pL;var wu=!1,Oi={};Oi.show=(e=MT.stderr)=>{e.isTTY&&(wu=!1,e.write("\x1B[?25h"))};Oi.hide=(e=MT.stderr)=>{e.isTTY&&(DT(),wu=!0,e.write("\x1B[?25l"))};Oi.toggle=(e,t)=>{e!==void 0&&(wu=e),wu?Oi.show(t):Oi.hide(t)};var Rv=Oi;var Cv={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var pa=Cv,B8=Object.keys(Cv);var bn={};wt(bn,{error:()=>SL,info:()=>vL,success:()=>bL,warning:()=>yL});import gL from"node:tty";var hL=gL?.WriteStream?.prototype?.hasColors?.()??!1,$=(e,t)=>{if(!hL)return r=>r;let n=`\x1B[${e}m`,i=`\x1B[${t}m`;return r=>{let o=r+"",a=o.indexOf(i);if(a===-1)return n+o+i;let c=n,u=0,d=(t===22?i:"")+n;for(;a!==-1;)c+=o.slice(u,a)+d,u=a+i.length,a=o.indexOf(i,u);return c+=o.slice(u)+i,c}},Z8=$(0,0),W8=$(1,22),H8=$(2,22),Y8=$(3,23),K8=$(4,24),q8=$("4:2",24),X8=$("4:3",24),J8=$("4:4",24),Q8=$("4:5",24),eH=$(53,55),tH=$(7,27),rH=$(8,28),nH=$(9,29),iH=$(30,39),jT=$(31,39),zT=$(32,39),LT=$(33,39),UT=$(34,39),oH=$(35,39),aH=$(36,39),sH=$(37,39),cH=$(90,39),uH=$(40,49),lH=$(41,49),dH=$(42,49),mH=$(43,49),pH=$(44,49),fH=$(45,49),gH=$(46,49),hH=$(47,49),vH=$(100,49),bH=$(91,39),yH=$(92,39),SH=$(93,39),_H=$(94,39),EH=$(95,39),xH=$(96,39),AH=$(97,39),IH=$(101,49),TH=$(102,49),$H=$(103,49),RH=$(104,49),CH=$(105,49),NH=$(106,49),PH=$(107,49),wH=$("58;5;0",59),kH=$("58;5;1",59),OH=$("58;5;2",59),DH=$("58;5;3",59),MH=$("58;5;4",59),jH=$("58;5;5",59),zH=$("58;5;6",59),LH=$("58;5;7",59),UH=$("58;5;8",59),FH=$("58;5;9",59),BH=$("58;5;10",59),VH=$("58;5;11",59),GH=$("58;5;12",59),ZH=$("58;5;13",59),WH=$("58;5;14",59),HH=$("58;5;15",59);import FT from"node:process";function fa(){let{env:e}=FT,{TERM:t,TERM_PROGRAM:n}=e;return FT.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ku=fa(),vL=UT(ku?"\u2139":"i"),bL=zT(ku?"\u2714":"\u221A"),yL=LT(ku?"\u26A0":"\u203C"),SL=jT(ku?"\u2716":"\xD7");function Nv({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var _L=Nv();function Pv(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(_L,"")}var BT=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],VT=12288,GT=65510,ZT=[12288,12288,65281,65376,65504,65510];var WT=4352,HT=262141,wv=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var Ou=(e,t)=>{let n=0,i=Math.floor(e.length/2)-1;for(;n<=i;){let r=Math.floor((n+i)/2),o=r*2;if(t<e[o])i=r-1;else if(t>e[o+1])n=r+1;else return!0}return!1};var YT=19968,[AL,IL]=TL(wv);function TL(e){let t=e[0],n=e[1];for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];if(YT>=r&&YT<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}var KT=e=>e<161||e>1114109?!1:Ou(BT,e),qT=e=>e<VT||e>GT?!1:Ou(ZT,e);var XT=e=>e>=AL&&e<=IL?!0:e<WT||e>HT?!1:Ou(wv,e);function $L(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function ga(e,{ambiguousAsWide:t=!1}={}){return $L(e),qT(e)||XT(e)||t&&KT(e)?2:1}var RL=new Intl.Segmenter,JT=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Nonspacing_Mark}|\\p{Enclosing_Mark}|\\p{Surrogate})+$","v"),CL=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+","v"),NL=new RegExp("\\p{Spacing_Mark}","v"),PL=new RegExp("^\\p{RGI_Emoji}$","v"),wL=/^[\d#*]\u20E3$/,kL=new RegExp("\\p{Extended_Pictographic}","gu");function OL(e){if(e.length>50)return!1;if(wL.test(e))return!0;if(e.includes("\u200D")){let t=e.match(kL);return t!==null&&t.length>=2}return!1}function DL(e){return e.replace(CL,"")}function ML(e){return JT.test(e)}function QT(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function e$(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function t$(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function jL(e){return QT(e)||e$(e)||t$(e)}function zL(e,t){let n=[];for(let r of e)JT.test(r)||n.push(r.codePointAt(0));if(n.length===0)return;let i=0;for(let r=0;r<n.length;r++){let o=n[r];if(!jL(o)){if(i===0)return;for(let a=r;a<n.length;a++)i+=ga(n[a],t);return i}if(QT(o)&&e$(n[r+1])){i+=2,r+=t$(n[r+2])?2:1;continue}i+=ga(o,t)}return i}function LL(e,t){let n=0,i=!0;for(let r of e){if(i){i=!1;continue}(NL.test(r)||r>="\uFF00"&&r<="\uFFEF")&&(n+=ga(r.codePointAt(0),t))}return n}function kv(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=t,r=e;if(!i&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=Pv(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let o=0,a={ambiguousAsWide:!n};for(let{segment:c}of RL.segment(r)){if(ML(c))continue;if(PL.test(c)||OL(c)){o+=2;continue}let u=DL(c),l=zL(u,a);if(l!==void 0){o+=l;continue}let d=u.codePointAt(0);o+=ga(d,a),o+=LL(u,a)}return o}function Ov({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import Du from"node:process";var UL=3,Dv=class{#o=0;#n;#r=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===UL&&Du.kill(Du.pid,"SIGINT")};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#a()}#t(){let{stdin:t}=Du;if(Du.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){this.#n=void 0;return}this.#n=t,this.#r=t.isPaused(),this.#e=!!t.isRaw,t.setRawMode(!0),t.prependListener("data",this.#i),this.#r&&t.resume()}#a(){if(!this.#n)return;let t=this.#n;t.off("data",this.#i),t.isTTY&&t.setRawMode?.(this.#e),this.#r&&t.pause(),this.#n=void 0,this.#r=!1,this.#e=!1}},FL=new Dv,Mv=Object.freeze(FL);var VL=200,GL="\x1B[?2026h",ZL="\x1B[?2026l",Mu=new Map,WL=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),jv=class{#o=0;#n=-1;#r=0;#e;#i;#t;#a;#c=new Map;#d=!1;#u;#s;#p=!1;#m;#l(t){this.#d=!0;try{return t()}finally{this.#d=!1}}#g(){this.isSpinning&&this.render()}#_(t,n){if(t==null)return"";if(typeof t=="string")return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){let i=typeof n=="string"&&n&&n!=="buffer"?n:"utf8";return Buffer.from(t).toString(i)}return String(t)}#E(t){if(!t)return!1;let n=t.at(-1);return n===`
183
- `||n==="\r"}#x(){this.#s||(this.#s=setTimeout(()=>{this.#s=void 0,this.isSpinning&&this.#g()},VL),typeof this.#s?.unref=="function"&&this.#s.unref())}#h(){this.#s&&(clearTimeout(this.#s),this.#s=void 0)}#v(t,n,i,r){let o=this.#y(i," "),c=typeof n=="string"?(t?" ":"")+n:"",u=this.#S(r," ");return o+t+c+u}constructor(t){if(typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:ha.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=Ov({stream:this.#t})),typeof this.#e.isSilent!="boolean"&&(this.#e.isSilent=!1),this.#e.interval!==void 0&&!(Number.isInteger(this.#e.interval)&&this.#e.interval>0))throw new Error("The `interval` option must be a positive integer");let n=this.#e.interval;this.spinner=this.#e.spinner,this.#e.interval=n,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,ha.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#e.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(i){this.#o=i}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#n}}),Object.defineProperty(this,"_lineCount",{get(){let i=this.#t.columns??80,r=typeof this.#e.prefixText=="function"?"":this.#e.prefixText,o=typeof this.#e.suffixText=="function"?"":this.#e.suffixText,a=typeof r=="string"&&r!==""?r+" ":"",c=typeof o=="string"&&o!==""?" "+o:"",l=" ".repeat(this.#e.indent)+a+"-"+(typeof this.#e.text=="string"?" "+this.#e.text:"")+c;return this.#f(l,i)}}))}get indent(){return this.#e.indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#e.indent=t}get interval(){return this.#e.interval??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#n=-1,this.#e.interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(n=>typeof n!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#i=t}else if(!fa())this.#i=pa.line;else if(t===void 0)this.#i=pa.dots;else if(t!=="default"&&pa[t])this.#i=pa[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#e.text}set text(t=""){this.#e.text=t}get prefixText(){return this.#e.prefixText}set prefixText(t=""){this.#e.prefixText=t}get suffixText(){return this.#e.suffixText}set suffixText(t=""){this.#e.suffixText=t}get isSpinning(){return this.#a!==void 0}#b(t,n,i=!1){let r=typeof t=="function"?t():t;return typeof r=="string"&&r!==""?i?n+r:r+n:""}#y(t=this.#e.prefixText,n=" "){return this.#b(t,n,!1)}#S(t=this.#e.suffixText,n=" "){return this.#b(t,n,!0)}#f(t,n){let i=0;for(let r of BL(t).split(`
184
- `))i+=Math.max(1,Math.ceil(kv(r)/n));return i}get color(){return this.#m}set color(t){if(t!==void 0&&t!==!1&&!WL.has(t))throw new Error("The `color` option must be a valid color or `false` to disable");this.#m=t}get isEnabled(){return this.#e.isEnabled&&!this.#e.isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#e.isEnabled=t}get isSilent(){return this.#e.isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#e.isSilent=t}frame(){let t=Date.now();(this.#n===-1||t-this.#r>=this.interval)&&(this.#n=(this.#n+1)%this.#i.frames.length,this.#r=t);let{frames:n}=this.#i,i=n[this.#n];this.#m&&(i=NT[this.#m](i));let r=this.#y(this.#e.prefixText," "),o=typeof this.text=="string"?" "+this.text:"",a=this.#S(this.#e.suffixText," ");return r+i+o+a}clear(){return!this.isEnabled||!this.#t.isTTY?this:(this.#l(()=>{this.#t.cursorTo(0);for(let t=0;t<this.#o;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);this.#e.indent&&this.#t.cursorTo(this.#e.indent)}),this.#o=0,this)}#A(t){if(!t||this.#c.has(t)||!t.isTTY||typeof t.write!="function")return;Mu.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let n=t.write;this.#c.set(t,n),Mu.set(t,this),t.write=(i,r,o)=>this.#$(t,n,i,r,o)}#I(){if(!this.isEnabled||this.#c.size>0)return;let t=new Set([this.#t,ha.stdout,ha.stderr]);for(let n of t)this.#A(n)}#T(){for(let[t,n]of this.#c)t.write=n,Mu.get(t)===this&&Mu.delete(t);this.#c.clear()}#$(t,n,i,r,o){if(typeof r=="function"&&(o=r,r=void 0),this.#d)return n.call(t,i,r,o);this.clear();let a=this.#_(i,r),c=this.#E(a),u=n.call(t,i,r,o);return c?this.#h():a.length>0&&this.#x(),this.isSpinning&&!this.#s&&this.render(),u}render(){if(!this.isEnabled||this.#u||this.#s)return this;let t=this.#t.isTTY,n=!1;try{t&&(this.#l(()=>this.#t.write(GL)),n=!0),this.clear();let i=this.frame(),r=this.#t.columns??80,o=this.#f(i,r),a=this.#t.rows;if(a&&a>1&&o>a){let u=i.split(`
180
+ `,r)}while(i!==-1);return o+=e.slice(r),o}var{stdout:RT,stderr:CT}=IT,bv=Symbol("GENERATOR"),wi=Symbol("STYLER"),la=Symbol("IS_EMPTY"),NT=["ansi","ansi","ansi256","ansi16m"],ki=Object.create(null),Qz=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=RT?RT.level:0;e.level=t.level===void 0?n:t.level};var eL=e=>{let t=(...n)=>n.join(" ");return Qz(t,e),Object.setPrototypeOf(t,da.prototype),t};function da(e){return eL(e)}Object.setPrototypeOf(da.prototype,Function.prototype);for(let[e,t]of Object.entries($t))ki[e]={get(){let n=Tu(this,Sv(t.open,t.close,this[wi]),this[la]);return Object.defineProperty(this,e,{value:n}),n}};ki.visible={get(){let e=Tu(this,this[wi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var yv=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?$t[n].ansi16m(...i):t==="ansi256"?$t[n].ansi256($t.rgbToAnsi256(...i)):$t[n].ansi($t.rgbToAnsi(...i)):e==="hex"?yv("rgb",t,n,...$t.hexToRgb(...i)):$t[n][e](...i),tL=["rgb","hex","ansi256"];for(let e of tL){ki[e]={get(){let{level:n}=this;return function(...i){let r=Sv(yv(e,NT[n],"color",...i),$t.color.close,this[wi]);return Tu(this,r,this[la])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);ki[t]={get(){let{level:n}=this;return function(...i){let r=Sv(yv(e,NT[n],"bgColor",...i),$t.bgColor.close,this[wi]);return Tu(this,r,this[la])}}}}var rL=Object.defineProperties(()=>{},{...ki,level:{enumerable:!0,get(){return this[bv].level},set(e){this[bv].level=e}}}),Sv=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},Tu=(e,t,n)=>{let i=(...r)=>nL(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,rL),i[bv]=e,i[wi]=t,i[la]=n,i},nL=(e,t)=>{if(e.level<=0||!t)return e[la]?"":t;let n=e[wi];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=TT(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
181
+ `);return o!==-1&&(t=$T(t,r,i,o)),i+t+r};Object.defineProperties(da.prototype,ki);var iL=da(),A8=da({level:CT?CT.level:0});var PT=iL;import jT from"node:process";import Nu from"node:process";var oL=(e,t,n,i)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let r=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!aL(r,o)&&i||Object.defineProperty(e,n,o)},aL=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},sL=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},cL=(e,t)=>`/* Wrapped ${e}*/
182
+ ${t}`,uL=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),lL=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),dL=(e,t,n)=>{let i=n===""?"":`with ${n.trim()}() `,r=cL.bind(null,i,t.toString());Object.defineProperty(r,"name",lL);let{writable:o,enumerable:a,configurable:c}=uL;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:a,configurable:c})};function _v(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let r of Reflect.ownKeys(t))oL(e,t,r,n);return sL(e,t),dL(e,t,i),e}var $u=new WeakMap,wT=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,r=e.displayName||e.name||"<anonymous>",o=function(...a){if($u.set(o,++i),i===1)n=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return n};return _v(o,e),$u.set(o,i),o};wT.callCount=e=>{if(!$u.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return $u.get(e)};var kT=wT;var vn=[];vn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&vn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&vn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Ru=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Ev=Symbol.for("signal-exit emitter"),xv=globalThis,mL=Object.defineProperty.bind(Object),Av=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(xv[Ev])return xv[Ev];mL(xv,Ev,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let i=this.listeners[t],r=i.indexOf(n);r!==-1&&(r===0&&i.length===1?i.length=0:i.splice(r,1))}emit(t,n,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let o of this.listeners[t])r=o(n,i)===!0||r;return t==="exit"&&(r=this.emit("afterExit",n,i)||r),r}},Cu=class{},pL=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),Iv=class extends Cu{onExit(){return()=>{}}load(){}unload(){}},Tv=class extends Cu{#o=$v.platform==="win32"?"SIGINT":"SIGHUP";#n=new Av;#r;#e;#i;#t={};#a=!1;constructor(t){super(),this.#r=t,this.#t={};for(let n of vn)this.#t[n]=()=>{let i=this.#r.listeners(n),{count:r}=this.#n,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(r+=o.__signal_exit_emitter__.count),i.length===r){this.unload();let a=this.#n.emit("exit",null,n),c=n==="SIGHUP"?this.#o:n;a||t.kill(t.pid,c)}};this.#i=t.reallyExit,this.#e=t.emit}onExit(t,n){if(!Ru(this.#r))return()=>{};this.#a===!1&&this.load();let i=n?.alwaysLast?"afterExit":"exit";return this.#n.on(i,t),()=>{this.#n.removeListener(i,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#a){this.#a=!0,this.#n.count+=1;for(let t of vn)try{let n=this.#t[t];n&&this.#r.on(t,n)}catch{}this.#r.emit=(t,...n)=>this.#d(t,...n),this.#r.reallyExit=t=>this.#c(t)}}unload(){this.#a&&(this.#a=!1,vn.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#r.removeListener(t,n)}catch{}}),this.#r.emit=this.#e,this.#r.reallyExit=this.#i,this.#n.count-=1)}#c(t){return Ru(this.#r)?(this.#r.exitCode=t||0,this.#n.emit("exit",this.#r.exitCode,null),this.#i.call(this.#r,this.#r.exitCode)):0}#d(t,...n){let i=this.#e;if(t==="exit"&&Ru(this.#r)){typeof n[0]=="number"&&(this.#r.exitCode=n[0]);let r=i.call(this.#r,t,...n);return this.#n.emit("exit",this.#r.exitCode,null),r}else return i.call(this.#r,t,...n)}},$v=globalThis.process,{onExit:OT,load:P8,unload:w8}=pL(Ru($v)?new Tv($v):new Iv);var DT=Nu.stderr.isTTY?Nu.stderr:Nu.stdout.isTTY?Nu.stdout:void 0,fL=DT?kT(()=>{OT(()=>{DT.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},MT=fL;var Pu=!1,Oi={};Oi.show=(e=jT.stderr)=>{e.isTTY&&(Pu=!1,e.write("\x1B[?25h"))};Oi.hide=(e=jT.stderr)=>{e.isTTY&&(MT(),Pu=!0,e.write("\x1B[?25l"))};Oi.toggle=(e,t)=>{e!==void 0&&(Pu=e),Pu?Oi.show(t):Oi.hide(t)};var Rv=Oi;var Cv={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var ma=Cv,V8=Object.keys(Cv);var bn={};wt(bn,{error:()=>_L,info:()=>bL,success:()=>yL,warning:()=>SL});import hL from"node:tty";var vL=hL?.WriteStream?.prototype?.hasColors?.()??!1,$=(e,t)=>{if(!vL)return r=>r;let n=`\x1B[${e}m`,i=`\x1B[${t}m`;return r=>{let o=r+"",a=o.indexOf(i);if(a===-1)return n+o+i;let c=n,u=0,d=(t===22?i:"")+n;for(;a!==-1;)c+=o.slice(u,a)+d,u=a+i.length,a=o.indexOf(i,u);return c+=o.slice(u)+i,c}},W8=$(0,0),H8=$(1,22),Y8=$(2,22),K8=$(3,23),q8=$(4,24),X8=$("4:2",24),J8=$("4:3",24),Q8=$("4:4",24),eH=$("4:5",24),tH=$(53,55),rH=$(7,27),nH=$(8,28),iH=$(9,29),oH=$(30,39),zT=$(31,39),LT=$(32,39),UT=$(33,39),FT=$(34,39),aH=$(35,39),sH=$(36,39),cH=$(37,39),uH=$(90,39),lH=$(40,49),dH=$(41,49),mH=$(42,49),pH=$(43,49),fH=$(44,49),gH=$(45,49),hH=$(46,49),vH=$(47,49),bH=$(100,49),yH=$(91,39),SH=$(92,39),_H=$(93,39),EH=$(94,39),xH=$(95,39),AH=$(96,39),IH=$(97,39),TH=$(101,49),$H=$(102,49),RH=$(103,49),CH=$(104,49),NH=$(105,49),PH=$(106,49),wH=$(107,49),kH=$("58;5;0",59),OH=$("58;5;1",59),DH=$("58;5;2",59),MH=$("58;5;3",59),jH=$("58;5;4",59),zH=$("58;5;5",59),LH=$("58;5;6",59),UH=$("58;5;7",59),FH=$("58;5;8",59),BH=$("58;5;9",59),VH=$("58;5;10",59),GH=$("58;5;11",59),ZH=$("58;5;12",59),WH=$("58;5;13",59),HH=$("58;5;14",59),YH=$("58;5;15",59);import BT from"node:process";function pa(){let{env:e}=BT,{TERM:t,TERM_PROGRAM:n}=e;return BT.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var wu=pa(),bL=FT(wu?"\u2139":"i"),yL=LT(wu?"\u2714":"\u221A"),SL=UT(wu?"\u26A0":"\u203C"),_L=zT(wu?"\u2716":"\xD7");function Nv({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var EL=Nv();function Pv(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(EL,"")}var VT=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],GT=12288,ZT=65510,WT=[12288,12288,65281,65376,65504,65510];var HT=4352,YT=262141,wv=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var ku=(e,t)=>{let n=0,i=Math.floor(e.length/2)-1;for(;n<=i;){let r=Math.floor((n+i)/2),o=r*2;if(t<e[o])i=r-1;else if(t>e[o+1])n=r+1;else return!0}return!1};var KT=19968,[IL,TL]=$L(wv);function $L(e){let t=e[0],n=e[1];for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];if(KT>=r&&KT<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}var qT=e=>e<161||e>1114109?!1:ku(VT,e),XT=e=>e<GT||e>ZT?!1:ku(WT,e);var JT=e=>e>=IL&&e<=TL?!0:e<HT||e>YT?!1:ku(wv,e);function RL(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function fa(e,{ambiguousAsWide:t=!1}={}){return RL(e),XT(e)||JT(e)||t&&qT(e)?2:1}var CL=new Intl.Segmenter,QT=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Nonspacing_Mark}|\\p{Enclosing_Mark}|\\p{Surrogate})+$","v"),NL=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+","v"),PL=new RegExp("\\p{Spacing_Mark}","v"),wL=new RegExp("^\\p{RGI_Emoji}$","v"),kL=/^[\d#*]\u20E3$/,OL=new RegExp("\\p{Extended_Pictographic}","gu");function DL(e){if(e.length>50)return!1;if(kL.test(e))return!0;if(e.includes("\u200D")){let t=e.match(OL);return t!==null&&t.length>=2}return!1}function ML(e){return e.replace(NL,"")}function jL(e){return QT.test(e)}function e$(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function t$(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function r$(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function zL(e){return e$(e)||t$(e)||r$(e)}function LL(e,t){let n=[];for(let r of e)QT.test(r)||n.push(r.codePointAt(0));if(n.length===0)return;let i=0;for(let r=0;r<n.length;r++){let o=n[r];if(!zL(o)){if(i===0)return;for(let a=r;a<n.length;a++)i+=fa(n[a],t);return i}if(e$(o)&&t$(n[r+1])){i+=2,r+=r$(n[r+2])?2:1;continue}i+=fa(o,t)}return i}function UL(e,t){let n=0,i=!0;for(let r of e){if(i){i=!1;continue}(PL.test(r)||r>="\uFF00"&&r<="\uFFEF")&&(n+=fa(r.codePointAt(0),t))}return n}function kv(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=t,r=e;if(!i&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=Pv(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let o=0,a={ambiguousAsWide:!n};for(let{segment:c}of CL.segment(r)){if(jL(c))continue;if(wL.test(c)||DL(c)){o+=2;continue}let u=ML(c),l=LL(u,a);if(l!==void 0){o+=l;continue}let d=u.codePointAt(0);o+=fa(d,a),o+=UL(u,a)}return o}function Ov({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import Ou from"node:process";var FL=3,Dv=class{#o=0;#n;#r=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===FL&&Ou.kill(Ou.pid,"SIGINT")};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#a()}#t(){let{stdin:t}=Ou;if(Ou.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){this.#n=void 0;return}this.#n=t,this.#r=t.isPaused(),this.#e=!!t.isRaw,t.setRawMode(!0),t.prependListener("data",this.#i),this.#r&&t.resume()}#a(){if(!this.#n)return;let t=this.#n;t.off("data",this.#i),t.isTTY&&t.setRawMode?.(this.#e),this.#r&&t.pause(),this.#n=void 0,this.#r=!1,this.#e=!1}},BL=new Dv,Mv=Object.freeze(BL);var GL=200,ZL="\x1B[?2026h",WL="\x1B[?2026l",Du=new Map,HL=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),jv=class{#o=0;#n=-1;#r=0;#e;#i;#t;#a;#c=new Map;#d=!1;#u;#s;#p=!1;#m;#l(t){this.#d=!0;try{return t()}finally{this.#d=!1}}#g(){this.isSpinning&&this.render()}#_(t,n){if(t==null)return"";if(typeof t=="string")return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){let i=typeof n=="string"&&n&&n!=="buffer"?n:"utf8";return Buffer.from(t).toString(i)}return String(t)}#E(t){if(!t)return!1;let n=t.at(-1);return n===`
183
+ `||n==="\r"}#x(){this.#s||(this.#s=setTimeout(()=>{this.#s=void 0,this.isSpinning&&this.#g()},GL),typeof this.#s?.unref=="function"&&this.#s.unref())}#h(){this.#s&&(clearTimeout(this.#s),this.#s=void 0)}#v(t,n,i,r){let o=this.#y(i," "),c=typeof n=="string"?(t?" ":"")+n:"",u=this.#S(r," ");return o+t+c+u}constructor(t){if(typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:ga.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=Ov({stream:this.#t})),typeof this.#e.isSilent!="boolean"&&(this.#e.isSilent=!1),this.#e.interval!==void 0&&!(Number.isInteger(this.#e.interval)&&this.#e.interval>0))throw new Error("The `interval` option must be a positive integer");let n=this.#e.interval;this.spinner=this.#e.spinner,this.#e.interval=n,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,ga.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#e.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(i){this.#o=i}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#n}}),Object.defineProperty(this,"_lineCount",{get(){let i=this.#t.columns??80,r=typeof this.#e.prefixText=="function"?"":this.#e.prefixText,o=typeof this.#e.suffixText=="function"?"":this.#e.suffixText,a=typeof r=="string"&&r!==""?r+" ":"",c=typeof o=="string"&&o!==""?" "+o:"",l=" ".repeat(this.#e.indent)+a+"-"+(typeof this.#e.text=="string"?" "+this.#e.text:"")+c;return this.#f(l,i)}}))}get indent(){return this.#e.indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#e.indent=t}get interval(){return this.#e.interval??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#n=-1,this.#e.interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(n=>typeof n!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#i=t}else if(!pa())this.#i=ma.line;else if(t===void 0)this.#i=ma.dots;else if(t!=="default"&&ma[t])this.#i=ma[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#e.text}set text(t=""){this.#e.text=t}get prefixText(){return this.#e.prefixText}set prefixText(t=""){this.#e.prefixText=t}get suffixText(){return this.#e.suffixText}set suffixText(t=""){this.#e.suffixText=t}get isSpinning(){return this.#a!==void 0}#b(t,n,i=!1){let r=typeof t=="function"?t():t;return typeof r=="string"&&r!==""?i?n+r:r+n:""}#y(t=this.#e.prefixText,n=" "){return this.#b(t,n,!1)}#S(t=this.#e.suffixText,n=" "){return this.#b(t,n,!0)}#f(t,n){let i=0;for(let r of VL(t).split(`
184
+ `))i+=Math.max(1,Math.ceil(kv(r)/n));return i}get color(){return this.#m}set color(t){if(t!==void 0&&t!==!1&&!HL.has(t))throw new Error("The `color` option must be a valid color or `false` to disable");this.#m=t}get isEnabled(){return this.#e.isEnabled&&!this.#e.isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#e.isEnabled=t}get isSilent(){return this.#e.isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#e.isSilent=t}frame(){let t=Date.now();(this.#n===-1||t-this.#r>=this.interval)&&(this.#n=(this.#n+1)%this.#i.frames.length,this.#r=t);let{frames:n}=this.#i,i=n[this.#n];this.#m&&(i=PT[this.#m](i));let r=this.#y(this.#e.prefixText," "),o=typeof this.text=="string"?" "+this.text:"",a=this.#S(this.#e.suffixText," ");return r+i+o+a}clear(){return!this.isEnabled||!this.#t.isTTY?this:(this.#l(()=>{this.#t.cursorTo(0);for(let t=0;t<this.#o;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);this.#e.indent&&this.#t.cursorTo(this.#e.indent)}),this.#o=0,this)}#A(t){if(!t||this.#c.has(t)||!t.isTTY||typeof t.write!="function")return;Du.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let n=t.write;this.#c.set(t,n),Du.set(t,this),t.write=(i,r,o)=>this.#$(t,n,i,r,o)}#I(){if(!this.isEnabled||this.#c.size>0)return;let t=new Set([this.#t,ga.stdout,ga.stderr]);for(let n of t)this.#A(n)}#T(){for(let[t,n]of this.#c)t.write=n,Du.get(t)===this&&Du.delete(t);this.#c.clear()}#$(t,n,i,r,o){if(typeof r=="function"&&(o=r,r=void 0),this.#d)return n.call(t,i,r,o);this.clear();let a=this.#_(i,r),c=this.#E(a),u=n.call(t,i,r,o);return c?this.#h():a.length>0&&this.#x(),this.isSpinning&&!this.#s&&this.render(),u}render(){if(!this.isEnabled||this.#u||this.#s)return this;let t=this.#t.isTTY,n=!1;try{t&&(this.#l(()=>this.#t.write(ZL)),n=!0),this.clear();let i=this.frame(),r=this.#t.columns??80,o=this.#f(i,r),a=this.#t.rows;if(a&&a>1&&o>a){let u=i.split(`
185
185
  `),l=a-1;i=[...u.slice(0,l),"... (content truncated to fit terminal)"].join(`
186
- `)}this.#l(()=>this.#t.write(i))===!1&&this.#t.isTTY&&(this.#u=()=>{this.#u=void 0,this.#g()},this.#t.once("drain",this.#u)),this.#o=this.#f(i,r)}finally{n&&this.#l(()=>this.#t.write(ZL))}return this}start(t){if(t!==void 0&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let n=this.text?"-":"",i=" ".repeat(this.#e.indent)+this.#v(n,this.text,this.#e.prefixText,this.#e.suffixText);return i.trim()!==""&&this.#l(()=>this.#t.write(i+`
187
- `)),this}return this.isSpinning?this:(this.#e.hideCursor&&Rv.hide(this.#t),this.#e.discardStdin&&ha.stdin.isTTY&&(Mv.start(),this.#p=!0),this.#I(),this.render(),this.#a=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#a),this.#a=void 0,this.#n=-1,this.#r=0,this.#h(),this.#T(),this.#u&&(this.#t.removeListener("drain",this.#u),this.#u=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&Rv.show(this.#t)),this.#p&&(this.#p=!1,Mv.stop()),this}succeed(t){return this.stopAndPersist({symbol:bn.success,text:t})}fail(t){return this.stopAndPersist({symbol:bn.error,text:t})}warn(t){return this.stopAndPersist({symbol:bn.warning,text:t})}info(t){return this.stopAndPersist({symbol:bn.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let n=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#e.prefixText,o=t.suffixText??this.#e.suffixText,a=this.#v(n,i,r,o)+`
188
- `;return this.stop(),this.#l(()=>this.#t.write(a)),this}};function ju(e){return new jv(e)}var HL=Object.defineProperty,Ye=(e,t)=>HL(e,"name",{value:t,configurable:!0}),r$={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},F=null,zv=class e{static{Ye(this,"LoggingControl")}static instance;_verbose=!0;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}get verbose(){return this._verbose}set verbose(t){this._verbose=t}};function YL(){return zv.getInstance()}Ye(YL,"getLoggingControl");function zu(e,...t){Ee.shouldSuppressOutput||(F&&F.stop(),console.log(e,...t),F&&F.start())}Ye(zu,"info");function KL(e,...t){zu(e,...t)}Ye(KL,"message");function Lv(e,...t){Ee.shouldSuppressOutput||(F?(F.succeed(Fe.hex("#A4C2A5")(`\u2705 ${e}`)),F=null):console.log(Fe.hex("#A4C2A5")(`\u2705 ${e}`),...t))}Ye(Lv,"success");function Uv(e,...t){Ee.shouldSuppressOutput||(F?(F.warn(`\u26A0\uFE0F ${e}`),F=null):console.log(Fe.yellow(`\u26A0\uFE0F ${e}`),...t))}Ye(Uv,"warning");function Lu(e,...t){Ee.shouldSuppressOutput||(F?(F.fail(Fe.red.bold(`\u274C Error: ${e}`)),F=null):console.error(Fe.red.bold(`\u274C Error: ${e}`),...t))}Ye(Lu,"error");function qL(e,t,n){if(Lu(t),Ee.shouldSuppressOutput||console.error(e),n?.tipMessage&&n$(n.tipMessage),n?.supportEmail&&!Ee.shouldSuppressOutput&&(console.log(Fe.yellow(`
189
- Please contact ${Fe.bold(n.supportEmail)} for assistance with this issue.`)),console.log(Fe.yellow("Include the error details above in your support request."))),n?.learnMoreUrl&&!Ee.shouldSuppressOutput&&console.log(Fe.blue(`
190
- \u{1F4D8} Learn more: ${n.learnMoreUrl}`)),n?.throwError!==!1)throw e;return e}Ye(qL,"handleError");function n$(e,...t){Ee.shouldSuppressOutput||(F&&F.stop(),console.log(Fe.blue(`\u{1F4A1} Tip: ${e}`),...t),F&&F.start())}Ye(n$,"tip");function XL(e){Ee.shouldSuppressOutput||(F&&F.stop(),console.log(`
191
- ${Fe.hex("#D9622E").bold(`--- ${e} ---`)}`),F&&F.start())}Ye(XL,"step");function Uu(){return Ee.shouldSuppressOutput||Ee.isNonInteractive}Ye(Uu,"shouldSuppressSpinner");function Fv(e){if(Uu())return null;if(F)return F.text=e,F;let t=Fe.hex("#FF7BFF")(e);return F=ju({text:t,spinner:r$,color:"magenta"}).start(),F}Ye(Fv,"startSpinner");function Bv(e){if(Uu())return null;if(F)F.text=Fe.hex("#FF7BFF")(e);else{let t=Fe.hex("#FF7BFF")(e);F=ju({text:t,spinner:r$,color:"magenta"}).start()}return F}Ye(Bv,"updateSpinner");function Vv(){Uu()||F&&(F.stop(),F=null)}Ye(Vv,"stopSpinner");var JL=Object.defineProperty,i$=(e,t)=>JL(e,"name",{value:t,configurable:!0}),Gv=class{static{i$(this,"CLILogger")}info(t){zu(t)}error(t){Lu(t)}warning(t){Uv(t)}success(t){Lv(t)}debug(t){Fu.debug("CLI",t)}startSpinner(t){return Fv(t)}stopSpinner(){Vv()}updateSpinner(t){Bv(t)}},va=class{static{i$(this,"CLIContext")}mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(t={}){this.isNonInteractive=t.noPrompt??!1,this.logger=new Gv}};var QL=Object.defineProperty,o$=(e,t)=>QL(e,"name",{value:t,configurable:!0}),Zv=class{static{o$(this,"SilentLogger")}info(t){}error(t){}warning(t){}success(t){}debug(t){}startSpinner(t){return null}stopSpinner(){}updateSpinner(t){}},ba=class{static{o$(this,"InkContext")}mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new Zv}};var eU=Object.defineProperty,tU=(e,t)=>eU(e,"name",{value:t,configurable:!0}),Ee=class{static{tU(this,"ContextManager")}static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new va({noPrompt:!1}):this.stack[this.stack.length-1]}static get isNonInteractive(){return this._isNonInteractive}static enterNonInteractiveMode(){this._isNonInteractive=!0}static exitNonInteractiveMode(){this._isNonInteractive=!1}static getContext(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}static push(t){this.stack.push(t)}static pop(){this.stack.length>0&&this.stack.pop()}static enterUIMode(){this.push(new ba)}static exitUIMode(){this.pop()}static async withContext(t,n){this.push(t);try{return await n()}finally{this.pop()}}static get isUIMode(){return this.current.mode==="ink"}static get shouldSuppressOutput(){return this.current.suppressOutput}static reset(){this.stack=[]}};var rU=Object.defineProperty,nU=(e,t)=>rU(e,"name",{value:t,configurable:!0}),Di=class{static{nU(this,"CorrelatedLogger")}logger;correlationId;constructor(t,n){this.logger=t,this.correlationId=n}log(t,n,i,r){this.logger.logWithCorrelation(t,n,i,this.correlationId,r)}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}};import{createWriteStream as lU,existsSync as d$,mkdirSync as m$}from"fs";import{existsSync as yn,renameSync as a$,unlinkSync as s$,statSync as aU,mkdirSync as sU}from"fs";import{dirname as c$,basename as u$,extname as l$,join as ya}from"path";var iU=Object.defineProperty,oU=(e,t)=>iU(e,"name",{value:t,configurable:!0}),Mi=class{static{oU(this,"FileRotator")}maxFiles;constructor(t){this.maxFiles=t.maxFiles}needsRotation(t,n){try{return yn(t)?aU(t).size>n:!1}catch{return!1}}rotate(t){try{let n=c$(t);if(!yn(n)){sU(n,{recursive:!0});return}if(!yn(t))return;let i=l$(t),r=u$(t,i),o=ya(n,`${r}.${this.maxFiles-1}${i}`);yn(o)&&s$(o);for(let c=this.maxFiles-2;c>=1;c--){let u=ya(n,`${r}.${c}${i}`),l=ya(n,`${r}.${c+1}${i}`);yn(u)&&a$(u,l)}let a=ya(n,`${r}.1${i}`);a$(t,a)}catch{}}rotateIfNeeded(t,n){return this.needsRotation(t,n)?(this.rotate(t),!0):!1}getRotatedFiles(t){let n=[],i=c$(t),r=l$(t),o=u$(t,r);yn(t)&&n.push(t);for(let a=1;a<this.maxFiles;a++){let c=ya(i,`${o}.${a}${r}`);if(yn(c))n.push(c);else break}return n}cleanAll(t){let n=this.getRotatedFiles(t);for(let i of n)try{s$(i)}catch{}}};var cU=Object.defineProperty,uU=(e,t)=>cU(e,"name",{value:t,configurable:!0}),Bu=class{static{uU(this,"LogFileWriter")}config;mainLogPath;debugLogPath;debugEnabled;mainLogStream=null;debugLogStream=null;buffer=[];debugBuffer=[];flushInterval=null;isClosing=!1;initialised=!1;exitHandlerRegistered=!1;fileRotator;constructor(t,n,i,r){this.config=t,this.mainLogPath=n,this.debugLogPath=i,this.debugEnabled=r,this.fileRotator=new Mi({maxFiles:t.maxFiles})}get isInitialised(){return this.initialised}openStream(t){let n=lU(t,{flags:"a"});return n.on("error",i=>{process.stderr.write(`[fjall] Log stream error: ${i.message}
192
- `)}),n}initialise(){if(!(this.initialised||this.isClosing))try{d$(this.config.logDir)||m$(this.config.logDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.mainLogPath,this.config.maxFileSize),this.mainLogStream=this.openStream(this.mainLogPath),this.debugEnabled&&this.initialiseDebugStream(),this.flushInterval=setInterval(()=>this.flush(),this.config.flushIntervalMs),this.exitHandlerRegistered||(process.on("exit",()=>{this.flush()}),this.exitHandlerRegistered=!0),this.initialised=!0}catch(t){process.stderr.write(`[fjall] Logger init failed: ${t instanceof Error?t.message:String(t)}
193
- `)}}initialiseDebugStream(){if(!this.debugLogStream)try{d$(this.config.debugLogDir)||m$(this.config.debugLogDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.debugLogPath,this.config.maxFileSize),this.debugLogStream=this.openStream(this.debugLogPath)}catch(t){process.stderr.write(`[fjall] Debug log init failed: ${t instanceof Error?t.message:String(t)}
186
+ `)}this.#l(()=>this.#t.write(i))===!1&&this.#t.isTTY&&(this.#u=()=>{this.#u=void 0,this.#g()},this.#t.once("drain",this.#u)),this.#o=this.#f(i,r)}finally{n&&this.#l(()=>this.#t.write(WL))}return this}start(t){if(t!==void 0&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let n=this.text?"-":"",i=" ".repeat(this.#e.indent)+this.#v(n,this.text,this.#e.prefixText,this.#e.suffixText);return i.trim()!==""&&this.#l(()=>this.#t.write(i+`
187
+ `)),this}return this.isSpinning?this:(this.#e.hideCursor&&Rv.hide(this.#t),this.#e.discardStdin&&ga.stdin.isTTY&&(Mv.start(),this.#p=!0),this.#I(),this.render(),this.#a=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#a),this.#a=void 0,this.#n=-1,this.#r=0,this.#h(),this.#T(),this.#u&&(this.#t.removeListener("drain",this.#u),this.#u=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&Rv.show(this.#t)),this.#p&&(this.#p=!1,Mv.stop()),this}succeed(t){return this.stopAndPersist({symbol:bn.success,text:t})}fail(t){return this.stopAndPersist({symbol:bn.error,text:t})}warn(t){return this.stopAndPersist({symbol:bn.warning,text:t})}info(t){return this.stopAndPersist({symbol:bn.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let n=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#e.prefixText,o=t.suffixText??this.#e.suffixText,a=this.#v(n,i,r,o)+`
188
+ `;return this.stop(),this.#l(()=>this.#t.write(a)),this}};function Mu(e){return new jv(e)}var YL=Object.defineProperty,Ke=(e,t)=>YL(e,"name",{value:t,configurable:!0}),n$={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},F=null,zv=class e{static{Ke(this,"LoggingControl")}static instance;_verbose=!0;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}get verbose(){return this._verbose}set verbose(t){this._verbose=t}};function KL(){return zv.getInstance()}Ke(KL,"getLoggingControl");function ju(e,...t){Ee.shouldSuppressOutput||(F&&F.stop(),console.log(e,...t),F&&F.start())}Ke(ju,"info");function qL(e,...t){ju(e,...t)}Ke(qL,"message");function Lv(e,...t){Ee.shouldSuppressOutput||(F?(F.succeed(Be.hex("#A4C2A5")(`\u2705 ${e}`)),F=null):console.log(Be.hex("#A4C2A5")(`\u2705 ${e}`),...t))}Ke(Lv,"success");function Uv(e,...t){Ee.shouldSuppressOutput||(F?(F.warn(`\u26A0\uFE0F ${e}`),F=null):console.log(Be.yellow(`\u26A0\uFE0F ${e}`),...t))}Ke(Uv,"warning");function zu(e,...t){Ee.shouldSuppressOutput||(F?(F.fail(Be.red.bold(`\u274C Error: ${e}`)),F=null):console.error(Be.red.bold(`\u274C Error: ${e}`),...t))}Ke(zu,"error");function XL(e,t,n){if(zu(t),Ee.shouldSuppressOutput||console.error(e),n?.tipMessage&&i$(n.tipMessage),n?.supportEmail&&!Ee.shouldSuppressOutput&&(console.log(Be.yellow(`
189
+ Please contact ${Be.bold(n.supportEmail)} for assistance with this issue.`)),console.log(Be.yellow("Include the error details above in your support request."))),n?.learnMoreUrl&&!Ee.shouldSuppressOutput&&console.log(Be.blue(`
190
+ \u{1F4D8} Learn more: ${n.learnMoreUrl}`)),n?.throwError!==!1)throw e;return e}Ke(XL,"handleError");function i$(e,...t){Ee.shouldSuppressOutput||(F&&F.stop(),console.log(Be.blue(`\u{1F4A1} Tip: ${e}`),...t),F&&F.start())}Ke(i$,"tip");function JL(e){Ee.shouldSuppressOutput||(F&&F.stop(),console.log(`
191
+ ${Be.hex("#D9622E").bold(`--- ${e} ---`)}`),F&&F.start())}Ke(JL,"step");function Lu(){return Ee.shouldSuppressOutput||Ee.isNonInteractive}Ke(Lu,"shouldSuppressSpinner");function Fv(e){if(Lu())return null;if(F)return F.text=e,F;let t=Be.hex("#FF7BFF")(e);return F=Mu({text:t,spinner:n$,color:"magenta"}).start(),F}Ke(Fv,"startSpinner");function Bv(e){if(Lu())return null;if(F)F.text=Be.hex("#FF7BFF")(e);else{let t=Be.hex("#FF7BFF")(e);F=Mu({text:t,spinner:n$,color:"magenta"}).start()}return F}Ke(Bv,"updateSpinner");function Vv(){Lu()||F&&(F.stop(),F=null)}Ke(Vv,"stopSpinner");var QL=Object.defineProperty,o$=(e,t)=>QL(e,"name",{value:t,configurable:!0}),Gv=class{static{o$(this,"CLILogger")}info(t){ju(t)}error(t){zu(t)}warning(t){Uv(t)}success(t){Lv(t)}debug(t){Uu.debug("CLI",t)}startSpinner(t){return Fv(t)}stopSpinner(){Vv()}updateSpinner(t){Bv(t)}},ha=class{static{o$(this,"CLIContext")}mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(t={}){this.isNonInteractive=t.noPrompt??!1,this.logger=new Gv}};var eU=Object.defineProperty,a$=(e,t)=>eU(e,"name",{value:t,configurable:!0}),Zv=class{static{a$(this,"SilentLogger")}info(t){}error(t){}warning(t){}success(t){}debug(t){}startSpinner(t){return null}stopSpinner(){}updateSpinner(t){}},va=class{static{a$(this,"InkContext")}mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new Zv}};var tU=Object.defineProperty,rU=(e,t)=>tU(e,"name",{value:t,configurable:!0}),Ee=class{static{rU(this,"ContextManager")}static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new ha({noPrompt:!1}):this.stack[this.stack.length-1]}static get isNonInteractive(){return this._isNonInteractive}static enterNonInteractiveMode(){this._isNonInteractive=!0}static exitNonInteractiveMode(){this._isNonInteractive=!1}static getContext(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}static push(t){this.stack.push(t)}static pop(){this.stack.length>0&&this.stack.pop()}static enterUIMode(){this.push(new va)}static exitUIMode(){this.pop()}static async withContext(t,n){this.push(t);try{return await n()}finally{this.pop()}}static get isUIMode(){return this.current.mode==="ink"}static get shouldSuppressOutput(){return this.current.suppressOutput}static reset(){this.stack=[]}};var nU=Object.defineProperty,iU=(e,t)=>nU(e,"name",{value:t,configurable:!0}),Di=class{static{iU(this,"CorrelatedLogger")}logger;correlationId;constructor(t,n){this.logger=t,this.correlationId=n}log(t,n,i,r){this.logger.logWithCorrelation(t,n,i,this.correlationId,r)}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}};import{createWriteStream as dU,existsSync as m$,mkdirSync as p$}from"fs";import{existsSync as yn,renameSync as s$,unlinkSync as c$,statSync as sU,mkdirSync as cU}from"fs";import{dirname as u$,basename as l$,extname as d$,join as ba}from"path";var oU=Object.defineProperty,aU=(e,t)=>oU(e,"name",{value:t,configurable:!0}),Mi=class{static{aU(this,"FileRotator")}maxFiles;constructor(t){this.maxFiles=t.maxFiles}needsRotation(t,n){try{return yn(t)?sU(t).size>n:!1}catch{return!1}}rotate(t){try{let n=u$(t);if(!yn(n)){cU(n,{recursive:!0});return}if(!yn(t))return;let i=d$(t),r=l$(t,i),o=ba(n,`${r}.${this.maxFiles-1}${i}`);yn(o)&&c$(o);for(let c=this.maxFiles-2;c>=1;c--){let u=ba(n,`${r}.${c}${i}`),l=ba(n,`${r}.${c+1}${i}`);yn(u)&&s$(u,l)}let a=ba(n,`${r}.1${i}`);s$(t,a)}catch{}}rotateIfNeeded(t,n){return this.needsRotation(t,n)?(this.rotate(t),!0):!1}getRotatedFiles(t){let n=[],i=u$(t),r=d$(t),o=l$(t,r);yn(t)&&n.push(t);for(let a=1;a<this.maxFiles;a++){let c=ba(i,`${o}.${a}${r}`);if(yn(c))n.push(c);else break}return n}cleanAll(t){let n=this.getRotatedFiles(t);for(let i of n)try{c$(i)}catch{}}};var uU=Object.defineProperty,lU=(e,t)=>uU(e,"name",{value:t,configurable:!0}),Fu=class{static{lU(this,"LogFileWriter")}config;mainLogPath;debugLogPath;debugEnabled;mainLogStream=null;debugLogStream=null;buffer=[];debugBuffer=[];flushInterval=null;isClosing=!1;initialised=!1;exitHandlerRegistered=!1;fileRotator;constructor(t,n,i,r){this.config=t,this.mainLogPath=n,this.debugLogPath=i,this.debugEnabled=r,this.fileRotator=new Mi({maxFiles:t.maxFiles})}get isInitialised(){return this.initialised}openStream(t){let n=dU(t,{flags:"a"});return n.on("error",i=>{process.stderr.write(`[fjall] Log stream error: ${i.message}
192
+ `)}),n}initialise(){if(!(this.initialised||this.isClosing))try{m$(this.config.logDir)||p$(this.config.logDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.mainLogPath,this.config.maxFileSize),this.mainLogStream=this.openStream(this.mainLogPath),this.debugEnabled&&this.initialiseDebugStream(),this.flushInterval=setInterval(()=>this.flush(),this.config.flushIntervalMs),this.exitHandlerRegistered||(process.on("exit",()=>{this.flush()}),this.exitHandlerRegistered=!0),this.initialised=!0}catch(t){process.stderr.write(`[fjall] Logger init failed: ${t instanceof Error?t.message:String(t)}
193
+ `)}}initialiseDebugStream(){if(!this.debugLogStream)try{m$(this.config.debugLogDir)||p$(this.config.debugLogDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.debugLogPath,this.config.maxFileSize),this.debugLogStream=this.openStream(this.debugLogPath)}catch(t){process.stderr.write(`[fjall] Debug log init failed: ${t instanceof Error?t.message:String(t)}
194
194
  `)}}setDebugEnabled(t){this.debugEnabled=t}write(t,n){this.isClosing||(this.initialised||this.initialise(),this.buffer.push(t),this.debugEnabled&&n&&this.debugBuffer.push(t),this.buffer.length>=this.config.maxBufferSize&&this.flush())}flushBuffer(t,n,i){if(t.length===0||!n)return{buffer:t,stream:n};let r=n;this.fileRotator.needsRotation(i,this.config.maxFileSize)&&(r.end(),this.fileRotator.rotate(i),r=this.openStream(i));for(let o of t)r.write(JSON.stringify(o)+`
195
- `);return{buffer:[],stream:r}}flush(){let t=this.flushBuffer(this.buffer,this.mainLogStream,this.mainLogPath);this.buffer=t.buffer,this.mainLogStream=t.stream;let n=this.flushBuffer(this.debugBuffer,this.debugLogStream,this.debugLogPath);this.debugBuffer=n.buffer,this.debugLogStream=n.stream}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.mainLogStream&&(this.mainLogStream.end(),this.mainLogStream=null),this.debugLogStream&&(this.debugLogStream.end(),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,this.isClosing=!1}async closeAndFlush(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null);let t=[];this.mainLogStream&&(t.push(this.mainLogStream),this.mainLogStream=null),this.debugLogStream&&(t.push(this.debugLogStream),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,await Promise.all(t.map(n=>new Promise(i=>{n.end(()=>i())}))),this.isClosing=!1}};import{createWriteStream as vU,existsSync as bU,mkdirSync as yU}from"fs";import{join as p$}from"path";var Sn={trace:0,debug:1,info:2,warn:3,error:4},Ke={MAX_FILE_SIZE:10*1024*1024,MAX_FILES:5,MAX_BUFFER_SIZE:100,FLUSH_INTERVAL_MS:500,LOG_FILENAME:"fjall.jsonl",DEBUG_LOG_FILENAME:"fjall-debug.jsonl"};import{join as pU}from"path";import{homedir as fU}from"os";var dU=Object.defineProperty,mU=(e,t)=>dU(e,"name",{value:t,configurable:!0});function zr(){let e=process.env.FJALL_LOG_DIR;return e!==void 0&&e!==""?e:pU(fU(),".fjall","logs")}mU(zr,"getDefaultLogDir");var gU=Object.defineProperty,hU=(e,t)=>gU(e,"name",{value:t,configurable:!0}),Sa=class{static{hU(this,"DeploymentLoggerImpl")}mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=Ke.MAX_BUFFER_SIZE;constructor(t,n,i){this.mainLogger=t,this.appName=n,this.operationType=i,this.deploymentId=`${i}-${Date.now()}`;let r=zr(),o=p$(r,"deployments",n);bU(o)||yU(o,{recursive:!0});let a=new Date().toISOString().replace(/[:.]/g,"-"),c=`${i}-${a}.jsonl`;this.logPath=p$(o,c);try{this.logStream=vU(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),Ke.FLUSH_INTERVAL_MS),this.info("DeploymentLogger","Deployment logging initialised",{appName:n,operationType:i,deploymentId:this.deploymentId,logPath:this.logPath})}catch{}}log(t,n,i,r,o,a){if(this.isClosing)return;let c={timestamp:new Date().toISOString(),level:t,component:n,message:i,correlationId:this.deploymentId,...r&&Object.keys(r).length>0&&{data:r},...o&&{stackName:o},...a&&{phase:a}};this.buffer.push(c),this.mainLogger.logWithCorrelation(t,n,i,this.deploymentId,r,o,a),this.buffer.length>=this.maxBufferSize&&this.flush()}flush(){if(!(this.buffer.length===0||!this.logStream)){for(let t of this.buffer)this.logStream.write(JSON.stringify(t)+`
196
- `);this.buffer=[]}}info(t,n,i){this.log("info",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}error(t,n,i){this.log("error",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}stackEvent(t,n,i,r){this.log("info","StackDeployment",i,r,t,n)}dockerEvent(t,n){this.log("info","DockerOperation",t,{percentage:n})}ecsEvent(t,n,i){this.log("info","ECSDeployment",t,{percentage:n,taskCount:i})}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.logStream&&(this.logStream.end(),this.logStream=null),this.buffer=[],this.isClosing=!1}getLogPath(){return this.logPath}getDeploymentId(){return this.deploymentId}};var SU=Object.defineProperty,_U=(e,t)=>SU(e,"name",{value:t,configurable:!0}),Vu=class e{static{_U(this,"Logger")}static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let t=zr(),n=Wv(t,"debug"),i=this.parseEnvInt("FJALL_LOG_MAX_SIZE",Ke.MAX_FILE_SIZE),r=this.parseEnvInt("FJALL_LOG_MAX_FILES",Ke.MAX_FILES);this.config={logDir:t,debugLogDir:n,maxFileSize:i,maxFiles:r,maxBufferSize:Ke.MAX_BUFFER_SIZE,flushIntervalMs:Ke.FLUSH_INTERVAL_MS},this.mainLogPath=Wv(t,Ke.LOG_FILENAME),this.debugLogPath=Wv(n,Ke.DEBUG_LOG_FILENAME),this.debugEnabled=process.env.FJALL_DEBUG==="true"||process.env.FJALL_TRACE==="true"||process.argv.includes("--verbose")||process.argv.includes("-v"),this.traceEnabled=process.env.FJALL_TRACE==="true";let o=process.env.FJALL_LOG_LEVEL?.toLowerCase();o&&o in Sn?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new Bu(this.config,this.mainLogPath,this.debugLogPath,this.debugEnabled)}parseEnvInt(t,n){let i=process.env[t];if(i){let r=parseInt(i,10);if(!isNaN(r)&&r>0)return r}return n}static getInstance(){return e.instance||(e.instance=new e),e.instance}shouldLog(t){return Sn[t]>=Sn[this.minLevel]}createEntry(t,n,i,r,o,a,c){return{timestamp:new Date().toISOString(),level:t,component:n,message:i,...o&&{correlationId:o},...r&&Object.keys(r).length>0&&{data:r},...a&&{stackName:a},...c&&{phase:c}}}log(t,n,i,r,o,a,c){if(!this.shouldLog(t))return;let u=this.createEntry(t,n,i,r,o,a,c),l=t==="debug"||t==="trace";this.fileWriter.write(u,l),this.writeConsole(u)}writeConsole(t){if(Ee.shouldSuppressOutput||Ee.isNonInteractive){this.debugEnabled&&this.writeDebugMirror(t);return}let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r=`${n} ${i} ${t.message}`;t.level==="error"?console.error(r):t.level==="warn"?console.warn(r):console.log(r)}writeDebugMirror(t){let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r="";if(t.data&&Object.keys(t.data).length>0)try{r=` ${JSON.stringify(t.data)}`}catch{r=" [unserialisable data]"}let o=`${n} ${i} ${t.message}${r}`;process.stderr.write(`${Or(o)}
197
- `)}getConsolePrefix(t){switch(t){case"error":return"[ERROR]";case"warn":return"[WARN]";case"info":return"[INFO]";case"debug":return"[DEBUG]";case"trace":return"[TRACE]"}}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}isDebugEnabled(){return this.debugEnabled}isTraceEnabled(){return this.traceEnabled}enableDebug(){this.debugEnabled=!0,Sn[this.minLevel]>Sn.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(t){return new Di(this,t)}forDeployment(t,n="deploy"){return new Sa(this,t,n)}close(){this.fileWriter.close()}async flushAndClose(){await this.fileWriter.closeAndFlush()}getLogPath(){return this.mainLogPath}getDebugLogPath(){return this.debugLogPath}getLogDir(){return this.config.logDir}logWithCorrelation(t,n,i,r,o,a,c){this.log(t,n,i,o,r,a,c)}static reset(){e.instance&&(e.instance.close(),e.instance=null)}};var EU=Object.defineProperty,xU=(e,t)=>EU(e,"name",{value:t,configurable:!0}),Fu=Vu.getInstance();function $U(e){let t=zr(),n=g$(t,"debug"),i=g$(n,Ke.DEBUG_LOG_FILENAME);try{f$(n)||AU(n,{recursive:!0}),f$(i)&&IU(i).size>Ke.MAX_FILE_SIZE&&new Mi({maxFiles:Ke.MAX_FILES}).rotate(i);let r={timestamp:new Date().toISOString(),level:"debug",component:"Emergency",message:e};TU(i,JSON.stringify(r)+`
198
- `)}catch{}}xU($U,"writeDebugSync");var RU=Object.defineProperty,ji=(e,t)=>RU(e,"name",{value:t,configurable:!0});function Hv(e){return e.success===!0}ji(Hv,"isSuccess");function Yv(e){return e.success===!1}ji(Yv,"isFailure");function P(e){return{success:!0,data:e}}ji(P,"success");function T(e){return{success:!1,error:e}}ji(T,"failure");async function Kv(e){try{let t=await e();return P(t)}catch(t){return T(Tt(t))}}ji(Kv,"tryAsync");function qv(e){try{let t=e();return P(t)}catch(t){return T(Tt(t))}}ji(qv,"trySync");var CU=Object.defineProperty,NU=(e,t)=>CU(e,"name",{value:t,configurable:!0}),h$=/^[a-zA-Z][a-zA-Z0-9-]*$/,PU=ia.source.replace(/^\^|\$$/g,""),L=Object.freeze({IDENTIFIER:h$,NEW_APP_NAME:/^[a-z][a-z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:h$,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:new RegExp(`^(?:/${PU})+$`),SECRET_NAME:bu,SSM_COMPONENT:ia,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,HTTP_ORIGIN:/^https?:\/\/[a-z0-9.-]+(:\d+)?$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/});function Xv(e){let t=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(e);if(!t)return;let n=t[1],i=t[2];if(n===void 0||i===void 0)return;let r=parseInt(n,10);if(!Number.isFinite(r)||r<1)return;let o=i==="minute"||i==="hour"||i==="day";if(!(o&&r!==1)&&!(!o&&r===1))return i==="minute"||i==="minutes"?{everyMs:r*6e4}:i==="hour"||i==="hours"?{everyMs:r*60*6e4}:{everyMs:r*24*60*6e4}}NU(Xv,"parseRateExpression");var m=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",NEW_APP_NAME:"Must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:Wh,SSM_COMPONENT:yu,EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",SOURCE:"Source directory is required",BUILD_COMMAND:"Build command is required",OUTPUT_DIR:"Output directory is required",FORMS_TO:"Forms recipient address is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"});var wU=Object.defineProperty,gt=(e,t)=>wU(e,"name",{value:t,configurable:!0}),kU=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],OU=Object.freeze(kU.flatMap(e=>{let t=Ai(e);return t?[t]:[]})),Jv=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function Gu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}gt(Gu,"parseRegionList");function Qv(e){return ar.includes(e)}gt(Qv,"isValidRegion");function eb(e){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(e)}gt(eb,"isValidRegionFormat");function tb(e){if(!e)return Jv.slice(0,3);let t=e.toLowerCase().split("-"),n=t[0],i=t.length>1?t[1]:"",r=[];return n&&i&&(r=ar.filter(o=>o.startsWith(`${n}-${i}`))),r.length===0&&n&&(r=ar.filter(o=>o.startsWith(`${n}-`))),r.length>0?r.slice(0,3):Jv.slice(0,3)}gt(tb,"getSuggestions");function rb(e){if(Qv(e))return!0;let t=tb(e);return eb(e)?`Unknown region. Try: ${t.join(", ")}`:`Invalid format. Try: ${t.join(", ")}`}gt(rb,"validateRegion");function v$(e){if(!e||e.trim()==="")return!0;let t=Gu(e);for(let n of t){let i=rb(n);if(i!==!0)return i}return!0}gt(v$,"validateRegionList");function nb(e,t){return e.filter(n=>n!==t)}gt(nb,"filterDuplicateRegions");function ib(e){return{label:e.city,value:e.code,description:e.optIn?`${e.code} \u2014 opt-in required`:e.code}}gt(ib,"toRegionOption");function b$(){return mt.map(ib)}gt(b$,"getRegionOptions");function y$(e){return mt.filter(t=>t.code!==e).map(ib)}gt(y$,"getRegionOptionsExcluding");function S$(e){let t=mt.find(n=>n.code===e);return t?t.city:e}gt(S$,"getRegionName");function _$(e){return t=>{let n=Gu(t);return nb(n,e)}}gt(_$,"createRegionFormatter");var Zu="11.0.0";var Wu=["Aurora","Instance","GlobalAurora","ClickHouse"],zi=["FARGATE","FARGATE_SPOT","EC2"],Rt=["standard","resilient","enterprise"],Hu=["tinkerer","lightweight","standard","resilient","enterprise"],ob="custom",_a=[...Hu,ob];var DU=Object.defineProperty,MU=(e,t)=>DU(e,"name",{value:t,configurable:!0}),E$=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})}),Ea=["ecs","lambda","ec2"],Li=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),Yu=["code","container"],xa=Object.freeze({CODE:"code",CONTAINER:"container"}),Ku=["ARM_64","X86_64"],x$="ARM_64",Aa=["NONE","AWS_IAM"],qu=["public","internal"],Xu=["CPU","MEMORY"],Ju=["ARM","STANDARD"],ab=["Instance","Aurora"],Ui=["postgresql","mysql"],Ia=["web","worker"],A$=["foundation","compliance","hardened"];var Qu=["t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge","t3a.nano","t3a.micro","t3a.small","t3a.medium","t3a.large","t3a.xlarge","t3a.2xlarge","t4g.nano","t4g.micro","t4g.small","t4g.medium","t4g.large","t4g.xlarge","t4g.2xlarge","c5.large","c5.xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5a.large","c5a.xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c6g.medium","c6g.large","c6g.xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.12xlarge","c6g.16xlarge","r5.large","r5.xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5a.large","r5a.xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r6g.medium","r6g.large","r6g.xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.12xlarge","r6g.16xlarge","i3.large","i3.xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.16xlarge","p3.2xlarge","p3.8xlarge","p3.16xlarge","g4dn.xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.12xlarge","g4dn.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge"],I$=[0,1,5,10,15,30,60];function ht(e,t){return e.includes(t)}MU(ht,"constIncludes");var T$=1,$$=65535,eq=Object.freeze({postgresql:5432,mysql:3306}),R$=128,C$=10240,el=1,tl=900,sb=1,cb=1e3,Fi=100,N$=100;var P$=3e3;var w$=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],k$=["standard","assets","upload","website"],Bi=["AES256","KMS"];var jU=Object.defineProperty,Ta=(e,t)=>jU(e,"name",{value:t,configurable:!0}),qe=Ta(e=>s.union([s.literal(!1),e]),"optionalOrDisabled"),_n={check:Ta(e=>e.minCapacity!==void 0&&e.maxCapacity!==void 0?e.minCapacity<=e.maxCapacity:!0,"check"),params:{message:m.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},$a=Ta(e=>s.number().int(m.MEMORY_LIMIT.INTEGER).min(e,e===128?m.MEMORY_LIMIT.MIN_128:m.MEMORY_LIMIT.MIN_512).max(30720,m.MEMORY_LIMIT.MAX),"memoryLimitMiBSchema"),V=s.string().min(1,m.REQUIRED.RESOURCE_NAME).max(63,m.MAX_LENGTH.RESOURCE_NAME).regex(L.RESOURCE_NAME,m.RESOURCE_NAME),D$=s.string().min(1,m.REQUIRED.BUCKET_NAME).max(63,m.MAX_LENGTH.BUCKET_NAME).regex(L.BUCKET_NAME,m.BUCKET_NAME),M$=s.string().min(1,m.REQUIRED.DATABASE_NAME).max(63,m.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,m.DATABASE_NAME);function rl(e,t=L.IDENTIFIER,n=m.IDENTIFIER){return s.string().min(2,m.IDENTIFIER_MIN_LENGTH).max(50,e).regex(t,n).refine(i=>!i.endsWith("-"),{message:m.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(i=>!i.includes("--"),{message:m.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}Ta(rl,"identifierSchema");var xe=rl(m.MAX_LENGTH.APP_NAME),sq=rl(m.MAX_LENGTH.APP_NAME,L.NEW_APP_NAME,m.NEW_APP_NAME),En=s.number().int(m.PORT.INTEGER).min(T$,m.PORT.MIN).max($$,m.PORT.MAX),ke=s.object({key:s.string(),sourceText:s.string()}).strict(),zU=s.object({__identifier:s.string()}).strict(),LU=s.object({__expression:s.string()}).strict(),UU=s.object({__call:s.string()}).strict(),FU=s.union([zU,LU,UU]),BU=s.union([s.string(),s.number(),s.boolean(),FU]),Vi=s.record(s.string().regex(L.ENV_VAR_NAME,m.ENV_VAR_NAME),BU),VU=s.object({id:s.string(),name:s.string().optional(),arn:s.string().optional(),field:s.string().optional()}).strict().refine(e=>e.name!==void 0!=(e.arn!==void 0),{message:"secretsImport requires exactly one of `name` or `arn`."}),j$=s.record(s.string(),VU),cq=s.record(s.string(),s.unknown()),ub=s.enum(_a).describe(`Application type must be one of: ${_a.join(", ")}`),lb=s.enum(Lt).describe(`OpenNext deployment pattern: ${Lt.join(", ")}`),GU=s.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),ZU=s.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),z$=s.object({sourceText:s.string(),position:GU,afterManagedResource:s.object({type:ZU,name:s.string().optional()}).strict().optional(),originalLine:s.number().int().optional(),leadingComments:s.array(s.string()).optional(),orphaned:s.boolean().optional(),orphanedComment:s.string().optional()}).strict(),L$=s.union([s.object({tier:s.enum(Rt)}).strict(),s.literal(!1)]),U$=s.union([s.object({instanceType:s.string().optional()}).strict(),s.literal(!1)]),WU=rl(m.MAX_LENGTH.ORGANISATION_NAME),HU=s.string().regex(L.EMAIL,m.EMAIL),O$=s.string().refine(e=>ar.includes(e),{message:m.REGION}),uq=s.object({name:WU,email:HU,accountName:s.string().optional(),primaryRegion:O$.optional().default(xi),secondaryRegions:s.array(O$).optional(),security:s.enum(A$).optional(),force:s.boolean().optional()}).strict();function Ra(e){return e.issues.map(t=>`${t.path.length>0?`${t.path.join(".")}: `:""}${t.message}`).join(`
199
- `)}Ta(Ra,"getZodErrorMessage");var Gi=s.number().min(1,m.ALARM.PERCENTAGE.MIN).max(100,m.ALARM.PERCENTAGE.MAX),YU=s.number().min(1,m.ALARM.FREE_STORAGE_GIB.MIN),F$=s.union([s.literal(!1),s.object({cpuThreshold:Gi.optional(),memoryThreshold:Gi.optional(),runningTasksMinimum:s.number().int().min(0).optional(),http5xxThreshold:Gi.optional()}).strict()]),B$=s.union([s.literal(!1),s.object({cpuThreshold:Gi.optional(),freeStorageThresholdGiB:YU.optional(),connectionsThreshold:s.number().int().min(1).optional()}).strict()]),V$=s.union([s.literal(!1),s.object({errorRateThreshold:Gi.optional(),durationThresholdPercent:Gi.optional()}).strict()]);var sr=s.number().int(m.BACKUP_RETENTION.INTEGER).min(1,m.BACKUP_RETENTION.MIN).max(35,m.BACKUP_RETENTION.MAX),Ca=s.number().int(m.MONITORING_INTERVAL.INTEGER).refine(e=>ht(I$,e),{message:m.MONITORING_INTERVAL.VALUES}),il=s.number().int(m.DATABASE.PORT.INTEGER).min(1024,m.DATABASE.PORT.MIN).max(65535,m.DATABASE.PORT.MAX),KU=s.enum(Wu).describe(`Database type must be one of: ${Wu.join(", ")}`),qU=s.object({maxConnections:s.number().int(m.MAX_CONNECTIONS.INTEGER).min(1,m.MAX_CONNECTIONS.MIN).max(100,m.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(m.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,m.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,m.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional()}).strict().describe("RDS Proxy configuration"),XU=s.object({instanceType:s.string().optional(),availabilityZone:s.string().optional()}).strict().describe("Read replica configuration"),JU=s.object({automaticallyAfterDays:s.number().int(m.ROTATION.INTEGER).min(1,m.ROTATION.MIN).max(365,m.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),ol=s.object({username:s.string().min(1,m.REQUIRED.USERNAME).max(63,m.USERNAME.MAX_LENGTH).optional(),secretRotation:JU.optional()}).strict().describe("Database credentials configuration"),al=qe(qU),sl=qe(XU),QU=s.object({scaleWithWriter:s.boolean().optional(),enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,m.IDENTIFIER_SUFFIX.REQUIRED).max(50,m.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),Na=s.object({enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,m.IDENTIFIER_SUFFIX.REQUIRED).max(50,m.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for Aurora writer instance"),e2=s.object({count:s.number().int(m.READER.COUNT.INTEGER).min(0,m.READER.COUNT.MIN).max(15,m.READER.COUNT.MAX).optional(),instances:s.array(QU).max(15,m.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:s.boolean().optional()}).strict().refine(e=>!(e.count!==void 0&&e.instances!==void 0),{message:m.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),Pa=qe(e2),t2=s.object({awsManaged:s.literal(!0)}).strict(),r2=s.object({useCMK:s.literal(!0)}).strict(),G$=s.union([t2,r2]),n2=s.object({mode:s.enum(["standard","advanced"]).optional(),encryptionKey:G$.optional()}).strict().describe("Database Insights configuration"),cl=qe(n2),ul=s.object({storageKey:G$.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),Z$=s.object({name:V,type:KU,databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME),instanceType:s.string().optional(),allocatedStorage:s.number().optional(),multiAz:s.boolean().optional(),publiclyAccessible:s.boolean().optional(),databaseInsights:cl.optional(),port:il.optional(),deletionProtection:s.boolean().optional(),proxy:al.optional(),credentials:ol.optional(),readReplica:sl.optional(),encryption:ul.optional(),writer:Na.optional(),readers:Pa.optional(),backupRetention:sr.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Ca.optional(),primaryRegion:s.string().optional(),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional(),databaseEngine:s.enum(Ui).optional(),engineExpression:s.string().optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional(),alarms:B$.optional()}).strict(),ll=s.object({appName:xe,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME).max(63,m.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,m.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional(),databaseInsights:cl.optional(),port:il.optional(),proxy:al.optional(),credentials:ol.optional(),encryption:ul.optional(),deletionProtection:s.boolean().optional()}).strict(),W$={databaseType:s.literal("Instance"),instanceType:s.string().optional(),multiAz:s.boolean().optional(),readReplica:sl.optional(),publiclyAccessible:s.boolean().optional(),backupRetention:sr.optional(),allocatedStorage:s.number().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},H$={databaseType:s.literal("Aurora"),writer:Na.optional(),readers:Pa.optional(),backupRetention:sr.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Ca.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},Y$={databaseType:s.literal("GlobalAurora"),primaryRegion:s.string().min(1,m.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),writer:Na.optional(),readers:Pa.optional(),backupRetention:sr.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Ca.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},K$=s.object({appName:xe,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME).max(63,m.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,m.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict(),q$={databaseType:s.literal("ClickHouse"),instanceType:s.string().optional(),coldTier:s.union([s.object({mode:s.literal("s3")}).strict(),s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:sr.optional()},i2=ll.extend(W$).strict(),o2=ll.extend(H$).strict(),a2=ll.extend(Y$).strict(),s2=K$.extend(q$).strict(),yq=s.discriminatedUnion("databaseType",[i2,o2,a2,s2]),db=ll.extend({resourceName:V}).strict(),c2=db.extend(W$).strict(),u2=db.extend(H$).strict(),l2=db.extend(Y$).strict(),d2=K$.extend({resourceName:V}).strict(),m2=d2.extend(q$).strict(),Sq=s.discriminatedUnion("databaseType",[c2,u2,l2,m2]),_q=s.object({appName:xe,databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME),maxConnections:s.number().int(m.MAX_CONNECTIONS.INTEGER).min(1,m.MAX_CONNECTIONS.MIN).max(100,m.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(m.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,m.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,m.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional(),nameProvidedByFlag:s.boolean().optional()}).strict(),p2=["S","N","B"],nl=s.object({name:s.string(),type:s.enum(p2)}).strict(),X$=s.object({name:V,partitionKey:nl,sortKey:nl.optional(),globalSecondaryIndexes:s.array(s.object({indexName:s.string(),partitionKey:nl,sortKey:nl.optional()}).strict()).optional(),ttlAttribute:s.string().optional(),stream:s.boolean().optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict(),f2=s.object({mode:s.literal("s3")}).strict(),J$=s.object({name:V,type:s.literal("ClickHouse"),databaseName:M$,instanceType:s.string().optional(),coldTier:s.union([f2,s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:sr.optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict();var g2=s.object({count:s.number().int(m.NAT_GATEWAY.INTEGER).min(0,m.NAT_GATEWAY.MIN).max(3,m.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),Q$=qe(g2),mb=s.enum(["cloudwatch","s3"]),h2=s.object({destination:mb.optional(),retentionDays:s.number().int(m.RETENTION_DAYS.INTEGER).min(1,m.RETENTION_DAYS.MIN).max(365,m.RETENTION_DAYS.MAX).optional(),trafficType:s.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),eR=qe(h2),v2=s.object({s3:s.boolean().optional(),dynamodb:s.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),b2=qe(v2),y2=s.object({ecr:s.boolean().optional(),secretsManager:s.boolean().optional(),kms:s.boolean().optional(),cloudwatchLogs:s.boolean().optional(),ssm:s.boolean().optional(),sts:s.boolean().optional()}).strict().describe("Interface VPC endpoints (cost per hour)"),S2=qe(y2),_2=s.object({gateway:b2.optional(),interface:S2.optional()}).strict().describe("VPC endpoints configuration"),tR=qe(_2),dl=s.object({maxAzs:s.number().int(m.MAX_AZS.INTEGER).min(1,m.MAX_AZS.MIN).max(3,m.MAX_AZS.MAX).optional(),natGateways:Q$.optional(),flowLogs:eR.optional(),vpcEndpoints:tR.optional(),cidrMask:s.number().int(m.CIDR_MASK.INTEGER).min(16,m.CIDR_MASK.MIN).max(28,m.CIDR_MASK.MAX).optional()}).strict(),rR=s.string().min(1,m.REQUIRED.NETWORK_NAME).max(50,m.MAX_LENGTH.NETWORK_NAME).regex(L.RESOURCE_NAME,m.RESOURCE_NAME),nR=dl.extend({name:rR}).strict(),iR=qe(dl),Tq=s.object({appName:xe,networkName:rR.optional(),maxAzs:s.number().int(m.MAX_AZS.INTEGER).min(1,m.MAX_AZS.MIN).max(3,m.MAX_AZS.MAX).optional(),natGateways:Q$.optional(),flowLogs:eR.optional(),vpcEndpoints:tR.optional()}).strict(),E2=L.CIDR,pb=s.string().regex(E2,m.CIDR),x2=s.object({kind:s.literal("database"),resource:s.string().min(1,m.REQUIRED.RESOURCE_REFERENCE),name:V,allowedFromCidrs:s.array(pb),access:s.enum(["read","write","readWrite"]).optional()}).strict(),A2=s.object({kind:s.literal("ecsService"),resource:s.string().min(1,m.REQUIRED.RESOURCE_REFERENCE),serviceName:s.string().min(1,m.REQUIRED.SERVICE_NAME),name:V,allowedFromCidrs:s.array(pb),port:En.optional()}).strict(),I2=s.discriminatedUnion("kind",[x2,A2]),$q=s.object({name:V,peerAppName:s.string().min(1,m.REQUIRED.APP_NAME),peerAccountId:s.string().regex(L.AWS_ACCOUNT_ID,m.AWS_ACCOUNT_ID),peerRegion:s.string().min(1,m.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:s.string().regex(L.VPC_ID,m.VPC_ID).optional(),peerVpcCidr:pb.optional(),peerRoleArn:s.string().regex(L.ROLE_ARN,m.ROLE_ARN).optional(),peerRouteTableIds:s.array(s.string().min(1,m.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:s.string().min(1,m.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:s.boolean().optional()}).strict(),Rq=s.object({name:V,requesterAccountIds:s.array(s.string().regex(L.AWS_ACCOUNT_ID,m.AWS_ACCOUNT_ID)).min(1,m.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:s.string().min(1,m.REQUIRED.NETWORK_NAME).optional(),publishToSsm:s.boolean().optional(),exposedResources:s.array(I2).optional()}).strict();var ml=["storage","cdn","compute"],T2=s.object({sid:s.string().optional(),effect:s.enum(["Allow","Deny"]),principals:s.array(s.string()),actions:s.array(s.string()),resources:s.array(s.string()).optional(),conditions:s.record(s.string(),s.record(s.string(),s.union([s.string(),s.array(s.string())]))).optional()}).strict(),oR=s.object({name:V,bucketName:s.string().optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum(Rt).optional(),versioned:s.boolean().optional(),encryption:s.enum(Bi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),deployment:s.object({source:s.string(),prune:s.boolean().optional(),cacheControl:s.object({maxAge:s.number().optional(),immutable:s.boolean().optional()}).strict().optional()}).strict().optional(),retain:s.boolean().optional(),resourcePolicyStatements:s.array(T2).optional(),stackPlacement:s.enum(ml).optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:m.KMS.KEY_REQUIRED}),Oq=s.object({appName:xe,bucketName:D$,nameProvidedByFlag:s.boolean().optional(),storagePreset:s.enum(k$).optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum(Rt).optional(),versioned:s.boolean().optional(),encryption:s.enum(Bi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:m.KMS.KEY_REQUIRED,path:["kmsKeyArn"]});var fb=s.enum(["DESTROY","RETAIN"]),aR=s.object({name:V,queueType:s.enum(["standard","fifo"]).default("standard"),visibilityTimeout:s.number().int(m.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,m.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,m.SQS.VISIBILITY_TIMEOUT.MAX).optional(),retentionPeriod:s.number().int(m.SQS.RETENTION_PERIOD.INTEGER).min(60,m.SQS.RETENTION_PERIOD.MIN).max(1209600,m.SQS.RETENTION_PERIOD.MAX).optional(),contentBasedDeduplication:s.boolean().optional(),removalPolicy:fb.optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict();var sR=s.object({type:s.literal("basic-auth"),username:s.string().min(1),password:s.string().min(1)}).strict(),cR=s.object({name:V,defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),sR]).optional(),extraProperties:s.array(ke).optional()}).strict(),Bq=s.object({appName:s.string(),name:V.optional(),defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),sR]).optional(),nameProvidedByFlag:s.boolean().optional()}).strict();var $2=Object.defineProperty,gb=(e,t)=>$2(e,"name",{value:t,configurable:!0}),R2=new Set(["t4g","c6g","c6gd","c6gn","c7g","c7gd","c7gn","r6g","r6gd","r7g","r7gd","r8g","r8gd","c8g","c8gd","c8gn","m6g","m6gd","m7g","m7gd","m8g","m8gd","x8g","i8g","a1","x2gd","im4gn","is4gen","i4g","hpc7g"]);function Zi(e){let t=e.split(".")[0]??"";return R2.has(t)?"ARM":"STANDARD"}gb(Zi,"getArchitectureForInstanceType");function pl(e,t){let n=Zi(e);return n!==t?{valid:!1,message:`Instance type '${e}' requires ${n} architecture, but '${t}' AMI was specified. Use a ${n==="ARM"?"Graviton instance (t4g, c6g, r6g, m6g, etc.)":"Intel/AMD instance (t3, c5, r5, m5, etc.)"} instead.`}:{valid:!0}}gb(pl,"validateArchitectureMatch");function uR(e,t){return Zi(e)===t}gb(uR,"isArchitectureCompatible");var C2=Object.defineProperty,fl=(e,t)=>C2(e,"name",{value:t,configurable:!0});var N2=1;var P2=/^[A-Za-z0-9_.-]+$/,w2=s.object({id:s.string().min(1,"buildSecret id cannot be empty").regex(P2,"buildSecret id may contain only letters, digits, '_', '.', and '-' (no comma, '=', or whitespace, which would break the buildx --secret argv)"),ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildSecret requires exactly one source (ssm, secretsManager, or env)"})}),k2=s.union([s.string(),s.object({ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional(),acknowledgePublic:s.boolean().optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildArg value requires exactly one source (ssm, secretsManager, or env)"})})]),Ft=s.object({path:s.string(),context:s.string().min(1,"context cannot be empty").optional(),target:s.string().min(1,"target cannot be empty").optional(),buildArgs:s.record(s.string(),k2).optional(),buildSecrets:s.array(w2).optional()}).strict(),Hq=Ft.partial();function O2(e,t){if(t===void 0)return e;let n=t.context??e.context,i=t.target??e.target,r=t.buildArgs??e.buildArgs,o=t.buildSecrets??e.buildSecrets;return{path:t.path??e.path,...n!==void 0&&{context:n},...i!==void 0&&{target:i},...r!==void 0&&{buildArgs:r},...o!==void 0&&{buildSecrets:o}}}fl(O2,"mergeDockerBuild");function hb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}fl(hb,"isRecord");function lR(e){if(!hb(e)||typeof e.path!="string"||e.path.length===0)return;let t=typeof e.context=="string"&&e.context.length>0?e.context:void 0,n=typeof e.target=="string"&&e.target.length>0?e.target:void 0,i=hb(e.buildArgs)&&Object.keys(e.buildArgs).length>0?e.buildArgs:void 0,r=Array.isArray(e.buildSecrets)&&e.buildSecrets.length>0?e.buildSecrets:void 0,o={path:e.path,...t!==void 0&&{context:t},...n!==void 0&&{target:n},...i!==void 0&&{buildArgs:i},...r!==void 0&&{buildSecrets:r}},a=Ft.safeParse(o);return a.success?a.data:void 0}fl(lR,"normaliseDockerBuild");function D2(e){if(e===void 0)return;let t=lR(e);return t===void 0?void 0:JSON.stringify(t)}fl(D2,"dockerBuildFingerprint");var M2=s.object({name:s.string(),clusterName:s.string().optional(),docker:Ft.optional(),containerPort:s.number().optional(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),schemaGateImageTag:s.string().optional()}).strict(),j2=s.object({type:s.enum(Lt),name:s.string(),source:s.string()}).strict(),z2=s.object({repositoryName:s.string()}).strict(),L2=["x86_64","arm64"],U2=s.object({name:s.string(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),docker:Ft.optional(),imageKey:s.string().optional(),architecture:s.enum(L2).optional()}).strict(),F2=s.object({templateHash:s.string(),synthTimestamp:s.string()}).strict(),B2=s.object({constructPath:s.string().max(512),group:s.string().max(128),resourceType:s.string().max(256)}).strict(),V2=s.object({synthesisedBy:s.string().min(1).max(128),minimumEngineVersion:s.string().min(1).max(32),maximumEngineMajor:s.number().int().min(0).optional(),minimumAwsCdkCli:s.string().min(1).max(32).optional()}).strict(),G2=s.object({appName:s.string().min(1).max(128),slot:s.string().min(1).max(64),clusterName:s.string().min(1).max(128),anchor:s.string().min(1).max(128),pinned:s.boolean(),currentServiceName:s.string().min(1).max(256),legacyKey:s.string().min(1).max(256),legacyAnchor:s.string().min(1).max(256),legacyServiceName:s.string().min(1).max(512),legacyKeyFields:s.array(s.string().max(64)).max(32)}).strict(),Z2=s.object({constructPath:s.string().min(1).max(512),resourceType:s.string().min(1).max(256),physicalNameHint:s.string().min(1).max(512),policy:s.enum(["retain","snapshot","adopted"]),destroyDisposition:s.enum(["survives","deleted-on-explicit-destroy"]),reason:s.string().min(1).max(1024),costClass:s.enum(["none","storage","fixed-monthly"]),cleanupHint:s.string().min(1).max(1024)}).strict(),Yq=s.object({version:s.literal(N2),generatedAt:s.string(),appName:s.string(),services:s.array(M2),lambdas:s.array(U2),pattern:j2.optional(),ecr:z2.optional(),stacks:s.record(s.string(),F2),resourceMap:s.record(s.string(),B2).optional(),engineCompat:V2.optional(),identityAliases:s.array(G2).optional(),residuals:s.array(Z2).optional()}).strict();var W2=Object.defineProperty,H2=(e,t)=>W2(e,"name",{value:t,configurable:!0});function mR(e){return!(e.image!==void 0&&e.docker!==void 0)}H2(mR,"imageDockerMutexCheck");var pR=s.number().int(m.CAPACITY.MIN.INTEGER).min(sb,m.GENERATOR_CAPACITY.MIN.MIN).max(cb,m.GENERATOR_CAPACITY.MIN.MAX),fR=s.number().int(m.CAPACITY.MAX.INTEGER).min(sb,m.GENERATOR_CAPACITY.MAX.MIN).max(cb,m.GENERATOR_CAPACITY.MAX.MAX),Wi=s.number().int(m.LAMBDA.MEMORY.INTEGER).min(R$,m.LAMBDA.MEMORY.MIN).max(C$,m.LAMBDA.MEMORY.MAX).refine(e=>e===128||e%64===0,m.LAMBDA.MEMORY.MULTIPLE),gR=s.string().regex(L.LAMBDA_RUNTIME_IDENTIFIER,m.LAMBDA.RUNTIME),vb=s.number().int(m.CPU.INTEGER).min(256,m.CPU.MIN).max(4096,m.CPU.MAX),hl=s.number().int(m.CAPACITY.DESIRED.INTEGER).min(0,m.CAPACITY.DESIRED.MIN).max(Fi,m.CAPACITY.DESIRED.MAX),wa=s.object({connectToDatabase:s.array(s.string()).optional()}).strict(),Y2=s.object({minSize:s.number().int(m.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,m.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(N$,m.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:s.boolean().optional()}).strict(),bb=s.object({instanceType:s.string().optional(),amiHardwareType:s.enum(Ju).optional(),minCapacity:s.number().int(m.CAPACITY.MIN.INTEGER).min(0,m.CAPACITY.MIN.MIN_0).max(Fi,m.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(m.CAPACITY.MAX.INTEGER).min(1,m.CAPACITY.MAX.MIN_1).max(Fi,m.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:$a(128).optional(),warmPool:Y2.optional(),extraProperties:s.array(ke).optional()}).strict().superRefine((e,t)=>{if(!e.instanceType||!e.amiHardwareType)return;let n=pl(e.instanceType,e.amiHardwareType);n.valid||t.addIssue({code:"custom",message:n.message??m.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((e,t)=>{e.minCapacity===0&&!e.warmPool&&t.addIssue({code:"custom",message:m.CAPACITY.WARM_POOL_REQUIRED,path:["minCapacity"]}),e.warmPool?.minSize!==void 0&&e.maxCapacity!==void 0&&e.warmPool.minSize>e.maxCapacity&&t.addIssue({code:"custom",message:m.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),K2=s.enum(Ea).describe(`Compute type must be one of: ${Ea.join(", ")}`),yb=s.enum(zi).describe(`ECS capacity provider must be one of: ${zi.join(", ")}`),Sb=s.string().refine(e=>ht(Qu,e),{message:m.INSTANCE_TYPE}),hR=s.object({sourceType:s.enum(["sqs","dynamodb","eventbridge"]),sourceRef:s.string().describe("Name of the source resource"),batchSize:s.number().int(m.BATCH_SIZE.INTEGER).min(1,m.BATCH_SIZE.MIN).max(1e4,m.BATCH_SIZE.MAX).optional(),startingPosition:s.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:s.number().int(m.BATCHING_WINDOW.INTEGER).min(0,m.BATCHING_WINDOW.MIN).max(300,m.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:s.boolean().optional()}).strict(),q2=s.object({name:s.string().min(1,m.REQUIRED.CONTAINER_NAME).optional(),image:s.string().optional(),port:En.optional(),environment:Vi.optional(),secretsImport:j$.optional(),command:s.array(s.string()).optional(),entryPoint:s.array(s.string()).optional(),essential:s.boolean().optional(),healthCheck:s.object({command:s.array(s.string()),interval:s.number().int(m.HEALTH_CHECK.INTERVAL.INTEGER).min(5,m.HEALTH_CHECK.INTERVAL.MIN).max(300,m.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:s.number().int(m.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,m.HEALTH_CHECK.TIMEOUT.MIN).max(60,m.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:s.number().int(m.HEALTH_CHECK.RETRIES.INTEGER).min(1,m.HEALTH_CHECK.RETRIES.MIN).max(10,m.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:s.number().int(m.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,m.HEALTH_CHECK.START_PERIOD.MIN).max(300,m.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:s.array(s.string().regex(L.SECRET_NAME,m.SECRET_NAME)).optional(),extraProperties:s.array(ke).optional()}).strict(),vR=s.string().min(1,m.REQUIRED.SERVICE_NAME).max(255,m.MAX_LENGTH.SERVICE_NAME).regex(L.ECS_SERVICE_NAME,m.ECS_SERVICE_NAME),bR=s.object({domain:s.string().optional(),loadBalancer:s.union([s.literal(!1),s.enum(qu)]).optional(),directAccess:s.boolean().optional(),extraProperties:s.array(ke).optional()}).strict().refine(e=>!(e.directAccess&&e.domain),{message:m.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(e=>!(e.directAccess&&typeof e.loadBalancer=="string"),{message:m.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),gl=s.object({path:s.string().optional(),host:s.string().optional(),priority:s.number().int(m.PRIORITY.INTEGER).min(1,m.PRIORITY.MIN).max(5e4,m.PRIORITY.MAX).optional(),healthCheckPath:s.string().optional()}).strict().describe("Path/host-based routing configuration"),X2=s.object({desiredCount:hl.optional(),minCapacity:s.number().int(m.CAPACITY.MIN.INTEGER).min(0,m.CAPACITY.MIN.MIN_0).max(Fi,m.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(m.CAPACITY.MAX.INTEGER).min(1,m.CAPACITY.MAX.MIN_1).max(Fi,m.CAPACITY.MAX.MAX).optional(),scalingType:s.enum(Xu).optional()}).strict().refine(_n.check,_n.params).describe("ECS service scaling configuration"),yR=s.object({name:vR,docker:Ft.optional(),needsDatabaseConnection:s.boolean().optional(),needsStorageConnection:s.boolean().optional(),needsMessagingConnection:s.boolean().optional(),image:s.string().optional(),containers:s.array(q2).optional(),routing:s.union([gl,s.array(gl).min(1)]).optional(),serviceType:s.enum(Ia).optional(),cpu:vb.optional(),memoryLimitMiB:$a(512).optional(),desiredCount:hl.optional(),scaling:qe(X2).optional(),capacityProvider:yb,ec2Config:bb.optional(),ssmSecretsPath:s.string().regex(L.SSM_PATH,m.SSM_PATH).optional(),extraProperties:s.array(ke).optional(),alarms:F$.optional()}).strict().superRefine((e,t)=>{mR(e)||t.addIssue({code:"custom",path:["docker"],message:m.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),SR=s.object({name:V,type:K2,needsConnection:s.boolean(),connectedDatabase:s.array(s.string()).optional(),connectedStorage:s.array(s.string()).optional(),connectedMessaging:s.array(s.string()).optional(),cluster:bR.optional(),services:s.array(yR).optional(),docker:Ft.partial().optional(),deployment:s.enum(Yu).optional(),codePath:s.string().optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(el,m.LAMBDA.TIMEOUT.MIN).max(tl,m.LAMBDA.TIMEOUT.MAX).optional(),memory:Wi.optional(),handler:s.string().optional(),runtime:gR.optional(),environment:Vi.optional(),secrets:Vi.optional(),eventSources:s.array(hR).optional(),functionUrl:s.object({authType:s.enum(Aa)}).strict().optional(),description:s.string().optional(),scheduleExpression:s.string().optional(),architecture:s.enum(Ku).optional(),ephemeralStorageSize:s.number().int(m.EPHEMERAL_STORAGE.INTEGER).min(512,m.EPHEMERAL_STORAGE.MIN).max(10240,m.EPHEMERAL_STORAGE.MAX).optional(),functionName:s.string().optional(),ssmSecrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),alarms:V$.optional(),instanceType:Sb.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict().superRefine((e,t)=>{if(e.type==="ecs"&&e.services)for(let n=0;n<e.services.length;n++){let i=e.services[n];i?.ec2Config?.instanceType&&!i.ec2Config.amiHardwareType&&Zi(i.ec2Config.instanceType)!=="ARM"&&t.addIssue({code:"custom",message:`Service '${i.name??n}' uses instance type '${i.ec2Config.instanceType}' (x86), which requires Docker images built for linux/amd64. The default build targets linux/arm64 (Graviton). Use a Graviton instance type (t4g, c6g, r6g, m6g, etc.) or set amiHardwareType: "STANDARD" to acknowledge x86.`,path:["services",n,"ec2Config","instanceType"]})}e.type==="lambda"&&e.deployment==="container"&&e.architecture==="X86_64"&&t.addIssue({code:"custom",message:"Lambda architecture 'X86_64' requires Docker images built for linux/amd64, but the default build targets linux/arm64. Use 'ARM_64' for Graviton Lambdas (recommended) or ensure your build pipeline targets linux/amd64.",path:["architecture"]})}),n7=s.object({appName:xe,clusterName:V,containerPort:En,nameProvidedByFlag:s.boolean().optional(),ecrRepository:s.string().optional(),capacityProvider:yb.optional(),useAppEcr:s.boolean().optional(),desiredCount:hl.optional(),cpu:vb.optional(),memoryLimitMiB:$a(512).optional(),minCapacity:pR.optional(),maxCapacity:fR.optional(),ec2Config:bb.optional(),connectionConfig:wa.optional()}).strict().refine(_n.check,_n.params),i7=s.object({appName:xe,functionName:V,nameProvidedByFlag:s.boolean().optional(),lambdaType:s.enum(["basic","web","custom"]).optional(),ecrRepository:s.string().optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(el,m.LAMBDA.TIMEOUT.MIN).max(tl,m.LAMBDA.TIMEOUT.MAX).optional(),memory:Wi.optional(),enableFunctionUrl:s.boolean().optional(),description:s.string().optional(),enableCors:s.boolean().optional(),corsOrigins:s.string().optional(),corsHeaders:s.string().optional(),corsMethods:s.array(s.enum(w$)).optional(),corsCredentials:s.boolean().optional(),connectionConfig:wa.optional()}).strict(),o7=s.object({appName:xe,instanceName:V,nameProvidedByFlag:s.boolean().optional(),instanceType:Sb.optional(),enableSSH:s.boolean().optional(),minCapacity:pR.optional(),maxCapacity:fR.optional(),connectionConfig:wa.optional()}).strict().refine(_n.check,_n.params),a7=s.object({appName:xe,clusterName:V,serviceName:vR,capacityProvider:yb,containerPort:En.optional(),cpu:vb.optional(),memoryLimitMiB:$a(512).optional(),desiredCount:hl.optional(),ec2Config:bb.optional(),routing:s.union([gl,s.array(gl).min(1)]).optional(),docker:Ft.partial().optional(),nameProvidedByFlag:s.boolean().optional(),connectionConfig:wa.optional()}).strict(),_b=s.object({appName:xe,computeName:V,nameProvidedByFlag:s.boolean().optional(),connectionConfig:wa.optional()}).strict(),J2=_b.extend({type:s.literal("ecs"),cluster:bR.optional(),services:s.array(yR).min(1,m.SERVICE.MIN_REQUIRED),docker:Ft.partial().optional()}).strict().refine(e=>{let t=e.services.filter(n=>n.containers?.some(i=>i.port));return t.length>1?t.every(n=>(Array.isArray(n.routing)?n.routing:n.routing?[n.routing]:[]).some(i=>i.path||i.host)):!0},{message:m.SERVICE.ROUTING_REQUIRED}).refine(e=>{let t=e.services.map(n=>n.name);return new Set(t).size===t.length},{message:m.SERVICE.UNIQUE_WITHIN_CLUSTER}),Q2=_b.extend({type:s.literal("lambda"),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(el,m.LAMBDA.TIMEOUT.MIN).max(tl,m.LAMBDA.TIMEOUT.MAX).optional(),memory:Wi.optional(),handler:s.string().optional(),runtime:gR.optional(),environment:Vi.optional(),secrets:Vi.optional(),description:s.string().optional(),functionUrl:s.union([s.object({authType:s.enum(Aa).optional()}).strict(),s.literal(!1)]).optional(),eventSources:s.array(hR).optional()}).strict(),e4=_b.extend({type:s.literal("ec2"),instanceType:Sb.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional()}).strict(),_R=s.discriminatedUnion("type",[J2,Q2,e4]),dR=s.object({path:s.string().min(1,m.REQUIRED.ROUTING_PATH),priority:s.number().int(m.PRIORITY.INTEGER).min(1,m.PRIORITY.MIN).max(5e4,m.PRIORITY.MAX).optional()}).strict(),ER=s.object({name:s.string().min(1,m.REQUIRED.SERVICE_NAME).max(255,m.MAX_LENGTH.SERVICE_NAME).regex(L.RESOURCE_NAME,m.RESOURCE_NAME),serviceType:s.enum(Ia).optional(),docker:Ft.partial().optional(),containerPort:En.optional(),needsDatabaseConnection:s.boolean().optional(),routing:s.union([dR,s.array(dR).min(1)]).optional()}).strict().superRefine((e,t)=>{e.serviceType==="worker"&&(e.containerPort!==void 0&&t.addIssue({code:"custom",path:["containerPort"],message:"Worker services are not reachable inbound; remove containerPort."}),e.routing!==void 0&&t.addIssue({code:"custom",path:["routing"],message:"Worker services have no ALB route; remove routing."}))}),s7=s.object({appName:xe,instanceType:s.string().optional()}).strict();var Eb=s.object({memorySize:Wi.optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(1,m.LAMBDA.TIMEOUT.MIN).max(900,m.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:s.number().int(m.EPHEMERAL_STORAGE.INTEGER).min(512,m.EPHEMERAL_STORAGE.MIN).max(10240,m.EPHEMERAL_STORAGE.MAX).optional()}).strict(),xR=s.object({type:s.enum(ab).optional(),databaseName:s.string().optional(),databaseEngine:s.enum(Ui).optional(),deletionProtection:s.boolean().optional(),backupRetention:sr.optional(),port:il.optional(),publiclyAccessible:s.boolean().optional(),allowedIpCidr:s.string().optional(),instanceType:s.string().optional(),allocatedStorage:s.number().int(m.ALLOCATED_STORAGE.INTEGER).min(20,m.ALLOCATED_STORAGE.MIN).max(65536,m.ALLOCATED_STORAGE.MAX).optional(),multiAz:s.boolean().optional(),readReplica:sl.optional(),writer:Na.optional(),readers:Pa.optional(),allowVpcAccess:s.boolean().optional(),monitoringInterval:Ca.optional(),preferredMaintenanceWindow:s.string().optional(),databaseInsights:cl.optional(),proxy:al.optional(),credentials:ol.optional(),encryption:ul.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict(),AR=s.object({server:Eb.optional(),imageOptimisation:Eb.optional(),revalidation:Eb.optional()}).strict(),xb=s.object({versioned:s.boolean().optional()}).strict(),IR=s.object({assets:xb.optional(),cache:xb.optional(),media:xb.optional()}).strict(),t4=s.object({visibilityTimeout:s.number().int(m.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,m.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,m.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:s.number().int(m.SQS.RETENTION_PERIOD.INTEGER).min(60,m.SQS.RETENTION_PERIOD.MIN).max(1209600,m.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:s.number().int(m.MAX_MESSAGE_SIZE.INTEGER).min(1024,m.MAX_MESSAGE_SIZE.MIN).max(262144,m.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:s.union([s.literal(!1),s.object({enabled:s.boolean().optional(),maxReceiveCount:s.number().int(m.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,m.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,m.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),TR=s.object({revalidationQueue:t4.optional()}).strict(),$R=s.object({domainNames:s.array(s.string()).optional(),certificateArn:s.string().optional()}).strict(),RR=s.record(s.string().regex(L.ENV_VAR_NAME,m.ENV_VAR_NAME),s.string()).optional(),r4=s.object({type:s.literal("payload"),name:s.string().min(1,m.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:xR.optional(),compute:AR.optional(),storage:IR.optional(),messaging:TR.optional(),cdn:$R.optional(),environment:RR}).strict(),n4=s.object({type:s.literal("nextjs"),name:s.string().min(1,m.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:xR.optional(),compute:AR.optional(),storage:IR.optional(),messaging:TR.optional(),cdn:$R.optional(),environment:RR}).strict(),Ab=s.enum(aa),i4=s.object({command:s.string().min(1,m.REQUIRED.BUILD_COMMAND),outputDir:s.string().min(1,m.REQUIRED.OUTPUT_DIR)}).strict(),o4=s.object({headers:s.boolean().optional(),contentSecurityPolicy:s.string().optional()}).strict(),a4=s.object({to:s.string().min(1,m.REQUIRED.FORMS_TO).regex(L.EMAIL,m.EMAIL),from:s.string().regex(L.EMAIL,m.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),maxConcurrency:s.number().int().min(1).max(100).optional()}).strict(),s4=s.object({behaviours:s.array(s.unknown()).optional()}).strict(),Ib=s.object({type:s.literal("staticsite"),name:s.string().min(1,m.REQUIRED.PATTERN_NAME),source:s.string().min(1,m.REQUIRED.SOURCE),build:i4,routing:Ab.optional(),security:o4.optional(),domain:s.string().optional(),forms:a4.optional(),cdn:s4.optional()}).strict().superRefine((e,t)=>{if(e.forms===void 0)return;let n=e.domain;if(n===void 0||n===""){t.addIssue({code:"custom",path:["domain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"});return}let i=e.forms.from;i!==void 0&&!_u(i,n)&&t.addIssue({code:"custom",path:["forms","from"],message:`forms.from must be an address at ${n} (the verified SES identity) \u2014 for example noreply@${n}. Use forms.to for the recipient.`})}),ka=s.discriminatedUnion("type",[r4,n4,Ib]),CR=s.enum(["lightweight","standard","resilient","custom"]),NR=s.object({type:s.enum(ab),instanceType:s.string().optional(),backupRetention:sr.optional(),deletionProtection:s.boolean().optional(),encryption:s.union([s.object({useCMK:s.literal(!0)}).strict(),s.literal(!1)]).optional()}).strict(),PR=s.object({memorySize:Wi.optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(1,m.LAMBDA.TIMEOUT.MIN).max(900,m.LAMBDA.TIMEOUT.MAX).optional()}).strict();var wR=s.object({appName:xe,type:ub,pattern:lb.optional(),patternConfig:ka.optional(),owner:s.string().optional(),tags:s.record(s.string(),s.string()).optional(),vpcId:s.string().optional(),network:dl.optional(),backup:L$.optional(),tunnel:U$.optional(),additionalNetworks:s.array(nR).optional(),database:s.array(Z$),s3:s.array(oR),compute:s.array(SR),dynamodb:s.array(X$).optional(),clickhouse:s.array(J$).optional(),sqs:s.array(aR).optional(),cdn:cR.optional(),customCodeBlocks:s.array(z$).optional(),additionalManagedImports:s.array(s.object({moduleSpecifier:s.string(),namedImports:s.array(s.string()),defaultImport:s.string().optional()}).strict()).optional()}).strict(),$7=s.object({name:xe,type:ub,pattern:lb.optional(),patternTier:CR.optional(),patternDomain:s.string().optional(),source:s.string().min(1,m.REQUIRED.SOURCE).optional(),buildCommand:s.string().min(1,m.REQUIRED.BUILD_COMMAND).optional(),outputDir:s.string().min(1,m.REQUIRED.OUTPUT_DIR).optional(),routing:Ab.optional(),formsTo:s.string().min(1,m.REQUIRED.FORMS_TO).regex(L.EMAIL,m.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),customDatabase:NR.optional(),customCompute:PR.optional(),region:s.string().optional(),owner:s.string().optional(),includeDatabase:s.boolean().optional(),databaseName:s.string().min(1,m.DATABASE.NAME.REQUIRED).max(63,m.DATABASE.NAME.MAX_LENGTH).optional(),vpcId:s.string().optional(),network:iR.optional(),services:s.array(ER).optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict().superRefine((e,t)=>{e.formsTo!==void 0&&(e.patternDomain!==void 0&&e.patternDomain!==""||t.addIssue({code:"custom",path:["patternDomain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"}))}),R7=s.object({name:V,localResource:s.string().min(1),remoteApp:s.string().min(1),remoteResource:s.string().min(1),permission:s.enum(["read","write","read-write"]),remoteArn:s.string().optional()}).strict();var c4=["fjall-managed","external","external-manual"],k7=s.enum(c4);var kR=s.object({givenName:s.string().min(1),familyName:s.string().min(1),displayName:s.string().min(1).optional(),expires:s.string().min(1).optional()}).strict(),OR=s.object({name:s.string().min(1),path:s.string().min(1).optional()}).strict(),u4=s.union([s.object({managedPolicyArn:s.string().min(1)}).strict(),s.object({customerManagedPolicy:OR}).strict()]),l4=s.object({managedPolicies:s.array(s.string().min(1)).optional(),inlinePolicy:s.record(s.string(),s.unknown()).optional(),customerManagedPolicies:s.array(OR).optional(),permissionsBoundary:u4.optional(),sessionDuration:s.string().min(1).optional(),description:s.string().optional(),accounts:s.union([s.array(s.string().min(1)),s.literal("all")]).optional(),includeManagementAccount:s.boolean().optional(),groups:s.array(s.string().min(1)).optional()}).strict(),d4=s.object({description:s.string().optional()}).strict(),vl=s.string().regex(L.EMAIL,m.EMAIL),Tb={groups:s.record(s.string(),d4).optional(),permissionSets:s.record(s.string(),l4).optional(),memberships:s.record(s.string(),s.array(vl)).optional(),resolutionVersion:s.number().int().min(1).optional(),defaultPermissionSets:s.boolean().optional()},m4=s.discriminatedUnion("source",[s.object({...Tb,source:s.literal("fjall-managed"),users:s.record(vl,kR)}).strict(),s.object({...Tb,source:s.literal("external")}).strict(),s.object({...Tb,source:s.literal("external-manual"),users:s.record(vl,kR).optional()}).strict()]),O7=s.object({name:V,type:s.literal("organisation").optional(),organisationName:s.string().min(1).optional(),orgEmail:vl.optional(),accounts:s.unknown().optional(),accountIds:s.record(s.string(),s.string()).optional(),identityCentre:s.union([m4,s.literal(!1)]).optional(),allowedRegions:s.array(s.string().min(1)).optional()}).strict();var p4=Object.defineProperty,f4=(e,t)=>p4(e,"name",{value:t,configurable:!0}),g4=[1,3,5,7,14,30,60,90,120,150,180,365,400,545,731,1827,3653],h4=s.object({buildkiteQueue:s.string().min(1,"buildkiteQueue cannot be empty").max(100).regex(/^[a-zA-Z0-9-_]+$/,"buildkiteQueue must be alphanumeric with hyphens/underscores"),buildkiteOrgSlug:s.string().min(1,"buildkiteOrgSlug cannot be empty").max(100).regex(/^[a-z0-9-]+$/,"buildkiteOrgSlug must be a lowercase Buildkite organisation slug"),agentTokenSsmParameterName:s.string().min(2).regex(/^\//,"agentTokenSsmParameterName must be a full path (leading /)").optional(),agentTokenKmsKeyArn:s.string().min(1).optional(),fjallApiKeySsmParameterName:s.string().min(2).regex(/^\//,"fjallApiKeySsmParameterName must be a full path (leading /)").optional(),instanceType:s.string().min(1).default("c8g.xlarge"),agentVolumeSizeGib:s.number().int().min(20).max(1e3).default(250),agentMinInstances:s.number().int().min(0).default(0),agentMaxInstances:s.number().int().min(1).default(2),agentsPerInstance:s.number().int().min(1).default(1),spotCapacityPercentage:s.number().int().min(0).max(100).default(0),scaleInIdlePeriodSeconds:s.number().int().min(60).default(600),disconnectAfterUptimeSeconds:s.number().int().min(3600).default(86400),maxInstanceLifetimeDays:s.number().int().min(1).max(365).default(7),terminateInstanceAfterJob:s.boolean().default(!1),purgeBuildsOnDiskFull:s.boolean().default(!0),terminateInstanceOnDiskFull:s.boolean().default(!1),logRetentionDays:s.number().int().min(1).default(30),agentLogRetentionDays:s.literal(g4).default(7),buildkiteAgentRelease:s.enum(["stable","beta","edge"]).default("stable"),buildkiteAgentTags:s.string().default(""),buildkiteAgentTimestampLines:s.boolean().default(!1),buildkiteAgentExperiments:s.string().default(""),buildkiteAgentTracingBackend:s.enum(["","datadog","opentelemetry"]).default(""),buildkiteAgentCancelGracePeriodSeconds:s.number().int().min(10).default(60),enableSecretsPlugin:s.boolean().default(!0),enableEcrPlugin:s.boolean().default(!1),enableDockerLoginPlugin:s.boolean().default(!1),enableDockerUserNamespaceRemap:s.boolean().default(!0),enableDockerExperimental:s.boolean().default(!1),dockerNetworkingProtocol:s.enum(["ipv4","dualstack"]).default("ipv4"),enableInstanceStorage:s.boolean().default(!1),mountTmpfsAtTmp:s.boolean().default(!0),buildkiteAgentEnableGitMirrors:s.boolean().default(!1),bootstrapScriptUrl:s.string().default(""),agentEnvFileUrl:s.string().default(""),scalerEventSchedulePeriod:s.string().min(1).default("1 minute"),scalerMinPollInterval:s.string().min(1).default("10s"),scaleOutFactor:s.string().min(1).default("1.0"),scaleOutWaitingForJobs:s.boolean().default(!1),rolePermissionsBoundaryArn:s.string().min(1).optional(),alarmSnsTopicArn:s.string().min(1).optional(),applicationId:s.string().min(1).optional(),costAllocationEnvironment:s.string().min(1).optional(),costAllocationOwner:s.string().min(1).optional()}).strict(),v4=h4.refine(e=>e.agentMinInstances<=e.agentMaxInstances,{message:"agentMinInstances must be <= agentMaxInstances"});function b4(e){let t=v4.safeParse(e);if(!t.success){let n=t.error.issues.map(i=>` - ${i.path.join(".")||"(root)"}: ${i.message}`).join(`
195
+ `);return{buffer:[],stream:r}}flush(){let t=this.flushBuffer(this.buffer,this.mainLogStream,this.mainLogPath);this.buffer=t.buffer,this.mainLogStream=t.stream;let n=this.flushBuffer(this.debugBuffer,this.debugLogStream,this.debugLogPath);this.debugBuffer=n.buffer,this.debugLogStream=n.stream}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.mainLogStream&&(this.mainLogStream.end(),this.mainLogStream=null),this.debugLogStream&&(this.debugLogStream.end(),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,this.isClosing=!1}async closeAndFlush(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null);let t=[];this.mainLogStream&&(t.push(this.mainLogStream),this.mainLogStream=null),this.debugLogStream&&(t.push(this.debugLogStream),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,await Promise.all(t.map(n=>new Promise(i=>{n.end(()=>i())}))),this.isClosing=!1}};import{createWriteStream as bU,existsSync as yU,mkdirSync as SU}from"fs";import{join as f$}from"path";var Sn={trace:0,debug:1,info:2,warn:3,error:4},qe={MAX_FILE_SIZE:10*1024*1024,MAX_FILES:5,MAX_BUFFER_SIZE:100,FLUSH_INTERVAL_MS:500,LOG_FILENAME:"fjall.jsonl",DEBUG_LOG_FILENAME:"fjall-debug.jsonl"};import{join as fU}from"path";import{homedir as gU}from"os";var mU=Object.defineProperty,pU=(e,t)=>mU(e,"name",{value:t,configurable:!0});function zr(){let e=process.env.FJALL_LOG_DIR;return e!==void 0&&e!==""?e:fU(gU(),".fjall","logs")}pU(zr,"getDefaultLogDir");var hU=Object.defineProperty,vU=(e,t)=>hU(e,"name",{value:t,configurable:!0}),ya=class{static{vU(this,"DeploymentLoggerImpl")}mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=qe.MAX_BUFFER_SIZE;constructor(t,n,i){this.mainLogger=t,this.appName=n,this.operationType=i,this.deploymentId=`${i}-${Date.now()}`;let r=zr(),o=f$(r,"deployments",n);yU(o)||SU(o,{recursive:!0});let a=new Date().toISOString().replace(/[:.]/g,"-"),c=`${i}-${a}.jsonl`;this.logPath=f$(o,c);try{this.logStream=bU(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),qe.FLUSH_INTERVAL_MS),this.info("DeploymentLogger","Deployment logging initialised",{appName:n,operationType:i,deploymentId:this.deploymentId,logPath:this.logPath})}catch{}}log(t,n,i,r,o,a){if(this.isClosing)return;let c={timestamp:new Date().toISOString(),level:t,component:n,message:i,correlationId:this.deploymentId,...r&&Object.keys(r).length>0&&{data:r},...o&&{stackName:o},...a&&{phase:a}};this.buffer.push(c),this.mainLogger.logWithCorrelation(t,n,i,this.deploymentId,r,o,a),this.buffer.length>=this.maxBufferSize&&this.flush()}flush(){if(!(this.buffer.length===0||!this.logStream)){for(let t of this.buffer)this.logStream.write(JSON.stringify(t)+`
196
+ `);this.buffer=[]}}info(t,n,i){this.log("info",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}error(t,n,i){this.log("error",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}stackEvent(t,n,i,r){this.log("info","StackDeployment",i,r,t,n)}dockerEvent(t,n){this.log("info","DockerOperation",t,{percentage:n})}ecsEvent(t,n,i){this.log("info","ECSDeployment",t,{percentage:n,taskCount:i})}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.logStream&&(this.logStream.end(),this.logStream=null),this.buffer=[],this.isClosing=!1}getLogPath(){return this.logPath}getDeploymentId(){return this.deploymentId}};var _U=Object.defineProperty,EU=(e,t)=>_U(e,"name",{value:t,configurable:!0}),Bu=class e{static{EU(this,"Logger")}static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let t=zr(),n=Wv(t,"debug"),i=this.parseEnvInt("FJALL_LOG_MAX_SIZE",qe.MAX_FILE_SIZE),r=this.parseEnvInt("FJALL_LOG_MAX_FILES",qe.MAX_FILES);this.config={logDir:t,debugLogDir:n,maxFileSize:i,maxFiles:r,maxBufferSize:qe.MAX_BUFFER_SIZE,flushIntervalMs:qe.FLUSH_INTERVAL_MS},this.mainLogPath=Wv(t,qe.LOG_FILENAME),this.debugLogPath=Wv(n,qe.DEBUG_LOG_FILENAME),this.debugEnabled=process.env.FJALL_DEBUG==="true"||process.env.FJALL_TRACE==="true"||process.argv.includes("--verbose")||process.argv.includes("-v"),this.traceEnabled=process.env.FJALL_TRACE==="true";let o=process.env.FJALL_LOG_LEVEL?.toLowerCase();o&&o in Sn?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new Fu(this.config,this.mainLogPath,this.debugLogPath,this.debugEnabled)}parseEnvInt(t,n){let i=process.env[t];if(i){let r=parseInt(i,10);if(!isNaN(r)&&r>0)return r}return n}static getInstance(){return e.instance||(e.instance=new e),e.instance}shouldLog(t){return Sn[t]>=Sn[this.minLevel]}createEntry(t,n,i,r,o,a,c){return{timestamp:new Date().toISOString(),level:t,component:n,message:i,...o&&{correlationId:o},...r&&Object.keys(r).length>0&&{data:r},...a&&{stackName:a},...c&&{phase:c}}}log(t,n,i,r,o,a,c){if(!this.shouldLog(t))return;let u=this.createEntry(t,n,i,r,o,a,c),l=t==="debug"||t==="trace";this.fileWriter.write(u,l),this.writeConsole(u)}writeConsole(t){if(Ee.shouldSuppressOutput||Ee.isNonInteractive){this.debugEnabled&&this.writeDebugMirror(t);return}let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r=`${n} ${i} ${t.message}`;t.level==="error"?console.error(r):t.level==="warn"?console.warn(r):console.log(r)}writeDebugMirror(t){let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r="";if(t.data&&Object.keys(t.data).length>0)try{r=` ${JSON.stringify(t.data)}`}catch{r=" [unserialisable data]"}let o=`${n} ${i} ${t.message}${r}`;process.stderr.write(`${Or(o)}
197
+ `)}getConsolePrefix(t){switch(t){case"error":return"[ERROR]";case"warn":return"[WARN]";case"info":return"[INFO]";case"debug":return"[DEBUG]";case"trace":return"[TRACE]"}}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}isDebugEnabled(){return this.debugEnabled}isTraceEnabled(){return this.traceEnabled}enableDebug(){this.debugEnabled=!0,Sn[this.minLevel]>Sn.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(t){return new Di(this,t)}forDeployment(t,n="deploy"){return new ya(this,t,n)}close(){this.fileWriter.close()}async flushAndClose(){await this.fileWriter.closeAndFlush()}getLogPath(){return this.mainLogPath}getDebugLogPath(){return this.debugLogPath}getLogDir(){return this.config.logDir}logWithCorrelation(t,n,i,r,o,a,c){this.log(t,n,i,o,r,a,c)}static reset(){e.instance&&(e.instance.close(),e.instance=null)}};var xU=Object.defineProperty,AU=(e,t)=>xU(e,"name",{value:t,configurable:!0}),Uu=Bu.getInstance();function RU(e){let t=zr(),n=h$(t,"debug"),i=h$(n,qe.DEBUG_LOG_FILENAME);try{g$(n)||IU(n,{recursive:!0}),g$(i)&&TU(i).size>qe.MAX_FILE_SIZE&&new Mi({maxFiles:qe.MAX_FILES}).rotate(i);let r={timestamp:new Date().toISOString(),level:"debug",component:"Emergency",message:e};$U(i,JSON.stringify(r)+`
198
+ `)}catch{}}AU(RU,"writeDebugSync");var CU=Object.defineProperty,ji=(e,t)=>CU(e,"name",{value:t,configurable:!0});function Hv(e){return e.success===!0}ji(Hv,"isSuccess");function Yv(e){return e.success===!1}ji(Yv,"isFailure");function P(e){return{success:!0,data:e}}ji(P,"success");function T(e){return{success:!1,error:e}}ji(T,"failure");async function Kv(e){try{let t=await e();return P(t)}catch(t){return T(Tt(t))}}ji(Kv,"tryAsync");function qv(e){try{let t=e();return P(t)}catch(t){return T(Tt(t))}}ji(qv,"trySync");var NU=Object.defineProperty,PU=(e,t)=>NU(e,"name",{value:t,configurable:!0}),v$=/^[a-zA-Z][a-zA-Z0-9-]*$/,wU=na.source.replace(/^\^|\$$/g,""),L=Object.freeze({IDENTIFIER:v$,NEW_APP_NAME:/^[a-z][a-z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:v$,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:new RegExp(`^(?:/${wU})+$`),SECRET_NAME:vu,SSM_COMPONENT:na,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,HTTP_ORIGIN:/^https?:\/\/[a-z0-9.-]+(:\d+)?$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/});function Xv(e){let t=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(e);if(!t)return;let n=t[1],i=t[2];if(n===void 0||i===void 0)return;let r=parseInt(n,10);if(!Number.isFinite(r)||r<1)return;let o=i==="minute"||i==="hour"||i==="day";if(!(o&&r!==1)&&!(!o&&r===1))return i==="minute"||i==="minutes"?{everyMs:r*6e4}:i==="hour"||i==="hours"?{everyMs:r*60*6e4}:{everyMs:r*24*60*6e4}}PU(Xv,"parseRateExpression");var m=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",NEW_APP_NAME:"Must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:Wh,SSM_COMPONENT:bu,EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",SOURCE:"Source directory is required",BUILD_COMMAND:"Build command is required",OUTPUT_DIR:"Output directory is required",FORMS_TO:"Forms recipient address is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"});var kU=Object.defineProperty,gt=(e,t)=>kU(e,"name",{value:t,configurable:!0}),OU=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],DU=Object.freeze(OU.flatMap(e=>{let t=Ai(e);return t?[t]:[]})),Jv=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function Vu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}gt(Vu,"parseRegionList");function Qv(e){return ar.includes(e)}gt(Qv,"isValidRegion");function eb(e){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(e)}gt(eb,"isValidRegionFormat");function tb(e){if(!e)return Jv.slice(0,3);let t=e.toLowerCase().split("-"),n=t[0],i=t.length>1?t[1]:"",r=[];return n&&i&&(r=ar.filter(o=>o.startsWith(`${n}-${i}`))),r.length===0&&n&&(r=ar.filter(o=>o.startsWith(`${n}-`))),r.length>0?r.slice(0,3):Jv.slice(0,3)}gt(tb,"getSuggestions");function rb(e){if(Qv(e))return!0;let t=tb(e);return eb(e)?`Unknown region. Try: ${t.join(", ")}`:`Invalid format. Try: ${t.join(", ")}`}gt(rb,"validateRegion");function b$(e){if(!e||e.trim()==="")return!0;let t=Vu(e);for(let n of t){let i=rb(n);if(i!==!0)return i}return!0}gt(b$,"validateRegionList");function nb(e,t){return e.filter(n=>n!==t)}gt(nb,"filterDuplicateRegions");function ib(e){return{label:e.city,value:e.code,description:e.optIn?`${e.code} \u2014 opt-in required`:e.code}}gt(ib,"toRegionOption");function y$(){return mt.map(ib)}gt(y$,"getRegionOptions");function S$(e){return mt.filter(t=>t.code!==e).map(ib)}gt(S$,"getRegionOptionsExcluding");function _$(e){let t=mt.find(n=>n.code===e);return t?t.city:e}gt(_$,"getRegionName");function E$(e){return t=>{let n=Vu(t);return nb(n,e)}}gt(E$,"createRegionFormatter");var Gu="12.1.0";var Zu=["Aurora","Instance","GlobalAurora","ClickHouse"],zi=["FARGATE","FARGATE_SPOT","EC2"],Rt=["standard","resilient","enterprise"],Wu=["tinkerer","lightweight","standard","resilient","enterprise"],ob="custom",Sa=[...Wu,ob];var MU=Object.defineProperty,jU=(e,t)=>MU(e,"name",{value:t,configurable:!0}),x$=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})}),_a=["ecs","lambda","ec2"],Li=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),Hu=["code","container"],Ea=Object.freeze({CODE:"code",CONTAINER:"container"}),Yu=["ARM_64","X86_64"],A$="ARM_64",xa=["NONE","AWS_IAM"],Ku=["public","internal"],qu=["CPU","MEMORY"],Xu=["ARM","STANDARD"],ab=["Instance","Aurora"],Ui=["postgresql","mysql"],Aa=["web","worker"],I$=["foundation","compliance","hardened"];var Ju=["t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge","t3a.nano","t3a.micro","t3a.small","t3a.medium","t3a.large","t3a.xlarge","t3a.2xlarge","t4g.nano","t4g.micro","t4g.small","t4g.medium","t4g.large","t4g.xlarge","t4g.2xlarge","c5.large","c5.xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5a.large","c5a.xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c6g.medium","c6g.large","c6g.xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.12xlarge","c6g.16xlarge","r5.large","r5.xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5a.large","r5a.xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r6g.medium","r6g.large","r6g.xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.12xlarge","r6g.16xlarge","i3.large","i3.xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.16xlarge","p3.2xlarge","p3.8xlarge","p3.16xlarge","g4dn.xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.12xlarge","g4dn.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge"],T$=[0,1,5,10,15,30,60];function ht(e,t){return e.includes(t)}jU(ht,"constIncludes");var $$=1,R$=65535,tq=Object.freeze({postgresql:5432,mysql:3306}),C$=128,N$=10240,Qu=1,el=900,sb=1,cb=1e3,Fi=100,P$=100;var w$=3e3;var k$=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],O$=["standard","assets","upload","website"],Bi=["AES256","KMS"];var zU=Object.defineProperty,Ia=(e,t)=>zU(e,"name",{value:t,configurable:!0}),Xe=Ia(e=>s.union([s.literal(!1),e]),"optionalOrDisabled"),_n={check:Ia(e=>e.minCapacity!==void 0&&e.maxCapacity!==void 0?e.minCapacity<=e.maxCapacity:!0,"check"),params:{message:m.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},Ta=Ia(e=>s.number().int(m.MEMORY_LIMIT.INTEGER).min(e,e===128?m.MEMORY_LIMIT.MIN_128:m.MEMORY_LIMIT.MIN_512).max(30720,m.MEMORY_LIMIT.MAX),"memoryLimitMiBSchema"),V=s.string().min(1,m.REQUIRED.RESOURCE_NAME).max(63,m.MAX_LENGTH.RESOURCE_NAME).regex(L.RESOURCE_NAME,m.RESOURCE_NAME),M$=s.string().min(1,m.REQUIRED.BUCKET_NAME).max(63,m.MAX_LENGTH.BUCKET_NAME).regex(L.BUCKET_NAME,m.BUCKET_NAME),j$=s.string().min(1,m.REQUIRED.DATABASE_NAME).max(63,m.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,m.DATABASE_NAME);function tl(e,t=L.IDENTIFIER,n=m.IDENTIFIER){return s.string().min(2,m.IDENTIFIER_MIN_LENGTH).max(50,e).regex(t,n).refine(i=>!i.endsWith("-"),{message:m.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(i=>!i.includes("--"),{message:m.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}Ia(tl,"identifierSchema");var xe=tl(m.MAX_LENGTH.APP_NAME),cq=tl(m.MAX_LENGTH.APP_NAME,L.NEW_APP_NAME,m.NEW_APP_NAME),En=s.number().int(m.PORT.INTEGER).min($$,m.PORT.MIN).max(R$,m.PORT.MAX),ke=s.object({key:s.string(),sourceText:s.string()}).strict(),LU=s.object({__identifier:s.string()}).strict(),UU=s.object({__expression:s.string()}).strict(),FU=s.object({__call:s.string()}).strict(),BU=s.union([LU,UU,FU]),VU=s.union([s.string(),s.number(),s.boolean(),BU]),Vi=s.record(s.string().regex(L.ENV_VAR_NAME,m.ENV_VAR_NAME),VU),GU=s.object({id:s.string(),name:s.string().optional(),arn:s.string().optional(),field:s.string().optional()}).strict().refine(e=>e.name!==void 0!=(e.arn!==void 0),{message:"secretsImport requires exactly one of `name` or `arn`."}),z$=s.record(s.string(),GU),uq=s.record(s.string(),s.unknown()),ub=s.enum(Sa).describe(`Application type must be one of: ${Sa.join(", ")}`),lb=s.enum(Lt).describe(`OpenNext deployment pattern: ${Lt.join(", ")}`),ZU=s.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),WU=s.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),L$=s.object({sourceText:s.string(),position:ZU,afterManagedResource:s.object({type:WU,name:s.string().optional()}).strict().optional(),originalLine:s.number().int().optional(),leadingComments:s.array(s.string()).optional(),orphaned:s.boolean().optional(),orphanedComment:s.string().optional()}).strict(),U$=s.union([s.object({tier:s.enum(Rt)}).strict(),s.literal(!1)]),F$=s.union([s.object({instanceType:s.string().optional()}).strict(),s.literal(!1)]),HU=tl(m.MAX_LENGTH.ORGANISATION_NAME),YU=s.string().regex(L.EMAIL,m.EMAIL),D$=s.string().refine(e=>ar.includes(e),{message:m.REGION}),lq=s.object({name:HU,email:YU,accountName:s.string().optional(),primaryRegion:D$.optional().default(xi),secondaryRegions:s.array(D$).optional(),security:s.enum(I$).optional(),force:s.boolean().optional()}).strict();function $a(e){return e.issues.map(t=>`${t.path.length>0?`${t.path.join(".")}: `:""}${t.message}`).join(`
199
+ `)}Ia($a,"getZodErrorMessage");var rl=s.number().min(1,m.ALARM.PERCENTAGE.MIN).max(100,m.ALARM.PERCENTAGE.MAX),db=s.union([rl,s.literal(!1)]),KU=s.number().min(1,m.ALARM.FREE_STORAGE_GIB.MIN),B$=s.union([s.literal(!1),s.object({cpuThreshold:db.optional(),memoryThreshold:db.optional(),runningTasksMinimum:s.number().int().min(0).optional(),http5xxThreshold:db.optional()}).strict()]),V$=s.union([s.literal(!1),s.object({cpuThreshold:rl.optional(),freeStorageThresholdGiB:KU.optional(),connectionsThreshold:s.number().int().min(1).optional()}).strict()]),G$=s.union([s.literal(!1),s.object({errorRateThreshold:rl.optional(),durationThresholdPercent:rl.optional()}).strict()]);var sr=s.number().int(m.BACKUP_RETENTION.INTEGER).min(1,m.BACKUP_RETENTION.MIN).max(35,m.BACKUP_RETENTION.MAX),Ra=s.number().int(m.MONITORING_INTERVAL.INTEGER).refine(e=>ht(T$,e),{message:m.MONITORING_INTERVAL.VALUES}),il=s.number().int(m.DATABASE.PORT.INTEGER).min(1024,m.DATABASE.PORT.MIN).max(65535,m.DATABASE.PORT.MAX),qU=s.enum(Zu).describe(`Database type must be one of: ${Zu.join(", ")}`),XU=s.object({maxConnections:s.number().int(m.MAX_CONNECTIONS.INTEGER).min(1,m.MAX_CONNECTIONS.MIN).max(100,m.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(m.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,m.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,m.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional()}).strict().describe("RDS Proxy configuration"),JU=s.object({instanceType:s.string().optional(),availabilityZone:s.string().optional()}).strict().describe("Read replica configuration"),QU=s.object({automaticallyAfterDays:s.number().int(m.ROTATION.INTEGER).min(1,m.ROTATION.MIN).max(365,m.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),ol=s.object({username:s.string().min(1,m.REQUIRED.USERNAME).max(63,m.USERNAME.MAX_LENGTH).optional(),secretRotation:QU.optional()}).strict().describe("Database credentials configuration"),al=Xe(XU),sl=Xe(JU),e2=s.object({scaleWithWriter:s.boolean().optional(),enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,m.IDENTIFIER_SUFFIX.REQUIRED).max(50,m.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),Ca=s.object({enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,m.IDENTIFIER_SUFFIX.REQUIRED).max(50,m.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for Aurora writer instance"),t2=s.object({count:s.number().int(m.READER.COUNT.INTEGER).min(0,m.READER.COUNT.MIN).max(15,m.READER.COUNT.MAX).optional(),instances:s.array(e2).max(15,m.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:s.boolean().optional()}).strict().refine(e=>!(e.count!==void 0&&e.instances!==void 0),{message:m.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),Na=Xe(t2),r2=s.object({awsManaged:s.literal(!0)}).strict(),n2=s.object({useCMK:s.literal(!0)}).strict(),Z$=s.union([r2,n2]),i2=s.object({mode:s.enum(["standard","advanced"]).optional(),encryptionKey:Z$.optional()}).strict().describe("Database Insights configuration"),cl=Xe(i2),ul=s.object({storageKey:Z$.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),W$=s.object({name:V,type:qU,databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME),instanceType:s.string().optional(),allocatedStorage:s.number().optional(),multiAz:s.boolean().optional(),publiclyAccessible:s.boolean().optional(),databaseInsights:cl.optional(),port:il.optional(),deletionProtection:s.boolean().optional(),proxy:al.optional(),credentials:ol.optional(),readReplica:sl.optional(),encryption:ul.optional(),writer:Ca.optional(),readers:Na.optional(),backupRetention:sr.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Ra.optional(),primaryRegion:s.string().optional(),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional(),databaseEngine:s.enum(Ui).optional(),engineExpression:s.string().optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional(),alarms:V$.optional()}).strict(),ll=s.object({appName:xe,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME).max(63,m.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,m.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional(),databaseInsights:cl.optional(),port:il.optional(),proxy:al.optional(),credentials:ol.optional(),encryption:ul.optional(),deletionProtection:s.boolean().optional()}).strict(),H$={databaseType:s.literal("Instance"),instanceType:s.string().optional(),multiAz:s.boolean().optional(),readReplica:sl.optional(),publiclyAccessible:s.boolean().optional(),backupRetention:sr.optional(),allocatedStorage:s.number().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},Y$={databaseType:s.literal("Aurora"),writer:Ca.optional(),readers:Na.optional(),backupRetention:sr.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Ra.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},K$={databaseType:s.literal("GlobalAurora"),primaryRegion:s.string().min(1,m.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),writer:Ca.optional(),readers:Na.optional(),backupRetention:sr.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Ra.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},q$=s.object({appName:xe,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME).max(63,m.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,m.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict(),X$={databaseType:s.literal("ClickHouse"),instanceType:s.string().optional(),coldTier:s.union([s.object({mode:s.literal("s3")}).strict(),s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:sr.optional()},o2=ll.extend(H$).strict(),a2=ll.extend(Y$).strict(),s2=ll.extend(K$).strict(),c2=q$.extend(X$).strict(),Sq=s.discriminatedUnion("databaseType",[o2,a2,s2,c2]),mb=ll.extend({resourceName:V}).strict(),u2=mb.extend(H$).strict(),l2=mb.extend(Y$).strict(),d2=mb.extend(K$).strict(),m2=q$.extend({resourceName:V}).strict(),p2=m2.extend(X$).strict(),_q=s.discriminatedUnion("databaseType",[u2,l2,d2,p2]),Eq=s.object({appName:xe,databaseName:s.string().min(1,m.REQUIRED.DATABASE_NAME),maxConnections:s.number().int(m.MAX_CONNECTIONS.INTEGER).min(1,m.MAX_CONNECTIONS.MIN).max(100,m.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,m.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(m.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,m.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,m.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional(),nameProvidedByFlag:s.boolean().optional()}).strict(),f2=["S","N","B"],nl=s.object({name:s.string(),type:s.enum(f2)}).strict(),J$=s.object({name:V,partitionKey:nl,sortKey:nl.optional(),globalSecondaryIndexes:s.array(s.object({indexName:s.string(),partitionKey:nl,sortKey:nl.optional()}).strict()).optional(),ttlAttribute:s.string().optional(),stream:s.boolean().optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict(),g2=s.object({mode:s.literal("s3")}).strict(),Q$=s.object({name:V,type:s.literal("ClickHouse"),databaseName:j$,instanceType:s.string().optional(),coldTier:s.union([g2,s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:sr.optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict();var h2=s.object({count:s.number().int(m.NAT_GATEWAY.INTEGER).min(0,m.NAT_GATEWAY.MIN).max(3,m.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),eR=Xe(h2),pb=s.enum(["cloudwatch","s3"]),v2=s.object({destination:pb.optional(),retentionDays:s.number().int(m.RETENTION_DAYS.INTEGER).min(1,m.RETENTION_DAYS.MIN).max(365,m.RETENTION_DAYS.MAX).optional(),trafficType:s.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),tR=Xe(v2),b2=s.object({s3:s.boolean().optional(),dynamodb:s.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),y2=Xe(b2),S2=s.object({ecr:s.boolean().optional(),secretsManager:s.boolean().optional(),kms:s.boolean().optional(),cloudwatchLogs:s.boolean().optional(),ssm:s.boolean().optional(),sts:s.boolean().optional()}).strict().describe("Interface VPC endpoints (cost per hour)"),_2=Xe(S2),E2=s.object({gateway:y2.optional(),interface:_2.optional()}).strict().describe("VPC endpoints configuration"),rR=Xe(E2),dl=s.object({maxAzs:s.number().int(m.MAX_AZS.INTEGER).min(1,m.MAX_AZS.MIN).max(3,m.MAX_AZS.MAX).optional(),natGateways:eR.optional(),flowLogs:tR.optional(),vpcEndpoints:rR.optional(),cidrMask:s.number().int(m.CIDR_MASK.INTEGER).min(16,m.CIDR_MASK.MIN).max(28,m.CIDR_MASK.MAX).optional()}).strict(),nR=s.string().min(1,m.REQUIRED.NETWORK_NAME).max(50,m.MAX_LENGTH.NETWORK_NAME).regex(L.RESOURCE_NAME,m.RESOURCE_NAME),iR=dl.extend({name:nR}).strict(),oR=Xe(dl),$q=s.object({appName:xe,networkName:nR.optional(),maxAzs:s.number().int(m.MAX_AZS.INTEGER).min(1,m.MAX_AZS.MIN).max(3,m.MAX_AZS.MAX).optional(),natGateways:eR.optional(),flowLogs:tR.optional(),vpcEndpoints:rR.optional()}).strict(),x2=L.CIDR,fb=s.string().regex(x2,m.CIDR),A2=s.object({kind:s.literal("database"),resource:s.string().min(1,m.REQUIRED.RESOURCE_REFERENCE),name:V,allowedFromCidrs:s.array(fb),access:s.enum(["read","write","readWrite"]).optional()}).strict(),I2=s.object({kind:s.literal("ecsService"),resource:s.string().min(1,m.REQUIRED.RESOURCE_REFERENCE),serviceName:s.string().min(1,m.REQUIRED.SERVICE_NAME),name:V,allowedFromCidrs:s.array(fb),port:En.optional()}).strict(),T2=s.discriminatedUnion("kind",[A2,I2]),Rq=s.object({name:V,peerAppName:s.string().min(1,m.REQUIRED.APP_NAME),peerAccountId:s.string().regex(L.AWS_ACCOUNT_ID,m.AWS_ACCOUNT_ID),peerRegion:s.string().min(1,m.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:s.string().regex(L.VPC_ID,m.VPC_ID).optional(),peerVpcCidr:fb.optional(),peerRoleArn:s.string().regex(L.ROLE_ARN,m.ROLE_ARN).optional(),peerRouteTableIds:s.array(s.string().min(1,m.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:s.string().min(1,m.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:s.boolean().optional()}).strict(),Cq=s.object({name:V,requesterAccountIds:s.array(s.string().regex(L.AWS_ACCOUNT_ID,m.AWS_ACCOUNT_ID)).min(1,m.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:s.string().min(1,m.REQUIRED.NETWORK_NAME).optional(),publishToSsm:s.boolean().optional(),exposedResources:s.array(T2).optional()}).strict();var ml=["storage","cdn","compute"],$2=s.object({sid:s.string().optional(),effect:s.enum(["Allow","Deny"]),principals:s.array(s.string()),actions:s.array(s.string()),resources:s.array(s.string()).optional(),conditions:s.record(s.string(),s.record(s.string(),s.union([s.string(),s.array(s.string())]))).optional()}).strict(),aR=s.object({name:V,bucketName:s.string().optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum(Rt).optional(),versioned:s.boolean().optional(),encryption:s.enum(Bi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),deployment:s.object({source:s.string(),prune:s.boolean().optional(),cacheControl:s.object({maxAge:s.number().optional(),immutable:s.boolean().optional()}).strict().optional()}).strict().optional(),retain:s.boolean().optional(),resourcePolicyStatements:s.array($2).optional(),stackPlacement:s.enum(ml).optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:m.KMS.KEY_REQUIRED}),Dq=s.object({appName:xe,bucketName:M$,nameProvidedByFlag:s.boolean().optional(),storagePreset:s.enum(O$).optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum(Rt).optional(),versioned:s.boolean().optional(),encryption:s.enum(Bi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:m.KMS.KEY_REQUIRED,path:["kmsKeyArn"]});var gb=s.enum(["DESTROY","RETAIN"]),sR=s.object({name:V,queueType:s.enum(["standard","fifo"]).default("standard"),visibilityTimeout:s.number().int(m.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,m.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,m.SQS.VISIBILITY_TIMEOUT.MAX).optional(),retentionPeriod:s.number().int(m.SQS.RETENTION_PERIOD.INTEGER).min(60,m.SQS.RETENTION_PERIOD.MIN).max(1209600,m.SQS.RETENTION_PERIOD.MAX).optional(),contentBasedDeduplication:s.boolean().optional(),removalPolicy:gb.optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict();var cR=s.object({type:s.literal("basic-auth"),username:s.string().min(1),password:s.string().min(1)}).strict(),uR=s.object({name:V,defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),cR]).optional(),extraProperties:s.array(ke).optional()}).strict(),Vq=s.object({appName:s.string(),name:V.optional(),defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),cR]).optional(),nameProvidedByFlag:s.boolean().optional()}).strict();var R2=Object.defineProperty,hb=(e,t)=>R2(e,"name",{value:t,configurable:!0}),C2=new Set(["t4g","c6g","c6gd","c6gn","c7g","c7gd","c7gn","r6g","r6gd","r7g","r7gd","r8g","r8gd","c8g","c8gd","c8gn","m6g","m6gd","m7g","m7gd","m8g","m8gd","x8g","i8g","a1","x2gd","im4gn","is4gen","i4g","hpc7g"]);function Gi(e){let t=e.split(".")[0]??"";return C2.has(t)?"ARM":"STANDARD"}hb(Gi,"getArchitectureForInstanceType");function pl(e,t){let n=Gi(e);return n!==t?{valid:!1,message:`Instance type '${e}' requires ${n} architecture, but '${t}' AMI was specified. Use a ${n==="ARM"?"Graviton instance (t4g, c6g, r6g, m6g, etc.)":"Intel/AMD instance (t3, c5, r5, m5, etc.)"} instead.`}:{valid:!0}}hb(pl,"validateArchitectureMatch");function lR(e,t){return Gi(e)===t}hb(lR,"isArchitectureCompatible");var N2=Object.defineProperty,fl=(e,t)=>N2(e,"name",{value:t,configurable:!0});var P2=1;var w2=/^[A-Za-z0-9_.-]+$/,k2=s.object({id:s.string().min(1,"buildSecret id cannot be empty").regex(w2,"buildSecret id may contain only letters, digits, '_', '.', and '-' (no comma, '=', or whitespace, which would break the buildx --secret argv)"),ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildSecret requires exactly one source (ssm, secretsManager, or env)"})}),O2=s.union([s.string(),s.object({ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional(),acknowledgePublic:s.boolean().optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildArg value requires exactly one source (ssm, secretsManager, or env)"})})]),Ft=s.object({path:s.string(),context:s.string().min(1,"context cannot be empty").optional(),target:s.string().min(1,"target cannot be empty").optional(),buildArgs:s.record(s.string(),O2).optional(),buildSecrets:s.array(k2).optional()}).strict(),Yq=Ft.partial();function D2(e,t){if(t===void 0)return e;let n=t.context??e.context,i=t.target??e.target,r=t.buildArgs??e.buildArgs,o=t.buildSecrets??e.buildSecrets;return{path:t.path??e.path,...n!==void 0&&{context:n},...i!==void 0&&{target:i},...r!==void 0&&{buildArgs:r},...o!==void 0&&{buildSecrets:o}}}fl(D2,"mergeDockerBuild");function vb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}fl(vb,"isRecord");function dR(e){if(!vb(e)||typeof e.path!="string"||e.path.length===0)return;let t=typeof e.context=="string"&&e.context.length>0?e.context:void 0,n=typeof e.target=="string"&&e.target.length>0?e.target:void 0,i=vb(e.buildArgs)&&Object.keys(e.buildArgs).length>0?e.buildArgs:void 0,r=Array.isArray(e.buildSecrets)&&e.buildSecrets.length>0?e.buildSecrets:void 0,o={path:e.path,...t!==void 0&&{context:t},...n!==void 0&&{target:n},...i!==void 0&&{buildArgs:i},...r!==void 0&&{buildSecrets:r}},a=Ft.safeParse(o);return a.success?a.data:void 0}fl(dR,"normaliseDockerBuild");function M2(e){if(e===void 0)return;let t=dR(e);return t===void 0?void 0:JSON.stringify(t)}fl(M2,"dockerBuildFingerprint");var j2=s.object({name:s.string(),clusterName:s.string().optional(),docker:Ft.optional(),containerPort:s.number().optional(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),schemaGateImageTag:s.string().optional()}).strict(),z2=s.object({type:s.enum(Lt),name:s.string(),source:s.string()}).strict(),L2=s.object({repositoryName:s.string()}).strict(),U2=["x86_64","arm64"],F2=s.object({name:s.string(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),docker:Ft.optional(),imageKey:s.string().optional(),architecture:s.enum(U2).optional()}).strict(),B2=s.object({templateHash:s.string(),synthTimestamp:s.string()}).strict(),V2=s.object({constructPath:s.string().max(512),group:s.string().max(128),resourceType:s.string().max(256)}).strict(),G2=s.object({synthesisedBy:s.string().min(1).max(128),minimumEngineVersion:s.string().min(1).max(32),maximumEngineMajor:s.number().int().min(0).optional(),minimumAwsCdkCli:s.string().min(1).max(32).optional()}).strict(),Z2=s.object({appName:s.string().min(1).max(128),slot:s.string().min(1).max(64),clusterName:s.string().min(1).max(128),anchor:s.string().min(1).max(128),pinned:s.boolean(),currentServiceName:s.string().min(1).max(256),legacyKey:s.string().min(1).max(256),legacyAnchor:s.string().min(1).max(256),legacyServiceName:s.string().min(1).max(512),legacyKeyFields:s.array(s.string().max(64)).max(32)}).strict(),W2=s.object({constructPath:s.string().min(1).max(512),resourceType:s.string().min(1).max(256),physicalNameHint:s.string().min(1).max(512),policy:s.enum(["retain","snapshot","adopted"]),destroyDisposition:s.enum(["survives","deleted-on-explicit-destroy"]),reason:s.string().min(1).max(1024),costClass:s.enum(["none","storage","fixed-monthly"]),cleanupHint:s.string().min(1).max(1024)}).strict(),Kq=s.object({version:s.literal(P2),generatedAt:s.string(),appName:s.string(),services:s.array(j2),lambdas:s.array(F2),pattern:z2.optional(),ecr:L2.optional(),stacks:s.record(s.string(),B2),resourceMap:s.record(s.string(),V2).optional(),engineCompat:G2.optional(),identityAliases:s.array(Z2).optional(),residuals:s.array(W2).optional()}).strict();var H2=Object.defineProperty,Y2=(e,t)=>H2(e,"name",{value:t,configurable:!0});function pR(e){return!(e.image!==void 0&&e.docker!==void 0)}Y2(pR,"imageDockerMutexCheck");var fR=s.number().int(m.CAPACITY.MIN.INTEGER).min(sb,m.GENERATOR_CAPACITY.MIN.MIN).max(cb,m.GENERATOR_CAPACITY.MIN.MAX),gR=s.number().int(m.CAPACITY.MAX.INTEGER).min(sb,m.GENERATOR_CAPACITY.MAX.MIN).max(cb,m.GENERATOR_CAPACITY.MAX.MAX),Zi=s.number().int(m.LAMBDA.MEMORY.INTEGER).min(C$,m.LAMBDA.MEMORY.MIN).max(N$,m.LAMBDA.MEMORY.MAX).refine(e=>e===128||e%64===0,m.LAMBDA.MEMORY.MULTIPLE),hR=s.string().regex(L.LAMBDA_RUNTIME_IDENTIFIER,m.LAMBDA.RUNTIME),bb=s.number().int(m.CPU.INTEGER).min(256,m.CPU.MIN).max(4096,m.CPU.MAX),hl=s.number().int(m.CAPACITY.DESIRED.INTEGER).min(0,m.CAPACITY.DESIRED.MIN).max(Fi,m.CAPACITY.DESIRED.MAX),Pa=s.object({connectToDatabase:s.array(s.string()).optional()}).strict(),K2=s.object({minSize:s.number().int(m.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,m.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(P$,m.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:s.boolean().optional()}).strict(),yb=s.object({instanceType:s.string().optional(),amiHardwareType:s.enum(Xu).optional(),minCapacity:s.number().int(m.CAPACITY.MIN.INTEGER).min(0,m.CAPACITY.MIN.MIN_0).max(Fi,m.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(m.CAPACITY.MAX.INTEGER).min(1,m.CAPACITY.MAX.MIN_1).max(Fi,m.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:Ta(128).optional(),warmPool:K2.optional(),extraProperties:s.array(ke).optional()}).strict().superRefine((e,t)=>{if(!e.instanceType||!e.amiHardwareType)return;let n=pl(e.instanceType,e.amiHardwareType);n.valid||t.addIssue({code:"custom",message:n.message??m.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((e,t)=>{e.minCapacity===0&&!e.warmPool&&t.addIssue({code:"custom",message:m.CAPACITY.WARM_POOL_REQUIRED,path:["minCapacity"]}),e.warmPool?.minSize!==void 0&&e.maxCapacity!==void 0&&e.warmPool.minSize>e.maxCapacity&&t.addIssue({code:"custom",message:m.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),q2=s.enum(_a).describe(`Compute type must be one of: ${_a.join(", ")}`),Sb=s.enum(zi).describe(`ECS capacity provider must be one of: ${zi.join(", ")}`),_b=s.string().refine(e=>ht(Ju,e),{message:m.INSTANCE_TYPE}),vR=s.object({sourceType:s.enum(["sqs","dynamodb","eventbridge"]),sourceRef:s.string().describe("Name of the source resource"),batchSize:s.number().int(m.BATCH_SIZE.INTEGER).min(1,m.BATCH_SIZE.MIN).max(1e4,m.BATCH_SIZE.MAX).optional(),startingPosition:s.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:s.number().int(m.BATCHING_WINDOW.INTEGER).min(0,m.BATCHING_WINDOW.MIN).max(300,m.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:s.boolean().optional()}).strict(),X2=s.object({name:s.string().min(1,m.REQUIRED.CONTAINER_NAME).optional(),image:s.string().optional(),port:En.optional(),environment:Vi.optional(),secretsImport:z$.optional(),command:s.array(s.string()).optional(),entryPoint:s.array(s.string()).optional(),essential:s.boolean().optional(),healthCheck:s.object({command:s.array(s.string()),interval:s.number().int(m.HEALTH_CHECK.INTERVAL.INTEGER).min(5,m.HEALTH_CHECK.INTERVAL.MIN).max(300,m.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:s.number().int(m.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,m.HEALTH_CHECK.TIMEOUT.MIN).max(60,m.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:s.number().int(m.HEALTH_CHECK.RETRIES.INTEGER).min(1,m.HEALTH_CHECK.RETRIES.MIN).max(10,m.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:s.number().int(m.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,m.HEALTH_CHECK.START_PERIOD.MIN).max(300,m.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:s.array(s.string().regex(L.SECRET_NAME,m.SECRET_NAME)).optional(),extraProperties:s.array(ke).optional()}).strict(),bR=s.string().min(1,m.REQUIRED.SERVICE_NAME).max(255,m.MAX_LENGTH.SERVICE_NAME).regex(L.ECS_SERVICE_NAME,m.ECS_SERVICE_NAME),yR=s.object({domain:s.string().optional(),loadBalancer:s.union([s.literal(!1),s.enum(Ku)]).optional(),directAccess:s.boolean().optional(),extraProperties:s.array(ke).optional()}).strict().refine(e=>!(e.directAccess&&e.domain),{message:m.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(e=>!(e.directAccess&&typeof e.loadBalancer=="string"),{message:m.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),gl=s.object({path:s.string().optional(),host:s.string().optional(),priority:s.number().int(m.PRIORITY.INTEGER).min(1,m.PRIORITY.MIN).max(5e4,m.PRIORITY.MAX).optional(),healthCheckPath:s.string().optional()}).strict().describe("Path/host-based routing configuration"),J2=s.object({desiredCount:hl.optional(),minCapacity:s.number().int(m.CAPACITY.MIN.INTEGER).min(0,m.CAPACITY.MIN.MIN_0).max(Fi,m.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(m.CAPACITY.MAX.INTEGER).min(1,m.CAPACITY.MAX.MIN_1).max(Fi,m.CAPACITY.MAX.MAX).optional(),scalingType:s.enum(qu).optional()}).strict().refine(_n.check,_n.params).describe("ECS service scaling configuration"),SR=s.object({name:bR,docker:Ft.optional(),needsDatabaseConnection:s.boolean().optional(),needsStorageConnection:s.boolean().optional(),needsMessagingConnection:s.boolean().optional(),image:s.string().optional(),containers:s.array(X2).optional(),routing:s.union([gl,s.array(gl).min(1)]).optional(),serviceType:s.enum(Aa).optional(),cpu:bb.optional(),memoryLimitMiB:Ta(512).optional(),desiredCount:hl.optional(),scaling:Xe(J2).optional(),capacityProvider:Sb,ec2Config:yb.optional(),ssmSecretsPath:s.string().regex(L.SSM_PATH,m.SSM_PATH).optional(),extraProperties:s.array(ke).optional(),alarms:B$.optional()}).strict().superRefine((e,t)=>{pR(e)||t.addIssue({code:"custom",path:["docker"],message:m.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),_R=s.object({name:V,type:q2,needsConnection:s.boolean(),connectedDatabase:s.array(s.string()).optional(),connectedStorage:s.array(s.string()).optional(),connectedMessaging:s.array(s.string()).optional(),cluster:yR.optional(),services:s.array(SR).optional(),docker:Ft.partial().optional(),deployment:s.enum(Hu).optional(),codePath:s.string().optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(Qu,m.LAMBDA.TIMEOUT.MIN).max(el,m.LAMBDA.TIMEOUT.MAX).optional(),memory:Zi.optional(),handler:s.string().optional(),runtime:hR.optional(),environment:Vi.optional(),secrets:Vi.optional(),eventSources:s.array(vR).optional(),functionUrl:s.object({authType:s.enum(xa)}).strict().optional(),description:s.string().optional(),scheduleExpression:s.string().optional(),architecture:s.enum(Yu).optional(),ephemeralStorageSize:s.number().int(m.EPHEMERAL_STORAGE.INTEGER).min(512,m.EPHEMERAL_STORAGE.MIN).max(10240,m.EPHEMERAL_STORAGE.MAX).optional(),functionName:s.string().optional(),ssmSecrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),alarms:G$.optional(),instanceType:_b.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional(),variableName:s.string().optional(),extraProperties:s.array(ke).optional()}).strict().superRefine((e,t)=>{if(e.type==="ecs"&&e.services)for(let n=0;n<e.services.length;n++){let i=e.services[n];i?.ec2Config?.instanceType&&!i.ec2Config.amiHardwareType&&Gi(i.ec2Config.instanceType)!=="ARM"&&t.addIssue({code:"custom",message:`Service '${i.name??n}' uses instance type '${i.ec2Config.instanceType}' (x86), which requires Docker images built for linux/amd64. The default build targets linux/arm64 (Graviton). Use a Graviton instance type (t4g, c6g, r6g, m6g, etc.) or set amiHardwareType: "STANDARD" to acknowledge x86.`,path:["services",n,"ec2Config","instanceType"]})}e.type==="lambda"&&e.deployment==="container"&&e.architecture==="X86_64"&&t.addIssue({code:"custom",message:"Lambda architecture 'X86_64' requires Docker images built for linux/amd64, but the default build targets linux/arm64. Use 'ARM_64' for Graviton Lambdas (recommended) or ensure your build pipeline targets linux/amd64.",path:["architecture"]})}),i7=s.object({appName:xe,clusterName:V,containerPort:En,nameProvidedByFlag:s.boolean().optional(),ecrRepository:s.string().optional(),capacityProvider:Sb.optional(),useAppEcr:s.boolean().optional(),desiredCount:hl.optional(),cpu:bb.optional(),memoryLimitMiB:Ta(512).optional(),minCapacity:fR.optional(),maxCapacity:gR.optional(),ec2Config:yb.optional(),connectionConfig:Pa.optional()}).strict().refine(_n.check,_n.params),o7=s.object({appName:xe,functionName:V,nameProvidedByFlag:s.boolean().optional(),lambdaType:s.enum(["basic","web","custom"]).optional(),ecrRepository:s.string().optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(Qu,m.LAMBDA.TIMEOUT.MIN).max(el,m.LAMBDA.TIMEOUT.MAX).optional(),memory:Zi.optional(),enableFunctionUrl:s.boolean().optional(),description:s.string().optional(),enableCors:s.boolean().optional(),corsOrigins:s.string().optional(),corsHeaders:s.string().optional(),corsMethods:s.array(s.enum(k$)).optional(),corsCredentials:s.boolean().optional(),connectionConfig:Pa.optional()}).strict(),a7=s.object({appName:xe,instanceName:V,nameProvidedByFlag:s.boolean().optional(),instanceType:_b.optional(),enableSSH:s.boolean().optional(),minCapacity:fR.optional(),maxCapacity:gR.optional(),connectionConfig:Pa.optional()}).strict().refine(_n.check,_n.params),s7=s.object({appName:xe,clusterName:V,serviceName:bR,capacityProvider:Sb,containerPort:En.optional(),cpu:bb.optional(),memoryLimitMiB:Ta(512).optional(),desiredCount:hl.optional(),ec2Config:yb.optional(),routing:s.union([gl,s.array(gl).min(1)]).optional(),docker:Ft.partial().optional(),nameProvidedByFlag:s.boolean().optional(),connectionConfig:Pa.optional()}).strict(),Eb=s.object({appName:xe,computeName:V,nameProvidedByFlag:s.boolean().optional(),connectionConfig:Pa.optional()}).strict(),Q2=Eb.extend({type:s.literal("ecs"),cluster:yR.optional(),services:s.array(SR).min(1,m.SERVICE.MIN_REQUIRED),docker:Ft.partial().optional()}).strict().refine(e=>{let t=e.services.filter(n=>n.containers?.some(i=>i.port));return t.length>1?t.every(n=>(Array.isArray(n.routing)?n.routing:n.routing?[n.routing]:[]).some(i=>i.path||i.host)):!0},{message:m.SERVICE.ROUTING_REQUIRED}).refine(e=>{let t=e.services.map(n=>n.name);return new Set(t).size===t.length},{message:m.SERVICE.UNIQUE_WITHIN_CLUSTER}),e4=Eb.extend({type:s.literal("lambda"),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(Qu,m.LAMBDA.TIMEOUT.MIN).max(el,m.LAMBDA.TIMEOUT.MAX).optional(),memory:Zi.optional(),handler:s.string().optional(),runtime:hR.optional(),environment:Vi.optional(),secrets:Vi.optional(),description:s.string().optional(),functionUrl:s.union([s.object({authType:s.enum(xa).optional()}).strict(),s.literal(!1)]).optional(),eventSources:s.array(vR).optional()}).strict(),t4=Eb.extend({type:s.literal("ec2"),instanceType:_b.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional()}).strict(),ER=s.discriminatedUnion("type",[Q2,e4,t4]),mR=s.object({path:s.string().min(1,m.REQUIRED.ROUTING_PATH),priority:s.number().int(m.PRIORITY.INTEGER).min(1,m.PRIORITY.MIN).max(5e4,m.PRIORITY.MAX).optional()}).strict(),xR=s.object({name:s.string().min(1,m.REQUIRED.SERVICE_NAME).max(255,m.MAX_LENGTH.SERVICE_NAME).regex(L.RESOURCE_NAME,m.RESOURCE_NAME),serviceType:s.enum(Aa).optional(),docker:Ft.partial().optional(),containerPort:En.optional(),needsDatabaseConnection:s.boolean().optional(),routing:s.union([mR,s.array(mR).min(1)]).optional()}).strict().superRefine((e,t)=>{e.serviceType==="worker"&&(e.containerPort!==void 0&&t.addIssue({code:"custom",path:["containerPort"],message:"Worker services are not reachable inbound; remove containerPort."}),e.routing!==void 0&&t.addIssue({code:"custom",path:["routing"],message:"Worker services have no ALB route; remove routing."}))}),c7=s.object({appName:xe,instanceType:s.string().optional()}).strict();var xb=s.object({memorySize:Zi.optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(1,m.LAMBDA.TIMEOUT.MIN).max(900,m.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:s.number().int(m.EPHEMERAL_STORAGE.INTEGER).min(512,m.EPHEMERAL_STORAGE.MIN).max(10240,m.EPHEMERAL_STORAGE.MAX).optional()}).strict(),AR=s.object({type:s.enum(ab).optional(),databaseName:s.string().optional(),databaseEngine:s.enum(Ui).optional(),deletionProtection:s.boolean().optional(),backupRetention:sr.optional(),port:il.optional(),publiclyAccessible:s.boolean().optional(),allowedIpCidr:s.string().optional(),instanceType:s.string().optional(),allocatedStorage:s.number().int(m.ALLOCATED_STORAGE.INTEGER).min(20,m.ALLOCATED_STORAGE.MIN).max(65536,m.ALLOCATED_STORAGE.MAX).optional(),multiAz:s.boolean().optional(),readReplica:sl.optional(),writer:Ca.optional(),readers:Na.optional(),allowVpcAccess:s.boolean().optional(),monitoringInterval:Ra.optional(),preferredMaintenanceWindow:s.string().optional(),databaseInsights:cl.optional(),proxy:al.optional(),credentials:ol.optional(),encryption:ul.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict(),IR=s.object({server:xb.optional(),imageOptimisation:xb.optional(),revalidation:xb.optional()}).strict(),Ab=s.object({versioned:s.boolean().optional()}).strict(),TR=s.object({assets:Ab.optional(),cache:Ab.optional(),media:Ab.optional()}).strict(),r4=s.object({visibilityTimeout:s.number().int(m.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,m.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,m.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:s.number().int(m.SQS.RETENTION_PERIOD.INTEGER).min(60,m.SQS.RETENTION_PERIOD.MIN).max(1209600,m.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:s.number().int(m.MAX_MESSAGE_SIZE.INTEGER).min(1024,m.MAX_MESSAGE_SIZE.MIN).max(262144,m.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:s.union([s.literal(!1),s.object({enabled:s.boolean().optional(),maxReceiveCount:s.number().int(m.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,m.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,m.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),$R=s.object({revalidationQueue:r4.optional()}).strict(),RR=s.object({domainNames:s.array(s.string()).optional(),certificateArn:s.string().optional()}).strict(),CR=s.record(s.string().regex(L.ENV_VAR_NAME,m.ENV_VAR_NAME),s.string()).optional(),n4=s.object({type:s.literal("payload"),name:s.string().min(1,m.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:AR.optional(),compute:IR.optional(),storage:TR.optional(),messaging:$R.optional(),cdn:RR.optional(),environment:CR}).strict(),i4=s.object({type:s.literal("nextjs"),name:s.string().min(1,m.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:AR.optional(),compute:IR.optional(),storage:TR.optional(),messaging:$R.optional(),cdn:RR.optional(),environment:CR}).strict(),Ib=s.enum(oa),o4=s.object({command:s.string().min(1,m.REQUIRED.BUILD_COMMAND),outputDir:s.string().min(1,m.REQUIRED.OUTPUT_DIR)}).strict(),a4=s.object({headers:s.boolean().optional(),contentSecurityPolicy:s.string().optional()}).strict(),s4=s.object({to:s.string().min(1,m.REQUIRED.FORMS_TO).regex(L.EMAIL,m.EMAIL),from:s.string().regex(L.EMAIL,m.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),maxConcurrency:s.number().int().min(1).max(100).optional()}).strict(),c4=s.object({behaviours:s.array(s.unknown()).optional()}).strict(),Tb=s.object({type:s.literal("staticsite"),name:s.string().min(1,m.REQUIRED.PATTERN_NAME),source:s.string().min(1,m.REQUIRED.SOURCE),build:o4,routing:Ib.optional(),security:a4.optional(),domain:s.string().optional(),forms:s4.optional(),cdn:c4.optional()}).strict().superRefine((e,t)=>{if(e.forms===void 0)return;let n=e.domain;if(n===void 0||n===""){t.addIssue({code:"custom",path:["domain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"});return}let i=e.forms.from;i!==void 0&&!Su(i,n)&&t.addIssue({code:"custom",path:["forms","from"],message:`forms.from must be an address at ${n} (the verified SES identity) \u2014 for example noreply@${n}. Use forms.to for the recipient.`})}),wa=s.discriminatedUnion("type",[n4,i4,Tb]),NR=s.enum(["lightweight","standard","resilient","custom"]),PR=s.object({type:s.enum(ab),instanceType:s.string().optional(),backupRetention:sr.optional(),deletionProtection:s.boolean().optional(),encryption:s.union([s.object({useCMK:s.literal(!0)}).strict(),s.literal(!1)]).optional()}).strict(),wR=s.object({memorySize:Zi.optional(),timeout:s.number().int(m.LAMBDA.TIMEOUT.INTEGER).min(1,m.LAMBDA.TIMEOUT.MIN).max(900,m.LAMBDA.TIMEOUT.MAX).optional()}).strict();var kR=s.object({appName:xe,type:ub,pattern:lb.optional(),patternConfig:wa.optional(),owner:s.string().optional(),tags:s.record(s.string(),s.string()).optional(),vpcId:s.string().optional(),network:dl.optional(),backup:U$.optional(),tunnel:F$.optional(),additionalNetworks:s.array(iR).optional(),database:s.array(W$),s3:s.array(aR),compute:s.array(_R),dynamodb:s.array(J$).optional(),clickhouse:s.array(Q$).optional(),sqs:s.array(sR).optional(),cdn:uR.optional(),customCodeBlocks:s.array(L$).optional(),additionalManagedImports:s.array(s.object({moduleSpecifier:s.string(),namedImports:s.array(s.string()),defaultImport:s.string().optional()}).strict()).optional()}).strict(),R7=s.object({name:xe,type:ub,pattern:lb.optional(),patternTier:NR.optional(),patternDomain:s.string().optional(),source:s.string().min(1,m.REQUIRED.SOURCE).optional(),buildCommand:s.string().min(1,m.REQUIRED.BUILD_COMMAND).optional(),outputDir:s.string().min(1,m.REQUIRED.OUTPUT_DIR).optional(),routing:Ib.optional(),formsTo:s.string().min(1,m.REQUIRED.FORMS_TO).regex(L.EMAIL,m.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),customDatabase:PR.optional(),customCompute:wR.optional(),region:s.string().optional(),owner:s.string().optional(),includeDatabase:s.boolean().optional(),databaseName:s.string().min(1,m.DATABASE.NAME.REQUIRED).max(63,m.DATABASE.NAME.MAX_LENGTH).optional(),vpcId:s.string().optional(),network:oR.optional(),services:s.array(xR).optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict().superRefine((e,t)=>{e.formsTo!==void 0&&(e.patternDomain!==void 0&&e.patternDomain!==""||t.addIssue({code:"custom",path:["patternDomain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"}))}),C7=s.object({name:V,localResource:s.string().min(1),remoteApp:s.string().min(1),remoteResource:s.string().min(1),permission:s.enum(["read","write","read-write"]),remoteArn:s.string().optional()}).strict();var u4=["fjall-managed","external","external-manual"],O7=s.enum(u4);var OR=s.object({givenName:s.string().min(1),familyName:s.string().min(1),displayName:s.string().min(1).optional(),expires:s.string().min(1).optional()}).strict(),DR=s.object({name:s.string().min(1),path:s.string().min(1).optional()}).strict(),l4=s.union([s.object({managedPolicyArn:s.string().min(1)}).strict(),s.object({customerManagedPolicy:DR}).strict()]),d4=s.object({managedPolicies:s.array(s.string().min(1)).optional(),inlinePolicy:s.record(s.string(),s.unknown()).optional(),customerManagedPolicies:s.array(DR).optional(),permissionsBoundary:l4.optional(),sessionDuration:s.string().min(1).optional(),description:s.string().optional(),accounts:s.union([s.array(s.string().min(1)),s.literal("all")]).optional(),includeManagementAccount:s.boolean().optional(),groups:s.array(s.string().min(1)).optional()}).strict(),m4=s.object({description:s.string().optional()}).strict(),vl=s.string().regex(L.EMAIL,m.EMAIL),$b={groups:s.record(s.string(),m4).optional(),permissionSets:s.record(s.string(),d4).optional(),memberships:s.record(s.string(),s.array(vl)).optional(),resolutionVersion:s.number().int().min(1).optional(),defaultPermissionSets:s.boolean().optional()},p4=s.discriminatedUnion("source",[s.object({...$b,source:s.literal("fjall-managed"),users:s.record(vl,OR)}).strict(),s.object({...$b,source:s.literal("external")}).strict(),s.object({...$b,source:s.literal("external-manual"),users:s.record(vl,OR).optional()}).strict()]),D7=s.object({name:V,type:s.literal("organisation").optional(),organisationName:s.string().min(1).optional(),orgEmail:vl.optional(),accounts:s.unknown().optional(),accountIds:s.record(s.string(),s.string()).optional(),identityCentre:s.union([p4,s.literal(!1)]).optional(),allowedRegions:s.array(s.string().min(1)).optional()}).strict();var f4=Object.defineProperty,g4=(e,t)=>f4(e,"name",{value:t,configurable:!0}),h4=[1,3,5,7,14,30,60,90,120,150,180,365,400,545,731,1827,3653],v4=s.object({buildkiteQueue:s.string().min(1,"buildkiteQueue cannot be empty").max(100).regex(/^[a-zA-Z0-9-_]+$/,"buildkiteQueue must be alphanumeric with hyphens/underscores"),buildkiteOrgSlug:s.string().min(1,"buildkiteOrgSlug cannot be empty").max(100).regex(/^[a-z0-9-]+$/,"buildkiteOrgSlug must be a lowercase Buildkite organisation slug"),agentTokenSsmParameterName:s.string().min(2).regex(/^\//,"agentTokenSsmParameterName must be a full path (leading /)").optional(),agentTokenKmsKeyArn:s.string().min(1).optional(),fjallApiKeySsmParameterName:s.string().min(2).regex(/^\//,"fjallApiKeySsmParameterName must be a full path (leading /)").optional(),instanceType:s.string().min(1).default("c8g.xlarge"),agentVolumeSizeGib:s.number().int().min(20).max(1e3).default(250),agentMinInstances:s.number().int().min(0).default(0),agentMaxInstances:s.number().int().min(1).default(2),agentsPerInstance:s.number().int().min(1).default(1),spotCapacityPercentage:s.number().int().min(0).max(100).default(0),scaleInIdlePeriodSeconds:s.number().int().min(60).default(600),disconnectAfterUptimeSeconds:s.number().int().min(3600).default(86400),maxInstanceLifetimeDays:s.number().int().min(1).max(365).default(7),terminateInstanceAfterJob:s.boolean().default(!1),purgeBuildsOnDiskFull:s.boolean().default(!0),terminateInstanceOnDiskFull:s.boolean().default(!1),logRetentionDays:s.number().int().min(1).default(30),agentLogRetentionDays:s.literal(h4).default(7),buildkiteAgentRelease:s.enum(["stable","beta","edge"]).default("stable"),buildkiteAgentTags:s.string().default(""),buildkiteAgentTimestampLines:s.boolean().default(!1),buildkiteAgentExperiments:s.string().default(""),buildkiteAgentTracingBackend:s.enum(["","datadog","opentelemetry"]).default(""),buildkiteAgentCancelGracePeriodSeconds:s.number().int().min(10).default(60),enableSecretsPlugin:s.boolean().default(!0),enableEcrPlugin:s.boolean().default(!1),enableDockerLoginPlugin:s.boolean().default(!1),enableDockerUserNamespaceRemap:s.boolean().default(!0),enableDockerExperimental:s.boolean().default(!1),dockerNetworkingProtocol:s.enum(["ipv4","dualstack"]).default("ipv4"),enableInstanceStorage:s.boolean().default(!1),mountTmpfsAtTmp:s.boolean().default(!0),buildkiteAgentEnableGitMirrors:s.boolean().default(!1),bootstrapScriptUrl:s.string().default(""),agentEnvFileUrl:s.string().default(""),scalerEventSchedulePeriod:s.string().min(1).default("1 minute"),scalerMinPollInterval:s.string().min(1).default("10s"),scaleOutFactor:s.string().min(1).default("1.0"),scaleOutWaitingForJobs:s.boolean().default(!1),rolePermissionsBoundaryArn:s.string().min(1).optional(),alarmSnsTopicArn:s.string().min(1).optional(),applicationId:s.string().min(1).optional(),costAllocationEnvironment:s.string().min(1).optional(),costAllocationOwner:s.string().min(1).optional()}).strict(),b4=v4.refine(e=>e.agentMinInstances<=e.agentMaxInstances,{message:"agentMinInstances must be <= agentMaxInstances"});function y4(e){let t=b4.safeParse(e);if(!t.success){let n=t.error.issues.map(i=>` - ${i.path.join(".")||"(root)"}: ${i.message}`).join(`
200
200
  `);throw new Error(`Buildkite: invalid props:
201
- ${n}`)}return t.data}f4(b4,"validateBuildkiteProps");var y4=Object.defineProperty,S4=(e,t)=>y4(e,"name",{value:t,configurable:!0});function _4(e){return`FjallDeployBoundary${e}`}S4(_4,"deployBoundaryName");var $b={Sid:"FjallInheritAdministratorAccess",Effect:"Allow",Action:"*",Resource:"*"},DR=[{Sid:"FjallDenyOrgAndAccountEscape",Effect:"Deny",Action:["organizations:LeaveOrganization","account:CloseAccount"],Resource:"*"},{Sid:"FjallDenyDisableAuditLogging",Effect:"Deny",Action:["cloudtrail:StopLogging"],Resource:"*"},{Sid:"FjallDenyBoundarySelfEscape",Effect:"Deny",Action:["iam:DeleteRolePermissionsBoundary"],Resource:"*"},{Sid:"FjallDenyDisableKmsKey",Effect:"Deny",Action:["kms:DisableKey"],Resource:"*"}],MR=[...DR,{Sid:"FjallDenyStandingHumanCredentials",Effect:"Deny",Action:["iam:CreateUser","iam:CreateLoginProfile","iam:CreateAccessKey","iam:CreateAccountAlias"],Resource:"*"},{Sid:"FjallDenyDisableConfigRecorder",Effect:"Deny",Action:["config:StopConfigurationRecorder"],Resource:"*"}],E4=[...MR,{Sid:"FjallDenyAccountPasswordPolicyTamper",Effect:"Deny",Action:["iam:UpdateAccountPasswordPolicy","iam:DeleteAccountPasswordPolicy"],Resource:"*"},{Sid:"FjallDenyDisableDefaultEbsEncryption",Effect:"Deny",Action:["ec2:DisableEbsEncryptionByDefault"],Resource:"*"}],q7={foundation:[$b,...DR],compliance:[$b,...MR],hardened:[$b,...E4]};var x4=Object.defineProperty,Ae=(e,t)=>x4(e,"name",{value:t,configurable:!0});var Nb="sts.amazonaws.com";function A4(e){return`FjallDevDeploy${e}`}Ae(A4,"devDeployRoleName");function I4(e){return`FjallDevProvisioner${e}`}Ae(I4,"devProvisionerRoleName");function T4(e){return`FjallDevSyncWriter${e}`}Ae(T4,"devSyncWriterRoleName");var $4="FjallDevBoundary";function jR(e){return`arn:aws:iam::${e}:policy/${$4}`}Ae(jR,"devBoundaryPolicyArn");function zR(e){return`org:${e}:dev-provisioner`}Ae(zR,"devProvisionerSubject");function LR(e){return`org:${e}:dev-sync`}Ae(LR,"devSyncSubject");function Rb(e,t){return`org:${e}:acct:${t}`}Ae(Rb,"deployAccountSubject");function Cb(e){return`org:${e}:*`}Ae(Cb,"genericMachineSubject");var R4=["discovery","connection","org-setup","dev-substrate-setup"];function UR(e,t){return`org:${e}:${t}`}Ae(UR,"serviceSubject");function C4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountTier:r,accountId:o}=e,a=e.machineTrustMode??"expanded",c={[`${i}:aud`]:Nb},u;if(a==="account-scoped"){if(r===void 0||!hu(r)||o===void 0)throw new Error(`machineTrustMode "account-scoped" requires a governance accountTier and an accountId (got tier: ${String(r)}, accountId ${o===void 0?"absent":"present"}) \u2014 refusing to fall back to the generic machine subject: a silent fallback would re-widen the trust the \xA74.4a Step-3 contract removes`);u=[Rb(t,o)]}else o!==void 0?u=[Cb(t),Rb(t,o)]:u=Cb(t);return[{Sid:"FjallMachineSubject",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:u}}},{Sid:"FjallUserSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:c,StringLike:{[`${i}:sub`]:`org:${t}:user:*`}}},{Sid:"FjallServiceSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:R4.map(l=>UR(t,l))}}}]}Ae(C4,"buildNarrowedDeployTrustStatements");function N4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountId:r}=e;return[{Sid:"FjallDevSubjectsThisAccount",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${i}:aud`]:Nb},StringLike:{[`${i}:sub`]:`org:${t}:dev:${r}:*`}}}]}Ae(N4,"buildDevDeployTrustStatements");function Pb(e){let{providerArn:t,issuerDomain:n,sid:i,subject:r}=e;return[{Sid:i,Effect:"Allow",Principal:{Federated:t},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${n}:aud`]:Nb,[`${n}:sub`]:r}}}]}Ae(Pb,"buildServiceSubjectTrustStatements");function P4(e){return Pb({...e,sid:"FjallDevProvisionerSubject",subject:zR(e.fjallOrgId)})}Ae(P4,"buildDevProvisionerTrustStatements");function w4(e){return Pb({...e,sid:"FjallDevSyncSubject",subject:LR(e.fjallOrgId)})}Ae(w4,"buildDevSyncWriterTrustStatements");function k4({accountId:e}){return[{Sid:"FjallDevEcsTaggedMutations",Effect:"Allow",Action:["ecs:UpdateService","ecs:DeleteService","ecs:RunTask","ecs:StopTask"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTaggedCreates",Effect:"Allow",Action:["ecs:RegisterTaskDefinition","ecs:CreateService"],Resource:"*",Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTagOnCreate",Effect:"Allow",Action:["ecs:TagResource"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"ecs:CreateAction":["RegisterTaskDefinition","CreateService","RunTask"]}}},{Sid:"FjallDevEcsReads",Effect:"Allow",Action:["ecs:Describe*","ecs:List*"],Resource:"*"},{Sid:"FjallDevEcsDeregisterTaskDefinition",Effect:"Allow",Action:["ecs:DeregisterTaskDefinition"],Resource:`arn:aws:ecs:*:${e}:task-definition/fjall-dev-*`},{Sid:"FjallDevElbTaggedMutations",Effect:"Allow",Action:["elasticloadbalancing:ModifyRule","elasticloadbalancing:DeleteRule","elasticloadbalancing:ModifyTargetGroup","elasticloadbalancing:ModifyTargetGroupAttributes","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:RegisterTargets","elasticloadbalancing:DeregisterTargets"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTaggedCreates",Effect:"Allow",Action:["elasticloadbalancing:CreateTargetGroup","elasticloadbalancing:CreateRule"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTagOnCreate",Effect:"Allow",Action:["elasticloadbalancing:AddTags"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"elasticloadbalancing:CreateAction":["CreateTargetGroup","CreateRule"]}}},{Sid:"FjallDevElbReads",Effect:"Allow",Action:["elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevSsmDevTree",Effect:"Allow",Action:["ssm:GetParameter*","ssm:PutParameter","ssm:AddTagsToResource"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevLogsMutations",Effect:"Allow",Action:["logs:PutRetentionPolicy","logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsTaggedCreate",Effect:"Allow",Action:["logs:CreateLogGroup","logs:TagResource"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevLogsRead",Effect:"Allow",Action:["logs:GetLogEvents","logs:DescribeLogStreams","logs:FilterLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsDescribeGroups",Effect:"Allow",Action:["logs:DescribeLogGroups"],Resource:"*"},{Sid:"FjallDevKmsViaDevAlias",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevKmsSsmSecureString",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}},{Sid:"FjallDevEcrAuthToken",Effect:"Allow",Action:["ecr:GetAuthorizationToken"],Resource:"*"},{Sid:"FjallDevEcrPushPull",Effect:"Allow",Action:["ecr:PutImage","ecr:InitiateLayerUpload","ecr:UploadLayerPart","ecr:CompleteLayerUpload","ecr:BatchCheckLayerAvailability","ecr:BatchGetImage","ecr:GetDownloadUrlForLayer","ecr:DescribeImages"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevPassDevPathRoles",Effect:"Allow",Action:["iam:PassRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`}]}Ae(k4,"buildDevDeployPolicyStatements");function O4({accountId:e}){return[{Sid:"FjallDevProvisionerBoundedRoleWrites",Effect:"Allow",Action:["iam:CreateRole","iam:PutRolePolicy","iam:AttachRolePolicy"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`,Condition:{StringEquals:{"iam:PermissionsBoundary":jR(e)}}},{Sid:"FjallDevProvisionerPathRoleOps",Effect:"Allow",Action:["iam:DeleteRole","iam:DeleteRolePolicy","iam:DetachRolePolicy","iam:ListRolePolicies","iam:TagRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`},{Sid:"FjallDevProvisionerListRoles",Effect:"Allow",Action:["iam:ListRoles"],Resource:"*"},{Sid:"FjallDevProvisionerDevMasterSecrets",Effect:"Allow",Action:["secretsmanager:GetSecretValue"],Resource:`arn:aws:secretsmanager:*:${e}:secret:fjall-dev-*`},{Sid:"FjallDevProvisionerKmsDecryptViaSecretsManager",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"secretsmanager.*.amazonaws.com"}}},{Sid:"FjallDevProvisionerDataApi",Effect:"Allow",Action:["rds-data:ExecuteStatement","rds-data:BatchExecuteStatement","rds-data:BeginTransaction","rds-data:CommitTransaction","rds-data:RollbackTransaction"],Resource:`arn:aws:rds:*:${e}:cluster:fjall-dev-*`},{Sid:"FjallDevProvisionerMetrics",Effect:"Allow",Action:["cloudwatch:GetMetricData"],Resource:"*"},{Sid:"FjallDevProvisionerOrphanDiscovery",Effect:"Allow",Action:["tag:GetResources"],Resource:"*"},{Sid:"FjallDevProvisionerSsmTeardown",Effect:"Allow",Action:["ssm:DeleteParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevProvisionerLogsTeardown",Effect:"Allow",Action:["logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevProvisionerTaggedTeardown",Effect:"Allow",Action:["ecs:UpdateService","ecs:StopTask","ecs:DeleteService","elasticloadbalancing:DeleteRule","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:DeregisterTargets"],Resource:[`arn:aws:ecs:*:${e}:*`,`arn:aws:elasticloadbalancing:*:${e}:*`],Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevProvisionerTeardownReads",Effect:"Allow",Action:["ecs:Describe*","elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevProvisionerImageJanitor",Effect:"Allow",Action:["ecr:ListImages","ecr:DescribeImages","ecr:BatchDeleteImage"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevProvisionerSsmReadAll",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/*`},{Sid:"FjallDevProvisionerKmsDecryptViaSsm",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}}]}Ae(O4,"buildDevProvisionerPolicyStatements");function D4({accountId:e}){return[{Sid:"FjallDevSyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}}]}Ae(D4,"buildDevSyncWriterPolicyStatements");function M4({accountId:e}){return[{Sid:"FjallDevBoundarySsmDevRead",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevBoundaryKmsDecryptDevAlias",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevBoundarySyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}},{Sid:"FjallDevBoundarySlotLogs",Effect:"Allow",Action:["logs:CreateLogStream","logs:PutLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevBoundarySyncQueue",Effect:"Allow",Action:["sqs:ReceiveMessage","sqs:DeleteMessage","sqs:GetQueueUrl"],Resource:`arn:aws:sqs:*:${e}:fjall-dev-sync-${e}-*`}]}Ae(M4,"buildDevBoundaryStatements");var j4=Object.defineProperty,Xe=(e,t)=>j4(e,"name",{value:t,configurable:!0});function R(e){return JSON.stringify(e)}Xe(R,"escapeStringLiteral");function xn(e){return e.map(R).join(", ")}Xe(xn,"formatStringArray");var z4="import:SharedAlarmTopicArn";function An(e=" "){return`
202
- ${e}...(getConfig().environment === "production" ? { alertsTopic: ${R(z4)} } : {}),`}Xe(An,"emitProductionAlertsTopicSpread");function In(e){return e===0?"":`_${String(e+1)}`}Xe(In,"connectionEnvSuffix");function L4(e,t){if(e===t)return 1;if(!e.startsWith(`${t}_`))return;let n=e.slice(t.length+1);return/^\d+$/.test(n)?parseInt(n,10):void 0}Xe(L4,"connectionKeyOrdinal");function wb(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.__identifier=="string"||typeof t.__expression=="string"||typeof t.__call=="string"}Xe(wb,"isSpecialValue");function cr(e){return e.replace(/[^a-zA-Z0-9]/g," ").split(" ").map((t,n)=>n===0?t.charAt(0).toLowerCase()+t.slice(1):t.charAt(0).toUpperCase()+t.slice(1)).join("")}Xe(cr,"toVariableName");function se(e){return e.variableName??cr(e.name)}Xe(se,"getVariableName");function Oa(e,t){for(let n of e.database)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.s3)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.compute)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.dynamodb??[])if(n.name===t&&n.variableName)return n.variableName;for(let n of e.sqs??[])if(n.name===t&&n.variableName)return n.variableName;return cr(t)}Xe(Oa,"resolveResourceVariable");function FR(e){let t=Object.entries(e);return t.length===0?!0:t.length>1?!1:t.every(([,n])=>typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===null)}Xe(FR,"isSimpleObject");function W(e,t=" "){if(e==null)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(wb(e)){if("__identifier"in e)return e.__identifier;if("__expression"in e)return e.__expression;if("__call"in e)return e.__call}if(Array.isArray(e))return`[${e.map(n=>W(n,t)).join(", ")}]`;if(typeof e=="object"){let n=Object.entries(e).filter(([,o])=>o!==void 0);if(FR(e)){let o=n.map(([a,c])=>`${a}: ${W(c,t)}`).join(", ");return o?`{ ${o} }`:"{}"}let i=t+" ",r=n.map(([o,a])=>`${i}${o}: ${W(a,i)}`).join(`,
201
+ ${n}`)}return t.data}g4(y4,"validateBuildkiteProps");var S4=Object.defineProperty,_4=(e,t)=>S4(e,"name",{value:t,configurable:!0});function E4(e){return`FjallDeployBoundary${e}`}_4(E4,"deployBoundaryName");var Rb={Sid:"FjallInheritAdministratorAccess",Effect:"Allow",Action:"*",Resource:"*"},MR=[{Sid:"FjallDenyOrgAndAccountEscape",Effect:"Deny",Action:["organizations:LeaveOrganization","account:CloseAccount"],Resource:"*"},{Sid:"FjallDenyDisableAuditLogging",Effect:"Deny",Action:["cloudtrail:StopLogging"],Resource:"*"},{Sid:"FjallDenyBoundarySelfEscape",Effect:"Deny",Action:["iam:DeleteRolePermissionsBoundary"],Resource:"*"},{Sid:"FjallDenyDisableKmsKey",Effect:"Deny",Action:["kms:DisableKey"],Resource:"*"}],jR=[...MR,{Sid:"FjallDenyStandingHumanCredentials",Effect:"Deny",Action:["iam:CreateUser","iam:CreateLoginProfile","iam:CreateAccessKey","iam:CreateAccountAlias"],Resource:"*"},{Sid:"FjallDenyDisableConfigRecorder",Effect:"Deny",Action:["config:StopConfigurationRecorder"],Resource:"*"}],x4=[...jR,{Sid:"FjallDenyAccountPasswordPolicyTamper",Effect:"Deny",Action:["iam:UpdateAccountPasswordPolicy","iam:DeleteAccountPasswordPolicy"],Resource:"*"},{Sid:"FjallDenyDisableDefaultEbsEncryption",Effect:"Deny",Action:["ec2:DisableEbsEncryptionByDefault"],Resource:"*"}],X7={foundation:[Rb,...MR],compliance:[Rb,...jR],hardened:[Rb,...x4]};var A4=Object.defineProperty,Ae=(e,t)=>A4(e,"name",{value:t,configurable:!0});var Pb="sts.amazonaws.com";function I4(e){return`FjallDevDeploy${e}`}Ae(I4,"devDeployRoleName");function T4(e){return`FjallDevProvisioner${e}`}Ae(T4,"devProvisionerRoleName");function $4(e){return`FjallDevSyncWriter${e}`}Ae($4,"devSyncWriterRoleName");var R4="FjallDevBoundary";function zR(e){return`arn:aws:iam::${e}:policy/${R4}`}Ae(zR,"devBoundaryPolicyArn");function LR(e){return`org:${e}:dev-provisioner`}Ae(LR,"devProvisionerSubject");function UR(e){return`org:${e}:dev-sync`}Ae(UR,"devSyncSubject");function Cb(e,t){return`org:${e}:acct:${t}`}Ae(Cb,"deployAccountSubject");function Nb(e){return`org:${e}:*`}Ae(Nb,"genericMachineSubject");var C4=["discovery","connection","org-setup","dev-substrate-setup"];function FR(e,t){return`org:${e}:${t}`}Ae(FR,"serviceSubject");function N4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountTier:r,accountId:o}=e,a=e.machineTrustMode??"expanded",c={[`${i}:aud`]:Pb},u;if(a==="account-scoped"){if(r===void 0||!gu(r)||o===void 0)throw new Error(`machineTrustMode "account-scoped" requires a governance accountTier and an accountId (got tier: ${String(r)}, accountId ${o===void 0?"absent":"present"}) \u2014 refusing to fall back to the generic machine subject: a silent fallback would re-widen the trust the \xA74.4a Step-3 contract removes`);u=[Cb(t,o)]}else o!==void 0?u=[Nb(t),Cb(t,o)]:u=Nb(t);return[{Sid:"FjallMachineSubject",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:u}}},{Sid:"FjallUserSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:c,StringLike:{[`${i}:sub`]:`org:${t}:user:*`}}},{Sid:"FjallServiceSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:C4.map(l=>FR(t,l))}}}]}Ae(N4,"buildNarrowedDeployTrustStatements");function P4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountId:r}=e;return[{Sid:"FjallDevSubjectsThisAccount",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${i}:aud`]:Pb},StringLike:{[`${i}:sub`]:`org:${t}:dev:${r}:*`}}}]}Ae(P4,"buildDevDeployTrustStatements");function wb(e){let{providerArn:t,issuerDomain:n,sid:i,subject:r}=e;return[{Sid:i,Effect:"Allow",Principal:{Federated:t},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${n}:aud`]:Pb,[`${n}:sub`]:r}}}]}Ae(wb,"buildServiceSubjectTrustStatements");function w4(e){return wb({...e,sid:"FjallDevProvisionerSubject",subject:LR(e.fjallOrgId)})}Ae(w4,"buildDevProvisionerTrustStatements");function k4(e){return wb({...e,sid:"FjallDevSyncSubject",subject:UR(e.fjallOrgId)})}Ae(k4,"buildDevSyncWriterTrustStatements");function O4({accountId:e}){return[{Sid:"FjallDevEcsTaggedMutations",Effect:"Allow",Action:["ecs:UpdateService","ecs:DeleteService","ecs:RunTask","ecs:StopTask"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTaggedCreates",Effect:"Allow",Action:["ecs:RegisterTaskDefinition","ecs:CreateService"],Resource:"*",Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTagOnCreate",Effect:"Allow",Action:["ecs:TagResource"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"ecs:CreateAction":["RegisterTaskDefinition","CreateService","RunTask"]}}},{Sid:"FjallDevEcsReads",Effect:"Allow",Action:["ecs:Describe*","ecs:List*"],Resource:"*"},{Sid:"FjallDevEcsDeregisterTaskDefinition",Effect:"Allow",Action:["ecs:DeregisterTaskDefinition"],Resource:`arn:aws:ecs:*:${e}:task-definition/fjall-dev-*`},{Sid:"FjallDevElbTaggedMutations",Effect:"Allow",Action:["elasticloadbalancing:ModifyRule","elasticloadbalancing:DeleteRule","elasticloadbalancing:ModifyTargetGroup","elasticloadbalancing:ModifyTargetGroupAttributes","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:RegisterTargets","elasticloadbalancing:DeregisterTargets"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTaggedCreates",Effect:"Allow",Action:["elasticloadbalancing:CreateTargetGroup","elasticloadbalancing:CreateRule"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTagOnCreate",Effect:"Allow",Action:["elasticloadbalancing:AddTags"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"elasticloadbalancing:CreateAction":["CreateTargetGroup","CreateRule"]}}},{Sid:"FjallDevElbReads",Effect:"Allow",Action:["elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevSsmDevTree",Effect:"Allow",Action:["ssm:GetParameter*","ssm:PutParameter","ssm:AddTagsToResource"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevLogsMutations",Effect:"Allow",Action:["logs:PutRetentionPolicy","logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsTaggedCreate",Effect:"Allow",Action:["logs:CreateLogGroup","logs:TagResource"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevLogsRead",Effect:"Allow",Action:["logs:GetLogEvents","logs:DescribeLogStreams","logs:FilterLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsDescribeGroups",Effect:"Allow",Action:["logs:DescribeLogGroups"],Resource:"*"},{Sid:"FjallDevKmsViaDevAlias",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevKmsSsmSecureString",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}},{Sid:"FjallDevEcrAuthToken",Effect:"Allow",Action:["ecr:GetAuthorizationToken"],Resource:"*"},{Sid:"FjallDevEcrPushPull",Effect:"Allow",Action:["ecr:PutImage","ecr:InitiateLayerUpload","ecr:UploadLayerPart","ecr:CompleteLayerUpload","ecr:BatchCheckLayerAvailability","ecr:BatchGetImage","ecr:GetDownloadUrlForLayer","ecr:DescribeImages"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevPassDevPathRoles",Effect:"Allow",Action:["iam:PassRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`}]}Ae(O4,"buildDevDeployPolicyStatements");function D4({accountId:e}){return[{Sid:"FjallDevProvisionerBoundedRoleWrites",Effect:"Allow",Action:["iam:CreateRole","iam:PutRolePolicy","iam:AttachRolePolicy"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`,Condition:{StringEquals:{"iam:PermissionsBoundary":zR(e)}}},{Sid:"FjallDevProvisionerPathRoleOps",Effect:"Allow",Action:["iam:DeleteRole","iam:DeleteRolePolicy","iam:DetachRolePolicy","iam:ListRolePolicies","iam:TagRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`},{Sid:"FjallDevProvisionerListRoles",Effect:"Allow",Action:["iam:ListRoles"],Resource:"*"},{Sid:"FjallDevProvisionerDevMasterSecrets",Effect:"Allow",Action:["secretsmanager:GetSecretValue"],Resource:`arn:aws:secretsmanager:*:${e}:secret:fjall-dev-*`},{Sid:"FjallDevProvisionerKmsDecryptViaSecretsManager",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"secretsmanager.*.amazonaws.com"}}},{Sid:"FjallDevProvisionerDataApi",Effect:"Allow",Action:["rds-data:ExecuteStatement","rds-data:BatchExecuteStatement","rds-data:BeginTransaction","rds-data:CommitTransaction","rds-data:RollbackTransaction"],Resource:`arn:aws:rds:*:${e}:cluster:fjall-dev-*`},{Sid:"FjallDevProvisionerMetrics",Effect:"Allow",Action:["cloudwatch:GetMetricData"],Resource:"*"},{Sid:"FjallDevProvisionerOrphanDiscovery",Effect:"Allow",Action:["tag:GetResources"],Resource:"*"},{Sid:"FjallDevProvisionerSsmTeardown",Effect:"Allow",Action:["ssm:DeleteParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevProvisionerLogsTeardown",Effect:"Allow",Action:["logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevProvisionerTaggedTeardown",Effect:"Allow",Action:["ecs:UpdateService","ecs:StopTask","ecs:DeleteService","elasticloadbalancing:DeleteRule","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:DeregisterTargets"],Resource:[`arn:aws:ecs:*:${e}:*`,`arn:aws:elasticloadbalancing:*:${e}:*`],Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevProvisionerTeardownReads",Effect:"Allow",Action:["ecs:Describe*","elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevProvisionerImageJanitor",Effect:"Allow",Action:["ecr:ListImages","ecr:DescribeImages","ecr:BatchDeleteImage"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevProvisionerSsmReadAll",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/*`},{Sid:"FjallDevProvisionerKmsDecryptViaSsm",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}}]}Ae(D4,"buildDevProvisionerPolicyStatements");function M4({accountId:e}){return[{Sid:"FjallDevSyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}}]}Ae(M4,"buildDevSyncWriterPolicyStatements");function j4({accountId:e}){return[{Sid:"FjallDevBoundarySsmDevRead",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevBoundaryKmsDecryptDevAlias",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevBoundarySyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}},{Sid:"FjallDevBoundarySlotLogs",Effect:"Allow",Action:["logs:CreateLogStream","logs:PutLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevBoundarySyncQueue",Effect:"Allow",Action:["sqs:ReceiveMessage","sqs:DeleteMessage","sqs:GetQueueUrl"],Resource:`arn:aws:sqs:*:${e}:fjall-dev-sync-${e}-*`}]}Ae(j4,"buildDevBoundaryStatements");var z4=Object.defineProperty,Je=(e,t)=>z4(e,"name",{value:t,configurable:!0});function R(e){return JSON.stringify(e)}Je(R,"escapeStringLiteral");function xn(e){return e.map(R).join(", ")}Je(xn,"formatStringArray");var L4="import:SharedAlarmTopicArn";function An(e=" "){return`
202
+ ${e}...(getConfig().environment === "production" ? { alertsTopic: ${R(L4)} } : {}),`}Je(An,"emitProductionAlertsTopicSpread");function In(e){return e===0?"":`_${String(e+1)}`}Je(In,"connectionEnvSuffix");function U4(e,t){if(e===t)return 1;if(!e.startsWith(`${t}_`))return;let n=e.slice(t.length+1);return/^\d+$/.test(n)?parseInt(n,10):void 0}Je(U4,"connectionKeyOrdinal");function kb(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.__identifier=="string"||typeof t.__expression=="string"||typeof t.__call=="string"}Je(kb,"isSpecialValue");function cr(e){return e.replace(/[^a-zA-Z0-9]/g," ").split(" ").map((t,n)=>n===0?t.charAt(0).toLowerCase()+t.slice(1):t.charAt(0).toUpperCase()+t.slice(1)).join("")}Je(cr,"toVariableName");function se(e){return e.variableName??cr(e.name)}Je(se,"getVariableName");function ka(e,t){for(let n of e.database)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.s3)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.compute)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.dynamodb??[])if(n.name===t&&n.variableName)return n.variableName;for(let n of e.sqs??[])if(n.name===t&&n.variableName)return n.variableName;return cr(t)}Je(ka,"resolveResourceVariable");function BR(e){let t=Object.entries(e);return t.length===0?!0:t.length>1?!1:t.every(([,n])=>typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===null)}Je(BR,"isSimpleObject");function W(e,t=" "){if(e==null)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(kb(e)){if("__identifier"in e)return e.__identifier;if("__expression"in e)return e.__expression;if("__call"in e)return e.__call}if(Array.isArray(e))return`[${e.map(n=>W(n,t)).join(", ")}]`;if(typeof e=="object"){let n=Object.entries(e).filter(([,o])=>o!==void 0);if(BR(e)){let o=n.map(([a,c])=>`${a}: ${W(c,t)}`).join(", ");return o?`{ ${o} }`:"{}"}let i=t+" ",r=n.map(([o,a])=>`${i}${o}: ${W(a,i)}`).join(`,
203
203
  `);return r?`{
204
204
  ${r}
205
- ${t}}`:"{}"}return JSON.stringify(e)}Xe(W,"formatValue");function kb(e,t=" "){return e.map(n=>{let i=n.value.kind==="expression"?n.value.source:W(n.value.value,t);return`
206
- ${t}${n.key}: ${i}`}).join(",")}Xe(kb,"emitProjectedProps");function O(e,t,n,i="raw"){if(!e)return"";let r;switch(i){case"string":r=R(String(n));break;case"object":r=W(n);break;case"boolean-or-object":r=n===!1?"false":W(n);break;default:r=String(n)}return`
207
- ${t}: ${r},`}Xe(O,"buildProperty");function be(e,t=" "){return e?.length?e.map(n=>`
208
- ${t}${n.key}: ${n.sourceText},`).join(""):""}Xe(be,"emitExtraProperties");var U4=Object.defineProperty,Be=(e,t)=>U4(e,"name",{value:t,configurable:!0}),pe=Object.freeze({HOST:"DATABASE_HOST",PORT:"DATABASE_PORT",NAME:"DATABASE_NAME",SSL:"DATABASE_SSL",USERNAME:"DATABASE_USERNAME",PASSWORD:"DATABASE_PASSWORD"}),Da=Object.freeze({USERNAME:"username",PASSWORD:"password"}),bl="true",Lr=Object.freeze({HOST:"getHostEndpoint",PORT:"getHostPort",NAME:"getDatabaseName",CREDENTIALS:"getCredentials",IMPORT:"getImport"});function Tn(e,t){let n=t.connectedDatabase;return n?.length?e.database.filter(i=>n.includes(i.name)):[]}Be(Tn,"getConnectedDatabases");function Ma(e,t){return`${e}.${Lr.CREDENTIALS}().${Lr.IMPORT}(${R(t)})`}Be(Ma,"getCredentialExpression");function ja(e){let t=[],n=Be((i,r,o)=>{t.push({key:i,expression:r,isSecret:o})},"addEntry");if(e.length===1){let i=se(e[0]);n(pe.HOST,`${i}.${Lr.HOST}()`,!1),n(pe.PORT,`${i}.${Lr.PORT}()`,!1),n(pe.NAME,`${i}.${Lr.NAME}()`,!1),n(pe.SSL,R(bl),!1),n(pe.USERNAME,Ma(i,Da.USERNAME),!0),n(pe.PASSWORD,Ma(i,Da.PASSWORD),!0)}else for(let[i,r]of e.entries()){let o=se(r),a=In(i);n(`${pe.HOST}${a}`,`${o}.${Lr.HOST}()`,!1),n(`${pe.PORT}${a}`,`${o}.${Lr.PORT}()`,!1),n(`${pe.NAME}${a}`,`${o}.${Lr.NAME}()`,!1),n(`${pe.SSL}${a}`,R(bl),!1),n(`${pe.USERNAME}${a}`,Ma(o,Da.USERNAME),!0),n(`${pe.PASSWORD}${a}`,Ma(o,Da.PASSWORD),!0)}return t}Be(ja,"generateDatabaseEnvVarEntries");function BR(e){return`connections: [${e.map(t=>se(t)).join(", ")}],`}Be(BR,"formatConnectionsCode");function yl(e){return e.expression===R(bl)?bl:{__expression:e.expression}}Be(yl,"toDatabaseEnvVarValue");function Sl(e,t){let n={},i={};if(!t.needsConnection||!t.connectedDatabase?.length)return{env:n,secrets:i};let r=Tn(e,t),o=ja(r);for(let a of o){let c=yl(a);a.isSecret?i[a.key]={__expression:a.expression}:n[a.key]=c}return{env:n,secrets:i}}Be(Sl,"buildDatabaseEnvVars");function VR(e){let t="";return t+=O(e.port!==void 0,"port",e.port),t+=O(e.deletionProtection!==void 0,"deletionProtection",e.deletionProtection),t+=O(e.snapshotIdentifier!==void 0,"snapshotIdentifier",e.snapshotIdentifier,"string"),t+=O(e.snapshotUsername!==void 0,"snapshotUsername",e.snapshotUsername,"string"),t+=O(e.monitoringInterval!==void 0,"monitoringInterval",e.monitoringInterval),t}Be(VR,"generateDatabaseSharedProps");function GR(e){if(e.type!=="Instance")return"";let t="";return t+=O(e.instanceType!==void 0,"instanceType",e.instanceType,"string"),t+=O(e.allocatedStorage!==void 0,"allocatedStorage",e.allocatedStorage),t+=O(e.multiAz!==void 0,"multiAz",e.multiAz),t+=O(e.publiclyAccessible!==void 0,"publiclyAccessible",e.publiclyAccessible),t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.readReplica!==void 0,"readReplica",e.readReplica,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t}Be(GR,"generateDatabaseInstanceProps");function ZR(e){if(e.type!=="Aurora"&&e.type!=="GlobalAurora")return"";let t="";return t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.writer!==void 0,"writer",e.writer,"object"),t+=O(e.readers!==void 0,"readers",e.readers,"boolean-or-object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t+=O(e.preferredMaintenanceWindow!==void 0,"preferredMaintenanceWindow",e.preferredMaintenanceWindow,"string"),t}Be(ZR,"generateDatabaseAuroraProps");function WR(e){if(e.type!=="GlobalAurora")return"";let t="";return t+=O(e.primaryRegion!==void 0,"primaryRegion",e.primaryRegion,"string"),e.secondaryRegions!==void 0&&e.secondaryRegions.length>0&&(t+=`
209
- secondaryRegions: [${xn(e.secondaryRegions)}],`),t+=O(e.globalClusterIdentifier!==void 0,"globalClusterIdentifier",e.globalClusterIdentifier,"string"),t+=O(e.enableGlobalWriteForwarding!==void 0,"enableGlobalWriteForwarding",e.enableGlobalWriteForwarding),t}Be(WR,"generateDatabaseGlobalAuroraProps");function Ob(e,t){return t.compute.some(n=>n.needsConnection&&n.connectedDatabase?.includes(e.name))}Be(Ob,"databaseNeedsVariable");function _l(e){if(e.database.length===0)return"";let t="";for(let n=0;n<e.database.length;n++){let i=e.database[n],r=se(i),o=Ob(i,e),a=n>0,c=o?`const ${r} = `:"";t+=`${a?`
205
+ ${t}}`:"{}"}return JSON.stringify(e)}Je(W,"formatValue");function Ob(e,t=" "){return e.map(n=>{let i=n.value.kind==="expression"?n.value.source:W(n.value.value,t);return`
206
+ ${t}${n.key}: ${i}`}).join(",")}Je(Ob,"emitProjectedProps");function O(e,t,n,i="raw"){if(!e)return"";let r;switch(i){case"string":r=R(String(n));break;case"object":r=W(n);break;case"boolean-or-object":r=n===!1?"false":W(n);break;default:r=String(n)}return`
207
+ ${t}: ${r},`}Je(O,"buildProperty");function be(e,t=" "){return e?.length?e.map(n=>`
208
+ ${t}${n.key}: ${n.sourceText},`).join(""):""}Je(be,"emitExtraProperties");var F4=Object.defineProperty,Ve=(e,t)=>F4(e,"name",{value:t,configurable:!0}),pe=Object.freeze({HOST:"DATABASE_HOST",PORT:"DATABASE_PORT",NAME:"DATABASE_NAME",SSL:"DATABASE_SSL",USERNAME:"DATABASE_USERNAME",PASSWORD:"DATABASE_PASSWORD"}),Oa=Object.freeze({USERNAME:"username",PASSWORD:"password"}),bl="true",Lr=Object.freeze({HOST:"getHostEndpoint",PORT:"getHostPort",NAME:"getDatabaseName",CREDENTIALS:"getCredentials",IMPORT:"getImport"});function Tn(e,t){let n=t.connectedDatabase;return n?.length?e.database.filter(i=>n.includes(i.name)):[]}Ve(Tn,"getConnectedDatabases");function Da(e,t){return`${e}.${Lr.CREDENTIALS}().${Lr.IMPORT}(${R(t)})`}Ve(Da,"getCredentialExpression");function Ma(e){let t=[],n=Ve((i,r,o)=>{t.push({key:i,expression:r,isSecret:o})},"addEntry");if(e.length===1){let i=se(e[0]);n(pe.HOST,`${i}.${Lr.HOST}()`,!1),n(pe.PORT,`${i}.${Lr.PORT}()`,!1),n(pe.NAME,`${i}.${Lr.NAME}()`,!1),n(pe.SSL,R(bl),!1),n(pe.USERNAME,Da(i,Oa.USERNAME),!0),n(pe.PASSWORD,Da(i,Oa.PASSWORD),!0)}else for(let[i,r]of e.entries()){let o=se(r),a=In(i);n(`${pe.HOST}${a}`,`${o}.${Lr.HOST}()`,!1),n(`${pe.PORT}${a}`,`${o}.${Lr.PORT}()`,!1),n(`${pe.NAME}${a}`,`${o}.${Lr.NAME}()`,!1),n(`${pe.SSL}${a}`,R(bl),!1),n(`${pe.USERNAME}${a}`,Da(o,Oa.USERNAME),!0),n(`${pe.PASSWORD}${a}`,Da(o,Oa.PASSWORD),!0)}return t}Ve(Ma,"generateDatabaseEnvVarEntries");function VR(e){return`connections: [${e.map(t=>se(t)).join(", ")}],`}Ve(VR,"formatConnectionsCode");function yl(e){return e.expression===R(bl)?bl:{__expression:e.expression}}Ve(yl,"toDatabaseEnvVarValue");function Sl(e,t){let n={},i={};if(!t.needsConnection||!t.connectedDatabase?.length)return{env:n,secrets:i};let r=Tn(e,t),o=Ma(r);for(let a of o){let c=yl(a);a.isSecret?i[a.key]={__expression:a.expression}:n[a.key]=c}return{env:n,secrets:i}}Ve(Sl,"buildDatabaseEnvVars");function GR(e){let t="";return t+=O(e.port!==void 0,"port",e.port),t+=O(e.deletionProtection!==void 0,"deletionProtection",e.deletionProtection),t+=O(e.snapshotIdentifier!==void 0,"snapshotIdentifier",e.snapshotIdentifier,"string"),t+=O(e.snapshotUsername!==void 0,"snapshotUsername",e.snapshotUsername,"string"),t+=O(e.monitoringInterval!==void 0,"monitoringInterval",e.monitoringInterval),t}Ve(GR,"generateDatabaseSharedProps");function ZR(e){if(e.type!=="Instance")return"";let t="";return t+=O(e.instanceType!==void 0,"instanceType",e.instanceType,"string"),t+=O(e.allocatedStorage!==void 0,"allocatedStorage",e.allocatedStorage),t+=O(e.multiAz!==void 0,"multiAz",e.multiAz),t+=O(e.publiclyAccessible!==void 0,"publiclyAccessible",e.publiclyAccessible),t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.readReplica!==void 0,"readReplica",e.readReplica,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t}Ve(ZR,"generateDatabaseInstanceProps");function WR(e){if(e.type!=="Aurora"&&e.type!=="GlobalAurora")return"";let t="";return t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.writer!==void 0,"writer",e.writer,"object"),t+=O(e.readers!==void 0,"readers",e.readers,"boolean-or-object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t+=O(e.preferredMaintenanceWindow!==void 0,"preferredMaintenanceWindow",e.preferredMaintenanceWindow,"string"),t}Ve(WR,"generateDatabaseAuroraProps");function HR(e){if(e.type!=="GlobalAurora")return"";let t="";return t+=O(e.primaryRegion!==void 0,"primaryRegion",e.primaryRegion,"string"),e.secondaryRegions!==void 0&&e.secondaryRegions.length>0&&(t+=`
209
+ secondaryRegions: [${xn(e.secondaryRegions)}],`),t+=O(e.globalClusterIdentifier!==void 0,"globalClusterIdentifier",e.globalClusterIdentifier,"string"),t+=O(e.enableGlobalWriteForwarding!==void 0,"enableGlobalWriteForwarding",e.enableGlobalWriteForwarding),t}Ve(HR,"generateDatabaseGlobalAuroraProps");function Db(e,t){return t.compute.some(n=>n.needsConnection&&n.connectedDatabase?.includes(e.name))}Ve(Db,"databaseNeedsVariable");function _l(e){if(e.database.length===0)return"";let t="";for(let n=0;n<e.database.length;n++){let i=e.database[n],r=se(i),o=Db(i,e),a=n>0,c=o?`const ${r} = `:"";t+=`${a?`
210
210
  `:""}${c}app.addDatabase(
211
211
  DatabaseFactory.build(${R(i.name)}, {
212
212
  vpc: app.getVpc(),
213
213
  type: ${R(i.type)},
214
214
  databaseName: ${R(i.databaseName)},`,i.engineExpression?t+=`
215
215
  engine: ${i.engineExpression},`:i.databaseEngine&&(t+=`
216
- databaseEngine: ${R(i.databaseEngine)},`),t+=VR(i),t+=GR(i),t+=ZR(i),t+=WR(i),t+=be(i.extraProperties),i.alarms===!1?t+=`
216
+ databaseEngine: ${R(i.databaseEngine)},`),t+=GR(i),t+=ZR(i),t+=WR(i),t+=HR(i),t+=be(i.extraProperties),i.alarms===!1?t+=`
217
217
  alarms: false,`:typeof i.alarms=="object"&&(t+=`
218
218
  alarms: ${W(i.alarms," ")},`),i.type!=="GlobalAurora"&&(t+=An()),t+=`
219
219
  })
220
220
  );
221
- `}return t}Be(_l,"generateDatabaseCode");function El(e){if(!e.clickhouse||e.clickhouse.length===0)return"";let t="";for(let n=0;n<e.clickhouse.length;n++){let i=e.clickhouse[n],r=se(i),o=HR(i,e),a=n>0?`
221
+ `}return t}Ve(_l,"generateDatabaseCode");function El(e){if(!e.clickhouse||e.clickhouse.length===0)return"";let t="";for(let n=0;n<e.clickhouse.length;n++){let i=e.clickhouse[n],r=se(i),o=YR(i,e),a=n>0?`
222
222
  `:"",c=o?`const ${r} = `:"";t+=`${a}${c}app.addDatabase(
223
223
  DatabaseFactory.build(${R(i.name)}, {
224
224
  type: "ClickHouse",
@@ -230,95 +230,95 @@ ${t}${n.key}: ${n.sourceText},`).join(""):""}Xe(be,"emitExtraProperties");var U4
230
230
  backupRetentionDays: ${i.backupRetentionDays},`),t+=be(i.extraProperties),t+=`
231
231
  })
232
232
  );
233
- `}return t}Be(El,"generateClickHouseCode");function HR(e,t){return t.compute.some(n=>n.connectedDatabase?.includes(e.name))}Be(HR,"clickhouseNeedsVariable");var F4=Object.defineProperty,xl=(e,t)=>F4(e,"name",{value:t,configurable:!0}),za=Object.freeze({NAME:"BUCKET_NAME"}),YR=Object.freeze({BUCKET_NAME:"getBucketName"});function $n(e,t){let{connectedStorage:n}=t;return n?.length?e.s3.filter(i=>n.includes(i.name)):[]}xl($n,"getConnectedStorage");function La(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=se(n);t.push({key:za.NAME,expression:`${i}.${YR.BUCKET_NAME}()`})}else for(let[n,i]of e.entries()){let r=se(i),o=In(n);t.push({key:`${za.NAME}${o}`,expression:`${r}.${YR.BUCKET_NAME}()`})}return t}xl(La,"generateStorageEnvVarEntries");function Al(e,t){let n={},i={};if(!t.connectedStorage?.length)return{env:n,secrets:i};let r=$n(e,t),o=La(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}xl(Al,"buildStorageEnvVars");function Hi(e,t,n=[]){let i=e.map(a=>se(a)),r=t.map(a=>se(a)),o=n.map(a=>se(a));return`connections: [${[...i,...r,...o].join(", ")}],`}xl(Hi,"formatAllConnectionsCode");var B4=Object.defineProperty,Db=(e,t)=>B4(e,"name",{value:t,configurable:!0}),Ur=Object.freeze({URL:"QUEUE_URL",ARN:"QUEUE_ARN"});function Rn(e,t){let{connectedMessaging:n}=t;return n?.length?(e.sqs??[]).filter(i=>n.includes(i.name)):[]}Db(Rn,"getConnectedMessaging");function Ua(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=se(n);t.push({key:Ur.URL,expression:`${i}.getQueueUrl()`}),t.push({key:Ur.ARN,expression:`${i}.getQueueArn()`})}else for(let[n,i]of e.entries()){let r=se(i),o=In(n);t.push({key:`${Ur.URL}${o}`,expression:`${r}.getQueueUrl()`}),t.push({key:`${Ur.ARN}${o}`,expression:`${r}.getQueueArn()`})}return t}Db(Ua,"generateMessagingEnvVarEntries");function Il(e,t){let n={},i={};if(!t.connectedMessaging?.length)return{env:n,secrets:i};let r=Rn(e,t),o=Ua(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}Db(Il,"buildMessagingEnvVars");var V4=Object.defineProperty,Yi=(e,t)=>V4(e,"name",{value:t,configurable:!0});function Cn(e){return!!(e.needsConnection&&e.connectedDatabase?.length)}Yi(Cn,"computeHasDatabaseConnections");function Nn(e){return!!e.connectedStorage?.length}Yi(Nn,"computeHasStorageConnections");function Pn(e){return!!e.connectedMessaging?.length}Yi(Pn,"computeHasMessagingConnections");function Fa(e){return Cn(e)||Nn(e)||Pn(e)}Yi(Fa,"computeHasConnections");var Ba={ENVIRONMENT:{__expression:"getConfig().environment"}};function Ki(e,t){return Object.entries(e).map(([n,i])=>`${t}${n}: ${W(i)},`).join(`
234
- `)}Yi(Ki,"formatEnvBlock");function qi(e,t,n){return e.length<=1?`{ ${e[0]??""} }`:`{${e.map(i=>`
233
+ `}return t}Ve(El,"generateClickHouseCode");function YR(e,t){return t.compute.some(n=>n.connectedDatabase?.includes(e.name))}Ve(YR,"clickhouseNeedsVariable");var B4=Object.defineProperty,xl=(e,t)=>B4(e,"name",{value:t,configurable:!0}),ja=Object.freeze({NAME:"BUCKET_NAME"}),KR=Object.freeze({BUCKET_NAME:"getBucketName"});function $n(e,t){let{connectedStorage:n}=t;return n?.length?e.s3.filter(i=>n.includes(i.name)):[]}xl($n,"getConnectedStorage");function za(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=se(n);t.push({key:ja.NAME,expression:`${i}.${KR.BUCKET_NAME}()`})}else for(let[n,i]of e.entries()){let r=se(i),o=In(n);t.push({key:`${ja.NAME}${o}`,expression:`${r}.${KR.BUCKET_NAME}()`})}return t}xl(za,"generateStorageEnvVarEntries");function Al(e,t){let n={},i={};if(!t.connectedStorage?.length)return{env:n,secrets:i};let r=$n(e,t),o=za(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}xl(Al,"buildStorageEnvVars");function Wi(e,t,n=[]){let i=e.map(a=>se(a)),r=t.map(a=>se(a)),o=n.map(a=>se(a));return`connections: [${[...i,...r,...o].join(", ")}],`}xl(Wi,"formatAllConnectionsCode");var V4=Object.defineProperty,Mb=(e,t)=>V4(e,"name",{value:t,configurable:!0}),Ur=Object.freeze({URL:"QUEUE_URL",ARN:"QUEUE_ARN"});function Rn(e,t){let{connectedMessaging:n}=t;return n?.length?(e.sqs??[]).filter(i=>n.includes(i.name)):[]}Mb(Rn,"getConnectedMessaging");function La(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=se(n);t.push({key:Ur.URL,expression:`${i}.getQueueUrl()`}),t.push({key:Ur.ARN,expression:`${i}.getQueueArn()`})}else for(let[n,i]of e.entries()){let r=se(i),o=In(n);t.push({key:`${Ur.URL}${o}`,expression:`${r}.getQueueUrl()`}),t.push({key:`${Ur.ARN}${o}`,expression:`${r}.getQueueArn()`})}return t}Mb(La,"generateMessagingEnvVarEntries");function Il(e,t){let n={},i={};if(!t.connectedMessaging?.length)return{env:n,secrets:i};let r=Rn(e,t),o=La(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}Mb(Il,"buildMessagingEnvVars");var G4=Object.defineProperty,Hi=(e,t)=>G4(e,"name",{value:t,configurable:!0});function Cn(e){return!!(e.needsConnection&&e.connectedDatabase?.length)}Hi(Cn,"computeHasDatabaseConnections");function Nn(e){return!!e.connectedStorage?.length}Hi(Nn,"computeHasStorageConnections");function Pn(e){return!!e.connectedMessaging?.length}Hi(Pn,"computeHasMessagingConnections");function Ua(e){return Cn(e)||Nn(e)||Pn(e)}Hi(Ua,"computeHasConnections");var Fa={ENVIRONMENT:{__expression:"getConfig().environment"}};function Yi(e,t){return Object.entries(e).map(([n,i])=>`${t}${n}: ${W(i)},`).join(`
234
+ `)}Hi(Yi,"formatEnvBlock");function Ki(e,t,n){return e.length<=1?`{ ${e[0]??""} }`:`{${e.map(i=>`
235
235
  ${n}${i},`).join("")}
236
- ${t}}`}Yi(qi,"formatCompactOrExpandedObject");var G4=Object.defineProperty,KR=(e,t)=>G4(e,"name",{value:t,configurable:!0});function Va(e){let t="";if(e.deployment===xa.CODE&&e.codePath?(t+=`
237
- deployment: "${xa.CODE}",
236
+ ${t}}`}Hi(Ki,"formatCompactOrExpandedObject");var Z4=Object.defineProperty,qR=(e,t)=>Z4(e,"name",{value:t,configurable:!0});function Ba(e){let t="";if(e.deployment===Ea.CODE&&e.codePath?(t+=`
237
+ deployment: "${Ea.CODE}",
238
238
  code: Code.fromAsset(${R(e.codePath)}),`,e.handler&&(t+=`
239
239
  handler: ${R(e.handler)},`),e.runtime&&(t+=`
240
240
  runtime: Runtime.${e.runtime},`)):t+=`
241
- deployment: "${xa.CONTAINER}",
241
+ deployment: "${Ea.CONTAINER}",
242
242
  ecrRepository: app.getDefaultContainerRegistry(),`,e.timeout!==void 0&&(t+=`
243
243
  timeout: ${e.timeout},`),e.memory!==void 0&&(t+=`
244
244
  memorySize: ${e.memory},`),e.functionUrl&&(t+=`
245
245
  functionUrl: { authType: FunctionUrlAuthType.${e.functionUrl.authType} },`),e.description&&(t+=`
246
- lambdaDescription: ${R(e.description)},`),e.architecture||e.deployment===xa.CONTAINER){let n=e.architecture??x$;t+=`
246
+ lambdaDescription: ${R(e.description)},`),e.architecture||e.deployment===Ea.CONTAINER){let n=e.architecture??A$;t+=`
247
247
  architecture: Architecture.${n},`}if(e.ephemeralStorageSize!==void 0&&(t+=`
248
248
  ephemeralStorageSize: ${e.ephemeralStorageSize},`),e.functionName&&(t+=`
249
249
  functionName: ${R(e.functionName)},`),e.ssmSecretsPath&&(t+=`
250
250
  ssmSecretsPath: ${R(e.ssmSecretsPath)},`),e.ssmSecrets&&e.ssmSecrets.length>0&&(t+=`
251
- secrets: [${xn(e.ssmSecrets)}],`),!Fa(e)){let n={...Ba,...e.environment};t+=`
251
+ secrets: [${xn(e.ssmSecrets)}],`),!Ua(e)){let n={...Fa,...e.environment};t+=`
252
252
  environment: {
253
- ${Ki(n," ")}
254
- },`}return t+=be(e.extraProperties),t}KR(Va,"generateLambdaCode");function Ga(e,t){let n=Cn(e),i=Nn(e),r=Pn(e);if(!n&&!i&&!r)return"";let o=n?Tn(t,e):[],a=i?$n(t,e):[],c=r?Rn(t,e):[];if(o.length===0&&a.length===0&&c.length===0)return"";let u={...Ba},l={};if(o.length>0){let p=ja(o);for(let g of p){let v=yl(g);g.isSecret?l[g.key]={__expression:g.expression}:u[g.key]=v}}if(a.length>0){let p=La(a);for(let g of p)u[g.key]={__expression:g.expression}}if(c.length>0){let p=Ua(c);for(let g of p)u[g.key]={__expression:g.expression}}if(e.environment)for(let[p,g]of Object.entries(e.environment))u[p]=g;let d="";if(Object.keys(l).length>0){d+=`
253
+ ${Yi(n," ")}
254
+ },`}return t+=be(e.extraProperties),t}qR(Ba,"generateLambdaCode");function Va(e,t){let n=Cn(e),i=Nn(e),r=Pn(e);if(!n&&!i&&!r)return"";let o=n?Tn(t,e):[],a=i?$n(t,e):[],c=r?Rn(t,e):[];if(o.length===0&&a.length===0&&c.length===0)return"";let u={...Fa},l={};if(o.length>0){let p=Ma(o);for(let g of p){let v=yl(g);g.isSecret?l[g.key]={__expression:g.expression}:u[g.key]=v}}if(a.length>0){let p=za(a);for(let g of p)u[g.key]={__expression:g.expression}}if(c.length>0){let p=La(c);for(let g of p)u[g.key]={__expression:g.expression}}if(e.environment)for(let[p,g]of Object.entries(e.environment))u[p]=g;let d="";if(Object.keys(l).length>0){d+=`
255
255
  containerSecretsImport: {`;for(let[p,g]of Object.entries(l))d+=`
256
256
  ${p}: ${W(g)},`;d+=`
257
257
  },`}if(Object.keys(u).length>0){d+=`
258
258
  environment: {`;for(let[p,g]of Object.entries(u))d+=`
259
259
  ${p}: ${W(g)},`;d+=`
260
260
  },`}return d+=`
261
- ${Hi(o,a,c)}`,d}KR(Ga,"generateLambdaConnectionsCode");var Z4=Object.defineProperty,W4=(e,t)=>Z4(e,"name",{value:t,configurable:!0});function Za(e){let t="";return e.instanceType&&(t+=`
261
+ ${Wi(o,a,c)}`,d}qR(Va,"generateLambdaConnectionsCode");var W4=Object.defineProperty,H4=(e,t)=>W4(e,"name",{value:t,configurable:!0});function Ga(e){let t="";return e.instanceType&&(t+=`
262
262
  instanceType: ${R(e.instanceType)},`),e.enableSSH!==void 0&&(t+=e.enableSSH?`
263
263
  ssh: {},`:`
264
- ssh: false,`),t+=be(e.extraProperties),t}W4(Za,"generateEc2Code");var H4=Object.defineProperty,Bt=(e,t)=>H4(e,"name",{value:t,configurable:!0});function qR(e){let t=[];if(e.instanceType!==void 0&&t.push(`instanceType: ${R(e.instanceType)}`),e.amiHardwareType!==void 0&&t.push(`amiHardwareType: ${R(e.amiHardwareType)}`),e.minCapacity!==void 0&&t.push(`minCapacity: ${e.minCapacity}`),e.maxCapacity!==void 0&&t.push(`maxCapacity: ${e.maxCapacity}`),e.memoryLimitMiB!==void 0&&t.push(`memoryLimitMiB: ${e.memoryLimitMiB}`),e.warmPool!==void 0&&t.push(`warmPool: ${W(e.warmPool," ")}`),e.extraProperties?.length)for(let n of e.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
265
- ec2Config: ${qi(t," "," ")},`}Bt(qR,"generateEcsServiceEc2ConfigCode");function XR(e){if(!e.cluster)return"";let t=[];if(e.cluster.directAccess&&t.push("directAccess: true"),e.cluster.domain&&t.push(`domain: ${R(e.cluster.domain)}`),e.cluster.loadBalancer!==void 0&&t.push(e.cluster.loadBalancer===!1?"loadBalancer: false":`loadBalancer: ${R(e.cluster.loadBalancer)}`),e.cluster.extraProperties?.length)for(let n of e.cluster.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
266
- cluster: ${qi(t," "," ")},`}Bt(XR,"generateEcsClusterCode");function JR(e,t,n,i,r,o){let a="";e.name&&(a+=`
264
+ ssh: false,`),t+=be(e.extraProperties),t}H4(Ga,"generateEc2Code");var Y4=Object.defineProperty,Bt=(e,t)=>Y4(e,"name",{value:t,configurable:!0});function XR(e){let t=[];if(e.instanceType!==void 0&&t.push(`instanceType: ${R(e.instanceType)}`),e.amiHardwareType!==void 0&&t.push(`amiHardwareType: ${R(e.amiHardwareType)}`),e.minCapacity!==void 0&&t.push(`minCapacity: ${e.minCapacity}`),e.maxCapacity!==void 0&&t.push(`maxCapacity: ${e.maxCapacity}`),e.memoryLimitMiB!==void 0&&t.push(`memoryLimitMiB: ${e.memoryLimitMiB}`),e.warmPool!==void 0&&t.push(`warmPool: ${W(e.warmPool," ")}`),e.extraProperties?.length)for(let n of e.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
265
+ ec2Config: ${Ki(t," "," ")},`}Bt(XR,"generateEcsServiceEc2ConfigCode");function JR(e){if(!e.cluster)return"";let t=[];if(e.cluster.directAccess&&t.push("directAccess: true"),e.cluster.domain&&t.push(`domain: ${R(e.cluster.domain)}`),e.cluster.loadBalancer!==void 0&&t.push(e.cluster.loadBalancer===!1?"loadBalancer: false":`loadBalancer: ${R(e.cluster.loadBalancer)}`),e.cluster.extraProperties?.length)for(let n of e.cluster.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
266
+ cluster: ${Ki(t," "," ")},`}Bt(JR,"generateEcsClusterCode");function QR(e,t,n,i,r,o){let a="";e.name&&(a+=`
267
267
  name: ${R(e.name)},`),e.image&&(a+=`
268
268
  image: ${R(e.image)},`),e.port!==void 0&&(a+=`
269
269
  port: ${e.port},`),e.essential!==void 0&&(a+=`
270
270
  essential: ${e.essential},`),e.command?.length&&(a+=`
271
271
  command: ${JSON.stringify(e.command)},`),e.entryPoint?.length&&(a+=`
272
- entryPoint: ${JSON.stringify(e.entryPoint)},`);let c=[pe.HOST,pe.PORT,pe.NAME,pe.SSL,pe.USERNAME,pe.PASSWORD,za.NAME,Ur.URL,Ur.ARN],u=Bt(p=>{if(!p)return p;let g={};for(let[v,x]of Object.entries(p))c.some(G=>v===G||v.startsWith(`${G}_`))||(g[v]=x);return Object.keys(g).length>0?g:void 0},"stripConnectionEnv"),l=t?{...o,...n.env,...i.env,...r.env,...e.environment}:{...o,...u(e.environment)},d=t?{...n.secrets,...e.secretsImport}:u(e.secretsImport);return l&&Object.keys(l).length>0&&(a+=`
272
+ entryPoint: ${JSON.stringify(e.entryPoint)},`);let c=[pe.HOST,pe.PORT,pe.NAME,pe.SSL,pe.USERNAME,pe.PASSWORD,ja.NAME,Ur.URL,Ur.ARN],u=Bt(p=>{if(!p)return p;let g={};for(let[v,x]of Object.entries(p))c.some(G=>v===G||v.startsWith(`${G}_`))||(g[v]=x);return Object.keys(g).length>0?g:void 0},"stripConnectionEnv"),l=t?{...o,...n.env,...i.env,...r.env,...e.environment}:{...o,...u(e.environment)},d=t?{...n.secrets,...e.secretsImport}:u(e.secretsImport);return l&&Object.keys(l).length>0&&(a+=`
273
273
  environment: {
274
- ${Ki(l," ")}
274
+ ${Yi(l," ")}
275
275
  },`),d&&Object.keys(d).length>0&&(a+=`
276
276
  secretsImport: {
277
- ${Ki(d," ")}
277
+ ${Yi(d," ")}
278
278
  },`),e.ssmSecrets&&e.ssmSecrets.length>0&&(a+=`
279
279
  secrets: [${xn(e.ssmSecrets)}],`),e.healthCheck&&(a+=`
280
- healthCheck: ${W(e.healthCheck," ")},`),a+=be(e.extraProperties," "),a}Bt(JR,"generateEcsContainerCode");function Mb(e,t){let n=[];return e.path&&n.push(`path: ${R(e.path)}`),e.host&&n.push(`host: ${R(e.host)}`),e.priority!==void 0&&n.push(`priority: ${e.priority}`),e.healthCheckPath&&n.push(`healthCheckPath: ${R(e.healthCheckPath)}`),qi(n,t,`${t} `)}Bt(Mb,"formatRoutingRule");function QR(e){let t=Array.isArray(e)?e:[e];return t.length===1?`
281
- routing: ${Mb(t[0]," ")},`:`
280
+ healthCheck: ${W(e.healthCheck," ")},`),a+=be(e.extraProperties," "),a}Bt(QR,"generateEcsContainerCode");function jb(e,t){let n=[];return e.path&&n.push(`path: ${R(e.path)}`),e.host&&n.push(`host: ${R(e.host)}`),e.priority!==void 0&&n.push(`priority: ${e.priority}`),e.healthCheckPath&&n.push(`healthCheckPath: ${R(e.healthCheckPath)}`),Ki(n,t,`${t} `)}Bt(jb,"formatRoutingRule");function e0(e){let t=Array.isArray(e)?e:[e];return t.length===1?`
281
+ routing: ${jb(t[0]," ")},`:`
282
282
  routing: [
283
- ${t.map(n=>Mb(n," ")).join(`,
283
+ ${t.map(n=>jb(n," ")).join(`,
284
284
  `)},
285
- ],`}Bt(QR,"generateEcsServiceRoutingCode");function e0(e){if(e===!1)return`
285
+ ],`}Bt(e0,"generateEcsServiceRoutingCode");function t0(e){if(e===!1)return`
286
286
  scaling: false,`;if(typeof e!="object"||!(e.minCapacity!==void 0||e.maxCapacity!==void 0||e.desiredCount!==void 0||e.scalingType!==void 0))return"";let t=[];return e.minCapacity!==void 0&&t.push(`minCapacity: ${e.minCapacity}`),e.maxCapacity!==void 0&&t.push(`maxCapacity: ${e.maxCapacity}`),e.desiredCount!==void 0&&t.push(`desiredCount: ${e.desiredCount}`),e.scalingType&&t.push(`scalingType: ${R(e.scalingType)}`),`
287
- scaling: ${qi(t," "," ")},`}Bt(e0,"generateEcsServiceScalingCode");function t0(e,t,n){return{needsDb:e.needsDatabaseConnection!==void 0?e.needsDatabaseConnection:t&&Cn(n),needsStorage:e.needsStorageConnection!==void 0?e.needsStorageConnection:t&&Nn(n),needsMessaging:e.needsMessagingConnection!==void 0?e.needsMessagingConnection:t&&Pn(n)}}Bt(t0,"deriveServiceConnectionNeeds");function r0(e){let{service:t,isFirstService:n,hasConnections:i,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:c,plan:u,compute:l}=e,d=`
287
+ scaling: ${Ki(t," "," ")},`}Bt(t0,"generateEcsServiceScalingCode");function r0(e,t,n){return{needsDb:e.needsDatabaseConnection!==void 0?e.needsDatabaseConnection:t&&Cn(n),needsStorage:e.needsStorageConnection!==void 0?e.needsStorageConnection:t&&Nn(n),needsMessaging:e.needsMessagingConnection!==void 0?e.needsMessagingConnection:t&&Pn(n)}}Bt(r0,"deriveServiceConnectionNeeds");function n0(e){let{service:t,isFirstService:n,hasConnections:i,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:c,plan:u,compute:l}=e,d=`
288
288
  name: ${R(t.name)},`;d+=`
289
289
  capacityProvider: ${R(t.capacityProvider)},`,t.serviceType!==void 0&&(d+=`
290
- serviceType: ${R(t.serviceType)},`),t.ec2Config&&(d+=qR(t.ec2Config)),t.docker&&(d+=`
290
+ serviceType: ${R(t.serviceType)},`),t.ec2Config&&(d+=XR(t.ec2Config)),t.docker&&(d+=`
291
291
  docker: ${W(t.docker," ")},`),t.image&&(d+=`
292
292
  image: ${R(t.image)},`),t.ssmSecretsPath&&(d+=`
293
- ssmSecretsPath: ${R(t.ssmSecretsPath)},`);let p=t0(t,n,l);if(t.containers?.length){d+=`
293
+ ssmSecretsPath: ${R(t.ssmSecretsPath)},`);let p=r0(t,n,l);if(t.containers?.length){d+=`
294
294
  containers: [{`;for(let g=0;g<t.containers.length;g++){let v=t.containers[g];if(!v)continue;let x=g===0&&(p.needsDb||p.needsStorage||p.needsMessaging)&&i,G=p.needsDb?r:{env:{},secrets:{}},j=p.needsStorage?o:{env:{},secrets:{}},he=p.needsMessaging?a:{env:{},secrets:{}};g>0&&(d+=`
295
- }, {`),d+=JR(v,x,G,j,he,c)}d+=`
296
- }],`}if(t.routing&&(d+=QR(t.routing)),t.cpu!==void 0&&(d+=`
295
+ }, {`),d+=QR(v,x,G,j,he,c)}d+=`
296
+ }],`}if(t.routing&&(d+=e0(t.routing)),t.cpu!==void 0&&(d+=`
297
297
  cpu: ${t.cpu},`),t.memoryLimitMiB!==void 0&&(d+=`
298
298
  memoryLimitMiB: ${t.memoryLimitMiB},`),t.desiredCount!==void 0&&(d+=`
299
- desiredCount: ${t.desiredCount},`),t.scaling!==void 0&&(d+=e0(t.scaling)),t.alarms===!1?d+=`
299
+ desiredCount: ${t.desiredCount},`),t.scaling!==void 0&&(d+=t0(t.scaling)),t.alarms===!1?d+=`
300
300
  alarms: false,`:typeof t.alarms=="object"&&(d+=`
301
301
  alarms: ${W(t.alarms," ")},`),d+=be(t.extraProperties," "),p.needsDb||p.needsStorage||p.needsMessaging){let g=p.needsDb?Tn(u,l):[],v=p.needsStorage?$n(u,l):[],x=p.needsMessaging?Rn(u,l):[];(g.length>0||v.length>0||x.length>0)&&(d+=`
302
- ${Hi(g,v,x)}`)}return d}Bt(r0,"generateEcsServiceCode");function Wa(e,t){let n=Fa(e),i={...Ba},r={env:{},secrets:{}};if(Cn(e)){let u=Sl(t,e);Object.assign(r.env,u.env),Object.assign(r.secrets,u.secrets)}let o={env:{},secrets:{}};if(Nn(e)){let u=Al(t,e);Object.assign(o.env,u.env)}let a={env:{},secrets:{}};if(Pn(e)){let u=Il(t,e);Object.assign(a.env,u.env)}let c=`
303
- ecrRepository: app.getDefaultContainerRegistry(),`;if(c+=XR(e),e.services?.length){c+=`
302
+ ${Wi(g,v,x)}`)}return d}Bt(n0,"generateEcsServiceCode");function Za(e,t){let n=Ua(e),i={...Fa},r={env:{},secrets:{}};if(Cn(e)){let u=Sl(t,e);Object.assign(r.env,u.env),Object.assign(r.secrets,u.secrets)}let o={env:{},secrets:{}};if(Nn(e)){let u=Al(t,e);Object.assign(o.env,u.env)}let a={env:{},secrets:{}};if(Pn(e)){let u=Il(t,e);Object.assign(a.env,u.env)}let c=`
303
+ ecrRepository: app.getDefaultContainerRegistry(),`;if(c+=JR(e),e.services?.length){c+=`
304
304
  services: [{`;for(let u=0;u<e.services.length;u++){let l=e.services[u];l&&(u>0&&(c+=`
305
- }, {`),c+=r0({service:l,isFirstService:u===0,hasConnections:n,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:i,plan:t,compute:e}))}c+=`
306
- }],`}return c+=be(e.extraProperties),c+=An(),c}Bt(Wa,"generateEcsCode");var Y4=Object.defineProperty,K4=(e,t)=>Y4(e,"name",{value:t,configurable:!0});function Tl(e,t){if(e.compute.length===0)return"";let n="";for(let i=0;i<e.compute.length;i++){let r=e.compute[i],o=t.has(r.name)||r.scheduleExpression!==void 0,a=se(r),c=e.database.length>0||e.s3.length>0||i>0,u=o?`const ${a} = `:"";switch(n+=`${c?`
305
+ }, {`),c+=n0({service:l,isFirstService:u===0,hasConnections:n,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:i,plan:t,compute:e}))}c+=`
306
+ }],`}return c+=be(e.extraProperties),c+=An(),c}Bt(Za,"generateEcsCode");var K4=Object.defineProperty,q4=(e,t)=>K4(e,"name",{value:t,configurable:!0});function Tl(e,t){if(e.compute.length===0)return"";let n="";for(let i=0;i<e.compute.length;i++){let r=e.compute[i],o=t.has(r.name)||r.scheduleExpression!==void 0,a=se(r),c=e.database.length>0||e.s3.length>0||i>0,u=o?`const ${a} = `:"";switch(n+=`${c?`
307
307
  `:""}${u}app.addCompute(
308
308
  ComputeFactory.build(${R(r.name)}, {
309
- type: ${R(r.type)},`,r.type){case"lambda":n+=Va(r),n+=Ga(r,e);break;case"ec2":n+=Za(r);break;case"ecs":n+=Wa(r,e);break;default:{let l=r.type;throw new Error(`Unhandled compute type: ${String(l)}`)}}n+=`
309
+ type: ${R(r.type)},`,r.type){case"lambda":n+=Ba(r),n+=Va(r,e);break;case"ec2":n+=Ga(r);break;case"ecs":n+=Za(r,e);break;default:{let l=r.type;throw new Error(`Unhandled compute type: ${String(l)}`)}}n+=`
310
310
  })
311
311
  );
312
312
  `,r.scheduleExpression!==void 0&&(n+=`app.addSchedule(${R(`${r.name}Schedule`)}, { schedule: ${R(r.scheduleExpression)}, target: ${a} });
313
- `)}return n}K4(Tl,"generateComputeCode");var q4=Object.defineProperty,X4=(e,t)=>q4(e,"name",{value:t,configurable:!0}),J4={kind:"planOnly",reason:"`variableName` is a plan-only round-trip key naming the `const <var> =` binding the scaffold emits; no construct reads it."},Q4={kind:"planOnly",reason:"`extraProperties` is a plan-only round-trip key: the scaffold flattens each `{ key, sourceText }` entry into a sibling property, and no construct reads the array."},$l={variableName:J4,extraProperties:Q4},e6={constants:[{key:"type",value:{kind:"literal",value:"queue"}}],keys:{retentionPeriod:{kind:"prop",as:"messageRetentionPeriod"},...$l}},t6={keys:{...$l}},r6={keys:{engineExpression:{kind:"planOnly",reason:"`engineExpression` carries a raw CDK engine expression for the scaffold to inline; the construct reads `databaseEngine` instead, so a cluster pinned to `DatabaseClusterEngine.auroraMysql(...)` still deploys as aurora-postgresql."},...$l}},n6={keys:{...$l}},Rl={messaging:e6,storage:t6,database:r6,network:n6};function n0(e){return Object.prototype.hasOwnProperty.call(Rl,e)}X4(n0,"isProjectableType");var i6=Object.defineProperty,o6=(e,t)=>i6(e,"name",{value:t,configurable:!0});function Cl(e,t,n={}){let i=Rl[e],r=n.editingExisting===!0?[]:i.constants??[],o=new Map(r.map(c=>[c.key,c])),a=[];for(let[c,u]of Object.entries(t)){if(u===void 0)continue;let l=i.keys?.[c];if(l===void 0||l.kind==="prop"){let g=l?.as??c;o.set(g,{key:g,value:{kind:"literal",value:u}});continue}if(l.kind==="planOnly"){a.push({key:c,reason:l.reason});continue}let d=l.bind(u,n);if(d===void 0){a.push({key:c,reason:l.reason});continue}let p=l.as??c;o.set(p,{key:p,value:{kind:"expression",source:d}})}return{props:[...o.values()],unprojectable:a}}o6(Cl,"projectPlanToConstructProps");var a6=Object.defineProperty,Xi=(e,t)=>a6(e,"name",{value:t,configurable:!0});function i0(e){let t="";return t+=O(e.bucketName!==void 0,"bucketName",e.bucketName,"string"),t+=O(e.stackPlacement!==void 0&&e.stackPlacement!=="storage","stackPlacement",e.stackPlacement,"string"),t+=O(e.publicReadAccess===!0,"publicReadAccess",!0),t+=O(e.websiteHosting!==void 0,"websiteHosting",e.websiteHosting,"object"),t+=O(e.backupVaultTier!==void 0,"backupVaultTier",e.backupVaultTier,"string"),t+=O(e.versioned!==void 0,"versioned",e.versioned),t+=O(e.encryption!==void 0,"encryption",e.encryption,"string"),t+=O(e.kmsKeyArn!==void 0,"kmsKeyArn",e.kmsKeyArn,"string"),t+=O(e.cors!==void 0&&e.cors.length>0,"cors",e.cors,"object"),t+=O(e.deployment!==void 0,"deployment",e.deployment,"object"),t+=O(e.retain===!0,"retain",!0),t}Xi(i0,"generateS3BucketProps");function jb(e,t){return!!(t.compute.some(n=>n.connectedStorage?.includes(e.name))||t.cdn&&(t.cdn.defaultOriginRef===e.name||t.cdn.behaviours?.some(n=>n.originRef===e.name)))}Xi(jb,"s3NeedsVariable");function Nl(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){let i=e.s3[n],r=se(i),o=jb(i,e),a=e.database.length>0||n>0?`
314
- `:"",c=i0(i),u=o?`const ${r} = `:"",l=be(i.extraProperties);c||l?t+=`${a}${u}app.addStorage(
313
+ `)}return n}q4(Tl,"generateComputeCode");var X4=Object.defineProperty,J4=(e,t)=>X4(e,"name",{value:t,configurable:!0}),Q4={kind:"planOnly",reason:"`variableName` is a plan-only round-trip key naming the `const <var> =` binding the scaffold emits; no construct reads it."},e6={kind:"planOnly",reason:"`extraProperties` is a plan-only round-trip key: the scaffold flattens each `{ key, sourceText }` entry into a sibling property, and no construct reads the array."},$l={variableName:Q4,extraProperties:e6},t6={constants:[{key:"type",value:{kind:"literal",value:"queue"}}],keys:{retentionPeriod:{kind:"prop",as:"messageRetentionPeriod"},...$l}},r6={keys:{...$l}},n6={keys:{engineExpression:{kind:"planOnly",reason:"`engineExpression` carries a raw CDK engine expression for the scaffold to inline; the construct reads `databaseEngine` instead, so a cluster pinned to `DatabaseClusterEngine.auroraMysql(...)` still deploys as aurora-postgresql."},...$l}},i6={keys:{...$l}},Rl={messaging:t6,storage:r6,database:n6,network:i6};function i0(e){return Object.prototype.hasOwnProperty.call(Rl,e)}J4(i0,"isProjectableType");var o6=Object.defineProperty,a6=(e,t)=>o6(e,"name",{value:t,configurable:!0});function Cl(e,t,n={}){let i=Rl[e],r=n.editingExisting===!0?[]:i.constants??[],o=new Map(r.map(c=>[c.key,c])),a=[];for(let[c,u]of Object.entries(t)){if(u===void 0)continue;let l=i.keys?.[c];if(l===void 0||l.kind==="prop"){let g=l?.as??c;o.set(g,{key:g,value:{kind:"literal",value:u}});continue}if(l.kind==="planOnly"){a.push({key:c,reason:l.reason});continue}let d=l.bind(u,n);if(d===void 0){a.push({key:c,reason:l.reason});continue}let p=l.as??c;o.set(p,{key:p,value:{kind:"expression",source:d}})}return{props:[...o.values()],unprojectable:a}}a6(Cl,"projectPlanToConstructProps");var s6=Object.defineProperty,qi=(e,t)=>s6(e,"name",{value:t,configurable:!0});function o0(e){let t="";return t+=O(e.bucketName!==void 0,"bucketName",e.bucketName,"string"),t+=O(e.stackPlacement!==void 0&&e.stackPlacement!=="storage","stackPlacement",e.stackPlacement,"string"),t+=O(e.publicReadAccess===!0,"publicReadAccess",!0),t+=O(e.websiteHosting!==void 0,"websiteHosting",e.websiteHosting,"object"),t+=O(e.backupVaultTier!==void 0,"backupVaultTier",e.backupVaultTier,"string"),t+=O(e.versioned!==void 0,"versioned",e.versioned),t+=O(e.encryption!==void 0,"encryption",e.encryption,"string"),t+=O(e.kmsKeyArn!==void 0,"kmsKeyArn",e.kmsKeyArn,"string"),t+=O(e.cors!==void 0&&e.cors.length>0,"cors",e.cors,"object"),t+=O(e.deployment!==void 0,"deployment",e.deployment,"object"),t+=O(e.retain===!0,"retain",!0),t}qi(o0,"generateS3BucketProps");function zb(e,t){return!!(t.compute.some(n=>n.connectedStorage?.includes(e.name))||t.cdn&&(t.cdn.defaultOriginRef===e.name||t.cdn.behaviours?.some(n=>n.originRef===e.name)))}qi(zb,"s3NeedsVariable");function Nl(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){let i=e.s3[n],r=se(i),o=zb(i,e),a=e.database.length>0||n>0?`
314
+ `:"",c=o0(i),u=o?`const ${r} = `:"",l=be(i.extraProperties);c||l?t+=`${a}${u}app.addStorage(
315
315
  StorageFactory.build(${R(i.name)}, {${c}${l}
316
316
  })
317
317
  );
318
318
  `:t+=`${a}${u}app.addStorage(
319
319
  StorageFactory.build(${R(i.name)}, {})
320
320
  );
321
- `}return t}Xi(Nl,"generateS3Code");function Pl(e){if(!e.dynamodb||e.dynamodb.length===0)return"";let t="";for(let n of e.dynamodb){let i=se(n);if(t+=`
321
+ `}return t}qi(Nl,"generateS3Code");function Pl(e){if(!e.dynamodb||e.dynamodb.length===0)return"";let t="";for(let n of e.dynamodb){let i=se(n);if(t+=`
322
322
  const ${i} = app.addDatabase(
323
323
  DatabaseFactory.build(${R(n.name)}, {
324
324
  type: "DynamoDB",
@@ -348,22 +348,22 @@ const ${i} = app.addDatabase(
348
348
  stream: true`),t+=be(n.extraProperties),t+=`
349
349
  })
350
350
  );
351
- `}return t}Xi(Pl,"generateDynamoDBCode");function zb(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}Xi(zb,"sqsNeedsVariable");function wl(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(let n of e.sqs){let i=se(n),r=zb(n,e)?`const ${i} = `:"",{props:o}=Cl("messaging",{queueType:n.queueType,visibilityTimeout:n.visibilityTimeout,retentionPeriod:n.retentionPeriod,...n.contentBasedDeduplication===!0&&{contentBasedDeduplication:!0},removalPolicy:n.removalPolicy});t+=`
351
+ `}return t}qi(Pl,"generateDynamoDBCode");function Lb(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}qi(Lb,"sqsNeedsVariable");function wl(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(let n of e.sqs){let i=se(n),r=Lb(n,e)?`const ${i} = `:"",{props:o}=Cl("messaging",{queueType:n.queueType,visibilityTimeout:n.visibilityTimeout,retentionPeriod:n.retentionPeriod,...n.contentBasedDeduplication===!0&&{contentBasedDeduplication:!0},removalPolicy:n.removalPolicy});t+=`
352
352
  ${r}app.addMessaging(
353
- MessagingFactory.build(${R(n.name)}, {${kb(o)}`,t+=",",t+=be(n.extraProperties),t+=An(),t+=`
353
+ MessagingFactory.build(${R(n.name)}, {${Ob(o)}`,t+=",",t+=be(n.extraProperties),t+=An(),t+=`
354
354
  })
355
355
  );
356
- `}return t}Xi(wl,"generateSQSCode");var s6=Object.defineProperty,bt=(e,t)=>s6(e,"name",{value:t,configurable:!0}),Gt=Object.freeze({database:{type:"Instance",backupRetention:7,deletionProtection:!0},compute:{server:{memorySize:1536,timeout:30},imageOptimisation:{memorySize:1536,timeout:30},revalidation:{memorySize:768,timeout:300}}});function wn(e,t,n){return t===void 0?"":`
356
+ `}return t}qi(wl,"generateSQSCode");var c6=Object.defineProperty,bt=(e,t)=>c6(e,"name",{value:t,configurable:!0}),Gt=Object.freeze({database:{type:"Instance",backupRetention:7,deletionProtection:!0},compute:{server:{memorySize:1536,timeout:30},imageOptimisation:{memorySize:1536,timeout:30},revalidation:{memorySize:768,timeout:300}}});function wn(e,t,n){return t===void 0?"":`
357
357
  ${n}${e}: ${t},`}bt(wn,"emitScalar");function Vt(e,t,n){return t===void 0?"":`
358
- ${n}${e}: ${JSON.stringify(t)},`}bt(Vt,"emitStringField");function Ha(e,t,n){return t===void 0?"":t===!1?`
358
+ ${n}${e}: ${JSON.stringify(t)},`}bt(Vt,"emitStringField");function Wa(e,t,n){return t===void 0?"":t===!1?`
359
359
  ${n}${e}: false,`:`
360
- ${n}${e}: ${W(t,n)},`}bt(Ha,"emitObjectOrFalse");function vt(e,t,n){return t===void 0||Object.keys(t).length===0?"":`
361
- ${n}${e}: ${W(t,n)},`}bt(vt,"emitObject");function o0(e){let t=e??{},n=" ",i=t.type??Gt.database.type,r=t.backupRetention??Gt.database.backupRetention,o=t.deletionProtection??Gt.database.deletionProtection,a=`
360
+ ${n}${e}: ${W(t,n)},`}bt(Wa,"emitObjectOrFalse");function vt(e,t,n){return t===void 0||Object.keys(t).length===0?"":`
361
+ ${n}${e}: ${W(t,n)},`}bt(vt,"emitObject");function a0(e){let t=e??{},n=" ",i=t.type??Gt.database.type,r=t.backupRetention??Gt.database.backupRetention,o=t.deletionProtection??Gt.database.deletionProtection,a=`
362
362
  ${n}type: "${i}",`;return a+=Vt("databaseName",t.databaseName,n),a+=Vt("databaseEngine",t.databaseEngine,n),i==="Instance"&&t.instanceType!==void 0&&(a+=Vt("instanceType",t.instanceType,n)),a+=wn("allocatedStorage",t.allocatedStorage,n),a+=wn("port",t.port,n),a+=`
363
363
  ${n}backupRetention: ${r},`,a+=`
364
- ${n}deletionProtection: ${o},`,a+=wn("publiclyAccessible",t.publiclyAccessible,n),a+=Vt("allowedIpCidr",t.allowedIpCidr,n),a+=wn("multiAz",t.multiAz,n),a+=wn("allowVpcAccess",t.allowVpcAccess,n),a+=wn("monitoringInterval",t.monitoringInterval,n),a+=Vt("preferredMaintenanceWindow",t.preferredMaintenanceWindow,n),a+=Vt("snapshotIdentifier",t.snapshotIdentifier,n),a+=Vt("snapshotUsername",t.snapshotUsername,n),a+=Ha("readReplica",t.readReplica,n),a+=vt("writer",t.writer,n),a+=Ha("readers",t.readers,n),a+=Ha("databaseInsights",t.databaseInsights,n),a+=Ha("proxy",t.proxy,n),a+=vt("credentials",t.credentials,n),a+=vt("encryption",t.encryption,n),`
364
+ ${n}deletionProtection: ${o},`,a+=wn("publiclyAccessible",t.publiclyAccessible,n),a+=Vt("allowedIpCidr",t.allowedIpCidr,n),a+=wn("multiAz",t.multiAz,n),a+=wn("allowVpcAccess",t.allowVpcAccess,n),a+=wn("monitoringInterval",t.monitoringInterval,n),a+=Vt("preferredMaintenanceWindow",t.preferredMaintenanceWindow,n),a+=Vt("snapshotIdentifier",t.snapshotIdentifier,n),a+=Vt("snapshotUsername",t.snapshotUsername,n),a+=Wa("readReplica",t.readReplica,n),a+=vt("writer",t.writer,n),a+=Wa("readers",t.readers,n),a+=Wa("databaseInsights",t.databaseInsights,n),a+=Wa("proxy",t.proxy,n),a+=vt("credentials",t.credentials,n),a+=vt("encryption",t.encryption,n),`
365
365
  database: {${a}
366
- },`}bt(o0,"emitDatabaseBlock");function a0(e){let t=e??{},n=t.server?.memorySize??Gt.compute.server.memorySize,i=t.server?.timeout??Gt.compute.server.timeout,r=t.imageOptimisation?.memorySize??Gt.compute.imageOptimisation.memorySize,o=t.imageOptimisation?.timeout??Gt.compute.imageOptimisation.timeout,a=t.revalidation?.memorySize??Gt.compute.revalidation.memorySize,c=t.revalidation?.timeout??Gt.compute.revalidation.timeout;return`
366
+ },`}bt(a0,"emitDatabaseBlock");function s0(e){let t=e??{},n=t.server?.memorySize??Gt.compute.server.memorySize,i=t.server?.timeout??Gt.compute.server.timeout,r=t.imageOptimisation?.memorySize??Gt.compute.imageOptimisation.memorySize,o=t.imageOptimisation?.timeout??Gt.compute.imageOptimisation.timeout,a=t.revalidation?.memorySize??Gt.compute.revalidation.memorySize,c=t.revalidation?.timeout??Gt.compute.revalidation.timeout;return`
367
367
  compute: {
368
368
  server: {
369
369
  memorySize: ${n},
@@ -377,20 +377,20 @@ ${n}deletionProtection: ${o},`,a+=wn("publiclyAccessible",t.publiclyAccessible,n
377
377
  memorySize: ${a},
378
378
  timeout: ${c},
379
379
  },
380
- },`}bt(a0,"emitComputeBlock");function s0(e){return vt("storage",e," ")}bt(s0,"emitStorageBlock");function c0(e){return vt("messaging",e," ")}bt(c0,"emitMessagingBlock");function u0(e){return vt("cdn",e," ")}bt(u0,"emitCdnBlock");function l0(e){return vt("environment",e," ")}bt(l0,"emitEnvironmentBlock");function d0(e){let t=" ",n="";return n+=Vt("source",e.source,t),n+=vt("build",e.build,t),n+=Vt("routing",e.routing,t),n+=vt("security",e.security,t),e.domain!==void 0&&e.domain!==""&&(n+=`
381
- ${t}domain: ${JSON.stringify(e.domain)},`),n+=vt("forms",e.forms,t),n+=vt("cdn",e.cdn,t),n}bt(d0,"emitStaticSiteFields");function Ya(e){if(!e.patternConfig)return"";let t=e.patternConfig,n=`app.addPattern(
380
+ },`}bt(s0,"emitComputeBlock");function c0(e){return vt("storage",e," ")}bt(c0,"emitStorageBlock");function u0(e){return vt("messaging",e," ")}bt(u0,"emitMessagingBlock");function l0(e){return vt("cdn",e," ")}bt(l0,"emitCdnBlock");function d0(e){return vt("environment",e," ")}bt(d0,"emitEnvironmentBlock");function m0(e){let t=" ",n="";return n+=Vt("source",e.source,t),n+=vt("build",e.build,t),n+=Vt("routing",e.routing,t),n+=vt("security",e.security,t),e.domain!==void 0&&e.domain!==""&&(n+=`
381
+ ${t}domain: ${JSON.stringify(e.domain)},`),n+=vt("forms",e.forms,t),n+=vt("cdn",e.cdn,t),n}bt(m0,"emitStaticSiteFields");function Ha(e){if(!e.patternConfig)return"";let t=e.patternConfig,n=`app.addPattern(
382
382
  PatternFactory.build("${`${Pe(t.name)}${Pi[t.type].constructIdSuffix}`}", {
383
383
  type: "${t.type}",
384
384
  name: "${t.name}",`;return t.type==="payload"||t.type==="nextjs"?(t.domain!==void 0&&t.domain!==""&&(n+=`
385
- domain: "${t.domain}",`),n+=o0(t.database),n+=a0(t.compute),n+=s0(t.storage),n+=c0(t.messaging),n+=u0(t.cdn),n+=l0(t.environment)):n+=d0(t),n+=`
385
+ domain: "${t.domain}",`),n+=a0(t.database),n+=s0(t.compute),n+=c0(t.storage),n+=u0(t.messaging),n+=l0(t.cdn),n+=d0(t.environment)):n+=m0(t),n+=`
386
386
  })
387
387
  );
388
388
 
389
- `,n}bt(Ya,"generatePatternCodeWithComments");var c6=Object.defineProperty,ur=(e,t)=>c6(e,"name",{value:t,configurable:!0}),Ka="fjall:costAllocation:owner",u6="engineering";function m0(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}ur(m0,"isEmptyObject");function Lb(e){let t={...e};return m0(t.flowLogs)&&delete t.flowLogs,t}ur(Lb,"cleanNetworkConfig");function qa(e){if(!e.additionalNetworks||e.additionalNetworks.length===0)return"";let t="";for(let n of e.additionalNetworks){let i=cr(n.name),r={};n.maxAzs!==void 0&&(r.maxAzs=n.maxAzs),n.natGateways!==void 0&&(r.natGateways=n.natGateways),n.flowLogs!==void 0&&(r.flowLogs=n.flowLogs),n.vpcEndpoints!==void 0&&(r.vpcEndpoints=n.vpcEndpoints);let o=Lb(r);t+=`const ${i} = app.addNetwork(
389
+ `,n}bt(Ha,"generatePatternCodeWithComments");var u6=Object.defineProperty,ur=(e,t)=>u6(e,"name",{value:t,configurable:!0}),Ya="fjall:costAllocation:owner",l6="engineering";function p0(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}ur(p0,"isEmptyObject");function Ub(e){let t={...e};return p0(t.flowLogs)&&delete t.flowLogs,t}ur(Ub,"cleanNetworkConfig");function Ka(e){if(!e.additionalNetworks||e.additionalNetworks.length===0)return"";let t="";for(let n of e.additionalNetworks){let i=cr(n.name),r={};n.maxAzs!==void 0&&(r.maxAzs=n.maxAzs),n.natGateways!==void 0&&(r.natGateways=n.natGateways),n.flowLogs!==void 0&&(r.flowLogs=n.flowLogs),n.vpcEndpoints!==void 0&&(r.vpcEndpoints=n.vpcEndpoints);let o=Ub(r);t+=`const ${i} = app.addNetwork(
390
390
  NetworkFactory.build("${n.name}", ${W(o," ")})
391
391
  );
392
392
 
393
- `}return t}ur(qa,"generateNetworkCode");function kl(e){let t={};return e.tags&&Object.keys(e.tags).length>0&&Object.assign(t,e.tags),t[Ka]||(t[Ka]=e.owner||u6),`app.addTags({
393
+ `}return t}ur(Ka,"generateNetworkCode");function kl(e){let t={};return e.tags&&Object.keys(e.tags).length>0&&Object.assign(t,e.tags),t[Ya]||(t[Ya]=e.owner||l6),`app.addTags({
394
394
  ${Object.entries(t).map(([n,i])=>` "${n}": "${i}"`).join(`,
395
395
  `)}
396
396
  });
@@ -402,7 +402,7 @@ const appName = "${e.appName}";
402
402
  backup: { tier: "${n.tier}" }`),r&&(t+=`,
403
403
  ${r}`),t+=`
404
404
  });
405
- `;else if(e.network){let o=Lb(e.network);t+=`const app = App.getApp(appName, {
405
+ `;else if(e.network){let o=Ub(e.network);t+=`const app = App.getApp(appName, {
406
406
  network: ${W(o," ")}`,n&&(t+=`,
407
407
  backup: { tier: "${n.tier}" }`),r&&(t+=`,
408
408
  ${r}`),t+=`
@@ -413,11 +413,11 @@ const appName = "${e.appName}";
413
413
 
414
414
  import { App${t.length>0?`, ${t.join(", ")}`:""} } from "@fjall/components-infrastructure";
415
415
  `;if(e.additionalManagedImports)for(let i of e.additionalManagedImports){if(i.moduleSpecifier==="@fjall/components-infrastructure"||i.moduleSpecifier==="@fjall/infrastructure")continue;let r=i.namedImports.length>0?`{ ${i.namedImports.join(", ")} }`:"",o=[i.defaultImport??"",r].filter(Boolean).join(", ");o&&(n+=`import ${o} from "${i.moduleSpecifier}";
416
- `)}return n}ur(Dl,"generateImports");function Ml(e){if(!e.cdn)return"";let t=Oa(e,e.cdn.defaultOriginRef),n=`
416
+ `)}return n}ur(Dl,"generateImports");function Ml(e){if(!e.cdn)return"";let t=ka(e,e.cdn.defaultOriginRef),n=`
417
417
  app.addCdn(
418
418
  CdnFactory.build("${e.cdn.name}", {
419
419
  originType: "auto",
420
- origin: ${t}`;if(e.cdn.behaviours&&e.cdn.behaviours.length>0){let i=e.cdn.behaviours.map(r=>{let o=Oa(e,r.originRef),a=`{
420
+ origin: ${t}`;if(e.cdn.behaviours&&e.cdn.behaviours.length>0){let i=e.cdn.behaviours.map(r=>{let o=ka(e,r.originRef),a=`{
421
421
  pathPattern: "${r.pathPattern}",
422
422
  origin: ${o},`;return r.cachePolicy&&(a+=`
423
423
  cachePolicy: "${r.cachePolicy}",`),a+=`
@@ -432,31 +432,31 @@ app.addCdn(
432
432
  accessGate: ${W(e.cdn.accessGate," ")}`),n+=be(e.cdn.extraProperties),n+=`
433
433
  })
434
434
  );
435
- `,n}ur(Ml,"generateCDNCode");function jl(e){let t=new Set;if(e.cdn&&(e.cdn.defaultOriginRef&&t.add(e.cdn.defaultOriginRef),e.cdn.behaviours))for(let n of e.cdn.behaviours)t.add(n.originRef);return t}ur(jl,"collectCdnReferencedResources");function zl(e){return e.patternConfig!==void 0}ur(zl,"usesPatternApproach");var l6=Object.defineProperty,kn=(e,t)=>l6(e,"name",{value:t,configurable:!0}),Xa="service",Ub="0 4 * * ? *",Fb="0 5 * * ? *",lr=Object.freeze({tinkerer:{displayName:"Tinkerer",description:"Free tier eligible, minimal cost for experimentation",database:{Instance:{instanceType:"t4g.micro",multiAz:!1,proxy:!1,readReplica:!1,publiclyAccessible:!0},Aurora:null,GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:Xa,capacityProvider:"EC2",desiredCount:1,minCapacity:1,maxCapacity:1,ec2Config:{instanceType:"t4g.micro",amiHardwareType:"ARM",minCapacity:1,maxCapacity:1,memoryLimitMiB:400}}],cluster:{directAccess:!0}},lambda:{timeout:30,memory:128}},network:{maxAzs:2,natGateways:!1,flowLogs:!1},backup:!1},lightweight:{displayName:"Lightweight",description:"Streamlined single-AZ deployment for cost efficiency",database:{Instance:{instanceType:"t4g.small",multiAz:!1},Aurora:{readers:!1},GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:Xa,capacityProvider:"FARGATE_SPOT",cpu:256,memoryLimitMiB:512,desiredCount:1,minCapacity:1,maxCapacity:3}]},lambda:{timeout:30,memory:256}},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready with sensible defaults",database:{Instance:{instanceType:"t4g.large"},Aurora:{readers:{count:1}},GlobalAurora:{readers:{count:1}},ClickHouse:{instanceType:"t4g.medium",coldTier:{mode:"s3"},optimiseSchedule:Ub,backupSchedule:Fb,backupRetentionDays:14}},compute:{ecs:{services:[{name:Xa,capacityProvider:"FARGATE",cpu:512,memoryLimitMiB:1024,desiredCount:2,minCapacity:2,maxCapacity:5}]},lambda:{timeout:60,memory:256}},network:{maxAzs:3,natGateways:{count:1},flowLogs:{},vpcEndpoints:{interface:{ecr:!0}}},backup:!1},resilient:{displayName:"Resilient",description:"High availability with enhanced monitoring and scaling",database:{Instance:{instanceType:"r7g.large",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.large",coldTier:{mode:"s3"},optimiseSchedule:Ub,backupSchedule:Fb,backupRetentionDays:14}},compute:{ecs:{services:[{name:Xa,capacityProvider:"FARGATE",cpu:1024,memoryLimitMiB:2048,desiredCount:4,minCapacity:4,maxCapacity:20}]},lambda:{timeout:120,memory:512}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0}}},backup:{tier:"resilient"}},enterprise:{displayName:"Enterprise",description:"Maximum capability with all features enabled",database:{Instance:{instanceType:"r7g.xlarge",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},readReplica:{}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.xlarge",coldTier:{mode:"s3"},optimiseSchedule:Ub,backupSchedule:Fb,backupRetentionDays:30}},compute:{ecs:{services:[{name:Xa,capacityProvider:"FARGATE",cpu:2048,memoryLimitMiB:4096,desiredCount:6,minCapacity:6,maxCapacity:100}]},lambda:{timeout:300,memory:1024}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{destination:"s3",retentionDays:365},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0,kms:!0,cloudwatchLogs:!0}}},backup:{tier:"enterprise"}}});function d6(e,t){return lr[e].database[t]}kn(d6,"getDatabasePreset");function m6(e){return lr[e].compute.ecs}kn(m6,"getEcsPreset");function Bb(e){return lr[e].network}kn(Bb,"getNetworkPreset");function p0(e){return Hu.filter(t=>lr[t].database[e]!==null)}kn(p0,"getAvailableTiersForDatabase");function p6(e){return p0(e).map(t=>({label:lr[t].displayName,value:t,description:lr[t].description}))}kn(p6,"getTierOptionsForDatabase");function Vb(e){switch(e){case"tinkerer":case"lightweight":case"standard":return"Instance";case"resilient":case"enterprise":return"Aurora"}}kn(Vb,"getDefaultDatabaseTypeForTier");function Gb(e,t){let n=lr[e].compute.ecs,i=n.services[0],r=!n.cluster?.directAccess&&n.cluster?.loadBalancer!==!1,o=t.filter(c=>c.serviceType!=="worker").length,a=t.findIndex(c=>c.serviceType!=="worker");return t.map((c,u)=>{let l=u===a,d=c.serviceType==="worker",p;return r&&!d&&(c.routing?p=c.routing:o>1&&(p={path:l?"/*":`/${c.name.toLowerCase()}/*`,...l?{}:{priority:100+u}})),{name:c.name,capacityProvider:i.capacityProvider,ec2Config:i.ec2Config,cpu:i.cpu,memoryLimitMiB:i.memoryLimitMiB,desiredCount:i.desiredCount,minCapacity:i.minCapacity,maxCapacity:i.maxCapacity,routing:p}})}kn(Gb,"applyTierDefaultsToServices");var f6=Object.defineProperty,Zb=(e,t)=>f6(e,"name",{value:t,configurable:!0}),Ja=["lightweight","standard","resilient"],g6=[...Ja,"custom"],Fr=Object.freeze({lightweight:{displayName:"Lightweight",description:"Cost-effective \xB7 Instance DB, minimal Lambda",database:{type:"Instance",instanceType:"t4g.small",backupRetention:7,deletionProtection:!1},compute:{memorySize:512,timeout:30},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready \xB7 Instance DB, balanced Lambda",database:{type:"Instance",instanceType:"t4g.large",backupRetention:14,deletionProtection:!0},compute:{memorySize:1536,timeout:60},network:{maxAzs:3,natGateways:{count:1},flowLogs:{}},backup:{tier:"standard"}},resilient:{displayName:"Resilient",description:"High-availability \xB7 Aurora V2, KMS encryption",database:{type:"Aurora",backupRetention:30,deletionProtection:!0,encryption:{useCMK:!0}},compute:{memorySize:2048,timeout:120},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90}},backup:{tier:"resilient"}}});function Ll(e){return Fr[e]}Zb(Ll,"getPatternTierPreset");function f0(){return[{label:Fr.standard.displayName,value:"standard",description:Fr.standard.description},{label:Fr.lightweight.displayName,value:"lightweight",description:Fr.lightweight.description},{label:Fr.resilient.displayName,value:"resilient",description:Fr.resilient.description},{label:"Custom",value:"custom",description:"Full control \xB7 Configure everything"}]}Zb(f0,"getPatternTierOptions");var h6=new Set(Ja);function Ul(e){return h6.has(e)}Zb(Ul,"isPatternTierName");var v6=Object.defineProperty,g0=(e,t)=>v6(e,"name",{value:t,configurable:!0}),Fl=Object.freeze({standard:{},assets:{versioned:!0,deployment:{source:"./assets"}},upload:{versioned:!0,cors:[{allowedOrigins:["*"],allowedMethods:["GET","PUT","POST"]}]},website:{publicReadAccess:!0,websiteHosting:{indexDocument:"index.html",errorDocument:"error.html"}}});function h0(e){return{...Fl[e]}}g0(h0,"getStoragePreset");function v0(){return[{label:"Standard",value:"standard"},{label:"Assets",value:"assets"},{label:"Upload",value:"upload"},{label:"Website Hosting",value:"website"}]}g0(v0,"getStoragePresetOptions");import*as ye from"typescript";import*as D from"typescript";var b6=Object.defineProperty,Ji=(e,t)=>b6(e,"name",{value:t,configurable:!0});function B(e){let t={};for(let n of e.properties){if(!D.isPropertyAssignment(n))continue;let i=D.isIdentifier(n.name)||D.isStringLiteral(n.name)?n.name.text:void 0;i!==void 0&&(t[i]=Br(n.initializer))}return t}Ji(B,"parseObjectLiteral");function Br(e){if(D.isStringLiteral(e))return e.text;if(D.isNumericLiteral(e))return Number(e.text);if(e.kind===D.SyntaxKind.TrueKeyword)return!0;if(e.kind===D.SyntaxKind.FalseKeyword)return!1;if(D.isArrayLiteralExpression(e))return e.elements.map(t=>Br(t));if(D.isObjectLiteralExpression(e))return B(e);if(D.isIdentifier(e))return{__identifier:e.text};if(D.isPropertyAccessExpression(e))return{__expression:e.getText()};if(D.isCallExpression(e))return{__call:e.getText()};if(D.isBinaryExpression(e)&&e.operatorToken.kind===D.SyntaxKind.BarBarToken){let t=Br(e.left),n=Br(e.right);return typeof n=="string"?n:t}else if(D.isConditionalExpression(e)){let t=Br(e.whenTrue),n=Br(e.whenFalse);return typeof n=="string"||typeof n=="number"?n:t}else if(D.isTemplateExpression(e)||D.isNoSubstitutionTemplateLiteral(e))return{__expression:e.getText()};return{__unknown:e.getText()}}Ji(Br,"evaluateExpression");function Qa(e,t){return at(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer){if(D.isStringLiteral(i.initializer))return i.initializer.text;if(D.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer);return JSON.stringify(r)}}}})}Ji(Qa,"findVariableValue");function Wb(e,t){return at(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer&&D.isObjectLiteralExpression(i.initializer))return B(i.initializer)}})}Ji(Wb,"findObjectDeclaration");function es(e,t){if(!D.isIdentifier(t.expression))return;let n=Wb(e,t.expression.text),i=t.name.text;if(n&&n[i]!==void 0)return String(n[i])}Ji(es,"evaluatePropertyAccess");function Bl(e,t){let n=t.head.text;for(let i of t.templateSpans){if(D.isIdentifier(i.expression)){let r=Qa(e,i.expression.text);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else if(D.isPropertyAccessExpression(i.expression)){let r=es(e,i.expression);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else return t.getText(e).replace(/^`|`$/g,"");n+=i.literal.text}return n}Ji(Bl,"resolveTemplateLiteral");var y6=Object.defineProperty,ee=(e,t)=>y6(e,"name",{value:t,configurable:!0});function yt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}ee(yt,"isPlainObject");function dr(e){return yt(e)&&"__identifier"in e}ee(dr,"isIdentifierRef");function Vr(e){return yt(e)&&"__expression"in e}ee(Vr,"isExpressionRef");function Ct(e){return yt(e)&&"__call"in e}ee(Ct,"isCallRef");function N(e){return yt(e)&&!("__identifier"in e)&&!("__expression"in e)&&!("__call"in e)&&!("__unknown"in e)}ee(N,"isParsedObject");function b(e){return typeof e=="string"?e:void 0}ee(b,"asString");function C(e){return typeof e=="number"?e:void 0}ee(C,"asNumber");function z(e){return typeof e=="boolean"?e:void 0}ee(z,"asBoolean");function me(e){if(!Array.isArray(e))return;let t=[];for(let n of e)typeof n=="string"&&t.push(n);return t.length>0?t:void 0}ee(me,"asStringArray");function U(e,t){let n=b(e);if(n!==void 0)return ht(t,n)?n:void 0}ee(U,"asStringUnion");function Je(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i);return t}ee(Je,"omitUndefined");function Vl(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(Vl).join(", ")}]`;if(!yt(e))return String(e);if(dr(e))return e.__identifier;if(Vr(e))return e.__expression;if(Ct(e))return e.__call;if("__unknown"in e&&typeof e.__unknown=="string")return e.__unknown;let t=Object.entries(e);return t.length===0?"{}":`{ ${t.map(([n,i])=>`${n}: ${Vl(i)}`).join(", ")} }`}ee(Vl,"parsedValueToSourceText");function de(e,t){let n=[];for(let[i,r]of Object.entries(e))t.has(i)||r===void 0||n.push({key:i,sourceText:Vl(r)});return n}ee(de,"captureExtraProperties");function Gr(e,t){return ye.isPropertyAssignment(e)&&ye.isIdentifier(e.name)&&e.name.text===t}ee(Gr,"isNamedProperty");function Zt(e){return ye.isCallExpression(e)&&ye.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="getApp"&&ye.isIdentifier(e.expression.expression)&&e.expression.expression.text==="App"}ee(Zt,"isAppGetAppCall");function $e(e,t){let{expression:n}=e;return ye.isPropertyAccessExpression(n)&&n.name.text===t&&e.arguments.length>0}ee($e,"isFactoryMethodCall");function at(e,t){let n,i=ee(r=>{n===void 0&&(n=t(r),n===void 0&&ye.forEachChild(r,i))},"visit");return i(e),n}ee(at,"findFirstInAst");function Oe(e,t){let n=[],i=ee(r=>{let o=t(r);o!==null&&n.push(o),ye.forEachChild(r,i)},"visit");return i(e),n}ee(Oe,"collectFromAst");function Ve(e,t){return ye.isCallExpression(e)&&ye.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="build"&&ye.isIdentifier(e.expression.expression)&&e.expression.expression.text===t}ee(Ve,"isFactoryBuildCall");function st(e){let t=e.parent;if(ye.isVariableDeclaration(t)&&ye.isIdentifier(t.name))return t.name.text}ee(st,"extractVariableName");var St=ee(()=>e=>e,"typed");function Qi(e){if(e!=null){if(e===!1)return!1;if(typeof e=="object"&&!Array.isArray(e))return e}}ee(Qi,"asObjectOrFalse");function mr(e,t){return e===!1?!1:N(e)?t(e):void 0}ee(mr,"parseBooleanOrConfig");function De(e,t){return N(e)?t(e):void 0}ee(De,"parseOptionalConfig");function _t(e,t,n){let i=e[t];return N(i)?n(i):void 0}ee(_t,"extractSubConfig");import*as Y from"typescript";import*as eo from"typescript";var S6=Object.defineProperty,ct=(e,t)=>S6(e,"name",{value:t,configurable:!0});function ts(e){return e!==void 0&&yt(e)}ct(ts,"isEnvironmentRecord");function b0(e){if(!N(e))return;let t={};for(let[n,i]of Object.entries(e))if(N(i)){let r=b(i.id),o=b(i.name);r&&o&&(t[n]={id:r,name:o,field:b(i.field)})}return Object.keys(t).length>0?t:void 0}ct(b0,"parseContainerSecretsImport");function y0(e){if(!N(e))return;let t=me(e.command);if(!(!t||t.length===0))return{command:t,interval:C(e.interval),timeout:C(e.timeout),retries:C(e.retries),startPeriod:C(e.startPeriod)}}ct(y0,"parseContainerHealthCheck");function S0(e){let t=de(e,new Set(["name","image","port","environment","essential","command","entryPoint","secretsImport","secrets","healthCheck"]));return{name:b(e.name),image:b(e.image),port:C(e.port),environment:ts(e.environment)?e.environment:void 0,essential:z(e.essential),command:me(e.command),entryPoint:me(e.entryPoint),secretsImport:b0(e.secretsImport),ssmSecrets:me(e.secrets),healthCheck:y0(e.healthCheck),extraProperties:t.length>0?t:void 0}}ct(S0,"parseServiceContainer");function _0(e){if(Array.isArray(e))return e.filter(N).map(t=>({path:b(t.path),host:b(t.host),priority:C(t.priority),healthCheckPath:b(t.healthCheckPath)}));if(N(e))return{path:b(e.path),host:b(e.host),priority:C(e.priority),healthCheckPath:b(e.healthCheckPath)}}ct(_0,"parseServiceRouting");function E0(e){if(e===!1)return!1;if(N(e))return{minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),desiredCount:C(e.desiredCount),scalingType:U(e.scalingType,Xu)}}ct(E0,"parseServiceScaling");var _6=new Set(["instanceType","amiHardwareType","minCapacity","maxCapacity","memoryLimitMiB","warmPool"]);function x0(e){if(!N(e))return;let t=e.warmPool,n=N(t)?{minSize:C(t.minSize),reuseOnScaleIn:z(t.reuseOnScaleIn)}:void 0,i=de(e,_6);return{instanceType:b(e.instanceType),amiHardwareType:U(e.amiHardwareType,Ju),minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),memoryLimitMiB:C(e.memoryLimitMiB),warmPool:n,extraProperties:i.length>0?i:void 0}}ct(x0,"parseServiceEc2Config");var E6=new Set(["domain","loadBalancer","directAccess"]);function Hb(e){if(!N(e))return;let t=e.loadBalancer,n=de(e,E6);return{domain:b(e.domain),loadBalancer:t===!1?!1:U(t,qu),directAccess:z(e.directAccess),...n.length>0&&{extraProperties:n}}}ct(Hb,"extractClusterConfig");function Yb(e){let t=e.containers,n=Array.isArray(t)?t.filter(N).map(S0):void 0,i=de(e,new Set(["name","image","docker","ssmSecretsPath","containers","routing","connections","serviceType","cpu","memoryLimitMiB","desiredCount","scaling","capacityProvider","ec2Config"]));return{name:b(e.name)??"",image:b(e.image),docker:A0(e.docker),ssmSecretsPath:b(e.ssmSecretsPath),containers:n,routing:_0(e.routing),serviceType:U(e.serviceType,Ia),cpu:C(e.cpu),memoryLimitMiB:C(e.memoryLimitMiB),desiredCount:C(e.desiredCount),scaling:E0(e.scaling),capacityProvider:U(e.capacityProvider,zi)??"FARGATE",ec2Config:x0(e.ec2Config),...i.length>0&&{extraProperties:i}}}ct(Yb,"parseEcsService");function A0(e){if(!N(e))return;let t=b(e.path);if(t===void 0)return;let n=b(e.context),i=b(e.target);return{path:t,...n!==void 0&&{context:n},...i!==void 0&&{target:i}}}ct(A0,"parseServiceDocker");function rs(e,t){let n=b(e);if(n)return n;if(Vr(e)&&e.__expression.startsWith(t+"."))return e.__expression.slice(t.length+1)}ct(rs,"extractEnumString");function Kb(e){return Ct(e)?e.__call.match(/\(\s*"([^"]+)"\s*\)/)?.[1]:void 0}ct(Kb,"extractCallStringArg");function Me(e,t,n){n!==void 0&&(e[t]=n)}ct(Me,"assignIfDefined");var x6=Object.defineProperty,Gl=(e,t)=>x6(e,"name",{value:t,configurable:!0}),A6=10;function qb(e,t){return Array.isArray(e)?e.filter(dr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}Gl(qb,"resolveConnectedDatabaseNames");function Xb(e,t){return Array.isArray(e)?e.filter(dr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}Gl(Xb,"resolveConnectedStorageNames");function Jb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!N(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];if(!N(o)||!N(o.environment))return;let a=o.environment;(a.DATABASE_HOST||a.DATABASE_PORT||a.DATABASE_NAME)&&(e.needsConnection=!0,n.length>0&&(e.connectedDatabase??[]).length===0&&(e.connectedDatabase=[n[0].name]));for(let c=1;c<=A6;c++)(a[`DATABASE_HOST_${c}`]||a[`DATABASE_PORT_${c}`]||a[`DATABASE_NAME_${c}`])&&(e.needsConnection=!0)}Gl(Jb,"inferDatabaseConnectionsFromEnv");function Qb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!N(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];!N(o)||!N(o.environment)||o.environment.BUCKET_NAME&&n.length>0&&(e.connectedStorage??[]).length===0&&(e.connectedStorage=[n[0].name])}Gl(Qb,"inferStorageConnectionsFromEnv");var I6=Object.defineProperty,pr=(e,t)=>I6(e,"name",{value:t,configurable:!0});function I0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];if(!eo.isStringLiteral(t)||!eo.isObjectLiteralExpression(n))return null;let i=t.text,r=B(n);return{resourceName:i,type:b(r.type)??"ecs",config:r,node:e}}pr(I0,"extractComputeResource");function Zl(e){return Oe(e,t=>{if(!eo.isCallExpression(t)||!$e(t,"addCompute"))return null;let n=t.arguments[0];if(!Ve(n,"ComputeFactory"))return null;let i=I0(n);if(i){let r=st(t);r&&(i.variableName=r)}return i})}pr(Zl,"findComputeResources");function Wl(e,t,n){let i=de(e.config,n);i.length>0&&(t.extraProperties=i)}pr(Wl,"applyExtras");function T0(e,t){let n=e.config.docker;if(N(n)){let o=b(n.path),a=b(n.context),c=b(n.target);(o!==void 0||a!==void 0||c!==void 0)&&(t.docker={...o!==void 0&&{path:o},...a!==void 0&&{context:a},...c!==void 0&&{target:c}})}let i=e.config.cluster;i!==void 0&&(t.cluster=Hb(i));let r=e.config.services;r!==void 0&&Array.isArray(r)&&(t.services=r.filter(o=>N(o)).map(Yb)),Wl(e,t,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}pr(T0,"convertEcsCompute");function $0(e,t){if(Me(t,"deployment",U(e.config.deployment,Yu)),Me(t,"timeout",C(e.config.timeout)),Me(t,"memory",C(e.config.memorySize)??C(e.config.memory)),Me(t,"handler",b(e.config.handler)),Me(t,"runtime",rs(e.config.runtime,"Runtime")),ts(e.config.environment)&&(t.environment=e.config.environment),ts(e.config.secrets))t.secrets=e.config.secrets;else{let r=me(e.config.secrets);r&&(t.ssmSecrets=r)}let n=e.config.functionUrl;if(N(n)){let r=U(rs(n.authType,"FunctionUrlAuthType"),Aa);r!==void 0&&(t.functionUrl={authType:r})}let i=e.config.code;if(i!==void 0){let r=Kb(i);r&&(t.codePath=r)}Me(t,"description",b(e.config.lambdaDescription)),Me(t,"architecture",U(rs(e.config.architecture,"Architecture"),Ku)),Me(t,"ephemeralStorageSize",C(e.config.ephemeralStorageSize)),Me(t,"functionName",b(e.config.functionName)),Me(t,"ssmSecretsPath",b(e.config.ssmSecretsPath)),Wl(e,t,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}pr($0,"convertLambdaCompute");function R0(e,t){Me(t,"instanceType",U(e.config.instanceType,Qu));let n=e.config.ssh;n===!1?t.enableSSH=!1:n!==void 0&&N(n)?t.enableSSH=!0:Me(t,"enableSSH",z(e.config.enableSSH)),Me(t,"keyName",b(e.config.keyName)),Me(t,"userData",b(e.config.userData)),e.config.securityGroups!==void 0&&(t.securityGroups=me(e.config.securityGroups)),Wl(e,t,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}pr(R0,"convertEc2Compute");function C0(e,t,n,i){let r=t.config.connections;if(!r&&Array.isArray(t.config.services)){let c=t.config.services[0];N(c)&&(r=c.connections)}if(!r)return;let o=qb(r,n);o.length>0&&(e.needsConnection=!0,e.connectedDatabase=o);let a=Xb(r,i);a.length>0&&(e.connectedStorage=a)}pr(C0,"applyConnectionConfig");function N0(e,t){({ecs:T0,lambda:$0,ec2:R0})[e.type]?.(t,e)}pr(N0,"applyTypeSpecificConfig");function ey(e,t,n,i){return e.map(r=>{let o=U(r.config.type,Ea)??"ecs",a={name:r.resourceName,type:o,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return C0(a,r,t,n),N0(a,r),Jb(a,r.config.services,i.database),Qb(a,r.config.services,i.s3),a})}pr(ey,"convertComputeResources");import*as Et from"typescript";var T6=Object.defineProperty,$6=(e,t)=>T6(e,"name",{value:t,configurable:!0});function Hl(e){return Oe(e,t=>{if(!Et.isCallExpression(t)||!$e(t,"addSchedule")||t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Et.isStringLiteral(n)||!Et.isObjectLiteralExpression(i))return null;let r=B(i),o=b(r.schedule);if(o===void 0)return null;let a=i.properties.find(c=>Et.isPropertyAssignment(c)&&Et.isIdentifier(c.name)&&c.name.text==="target");return!a||!Et.isPropertyAssignment(a)||!Et.isIdentifier(a.initializer)?null:{id:n.text,schedule:o,targetVariableName:a.initializer.text}})}$6(Hl,"findSchedules");import*as te from"typescript";import*as Ge from"typescript";var R6=Object.defineProperty,ns=(e,t)=>R6(e,"name",{value:t,configurable:!0}),ty=new Set(["S3Bucket"]);function P0(e,t,n){let i=Ge.isIdentifier(e.name)?e.name.text:"";if(t.arguments&&t.arguments.length>=2){let r=t.arguments[1],o=Ge.isStringLiteral(r)?r.text:"",a=t.arguments.length>=3?t.arguments[2]:void 0,c=a&&Ge.isObjectLiteralExpression(a)?B(a):{};return{variableName:i,resourceName:o,bucketClass:n,config:c,node:e}}return null}ns(P0,"extractS3Resource");function w0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Ge.isStringLiteral(n)||!Ge.isObjectLiteralExpression(i))return null;let r=B(i);return{variableName:st(e)??"",resourceName:n.text,bucketClass:"StorageFactory",config:r,node:e}}ns(w0,"extractS3FactoryResource");function ry(e){return Oe(e,t=>{if(!Ge.isVariableDeclaration(t)||!t.initializer||!Ge.isNewExpression(t.initializer))return null;let n=t.initializer;if(!Ge.isIdentifier(n.expression))return null;let i=n.expression.text;return ty.has(i)?P0(t,n,i):null})}ns(ry,"findS3Resources");function ny(e){return Oe(e,t=>{if(!Ge.isCallExpression(t)||!$e(t,"addStorage"))return null;let n=t.arguments[0];return Ve(n,"StorageFactory")?w0(t,n):null})}ns(ny,"findS3FactoryResources");function iy(e){return e.map(t=>({name:t.resourceName,...b(t.config.bucketName)&&{bucketName:b(t.config.bucketName)},...z(t.config.publicReadAccess)===!0&&{publicReadAccess:!0},...N(t.config.websiteHosting)&&(()=>{let n=t.config.websiteHosting;return{websiteHosting:{indexDocument:b(n.indexDocument)??"index.html",...b(n.errorDocument)&&{errorDocument:b(n.errorDocument)}}}})(),...U(t.config.backupVaultTier,Rt)&&{backupVaultTier:U(t.config.backupVaultTier,Rt)},...z(t.config.versioned)!==void 0&&{versioned:z(t.config.versioned)},...U(t.config.encryption,Bi)&&{encryption:U(t.config.encryption,Bi)},...b(t.config.kmsKeyArn)&&{kmsKeyArn:b(t.config.kmsKeyArn)},...Array.isArray(t.config.cors)&&t.config.cors.length>0&&{cors:t.config.cors.filter(N).map(n=>({allowedOrigins:Array.isArray(n.allowedOrigins)?n.allowedOrigins.filter(i=>typeof i=="string"):[],allowedMethods:Array.isArray(n.allowedMethods)?n.allowedMethods.filter(i=>typeof i=="string"):[]}))},...N(t.config.deployment)&&(()=>{let n=t.config.deployment;return{deployment:{source:b(n.source)??"",...z(n.prune)!==void 0&&{prune:z(n.prune)},...N(n.cacheControl)&&(()=>{let i=n.cacheControl;return{cacheControl:{...C(i.maxAge)!==void 0&&{maxAge:C(i.maxAge)},...z(i.immutable)!==void 0&&{immutable:z(i.immutable)}}}})()}}})(),...U(t.config.stackPlacement,ml)&&{stackPlacement:U(t.config.stackPlacement,ml)},...t.variableName&&{variableName:t.variableName},...(()=>{let n=new Set(["bucketName","publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors","deployment","stackPlacement"]),i=de(t.config,n);return i.length>0?{extraProperties:i}:{}})()}))}ns(iy,"convertS3Resources");var C6=Object.defineProperty,On=(e,t)=>C6(e,"name",{value:t,configurable:!0}),k0=new Set(["App","Architecture","DatabaseFactory","StorageFactory","ComputeFactory","getConfig","MessagingFactory","CdnFactory","Code","Runtime","FunctionUrlAuthType","NetworkFactory","PatternFactory","CrossPlanConnectionFactory"]);function Yl(e){return!!(e.startsWith("@fjall/")||e==="aws-cdk-lib"||e.startsWith("aws-cdk-lib/")||e==="constructs")}On(Yl,"isManagedModuleSpecifier");function Qe(e){let t=[];for(let n of e.statements){let i=n.getFullStart(),r=n.getEnd();if(te.isImportDeclaration(n)){t.push({type:"import",node:n,startPos:i,endPos:r,isManaged:O0(n)});continue}if(te.isVariableStatement(n)){t.push(D0(n,i,r));continue}if(te.isExpressionStatement(n)){t.push(M0(n,i,r));continue}t.push({type:"custom",node:n,startPos:i,endPos:r,isManaged:!1})}return t}On(Qe,"classifyStatements");function O0(e){return te.isStringLiteral(e.moduleSpecifier)?Yl(e.moduleSpecifier.text):!1}On(O0,"isManagedImport");function D0(e,t,n){for(let i of e.declarationList.declarations)if(i.initializer){if(Zt(i.initializer))return{type:"app-init",node:e,resourceName:te.isIdentifier(i.name)?i.name.text:void 0,startPos:t,endPos:n,isManaged:!0};if(te.isIdentifier(i.name)&&i.name.text==="appName"&&te.isStringLiteral(i.initializer))return{type:"app-init",node:e,startPos:t,endPos:n,isManaged:!0};if(te.isNewExpression(i.initializer)){let r=i.initializer;if(te.isIdentifier(r.expression)){let o=r.expression.text;if(ty.has(o)){let a=r.arguments&&r.arguments.length>=2&&te.isStringLiteral(r.arguments[1])?r.arguments[1].text:void 0;return{type:"storage",node:e,resourceName:a,startPos:t,endPos:n,isManaged:!0}}}}if(te.isCallExpression(i.initializer)){let r=oy(i.initializer,e,t,n);if(r.type!=="custom")return r}}return{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}On(D0,"classifyVariableStatement");function M0(e,t,n){let i=e.expression;return te.isCallExpression(i)?oy(i,e,t,n):{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}On(M0,"classifyExpressionStatement");function oy(e,t,n,i){let r=e.expression;if(te.isPropertyAccessExpression(r)&&te.isIdentifier(r.expression)){let o=r.name.text;if(o==="addTags")return{type:"tags",node:t,startPos:n,endPos:i,isManaged:!0};let a={addDatabase:{type:"database",factory:"DatabaseFactory"},addCompute:{type:"compute",factory:"ComputeFactory"},addNetwork:{type:"network",factory:"NetworkFactory"},addMessaging:{type:"messaging",factory:"MessagingFactory"},addCdn:{type:"cdn",factory:"CdnFactory"},addPattern:{type:"pattern",factory:"PatternFactory"},addStorage:{type:"storage",factory:"StorageFactory"}}[o];if(a){let c=j0(e,a.factory);return{type:a.type,node:t,resourceName:c,startPos:n,endPos:i,isManaged:!0}}}return{type:"custom",node:t,startPos:n,endPos:i,isManaged:!1}}On(oy,"classifyCallExpression");function j0(e,t){if(e.arguments.length===0)return;let n=e.arguments[0];if(!te.isCallExpression(n))return;let i=n.expression;if(!te.isPropertyAccessExpression(i)||i.name.text!=="build"||!te.isIdentifier(i.expression)||i.expression.text!==t||n.arguments.length===0)return;let r=n.arguments[0];if(te.isStringLiteral(r))return r.text}On(j0,"extractResourceNameFromFactoryCall");import*as z0 from"typescript";var N6=Object.defineProperty,Dn=(e,t)=>N6(e,"name",{value:t,configurable:!0}),P6={import:"after-imports","app-init":"after-app-init",tags:"after-tags"};function L0(e){if(!e)return{position:"before-imports"};let t=P6[e.type];return t?{position:t}:{position:"after-resource",afterManagedResource:{type:e.type,name:e.resourceName}}}Dn(L0,"determineCustomBlockPosition");function is(e,t){let n=t??Qe(e),i=[],r=e.getFullText(),o=null;for(let a of n)if(a.type==="custom"&&!a.isManaged){let{position:c,afterManagedResource:u}=L0(o),l=U0(r,a.node),d=F0(r,a.node),p=e.getLineAndCharacterOfPosition(a.node.getStart());i.push({sourceText:l,position:c,afterManagedResource:u,originalLine:p.line+1,leadingComments:d.length>0?d:void 0})}else a.isManaged&&(o=a);return i}Dn(is,"extractCustomCodeBlocks");function U0(e,t){let n=t.getFullStart(),i=t.getEnd(),r=e.slice(n,i).split(`
435
+ `,n}ur(Ml,"generateCDNCode");function jl(e){let t=new Set;if(e.cdn&&(e.cdn.defaultOriginRef&&t.add(e.cdn.defaultOriginRef),e.cdn.behaviours))for(let n of e.cdn.behaviours)t.add(n.originRef);return t}ur(jl,"collectCdnReferencedResources");function zl(e){return e.patternConfig!==void 0}ur(zl,"usesPatternApproach");var d6=Object.defineProperty,kn=(e,t)=>d6(e,"name",{value:t,configurable:!0}),qa="service",Fb="0 4 * * ? *",Bb="0 5 * * ? *",lr=Object.freeze({tinkerer:{displayName:"Tinkerer",description:"Free tier eligible, minimal cost for experimentation",database:{Instance:{instanceType:"t4g.micro",multiAz:!1,proxy:!1,readReplica:!1,publiclyAccessible:!0},Aurora:null,GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:qa,capacityProvider:"EC2",desiredCount:1,minCapacity:1,maxCapacity:1,ec2Config:{instanceType:"t4g.micro",amiHardwareType:"ARM",minCapacity:1,maxCapacity:1,memoryLimitMiB:400}}],cluster:{directAccess:!0}},lambda:{timeout:30,memory:128}},network:{maxAzs:2,natGateways:!1,flowLogs:!1},backup:!1},lightweight:{displayName:"Lightweight",description:"Streamlined single-AZ deployment for cost efficiency",database:{Instance:{instanceType:"t4g.small",multiAz:!1},Aurora:{readers:!1},GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:qa,capacityProvider:"FARGATE_SPOT",cpu:256,memoryLimitMiB:512,desiredCount:1,minCapacity:1,maxCapacity:3}]},lambda:{timeout:30,memory:256}},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready with sensible defaults",database:{Instance:{instanceType:"t4g.large"},Aurora:{readers:{count:1}},GlobalAurora:{readers:{count:1}},ClickHouse:{instanceType:"t4g.medium",coldTier:{mode:"s3"},optimiseSchedule:Fb,backupSchedule:Bb,backupRetentionDays:14}},compute:{ecs:{services:[{name:qa,capacityProvider:"FARGATE",cpu:512,memoryLimitMiB:1024,desiredCount:2,minCapacity:2,maxCapacity:5}]},lambda:{timeout:60,memory:256}},network:{maxAzs:3,natGateways:{count:1},flowLogs:{},vpcEndpoints:{interface:{ecr:!0}}},backup:!1},resilient:{displayName:"Resilient",description:"High availability with enhanced monitoring and scaling",database:{Instance:{instanceType:"r7g.large",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.large",coldTier:{mode:"s3"},optimiseSchedule:Fb,backupSchedule:Bb,backupRetentionDays:14}},compute:{ecs:{services:[{name:qa,capacityProvider:"FARGATE",cpu:1024,memoryLimitMiB:2048,desiredCount:4,minCapacity:4,maxCapacity:20}]},lambda:{timeout:120,memory:512}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0}}},backup:{tier:"resilient"}},enterprise:{displayName:"Enterprise",description:"Maximum capability with all features enabled",database:{Instance:{instanceType:"r7g.xlarge",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},readReplica:{}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.xlarge",coldTier:{mode:"s3"},optimiseSchedule:Fb,backupSchedule:Bb,backupRetentionDays:30}},compute:{ecs:{services:[{name:qa,capacityProvider:"FARGATE",cpu:2048,memoryLimitMiB:4096,desiredCount:6,minCapacity:6,maxCapacity:100}]},lambda:{timeout:300,memory:1024}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{destination:"s3",retentionDays:365},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0,kms:!0,cloudwatchLogs:!0}}},backup:{tier:"enterprise"}}});function m6(e,t){return lr[e].database[t]}kn(m6,"getDatabasePreset");function p6(e){return lr[e].compute.ecs}kn(p6,"getEcsPreset");function Vb(e){return lr[e].network}kn(Vb,"getNetworkPreset");function f0(e){return Wu.filter(t=>lr[t].database[e]!==null)}kn(f0,"getAvailableTiersForDatabase");function f6(e){return f0(e).map(t=>({label:lr[t].displayName,value:t,description:lr[t].description}))}kn(f6,"getTierOptionsForDatabase");function Gb(e){switch(e){case"tinkerer":case"lightweight":case"standard":return"Instance";case"resilient":case"enterprise":return"Aurora"}}kn(Gb,"getDefaultDatabaseTypeForTier");function Zb(e,t){let n=lr[e].compute.ecs,i=n.services[0],r=!n.cluster?.directAccess&&n.cluster?.loadBalancer!==!1,o=t.filter(c=>c.serviceType!=="worker").length,a=t.findIndex(c=>c.serviceType!=="worker");return t.map((c,u)=>{let l=u===a,d=c.serviceType==="worker",p;return r&&!d&&(c.routing?p=c.routing:o>1&&(p={path:l?"/*":`/${c.name.toLowerCase()}/*`,...l?{}:{priority:100+u}})),{name:c.name,capacityProvider:i.capacityProvider,ec2Config:i.ec2Config,cpu:i.cpu,memoryLimitMiB:i.memoryLimitMiB,desiredCount:i.desiredCount,minCapacity:i.minCapacity,maxCapacity:i.maxCapacity,routing:p}})}kn(Zb,"applyTierDefaultsToServices");var g6=Object.defineProperty,Wb=(e,t)=>g6(e,"name",{value:t,configurable:!0}),Xa=["lightweight","standard","resilient"],h6=[...Xa,"custom"],Fr=Object.freeze({lightweight:{displayName:"Lightweight",description:"Cost-effective \xB7 Instance DB, minimal Lambda",database:{type:"Instance",instanceType:"t4g.small",backupRetention:7,deletionProtection:!1},compute:{memorySize:512,timeout:30},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready \xB7 Instance DB, balanced Lambda",database:{type:"Instance",instanceType:"t4g.large",backupRetention:14,deletionProtection:!0},compute:{memorySize:1536,timeout:60},network:{maxAzs:3,natGateways:{count:1},flowLogs:{}},backup:{tier:"standard"}},resilient:{displayName:"Resilient",description:"High-availability \xB7 Aurora V2, KMS encryption",database:{type:"Aurora",backupRetention:30,deletionProtection:!0,encryption:{useCMK:!0}},compute:{memorySize:2048,timeout:120},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90}},backup:{tier:"resilient"}}});function Ll(e){return Fr[e]}Wb(Ll,"getPatternTierPreset");function g0(){return[{label:Fr.standard.displayName,value:"standard",description:Fr.standard.description},{label:Fr.lightweight.displayName,value:"lightweight",description:Fr.lightweight.description},{label:Fr.resilient.displayName,value:"resilient",description:Fr.resilient.description},{label:"Custom",value:"custom",description:"Full control \xB7 Configure everything"}]}Wb(g0,"getPatternTierOptions");var v6=new Set(Xa);function Ul(e){return v6.has(e)}Wb(Ul,"isPatternTierName");var b6=Object.defineProperty,h0=(e,t)=>b6(e,"name",{value:t,configurable:!0}),Fl=Object.freeze({standard:{},assets:{versioned:!0,deployment:{source:"./assets"}},upload:{versioned:!0,cors:[{allowedOrigins:["*"],allowedMethods:["GET","PUT","POST"]}]},website:{publicReadAccess:!0,websiteHosting:{indexDocument:"index.html",errorDocument:"error.html"}}});function v0(e){return{...Fl[e]}}h0(v0,"getStoragePreset");function b0(){return[{label:"Standard",value:"standard"},{label:"Assets",value:"assets"},{label:"Upload",value:"upload"},{label:"Website Hosting",value:"website"}]}h0(b0,"getStoragePresetOptions");import*as ye from"typescript";import*as D from"typescript";var y6=Object.defineProperty,Xi=(e,t)=>y6(e,"name",{value:t,configurable:!0});function B(e){let t={};for(let n of e.properties){if(!D.isPropertyAssignment(n))continue;let i=D.isIdentifier(n.name)||D.isStringLiteral(n.name)?n.name.text:void 0;i!==void 0&&(t[i]=Br(n.initializer))}return t}Xi(B,"parseObjectLiteral");function Br(e){if(D.isStringLiteral(e))return e.text;if(D.isNumericLiteral(e))return Number(e.text);if(e.kind===D.SyntaxKind.TrueKeyword)return!0;if(e.kind===D.SyntaxKind.FalseKeyword)return!1;if(D.isArrayLiteralExpression(e))return e.elements.map(t=>Br(t));if(D.isObjectLiteralExpression(e))return B(e);if(D.isIdentifier(e))return{__identifier:e.text};if(D.isPropertyAccessExpression(e))return{__expression:e.getText()};if(D.isCallExpression(e))return{__call:e.getText()};if(D.isBinaryExpression(e)&&e.operatorToken.kind===D.SyntaxKind.BarBarToken){let t=Br(e.left),n=Br(e.right);return typeof n=="string"?n:t}else if(D.isConditionalExpression(e)){let t=Br(e.whenTrue),n=Br(e.whenFalse);return typeof n=="string"||typeof n=="number"?n:t}else if(D.isTemplateExpression(e)||D.isNoSubstitutionTemplateLiteral(e))return{__expression:e.getText()};return{__unknown:e.getText()}}Xi(Br,"evaluateExpression");function Ja(e,t){return at(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer){if(D.isStringLiteral(i.initializer))return i.initializer.text;if(D.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer);return JSON.stringify(r)}}}})}Xi(Ja,"findVariableValue");function Hb(e,t){return at(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer&&D.isObjectLiteralExpression(i.initializer))return B(i.initializer)}})}Xi(Hb,"findObjectDeclaration");function Qa(e,t){if(!D.isIdentifier(t.expression))return;let n=Hb(e,t.expression.text),i=t.name.text;if(n&&n[i]!==void 0)return String(n[i])}Xi(Qa,"evaluatePropertyAccess");function Bl(e,t){let n=t.head.text;for(let i of t.templateSpans){if(D.isIdentifier(i.expression)){let r=Ja(e,i.expression.text);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else if(D.isPropertyAccessExpression(i.expression)){let r=Qa(e,i.expression);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else return t.getText(e).replace(/^`|`$/g,"");n+=i.literal.text}return n}Xi(Bl,"resolveTemplateLiteral");var S6=Object.defineProperty,ee=(e,t)=>S6(e,"name",{value:t,configurable:!0});function yt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}ee(yt,"isPlainObject");function dr(e){return yt(e)&&"__identifier"in e}ee(dr,"isIdentifierRef");function Vr(e){return yt(e)&&"__expression"in e}ee(Vr,"isExpressionRef");function Ct(e){return yt(e)&&"__call"in e}ee(Ct,"isCallRef");function N(e){return yt(e)&&!("__identifier"in e)&&!("__expression"in e)&&!("__call"in e)&&!("__unknown"in e)}ee(N,"isParsedObject");function b(e){return typeof e=="string"?e:void 0}ee(b,"asString");function C(e){return typeof e=="number"?e:void 0}ee(C,"asNumber");function z(e){return typeof e=="boolean"?e:void 0}ee(z,"asBoolean");function me(e){if(!Array.isArray(e))return;let t=[];for(let n of e)typeof n=="string"&&t.push(n);return t.length>0?t:void 0}ee(me,"asStringArray");function U(e,t){let n=b(e);if(n!==void 0)return ht(t,n)?n:void 0}ee(U,"asStringUnion");function Qe(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i);return t}ee(Qe,"omitUndefined");function Vl(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(Vl).join(", ")}]`;if(!yt(e))return String(e);if(dr(e))return e.__identifier;if(Vr(e))return e.__expression;if(Ct(e))return e.__call;if("__unknown"in e&&typeof e.__unknown=="string")return e.__unknown;let t=Object.entries(e);return t.length===0?"{}":`{ ${t.map(([n,i])=>`${n}: ${Vl(i)}`).join(", ")} }`}ee(Vl,"parsedValueToSourceText");function de(e,t){let n=[];for(let[i,r]of Object.entries(e))t.has(i)||r===void 0||n.push({key:i,sourceText:Vl(r)});return n}ee(de,"captureExtraProperties");function Gr(e,t){return ye.isPropertyAssignment(e)&&ye.isIdentifier(e.name)&&e.name.text===t}ee(Gr,"isNamedProperty");function Zt(e){return ye.isCallExpression(e)&&ye.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="getApp"&&ye.isIdentifier(e.expression.expression)&&e.expression.expression.text==="App"}ee(Zt,"isAppGetAppCall");function $e(e,t){let{expression:n}=e;return ye.isPropertyAccessExpression(n)&&n.name.text===t&&e.arguments.length>0}ee($e,"isFactoryMethodCall");function at(e,t){let n,i=ee(r=>{n===void 0&&(n=t(r),n===void 0&&ye.forEachChild(r,i))},"visit");return i(e),n}ee(at,"findFirstInAst");function Oe(e,t){let n=[],i=ee(r=>{let o=t(r);o!==null&&n.push(o),ye.forEachChild(r,i)},"visit");return i(e),n}ee(Oe,"collectFromAst");function Ge(e,t){return ye.isCallExpression(e)&&ye.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="build"&&ye.isIdentifier(e.expression.expression)&&e.expression.expression.text===t}ee(Ge,"isFactoryBuildCall");function st(e){let t=e.parent;if(ye.isVariableDeclaration(t)&&ye.isIdentifier(t.name))return t.name.text}ee(st,"extractVariableName");var St=ee(()=>e=>e,"typed");function Ji(e){if(e!=null){if(e===!1)return!1;if(typeof e=="object"&&!Array.isArray(e))return e}}ee(Ji,"asObjectOrFalse");function mr(e,t){return e===!1?!1:N(e)?t(e):void 0}ee(mr,"parseBooleanOrConfig");function De(e,t){return N(e)?t(e):void 0}ee(De,"parseOptionalConfig");function _t(e,t,n){let i=e[t];return N(i)?n(i):void 0}ee(_t,"extractSubConfig");import*as Y from"typescript";import*as Qi from"typescript";var _6=Object.defineProperty,ct=(e,t)=>_6(e,"name",{value:t,configurable:!0});function es(e){return e!==void 0&&yt(e)}ct(es,"isEnvironmentRecord");function y0(e){if(!N(e))return;let t={};for(let[n,i]of Object.entries(e))if(N(i)){let r=b(i.id),o=b(i.name);r&&o&&(t[n]={id:r,name:o,field:b(i.field)})}return Object.keys(t).length>0?t:void 0}ct(y0,"parseContainerSecretsImport");function S0(e){if(!N(e))return;let t=me(e.command);if(!(!t||t.length===0))return{command:t,interval:C(e.interval),timeout:C(e.timeout),retries:C(e.retries),startPeriod:C(e.startPeriod)}}ct(S0,"parseContainerHealthCheck");function _0(e){let t=de(e,new Set(["name","image","port","environment","essential","command","entryPoint","secretsImport","secrets","healthCheck"]));return{name:b(e.name),image:b(e.image),port:C(e.port),environment:es(e.environment)?e.environment:void 0,essential:z(e.essential),command:me(e.command),entryPoint:me(e.entryPoint),secretsImport:y0(e.secretsImport),ssmSecrets:me(e.secrets),healthCheck:S0(e.healthCheck),extraProperties:t.length>0?t:void 0}}ct(_0,"parseServiceContainer");function E0(e){if(Array.isArray(e))return e.filter(N).map(t=>({path:b(t.path),host:b(t.host),priority:C(t.priority),healthCheckPath:b(t.healthCheckPath)}));if(N(e))return{path:b(e.path),host:b(e.host),priority:C(e.priority),healthCheckPath:b(e.healthCheckPath)}}ct(E0,"parseServiceRouting");function x0(e){if(e===!1)return!1;if(N(e))return{minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),desiredCount:C(e.desiredCount),scalingType:U(e.scalingType,qu)}}ct(x0,"parseServiceScaling");var E6=new Set(["instanceType","amiHardwareType","minCapacity","maxCapacity","memoryLimitMiB","warmPool"]);function A0(e){if(!N(e))return;let t=e.warmPool,n=N(t)?{minSize:C(t.minSize),reuseOnScaleIn:z(t.reuseOnScaleIn)}:void 0,i=de(e,E6);return{instanceType:b(e.instanceType),amiHardwareType:U(e.amiHardwareType,Xu),minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),memoryLimitMiB:C(e.memoryLimitMiB),warmPool:n,extraProperties:i.length>0?i:void 0}}ct(A0,"parseServiceEc2Config");var x6=new Set(["domain","loadBalancer","directAccess"]);function Yb(e){if(!N(e))return;let t=e.loadBalancer,n=de(e,x6);return{domain:b(e.domain),loadBalancer:t===!1?!1:U(t,Ku),directAccess:z(e.directAccess),...n.length>0&&{extraProperties:n}}}ct(Yb,"extractClusterConfig");function Kb(e){let t=e.containers,n=Array.isArray(t)?t.filter(N).map(_0):void 0,i=de(e,new Set(["name","image","docker","ssmSecretsPath","containers","routing","connections","serviceType","cpu","memoryLimitMiB","desiredCount","scaling","capacityProvider","ec2Config"]));return{name:b(e.name)??"",image:b(e.image),docker:I0(e.docker),ssmSecretsPath:b(e.ssmSecretsPath),containers:n,routing:E0(e.routing),serviceType:U(e.serviceType,Aa),cpu:C(e.cpu),memoryLimitMiB:C(e.memoryLimitMiB),desiredCount:C(e.desiredCount),scaling:x0(e.scaling),capacityProvider:U(e.capacityProvider,zi)??"FARGATE",ec2Config:A0(e.ec2Config),...i.length>0&&{extraProperties:i}}}ct(Kb,"parseEcsService");function I0(e){if(!N(e))return;let t=b(e.path);if(t===void 0)return;let n=b(e.context),i=b(e.target);return{path:t,...n!==void 0&&{context:n},...i!==void 0&&{target:i}}}ct(I0,"parseServiceDocker");function ts(e,t){let n=b(e);if(n)return n;if(Vr(e)&&e.__expression.startsWith(t+"."))return e.__expression.slice(t.length+1)}ct(ts,"extractEnumString");function qb(e){return Ct(e)?e.__call.match(/\(\s*"([^"]+)"\s*\)/)?.[1]:void 0}ct(qb,"extractCallStringArg");function Me(e,t,n){n!==void 0&&(e[t]=n)}ct(Me,"assignIfDefined");var A6=Object.defineProperty,Gl=(e,t)=>A6(e,"name",{value:t,configurable:!0}),I6=10;function Xb(e,t){return Array.isArray(e)?e.filter(dr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}Gl(Xb,"resolveConnectedDatabaseNames");function Jb(e,t){return Array.isArray(e)?e.filter(dr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}Gl(Jb,"resolveConnectedStorageNames");function Qb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!N(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];if(!N(o)||!N(o.environment))return;let a=o.environment;(a.DATABASE_HOST||a.DATABASE_PORT||a.DATABASE_NAME)&&(e.needsConnection=!0,n.length>0&&(e.connectedDatabase??[]).length===0&&(e.connectedDatabase=[n[0].name]));for(let c=1;c<=I6;c++)(a[`DATABASE_HOST_${c}`]||a[`DATABASE_PORT_${c}`]||a[`DATABASE_NAME_${c}`])&&(e.needsConnection=!0)}Gl(Qb,"inferDatabaseConnectionsFromEnv");function ey(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!N(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];!N(o)||!N(o.environment)||o.environment.BUCKET_NAME&&n.length>0&&(e.connectedStorage??[]).length===0&&(e.connectedStorage=[n[0].name])}Gl(ey,"inferStorageConnectionsFromEnv");var T6=Object.defineProperty,pr=(e,t)=>T6(e,"name",{value:t,configurable:!0});function T0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];if(!Qi.isStringLiteral(t)||!Qi.isObjectLiteralExpression(n))return null;let i=t.text,r=B(n);return{resourceName:i,type:b(r.type)??"ecs",config:r,node:e}}pr(T0,"extractComputeResource");function Zl(e){return Oe(e,t=>{if(!Qi.isCallExpression(t)||!$e(t,"addCompute"))return null;let n=t.arguments[0];if(!Ge(n,"ComputeFactory"))return null;let i=T0(n);if(i){let r=st(t);r&&(i.variableName=r)}return i})}pr(Zl,"findComputeResources");function Wl(e,t,n){let i=de(e.config,n);i.length>0&&(t.extraProperties=i)}pr(Wl,"applyExtras");function $0(e,t){let n=e.config.docker;if(N(n)){let o=b(n.path),a=b(n.context),c=b(n.target);(o!==void 0||a!==void 0||c!==void 0)&&(t.docker={...o!==void 0&&{path:o},...a!==void 0&&{context:a},...c!==void 0&&{target:c}})}let i=e.config.cluster;i!==void 0&&(t.cluster=Yb(i));let r=e.config.services;r!==void 0&&Array.isArray(r)&&(t.services=r.filter(o=>N(o)).map(Kb)),Wl(e,t,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}pr($0,"convertEcsCompute");function R0(e,t){if(Me(t,"deployment",U(e.config.deployment,Hu)),Me(t,"timeout",C(e.config.timeout)),Me(t,"memory",C(e.config.memorySize)??C(e.config.memory)),Me(t,"handler",b(e.config.handler)),Me(t,"runtime",ts(e.config.runtime,"Runtime")),es(e.config.environment)&&(t.environment=e.config.environment),es(e.config.secrets))t.secrets=e.config.secrets;else{let r=me(e.config.secrets);r&&(t.ssmSecrets=r)}let n=e.config.functionUrl;if(N(n)){let r=U(ts(n.authType,"FunctionUrlAuthType"),xa);r!==void 0&&(t.functionUrl={authType:r})}let i=e.config.code;if(i!==void 0){let r=qb(i);r&&(t.codePath=r)}Me(t,"description",b(e.config.lambdaDescription)),Me(t,"architecture",U(ts(e.config.architecture,"Architecture"),Yu)),Me(t,"ephemeralStorageSize",C(e.config.ephemeralStorageSize)),Me(t,"functionName",b(e.config.functionName)),Me(t,"ssmSecretsPath",b(e.config.ssmSecretsPath)),Wl(e,t,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}pr(R0,"convertLambdaCompute");function C0(e,t){Me(t,"instanceType",U(e.config.instanceType,Ju));let n=e.config.ssh;n===!1?t.enableSSH=!1:n!==void 0&&N(n)?t.enableSSH=!0:Me(t,"enableSSH",z(e.config.enableSSH)),Me(t,"keyName",b(e.config.keyName)),Me(t,"userData",b(e.config.userData)),e.config.securityGroups!==void 0&&(t.securityGroups=me(e.config.securityGroups)),Wl(e,t,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}pr(C0,"convertEc2Compute");function N0(e,t,n,i){let r=t.config.connections;if(!r&&Array.isArray(t.config.services)){let c=t.config.services[0];N(c)&&(r=c.connections)}if(!r)return;let o=Xb(r,n);o.length>0&&(e.needsConnection=!0,e.connectedDatabase=o);let a=Jb(r,i);a.length>0&&(e.connectedStorage=a)}pr(N0,"applyConnectionConfig");function P0(e,t){({ecs:$0,lambda:R0,ec2:C0})[e.type]?.(t,e)}pr(P0,"applyTypeSpecificConfig");function ty(e,t,n,i){return e.map(r=>{let o=U(r.config.type,_a)??"ecs",a={name:r.resourceName,type:o,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return N0(a,r,t,n),P0(a,r),Qb(a,r.config.services,i.database),ey(a,r.config.services,i.s3),a})}pr(ty,"convertComputeResources");import*as Et from"typescript";var $6=Object.defineProperty,R6=(e,t)=>$6(e,"name",{value:t,configurable:!0});function Hl(e){return Oe(e,t=>{if(!Et.isCallExpression(t)||!$e(t,"addSchedule")||t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Et.isStringLiteral(n)||!Et.isObjectLiteralExpression(i))return null;let r=B(i),o=b(r.schedule);if(o===void 0)return null;let a=i.properties.find(c=>Et.isPropertyAssignment(c)&&Et.isIdentifier(c.name)&&c.name.text==="target");return!a||!Et.isPropertyAssignment(a)||!Et.isIdentifier(a.initializer)?null:{id:n.text,schedule:o,targetVariableName:a.initializer.text}})}R6(Hl,"findSchedules");import*as te from"typescript";import*as Ze from"typescript";var C6=Object.defineProperty,rs=(e,t)=>C6(e,"name",{value:t,configurable:!0}),ry=new Set(["S3Bucket"]);function w0(e,t,n){let i=Ze.isIdentifier(e.name)?e.name.text:"";if(t.arguments&&t.arguments.length>=2){let r=t.arguments[1],o=Ze.isStringLiteral(r)?r.text:"",a=t.arguments.length>=3?t.arguments[2]:void 0,c=a&&Ze.isObjectLiteralExpression(a)?B(a):{};return{variableName:i,resourceName:o,bucketClass:n,config:c,node:e}}return null}rs(w0,"extractS3Resource");function k0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Ze.isStringLiteral(n)||!Ze.isObjectLiteralExpression(i))return null;let r=B(i);return{variableName:st(e)??"",resourceName:n.text,bucketClass:"StorageFactory",config:r,node:e}}rs(k0,"extractS3FactoryResource");function ny(e){return Oe(e,t=>{if(!Ze.isVariableDeclaration(t)||!t.initializer||!Ze.isNewExpression(t.initializer))return null;let n=t.initializer;if(!Ze.isIdentifier(n.expression))return null;let i=n.expression.text;return ry.has(i)?w0(t,n,i):null})}rs(ny,"findS3Resources");function iy(e){return Oe(e,t=>{if(!Ze.isCallExpression(t)||!$e(t,"addStorage"))return null;let n=t.arguments[0];return Ge(n,"StorageFactory")?k0(t,n):null})}rs(iy,"findS3FactoryResources");function oy(e){return e.map(t=>({name:t.resourceName,...b(t.config.bucketName)&&{bucketName:b(t.config.bucketName)},...z(t.config.publicReadAccess)===!0&&{publicReadAccess:!0},...N(t.config.websiteHosting)&&(()=>{let n=t.config.websiteHosting;return{websiteHosting:{indexDocument:b(n.indexDocument)??"index.html",...b(n.errorDocument)&&{errorDocument:b(n.errorDocument)}}}})(),...U(t.config.backupVaultTier,Rt)&&{backupVaultTier:U(t.config.backupVaultTier,Rt)},...z(t.config.versioned)!==void 0&&{versioned:z(t.config.versioned)},...U(t.config.encryption,Bi)&&{encryption:U(t.config.encryption,Bi)},...b(t.config.kmsKeyArn)&&{kmsKeyArn:b(t.config.kmsKeyArn)},...Array.isArray(t.config.cors)&&t.config.cors.length>0&&{cors:t.config.cors.filter(N).map(n=>({allowedOrigins:Array.isArray(n.allowedOrigins)?n.allowedOrigins.filter(i=>typeof i=="string"):[],allowedMethods:Array.isArray(n.allowedMethods)?n.allowedMethods.filter(i=>typeof i=="string"):[]}))},...N(t.config.deployment)&&(()=>{let n=t.config.deployment;return{deployment:{source:b(n.source)??"",...z(n.prune)!==void 0&&{prune:z(n.prune)},...N(n.cacheControl)&&(()=>{let i=n.cacheControl;return{cacheControl:{...C(i.maxAge)!==void 0&&{maxAge:C(i.maxAge)},...z(i.immutable)!==void 0&&{immutable:z(i.immutable)}}}})()}}})(),...U(t.config.stackPlacement,ml)&&{stackPlacement:U(t.config.stackPlacement,ml)},...t.variableName&&{variableName:t.variableName},...(()=>{let n=new Set(["bucketName","publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors","deployment","stackPlacement"]),i=de(t.config,n);return i.length>0?{extraProperties:i}:{}})()}))}rs(oy,"convertS3Resources");var N6=Object.defineProperty,On=(e,t)=>N6(e,"name",{value:t,configurable:!0}),O0=new Set(["App","Architecture","DatabaseFactory","StorageFactory","ComputeFactory","getConfig","MessagingFactory","CdnFactory","Code","Runtime","FunctionUrlAuthType","NetworkFactory","PatternFactory","CrossPlanConnectionFactory"]);function Yl(e){return!!(e.startsWith("@fjall/")||e==="aws-cdk-lib"||e.startsWith("aws-cdk-lib/")||e==="constructs")}On(Yl,"isManagedModuleSpecifier");function et(e){let t=[];for(let n of e.statements){let i=n.getFullStart(),r=n.getEnd();if(te.isImportDeclaration(n)){t.push({type:"import",node:n,startPos:i,endPos:r,isManaged:D0(n)});continue}if(te.isVariableStatement(n)){t.push(M0(n,i,r));continue}if(te.isExpressionStatement(n)){t.push(j0(n,i,r));continue}t.push({type:"custom",node:n,startPos:i,endPos:r,isManaged:!1})}return t}On(et,"classifyStatements");function D0(e){return te.isStringLiteral(e.moduleSpecifier)?Yl(e.moduleSpecifier.text):!1}On(D0,"isManagedImport");function M0(e,t,n){for(let i of e.declarationList.declarations)if(i.initializer){if(Zt(i.initializer))return{type:"app-init",node:e,resourceName:te.isIdentifier(i.name)?i.name.text:void 0,startPos:t,endPos:n,isManaged:!0};if(te.isIdentifier(i.name)&&i.name.text==="appName"&&te.isStringLiteral(i.initializer))return{type:"app-init",node:e,startPos:t,endPos:n,isManaged:!0};if(te.isNewExpression(i.initializer)){let r=i.initializer;if(te.isIdentifier(r.expression)){let o=r.expression.text;if(ry.has(o)){let a=r.arguments&&r.arguments.length>=2&&te.isStringLiteral(r.arguments[1])?r.arguments[1].text:void 0;return{type:"storage",node:e,resourceName:a,startPos:t,endPos:n,isManaged:!0}}}}if(te.isCallExpression(i.initializer)){let r=ay(i.initializer,e,t,n);if(r.type!=="custom")return r}}return{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}On(M0,"classifyVariableStatement");function j0(e,t,n){let i=e.expression;return te.isCallExpression(i)?ay(i,e,t,n):{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}On(j0,"classifyExpressionStatement");function ay(e,t,n,i){let r=e.expression;if(te.isPropertyAccessExpression(r)&&te.isIdentifier(r.expression)){let o=r.name.text;if(o==="addTags")return{type:"tags",node:t,startPos:n,endPos:i,isManaged:!0};let a={addDatabase:{type:"database",factory:"DatabaseFactory"},addCompute:{type:"compute",factory:"ComputeFactory"},addNetwork:{type:"network",factory:"NetworkFactory"},addMessaging:{type:"messaging",factory:"MessagingFactory"},addCdn:{type:"cdn",factory:"CdnFactory"},addPattern:{type:"pattern",factory:"PatternFactory"},addStorage:{type:"storage",factory:"StorageFactory"}}[o];if(a){let c=z0(e,a.factory);return{type:a.type,node:t,resourceName:c,startPos:n,endPos:i,isManaged:!0}}}return{type:"custom",node:t,startPos:n,endPos:i,isManaged:!1}}On(ay,"classifyCallExpression");function z0(e,t){if(e.arguments.length===0)return;let n=e.arguments[0];if(!te.isCallExpression(n))return;let i=n.expression;if(!te.isPropertyAccessExpression(i)||i.name.text!=="build"||!te.isIdentifier(i.expression)||i.expression.text!==t||n.arguments.length===0)return;let r=n.arguments[0];if(te.isStringLiteral(r))return r.text}On(z0,"extractResourceNameFromFactoryCall");import*as L0 from"typescript";var P6=Object.defineProperty,Dn=(e,t)=>P6(e,"name",{value:t,configurable:!0}),w6={import:"after-imports","app-init":"after-app-init",tags:"after-tags"};function U0(e){if(!e)return{position:"before-imports"};let t=w6[e.type];return t?{position:t}:{position:"after-resource",afterManagedResource:{type:e.type,name:e.resourceName}}}Dn(U0,"determineCustomBlockPosition");function ns(e,t){let n=t??et(e),i=[],r=e.getFullText(),o=null;for(let a of n)if(a.type==="custom"&&!a.isManaged){let{position:c,afterManagedResource:u}=U0(o),l=F0(r,a.node),d=B0(r,a.node),p=e.getLineAndCharacterOfPosition(a.node.getStart());i.push({sourceText:l,position:c,afterManagedResource:u,originalLine:p.line+1,leadingComments:d.length>0?d:void 0})}else a.isManaged&&(o=a);return i}Dn(ns,"extractCustomCodeBlocks");function F0(e,t){let n=t.getFullStart(),i=t.getEnd(),r=e.slice(n,i).split(`
436
436
  `),o=r.findIndex(a=>a.trim()!=="");return r.slice(o===-1?0:o).join(`
437
- `)}Dn(U0,"getStatementTextWithComments");function F0(e,t){let n=[],i=z0.getLeadingCommentRanges(e,t.getFullStart());if(i)for(let r of i){let o=e.slice(r.pos,r.end);n.push(o)}return n}Dn(F0,"extractLeadingComments");function to(e,t,n,i){let r=i??Qe(e);for(let o of r)if(o.type===t&&o.resourceName===n)return{startPos:o.startPos,endPos:o.endPos,node:o.node};return null}Dn(to,"findManagedResourcePosition");function ay(e,t,n){let i=n??Qe(e),r=null;for(let o of i)o.type===t&&o.isManaged&&(r=o);return r}Dn(ay,"getLastManagedStatementOfType");function sy(e,t){let n=t??Qe(e),i={import:[],"app-init":[],tags:[],database:[],compute:[],storage:[],network:[],messaging:[],cdn:[],pattern:[],"vpc-peer":[],"vpc-peer-accepter":[],"cross-plan-connection":[],custom:[]};for(let r of n)i[r.type].push(r);return i}Dn(sy,"getManagedResourcesByType");import*as fr from"typescript";import*as as from"typescript";var w6=Object.defineProperty,cy=(e,t)=>w6(e,"name",{value:t,configurable:!0}),k6=["S","N","B"];function os(e){if(!N(e))return;let t=b(e.name),n=U(e.type,k6);if(!(!t||!n))return{name:t,type:n}}cy(os,"parseDynamoDBKey");function uy(e){let t=e.node;if(!as.isCallExpression(t))return null;let n=t.arguments[0];if(!as.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!as.isObjectLiteralExpression(i))return null;let r=B(i),o=os(r.partitionKey);if(!o)return null;let a={resourceName:e.resourceName,partitionKey:o,node:e.node};e.variableName&&(a.variableName=e.variableName);let c=os(r.sortKey);if(c&&(a.sortKey=c),Array.isArray(r.globalSecondaryIndexes)){let p=r.globalSecondaryIndexes.filter(N).map(g=>{let v=os(g.partitionKey);if(!v)return null;let x=b(g.indexName);if(!x)return null;let G={indexName:x,partitionKey:v},j=os(g.sortKey);return j&&(G.sortKey=j),G}).filter(g=>g!==null);p.length>0&&(a.globalSecondaryIndexes=p)}let u=b(r.ttlAttribute);u&&(a.ttlAttribute=u);let l=z(r.stream);l!==void 0&&(a.stream=l);let d=de(r,new Set(["type","databaseName","partitionKey","sortKey","globalSecondaryIndexes","ttlAttribute","stream"]));return d.length>0&&(a.extraProperties=d),a}cy(uy,"extractDynamoDBFields");function Kl(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,partitionKey:t.partitionKey,...Je({sortKey:t.sortKey,globalSecondaryIndexes:t.globalSecondaryIndexes,ttlAttribute:t.ttlAttribute,stream:t.stream,variableName:t.variableName,extraProperties:t.extraProperties})}))}cy(Kl,"convertDynamoDBResources");import*as ss from"typescript";var O6=Object.defineProperty,B0=(e,t)=>O6(e,"name",{value:t,configurable:!0}),D6=new Set(["type","databaseName","instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays"]);function ly(e){let t=e.node;if(!ss.isCallExpression(t))return null;let n=t.arguments[0];if(!ss.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!ss.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:e.resourceName,databaseName:e.databaseName,node:e.node};e.variableName&&(o.variableName=e.variableName);let a=b(r.instanceType);a&&(o.instanceType=a);let c=r.coldTier;c===!1?o.coldTier=!1:N(c)&&b(c.mode)==="s3"&&(o.coldTier={mode:"s3"});let u=r.optimiseSchedule;if(u===!1)o.optimiseSchedule=!1;else{let g=b(u);g&&(o.optimiseSchedule=g)}let l=r.backupSchedule;if(l===!1)o.backupSchedule=!1;else{let g=b(l);g&&(o.backupSchedule=g)}let d=C(r.backupRetentionDays);d!==void 0&&(o.backupRetentionDays=d);let p=de(r,D6);return p.length>0&&(o.extraProperties=p),o}B0(ly,"extractClickHouseFields");function ql(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,type:"ClickHouse",databaseName:t.databaseName,...Je({instanceType:t.instanceType,coldTier:t.coldTier,optimiseSchedule:t.optimiseSchedule,backupSchedule:t.backupSchedule,backupRetentionDays:t.backupRetentionDays,variableName:t.variableName,extraProperties:t.extraProperties})}))}B0(ql,"convertClickHouseResources");var M6=Object.defineProperty,ro=(e,t)=>M6(e,"name",{value:t,configurable:!0});function V0(e){let t=b(e.databaseEngine);if(t!==void 0&&ht(Ui,t))return t;let n=e.engine;if(Ct(n)){let i=String(n.__call);if(i.includes("postgres")||i.includes("auroraPostgres"))return"postgresql";if(i.includes("mysql")||i.includes("auroraMysql"))return"mysql"}}ro(V0,"extractDatabaseEngine");function G0(e){let t=e.engine;if(Ct(t))return String(t.__call)}ro(G0,"extractEngineExpression");var j6=new Set(["type","databaseName","databaseEngine","engine","vpc","port","deletionProtection","instanceType","multiAz","publiclyAccessible","enableSecretRotation","encryption","databaseInsights","proxy","readReplica","credentials","writer","readers","backupRetention","preferredMaintenanceWindow","primaryRegion","secondaryRegions","globalClusterIdentifier","enableGlobalWriteForwarding","snapshotIdentifier","allocatedStorage","monitoringInterval","snapshotUsername"]);function Z0(e,t,n){if(n.arguments.length<2)return null;let i=n.arguments[0],r=n.arguments[1];if(!fr.isStringLiteral(i)&&!fr.isTemplateExpression(i))return null;let o=fr.isStringLiteral(i)?i.text:Bl(e,i);if(!fr.isObjectLiteralExpression(r))return null;let a=B(r),c={resourceName:o,type:b(a.type)??"",databaseName:b(a.databaseName)??"",databaseEngine:V0(a),engineExpression:G0(a),port:C(a.port),deletionProtection:z(a.deletionProtection),instanceType:b(a.instanceType),multiAz:z(a.multiAz),publiclyAccessible:z(a.publiclyAccessible),enableSecretRotation:z(a.enableSecretRotation),encryption:De(a.encryption,St()),databaseInsights:mr(a.databaseInsights,St()),proxy:mr(a.proxy,St()),readReplica:mr(a.readReplica,St()),credentials:De(a.credentials,St()),writer:De(a.writer,St()),readers:mr(a.readers,St()),backupRetention:C(a.backupRetention),preferredMaintenanceWindow:b(a.preferredMaintenanceWindow),primaryRegion:b(a.primaryRegion),secondaryRegions:me(a.secondaryRegions),globalClusterIdentifier:b(a.globalClusterIdentifier),enableGlobalWriteForwarding:z(a.enableGlobalWriteForwarding),allocatedStorage:C(a.allocatedStorage),monitoringInterval:C(a.monitoringInterval),snapshotIdentifier:b(a.snapshotIdentifier),snapshotUsername:b(a.snapshotUsername),node:t},u=st(t);u&&(c.variableName=u);let l=de(a,j6);return l.length>0&&(c.extraProperties=l),c}ro(Z0,"extractDatabaseResource");function dy(e){return Oe(e,t=>{if(!fr.isCallExpression(t)||!$e(t,"addDatabase"))return null;let n=t.arguments[0];return Ve(n,"DatabaseFactory")?Z0(e,t,n):null})}ro(dy,"findDatabaseResources");function my(e){let t=[],n=[],i=[];for(let r of e)if(r.type==="DynamoDB"){let o=uy(r);o&&n.push(o)}else if(r.type==="ClickHouse"){let o=ly(r);o&&i.push(o)}else t.push(r);return{databases:t,dynamodb:n,clickhouse:i}}ro(my,"splitDatabaseResources");var z6=["Instance","Aurora","GlobalAurora"];function py(e){return e.filter(t=>t.type!=="DynamoDB").map(t=>({name:t.resourceName,type:ht(z6,t.type)?t.type:"Instance",databaseName:t.databaseName,...Je({port:t.port,deletionProtection:t.deletionProtection,instanceType:t.instanceType,multiAz:t.multiAz,publiclyAccessible:t.publiclyAccessible,enableSecretRotation:t.enableSecretRotation,encryption:t.encryption,databaseInsights:t.databaseInsights,proxy:t.proxy,readReplica:t.readReplica,credentials:t.credentials,writer:t.writer,readers:t.readers,backupRetention:t.backupRetention,preferredMaintenanceWindow:t.preferredMaintenanceWindow,primaryRegion:t.primaryRegion,secondaryRegions:t.secondaryRegions,globalClusterIdentifier:t.globalClusterIdentifier,enableGlobalWriteForwarding:t.enableGlobalWriteForwarding,allocatedStorage:t.allocatedStorage,monitoringInterval:t.monitoringInterval,variableName:t.variableName,databaseEngine:t.databaseEngine,engineExpression:t.engineExpression,extraProperties:t.extraProperties})}))}ro(py,"convertDatabaseResources");import*as io from"typescript";var L6=Object.defineProperty,no=(e,t)=>L6(e,"name",{value:t,configurable:!0});function W0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!io.isStringLiteral(n)||!io.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:n.text,queueType:b(r.queueType)??"standard",visibilityTimeout:C(r.visibilityTimeout),retentionPeriod:C(r.messageRetentionPeriod),contentBasedDeduplication:z(r.contentBasedDeduplication),removalPolicy:b(r.removalPolicy),node:e},a=st(e);a&&(o.variableName=a);let c=de(r,new Set(["type","queueType","visibilityTimeout","messageRetentionPeriod","contentBasedDeduplication","removalPolicy"]));return c.length>0&&(o.extraProperties=c),o}no(W0,"extractSQSResource");function fy(e){if(e!=null){if(e===!1)return!1;if(N(e))return Je({enabled:z(e.enabled),maxReceiveCount:C(e.maxReceiveCount)})}}no(fy,"parseDeadLetterQueueConfig");function gy(e){return Oe(e,t=>{if(!io.isCallExpression(t)||!$e(t,"addMessaging"))return null;let n=t.arguments[0];return Ve(n,"MessagingFactory")?W0(t,n):null})}no(gy,"findSQSResources");function hy(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,queueType:t.queueType==="fifo"?"fifo":"standard",...Je({visibilityTimeout:t.visibilityTimeout,retentionPeriod:t.retentionPeriod,contentBasedDeduplication:t.contentBasedDeduplication,removalPolicy:Y0(t.removalPolicy),variableName:t.variableName,extraProperties:t.extraProperties})}))}no(hy,"convertSQSResources");var U6=new Set(fb.options);function H0(e){return U6.has(e)}no(H0,"isSqsRemovalPolicy");function Y0(e){return e!==void 0&&H0(e)?e:void 0}no(Y0,"toSqsRemovalPolicy");import*as oo from"typescript";var F6=Object.defineProperty,cs=(e,t)=>F6(e,"name",{value:t,configurable:!0});function q0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];return!oo.isStringLiteral(t)||!oo.isObjectLiteralExpression(n)?null:{resourceName:t.text,config:B(n),node:e}}cs(q0,"extractCDNResource");function X0(e,t,n){let i=t.find(o=>o.variableName===e);if(i)return i.resourceName;let r=n.find(o=>o.variableName===e||o.resourceName.charAt(0).toLowerCase()+o.resourceName.slice(1)===e);return r?r.resourceName:e}cs(X0,"resolveOriginIdentifier");var K0=["CACHING_OPTIMIZED","CACHING_DISABLED"];function vy(e){return at(e,t=>{if(!oo.isCallExpression(t)||!$e(t,"addCdn"))return;let n=t.arguments[0];if(Ve(n,"CdnFactory"))return q0(n)??void 0})}cs(vy,"findCDNResource");function by(e,t,n){if(!e)return;let i=e,r=i.config,o=cs(p=>dr(p)?X0(p.__identifier,t,n):b(p)??"","resolveOrigin"),a=o(r.origin),c={name:i.resourceName,defaultOriginRef:a};if(Array.isArray(r.behaviours)){let p=r.behaviours.filter(N).map(g=>({pathPattern:b(g.pathPattern)??"",originRef:o(g.origin),...U(g.cachePolicy,K0)!==void 0&&{cachePolicy:U(g.cachePolicy,K0)}}));p.length>0&&(c.behaviours=p)}let u=b(r.customDomain);if(u)c.customDomain=u;else{let p=me(r.domainNames);p&&p.length>0&&(c.customDomain=p[0])}let l=b(r.certificateArn);if(l&&(c.certificateArn=l),r.accessGate!==void 0){if(r.accessGate===!1)c.accessGate=!1;else if(N(r.accessGate)){let p=r.accessGate,g=b(p.type),v=b(p.username),x=b(p.password);g==="basic-auth"&&v&&x&&(c.accessGate={type:"basic-auth",username:v,password:x})}}let d=de(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return d.length>0&&(c.extraProperties=d),c}cs(by,"convertCDNResource");import*as fe from"typescript";var B6=Object.defineProperty,ut=(e,t)=>B6(e,"name",{value:t,configurable:!0}),V6=new Set(mb.options);function J0(e){if(e!==void 0)return V6.has(e)?e:void 0}ut(J0,"asFlowLogDestination");function yy(e){return{maxAzs:C(e.maxAzs),natGateways:mr(e.natGateways,t=>({count:C(t.count)})),flowLogs:mr(e.flowLogs,t=>({destination:b(t.destination),retentionDays:C(t.retentionDays)})),vpcEndpoints:N(e.vpcEndpoints)?e.vpcEndpoints:void 0}}ut(yy,"parseNetworkConfigFields");function Q0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!fe.isStringLiteral(n))return null;let r=n.text,o=fe.isObjectLiteralExpression(i)?B(i):{},a=yy(o),c={name:r,config:Je({...a}),node:e},u=st(e);return u&&(c.variableName=u),c}ut(Q0,"extractNetworkResource");function Sy(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"network")&&fe.isObjectLiteralExpression(i.initializer)){for(let r of i.initializer.properties)if(Gr(r,"useExisting")&&fe.isStringLiteral(r.initializer))return r.initializer.text}}})}ut(Sy,"findVpcId");function _y(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"network")){if(i.initializer.kind===fe.SyntaxKind.FalseKeyword)return;if(fe.isObjectLiteralExpression(i.initializer)&&!i.initializer.properties.some(r=>Gr(r,"useExisting"))){let r=B(i.initializer);return yy(r)}}}})}ut(_y,"findNetworkConfig");function Ey(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"backup")){if(i.initializer.kind===fe.SyntaxKind.FalseKeyword)return!1;if(fe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.tier);if(o)return{tier:o}}}}})}ut(Ey,"findBackupConfig");function xy(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"tunnel")){if(i.initializer.kind===fe.SyntaxKind.FalseKeyword)return!1;if(i.initializer.kind===fe.SyntaxKind.TrueKeyword)return!0;if(fe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.instanceType);return o?{instanceType:o}:{}}}}})}ut(xy,"findTunnelConfig");function Ay(e){return Oe(e,t=>{if(!fe.isCallExpression(t)||!$e(t,"addNetwork"))return null;let n=t.arguments[0];return Ve(n,"NetworkFactory")?Q0(t,n):null})}ut(Ay,"findNetworkResources");function Iy(e){let t=e.flowLogs;return{...Je({maxAzs:e.maxAzs,natGateways:e.natGateways,vpcEndpoints:e.vpcEndpoints}),...t!==void 0&&{flowLogs:t===!1?!1:Je({destination:J0(t.destination),retentionDays:t.retentionDays})}}}ut(Iy,"buildNetworkFields");function Ty(e){if(e)return Iy(e)}ut(Ty,"convertNetworkConfig");function $y(e){if(e===void 0)return;if(e===!1)return!1;let t=e.tier;if(ht(Rt,t))return{tier:t}}ut($y,"convertBackupConfig");function Ry(e){if(e===void 0)return;if(e===!1)return!1;if(e===!0)return{};let t={};return e.instanceType&&(t.instanceType=e.instanceType),t}ut(Ry,"convertTunnelConfig");function Cy(e){if(!(!e||e.length===0))return e.map(t=>({name:t.name,...Iy(t.config)}))}ut(Cy,"convertAdditionalNetworks");import*as ao from"typescript";var G6=Object.defineProperty,Ie=(e,t)=>G6(e,"name",{value:t,configurable:!0}),Z6=["Instance","Aurora"],W6=["postgresql","mysql"];function Xl(e){if(!N(e))return;let t={...e.memorySize!==void 0&&{memorySize:C(e.memorySize)},...e.timeout!==void 0&&{timeout:C(e.timeout)},...e.ephemeralStorageSize!==void 0&&{ephemeralStorageSize:C(e.ephemeralStorageSize)}};return Object.keys(t).length>0?t:void 0}Ie(Xl,"parseLambdaConfig");function eC(e){return _t(e,"database",t=>({type:U(t.type,Z6),databaseName:b(t.databaseName),databaseEngine:U(t.databaseEngine,W6),deletionProtection:z(t.deletionProtection),backupRetention:C(t.backupRetention),port:C(t.port),publiclyAccessible:z(t.publiclyAccessible),allowedIpCidr:b(t.allowedIpCidr),instanceType:b(t.instanceType),allocatedStorage:C(t.allocatedStorage),multiAz:z(t.multiAz),allowVpcAccess:z(t.allowVpcAccess),monitoringInterval:C(t.monitoringInterval),preferredMaintenanceWindow:b(t.preferredMaintenanceWindow),snapshotIdentifier:b(t.snapshotIdentifier),snapshotUsername:b(t.snapshotUsername),readReplica:Qi(t.readReplica),writer:De(t.writer,St()),readers:Qi(t.readers),databaseInsights:Qi(t.databaseInsights),proxy:Qi(t.proxy),credentials:De(t.credentials,St()),encryption:De(t.encryption,St())}))}Ie(eC,"extractPatternDatabaseConfig");function tC(e){return _t(e,"compute",t=>({server:De(t.server,Xl),imageOptimisation:De(t.imageOptimisation,Xl),revalidation:De(t.revalidation,Xl)}))}Ie(tC,"extractPatternComputeConfig");function rC(e){let t=Ie(n=>({versioned:z(n.versioned)}),"parseVersionedConfig");return _t(e,"storage",n=>({assets:De(n.assets,t),cache:De(n.cache,t),media:De(n.media,t)}))}Ie(rC,"extractPatternStorageConfig");function nC(e){return _t(e,"messaging",t=>({revalidationQueue:De(t.revalidationQueue,n=>({visibilityTimeout:C(n.visibilityTimeout),messageRetentionPeriod:C(n.messageRetentionPeriod),maxMessageSize:C(n.maxMessageSize),deadLetterQueue:fy(n.deadLetterQueue)}))}))}Ie(nC,"extractPatternMessagingConfig");function iC(e){return _t(e,"cdn",t=>({domainNames:me(t.domainNames),certificateArn:b(t.certificateArn)}))}Ie(iC,"extractPatternCdnConfig");function oC(e){return _t(e,"environment",t=>{let n=Object.fromEntries(Object.entries(t).filter(i=>typeof i[1]=="string"));return Object.keys(n).length>0?n:void 0})}Ie(oC,"extractPatternEnvironmentConfig");function aC(e,t){let n=sC(e);return{name:t,source:b(e.source),build:_t(e,"build",i=>({command:b(i.command),outputDir:b(i.outputDir)})),routing:U(e.routing,aa),security:_t(e,"security",i=>({headers:z(i.headers),contentSecurityPolicy:b(i.contentSecurityPolicy)})),domain:b(e.domain),forms:_t(e,"forms",i=>({to:b(i.to),from:b(i.from),corsOrigin:b(i.corsOrigin),maxConcurrency:C(i.maxConcurrency)})),cdn:_t(e,"cdn",i=>({behaviours:Array.isArray(i.behaviours)?i.behaviours:void 0})),...n.length>0&&{unreadableFields:n}}}Ie(aC,"extractStaticSiteConfig");function Ny(e){return yt(e)&&("__identifier"in e||"__expression"in e||"__call"in e||"__unknown"in e)}Ie(Ny,"isUnreadableRef");function sC(e){let t=[],n=Ie((r,o)=>{Ny(r)&&t.push(o)},"check");n(e.source,"source"),n(e.routing,"routing"),n(e.domain,"domain");let i=[[e.build,"build",["command","outputDir"]],[e.security,"security",["headers","contentSecurityPolicy"]],[e.forms,"forms",["to","from","corsOrigin","maxConcurrency"]],[e.cdn,"cdn",["behaviours"]]];for(let[r,o,a]of i)if(Ny(r))t.push(o);else if(N(r))for(let c of a)n(r[c],`${o}.${c}`);return t}Ie(sC,"collectUnreadableStaticSiteFields");function Zr(e){return e!==void 0&&e!==""}Ie(Zr,"isReadable");function Jl(e,t){return new Error(`Static-site pattern '${e}' in infrastructure.ts: Fjall could not read ${t.join(", ")} as inline literal(s). Fjall reads these fields out of the file and writes them back, so they must be written inline (source: "./site"), not as a variable or an expression.`)}Ie(Jl,"unreadableStaticSiteFields");function cC(e,t){let n=t.to;if(!Zr(n))throw Jl(e,["forms.to"]);return{to:n,...t.from!==void 0&&{from:t.from},...t.corsOrigin!==void 0&&{corsOrigin:t.corsOrigin},...t.maxConcurrency!==void 0&&{maxConcurrency:t.maxConcurrency}}}Ie(cC,"readStaticSiteForms");function uC(e,t){if(e.arguments.length<2)return null;let n=e.arguments[0],i=e.arguments[1];if(!ao.isStringLiteral(n)||!ao.isObjectLiteralExpression(i))return null;let r=n.text,o=B(i),a=o.type,c=st(t),u=b(o.name);return u?a==="payload"||a==="nextjs"?{variableName:c,constructId:r,type:a,config:{name:u,domain:b(o.domain),database:eC(o),compute:tC(o),storage:rC(o),messaging:nC(o),cdn:iC(o),environment:oC(o)},node:e}:a==="staticsite"?{variableName:c,constructId:r,type:"staticsite",config:aC(o,u),node:e}:null:null}Ie(uC,"extractPatternResource");function Py(e){return Oe(e,t=>{if(!ao.isCallExpression(t)||!$e(t,"addPattern"))return null;let n=t.arguments[0];return Ve(n,"PatternFactory")?uC(n,t):null})}Ie(Py,"findPatternResources");function wy(e,t){if(!t||t.length===0)return;let n=t[0];if(e.pattern=n.type,n.type==="staticsite"){let{config:r}=n,o=r.source,a=r.build?.command,c=r.build?.outputDir;if(r.unreadableFields!==void 0)throw Jl(r.name,r.unreadableFields);if(!Zr(o)||!Zr(a)||!Zr(c)){let u=[];throw Zr(o)||u.push("source"),Zr(a)||u.push("build.command"),Zr(c)||u.push("build.outputDir"),Jl(r.name,u)}e.patternConfig={type:"staticsite",name:r.name,source:o,build:{command:a,outputDir:c},routing:r.routing,security:r.security,domain:r.domain,...r.forms!==void 0&&{forms:cC(r.name,r.forms)},cdn:r.cdn};return}let{config:i}=n;e.patternConfig={type:n.type,name:i.name,domain:i.domain,database:i.database,compute:i.compute,storage:i.storage,messaging:i.messaging,cdn:i.cdn,environment:i.environment}}Ie(wy,"applyPatternConfig");var H6=Object.defineProperty,Ql=(e,t)=>H6(e,"name",{value:t,configurable:!0});function lC(e,t){for(let n of t){let i=e.compute.find(r=>r.variableName===n.targetVariableName);i!==void 0&&i.type==="lambda"&&(i.scheduleExpression=n.schedule)}}Ql(lC,"applyScheduleBackfill");function dC(e,t){Object.keys(t).length>0&&(e.tags={...t}),t[Ka]&&(e.owner=t[Ka])}Ql(dC,"applyTagsAndOwner");function mC(e){let t=[];for(let n of e)if(Yl(n.moduleSpecifier))if(n.moduleSpecifier==="@fjall/components-infrastructure"||n.moduleSpecifier==="@fjall/infrastructure"){let i=n.namedImports.filter(r=>!k0.has(r));i.length>0&&t.push({moduleSpecifier:n.moduleSpecifier,namedImports:i,defaultImport:n.defaultImport})}else(n.namedImports.length>0||n.defaultImport)&&t.push(n);return t.length>0?t:void 0}Ql(mC,"computeAdditionalManagedImports");function Mn(e,t,n){let i={appName:t,type:"standard",database:[],s3:[],compute:[]};if(wy(i,e.patternResources),e.vpcId&&(i.vpcId=e.vpcId),i.network=Ty(e.network),i.backup=$y(e.backup),i.tunnel=Ry(e.tunnel),i.additionalNetworks=Cy(e.networkResources),dC(i,e.tags),i.database=py(e.databaseResources),i.dynamodb=Kl(e.dynamodbResources),i.clickhouse=ql(e.clickhouseResources),i.sqs=hy(e.sqsResources),i.cdn=by(e.cdnResource,e.s3Resources,e.computeResources),i.s3=iy(e.s3Resources),i.compute=ey(e.computeResources,e.databaseResources,e.s3Resources,i),lC(i,e.schedules),i.additionalManagedImports=mC(e.imports),n?.skipValidation)return i;try{return wR.parse(i)}catch(r){if(r instanceof s.ZodError){let o=Ra(r);throw new Error(`Invalid infrastructure configuration:
438
- ${o}`)}throw r}}Ql(Mn,"convertToResourcePlan");var Y6=Object.defineProperty,so=(e,t)=>Y6(e,"name",{value:t,configurable:!0});function Wr(e,t){let n=Y.createSourceFile("infrastructure.ts",e,Y.ScriptTarget.Latest,!0,Y.ScriptKind.TS),i=pC(n),{appVariableName:r,appName:o}=gC(n),a=Sy(n),c=_y(n),u=Ey(n),l=xy(n),d=Ay(n),p=dy(n),{databases:g,dynamodb:v,clickhouse:x}=my(p),G=gy(n),j=vy(n),he=[...ry(n),...ny(n)],rt=Zl(n),_e=Hl(n),J=Py(n),ve=hC(n),Bn={sourceFile:n,imports:i,appVariableName:r,appName:o,vpcId:a,network:c,backup:u,tunnel:l,networkResources:d,databaseResources:g,dynamodbResources:v,clickhouseResources:x,sqsResources:G,cdnResource:j,s3Resources:he,computeResources:rt,schedules:_e,patternResources:J,tags:ve};return t?.extractCustomCode&&(Bn.customCodeBlocks=is(n),Bn.classifiedStatements=Qe(n)),Bn}so(Wr,"parseInfrastructure");function pC(e){let t=[];return Y.forEachChild(e,n=>{if(Y.isImportDeclaration(n)){if(!Y.isStringLiteral(n.moduleSpecifier))return;let i={moduleSpecifier:n.moduleSpecifier.text,namedImports:[]};n.importClause&&(n.importClause.name&&(i.defaultImport=n.importClause.name.text),n.importClause.namedBindings&&Y.isNamedImports(n.importClause.namedBindings)&&(i.namedImports=n.importClause.namedBindings.elements.map(r=>r.name.text))),t.push(i)}}),t}so(pC,"extractImports");function fC(e,t){return Y.isStringLiteral(t)?t.text:Y.isIdentifier(t)?Qa(e,t.text)??"":Y.isPropertyAccessExpression(t)?es(e,t)??"":""}so(fC,"resolveAppName");function gC(e){return at(e,t=>{if(Y.isVariableStatement(t))for(let n of t.declarationList.declarations){if(!n.initializer||!Zt(n.initializer))continue;let i=Y.isIdentifier(n.name)?n.name.text:"",r=n.initializer.arguments.length>0?fC(e,n.initializer.arguments[0]):"";return{appVariableName:i,appName:r}}})??{appVariableName:"",appName:""}}so(gC,"findAppVariable");function hC(e){let t={};function n(i){if(Y.isCallExpression(i)&&Y.isPropertyAccessExpression(i.expression)&&i.expression.name.text==="addTags"&&Y.isIdentifier(i.expression.expression)&&i.arguments.length>0){let r=i.arguments[0];if(Y.isObjectLiteralExpression(r)){let o=B(r);for(let[a,c]of Object.entries(o))typeof c=="string"?t[a]=c:Vr(c)&&(t[a]="default-value")}}Y.forEachChild(i,n)}return so(n,"visit"),n(e),t}so(hC,"extractTags");import*as co from"typescript";var K6=Object.defineProperty,Re=(e,t)=>K6(e,"name",{value:t,configurable:!0});function uo(e,t,n){return e.slice(0,t)+n+e.slice(t)}Re(uo,"insertAtPosition");function ed(e,t){return e.find(n=>n.type===t)}Re(ed,"findClassification");function ky(e,t){return e.filter(n=>n.type===t).pop()}Re(ky,"findLastClassification");function Hr(e){return co.createSourceFile("infrastructure.ts",e,co.ScriptTarget.Latest,!0,co.ScriptKind.TS)}Re(Hr,"parseSourceFile");function td(e,t){return e.endsWith(`
437
+ `)}Dn(F0,"getStatementTextWithComments");function B0(e,t){let n=[],i=L0.getLeadingCommentRanges(e,t.getFullStart());if(i)for(let r of i){let o=e.slice(r.pos,r.end);n.push(o)}return n}Dn(B0,"extractLeadingComments");function eo(e,t,n,i){let r=i??et(e);for(let o of r)if(o.type===t&&o.resourceName===n)return{startPos:o.startPos,endPos:o.endPos,node:o.node};return null}Dn(eo,"findManagedResourcePosition");function sy(e,t,n){let i=n??et(e),r=null;for(let o of i)o.type===t&&o.isManaged&&(r=o);return r}Dn(sy,"getLastManagedStatementOfType");function cy(e,t){let n=t??et(e),i={import:[],"app-init":[],tags:[],database:[],compute:[],storage:[],network:[],messaging:[],cdn:[],pattern:[],"vpc-peer":[],"vpc-peer-accepter":[],"cross-plan-connection":[],custom:[]};for(let r of n)i[r.type].push(r);return i}Dn(cy,"getManagedResourcesByType");import*as fr from"typescript";import*as os from"typescript";var k6=Object.defineProperty,uy=(e,t)=>k6(e,"name",{value:t,configurable:!0}),O6=["S","N","B"];function is(e){if(!N(e))return;let t=b(e.name),n=U(e.type,O6);if(!(!t||!n))return{name:t,type:n}}uy(is,"parseDynamoDBKey");function ly(e){let t=e.node;if(!os.isCallExpression(t))return null;let n=t.arguments[0];if(!os.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!os.isObjectLiteralExpression(i))return null;let r=B(i),o=is(r.partitionKey);if(!o)return null;let a={resourceName:e.resourceName,partitionKey:o,node:e.node};e.variableName&&(a.variableName=e.variableName);let c=is(r.sortKey);if(c&&(a.sortKey=c),Array.isArray(r.globalSecondaryIndexes)){let p=r.globalSecondaryIndexes.filter(N).map(g=>{let v=is(g.partitionKey);if(!v)return null;let x=b(g.indexName);if(!x)return null;let G={indexName:x,partitionKey:v},j=is(g.sortKey);return j&&(G.sortKey=j),G}).filter(g=>g!==null);p.length>0&&(a.globalSecondaryIndexes=p)}let u=b(r.ttlAttribute);u&&(a.ttlAttribute=u);let l=z(r.stream);l!==void 0&&(a.stream=l);let d=de(r,new Set(["type","databaseName","partitionKey","sortKey","globalSecondaryIndexes","ttlAttribute","stream"]));return d.length>0&&(a.extraProperties=d),a}uy(ly,"extractDynamoDBFields");function Kl(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,partitionKey:t.partitionKey,...Qe({sortKey:t.sortKey,globalSecondaryIndexes:t.globalSecondaryIndexes,ttlAttribute:t.ttlAttribute,stream:t.stream,variableName:t.variableName,extraProperties:t.extraProperties})}))}uy(Kl,"convertDynamoDBResources");import*as as from"typescript";var D6=Object.defineProperty,V0=(e,t)=>D6(e,"name",{value:t,configurable:!0}),M6=new Set(["type","databaseName","instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays"]);function dy(e){let t=e.node;if(!as.isCallExpression(t))return null;let n=t.arguments[0];if(!as.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!as.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:e.resourceName,databaseName:e.databaseName,node:e.node};e.variableName&&(o.variableName=e.variableName);let a=b(r.instanceType);a&&(o.instanceType=a);let c=r.coldTier;c===!1?o.coldTier=!1:N(c)&&b(c.mode)==="s3"&&(o.coldTier={mode:"s3"});let u=r.optimiseSchedule;if(u===!1)o.optimiseSchedule=!1;else{let g=b(u);g&&(o.optimiseSchedule=g)}let l=r.backupSchedule;if(l===!1)o.backupSchedule=!1;else{let g=b(l);g&&(o.backupSchedule=g)}let d=C(r.backupRetentionDays);d!==void 0&&(o.backupRetentionDays=d);let p=de(r,M6);return p.length>0&&(o.extraProperties=p),o}V0(dy,"extractClickHouseFields");function ql(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,type:"ClickHouse",databaseName:t.databaseName,...Qe({instanceType:t.instanceType,coldTier:t.coldTier,optimiseSchedule:t.optimiseSchedule,backupSchedule:t.backupSchedule,backupRetentionDays:t.backupRetentionDays,variableName:t.variableName,extraProperties:t.extraProperties})}))}V0(ql,"convertClickHouseResources");var j6=Object.defineProperty,to=(e,t)=>j6(e,"name",{value:t,configurable:!0});function G0(e){let t=b(e.databaseEngine);if(t!==void 0&&ht(Ui,t))return t;let n=e.engine;if(Ct(n)){let i=String(n.__call);if(i.includes("postgres")||i.includes("auroraPostgres"))return"postgresql";if(i.includes("mysql")||i.includes("auroraMysql"))return"mysql"}}to(G0,"extractDatabaseEngine");function Z0(e){let t=e.engine;if(Ct(t))return String(t.__call)}to(Z0,"extractEngineExpression");var z6=new Set(["type","databaseName","databaseEngine","engine","vpc","port","deletionProtection","instanceType","multiAz","publiclyAccessible","enableSecretRotation","encryption","databaseInsights","proxy","readReplica","credentials","writer","readers","backupRetention","preferredMaintenanceWindow","primaryRegion","secondaryRegions","globalClusterIdentifier","enableGlobalWriteForwarding","snapshotIdentifier","allocatedStorage","monitoringInterval","snapshotUsername"]);function W0(e,t,n){if(n.arguments.length<2)return null;let i=n.arguments[0],r=n.arguments[1];if(!fr.isStringLiteral(i)&&!fr.isTemplateExpression(i))return null;let o=fr.isStringLiteral(i)?i.text:Bl(e,i);if(!fr.isObjectLiteralExpression(r))return null;let a=B(r),c={resourceName:o,type:b(a.type)??"",databaseName:b(a.databaseName)??"",databaseEngine:G0(a),engineExpression:Z0(a),port:C(a.port),deletionProtection:z(a.deletionProtection),instanceType:b(a.instanceType),multiAz:z(a.multiAz),publiclyAccessible:z(a.publiclyAccessible),enableSecretRotation:z(a.enableSecretRotation),encryption:De(a.encryption,St()),databaseInsights:mr(a.databaseInsights,St()),proxy:mr(a.proxy,St()),readReplica:mr(a.readReplica,St()),credentials:De(a.credentials,St()),writer:De(a.writer,St()),readers:mr(a.readers,St()),backupRetention:C(a.backupRetention),preferredMaintenanceWindow:b(a.preferredMaintenanceWindow),primaryRegion:b(a.primaryRegion),secondaryRegions:me(a.secondaryRegions),globalClusterIdentifier:b(a.globalClusterIdentifier),enableGlobalWriteForwarding:z(a.enableGlobalWriteForwarding),allocatedStorage:C(a.allocatedStorage),monitoringInterval:C(a.monitoringInterval),snapshotIdentifier:b(a.snapshotIdentifier),snapshotUsername:b(a.snapshotUsername),node:t},u=st(t);u&&(c.variableName=u);let l=de(a,z6);return l.length>0&&(c.extraProperties=l),c}to(W0,"extractDatabaseResource");function my(e){return Oe(e,t=>{if(!fr.isCallExpression(t)||!$e(t,"addDatabase"))return null;let n=t.arguments[0];return Ge(n,"DatabaseFactory")?W0(e,t,n):null})}to(my,"findDatabaseResources");function py(e){let t=[],n=[],i=[];for(let r of e)if(r.type==="DynamoDB"){let o=ly(r);o&&n.push(o)}else if(r.type==="ClickHouse"){let o=dy(r);o&&i.push(o)}else t.push(r);return{databases:t,dynamodb:n,clickhouse:i}}to(py,"splitDatabaseResources");var L6=["Instance","Aurora","GlobalAurora"];function fy(e){return e.filter(t=>t.type!=="DynamoDB").map(t=>({name:t.resourceName,type:ht(L6,t.type)?t.type:"Instance",databaseName:t.databaseName,...Qe({port:t.port,deletionProtection:t.deletionProtection,instanceType:t.instanceType,multiAz:t.multiAz,publiclyAccessible:t.publiclyAccessible,enableSecretRotation:t.enableSecretRotation,encryption:t.encryption,databaseInsights:t.databaseInsights,proxy:t.proxy,readReplica:t.readReplica,credentials:t.credentials,writer:t.writer,readers:t.readers,backupRetention:t.backupRetention,preferredMaintenanceWindow:t.preferredMaintenanceWindow,primaryRegion:t.primaryRegion,secondaryRegions:t.secondaryRegions,globalClusterIdentifier:t.globalClusterIdentifier,enableGlobalWriteForwarding:t.enableGlobalWriteForwarding,allocatedStorage:t.allocatedStorage,monitoringInterval:t.monitoringInterval,variableName:t.variableName,databaseEngine:t.databaseEngine,engineExpression:t.engineExpression,extraProperties:t.extraProperties})}))}to(fy,"convertDatabaseResources");import*as no from"typescript";var U6=Object.defineProperty,ro=(e,t)=>U6(e,"name",{value:t,configurable:!0});function H0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!no.isStringLiteral(n)||!no.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:n.text,queueType:b(r.queueType)??"standard",visibilityTimeout:C(r.visibilityTimeout),retentionPeriod:C(r.messageRetentionPeriod),contentBasedDeduplication:z(r.contentBasedDeduplication),removalPolicy:b(r.removalPolicy),node:e},a=st(e);a&&(o.variableName=a);let c=de(r,new Set(["type","queueType","visibilityTimeout","messageRetentionPeriod","contentBasedDeduplication","removalPolicy"]));return c.length>0&&(o.extraProperties=c),o}ro(H0,"extractSQSResource");function gy(e){if(e!=null){if(e===!1)return!1;if(N(e))return Qe({enabled:z(e.enabled),maxReceiveCount:C(e.maxReceiveCount)})}}ro(gy,"parseDeadLetterQueueConfig");function hy(e){return Oe(e,t=>{if(!no.isCallExpression(t)||!$e(t,"addMessaging"))return null;let n=t.arguments[0];return Ge(n,"MessagingFactory")?H0(t,n):null})}ro(hy,"findSQSResources");function vy(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,queueType:t.queueType==="fifo"?"fifo":"standard",...Qe({visibilityTimeout:t.visibilityTimeout,retentionPeriod:t.retentionPeriod,contentBasedDeduplication:t.contentBasedDeduplication,removalPolicy:K0(t.removalPolicy),variableName:t.variableName,extraProperties:t.extraProperties})}))}ro(vy,"convertSQSResources");var F6=new Set(gb.options);function Y0(e){return F6.has(e)}ro(Y0,"isSqsRemovalPolicy");function K0(e){return e!==void 0&&Y0(e)?e:void 0}ro(K0,"toSqsRemovalPolicy");import*as io from"typescript";var B6=Object.defineProperty,ss=(e,t)=>B6(e,"name",{value:t,configurable:!0});function X0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];return!io.isStringLiteral(t)||!io.isObjectLiteralExpression(n)?null:{resourceName:t.text,config:B(n),node:e}}ss(X0,"extractCDNResource");function J0(e,t,n){let i=t.find(o=>o.variableName===e);if(i)return i.resourceName;let r=n.find(o=>o.variableName===e||o.resourceName.charAt(0).toLowerCase()+o.resourceName.slice(1)===e);return r?r.resourceName:e}ss(J0,"resolveOriginIdentifier");var q0=["CACHING_OPTIMIZED","CACHING_DISABLED"];function by(e){return at(e,t=>{if(!io.isCallExpression(t)||!$e(t,"addCdn"))return;let n=t.arguments[0];if(Ge(n,"CdnFactory"))return X0(n)??void 0})}ss(by,"findCDNResource");function yy(e,t,n){if(!e)return;let i=e,r=i.config,o=ss(p=>dr(p)?J0(p.__identifier,t,n):b(p)??"","resolveOrigin"),a=o(r.origin),c={name:i.resourceName,defaultOriginRef:a};if(Array.isArray(r.behaviours)){let p=r.behaviours.filter(N).map(g=>({pathPattern:b(g.pathPattern)??"",originRef:o(g.origin),...U(g.cachePolicy,q0)!==void 0&&{cachePolicy:U(g.cachePolicy,q0)}}));p.length>0&&(c.behaviours=p)}let u=b(r.customDomain);if(u)c.customDomain=u;else{let p=me(r.domainNames);p&&p.length>0&&(c.customDomain=p[0])}let l=b(r.certificateArn);if(l&&(c.certificateArn=l),r.accessGate!==void 0){if(r.accessGate===!1)c.accessGate=!1;else if(N(r.accessGate)){let p=r.accessGate,g=b(p.type),v=b(p.username),x=b(p.password);g==="basic-auth"&&v&&x&&(c.accessGate={type:"basic-auth",username:v,password:x})}}let d=de(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return d.length>0&&(c.extraProperties=d),c}ss(yy,"convertCDNResource");import*as fe from"typescript";var V6=Object.defineProperty,ut=(e,t)=>V6(e,"name",{value:t,configurable:!0}),G6=new Set(pb.options);function Q0(e){if(e!==void 0)return G6.has(e)?e:void 0}ut(Q0,"asFlowLogDestination");function Sy(e){return{maxAzs:C(e.maxAzs),natGateways:mr(e.natGateways,t=>({count:C(t.count)})),flowLogs:mr(e.flowLogs,t=>({destination:b(t.destination),retentionDays:C(t.retentionDays)})),vpcEndpoints:N(e.vpcEndpoints)?e.vpcEndpoints:void 0}}ut(Sy,"parseNetworkConfigFields");function eC(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!fe.isStringLiteral(n))return null;let r=n.text,o=fe.isObjectLiteralExpression(i)?B(i):{},a=Sy(o),c={name:r,config:Qe({...a}),node:e},u=st(e);return u&&(c.variableName=u),c}ut(eC,"extractNetworkResource");function _y(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"network")&&fe.isObjectLiteralExpression(i.initializer)){for(let r of i.initializer.properties)if(Gr(r,"useExisting")&&fe.isStringLiteral(r.initializer))return r.initializer.text}}})}ut(_y,"findVpcId");function Ey(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"network")){if(i.initializer.kind===fe.SyntaxKind.FalseKeyword)return;if(fe.isObjectLiteralExpression(i.initializer)&&!i.initializer.properties.some(r=>Gr(r,"useExisting"))){let r=B(i.initializer);return Sy(r)}}}})}ut(Ey,"findNetworkConfig");function xy(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"backup")){if(i.initializer.kind===fe.SyntaxKind.FalseKeyword)return!1;if(fe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.tier);if(o)return{tier:o}}}}})}ut(xy,"findBackupConfig");function Ay(e){return at(e,t=>{if(!Zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(fe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Gr(i,"tunnel")){if(i.initializer.kind===fe.SyntaxKind.FalseKeyword)return!1;if(i.initializer.kind===fe.SyntaxKind.TrueKeyword)return!0;if(fe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.instanceType);return o?{instanceType:o}:{}}}}})}ut(Ay,"findTunnelConfig");function Iy(e){return Oe(e,t=>{if(!fe.isCallExpression(t)||!$e(t,"addNetwork"))return null;let n=t.arguments[0];return Ge(n,"NetworkFactory")?eC(t,n):null})}ut(Iy,"findNetworkResources");function Ty(e){let t=e.flowLogs;return{...Qe({maxAzs:e.maxAzs,natGateways:e.natGateways,vpcEndpoints:e.vpcEndpoints}),...t!==void 0&&{flowLogs:t===!1?!1:Qe({destination:Q0(t.destination),retentionDays:t.retentionDays})}}}ut(Ty,"buildNetworkFields");function $y(e){if(e)return Ty(e)}ut($y,"convertNetworkConfig");function Ry(e){if(e===void 0)return;if(e===!1)return!1;let t=e.tier;if(ht(Rt,t))return{tier:t}}ut(Ry,"convertBackupConfig");function Cy(e){if(e===void 0)return;if(e===!1)return!1;if(e===!0)return{};let t={};return e.instanceType&&(t.instanceType=e.instanceType),t}ut(Cy,"convertTunnelConfig");function Ny(e){if(!(!e||e.length===0))return e.map(t=>({name:t.name,...Ty(t.config)}))}ut(Ny,"convertAdditionalNetworks");import*as oo from"typescript";var Z6=Object.defineProperty,Ie=(e,t)=>Z6(e,"name",{value:t,configurable:!0}),W6=["Instance","Aurora"],H6=["postgresql","mysql"];function Xl(e){if(!N(e))return;let t={...e.memorySize!==void 0&&{memorySize:C(e.memorySize)},...e.timeout!==void 0&&{timeout:C(e.timeout)},...e.ephemeralStorageSize!==void 0&&{ephemeralStorageSize:C(e.ephemeralStorageSize)}};return Object.keys(t).length>0?t:void 0}Ie(Xl,"parseLambdaConfig");function tC(e){return _t(e,"database",t=>({type:U(t.type,W6),databaseName:b(t.databaseName),databaseEngine:U(t.databaseEngine,H6),deletionProtection:z(t.deletionProtection),backupRetention:C(t.backupRetention),port:C(t.port),publiclyAccessible:z(t.publiclyAccessible),allowedIpCidr:b(t.allowedIpCidr),instanceType:b(t.instanceType),allocatedStorage:C(t.allocatedStorage),multiAz:z(t.multiAz),allowVpcAccess:z(t.allowVpcAccess),monitoringInterval:C(t.monitoringInterval),preferredMaintenanceWindow:b(t.preferredMaintenanceWindow),snapshotIdentifier:b(t.snapshotIdentifier),snapshotUsername:b(t.snapshotUsername),readReplica:Ji(t.readReplica),writer:De(t.writer,St()),readers:Ji(t.readers),databaseInsights:Ji(t.databaseInsights),proxy:Ji(t.proxy),credentials:De(t.credentials,St()),encryption:De(t.encryption,St())}))}Ie(tC,"extractPatternDatabaseConfig");function rC(e){return _t(e,"compute",t=>({server:De(t.server,Xl),imageOptimisation:De(t.imageOptimisation,Xl),revalidation:De(t.revalidation,Xl)}))}Ie(rC,"extractPatternComputeConfig");function nC(e){let t=Ie(n=>({versioned:z(n.versioned)}),"parseVersionedConfig");return _t(e,"storage",n=>({assets:De(n.assets,t),cache:De(n.cache,t),media:De(n.media,t)}))}Ie(nC,"extractPatternStorageConfig");function iC(e){return _t(e,"messaging",t=>({revalidationQueue:De(t.revalidationQueue,n=>({visibilityTimeout:C(n.visibilityTimeout),messageRetentionPeriod:C(n.messageRetentionPeriod),maxMessageSize:C(n.maxMessageSize),deadLetterQueue:gy(n.deadLetterQueue)}))}))}Ie(iC,"extractPatternMessagingConfig");function oC(e){return _t(e,"cdn",t=>({domainNames:me(t.domainNames),certificateArn:b(t.certificateArn)}))}Ie(oC,"extractPatternCdnConfig");function aC(e){return _t(e,"environment",t=>{let n=Object.fromEntries(Object.entries(t).filter(i=>typeof i[1]=="string"));return Object.keys(n).length>0?n:void 0})}Ie(aC,"extractPatternEnvironmentConfig");function sC(e,t){let n=cC(e);return{name:t,source:b(e.source),build:_t(e,"build",i=>({command:b(i.command),outputDir:b(i.outputDir)})),routing:U(e.routing,oa),security:_t(e,"security",i=>({headers:z(i.headers),contentSecurityPolicy:b(i.contentSecurityPolicy)})),domain:b(e.domain),forms:_t(e,"forms",i=>({to:b(i.to),from:b(i.from),corsOrigin:b(i.corsOrigin),maxConcurrency:C(i.maxConcurrency)})),cdn:_t(e,"cdn",i=>({behaviours:Array.isArray(i.behaviours)?i.behaviours:void 0})),...n.length>0&&{unreadableFields:n}}}Ie(sC,"extractStaticSiteConfig");function Py(e){return yt(e)&&("__identifier"in e||"__expression"in e||"__call"in e||"__unknown"in e)}Ie(Py,"isUnreadableRef");function cC(e){let t=[],n=Ie((r,o)=>{Py(r)&&t.push(o)},"check");n(e.source,"source"),n(e.routing,"routing"),n(e.domain,"domain");let i=[[e.build,"build",["command","outputDir"]],[e.security,"security",["headers","contentSecurityPolicy"]],[e.forms,"forms",["to","from","corsOrigin","maxConcurrency"]],[e.cdn,"cdn",["behaviours"]]];for(let[r,o,a]of i)if(Py(r))t.push(o);else if(N(r))for(let c of a)n(r[c],`${o}.${c}`);return t}Ie(cC,"collectUnreadableStaticSiteFields");function Zr(e){return e!==void 0&&e!==""}Ie(Zr,"isReadable");function Jl(e,t){return new Error(`Static-site pattern '${e}' in infrastructure.ts: Fjall could not read ${t.join(", ")} as inline literal(s). Fjall reads these fields out of the file and writes them back, so they must be written inline (source: "./site"), not as a variable or an expression.`)}Ie(Jl,"unreadableStaticSiteFields");function uC(e,t){let n=t.to;if(!Zr(n))throw Jl(e,["forms.to"]);return{to:n,...t.from!==void 0&&{from:t.from},...t.corsOrigin!==void 0&&{corsOrigin:t.corsOrigin},...t.maxConcurrency!==void 0&&{maxConcurrency:t.maxConcurrency}}}Ie(uC,"readStaticSiteForms");function lC(e,t){if(e.arguments.length<2)return null;let n=e.arguments[0],i=e.arguments[1];if(!oo.isStringLiteral(n)||!oo.isObjectLiteralExpression(i))return null;let r=n.text,o=B(i),a=o.type,c=st(t),u=b(o.name);return u?a==="payload"||a==="nextjs"?{variableName:c,constructId:r,type:a,config:{name:u,domain:b(o.domain),database:tC(o),compute:rC(o),storage:nC(o),messaging:iC(o),cdn:oC(o),environment:aC(o)},node:e}:a==="staticsite"?{variableName:c,constructId:r,type:"staticsite",config:sC(o,u),node:e}:null:null}Ie(lC,"extractPatternResource");function wy(e){return Oe(e,t=>{if(!oo.isCallExpression(t)||!$e(t,"addPattern"))return null;let n=t.arguments[0];return Ge(n,"PatternFactory")?lC(n,t):null})}Ie(wy,"findPatternResources");function ky(e,t){if(!t||t.length===0)return;let n=t[0];if(e.pattern=n.type,n.type==="staticsite"){let{config:r}=n,o=r.source,a=r.build?.command,c=r.build?.outputDir;if(r.unreadableFields!==void 0)throw Jl(r.name,r.unreadableFields);if(!Zr(o)||!Zr(a)||!Zr(c)){let u=[];throw Zr(o)||u.push("source"),Zr(a)||u.push("build.command"),Zr(c)||u.push("build.outputDir"),Jl(r.name,u)}e.patternConfig={type:"staticsite",name:r.name,source:o,build:{command:a,outputDir:c},routing:r.routing,security:r.security,domain:r.domain,...r.forms!==void 0&&{forms:uC(r.name,r.forms)},cdn:r.cdn};return}let{config:i}=n;e.patternConfig={type:n.type,name:i.name,domain:i.domain,database:i.database,compute:i.compute,storage:i.storage,messaging:i.messaging,cdn:i.cdn,environment:i.environment}}Ie(ky,"applyPatternConfig");var Y6=Object.defineProperty,Ql=(e,t)=>Y6(e,"name",{value:t,configurable:!0});function dC(e,t){for(let n of t){let i=e.compute.find(r=>r.variableName===n.targetVariableName);i!==void 0&&i.type==="lambda"&&(i.scheduleExpression=n.schedule)}}Ql(dC,"applyScheduleBackfill");function mC(e,t){Object.keys(t).length>0&&(e.tags={...t}),t[Ya]&&(e.owner=t[Ya])}Ql(mC,"applyTagsAndOwner");function pC(e){let t=[];for(let n of e)if(Yl(n.moduleSpecifier))if(n.moduleSpecifier==="@fjall/components-infrastructure"||n.moduleSpecifier==="@fjall/infrastructure"){let i=n.namedImports.filter(r=>!O0.has(r));i.length>0&&t.push({moduleSpecifier:n.moduleSpecifier,namedImports:i,defaultImport:n.defaultImport})}else(n.namedImports.length>0||n.defaultImport)&&t.push(n);return t.length>0?t:void 0}Ql(pC,"computeAdditionalManagedImports");function Mn(e,t,n){let i={appName:t,type:"standard",database:[],s3:[],compute:[]};if(ky(i,e.patternResources),e.vpcId&&(i.vpcId=e.vpcId),i.network=$y(e.network),i.backup=Ry(e.backup),i.tunnel=Cy(e.tunnel),i.additionalNetworks=Ny(e.networkResources),mC(i,e.tags),i.database=fy(e.databaseResources),i.dynamodb=Kl(e.dynamodbResources),i.clickhouse=ql(e.clickhouseResources),i.sqs=vy(e.sqsResources),i.cdn=yy(e.cdnResource,e.s3Resources,e.computeResources),i.s3=oy(e.s3Resources),i.compute=ty(e.computeResources,e.databaseResources,e.s3Resources,i),dC(i,e.schedules),i.additionalManagedImports=pC(e.imports),n?.skipValidation)return i;try{return kR.parse(i)}catch(r){if(r instanceof s.ZodError){let o=$a(r);throw new Error(`Invalid infrastructure configuration:
438
+ ${o}`)}throw r}}Ql(Mn,"convertToResourcePlan");var K6=Object.defineProperty,ao=(e,t)=>K6(e,"name",{value:t,configurable:!0});function Wr(e,t){let n=Y.createSourceFile("infrastructure.ts",e,Y.ScriptTarget.Latest,!0,Y.ScriptKind.TS),i=fC(n),{appVariableName:r,appName:o}=hC(n),a=_y(n),c=Ey(n),u=xy(n),l=Ay(n),d=Iy(n),p=my(n),{databases:g,dynamodb:v,clickhouse:x}=py(p),G=hy(n),j=by(n),he=[...ny(n),...iy(n)],nt=Zl(n),_e=Hl(n),J=wy(n),ve=vC(n),Bn={sourceFile:n,imports:i,appVariableName:r,appName:o,vpcId:a,network:c,backup:u,tunnel:l,networkResources:d,databaseResources:g,dynamodbResources:v,clickhouseResources:x,sqsResources:G,cdnResource:j,s3Resources:he,computeResources:nt,schedules:_e,patternResources:J,tags:ve};return t?.extractCustomCode&&(Bn.customCodeBlocks=ns(n),Bn.classifiedStatements=et(n)),Bn}ao(Wr,"parseInfrastructure");function fC(e){let t=[];return Y.forEachChild(e,n=>{if(Y.isImportDeclaration(n)){if(!Y.isStringLiteral(n.moduleSpecifier))return;let i={moduleSpecifier:n.moduleSpecifier.text,namedImports:[]};n.importClause&&(n.importClause.name&&(i.defaultImport=n.importClause.name.text),n.importClause.namedBindings&&Y.isNamedImports(n.importClause.namedBindings)&&(i.namedImports=n.importClause.namedBindings.elements.map(r=>r.name.text))),t.push(i)}}),t}ao(fC,"extractImports");function gC(e,t){return Y.isStringLiteral(t)?t.text:Y.isIdentifier(t)?Ja(e,t.text)??"":Y.isPropertyAccessExpression(t)?Qa(e,t)??"":""}ao(gC,"resolveAppName");function hC(e){return at(e,t=>{if(Y.isVariableStatement(t))for(let n of t.declarationList.declarations){if(!n.initializer||!Zt(n.initializer))continue;let i=Y.isIdentifier(n.name)?n.name.text:"",r=n.initializer.arguments.length>0?gC(e,n.initializer.arguments[0]):"";return{appVariableName:i,appName:r}}})??{appVariableName:"",appName:""}}ao(hC,"findAppVariable");function vC(e){let t={};function n(i){if(Y.isCallExpression(i)&&Y.isPropertyAccessExpression(i.expression)&&i.expression.name.text==="addTags"&&Y.isIdentifier(i.expression.expression)&&i.arguments.length>0){let r=i.arguments[0];if(Y.isObjectLiteralExpression(r)){let o=B(r);for(let[a,c]of Object.entries(o))typeof c=="string"?t[a]=c:Vr(c)&&(t[a]="default-value")}}Y.forEachChild(i,n)}return ao(n,"visit"),n(e),t}ao(vC,"extractTags");import*as so from"typescript";var q6=Object.defineProperty,Re=(e,t)=>q6(e,"name",{value:t,configurable:!0});function co(e,t,n){return e.slice(0,t)+n+e.slice(t)}Re(co,"insertAtPosition");function ed(e,t){return e.find(n=>n.type===t)}Re(ed,"findClassification");function Oy(e,t){return e.filter(n=>n.type===t).pop()}Re(Oy,"findLastClassification");function Hr(e){return so.createSourceFile("infrastructure.ts",e,so.ScriptTarget.Latest,!0,so.ScriptKind.TS)}Re(Hr,"parseSourceFile");function td(e,t){return e.endsWith(`
439
439
 
440
440
  `)||t.startsWith(`
441
441
  `)?"":e.endsWith(`
442
442
  `)?`
443
443
  `:`
444
444
 
445
- `}Re(td,"formatLeadingNewlines");function rd(e,t){return e.slice(Math.max(0,t-2),t)}Re(rd,"getContextBeforePosition");function Yr(e,t){return t?`${e}:${t}`:e}Re(Yr,"formatResourceId");function Wt(e,t){return{content:t,success:!1,error:zt(e)}}Re(Wt,"createErrorResult");function Oy(e,t,n,i){return to(e,n,i)||Wt(new Error(`Resource not found: ${Yr(n,i)}`),t)}Re(Oy,"findResourceOrFail");function Dy(e){return"success"in e&&!e.success}Re(Dy,"isFailureResult");function vC(e,t){let{resourceType:n,code:i,afterResource:r}=t;try{let o=Hr(e),a;if(r){let u=to(o,r.type,r.name);if(!u)return Wt(new Error(`Insertion target not found: ${Yr(r.type,r.name)}`),e);a=u.endPos}else a=bC(o,n);let c=yC(e,a,i);return{content:uo(e,a,c),success:!0}}catch(o){return Wt(o,e)}}Re(vC,"addResourceSurgically");function bC(e,t){let n=Qe(e),i=["import","app-init","tags","database","storage","messaging","compute","network","vpc-peer","vpc-peer-accepter","cross-plan-connection","cdn","pattern"],r=i.indexOf(t),o=null;for(let a of n)if(a.isManaged){let c=i.indexOf(a.type);c!==-1&&c<=r&&(o=a)}return o?o.endPos:e.getEnd()}Re(bC,"findInsertionPositionByType");function yC(e,t,n){let i=rd(e,t),r=e.slice(t,Math.min(e.length,t+2)),o=td(i,n),a=r.startsWith(`
445
+ `}Re(td,"formatLeadingNewlines");function rd(e,t){return e.slice(Math.max(0,t-2),t)}Re(rd,"getContextBeforePosition");function Yr(e,t){return t?`${e}:${t}`:e}Re(Yr,"formatResourceId");function Wt(e,t){return{content:t,success:!1,error:zt(e)}}Re(Wt,"createErrorResult");function Dy(e,t,n,i){return eo(e,n,i)||Wt(new Error(`Resource not found: ${Yr(n,i)}`),t)}Re(Dy,"findResourceOrFail");function My(e){return"success"in e&&!e.success}Re(My,"isFailureResult");function bC(e,t){let{resourceType:n,code:i,afterResource:r}=t;try{let o=Hr(e),a;if(r){let u=eo(o,r.type,r.name);if(!u)return Wt(new Error(`Insertion target not found: ${Yr(r.type,r.name)}`),e);a=u.endPos}else a=yC(o,n);let c=SC(e,a,i);return{content:co(e,a,c),success:!0}}catch(o){return Wt(o,e)}}Re(bC,"addResourceSurgically");function yC(e,t){let n=et(e),i=["import","app-init","tags","database","storage","messaging","compute","network","vpc-peer","vpc-peer-accepter","cross-plan-connection","cdn","pattern"],r=i.indexOf(t),o=null;for(let a of n)if(a.isManaged){let c=i.indexOf(a.type);c!==-1&&c<=r&&(o=a)}return o?o.endPos:e.getEnd()}Re(yC,"findInsertionPositionByType");function SC(e,t,n){let i=rd(e,t),r=e.slice(t,Math.min(e.length,t+2)),o=td(i,n),a=r.startsWith(`
446
446
  `)?"":`
447
- `;return o+n+a}Re(yC,"formatCodeForInsertion");function SC(e,t){let{resourceType:n,resourceName:i,newCode:r}=t;try{let o=Hr(e),a=Oy(o,e,n,i);if(Dy(a))return a;let c=a,u=c.node.getFullStart(),l=c.endPos,d=e.slice(u,c.node.getStart()),p=_C(d);return{content:e.slice(0,u)+p+r+e.slice(l),success:!0}}catch(o){return Wt(o,e)}}Re(SC,"updateResourceSurgically");function _C(e){let t=e.match(/^[\s]*[\n\r]+[\s]*/);return t?t[0]:""}Re(_C,"extractLeadingWhitespace");function EC(e,t,n,i){let r=e,o=0;for(let a of t){let c=`// [ORPHANED: was after ${Yr(n,i)}]
448
- `,u=a.sourceText.trim(),l=r.indexOf(u,o);l!==-1&&(r=uo(r,l,c),o=l+c.length+u.length)}return r}Re(EC,"insertOrphanMarkers");function xC(e,t){let{resourceType:n,resourceName:i,orphanHandling:r}=t,o=[];try{let a=Hr(e),c=Oy(a,e,n,i);if(Dy(c))return c;let u=c,l=(Wr(e,{extractCustomCode:!0}).customCodeBlocks??[]).filter(x=>x.position==="after-resource"&&x.afterManagedResource?.type===n&&x.afterManagedResource?.name===i);if(l.length>0)if(r==="preserve-with-warning")o.push(`Custom code after ${Yr(n,i)} will be orphaned. Added // [ORPHANED] marker comment.`);else return Wt(new Error(`Orphan handling "${r}" is not yet implemented`),e);let d=u.node.getFullStart(),p=u.endPos,g=e[p]===`
449
- `?p+1:p,v=e.slice(0,d)+e.slice(g);return l.length>0&&r==="preserve-with-warning"&&(v=EC(v,l,n,i)),{content:v,success:!0,warnings:o.length>0?o:void 0}}catch(a){return Wt(a,e)}}Re(xC,"removeResourceSurgically");import*as jn from"typescript";var q6=Object.defineProperty,xt=(e,t)=>q6(e,"name",{value:t,configurable:!0});function $C(e,t){try{let n=Hr(e),i=new Set;for(let c of n.statements)jn.isImportDeclaration(c)&&i.add(c.getText(n).trim());let r=[];for(let c of t){let u=c.trim();[...i].some(l=>CC(l,u))||r.push(u)}if(r.length===0)return{content:e,success:!0};let o=n.statements.filter(jn.isImportDeclaration).at(-1)?.getEnd()??0,a=`
447
+ `;return o+n+a}Re(SC,"formatCodeForInsertion");function _C(e,t){let{resourceType:n,resourceName:i,newCode:r}=t;try{let o=Hr(e),a=Dy(o,e,n,i);if(My(a))return a;let c=a,u=c.node.getFullStart(),l=c.endPos,d=e.slice(u,c.node.getStart()),p=EC(d);return{content:e.slice(0,u)+p+r+e.slice(l),success:!0}}catch(o){return Wt(o,e)}}Re(_C,"updateResourceSurgically");function EC(e){let t=e.match(/^[\s]*[\n\r]+[\s]*/);return t?t[0]:""}Re(EC,"extractLeadingWhitespace");function xC(e,t,n,i){let r=e,o=0;for(let a of t){let c=`// [ORPHANED: was after ${Yr(n,i)}]
448
+ `,u=a.sourceText.trim(),l=r.indexOf(u,o);l!==-1&&(r=co(r,l,c),o=l+c.length+u.length)}return r}Re(xC,"insertOrphanMarkers");function AC(e,t){let{resourceType:n,resourceName:i,orphanHandling:r}=t,o=[];try{let a=Hr(e),c=Dy(a,e,n,i);if(My(c))return c;let u=c,l=(Wr(e,{extractCustomCode:!0}).customCodeBlocks??[]).filter(x=>x.position==="after-resource"&&x.afterManagedResource?.type===n&&x.afterManagedResource?.name===i);if(l.length>0)if(r==="preserve-with-warning")o.push(`Custom code after ${Yr(n,i)} will be orphaned. Added // [ORPHANED] marker comment.`);else return Wt(new Error(`Orphan handling "${r}" is not yet implemented`),e);let d=u.node.getFullStart(),p=u.endPos,g=e[p]===`
449
+ `?p+1:p,v=e.slice(0,d)+e.slice(g);return l.length>0&&r==="preserve-with-warning"&&(v=xC(v,l,n,i)),{content:v,success:!0,warnings:o.length>0?o:void 0}}catch(a){return Wt(a,e)}}Re(AC,"removeResourceSurgically");import*as jn from"typescript";var X6=Object.defineProperty,xt=(e,t)=>X6(e,"name",{value:t,configurable:!0});function RC(e,t){try{let n=Hr(e),i=new Set;for(let c of n.statements)jn.isImportDeclaration(c)&&i.add(c.getText(n).trim());let r=[];for(let c of t){let u=c.trim();[...i].some(l=>NC(l,u))||r.push(u)}if(r.length===0)return{content:e,success:!0};let o=n.statements.filter(jn.isImportDeclaration).at(-1)?.getEnd()??0,a=`
450
450
  `+r.join(`
451
- `);return{content:uo(e,o,a),success:!0}}catch(n){return Wt(n,e)}}xt($C,"ensureImports");function My(e){return new Set(e.split(",").map(t=>t.trim()).filter(Boolean))}xt(My,"parseNamedImports");function RC(e,t){let n=My(e),i=My(t);for(let r of i)if(!n.has(r))return!1;return!0}xt(RC,"existingImportCoversRequired");function CC(e,t){let n=e.match(AC),i=t.match(AC);if(!n||!i||n[1]!==i[1])return!1;let r=e.match(IC),o=t.match(IC);return r&&o?RC(r[1],o[1]):!!r==!!o}xt(CC,"importsAreEquivalent");var AC=/from\s+["']([^"']+)["']/,IC=/\{([^}]+)\}/,TC={"before-imports":0,"after-imports":1,"after-app-init":2,"after-tags":3,"after-resource":4,"end-of-file":5};function NC(e){return[...e].sort((t,n)=>{let i=TC[n.position]-TC[t.position];return i!==0?i:(n.originalLine??0)-(t.originalLine??0)})}xt(NC,"sortCustomBlocksForInsertion");function PC(e,t,n,i){if(n!==null){let o=OC(e,n,t);return uo(e,n,o)}let r=t.afterManagedResource?`// [ORPHANED: was after ${Yr(t.afterManagedResource.type,t.afterManagedResource.name)}]
451
+ `);return{content:co(e,o,a),success:!0}}catch(n){return Wt(n,e)}}xt(RC,"ensureImports");function jy(e){return new Set(e.split(",").map(t=>t.trim()).filter(Boolean))}xt(jy,"parseNamedImports");function CC(e,t){let n=jy(e),i=jy(t);for(let r of i)if(!n.has(r))return!1;return!0}xt(CC,"existingImportCoversRequired");function NC(e,t){let n=e.match(IC),i=t.match(IC);if(!n||!i||n[1]!==i[1])return!1;let r=e.match(TC),o=t.match(TC);return r&&o?CC(r[1],o[1]):!!r==!!o}xt(NC,"importsAreEquivalent");var IC=/from\s+["']([^"']+)["']/,TC=/\{([^}]+)\}/,$C={"before-imports":0,"after-imports":1,"after-app-init":2,"after-tags":3,"after-resource":4,"end-of-file":5};function PC(e){return[...e].sort((t,n)=>{let i=$C[n.position]-$C[t.position];return i!==0?i:(n.originalLine??0)-(t.originalLine??0)})}xt(PC,"sortCustomBlocksForInsertion");function wC(e,t,n,i){if(n!==null){let o=DC(e,n,t);return co(e,n,o)}let r=t.afterManagedResource?`// [ORPHANED: was after ${Yr(t.afterManagedResource.type,t.afterManagedResource.name)}]
452
452
  `:`// [ORPHANED]
453
453
  `;return i.push(`Custom code from line ${t.originalLine} could not be positioned. Added at end of file.`),e+`
454
- `+r+t.sourceText}xt(PC,"insertOrOrphanBlock");function nd(e,t,n){if(!t||t.length===0)return{content:e,success:!0};try{let i=Hr(e),r=Qe(i),o=[],a=NC(t),c=e;for(let u of a){let l=kC(i,r,u,n,o);c=PC(c,u,l,o)}return{content:c,success:!0,warnings:o.length>0?o:void 0}}catch(i){return Wt(i,e)}}xt(nd,"injectCustomCodeBlocks");function wC(e,t,n,i){if(!t.afterManagedResource)return null;let r=t.afterManagedResource,o=(r.name&&n?.get(r.name))??r.name,a=e.find(u=>u.type===r.type&&u.resourceName===o);if(a)return a.endPos;let c=e.filter(u=>u.type===r.type&&u.isManaged);return c.length===1?c[0].endPos:(i&&i.push(`Resource ${Yr(t.afterManagedResource.type,t.afterManagedResource.name)} not found. Custom code may be orphaned.`),null)}xt(wC,"findAfterResourcePosition");function kC(e,t,n,i,r){switch(n.position){case"before-imports":return 0;case"after-imports":return ky(t,"import")?.endPos??0;case"after-app-init":return ed(t,"app-init")?.endPos??null;case"after-tags":return ed(t,"tags")?.endPos??null;case"after-resource":return wC(t,n,i,r);case"end-of-file":return e.getEnd();default:return null}}xt(kC,"findCustomCodeInsertPosition");function OC(e,t,n){let i=rd(e,t),r=n.sourceText;return r=td(i,r)+r,r.endsWith(`
454
+ `+r+t.sourceText}xt(wC,"insertOrOrphanBlock");function nd(e,t,n){if(!t||t.length===0)return{content:e,success:!0};try{let i=Hr(e),r=et(i),o=[],a=PC(t),c=e;for(let u of a){let l=OC(i,r,u,n,o);c=wC(c,u,l,o)}return{content:c,success:!0,warnings:o.length>0?o:void 0}}catch(i){return Wt(i,e)}}xt(nd,"injectCustomCodeBlocks");function kC(e,t,n,i){if(!t.afterManagedResource)return null;let r=t.afterManagedResource,o=(r.name&&n?.get(r.name))??r.name,a=e.find(u=>u.type===r.type&&u.resourceName===o);if(a)return a.endPos;let c=e.filter(u=>u.type===r.type&&u.isManaged);return c.length===1?c[0].endPos:(i&&i.push(`Resource ${Yr(t.afterManagedResource.type,t.afterManagedResource.name)} not found. Custom code may be orphaned.`),null)}xt(kC,"findAfterResourcePosition");function OC(e,t,n,i,r){switch(n.position){case"before-imports":return 0;case"after-imports":return Oy(t,"import")?.endPos??0;case"after-app-init":return ed(t,"app-init")?.endPos??null;case"after-tags":return ed(t,"tags")?.endPos??null;case"after-resource":return kC(t,n,i,r);case"end-of-file":return e.getEnd();default:return null}}xt(OC,"findCustomCodeInsertPosition");function DC(e,t,n){let i=rd(e,t),r=n.sourceText;return r=td(i,r)+r,r.endsWith(`
455
455
  `)||(r+=`
456
- `),r}xt(OC,"formatCustomCodeForInsertion");function DC(e){try{let t=function(r){r.kind===jn.SyntaxKind.Unknown&&i.push("Unknown node found in AST - possible parse error"),jn.forEachChild(r,t)};xt(t,"visit");let n=Hr(e),i=[];return t(n),i.length>0?{valid:!1,errors:i}:{valid:!0}}catch(t){return{valid:!1,errors:[zt(t)]}}}xt(DC,"validateModifiedFile");import*as Ce from"typescript";var us=s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),X6=s.object({name:s.string(),type:us,ttl:s.number().optional(),value:s.string(),priority:s.number().optional(),weight:s.number().optional(),port:s.number().optional()}).strict(),J6=s.object({subdomain:s.string(),targetAccount:s.string(),auto:s.boolean()}).strict(),Q6=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string())}).strict(),eee=s.object({origin:s.string(),ttl:s.number(),records:s.array(X6),delegations:s.array(J6),certificates:s.array(Q6)}).strict(),Ht=Object.freeze({ORIGIN:"$ORIGIN",TTL:"$TTL",FJALL_DELEGATE:"$FJALL-DELEGATE",FJALL_CERT:"$FJALL-CERT"}),MC="ALIAS ";var jC=s.discriminatedUnion("kind",[s.object({kind:s.literal("ecs"),appName:s.string(),computeName:s.string().min(1).optional()}).strict(),s.object({kind:s.literal("cdn"),appName:s.string()}).strict(),s.object({kind:s.literal("bucket"),bucketName:s.string()}).strict(),s.object({kind:s.literal("custom"),dnsName:s.string(),hostedZoneId:s.string()}).strict()]),zC=jC.options.map(e=>e.shape.kind.value),jy=s.enum(["A","AAAA"]),zy=s.enum(["route53","external-delegated","external-records"]),LC=s.enum(["zone","full"]),eF=s.object({kind:s.literal("standard"),type:s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),name:s.string(),value:s.union([s.string(),s.array(s.string())]),ttl:s.number().int().positive().optional()}).strict(),tF=s.object({kind:s.literal("alias"),type:jy,name:s.string(),target:jC}).strict(),rF=s.discriminatedUnion("kind",[eF,tF]),nF=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string()).optional(),transparencyLogging:s.boolean().optional(),cloudFront:s.boolean().optional()}).strict(),iF=s.object({subdomain:s.string(),toAccount:s.string(),auto:s.boolean().optional()}).strict(),nee=s.object({zoneName:s.string(),registrar:zy,hostedZoneId:s.string().optional(),delegatedSubdomain:s.string().optional(),adoptedNameServers:s.array(s.string().min(1)).min(1).optional(),records:s.array(rF),certificates:s.array(nF),delegations:s.array(iF)}).strict().refine(e=>e.registrar!=="external-delegated"||e.delegatedSubdomain!==void 0,{message:"external-delegated requires delegatedSubdomain"}).refine(e=>e.registrar!=="external-records"||e.delegations.length===0,{message:"external-records forbids delegations"}).refine(e=>e.registrar==="external-delegated"||e.adoptedNameServers===void 0,{message:"adoptedNameServers requires registrar external-delegated"}).refine(e=>e.registrar!=="external-delegated"||e.hostedZoneId===void 0==(e.adoptedNameServers===void 0),{message:"external-delegated adoption requires hostedZoneId and adoptedNameServers together (both-or-neither)"});var oF=Object.defineProperty,ge=(e,t)=>oF(e,"name",{value:t,configurable:!0}),FC=zy.options,UC=LC.options,aF=us.options,sF=jy.options;function BC(e){let t=[],n=ge(r=>{if(Ce.isNewExpression(r)&&VC(r.expression)){let o=GC(r);o!==void 0&&t.push(o)}Ce.forEachChild(r,n)},"visit");if(n(e),t.length===0)return P(void 0);if(t.length>1)return T(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${t.length}`));let i=t[0];return i?P(i):P(void 0)}ge(BC,"findDomainConstructCall");function VC(e){return Ce.isIdentifier(e)&&e.text==="Domain"}ge(VC,"isDomainIdentifier");function GC(e){let t=e.arguments;if(!t||t.length<3)return;let n=t[0],i=t[1],r=t[2];if(!n||!i||!r||!Ce.isObjectLiteralExpression(r))return;let o=ZC(e);if(o===void 0)return;let a=WC(e),c=Ce.isStringLiteral(i)?i.text:void 0;return{callExpression:e,containingStatement:o,propsObjectLiteral:r,domainVarId:a,scopeArgumentText:n.getText(),constructIdLiteral:c}}ge(GC,"buildMatch");function ZC(e){let t=e;for(;t!==void 0;){if(Ce.isExpressionStatement(t)||Ce.isVariableStatement(t))return t;t=t.parent}}ge(ZC,"findContainingTopLevelStatement");function WC(e){let t=e.parent;for(;t!==void 0;){if(Ce.isVariableDeclaration(t)&&Ce.isIdentifier(t.name)&&t.initializer===e)return t.name.text;t=t.parent}}ge(WC,"extractDomainVarId");function HC(e){switch(e.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${FC.join(", ")}, got ${JSON.stringify(e.value)}`;case"missing_field":return`'${e.field}' property is required`;case"invalid_literal":return`'${e.field}' ${e.reason}`;case"removed_field":return`'${e.field}' was removed from the Domain API \u2014 ${e.cure}`}}ge(HC,"errorMessage");var cF="declare the delegated child as its own Domain with registrar: 'external-delegated' and set 'parentDelegationRoleArn' (the CLI injects it via ManagedDomainBinding.delegationRoleArn); the child UPSERTs its NS records into the parent zone";function YC(e){let t=B(e),n=U(t.registrar,FC);if(n===void 0){let c=t.registrar;if(c===void 0)return T({kind:"registrar_required"});let u=typeof c=="string"?c:od(c);return T({kind:"registrar_unsupported",value:u})}let i=b(t.zoneName);if(i===void 0)return T({kind:"missing_field",field:"zoneName"});let r=qC(t.records);if(!r.success)return r;let o=tN(t.certificates);if(!o.success)return o;if(t.delegations!==void 0)return T({kind:"removed_field",field:"delegations",cure:cF});let a={zoneName:i,description:b(t.description),costAllocationEnvironment:b(t.costAllocationEnvironment),tags:rN(t.tags),records:r.data,certificates:o.data};switch(n){case"route53":return P({...a,registrar:n,hostedZoneId:b(t.hostedZoneId)});case"external-delegated":{let c=b(t.delegatedSubdomain);if(c===void 0)return T({kind:"missing_field",field:"delegatedSubdomain"});let u=b(t.hostedZoneId);if(t.hostedZoneId!==void 0&&u===void 0)return T({kind:"invalid_literal",field:"hostedZoneId",reason:"must be a literal string zone id on external-delegated \u2014 dynamic expressions cannot be round-tripped"});let l=me(t.adoptedNameServers);if(t.adoptedNameServers!==void 0&&l===void 0)return T({kind:"invalid_literal",field:"adoptedNameServers",reason:"must be an array of literal NS hostname strings \u2014 the parent NS UPSERT writes them verbatim"});if(u===void 0!=(l===void 0))return T({kind:"invalid_literal",field:u===void 0?"hostedZoneId":"adoptedNameServers",reason:"adopting an existing child zone requires hostedZoneId and adoptedNameServers together (both-or-neither) \u2014 an imported zone exposes no name-server attribute at synth"});let d=b(t.parentDelegationRoleArn);if(t.parentDelegationRoleArn!==void 0&&d===void 0)return T({kind:"invalid_literal",field:"parentDelegationRoleArn",reason:"must be a literal string ARN (VD2-a) \u2014 the CLI injects it via ManagedDomainBinding.delegationRoleArn; dynamic expressions such as Fn.importValue are not supported"});let p=U(t.phase,UC);return t.phase!==void 0&&p===void 0?T({kind:"invalid_literal",field:"phase",reason:`must be one of ${UC.map(g=>`'${g}'`).join(", ")}`}):P({...a,registrar:n,delegatedSubdomain:c,hostedZoneId:u,adoptedNameServers:l,parentDelegationRoleArn:d,phase:p})}case"external-records":return P({...a,registrar:n})}}ge(YC,"parseDomainProps");function KC(e){return HC(e)}ge(KC,"parseDomainErrorMessage");function qC(e){if(e===void 0)return P([]);if(!Array.isArray(e))return T({kind:"invalid_literal",field:"records",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(!N(i))return T({kind:"invalid_literal",field:`records[${n}]`,reason:"must be an object literal"});let r=XC(i,n);if(!r.success)return r;t.push(r.data)}return P(t)}ge(qC,"parseRecordsArray");function XC(e,t){let n=b(e.type),i=b(e.name);if(n===void 0)return T({kind:"missing_field",field:`records[${t}].type`});if(i===void 0)return T({kind:"missing_field",field:`records[${t}].name`});if(e.target!==void 0){if(!sF.some(u=>u===n))return T({kind:"invalid_literal",field:`records[${t}]`,reason:`alias records must have type 'A' or 'AAAA', got '${n}'`});let c=QC(e.target);return P({kind:"alias",type:n,name:i,target:c})}if(!aF.some(c=>c===n))return T({kind:"invalid_literal",field:`records[${t}]`,reason:`unsupported record type '${n}'`});let r=JC(e.value);if(r===void 0)return T({kind:"invalid_literal",field:`records[${t}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(e.value)})`});let o=C(e.ttl),a={kind:"standard",type:n,name:i,value:r,...o!==void 0?{ttl:o}:{}};return P(a)}ge(XC,"parseRecord");function JC(e){if(e===void 0)return;if(typeof e=="string")return e;let t=me(e);if(t!==void 0)return t}ge(JC,"parseRecordValue");function QC(e){if(Ct(e))return eN(e);if(N(e)){let t=U(e.kind,zC);if(t==="ecs"||t==="cdn"){let n=b(e.appName);if(n!==void 0)return{kind:t,appName:n}}if(t==="bucket"){let n=b(e.bucketName);if(n!==void 0)return{kind:t,bucketName:n}}if(t==="custom"){let n=b(e.dnsName),i=b(e.hostedZoneId);if(n!==void 0&&i!==void 0)return{kind:t,dnsName:n,hostedZoneId:i}}}return{kind:"unresolved",sourceText:od(e)}}ge(QC,"parseTarget");function eN(e){let t=e.__call.trim(),n=t.match(/^([A-Za-z_][\w$]*)\s*\(([\s\S]*)\)\s*$/);if(!n)return{kind:"unresolved",sourceText:t};let i=n[1],r=n[2]??"",o=id(r);switch(i){case"fjallApp":{let a=Kr(o,0);if(a===void 0)return{kind:"dynamic",sourceText:t};if(o.length<2)return{kind:"ecs",appName:a};let c=Kr(o,1);return c===void 0?{kind:"dynamic",sourceText:t}:{kind:"ecs",appName:a,computeName:c}}case"fjallCdn":{let a=Kr(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"cdn",appName:a}}case"fjallBucket":{let a=Kr(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"bucket",bucketName:a}}case"aliasTo":{if(o.length>=2){let a=Kr(o,0),c=Kr(o,1);return a!==void 0&&c!==void 0?{kind:"custom",dnsName:a,hostedZoneId:c}:{kind:"dynamic",sourceText:t}}if(o.length===1){let a=o[0]?.trim()??"",c=Ly(a,"dnsName"),u=Ly(a,"hostedZoneId");return c!==void 0&&u!==void 0?{kind:"custom",dnsName:c,hostedZoneId:u}:{kind:"dynamic",sourceText:t}}return{kind:"unresolved",sourceText:t}}default:return{kind:"unresolved",sourceText:t}}}ge(eN,"resolveCallRefTarget");function id(e){let t=[],n=0,i=null,r="";for(let a=0;a<e.length;a++){let c=e[a];if(i!==null){if(r+=c,c==="\\"&&a+1<e.length){let u=e[a+1];u!==void 0&&(r+=u,a+=1);continue}c===i&&(i=null);continue}if(c==='"'||c==="'"||c==="`"){i=c,r+=c;continue}if(c==="("||c==="{"||c==="["){n+=1,r+=c;continue}if(c===")"||c==="}"||c==="]"){n-=1,r+=c;continue}if(c===","&&n===0){t.push(r.trim()),r="";continue}r+=c}let o=r.trim();return o.length>0&&t.push(o),t}ge(id,"splitTopLevelArgs");function Kr(e,t){let n=e[t];if(n===void 0)return;let i=n.trim();if(i.length<2)return;let r=i[0],o=i[i.length-1];if(r===o&&!(r!=='"'&&r!=="'"&&r!=="`"))return i.slice(1,-1)}ge(Kr,"extractStringLiteralArg");function Ly(e,t){let n=e.trim().replace(/^\{|\}$/g,""),i=id(n);for(let r of i){let o=r.indexOf(":");if(o<0||r.slice(0,o).trim().replace(/["'`]/g,"")!==t)continue;let a=r.slice(o+1).trim();return Kr([a],0)}}ge(Ly,"extractObjectFieldString");function tN(e){if(e===void 0)return P([]);if(!Array.isArray(e))return T({kind:"invalid_literal",field:"certificates",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(typeof i=="string"){t.push({domainName:i});continue}if(!N(i))return T({kind:"invalid_literal",field:`certificates[${n}]`,reason:"must be a string or object literal"});let r=b(i.domainName);if(r===void 0)return T({kind:"missing_field",field:`certificates[${n}].domainName`});let o=me(i.subjectAlternativeNames),a=z(i.transparencyLogging),c=z(i.cloudFront);if(i.cloudFront!==void 0&&c===void 0)return T({kind:"invalid_literal",field:`certificates[${n}].cloudFront`,reason:"must be a boolean literal \u2014 the CloudFront designation drives the zone-level us-east-1 export contract and cannot be round-tripped from a dynamic expression"});t.push({domainName:r,...o!==void 0?{subjectAlternativeNames:o}:{},...a!==void 0?{transparencyLogging:a}:{},...c!==void 0?{cloudFront:c}:{}})}return P(t)}ge(tN,"parseCertificatesArray");function rN(e){if(e===void 0||!N(e))return;let t={};for(let[n,i]of Object.entries(e)){let r=b(i);r!==void 0&&(t[n]=r)}return Object.keys(t).length===0?void 0:t}ge(rN,"parseStringRecord");function od(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(t=>od(t)).join(", ")}]`;if(typeof e=="object"){if("__call"in e)return String(e.__call);if("__identifier"in e)return String(e.__identifier);if("__expression"in e)return String(e.__expression);if("__unknown"in e)return String(e.__unknown)}return String(e)}ge(od,"stringifyParsedValue");var uF=Object.defineProperty,gr=(e,t)=>uF(e,"name",{value:t,configurable:!0});function nN(e){return e?.map(t=>({name:t.name,...t.serviceType!==void 0&&{serviceType:t.serviceType},...t.docker!==void 0&&{docker:t.docker},...t.containerPort!==void 0&&{containerPort:t.containerPort},...t.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...t.routing!==void 0&&{routing:t.routing}}))}gr(nN,"toUserServiceConfigs");function iN(e,t,n=!0,i,r){let o={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return o;let a=t,c=lr[a];return{...o,database:oN(e,c,a,n,r),compute:uN(e,c,a,n,i),network:c.network,backup:c.backup}}gr(iN,"planApplicationResources");function oN(e,t,n,i,r){let o=Vb(n),a=t.database[o];return!i||a===null?[]:[{name:e,type:o,databaseName:Gn(e),variableName:`${cr(e)}Database`,...a,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}gr(oN,"buildDatabasePlan");function aN(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}gr(aN,"buildScalingConfig");function Uy(e){let{minCapacity:t,maxCapacity:n,...i}=e;return{...i,...aN(t,n)}}gr(Uy,"planServiceFromTierPreset");function sN(e,t){let n=Uy(e),i=t?.serviceType==="worker",r=t?.containerPort??P$,o=t?.docker;return{...n,...o?.path!==void 0&&{docker:{path:o.path,...o.context!==void 0&&{context:o.context},...o.target!==void 0&&{target:o.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...i&&{serviceType:"worker"},containers:i?[{}]:[{port:r}]}}gr(sN,"buildServiceEntry");function cN(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}gr(cN,"resolveClusterConfig");function uN(e,t,n,i,r){let o=t.compute.ecs,a=(r&&r.length>0?Gb(n,r):o.services.map((u,l)=>({...u,name:l===0?"api":`service-${l+1}`}))).map((u,l)=>sN(u,r?.[l])),c=a.some(u=>u.containers?.some(l=>l.port!==void 0));return[{name:e,type:Li.ECS,needsConnection:i,connectedDatabase:i?[e]:void 0,variableName:`${cr(e)}Compute`,cluster:cN(o.cluster,c),services:a}]}gr(uN,"buildComputePlan");function lo(e,t){let n=[Dl(e),Ol(e),kl(e)];if(zl(e))n.push(Ya(e),qa(e));else{let r=jl(e);n.push(qa(e),_l(e),El(e),Nl(e),Pl(e),wl(e),Tl(e,r),Ml(e))}let i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){let r=nd(i,e.customCodeBlocks,t?.resourceMapping);return r.success?P(r.content):T(new Error(`Custom code injection failed: ${r.error??"unknown error"}`))}return P(i)}gr(lo,"generateInfrastructureFromPlan");var lF=Object.defineProperty,mo=(e,t)=>lF(e,"name",{value:t,configurable:!0}),dF=Bb("standard");function lN(e){return ka.options.some(t=>t.shape?.type?.value===e)}mo(lN,"isPatternConfigType");function dN(e,t,n){let{tier:i="standard",domain:r,database:o,compute:a,cdn:c,environment:u,tags:l}=n??{},d=Ul(i);if(!d&&i!=="custom")return T(new Error(`Invalid pattern tier: "${i}". Valid tiers are: ${[...Ja,"custom"].join(", ")}`));if(!lN(t))return T(new Error(`Unsupported pattern type: ${t}`));let p=d?Ll(i):null,g=gN(t,e,{domain:r,database:o,compute:a,cdn:c,environment:u,tierPreset:p});if(!g.success)return g;let v=g.data;return P({appName:e,type:"standard",pattern:t,network:p?p.network:dF,backup:p?p.backup:!1,patternConfig:v,database:[],s3:[],compute:[],tags:l??{}})}mo(dN,"planOpenNextResources");function mN(e,t){return{type:e?.type??t.database.type,instanceType:e?.instanceType??t.database.instanceType,backupRetention:e?.backupRetention??t.database.backupRetention,deletionProtection:e?.deletionProtection??t.database.deletionProtection,...e?.databaseName!==void 0&&{databaseName:e.databaseName},...e?.publiclyAccessible!==void 0&&{publiclyAccessible:e.publiclyAccessible},...e?.allowedIpCidr!==void 0&&{allowedIpCidr:e.allowedIpCidr},...e?.encryption!==void 0&&{encryption:e.encryption}}}mo(mN,"mergeDatabaseConfig");function pN(e,t){return{memorySize:e?.memorySize??t.compute.memorySize,timeout:e?.timeout??t.compute.timeout}}mo(pN,"mergeComputeConfig");function fN(e){let{encryption:t,...n}=e;return{...n,...t&&{encryption:{storageKey:t}}}}mo(fN,"toPatternDatabaseConfig");function gN(e,t,n){let{domain:i,database:r,compute:o,cdn:a,environment:c,tierPreset:u}=n,l=u?mN(r,u):r,d=u?pN(o,u):o,p={type:e,name:t,domain:i,database:l?fN(l):void 0,compute:d?{server:d}:void 0,cdn:a?{domainNames:a.domainNames,certificateArn:a.certificateArn}:void 0,environment:c},g=ka.safeParse(p);return g.success?P(g.data):T(new Error(`Invalid pattern config: ${g.error.message}`))}mo(gN,"buildPatternConfig");var mF=Object.defineProperty,pF=(e,t)=>mF(e,"name",{value:t,configurable:!0});function hN(e,t){let n={type:"staticsite",name:e,source:t.source,build:t.build,...t.routing!==void 0&&{routing:t.routing},...t.security!==void 0&&{security:t.security},...t.domain!==void 0&&{domain:t.domain},...t.forms!==void 0&&{forms:t.forms},...t.cdn!==void 0&&{cdn:t.cdn}},i=Ib.safeParse(n);return i.success?P({appName:e,type:"standard",pattern:"staticsite",patternConfig:i.data,database:[],s3:[],compute:[],tags:t.tags??{}}):T(new Error(`Invalid static-site pattern config: ${i.error.message}`))}pF(hN,"planStaticSiteResources");var fF=Object.defineProperty,ad=(e,t)=>fF(e,"name",{value:t,configurable:!0});function vN(e){let t=e.split("/");if(t.length!==2||!t[0]||!t[1])throw new Error(`Invalid service reference format: '${e}'. Expected 'ClusterName/ServiceName'.`);return t[0]}ad(vN,"parseServiceReference");function Fy(e,t,n){n==="database"?(e.needsConnection=!0,e.connectedDatabase=[...new Set([...e.connectedDatabase??[],t])]):e.connectedStorage=[...new Set([...e.connectedStorage??[],t])]}ad(Fy,"addResourceConnection");function sd(e,t,n,i){let r=new Set(t),o=[...new Set(t.map(vN))];for(let a of o){let c=e.compute.find(u=>u.name===a);if(c?.services){Fy(c,n,i);for(let u of c.services){let l=`${a}/${u.name}`;r.has(l)&&(i==="database"?u.needsDatabaseConnection=!0:u.needsStorageConnection=!0)}}}}ad(sd,"applyServiceConnections");function cd(e,t,n,i){for(let r of e.compute)if(t.includes(r.name)&&(Fy(r,n,i),r.services))for(let o of r.services)i==="database"?o.needsDatabaseConnection=!0:o.needsStorageConnection=!0}ad(cd,"applyComputeConnections");var gF=Object.defineProperty,Se=(e,t)=>gF(e,"name",{value:t,configurable:!0});function bN(e){let t=e.database.length>0,n=e.cdn!==void 0;return[{type:"database",label:"Database (RDS)",available:!0},{type:"database:proxy",label:"RDS Proxy",available:t,reason:t?void 0:"Requires at least one database"},{type:"storage:s3",label:"S3 Bucket",available:!0},{type:"network",label:"Network (VPC)",available:!0},{type:"compute:ecs",label:"Compute (ECS)",available:!0},{type:"compute:lambda",label:"Compute (Lambda)",available:!0},{type:"cdn",label:"CDN (CloudFront)",available:!n,reason:n?"A CDN is already configured. Remove existing CDN first.":void 0},{type:"tunnel",label:"Database Tunnel",available:t&&!e.tunnel,reason:t?e.tunnel?"Tunnel is already enabled":void 0:"Requires at least one database"}]}Se(bN,"listAvailableResources");function ls(e,t){if(Vy(e,t.resourceName))return T(new Error(Gy(t.resourceName)));switch(t.type){case"database":return yN(e,t);case"database:proxy":return SN(e,t);case"storage:s3":return P(void 0);case"network":return P(void 0);case"compute:ecs":return!t.services||t.services.length===0?T(new Error("ECS compute requires at least one service.")):P(void 0);case"compute:lambda":return P(void 0);case"cdn":return _N(e,t);case"tunnel":return EN(e);default:{let n=t;return T(new Error(`Unknown resource type: ${String(n)}`))}}}Se(ls,"validateResourceAddition");function yN(e,t){let n=t.databaseName??t.resourceName.toLowerCase();return e.database.some(i=>i.databaseName===n)?T(new Error(`Database name '${n}' already exists. Choose a different database name.`)):t.databaseType==="GlobalAurora"&&!t.primaryRegion?T(new Error("GlobalAurora databases require a primaryRegion.")):P(void 0)}Se(yN,"validateDatabaseAddition");function SN(e,t){let n=e.database.find(i=>i.name===t.targetDatabase||i.databaseName===t.targetDatabase);if(!n){let i=e.database.map(r=>r.name).join(", ")||"none";return T(new Error(`Database '${t.targetDatabase}' not found. Available databases: ${i}`))}return n.proxy!==void 0&&n.proxy!==!1?T(new Error(`Database '${n.name}' already has RDS Proxy enabled.`)):P(void 0)}Se(SN,"validateProxyAddition");function _N(e,t){if(e.cdn)return T(new Error("A CDN is already configured for this application. Remove the existing CDN first."));if(!By(e,t.defaultOriginRef))return T(new Error(`Origin '${t.defaultOriginRef}' not found in plan. CDN origin must reference an existing resource.`));if(t.behaviours){for(let n of t.behaviours)if(!By(e,n.originRef))return T(new Error(`Behaviour origin '${n.originRef}' not found in plan.`))}return P(void 0)}Se(_N,"validateCdnAddition");function EN(e){return e.tunnel&&typeof e.tunnel=="object"?T(new Error("Tunnel is already enabled for this application.")):e.database.length===0?T(new Error("No databases found \u2014 tunnel requires at least one relational database.")):P(void 0)}Se(EN,"validateTunnelAddition");function ud(e,t){let n=ls(e,t);if(!n.success)return n;switch(t.type){case"database":return xN(e,t);case"database:proxy":return AN(e,t);case"storage:s3":return IN(e,t);case"network":return TN(e,t);case"compute:ecs":return $N(e,t);case"compute:lambda":return RN(e,t);case"cdn":return CN(e,t);case"tunnel":return NN(e,t);default:{let i=t;return T(new Error(`Unknown resource type: ${String(i)}`))}}}Se(ud,"addResourceToPlan");function xN(e,t){let n=t.databaseName??t.resourceName.toLowerCase(),i={name:t.resourceName,type:t.databaseType,databaseName:n},r;switch(t.databaseType){case"Instance":r={...i,...t.instanceType!==void 0?{instanceType:t.instanceType}:{},...t.multiAz!==void 0?{multiAz:t.multiAz}:{},...t.readReplica!==void 0?{readReplica:t.readReplica}:{},...t.publiclyAccessible!==void 0?{publiclyAccessible:t.publiclyAccessible}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{}};break;case"Aurora":r={...i,...t.writer!==void 0?{writer:t.writer}:{},...t.readers!==void 0?{readers:t.readers}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{},...t.preferredMaintenanceWindow!==void 0?{preferredMaintenanceWindow:t.preferredMaintenanceWindow}:{}};break;case"GlobalAurora":r={...i,primaryRegion:t.primaryRegion,...t.secondaryRegions!==void 0?{secondaryRegions:t.secondaryRegions}:{}};break;default:{let a=t.databaseType;return T(new Error(`Unknown database type: ${String(a)}`))}}let o={...e,database:[...e.database,r]};return Zy(o,t.resourceName,"database",t),P(o)}Se(xN,"addDatabase");function AN(e,t){let n=e.database.map(o=>({...o})),i=n.find(o=>o.name===t.targetDatabase||o.databaseName===t.targetDatabase);if(!i)return T(new Error(`Database '${t.targetDatabase}' not found.`));let r={};return t.maxConnections!==void 0&&(r.maxConnections=t.maxConnections),t.maxIdleConnections!==void 0&&(r.maxIdleConnections=t.maxIdleConnections),t.connectionBorrowTimeout!==void 0&&(r.connectionBorrowTimeout=t.connectionBorrowTimeout),t.requireTLS!==void 0&&(r.requireTLS=t.requireTLS),i.proxy=Object.keys(r).length>0?r:{},P({...e,database:n})}Se(AN,"addProxy");function IN(e,t){let n=t.bucketName??t.resourceName.toLowerCase(),i=Pe(n),r=e.s3.length,o=r===0?"":`${r+1}`,a={name:i,bucketName:n,variableName:`bucket${o}`,...t.publicReadAccess!==void 0?{publicReadAccess:t.publicReadAccess}:{},...t.versioned!==void 0?{versioned:t.versioned}:{},...t.encryption!==void 0?{encryption:t.encryption}:{},...t.websiteHosting?{websiteHosting:{indexDocument:"index.html"}}:{}},c={...e,s3:[...e.s3,a]};return Zy(c,i,"storage",t),P(c)}Se(IN,"addS3");function TN(e,t){let n={};if(t.maxAzs!==void 0&&(n.maxAzs=t.maxAzs),t.natGateways!==void 0&&(n.natGateways=t.natGateways),t.flowLogs!==void 0&&(n.flowLogs=t.flowLogs),t.vpcEndpoints!==void 0&&(n.vpcEndpoints=t.vpcEndpoints),t.networkName){let i={name:t.networkName,...n};return P({...e,additionalNetworks:[...e.additionalNetworks??[],i]})}return P({...e,network:{...e.network??{},...n}})}Se(TN,"addNetwork");function $N(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"ecs",needsConnection:n.length>0,connectedDatabase:n,...t.loadBalancer!==void 0?{cluster:{loadBalancer:t.loadBalancer}}:{},services:t.services.map(r=>({name:r.name,capacityProvider:r.capacityProvider??"FARGATE",...r.port!==void 0?{containers:[{port:r.port}]}:{},...r.cpu!==void 0?{cpu:r.cpu}:{},...r.memory!==void 0?{memoryLimitMiB:r.memory}:{}})),...t.docker!==void 0&&{docker:t.docker}};return P({...e,compute:[...e.compute,i]})}Se($N,"addEcsCompute");function RN(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"lambda",needsConnection:n.length>0,connectedDatabase:n,...t.timeout!==void 0?{timeout:t.timeout}:{},...t.memory!==void 0?{memory:t.memory}:{},...t.handler!==void 0?{handler:t.handler}:{},...t.runtime!==void 0?{runtime:t.runtime}:{}};return P({...e,compute:[...e.compute,i]})}Se(RN,"addLambdaCompute");function CN(e,t){let n={name:t.resourceName,defaultOriginRef:t.defaultOriginRef,...t.customDomain!==void 0?{customDomain:t.customDomain}:{},...t.certificateArn!==void 0?{certificateArn:t.certificateArn}:{},...t.behaviours&&t.behaviours.length>0?{behaviours:[...t.behaviours].map(i=>({pathPattern:i.pathPattern,originRef:i.originRef,...i.cachePolicy!==void 0?{cachePolicy:i.cachePolicy}:{}}))}:{}};return P({...e,cdn:n})}Se(CN,"addCdn");function NN(e,t){let n=t.instanceType?{instanceType:t.instanceType}:{};return P({...e,tunnel:n})}Se(NN,"addTunnel");function Vy(e,t){let n=[...e.database.map(i=>i.name),...(e.clickhouse??[]).map(i=>i.name),...e.s3.map(i=>i.name),...e.compute.map(i=>i.name),...(e.dynamodb??[]).map(i=>i.name),...(e.sqs??[]).map(i=>i.name),...(e.additionalNetworks??[]).map(i=>i.name)];return e.cdn&&n.push(e.cdn.name),n.includes(t)}Se(Vy,"isResourceNameTaken");function Gy(e){return`Resource name '${e}' is already used in this application.`}Se(Gy,"resourceNameTakenMessage");function By(e,t){return e.database.some(n=>n.name===t)||e.s3.some(n=>n.name===t)||e.compute.some(n=>n.name===t)||(e.dynamodb??[]).some(n=>n.name===t)||(e.sqs??[]).some(n=>n.name===t)}Se(By,"resourceExistsInPlan");function Zy(e,t,n,i){i.connectToCompute&&i.connectToCompute.length>0&&cd(e,[...i.connectToCompute],t,n),i.connectToServices&&i.connectToServices.length>0&&sd(e,[...i.connectToServices],t,n)}Se(Zy,"applyConnections");var hF=Object.defineProperty,vF=(e,t)=>hF(e,"name",{value:t,configurable:!0});function PN(e,t,n){let i;try{i=Wr(e,{extractCustomCode:!0})}catch(u){return T(new Error(`Failed to parse infrastructure.ts: ${u instanceof Error?u.message:String(u)}`))}let r;try{r=Mn(i,t,{skipValidation:!0})}catch(u){return T(new Error(`Failed to build resource plan: ${u instanceof Error?u.message:String(u)}`))}i.customCodeBlocks&&i.customCodeBlocks.length>0&&(r.customCodeBlocks=i.customCodeBlocks);let o=ls(r,n);if(!o.success)return o;let a=ud(r,n);if(!a.success)return a;let c=lo(a.data);return c.success?P({originalContent:e,modifiedContent:c.data,addedResource:{type:n.type,name:n.resourceName}}):T(new Error(`Code generation failed: ${c.error.message}`))}vF(PN,"generateResourceChange");var bF=Object.defineProperty,zn=(e,t)=>bF(e,"name",{value:t,configurable:!0});function Yt(e,...t){let n={};for(let i of t)e[i]!==void 0&&(n[i]=e[i]);return n}zn(Yt,"pickDefined");function wN(e,t){let n={name:e,type:t.databaseType,databaseName:t.databaseName,...Yt(t,"databaseInsights","port","proxy","credentials","encryption","deletionProtection")};switch(t.databaseType){case"Instance":return{...n,...Yt(t,"instanceType","multiAz","readReplica","publiclyAccessible","backupRetention","allocatedStorage","snapshotIdentifier","snapshotUsername")};case"Aurora":return{...n,...Yt(t,"writer","readers","backupRetention","preferredMaintenanceWindow","monitoringInterval","snapshotIdentifier","snapshotUsername")};case"GlobalAurora":return{...n,primaryRegion:t.primaryRegion,...t.secondaryRegions&&t.secondaryRegions.length>0&&{secondaryRegions:t.secondaryRegions},...Yt(t,"globalClusterIdentifier","enableGlobalWriteForwarding","writer","readers","backupRetention","preferredMaintenanceWindow","monitoringInterval","snapshotIdentifier","snapshotUsername")};default:return t}}zn(wN,"buildRelationalResourcePlan");function kN(e){return`${e}Database`}zn(kN,"defaultRelationalDatabaseName");function ON(e,t){return`Database name '${e}' already exists in ${t}. Please choose a different database name.`}zn(ON,"duplicateDatabaseNameMessage");function DN(e,t){let n=e.find(r=>r.name===t.databaseName||r.databaseName===t.databaseName);if(!n)return{ok:!1,message:`Database '${t.databaseName}' not found. Available databases: ${e.map(r=>r.name).join(", ")||"none"}`};if(n.proxy!==void 0&&n.proxy!==!1)return{ok:!1,message:`Database '${n.name}' already has RDS Proxy enabled.`};let i=Yt(t,"maxConnections","maxIdleConnections","connectionBorrowTimeout","requireTLS");return{ok:!0,database:n,proxyValue:Object.keys(i).length>0?i:{}}}zn(DN,"resolveProxyAddition");function MN(e,t){return{name:e,type:"ClickHouse",databaseName:t.databaseName,...Yt(t,"instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays")}}zn(MN,"buildClickHouseResourcePlan");function jN(e,t,n){let i=t.storagePreset??"standard",r=Fl[i],o=n===0?"":`${n+1}`;return{name:e,bucketName:t.bucketName,variableName:`bucket${o}`,...r,...Yt(t,"publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors")}}zn(jN,"buildS3ResourcePlan");var yF=Object.defineProperty,Kt=(e,t)=>yF(e,"name",{value:t,configurable:!0}),SF=new Set(us.options);function zN(e){return SF.has(e.toUpperCase())}Kt(zN,"isRecordType");function LN(e){return e.endsWith(".")?e.slice(0,-1):e}Kt(LN,"stripTrailingDot");function UN(e){let t=!1;for(let n=0;n<e.length;n++)if(e[n]==='"')t=!t;else if(e[n]===";"&&!t)return e.slice(0,n).trimEnd();return e}Kt(UN,"stripInlineComment");function FN(e,t){let n=e.slice(t).join(" "),i=[],r="",o=!1;for(let a of n)a==='"'?(o&&(i.push(r),r=""),o=!o):o&&(r+=a);return i.join(" ")}Kt(FN,"parseTxtValue");function BN(e){let t=/;\s*auto\s*$/.test(e),n=e.replace(/;\s*auto\s*$/,"").trim().match(/^\$FJALL-DELEGATE\s+(\S+)\s+TO\s+(\S+)$/i);if(n)return{subdomain:n[1],targetAccount:n[2],auto:t}}Kt(BN,"parseDelegateDirective");function VN(e){if(e.length<2)return;let t=e[1],n=e.slice(2);return{domainName:t,subjectAlternativeNames:n}}Kt(VN,"parseCertDirective");function GN(e){let t=[],n="",i=!1;for(let r of e)r==='"'?(i=!i,n+=r):/\s/.test(r)&&!i?n.length>0&&(t.push(n),n=""):n+=r;return n.length>0&&t.push(n),t}Kt(GN,"tokenise");function ZN(e){if(e.length<2)return;let t=0,n=e[t++],i,r;for(;t<e.length&&r===void 0;){let a=e[t].toUpperCase();if(a==="IN")t++;else if(zN(a))r=a,t++;else if(/^\d+$/.test(e[t]))i=parseInt(e[t],10),t++;else return}if(!r)return;let o=e.slice(t);switch(r){case"MX":{if(o.length<2)return;let a=parseInt(o[0],10),c=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:c,priority:a}}case"SRV":{if(o.length<4)return;let a=parseInt(o[0],10),c=parseInt(o[1],10),u=parseInt(o[2],10),l=o[3];return{name:n,type:r,ttl:i,value:l,priority:a,weight:c,port:u}}case"TXT":{let a=FN(e,t);return{name:n,type:r,ttl:i,value:a}}case"CAA":{let a=o.join(" ");return{name:n,type:r,ttl:i,value:a}}case"A":case"AAAA":{if(o.length===0)return;if(o[0].toUpperCase()==="ALIAS"){if(o.length<2)return;let a=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:`${MC}${a}`}}return{name:n,type:r,ttl:i,value:o[0]}}default:return o.length===0?void 0:{name:n,type:r,ttl:i,value:o[0]}}}Kt(ZN,"parseRecord");function WN(e){let t=e.split(`
457
- `),n,i=300,r=[],o=[],a=[];for(let c of t){let u=c.trim();if(u===""||u.startsWith(";"))continue;if(u.toUpperCase().startsWith(Ht.FJALL_DELEGATE)){let v=BN(u);v&&o.push(v);continue}let l=UN(u);if(l==="")continue;let d=GN(l);if(d.length===0)continue;let p=d[0].toUpperCase();if(p===Ht.ORIGIN){if(d.length<2)continue;n=LN(d[1]);continue}if(p===Ht.TTL){if(d.length<2)continue;i=parseInt(d[1],10);continue}if(p===Ht.FJALL_CERT){let v=VN(d);v&&a.push(v);continue}let g=ZN(d);g&&r.push(g)}return n?P({origin:n,ttl:i,records:r,delegations:o,certificates:a}):T(new Error("Missing $ORIGIN directive"))}Kt(WN,"parseZoneFile");function HN(e,t){if(!e.startsWith("fjall:"))return;let n=e.split(":");if(n.length<3)return;let i=n[1],r=n[2],o=`${i}:${r}`;return t.get(o)??t.get(e)}Kt(HN,"resolveAlias");var _F=Object.defineProperty,Wy=(e,t)=>_F(e,"name",{value:t,configurable:!0});function YN(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}Wy(YN,"padRight");function KN(e,t){let n=YN(e.name,24),i=e.ttl!==void 0&&e.ttl!==t?`${e.ttl} `:"";switch(e.type){case"MX":return`${n} ${i}IN MX ${e.priority??10} ${e.value}`;case"SRV":return`${n} ${i}IN SRV ${e.priority??0} ${e.weight??0} ${e.port??0} ${e.value}`;case"TXT":return`${n} ${i}IN TXT "${e.value}"`;case"CAA":return`${n} ${i}IN CAA ${e.value}`;default:return`${n} ${i}IN ${e.type} ${e.value}`}}Wy(KN,"formatRecord");function qN(e){let t=[];if(t.push("; zone.bind \u2014 managed by fjall"),t.push(`${Ht.ORIGIN} ${e.origin}.`),t.push(`${Ht.TTL} ${e.ttl}`),t.push(""),e.certificates.length>0){for(let n of e.certificates){let i=[n.domainName,...n.subjectAlternativeNames];t.push(`${Ht.FJALL_CERT} ${i.join(" ")}`)}t.push("")}if(e.delegations.length>0){for(let n of e.delegations){let i=n.auto?" ; auto":"";t.push(`${Ht.FJALL_DELEGATE} ${n.subdomain} TO ${n.targetAccount}${i}`)}t.push("")}for(let n of e.records)t.push(KN(n,e.ttl));return t.join(`
456
+ `),r}xt(DC,"formatCustomCodeForInsertion");function MC(e){try{let t=function(r){r.kind===jn.SyntaxKind.Unknown&&i.push("Unknown node found in AST - possible parse error"),jn.forEachChild(r,t)};xt(t,"visit");let n=Hr(e),i=[];return t(n),i.length>0?{valid:!1,errors:i}:{valid:!0}}catch(t){return{valid:!1,errors:[zt(t)]}}}xt(MC,"validateModifiedFile");import*as Ce from"typescript";var cs=s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),J6=s.object({name:s.string(),type:cs,ttl:s.number().optional(),value:s.string(),priority:s.number().optional(),weight:s.number().optional(),port:s.number().optional()}).strict(),Q6=s.object({subdomain:s.string(),targetAccount:s.string(),auto:s.boolean()}).strict(),eF=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string())}).strict(),tee=s.object({origin:s.string(),ttl:s.number(),records:s.array(J6),delegations:s.array(Q6),certificates:s.array(eF)}).strict(),Ht=Object.freeze({ORIGIN:"$ORIGIN",TTL:"$TTL",FJALL_DELEGATE:"$FJALL-DELEGATE",FJALL_CERT:"$FJALL-CERT"}),jC="ALIAS ";var zC=s.discriminatedUnion("kind",[s.object({kind:s.literal("ecs"),appName:s.string(),computeName:s.string().min(1).optional()}).strict(),s.object({kind:s.literal("cdn"),appName:s.string()}).strict(),s.object({kind:s.literal("bucket"),bucketName:s.string()}).strict(),s.object({kind:s.literal("custom"),dnsName:s.string(),hostedZoneId:s.string()}).strict()]),LC=zC.options.map(e=>e.shape.kind.value),zy=s.enum(["A","AAAA"]),Ly=s.enum(["route53","external-delegated","external-records"]),UC=s.enum(["zone","full"]),tF=s.object({kind:s.literal("standard"),type:s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),name:s.string(),value:s.union([s.string(),s.array(s.string())]),ttl:s.number().int().positive().optional()}).strict(),rF=s.object({kind:s.literal("alias"),type:zy,name:s.string(),target:zC}).strict(),nF=s.discriminatedUnion("kind",[tF,rF]),iF=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string()).optional(),transparencyLogging:s.boolean().optional(),cloudFront:s.boolean().optional()}).strict(),oF=s.object({subdomain:s.string(),toAccount:s.string(),auto:s.boolean().optional()}).strict(),iee=s.object({zoneName:s.string(),registrar:Ly,hostedZoneId:s.string().optional(),delegatedSubdomain:s.string().optional(),adoptedNameServers:s.array(s.string().min(1)).min(1).optional(),records:s.array(nF),certificates:s.array(iF),delegations:s.array(oF)}).strict().refine(e=>e.registrar!=="external-delegated"||e.delegatedSubdomain!==void 0,{message:"external-delegated requires delegatedSubdomain"}).refine(e=>e.registrar!=="external-records"||e.delegations.length===0,{message:"external-records forbids delegations"}).refine(e=>e.registrar==="external-delegated"||e.adoptedNameServers===void 0,{message:"adoptedNameServers requires registrar external-delegated"}).refine(e=>e.registrar!=="external-delegated"||e.hostedZoneId===void 0==(e.adoptedNameServers===void 0),{message:"external-delegated adoption requires hostedZoneId and adoptedNameServers together (both-or-neither)"});var aF=Object.defineProperty,ge=(e,t)=>aF(e,"name",{value:t,configurable:!0}),BC=Ly.options,FC=UC.options,sF=cs.options,cF=zy.options;function VC(e){let t=[],n=ge(r=>{if(Ce.isNewExpression(r)&&GC(r.expression)){let o=ZC(r);o!==void 0&&t.push(o)}Ce.forEachChild(r,n)},"visit");if(n(e),t.length===0)return P(void 0);if(t.length>1)return T(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${t.length}`));let i=t[0];return i?P(i):P(void 0)}ge(VC,"findDomainConstructCall");function GC(e){return Ce.isIdentifier(e)&&e.text==="Domain"}ge(GC,"isDomainIdentifier");function ZC(e){let t=e.arguments;if(!t||t.length<3)return;let n=t[0],i=t[1],r=t[2];if(!n||!i||!r||!Ce.isObjectLiteralExpression(r))return;let o=WC(e);if(o===void 0)return;let a=HC(e),c=Ce.isStringLiteral(i)?i.text:void 0;return{callExpression:e,containingStatement:o,propsObjectLiteral:r,domainVarId:a,scopeArgumentText:n.getText(),constructIdLiteral:c}}ge(ZC,"buildMatch");function WC(e){let t=e;for(;t!==void 0;){if(Ce.isExpressionStatement(t)||Ce.isVariableStatement(t))return t;t=t.parent}}ge(WC,"findContainingTopLevelStatement");function HC(e){let t=e.parent;for(;t!==void 0;){if(Ce.isVariableDeclaration(t)&&Ce.isIdentifier(t.name)&&t.initializer===e)return t.name.text;t=t.parent}}ge(HC,"extractDomainVarId");function YC(e){switch(e.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${BC.join(", ")}, got ${JSON.stringify(e.value)}`;case"missing_field":return`'${e.field}' property is required`;case"invalid_literal":return`'${e.field}' ${e.reason}`;case"removed_field":return`'${e.field}' was removed from the Domain API \u2014 ${e.cure}`}}ge(YC,"errorMessage");var uF="declare the delegated child as its own Domain with registrar: 'external-delegated' and set 'parentDelegationRoleArn' (the CLI injects it via ManagedDomainBinding.delegationRoleArn); the child UPSERTs its NS records into the parent zone";function KC(e){let t=B(e),n=U(t.registrar,BC);if(n===void 0){let c=t.registrar;if(c===void 0)return T({kind:"registrar_required"});let u=typeof c=="string"?c:od(c);return T({kind:"registrar_unsupported",value:u})}let i=b(t.zoneName);if(i===void 0)return T({kind:"missing_field",field:"zoneName"});let r=XC(t.records);if(!r.success)return r;let o=rN(t.certificates);if(!o.success)return o;if(t.delegations!==void 0)return T({kind:"removed_field",field:"delegations",cure:uF});let a={zoneName:i,description:b(t.description),costAllocationEnvironment:b(t.costAllocationEnvironment),tags:nN(t.tags),records:r.data,certificates:o.data};switch(n){case"route53":return P({...a,registrar:n,hostedZoneId:b(t.hostedZoneId)});case"external-delegated":{let c=b(t.delegatedSubdomain);if(c===void 0)return T({kind:"missing_field",field:"delegatedSubdomain"});let u=b(t.hostedZoneId);if(t.hostedZoneId!==void 0&&u===void 0)return T({kind:"invalid_literal",field:"hostedZoneId",reason:"must be a literal string zone id on external-delegated \u2014 dynamic expressions cannot be round-tripped"});let l=me(t.adoptedNameServers);if(t.adoptedNameServers!==void 0&&l===void 0)return T({kind:"invalid_literal",field:"adoptedNameServers",reason:"must be an array of literal NS hostname strings \u2014 the parent NS UPSERT writes them verbatim"});if(u===void 0!=(l===void 0))return T({kind:"invalid_literal",field:u===void 0?"hostedZoneId":"adoptedNameServers",reason:"adopting an existing child zone requires hostedZoneId and adoptedNameServers together (both-or-neither) \u2014 an imported zone exposes no name-server attribute at synth"});let d=b(t.parentDelegationRoleArn);if(t.parentDelegationRoleArn!==void 0&&d===void 0)return T({kind:"invalid_literal",field:"parentDelegationRoleArn",reason:"must be a literal string ARN (VD2-a) \u2014 the CLI injects it via ManagedDomainBinding.delegationRoleArn; dynamic expressions such as Fn.importValue are not supported"});let p=U(t.phase,FC);return t.phase!==void 0&&p===void 0?T({kind:"invalid_literal",field:"phase",reason:`must be one of ${FC.map(g=>`'${g}'`).join(", ")}`}):P({...a,registrar:n,delegatedSubdomain:c,hostedZoneId:u,adoptedNameServers:l,parentDelegationRoleArn:d,phase:p})}case"external-records":return P({...a,registrar:n})}}ge(KC,"parseDomainProps");function qC(e){return YC(e)}ge(qC,"parseDomainErrorMessage");function XC(e){if(e===void 0)return P([]);if(!Array.isArray(e))return T({kind:"invalid_literal",field:"records",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(!N(i))return T({kind:"invalid_literal",field:`records[${n}]`,reason:"must be an object literal"});let r=JC(i,n);if(!r.success)return r;t.push(r.data)}return P(t)}ge(XC,"parseRecordsArray");function JC(e,t){let n=b(e.type),i=b(e.name);if(n===void 0)return T({kind:"missing_field",field:`records[${t}].type`});if(i===void 0)return T({kind:"missing_field",field:`records[${t}].name`});if(e.target!==void 0){if(!cF.some(u=>u===n))return T({kind:"invalid_literal",field:`records[${t}]`,reason:`alias records must have type 'A' or 'AAAA', got '${n}'`});let c=eN(e.target);return P({kind:"alias",type:n,name:i,target:c})}if(!sF.some(c=>c===n))return T({kind:"invalid_literal",field:`records[${t}]`,reason:`unsupported record type '${n}'`});let r=QC(e.value);if(r===void 0)return T({kind:"invalid_literal",field:`records[${t}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(e.value)})`});let o=C(e.ttl),a={kind:"standard",type:n,name:i,value:r,...o!==void 0?{ttl:o}:{}};return P(a)}ge(JC,"parseRecord");function QC(e){if(e===void 0)return;if(typeof e=="string")return e;let t=me(e);if(t!==void 0)return t}ge(QC,"parseRecordValue");function eN(e){if(Ct(e))return tN(e);if(N(e)){let t=U(e.kind,LC);if(t==="ecs"||t==="cdn"){let n=b(e.appName);if(n!==void 0)return{kind:t,appName:n}}if(t==="bucket"){let n=b(e.bucketName);if(n!==void 0)return{kind:t,bucketName:n}}if(t==="custom"){let n=b(e.dnsName),i=b(e.hostedZoneId);if(n!==void 0&&i!==void 0)return{kind:t,dnsName:n,hostedZoneId:i}}}return{kind:"unresolved",sourceText:od(e)}}ge(eN,"parseTarget");function tN(e){let t=e.__call.trim(),n=t.match(/^([A-Za-z_][\w$]*)\s*\(([\s\S]*)\)\s*$/);if(!n)return{kind:"unresolved",sourceText:t};let i=n[1],r=n[2]??"",o=id(r);switch(i){case"fjallApp":{let a=Kr(o,0);if(a===void 0)return{kind:"dynamic",sourceText:t};if(o.length<2)return{kind:"ecs",appName:a};let c=Kr(o,1);return c===void 0?{kind:"dynamic",sourceText:t}:{kind:"ecs",appName:a,computeName:c}}case"fjallCdn":{let a=Kr(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"cdn",appName:a}}case"fjallBucket":{let a=Kr(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"bucket",bucketName:a}}case"aliasTo":{if(o.length>=2){let a=Kr(o,0),c=Kr(o,1);return a!==void 0&&c!==void 0?{kind:"custom",dnsName:a,hostedZoneId:c}:{kind:"dynamic",sourceText:t}}if(o.length===1){let a=o[0]?.trim()??"",c=Uy(a,"dnsName"),u=Uy(a,"hostedZoneId");return c!==void 0&&u!==void 0?{kind:"custom",dnsName:c,hostedZoneId:u}:{kind:"dynamic",sourceText:t}}return{kind:"unresolved",sourceText:t}}default:return{kind:"unresolved",sourceText:t}}}ge(tN,"resolveCallRefTarget");function id(e){let t=[],n=0,i=null,r="";for(let a=0;a<e.length;a++){let c=e[a];if(i!==null){if(r+=c,c==="\\"&&a+1<e.length){let u=e[a+1];u!==void 0&&(r+=u,a+=1);continue}c===i&&(i=null);continue}if(c==='"'||c==="'"||c==="`"){i=c,r+=c;continue}if(c==="("||c==="{"||c==="["){n+=1,r+=c;continue}if(c===")"||c==="}"||c==="]"){n-=1,r+=c;continue}if(c===","&&n===0){t.push(r.trim()),r="";continue}r+=c}let o=r.trim();return o.length>0&&t.push(o),t}ge(id,"splitTopLevelArgs");function Kr(e,t){let n=e[t];if(n===void 0)return;let i=n.trim();if(i.length<2)return;let r=i[0],o=i[i.length-1];if(r===o&&!(r!=='"'&&r!=="'"&&r!=="`"))return i.slice(1,-1)}ge(Kr,"extractStringLiteralArg");function Uy(e,t){let n=e.trim().replace(/^\{|\}$/g,""),i=id(n);for(let r of i){let o=r.indexOf(":");if(o<0||r.slice(0,o).trim().replace(/["'`]/g,"")!==t)continue;let a=r.slice(o+1).trim();return Kr([a],0)}}ge(Uy,"extractObjectFieldString");function rN(e){if(e===void 0)return P([]);if(!Array.isArray(e))return T({kind:"invalid_literal",field:"certificates",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(typeof i=="string"){t.push({domainName:i});continue}if(!N(i))return T({kind:"invalid_literal",field:`certificates[${n}]`,reason:"must be a string or object literal"});let r=b(i.domainName);if(r===void 0)return T({kind:"missing_field",field:`certificates[${n}].domainName`});let o=me(i.subjectAlternativeNames),a=z(i.transparencyLogging),c=z(i.cloudFront);if(i.cloudFront!==void 0&&c===void 0)return T({kind:"invalid_literal",field:`certificates[${n}].cloudFront`,reason:"must be a boolean literal \u2014 the CloudFront designation drives the zone-level us-east-1 export contract and cannot be round-tripped from a dynamic expression"});t.push({domainName:r,...o!==void 0?{subjectAlternativeNames:o}:{},...a!==void 0?{transparencyLogging:a}:{},...c!==void 0?{cloudFront:c}:{}})}return P(t)}ge(rN,"parseCertificatesArray");function nN(e){if(e===void 0||!N(e))return;let t={};for(let[n,i]of Object.entries(e)){let r=b(i);r!==void 0&&(t[n]=r)}return Object.keys(t).length===0?void 0:t}ge(nN,"parseStringRecord");function od(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(t=>od(t)).join(", ")}]`;if(typeof e=="object"){if("__call"in e)return String(e.__call);if("__identifier"in e)return String(e.__identifier);if("__expression"in e)return String(e.__expression);if("__unknown"in e)return String(e.__unknown)}return String(e)}ge(od,"stringifyParsedValue");var lF=Object.defineProperty,gr=(e,t)=>lF(e,"name",{value:t,configurable:!0});function iN(e){return e?.map(t=>({name:t.name,...t.serviceType!==void 0&&{serviceType:t.serviceType},...t.docker!==void 0&&{docker:t.docker},...t.containerPort!==void 0&&{containerPort:t.containerPort},...t.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...t.routing!==void 0&&{routing:t.routing}}))}gr(iN,"toUserServiceConfigs");function oN(e,t,n=!0,i,r){let o={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return o;let a=t,c=lr[a];return{...o,database:aN(e,c,a,n,r),compute:lN(e,c,a,n,i),network:c.network,backup:c.backup}}gr(oN,"planApplicationResources");function aN(e,t,n,i,r){let o=Gb(n),a=t.database[o];return!i||a===null?[]:[{name:e,type:o,databaseName:Gn(e),variableName:`${cr(e)}Database`,...a,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}gr(aN,"buildDatabasePlan");function sN(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}gr(sN,"buildScalingConfig");function Fy(e){let{minCapacity:t,maxCapacity:n,...i}=e;return{...i,...sN(t,n)}}gr(Fy,"planServiceFromTierPreset");function cN(e,t){let n=Fy(e),i=t?.serviceType==="worker",r=t?.containerPort??w$,o=t?.docker;return{...n,...o?.path!==void 0&&{docker:{path:o.path,...o.context!==void 0&&{context:o.context},...o.target!==void 0&&{target:o.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...i&&{serviceType:"worker"},containers:i?[{}]:[{port:r}]}}gr(cN,"buildServiceEntry");function uN(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}gr(uN,"resolveClusterConfig");function lN(e,t,n,i,r){let o=t.compute.ecs,a=(r&&r.length>0?Zb(n,r):o.services.map((u,l)=>({...u,name:l===0?"api":`service-${l+1}`}))).map((u,l)=>cN(u,r?.[l])),c=a.some(u=>u.containers?.some(l=>l.port!==void 0));return[{name:e,type:Li.ECS,needsConnection:i,connectedDatabase:i?[e]:void 0,variableName:`${cr(e)}Compute`,cluster:uN(o.cluster,c),services:a}]}gr(lN,"buildComputePlan");function uo(e,t){let n=[Dl(e),Ol(e),kl(e)];if(zl(e))n.push(Ha(e),Ka(e));else{let r=jl(e);n.push(Ka(e),_l(e),El(e),Nl(e),Pl(e),wl(e),Tl(e,r),Ml(e))}let i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){let r=nd(i,e.customCodeBlocks,t?.resourceMapping);return r.success?P(r.content):T(new Error(`Custom code injection failed: ${r.error??"unknown error"}`))}return P(i)}gr(uo,"generateInfrastructureFromPlan");var dF=Object.defineProperty,lo=(e,t)=>dF(e,"name",{value:t,configurable:!0}),mF=Vb("standard");function dN(e){return wa.options.some(t=>t.shape?.type?.value===e)}lo(dN,"isPatternConfigType");function mN(e,t,n){let{tier:i="standard",domain:r,database:o,compute:a,cdn:c,environment:u,tags:l}=n??{},d=Ul(i);if(!d&&i!=="custom")return T(new Error(`Invalid pattern tier: "${i}". Valid tiers are: ${[...Xa,"custom"].join(", ")}`));if(!dN(t))return T(new Error(`Unsupported pattern type: ${t}`));let p=d?Ll(i):null,g=hN(t,e,{domain:r,database:o,compute:a,cdn:c,environment:u,tierPreset:p});if(!g.success)return g;let v=g.data;return P({appName:e,type:"standard",pattern:t,network:p?p.network:mF,backup:p?p.backup:!1,patternConfig:v,database:[],s3:[],compute:[],tags:l??{}})}lo(mN,"planOpenNextResources");function pN(e,t){return{type:e?.type??t.database.type,instanceType:e?.instanceType??t.database.instanceType,backupRetention:e?.backupRetention??t.database.backupRetention,deletionProtection:e?.deletionProtection??t.database.deletionProtection,...e?.databaseName!==void 0&&{databaseName:e.databaseName},...e?.publiclyAccessible!==void 0&&{publiclyAccessible:e.publiclyAccessible},...e?.allowedIpCidr!==void 0&&{allowedIpCidr:e.allowedIpCidr},...e?.encryption!==void 0&&{encryption:e.encryption}}}lo(pN,"mergeDatabaseConfig");function fN(e,t){return{memorySize:e?.memorySize??t.compute.memorySize,timeout:e?.timeout??t.compute.timeout}}lo(fN,"mergeComputeConfig");function gN(e){let{encryption:t,...n}=e;return{...n,...t&&{encryption:{storageKey:t}}}}lo(gN,"toPatternDatabaseConfig");function hN(e,t,n){let{domain:i,database:r,compute:o,cdn:a,environment:c,tierPreset:u}=n,l=u?pN(r,u):r,d=u?fN(o,u):o,p={type:e,name:t,domain:i,database:l?gN(l):void 0,compute:d?{server:d}:void 0,cdn:a?{domainNames:a.domainNames,certificateArn:a.certificateArn}:void 0,environment:c},g=wa.safeParse(p);return g.success?P(g.data):T(new Error(`Invalid pattern config: ${g.error.message}`))}lo(hN,"buildPatternConfig");var pF=Object.defineProperty,fF=(e,t)=>pF(e,"name",{value:t,configurable:!0});function vN(e,t){let n={type:"staticsite",name:e,source:t.source,build:t.build,...t.routing!==void 0&&{routing:t.routing},...t.security!==void 0&&{security:t.security},...t.domain!==void 0&&{domain:t.domain},...t.forms!==void 0&&{forms:t.forms},...t.cdn!==void 0&&{cdn:t.cdn}},i=Tb.safeParse(n);return i.success?P({appName:e,type:"standard",pattern:"staticsite",patternConfig:i.data,database:[],s3:[],compute:[],tags:t.tags??{}}):T(new Error(`Invalid static-site pattern config: ${i.error.message}`))}fF(vN,"planStaticSiteResources");var gF=Object.defineProperty,ad=(e,t)=>gF(e,"name",{value:t,configurable:!0});function bN(e){let t=e.split("/");if(t.length!==2||!t[0]||!t[1])throw new Error(`Invalid service reference format: '${e}'. Expected 'ClusterName/ServiceName'.`);return t[0]}ad(bN,"parseServiceReference");function By(e,t,n){n==="database"?(e.needsConnection=!0,e.connectedDatabase=[...new Set([...e.connectedDatabase??[],t])]):e.connectedStorage=[...new Set([...e.connectedStorage??[],t])]}ad(By,"addResourceConnection");function sd(e,t,n,i){let r=new Set(t),o=[...new Set(t.map(bN))];for(let a of o){let c=e.compute.find(u=>u.name===a);if(c?.services){By(c,n,i);for(let u of c.services){let l=`${a}/${u.name}`;r.has(l)&&(i==="database"?u.needsDatabaseConnection=!0:u.needsStorageConnection=!0)}}}}ad(sd,"applyServiceConnections");function cd(e,t,n,i){for(let r of e.compute)if(t.includes(r.name)&&(By(r,n,i),r.services))for(let o of r.services)i==="database"?o.needsDatabaseConnection=!0:o.needsStorageConnection=!0}ad(cd,"applyComputeConnections");var hF=Object.defineProperty,Se=(e,t)=>hF(e,"name",{value:t,configurable:!0});function yN(e){let t=e.database.length>0,n=e.cdn!==void 0;return[{type:"database",label:"Database (RDS)",available:!0},{type:"database:proxy",label:"RDS Proxy",available:t,reason:t?void 0:"Requires at least one database"},{type:"storage:s3",label:"S3 Bucket",available:!0},{type:"network",label:"Network (VPC)",available:!0},{type:"compute:ecs",label:"Compute (ECS)",available:!0},{type:"compute:lambda",label:"Compute (Lambda)",available:!0},{type:"cdn",label:"CDN (CloudFront)",available:!n,reason:n?"A CDN is already configured. Remove existing CDN first.":void 0},{type:"tunnel",label:"Database Tunnel",available:t&&!e.tunnel,reason:t?e.tunnel?"Tunnel is already enabled":void 0:"Requires at least one database"}]}Se(yN,"listAvailableResources");function us(e,t){if(Gy(e,t.resourceName))return T(new Error(Zy(t.resourceName)));switch(t.type){case"database":return SN(e,t);case"database:proxy":return _N(e,t);case"storage:s3":return P(void 0);case"network":return P(void 0);case"compute:ecs":return!t.services||t.services.length===0?T(new Error("ECS compute requires at least one service.")):P(void 0);case"compute:lambda":return P(void 0);case"cdn":return EN(e,t);case"tunnel":return xN(e);default:{let n=t;return T(new Error(`Unknown resource type: ${String(n)}`))}}}Se(us,"validateResourceAddition");function SN(e,t){let n=t.databaseName??t.resourceName.toLowerCase();return e.database.some(i=>i.databaseName===n)?T(new Error(`Database name '${n}' already exists. Choose a different database name.`)):t.databaseType==="GlobalAurora"&&!t.primaryRegion?T(new Error("GlobalAurora databases require a primaryRegion.")):P(void 0)}Se(SN,"validateDatabaseAddition");function _N(e,t){let n=e.database.find(i=>i.name===t.targetDatabase||i.databaseName===t.targetDatabase);if(!n){let i=e.database.map(r=>r.name).join(", ")||"none";return T(new Error(`Database '${t.targetDatabase}' not found. Available databases: ${i}`))}return n.proxy!==void 0&&n.proxy!==!1?T(new Error(`Database '${n.name}' already has RDS Proxy enabled.`)):P(void 0)}Se(_N,"validateProxyAddition");function EN(e,t){if(e.cdn)return T(new Error("A CDN is already configured for this application. Remove the existing CDN first."));if(!Vy(e,t.defaultOriginRef))return T(new Error(`Origin '${t.defaultOriginRef}' not found in plan. CDN origin must reference an existing resource.`));if(t.behaviours){for(let n of t.behaviours)if(!Vy(e,n.originRef))return T(new Error(`Behaviour origin '${n.originRef}' not found in plan.`))}return P(void 0)}Se(EN,"validateCdnAddition");function xN(e){return e.tunnel&&typeof e.tunnel=="object"?T(new Error("Tunnel is already enabled for this application.")):e.database.length===0?T(new Error("No databases found \u2014 tunnel requires at least one relational database.")):P(void 0)}Se(xN,"validateTunnelAddition");function ud(e,t){let n=us(e,t);if(!n.success)return n;switch(t.type){case"database":return AN(e,t);case"database:proxy":return IN(e,t);case"storage:s3":return TN(e,t);case"network":return $N(e,t);case"compute:ecs":return RN(e,t);case"compute:lambda":return CN(e,t);case"cdn":return NN(e,t);case"tunnel":return PN(e,t);default:{let i=t;return T(new Error(`Unknown resource type: ${String(i)}`))}}}Se(ud,"addResourceToPlan");function AN(e,t){let n=t.databaseName??t.resourceName.toLowerCase(),i={name:t.resourceName,type:t.databaseType,databaseName:n},r;switch(t.databaseType){case"Instance":r={...i,...t.instanceType!==void 0?{instanceType:t.instanceType}:{},...t.multiAz!==void 0?{multiAz:t.multiAz}:{},...t.readReplica!==void 0?{readReplica:t.readReplica}:{},...t.publiclyAccessible!==void 0?{publiclyAccessible:t.publiclyAccessible}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{}};break;case"Aurora":r={...i,...t.writer!==void 0?{writer:t.writer}:{},...t.readers!==void 0?{readers:t.readers}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{},...t.preferredMaintenanceWindow!==void 0?{preferredMaintenanceWindow:t.preferredMaintenanceWindow}:{}};break;case"GlobalAurora":r={...i,primaryRegion:t.primaryRegion,...t.secondaryRegions!==void 0?{secondaryRegions:t.secondaryRegions}:{}};break;default:{let a=t.databaseType;return T(new Error(`Unknown database type: ${String(a)}`))}}let o={...e,database:[...e.database,r]};return Wy(o,t.resourceName,"database",t),P(o)}Se(AN,"addDatabase");function IN(e,t){let n=e.database.map(o=>({...o})),i=n.find(o=>o.name===t.targetDatabase||o.databaseName===t.targetDatabase);if(!i)return T(new Error(`Database '${t.targetDatabase}' not found.`));let r={};return t.maxConnections!==void 0&&(r.maxConnections=t.maxConnections),t.maxIdleConnections!==void 0&&(r.maxIdleConnections=t.maxIdleConnections),t.connectionBorrowTimeout!==void 0&&(r.connectionBorrowTimeout=t.connectionBorrowTimeout),t.requireTLS!==void 0&&(r.requireTLS=t.requireTLS),i.proxy=Object.keys(r).length>0?r:{},P({...e,database:n})}Se(IN,"addProxy");function TN(e,t){let n=t.bucketName??t.resourceName.toLowerCase(),i=Pe(n),r=e.s3.length,o=r===0?"":`${r+1}`,a={name:i,bucketName:n,variableName:`bucket${o}`,...t.publicReadAccess!==void 0?{publicReadAccess:t.publicReadAccess}:{},...t.versioned!==void 0?{versioned:t.versioned}:{},...t.encryption!==void 0?{encryption:t.encryption}:{},...t.websiteHosting?{websiteHosting:{indexDocument:"index.html"}}:{}},c={...e,s3:[...e.s3,a]};return Wy(c,i,"storage",t),P(c)}Se(TN,"addS3");function $N(e,t){let n={};if(t.maxAzs!==void 0&&(n.maxAzs=t.maxAzs),t.natGateways!==void 0&&(n.natGateways=t.natGateways),t.flowLogs!==void 0&&(n.flowLogs=t.flowLogs),t.vpcEndpoints!==void 0&&(n.vpcEndpoints=t.vpcEndpoints),t.networkName){let i={name:t.networkName,...n};return P({...e,additionalNetworks:[...e.additionalNetworks??[],i]})}return P({...e,network:{...e.network??{},...n}})}Se($N,"addNetwork");function RN(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"ecs",needsConnection:n.length>0,connectedDatabase:n,...t.loadBalancer!==void 0?{cluster:{loadBalancer:t.loadBalancer}}:{},services:t.services.map(r=>({name:r.name,capacityProvider:r.capacityProvider??"FARGATE",...r.port!==void 0?{containers:[{port:r.port}]}:{},...r.cpu!==void 0?{cpu:r.cpu}:{},...r.memory!==void 0?{memoryLimitMiB:r.memory}:{}})),...t.docker!==void 0&&{docker:t.docker}};return P({...e,compute:[...e.compute,i]})}Se(RN,"addEcsCompute");function CN(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"lambda",needsConnection:n.length>0,connectedDatabase:n,...t.timeout!==void 0?{timeout:t.timeout}:{},...t.memory!==void 0?{memory:t.memory}:{},...t.handler!==void 0?{handler:t.handler}:{},...t.runtime!==void 0?{runtime:t.runtime}:{}};return P({...e,compute:[...e.compute,i]})}Se(CN,"addLambdaCompute");function NN(e,t){let n={name:t.resourceName,defaultOriginRef:t.defaultOriginRef,...t.customDomain!==void 0?{customDomain:t.customDomain}:{},...t.certificateArn!==void 0?{certificateArn:t.certificateArn}:{},...t.behaviours&&t.behaviours.length>0?{behaviours:[...t.behaviours].map(i=>({pathPattern:i.pathPattern,originRef:i.originRef,...i.cachePolicy!==void 0?{cachePolicy:i.cachePolicy}:{}}))}:{}};return P({...e,cdn:n})}Se(NN,"addCdn");function PN(e,t){let n=t.instanceType?{instanceType:t.instanceType}:{};return P({...e,tunnel:n})}Se(PN,"addTunnel");function Gy(e,t){let n=[...e.database.map(i=>i.name),...(e.clickhouse??[]).map(i=>i.name),...e.s3.map(i=>i.name),...e.compute.map(i=>i.name),...(e.dynamodb??[]).map(i=>i.name),...(e.sqs??[]).map(i=>i.name),...(e.additionalNetworks??[]).map(i=>i.name)];return e.cdn&&n.push(e.cdn.name),n.includes(t)}Se(Gy,"isResourceNameTaken");function Zy(e){return`Resource name '${e}' is already used in this application.`}Se(Zy,"resourceNameTakenMessage");function Vy(e,t){return e.database.some(n=>n.name===t)||e.s3.some(n=>n.name===t)||e.compute.some(n=>n.name===t)||(e.dynamodb??[]).some(n=>n.name===t)||(e.sqs??[]).some(n=>n.name===t)}Se(Vy,"resourceExistsInPlan");function Wy(e,t,n,i){i.connectToCompute&&i.connectToCompute.length>0&&cd(e,[...i.connectToCompute],t,n),i.connectToServices&&i.connectToServices.length>0&&sd(e,[...i.connectToServices],t,n)}Se(Wy,"applyConnections");var vF=Object.defineProperty,bF=(e,t)=>vF(e,"name",{value:t,configurable:!0});function wN(e,t,n){let i;try{i=Wr(e,{extractCustomCode:!0})}catch(u){return T(new Error(`Failed to parse infrastructure.ts: ${u instanceof Error?u.message:String(u)}`))}let r;try{r=Mn(i,t,{skipValidation:!0})}catch(u){return T(new Error(`Failed to build resource plan: ${u instanceof Error?u.message:String(u)}`))}i.customCodeBlocks&&i.customCodeBlocks.length>0&&(r.customCodeBlocks=i.customCodeBlocks);let o=us(r,n);if(!o.success)return o;let a=ud(r,n);if(!a.success)return a;let c=uo(a.data);return c.success?P({originalContent:e,modifiedContent:c.data,addedResource:{type:n.type,name:n.resourceName}}):T(new Error(`Code generation failed: ${c.error.message}`))}bF(wN,"generateResourceChange");var yF=Object.defineProperty,zn=(e,t)=>yF(e,"name",{value:t,configurable:!0});function Yt(e,...t){let n={};for(let i of t)e[i]!==void 0&&(n[i]=e[i]);return n}zn(Yt,"pickDefined");function kN(e,t){let n={name:e,type:t.databaseType,databaseName:t.databaseName,...Yt(t,"databaseInsights","port","proxy","credentials","encryption","deletionProtection")};switch(t.databaseType){case"Instance":return{...n,...Yt(t,"instanceType","multiAz","readReplica","publiclyAccessible","backupRetention","allocatedStorage","snapshotIdentifier","snapshotUsername")};case"Aurora":return{...n,...Yt(t,"writer","readers","backupRetention","preferredMaintenanceWindow","monitoringInterval","snapshotIdentifier","snapshotUsername")};case"GlobalAurora":return{...n,primaryRegion:t.primaryRegion,...t.secondaryRegions&&t.secondaryRegions.length>0&&{secondaryRegions:t.secondaryRegions},...Yt(t,"globalClusterIdentifier","enableGlobalWriteForwarding","writer","readers","backupRetention","preferredMaintenanceWindow","monitoringInterval","snapshotIdentifier","snapshotUsername")};default:return t}}zn(kN,"buildRelationalResourcePlan");function ON(e){return`${e}Database`}zn(ON,"defaultRelationalDatabaseName");function DN(e,t){return`Database name '${e}' already exists in ${t}. Please choose a different database name.`}zn(DN,"duplicateDatabaseNameMessage");function MN(e,t){let n=e.find(r=>r.name===t.databaseName||r.databaseName===t.databaseName);if(!n)return{ok:!1,message:`Database '${t.databaseName}' not found. Available databases: ${e.map(r=>r.name).join(", ")||"none"}`};if(n.proxy!==void 0&&n.proxy!==!1)return{ok:!1,message:`Database '${n.name}' already has RDS Proxy enabled.`};let i=Yt(t,"maxConnections","maxIdleConnections","connectionBorrowTimeout","requireTLS");return{ok:!0,database:n,proxyValue:Object.keys(i).length>0?i:{}}}zn(MN,"resolveProxyAddition");function jN(e,t){return{name:e,type:"ClickHouse",databaseName:t.databaseName,...Yt(t,"instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays")}}zn(jN,"buildClickHouseResourcePlan");function zN(e,t,n){let i=t.storagePreset??"standard",r=Fl[i],o=n===0?"":`${n+1}`;return{name:e,bucketName:t.bucketName,variableName:`bucket${o}`,...r,...Yt(t,"publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors")}}zn(zN,"buildS3ResourcePlan");var SF=Object.defineProperty,Kt=(e,t)=>SF(e,"name",{value:t,configurable:!0}),_F=new Set(cs.options);function LN(e){return _F.has(e.toUpperCase())}Kt(LN,"isRecordType");function UN(e){return e.endsWith(".")?e.slice(0,-1):e}Kt(UN,"stripTrailingDot");function FN(e){let t=!1;for(let n=0;n<e.length;n++)if(e[n]==='"')t=!t;else if(e[n]===";"&&!t)return e.slice(0,n).trimEnd();return e}Kt(FN,"stripInlineComment");function BN(e,t){let n=e.slice(t).join(" "),i=[],r="",o=!1;for(let a of n)a==='"'?(o&&(i.push(r),r=""),o=!o):o&&(r+=a);return i.join(" ")}Kt(BN,"parseTxtValue");function VN(e){let t=/;\s*auto\s*$/.test(e),n=e.replace(/;\s*auto\s*$/,"").trim().match(/^\$FJALL-DELEGATE\s+(\S+)\s+TO\s+(\S+)$/i);if(n)return{subdomain:n[1],targetAccount:n[2],auto:t}}Kt(VN,"parseDelegateDirective");function GN(e){if(e.length<2)return;let t=e[1],n=e.slice(2);return{domainName:t,subjectAlternativeNames:n}}Kt(GN,"parseCertDirective");function ZN(e){let t=[],n="",i=!1;for(let r of e)r==='"'?(i=!i,n+=r):/\s/.test(r)&&!i?n.length>0&&(t.push(n),n=""):n+=r;return n.length>0&&t.push(n),t}Kt(ZN,"tokenise");function WN(e){if(e.length<2)return;let t=0,n=e[t++],i,r;for(;t<e.length&&r===void 0;){let a=e[t].toUpperCase();if(a==="IN")t++;else if(LN(a))r=a,t++;else if(/^\d+$/.test(e[t]))i=parseInt(e[t],10),t++;else return}if(!r)return;let o=e.slice(t);switch(r){case"MX":{if(o.length<2)return;let a=parseInt(o[0],10),c=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:c,priority:a}}case"SRV":{if(o.length<4)return;let a=parseInt(o[0],10),c=parseInt(o[1],10),u=parseInt(o[2],10),l=o[3];return{name:n,type:r,ttl:i,value:l,priority:a,weight:c,port:u}}case"TXT":{let a=BN(e,t);return{name:n,type:r,ttl:i,value:a}}case"CAA":{let a=o.join(" ");return{name:n,type:r,ttl:i,value:a}}case"A":case"AAAA":{if(o.length===0)return;if(o[0].toUpperCase()==="ALIAS"){if(o.length<2)return;let a=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:`${jC}${a}`}}return{name:n,type:r,ttl:i,value:o[0]}}default:return o.length===0?void 0:{name:n,type:r,ttl:i,value:o[0]}}}Kt(WN,"parseRecord");function HN(e){let t=e.split(`
457
+ `),n,i=300,r=[],o=[],a=[];for(let c of t){let u=c.trim();if(u===""||u.startsWith(";"))continue;if(u.toUpperCase().startsWith(Ht.FJALL_DELEGATE)){let v=VN(u);v&&o.push(v);continue}let l=FN(u);if(l==="")continue;let d=ZN(l);if(d.length===0)continue;let p=d[0].toUpperCase();if(p===Ht.ORIGIN){if(d.length<2)continue;n=UN(d[1]);continue}if(p===Ht.TTL){if(d.length<2)continue;i=parseInt(d[1],10);continue}if(p===Ht.FJALL_CERT){let v=GN(d);v&&a.push(v);continue}let g=WN(d);g&&r.push(g)}return n?P({origin:n,ttl:i,records:r,delegations:o,certificates:a}):T(new Error("Missing $ORIGIN directive"))}Kt(HN,"parseZoneFile");function YN(e,t){if(!e.startsWith("fjall:"))return;let n=e.split(":");if(n.length<3)return;let i=n[1],r=n[2],o=`${i}:${r}`;return t.get(o)??t.get(e)}Kt(YN,"resolveAlias");var EF=Object.defineProperty,Hy=(e,t)=>EF(e,"name",{value:t,configurable:!0});function KN(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}Hy(KN,"padRight");function qN(e,t){let n=KN(e.name,24),i=e.ttl!==void 0&&e.ttl!==t?`${e.ttl} `:"";switch(e.type){case"MX":return`${n} ${i}IN MX ${e.priority??10} ${e.value}`;case"SRV":return`${n} ${i}IN SRV ${e.priority??0} ${e.weight??0} ${e.port??0} ${e.value}`;case"TXT":return`${n} ${i}IN TXT "${e.value}"`;case"CAA":return`${n} ${i}IN CAA ${e.value}`;default:return`${n} ${i}IN ${e.type} ${e.value}`}}Hy(qN,"formatRecord");function XN(e){let t=[];if(t.push("; zone.bind \u2014 managed by fjall"),t.push(`${Ht.ORIGIN} ${e.origin}.`),t.push(`${Ht.TTL} ${e.ttl}`),t.push(""),e.certificates.length>0){for(let n of e.certificates){let i=[n.domainName,...n.subjectAlternativeNames];t.push(`${Ht.FJALL_CERT} ${i.join(" ")}`)}t.push("")}if(e.delegations.length>0){for(let n of e.delegations){let i=n.auto?" ; auto":"";t.push(`${Ht.FJALL_DELEGATE} ${n.subdomain} TO ${n.targetAccount}${i}`)}t.push("")}for(let n of e.records)t.push(qN(n,e.ttl));return t.join(`
458
458
  `)+`
459
- `}Wy(qN,"generateZoneFile");var EF=Object.defineProperty,Hy=(e,t)=>EF(e,"name",{value:t,configurable:!0});function XN(e){let{domainName:t,hostedZoneId:n,records:i=[]}=e,r=`fjall/domains/${t}`;return[{path:`${r}/infrastructure.ts`,content:JN({domainName:t,records:i,hostedZoneId:n})},{path:`${r}/package.json`,content:QN(t)},{path:`${r}/tsconfig.json`,content:AF},{path:`${r}/cdk.json`,content:IF},{path:`${r}/.gitignore`,content:xF}]}Hy(XN,"generateDomainFiles");function JN(e){let{domainName:t,records:n,hostedZoneId:i}=e,r=Pe(t.split(".").join("")),o=As(t),a=n.map(l=>{let d=l.ttl!==void 0?`, ttl: ${l.ttl}`:"";return` { type: ${JSON.stringify(l.type)}, name: ${JSON.stringify(l.name)}, value: ${JSON.stringify(l.value)}${d} },`}),c=a.length>0?`[
459
+ `}Hy(XN,"generateZoneFile");var xF=Object.defineProperty,Yy=(e,t)=>xF(e,"name",{value:t,configurable:!0});function JN(e){let{domainName:t,hostedZoneId:n,records:i=[]}=e,r=`fjall/domains/${t}`;return[{path:`${r}/infrastructure.ts`,content:QN({domainName:t,records:i,hostedZoneId:n})},{path:`${r}/package.json`,content:eP(t)},{path:`${r}/tsconfig.json`,content:IF},{path:`${r}/cdk.json`,content:TF},{path:`${r}/.gitignore`,content:AF}]}Yy(JN,"generateDomainFiles");function QN(e){let{domainName:t,records:n,hostedZoneId:i}=e,r=Pe(t.split(".").join("")),o=xs(t),a=n.map(l=>{let d=l.ttl!==void 0?`, ttl: ${l.ttl}`:"";return` { type: ${JSON.stringify(l.type)}, name: ${JSON.stringify(l.name)}, value: ${JSON.stringify(l.value)}${d} },`}),c=a.length>0?`[
460
460
  ${a.join(`
461
461
  `)}
462
462
  ]`:"[]",u=i?` hostedZoneId: ${JSON.stringify(i)},
@@ -482,8 +482,8 @@ ${u} certificates: [
482
482
  ],
483
483
  records: ${c},
484
484
  });
485
- `}Hy(JN,"generateDefaultInfrastructureTs");function QN(e){return JSON.stringify({name:`domain-${e}`,version:Zu,scripts:{},devDependencies:{"@types/node":"20.4.9","ts-node":"^10.9.1",typescript:"~5.1.6"},dependencies:{"@fjall/components-infrastructure":`^${Zu}`,"aws-cdk-lib":"^2.263.0",constructs:"^10.7.2"}},null,2)+`
486
- `}Hy(QN,"generateDomainPackageJson");var xF=`node_modules/
485
+ `}Yy(QN,"generateDefaultInfrastructureTs");function eP(e){return JSON.stringify({name:`domain-${e}`,version:Gu,scripts:{},devDependencies:{"@types/node":"20.4.9","ts-node":"^10.9.1",typescript:"~5.1.6"},dependencies:{"@fjall/components-infrastructure":`^${Gu}`,"aws-cdk-lib":"^2.265.0",constructs:"^10.7.2"}},null,2)+`
486
+ `}Yy(eP,"generateDomainPackageJson");var AF=`node_modules/
487
487
  cdk.out/
488
488
  *.d.ts
489
489
  *.js
@@ -491,12 +491,12 @@ cdk.out/
491
491
  .fjall-state*.json.tmp
492
492
  .deploy-state.json
493
493
  .deploy-state.json.tmp
494
- `,AF=JSON.stringify({compilerOptions:{target:"ES2020",module:"commonjs",lib:["es2020","dom"],declaration:!0,strict:!0,noImplicitAny:!0,strictNullChecks:!0,noImplicitThis:!0,alwaysStrict:!0,noUnusedLocals:!1,noUnusedParameters:!1,noImplicitReturns:!0,noFallthroughCasesInSwitch:!1,inlineSourceMap:!0,inlineSources:!0,experimentalDecorators:!0,strictPropertyInitialization:!1,typeRoots:["./node_modules/@types"]},exclude:["node_modules","cdk.out"]},null,2)+`
495
- `,IF=JSON.stringify({app:"npx ts-node --prefer-ts-exts --transpile-only infrastructure.ts",assetMetadata:!1,pathMetadata:!1,versionReporting:!1,watch:{include:["**"],exclude:["README.md","cdk*.json","**/*.d.ts","**/*.js","tsconfig.json","package*.json","yarn.lock","node_modules","test"]},context:{"@aws-cdk/aws-lambda:recognizeLayerVersion":!0,"@aws-cdk/core:checkSecretUsage":!0,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":!0,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":!0,"@aws-cdk/aws-ecs:arnFormatIncludesClusterName":!0,"@aws-cdk/aws-iam:minimizePolicies":!0,"@aws-cdk/core:validateSnapshotRemovalPolicy":!0,"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName":!0,"@aws-cdk/aws-s3:createDefaultLoggingPolicy":!0,"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption":!0,"@aws-cdk/aws-apigateway:disableCloudWatchRole":!0,"@aws-cdk/core:enablePartitionLiterals":!0,"@aws-cdk/aws-events:eventsTargetQueueSameAccount":!0,"@aws-cdk/aws-iam:standardizedServicePrincipals":!0,"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker":!0,"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName":!0,"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy":!0,"@aws-cdk/aws-route53-patters:useCertificate":!0,"@aws-cdk/customresources:installLatestAwsSdkDefault":!1,"@aws-cdk/aws-rds:databaseProxyUniqueResourceName":!0,"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup":!0,"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId":!0,"@aws-cdk/aws-ec2:launchTemplateDefaultUserData":!0,"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments":!0,"@aws-cdk/aws-redshift:columnId":!0,"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2":!0,"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup":!0,"@aws-cdk/aws-apigateway:requestValidatorUniqueId":!0,"@aws-cdk/aws-kms:aliasNameRef":!0,"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig":!0,"@aws-cdk/core:includePrefixInUniqueNameGeneration":!0,"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby":!0}},null,2)+`
496
- `;var TF=Object.defineProperty,Ln=(e,t)=>TF(e,"name",{value:t,configurable:!0});function tP(e,t,n){let i=e.root?eP.join(e.root,t):t;try{if(po.existsSync(i)){let r=`${i}.bak`,o=`${r}.tmp`;po.writeFileSync(o,n),po.renameSync(o,r)}return P(void 0)}catch(r){let o=Tt(r);return Fu.warn("Generator",`Failed to create backup of ${t}`,{error:Or(o.message)}),T(o)}}Ln(tP,"createInfrastructureBackup");function rP(e,t){try{let n=Wr(e,{extractCustomCode:!0}),i=Mn(n,t,{skipValidation:!0});return n.customCodeBlocks?.length&&(i.customCodeBlocks=n.customCodeBlocks),P({parsed:n,plan:i})}catch(n){return T(Tt(n))}}Ln(rP,"parseAndBuildPlan");function nP(e,t){let n=rP(e,t);if(!n.success)throw new Error(`Failed to parse infrastructure: ${n.error.message}`,{cause:n.error});return n.data}Ln(nP,"parseAndBuildPlanOrThrow");function iP(e,t,n){let i=e.safeParse(t);if(!i.success)throw new Error(`Invalid ${n} generator options:
497
- ${Ra(i.error)}`);return i.data}Ln(iP,"validateGeneratorOptions");function oP(e,t){let n=rr(t),i=e.read(n)?.toString();if(!i)throw new Error(`App '${t}' not found. Expected infrastructure.ts at: ${n}`);return{path:n,content:i}}Ln(oP,"readInfrastructureOrThrow");async function Yy(e,t,n,i,r){let o=iP(t,n,i),{path:a,content:c}=oP(e,o.appName),{plan:u}=nP(c,o.appName),l=await r({tree:e,validated:o,plan:u,infrastructurePath:a,content:c}),d=aP(e,a,c,l);if(!d.success)throw new Error(d.error.message,{cause:d.error})}Ln(Yy,"withInfrastructurePlan");function aP(e,t,n,i){let r=lo(i);if(!r.success)return T(r.error);let o=tP(e,t,n);return o.success?(e.write(t,r.data),P(void 0)):T(new Error(`Failed to create backup: ${o.error.message}`))}Ln(aP,"generateAndWriteInfrastructure");var $F=Object.defineProperty,ld=(e,t)=>$F(e,"name",{value:t,configurable:!0}),fo=1e3;function RF(e,t,n,i){if(Pd(e,t,i)===0)return n;for(let r=2;r<=fo;r++){let o=`${n}${r}`;try{return yo(e,t,o),o}catch{}}return`${n}${fo}`}ld(RF,"generateUniqueResourceName");function sP(e,t){let n=E$.RESOURCE_SUFFIXES[t];return`${e}${n}`}ld(sP,"getDefaultResourceName");function CF(e,t,n){let i=sP(t,n);if(!rn(e,t,i))return i;for(let r=2;r<=fo;r++){let o=`${i}${r}`;if(!rn(e,t,o))return o}return`${i}${fo}`}ld(CF,"getUniqueDefaultResourceName");function Ky(e,t,n){if(!rn(e,t,n))return n;let i=n.match(/^(.+?)(\d*)$/);if(!i)return n;let r=i[1],o=i[2]?parseInt(i[2],10)+1:2;for(let a=o;a<=o+fo;a++){let c=`${r}${a}`;if(!rn(e,t,c))return c}return`${r}${o+fo}`}ld(Ky,"ensureUniqueResourceName");var a_=KO(jO(),1),kG=Object.defineProperty,zO=(e,t)=>kG(e,"name",{value:t,configurable:!0});async function s_(e,t,n,i){let r=`Connect to existing ${t}?`,o=`Found ${e} ${t}s. Configure connections?`,a=e===1?n??r:i?.replace("{count}",()=>String(e))??o,c=await(0,a_.default)([{type:"confirm",name:"shouldConnect",message:a,initial:!0}]);return c?c.shouldConnect:!1}zO(s_,"promptForConnection");async function c_(e,t,n){if(e.length===1)return process.stdout.write(`
494
+ `,IF=JSON.stringify({compilerOptions:{target:"ES2020",module:"commonjs",lib:["es2020","dom"],declaration:!0,strict:!0,noImplicitAny:!0,strictNullChecks:!0,noImplicitThis:!0,alwaysStrict:!0,noUnusedLocals:!1,noUnusedParameters:!1,noImplicitReturns:!0,noFallthroughCasesInSwitch:!1,inlineSourceMap:!0,inlineSources:!0,experimentalDecorators:!0,strictPropertyInitialization:!1,typeRoots:["./node_modules/@types"]},exclude:["node_modules","cdk.out"]},null,2)+`
495
+ `,TF=JSON.stringify({app:"npx ts-node --prefer-ts-exts --transpile-only infrastructure.ts",assetMetadata:!1,pathMetadata:!1,versionReporting:!1,watch:{include:["**"],exclude:["README.md","cdk*.json","**/*.d.ts","**/*.js","tsconfig.json","package*.json","yarn.lock","node_modules","test"]},context:{"@aws-cdk/aws-lambda:recognizeLayerVersion":!0,"@aws-cdk/core:checkSecretUsage":!0,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":!0,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":!0,"@aws-cdk/aws-ecs:arnFormatIncludesClusterName":!0,"@aws-cdk/aws-iam:minimizePolicies":!0,"@aws-cdk/core:validateSnapshotRemovalPolicy":!0,"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName":!0,"@aws-cdk/aws-s3:createDefaultLoggingPolicy":!0,"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption":!0,"@aws-cdk/aws-apigateway:disableCloudWatchRole":!0,"@aws-cdk/core:enablePartitionLiterals":!0,"@aws-cdk/aws-events:eventsTargetQueueSameAccount":!0,"@aws-cdk/aws-iam:standardizedServicePrincipals":!0,"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker":!0,"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName":!0,"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy":!0,"@aws-cdk/aws-route53-patters:useCertificate":!0,"@aws-cdk/customresources:installLatestAwsSdkDefault":!1,"@aws-cdk/aws-rds:databaseProxyUniqueResourceName":!0,"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup":!0,"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId":!0,"@aws-cdk/aws-ec2:launchTemplateDefaultUserData":!0,"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments":!0,"@aws-cdk/aws-redshift:columnId":!0,"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2":!0,"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup":!0,"@aws-cdk/aws-apigateway:requestValidatorUniqueId":!0,"@aws-cdk/aws-kms:aliasNameRef":!0,"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig":!0,"@aws-cdk/core:includePrefixInUniqueNameGeneration":!0,"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby":!0}},null,2)+`
496
+ `;var $F=Object.defineProperty,Ln=(e,t)=>$F(e,"name",{value:t,configurable:!0});function rP(e,t,n){let i=e.root?tP.join(e.root,t):t;try{if(mo.existsSync(i)){let r=`${i}.bak`,o=`${r}.tmp`;mo.writeFileSync(o,n),mo.renameSync(o,r)}return P(void 0)}catch(r){let o=Tt(r);return Uu.warn("Generator",`Failed to create backup of ${t}`,{error:Or(o.message)}),T(o)}}Ln(rP,"createInfrastructureBackup");function nP(e,t){try{let n=Wr(e,{extractCustomCode:!0}),i=Mn(n,t,{skipValidation:!0});return n.customCodeBlocks?.length&&(i.customCodeBlocks=n.customCodeBlocks),P({parsed:n,plan:i})}catch(n){return T(Tt(n))}}Ln(nP,"parseAndBuildPlan");function iP(e,t){let n=nP(e,t);if(!n.success)throw new Error(`Failed to parse infrastructure: ${n.error.message}`,{cause:n.error});return n.data}Ln(iP,"parseAndBuildPlanOrThrow");function oP(e,t,n){let i=e.safeParse(t);if(!i.success)throw new Error(`Invalid ${n} generator options:
497
+ ${$a(i.error)}`);return i.data}Ln(oP,"validateGeneratorOptions");function aP(e,t){let n=rr(t),i=e.read(n)?.toString();if(!i)throw new Error(`App '${t}' not found. Expected infrastructure.ts at: ${n}`);return{path:n,content:i}}Ln(aP,"readInfrastructureOrThrow");async function Ky(e,t,n,i,r){let o=oP(t,n,i),{path:a,content:c}=aP(e,o.appName),{plan:u}=iP(c,o.appName),l=await r({tree:e,validated:o,plan:u,infrastructurePath:a,content:c}),d=sP(e,a,c,l);if(!d.success)throw new Error(d.error.message,{cause:d.error})}Ln(Ky,"withInfrastructurePlan");function sP(e,t,n,i){let r=uo(i);if(!r.success)return T(r.error);let o=rP(e,t,n);return o.success?(e.write(t,r.data),P(void 0)):T(new Error(`Failed to create backup: ${o.error.message}`))}Ln(sP,"generateAndWriteInfrastructure");var RF=Object.defineProperty,ld=(e,t)=>RF(e,"name",{value:t,configurable:!0}),po=1e3;function CF(e,t,n,i){if(Pd(e,t,i)===0)return n;for(let r=2;r<=po;r++){let o=`${n}${r}`;try{return bo(e,t,o),o}catch{}}return`${n}${po}`}ld(CF,"generateUniqueResourceName");function cP(e,t){let n=x$.RESOURCE_SUFFIXES[t];return`${e}${n}`}ld(cP,"getDefaultResourceName");function NF(e,t,n){let i=cP(t,n);if(!rn(e,t,i))return i;for(let r=2;r<=po;r++){let o=`${i}${r}`;if(!rn(e,t,o))return o}return`${i}${po}`}ld(NF,"getUniqueDefaultResourceName");function qy(e,t,n){if(!rn(e,t,n))return n;let i=n.match(/^(.+?)(\d*)$/);if(!i)return n;let r=i[1],o=i[2]?parseInt(i[2],10)+1:2;for(let a=o;a<=o+po;a++){let c=`${r}${a}`;if(!rn(e,t,c))return c}return`${r}${o+po}`}ld(qy,"ensureUniqueResourceName");var s_=qO(zO(),1),OG=Object.defineProperty,LO=(e,t)=>OG(e,"name",{value:t,configurable:!0});async function c_(e,t,n,i){let r=`Connect to existing ${t}?`,o=`Found ${e} ${t}s. Configure connections?`,a=e===1?n??r:i?.replace("{count}",()=>String(e))??o,c=await(0,s_.default)([{type:"confirm",name:"shouldConnect",message:a,initial:!0}]);return c?c.shouldConnect:!1}LO(c_,"promptForConnection");async function u_(e,t,n){if(e.length===1)return process.stdout.write(`
498
498
  Auto-selected: ${e[0].name}
499
- `),[e[0].name];let i=[];for(;i.length===0;)i=(await(0,a_.default)([{type:"multiselect",name:"selected",message:t,choices:e.map(r=>({title:r.name,value:r.name,description:n?.(r),selected:!1}))}]))?.selected||[],i.length===0&&process.stdout.write(`
499
+ `),[e[0].name];let i=[];for(;i.length===0;)i=(await(0,s_.default)([{type:"multiselect",name:"selected",message:t,choices:e.map(r=>({title:r.name,value:r.name,description:n?.(r),selected:!1}))}]))?.selected||[],i.length===0&&process.stdout.write(`
500
500
  Please select at least one resource
501
501
 
502
- `);return i}zO(c_,"selectResources");var OG=Object.defineProperty,u_=(e,t)=>OG(e,"name",{value:t,configurable:!0});function LO(e,t,n){let i=n.length>0;switch(t.type){case"ecs":return{name:e,type:"ecs",needsConnection:i,connectedDatabase:n,cluster:t.cluster,services:t.services,...t.docker!==void 0&&{docker:t.docker}};case"lambda":return{name:e,type:"lambda",needsConnection:i,connectedDatabase:n,timeout:t.timeout,memory:t.memory,handler:t.handler,runtime:t.runtime,environment:t.environment,secrets:t.secrets};case"ec2":return{name:e,type:"ec2",needsConnection:i,connectedDatabase:n,instanceType:t.instanceType,enableSSH:t.enableSSH,keyName:t.keyName,userData:t.userData,securityGroups:t.securityGroups};default:return t}}u_(LO,"buildComputeResourcePlan");async function UO(e,t){await Yy(e,_R,t,"compute",async({tree:n,validated:i,plan:r})=>{i.nameProvidedByFlag||yo(n,i.appName,i.computeName);let o=i.nameProvidedByFlag?Ky(n,i.appName,i.computeName):i.computeName,a=await FO(i,r),c=LO(o,i,a);return{...r,compute:[...r.compute,c]}})}u_(UO,"computeGenerator");async function FO(e,t){return e.connectionConfig?e.connectionConfig.connectToDatabase??[]:t.database.length>0&&!e.nameProvidedByFlag&&await s_(t.database.length,"database","Connect to existing database?","Found {count} databases. Configure connections?")?c_(t.database,"Select databases to connect:",n=>`${n.type} - ${n.databaseName}`):[]}u_(FO,"resolveConnectedDatabase");var tne=UO;export{UO as computeGenerator,tne as default};
502
+ `);return i}LO(u_,"selectResources");var DG=Object.defineProperty,l_=(e,t)=>DG(e,"name",{value:t,configurable:!0});function UO(e,t,n){let i=n.length>0;switch(t.type){case"ecs":return{name:e,type:"ecs",needsConnection:i,connectedDatabase:n,cluster:t.cluster,services:t.services,...t.docker!==void 0&&{docker:t.docker}};case"lambda":return{name:e,type:"lambda",needsConnection:i,connectedDatabase:n,timeout:t.timeout,memory:t.memory,handler:t.handler,runtime:t.runtime,environment:t.environment,secrets:t.secrets};case"ec2":return{name:e,type:"ec2",needsConnection:i,connectedDatabase:n,instanceType:t.instanceType,enableSSH:t.enableSSH,keyName:t.keyName,userData:t.userData,securityGroups:t.securityGroups};default:return t}}l_(UO,"buildComputeResourcePlan");async function FO(e,t){await Ky(e,ER,t,"compute",async({tree:n,validated:i,plan:r})=>{i.nameProvidedByFlag||bo(n,i.appName,i.computeName);let o=i.nameProvidedByFlag?qy(n,i.appName,i.computeName):i.computeName,a=await BO(i,r),c=UO(o,i,a);return{...r,compute:[...r.compute,c]}})}l_(FO,"computeGenerator");async function BO(e,t){return e.connectionConfig?e.connectionConfig.connectToDatabase??[]:t.database.length>0&&!e.nameProvidedByFlag&&await c_(t.database.length,"database","Connect to existing database?","Found {count} databases. Configure connections?")?u_(t.database,"Select databases to connect:",n=>`${n.type} - ${n.databaseName}`):[]}l_(BO,"resolveConnectedDatabase");var rne=FO;export{FO as computeGenerator,rne as default};