fjall 3.11.0 → 4.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 qw=Object.create;var td=Object.defineProperty;var Kw=Object.getOwnPropertyDescriptor;var Yw=Object.getOwnPropertyNames;var Xw=Object.getPrototypeOf,Jw=Object.prototype.hasOwnProperty;var rs=(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}},$t=(e,t)=>{for(var n in t)td(e,n,{get:t[n],enumerable:!0})},Qw=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Yw(t))!Jw.call(e,r)&&r!==n&&td(e,r,{get:()=>t[r],enumerable:!(i=Kw(t,r))||i.enumerable});return e};var ek=(e,t,n)=>(n=e!=null?qw(Xw(e)):{},Qw(t||!e||!e.__esModule?td(n,"default",{value:e,enumerable:!0}):n,e));var oe=I((jX,fP)=>{"use strict";var{FORCE_COLOR:H4,NODE_DISABLE_COLORS:q4,TERM:K4}=process.env,H={enabled:!q4&&K4!=="dumb"&&H4!=="0",reset:ee(0,0),bold:ee(1,22),dim:ee(2,22),italic:ee(3,23),underline:ee(4,24),inverse:ee(7,27),hidden:ee(8,28),strikethrough:ee(9,29),black:ee(30,39),red:ee(31,39),green:ee(32,39),yellow:ee(33,39),blue:ee(34,39),magenta:ee(35,39),cyan:ee(36,39),white:ee(37,39),gray:ee(90,39),grey:ee(90,39),bgBlack:ee(40,49),bgRed:ee(41,49),bgGreen:ee(42,49),bgYellow:ee(43,49),bgBlue:ee(44,49),bgMagenta:ee(45,49),bgCyan:ee(46,49),bgWhite:ee(47,49)};function pP(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 Y4(e,t){let n={has:e,keys:t};return n.reset=H.reset.bind(n),n.bold=H.bold.bind(n),n.dim=H.dim.bind(n),n.italic=H.italic.bind(n),n.underline=H.underline.bind(n),n.inverse=H.inverse.bind(n),n.hidden=H.hidden.bind(n),n.strikethrough=H.strikethrough.bind(n),n.black=H.black.bind(n),n.red=H.red.bind(n),n.green=H.green.bind(n),n.yellow=H.yellow.bind(n),n.blue=H.blue.bind(n),n.magenta=H.magenta.bind(n),n.cyan=H.cyan.bind(n),n.white=H.white.bind(n),n.gray=H.gray.bind(n),n.grey=H.grey.bind(n),n.bgBlack=H.bgBlack.bind(n),n.bgRed=H.bgRed.bind(n),n.bgGreen=H.bgGreen.bind(n),n.bgYellow=H.bgYellow.bind(n),n.bgBlue=H.bgBlue.bind(n),n.bgMagenta=H.bgMagenta.bind(n),n.bgCyan=H.bgCyan.bind(n),n.bgWhite=H.bgWhite.bind(n),n}function ee(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:H.enabled?pP(this.keys,i+""):i+""):i===void 0?Y4([e],[n]):H.enabled?pP([n],i+""):i+""}}fP.exports=H});var hP=I((zX,gP)=>{"use strict";gP.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 Ll=I((LX,vP)=>{"use strict";vP.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 ae=I((UX,bP)=>{"use strict";var uy={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"},X4={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},J4={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?uy.up():"");return e&&(t+=uy.left),t}};bP.exports={cursor:uy,scroll:X4,erase:J4,beep:"\x07"}});var xP=I((FX,EP)=>{"use strict";function Q4(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=e2(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 e2(e,t){if(e){if(typeof e=="string")return yP(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 yP(e,t)}}function yP(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 t2=Ll(),_P=ae(),SP=_P.erase,r2=_P.cursor,n2=e=>[...t2(e)].length;EP.exports=function(e,t){if(!t)return SP.line+r2.to(0);let n=0,i=e.split(/\r?\n/);var r=Q4(i),o;try{for(r.s();!(o=r.n()).done;){let a=o.value;n+=1+Math.floor(Math.max(n2(a)-1,0)/t)}}catch(a){r.e(a)}finally{r.f()}return SP.lines(n)}});var ly=I((BX,AP)=>{"use strict";var Ga={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},i2={arrowUp:Ga.arrowUp,arrowDown:Ga.arrowDown,arrowLeft:Ga.arrowLeft,arrowRight:Ga.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},o2=process.platform==="win32"?i2:Ga;AP.exports=o2});var $P=I((VX,IP)=>{"use strict";var Xi=oe(),An=ly(),dy=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}`}}),a2=e=>dy[e]||dy.default,Wa=Object.freeze({aborted:Xi.red(An.cross),done:Xi.green(An.tick),exited:Xi.yellow(An.cross),default:Xi.cyan("?")}),s2=(e,t,n)=>t?Wa.aborted:n?Wa.exited:e?Wa.done:Wa.default,c2=e=>Xi.gray(e?An.ellipsis:An.pointerSmall),u2=(e,t)=>Xi.gray(e?t?An.pointerSmall:"+":An.line);IP.exports={styles:dy,render:a2,symbols:Wa,symbol:s2,delimiter:c2,item:u2}});var RP=I((ZX,TP)=>{"use strict";var l2=Ll();TP.exports=function(e,t){let n=String(l2(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var CP=I((GX,PP)=>{"use strict";PP.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 Yw=Object.create;var td=Object.defineProperty;var Xw=Object.getOwnPropertyDescriptor;var Jw=Object.getOwnPropertyNames;var Qw=Object.getPrototypeOf,ek=Object.prototype.hasOwnProperty;var ns=(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}},$t=(e,t)=>{for(var n in t)td(e,n,{get:t[n],enumerable:!0})},tk=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Jw(t))!ek.call(e,r)&&r!==n&&td(e,r,{get:()=>t[r],enumerable:!(i=Xw(t,r))||i.enumerable});return e};var rk=(e,t,n)=>(n=e!=null?Yw(Qw(e)):{},tk(t||!e||!e.__esModule?td(n,"default",{value:e,enumerable:!0}):n,e));var oe=I((FX,hC)=>{"use strict";var{FORCE_COLOR:Y4,NODE_DISABLE_COLORS:X4,TERM:J4}=process.env,H={enabled:!X4&&J4!=="dumb"&&Y4!=="0",reset:ee(0,0),bold:ee(1,22),dim:ee(2,22),italic:ee(3,23),underline:ee(4,24),inverse:ee(7,27),hidden:ee(8,28),strikethrough:ee(9,29),black:ee(30,39),red:ee(31,39),green:ee(32,39),yellow:ee(33,39),blue:ee(34,39),magenta:ee(35,39),cyan:ee(36,39),white:ee(37,39),gray:ee(90,39),grey:ee(90,39),bgBlack:ee(40,49),bgRed:ee(41,49),bgGreen:ee(42,49),bgYellow:ee(43,49),bgBlue:ee(44,49),bgMagenta:ee(45,49),bgCyan:ee(46,49),bgWhite:ee(47,49)};function gC(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 Q4(e,t){let n={has:e,keys:t};return n.reset=H.reset.bind(n),n.bold=H.bold.bind(n),n.dim=H.dim.bind(n),n.italic=H.italic.bind(n),n.underline=H.underline.bind(n),n.inverse=H.inverse.bind(n),n.hidden=H.hidden.bind(n),n.strikethrough=H.strikethrough.bind(n),n.black=H.black.bind(n),n.red=H.red.bind(n),n.green=H.green.bind(n),n.yellow=H.yellow.bind(n),n.blue=H.blue.bind(n),n.magenta=H.magenta.bind(n),n.cyan=H.cyan.bind(n),n.white=H.white.bind(n),n.gray=H.gray.bind(n),n.grey=H.grey.bind(n),n.bgBlack=H.bgBlack.bind(n),n.bgRed=H.bgRed.bind(n),n.bgGreen=H.bgGreen.bind(n),n.bgYellow=H.bgYellow.bind(n),n.bgBlue=H.bgBlue.bind(n),n.bgMagenta=H.bgMagenta.bind(n),n.bgCyan=H.bgCyan.bind(n),n.bgWhite=H.bgWhite.bind(n),n}function ee(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:H.enabled?gC(this.keys,i+""):i+""):i===void 0?Q4([e],[n]):H.enabled?gC([n],i+""):i+""}}hC.exports=H});var bC=I((BX,vC)=>{"use strict";vC.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 Ll=I((VX,yC)=>{"use strict";yC.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 ae=I((ZX,SC)=>{"use strict";var ly={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"},e2={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},t2={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?ly.up():"");return e&&(t+=ly.left),t}};SC.exports={cursor:ly,scroll:e2,erase:t2,beep:"\x07"}});var IC=I((GX,AC)=>{"use strict";function r2(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=n2(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 n2(e,t){if(e){if(typeof e=="string")return _C(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 _C(e,t)}}function _C(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 i2=Ll(),xC=ae(),EC=xC.erase,o2=xC.cursor,a2=e=>[...i2(e)].length;AC.exports=function(e,t){if(!t)return EC.line+o2.to(0);let n=0,i=e.split(/\r?\n/);var r=r2(i),o;try{for(r.s();!(o=r.n()).done;){let a=o.value;n+=1+Math.floor(Math.max(a2(a)-1,0)/t)}}catch(a){r.e(a)}finally{r.f()}return EC.lines(n)}});var dy=I((WX,$C)=>{"use strict";var Wa={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},s2={arrowUp:Wa.arrowUp,arrowDown:Wa.arrowDown,arrowLeft:Wa.arrowLeft,arrowRight:Wa.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},c2=process.platform==="win32"?s2:Wa;$C.exports=c2});var RC=I((HX,TC)=>{"use strict";var Xi=oe(),In=dy(),my=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}`}}),u2=e=>my[e]||my.default,Ha=Object.freeze({aborted:Xi.red(In.cross),done:Xi.green(In.tick),exited:Xi.yellow(In.cross),default:Xi.cyan("?")}),l2=(e,t,n)=>t?Ha.aborted:n?Ha.exited:e?Ha.done:Ha.default,d2=e=>Xi.gray(e?In.ellipsis:In.pointerSmall),m2=(e,t)=>Xi.gray(e?t?In.pointerSmall:"+":In.line);TC.exports={styles:my,render:u2,symbols:Ha,symbol:l2,delimiter:d2,item:m2}});var PC=I((qX,CC)=>{"use strict";var p2=Ll();CC.exports=function(e,t){let n=String(p2(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var wC=I((KX,NC)=>{"use strict";NC.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 wP=I((WX,NP)=>{"use strict";NP.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 At=I((HX,kP)=>{"use strict";kP.exports={action:hP(),clear:xP(),style:$P(),strip:Ll(),figures:ly(),lines:RP(),wrap:CP(),entriesToDisplay:wP()}});var sr=I((qX,MP)=>{"use strict";var OP=rs("readline"),d2=At(),m2=d2.action,p2=rs("events"),DP=ae(),f2=DP.beep,g2=DP.cursor,h2=oe(),my=class extends p2{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=OP.createInterface({input:this.in,escapeCodeTimeout:50});OP.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=m2(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(g2.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(f2)}render(){this.onRender(h2),this.firstRender&&(this.firstRender=!1)}};MP.exports=my});var FP=I((KX,UP)=>{"use strict";function jP(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 zP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){jP(o,i,r,a,c,"next",u)}function c(u){jP(o,i,r,a,c,"throw",u)}a(void 0)})}}var Ul=oe(),v2=sr(),LP=ae(),b2=LP.erase,Ha=LP.cursor,Fl=At(),py=Fl.style,fy=Fl.clear,y2=Fl.lines,S2=Fl.figures,gy=class extends v2{constructor(t={}){super(t),this.transform=py.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=fy("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=Ul.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 zP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return zP(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(Ha.down(y2(this.outputError,this.out.columns)-1)+fy(this.outputError,this.out.columns)),this.out.write(fy(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[py.symbol(this.done,this.aborted),Ul.bold(this.msg),py.delimiter(this.done),this.red?Ul.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
7
+ `)}});var OC=I((YX,kC)=>{"use strict";kC.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 At=I((XX,DC)=>{"use strict";DC.exports={action:bC(),clear:IC(),style:RC(),strip:Ll(),figures:dy(),lines:PC(),wrap:wC(),entriesToDisplay:OC()}});var sr=I((JX,zC)=>{"use strict";var MC=ns("readline"),f2=At(),g2=f2.action,h2=ns("events"),jC=ae(),v2=jC.beep,b2=jC.cursor,y2=oe(),py=class extends h2{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=MC.createInterface({input:this.in,escapeCodeTimeout:50});MC.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=g2(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(b2.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(v2)}render(){this.onRender(y2),this.firstRender&&(this.firstRender=!1)}};zC.exports=py});var VC=I((QX,BC)=>{"use strict";function LC(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 UC(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){LC(o,i,r,a,c,"next",u)}function c(u){LC(o,i,r,a,c,"throw",u)}a(void 0)})}}var Ul=oe(),S2=sr(),FC=ae(),_2=FC.erase,qa=FC.cursor,Fl=At(),fy=Fl.style,gy=Fl.clear,E2=Fl.lines,x2=Fl.figures,hy=class extends S2{constructor(t={}){super(t),this.transform=fy.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=gy("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=Ul.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 UC(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return UC(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(qa.down(E2(this.outputError,this.out.columns)-1)+gy(this.outputError,this.out.columns)),this.out.write(gy(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[fy.symbol(this.done,this.aborted),Ul.bold(this.msg),fy.delimiter(this.done),this.red?Ul.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
10
10
  `).reduce((t,n,i)=>t+`
11
- ${i?" ":S2.pointerSmall} ${Ul.red().italic(n)}`,"")),this.out.write(b2.line+Ha.to(0)+this.outputText+Ha.save+this.outputError+Ha.restore+Ha.move(this.cursorOffset,0)))}};UP.exports=gy});var GP=I((YX,ZP)=>{"use strict";var cr=oe(),_2=sr(),qa=At(),BP=qa.style,VP=qa.clear,Bl=qa.figures,E2=qa.wrap,x2=qa.entriesToDisplay,A2=ae(),I2=A2.cursor,hy=class extends _2{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=VP("",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?" ":x2.pointerSmall} ${Ul.red().italic(n)}`,"")),this.out.write(_2.line+qa.to(0)+this.outputText+qa.save+this.outputError+qa.restore+qa.move(this.cursorOffset,0)))}};BC.exports=hy});var HC=I((eJ,WC)=>{"use strict";var cr=oe(),A2=sr(),Ka=At(),ZC=Ka.style,GC=Ka.clear,Bl=Ka.figures,I2=Ka.wrap,$2=Ka.entriesToDisplay,T2=ae(),R2=T2.cursor,vy=class extends A2{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=GC("",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(I2.hide):this.out.write(VP(this.outputText,this.out.columns)),super.render();let t=x2(this.cursor,this.choices.length,this.optionsPerPage),n=t.startIndex,i=t.endIndex;if(this.outputText=[BP.symbol(this.done,this.aborted),cr.bold(this.msg),BP.delimiter(!1),this.done?this.selection.title:this.selection.disabled?cr.yellow(this.warn):cr.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(R2.hide):this.out.write(GC(this.outputText,this.out.columns)),super.render();let t=$2(this.cursor,this.choices.length,this.optionsPerPage),n=t.startIndex,i=t.endIndex;if(this.outputText=[ZC.symbol(this.done,this.aborted),cr.bold(this.msg),ZC.delimiter(!1),this.done?this.selection.title:this.selection.disabled?cr.yellow(this.warn):cr.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=Bl.arrowUp:r===i-1&&i<this.choices.length?a=Bl.arrowDown:a=" ",u.disabled?(o=this.cursor===r?cr.gray().underline(u.title):cr.strikethrough().gray(u.title),a=(this.cursor===r?cr.bold().gray(Bl.pointer)+" ":" ")+a):(o=this.cursor===r?cr.cyan().underline(u.title):u.title,a=(this.cursor===r?cr.cyan(Bl.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
- `+E2(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${o}${cr.gray(c)}
16
- `}}this.out.write(this.outputText)}};ZP.exports=hy});var XP=I((XX,YP)=>{"use strict";var Vl=oe(),$2=sr(),qP=At(),WP=qP.style,T2=qP.clear,KP=ae(),HP=KP.cursor,R2=KP.erase,vy=class extends $2{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
+ `+I2(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${o}${cr.gray(c)}
16
+ `}}this.out.write(this.outputText)}};WC.exports=vy});var QC=I((tJ,JC)=>{"use strict";var Vl=oe(),C2=sr(),YC=At(),qC=YC.style,P2=YC.clear,XC=ae(),KC=XC.cursor,N2=XC.erase,by=class extends C2{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(HP.hide):this.out.write(T2(this.outputText,this.out.columns)),super.render(),this.outputText=[WP.symbol(this.done,this.aborted),Vl.bold(this.msg),WP.delimiter(this.done),this.value?this.inactive:Vl.cyan().underline(this.inactive),Vl.gray("/"),this.value?Vl.cyan().underline(this.active):this.active].join(" "),this.out.write(R2.line+HP.to(0)+this.outputText))}};YP.exports=vy});var Bt=I((JX,JP)=>{"use strict";var by=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)}};JP.exports=by});var eC=I((QX,QP)=>{"use strict";var P2=Bt(),yy=class extends P2{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}};QP.exports=yy});var rC=I((eJ,tC)=>{"use strict";var C2=Bt(),N2=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),Sy=class extends C2{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+N2(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};tC.exports=Sy});var iC=I((tJ,nC)=>{"use strict";var w2=Bt(),_y=class extends w2{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}};nC.exports=_y});var aC=I((rJ,oC)=>{"use strict";var k2=Bt(),Ey=class extends k2{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)}};oC.exports=Ey});var cC=I((nJ,sC)=>{"use strict";var O2=Bt(),xy=class extends O2{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}};sC.exports=xy});var lC=I((iJ,uC)=>{"use strict";var D2=Bt(),Ay=class extends D2{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)}};uC.exports=Ay});var mC=I((oJ,dC)=>{"use strict";var M2=Bt(),Iy=class extends M2{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}};dC.exports=Iy});var fC=I((aJ,pC)=>{"use strict";var j2=Bt(),$y=class extends j2{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}};pC.exports=$y});var hC=I((sJ,gC)=>{"use strict";gC.exports={DatePart:Bt(),Meridiem:eC(),Day:rC(),Hours:iC(),Milliseconds:aC(),Minutes:cC(),Month:lC(),Seconds:mC(),Year:fC()}});var $C=I((cJ,IC)=>{"use strict";function vC(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 bC(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){vC(o,i,r,a,c,"next",u)}function c(u){vC(o,i,r,a,c,"throw",u)}a(void 0)})}}var Ty=oe(),z2=sr(),Py=At(),yC=Py.style,SC=Py.clear,L2=Py.figures,AC=ae(),U2=AC.erase,_C=AC.cursor,ur=hC(),EC=ur.DatePart,F2=ur.Meridiem,B2=ur.Day,V2=ur.Hours,Z2=ur.Milliseconds,G2=ur.Minutes,W2=ur.Month,H2=ur.Seconds,q2=ur.Year,K2=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,xC={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new B2(e),3:e=>new W2(e),4:e=>new q2(e),5:e=>new F2(e),6:e=>new V2(e),7:e=>new G2(e),8:e=>new H2(e),9:e=>new Z2(e)},Y2={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(",")},Ry=class extends z2{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(Y2,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=SC("",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=K2.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in xC?xC[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 EC)),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 bC(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return bC(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 EC)),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(_C.hide):this.out.write(SC(this.outputText,this.out.columns)),super.render(),this.outputText=[yC.symbol(this.done,this.aborted),Ty.bold(this.msg),yC.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?Ty.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(KC.hide):this.out.write(P2(this.outputText,this.out.columns)),super.render(),this.outputText=[qC.symbol(this.done,this.aborted),Vl.bold(this.msg),qC.delimiter(this.done),this.value?this.inactive:Vl.cyan().underline(this.inactive),Vl.gray("/"),this.value?Vl.cyan().underline(this.active):this.active].join(" "),this.out.write(N2.line+KC.to(0)+this.outputText))}};JC.exports=by});var Bt=I((rJ,eP)=>{"use strict";var yy=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)}};eP.exports=yy});var rP=I((nJ,tP)=>{"use strict";var w2=Bt(),Sy=class extends w2{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}};tP.exports=Sy});var iP=I((iJ,nP)=>{"use strict";var k2=Bt(),O2=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),_y=class extends k2{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+O2(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};nP.exports=_y});var aP=I((oJ,oP)=>{"use strict";var D2=Bt(),Ey=class extends D2{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}};oP.exports=Ey});var cP=I((aJ,sP)=>{"use strict";var M2=Bt(),xy=class extends M2{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)}};sP.exports=xy});var lP=I((sJ,uP)=>{"use strict";var j2=Bt(),Ay=class extends j2{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}};uP.exports=Ay});var mP=I((cJ,dP)=>{"use strict";var z2=Bt(),Iy=class extends z2{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)}};dP.exports=Iy});var fP=I((uJ,pP)=>{"use strict";var L2=Bt(),$y=class extends L2{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}};pP.exports=$y});var hP=I((lJ,gP)=>{"use strict";var U2=Bt(),Ty=class extends U2{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}};gP.exports=Ty});var bP=I((dJ,vP)=>{"use strict";vP.exports={DatePart:Bt(),Meridiem:rP(),Day:iP(),Hours:aP(),Milliseconds:cP(),Minutes:lP(),Month:mP(),Seconds:fP(),Year:hP()}});var RP=I((mJ,TP)=>{"use strict";function yP(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 SP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){yP(o,i,r,a,c,"next",u)}function c(u){yP(o,i,r,a,c,"throw",u)}a(void 0)})}}var Ry=oe(),F2=sr(),Py=At(),_P=Py.style,EP=Py.clear,B2=Py.figures,$P=ae(),V2=$P.erase,xP=$P.cursor,ur=bP(),AP=ur.DatePart,Z2=ur.Meridiem,G2=ur.Day,W2=ur.Hours,H2=ur.Milliseconds,q2=ur.Minutes,K2=ur.Month,Y2=ur.Seconds,X2=ur.Year,J2=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,IP={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new G2(e),3:e=>new K2(e),4:e=>new X2(e),5:e=>new Z2(e),6:e=>new W2(e),7:e=>new q2(e),8:e=>new Y2(e),9:e=>new H2(e)},Q2={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(",")},Cy=class extends F2{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(Q2,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=EP("",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=J2.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in IP?IP[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 AP)),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 SP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return SP(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 AP)),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(xP.hide):this.out.write(EP(this.outputText,this.out.columns)),super.render(),this.outputText=[_P.symbol(this.done,this.aborted),Ry.bold(this.msg),_P.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?Ry.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
21
21
  `).reduce((t,n,i)=>t+`
22
- ${i?" ":L2.pointerSmall} ${Ty.red().italic(n)}`,"")),this.out.write(U2.line+_C.to(0)+this.outputText))}};IC.exports=Ry});var kC=I((uJ,wC)=>{"use strict";function TC(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 RC(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){TC(o,i,r,a,c,"next",u)}function c(u){TC(o,i,r,a,c,"throw",u)}a(void 0)})}}var Zl=oe(),X2=sr(),NC=ae(),Gl=NC.cursor,J2=NC.erase,Wl=At(),Cy=Wl.style,Q2=Wl.figures,PC=Wl.clear,e6=Wl.lines,t6=/[0-9]/,Ny=e=>e!==void 0,CC=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},wy=class extends X2{constructor(t={}){super(t),this.transform=Cy.render(t.style),this.msg=t.message,this.initial=Ny(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=Ny(t.min)?t.min:-1/0,this.max=Ny(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=Zl.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${CC(t,this.round)}`),this._value=CC(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||t6.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 RC(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return RC(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(Gl.down(e6(this.outputError,this.out.columns)-1)+PC(this.outputError,this.out.columns)),this.out.write(PC(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Cy.symbol(this.done,this.aborted),Zl.bold(this.msg),Cy.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Zl[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
22
+ ${i?" ":B2.pointerSmall} ${Ry.red().italic(n)}`,"")),this.out.write(V2.line+xP.to(0)+this.outputText))}};TP.exports=Cy});var DP=I((pJ,OP)=>{"use strict";function CP(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 PP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){CP(o,i,r,a,c,"next",u)}function c(u){CP(o,i,r,a,c,"throw",u)}a(void 0)})}}var Zl=oe(),e6=sr(),kP=ae(),Gl=kP.cursor,t6=kP.erase,Wl=At(),Ny=Wl.style,r6=Wl.figures,NP=Wl.clear,n6=Wl.lines,i6=/[0-9]/,wy=e=>e!==void 0,wP=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},ky=class extends e6{constructor(t={}){super(t),this.transform=Ny.render(t.style),this.msg=t.message,this.initial=wy(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=wy(t.min)?t.min:-1/0,this.max=wy(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=Zl.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${wP(t,this.round)}`),this._value=wP(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||i6.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 PP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return PP(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(Gl.down(n6(this.outputError,this.out.columns)-1)+NP(this.outputError,this.out.columns)),this.out.write(NP(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ny.symbol(this.done,this.aborted),Zl.bold(this.msg),Ny.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Zl[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
25
25
  `).reduce((t,n,i)=>t+`
26
- ${i?" ":Q2.pointerSmall} ${Zl.red().italic(n)}`,"")),this.out.write(J2.line+Gl.to(0)+this.outputText+Gl.save+this.outputError+Gl.restore))}};wC.exports=wy});var Oy=I((lJ,MC)=>{"use strict";var Vt=oe(),r6=ae(),n6=r6.cursor,i6=sr(),Ka=At(),OC=Ka.clear,zr=Ka.figures,DC=Ka.style,o6=Ka.wrap,a6=Ka.entriesToDisplay,ky=class extends i6{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=OC("",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?" ":r6.pointerSmall} ${Zl.red().italic(n)}`,"")),this.out.write(t6.line+Gl.to(0)+this.outputText+Gl.save+this.outputError+Gl.restore))}};OP.exports=ky});var Dy=I((fJ,zP)=>{"use strict";var Vt=oe(),o6=ae(),a6=o6.cursor,s6=sr(),Ya=At(),MP=Ya.clear,zr=Ya.figures,jP=Ya.style,c6=Ya.wrap,u6=Ya.entriesToDisplay,Oy=class extends s6{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=MP("",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,15 +31,15 @@ Instructions:
31
31
  ${zr.arrowLeft}/${zr.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?Vt.green(zr.radioOn):zr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?Vt.gray().underline(n.title):Vt.strikethrough().gray(n.title):(a=t===i?Vt.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
- `+o6(n.description,{margin:o.length,width:this.out.columns})))),o+a+Vt.gray(c||"")}paginateOptions(t){if(t.length===0)return Vt.red("No matches for this query.");let n=a6(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=zr.arrowUp:c===r-1&&r<t.length?o=zr.arrowDown:o=" ",a.push(this.renderOption(this.cursor,t[c],c,o));return`
34
+ `+c6(n.description,{margin:o.length,width:this.out.columns})))),o+a+Vt.gray(c||"")}paginateOptions(t){if(t.length===0)return Vt.red("No matches for this query.");let n=u6(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=zr.arrowUp:c===r-1&&r<t.length?o=zr.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=[Vt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Vt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n6.hide),super.render();let t=[DC.symbol(this.done,this.aborted),Vt.bold(this.msg),DC.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Vt.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=OC(t,this.out.columns)}};MC.exports=ky});var VC=I((dJ,BC)=>{"use strict";function jC(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 s6(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){jC(o,i,r,a,c,"next",u)}function c(u){jC(o,i,r,a,c,"throw",u)}a(void 0)})}}var Ya=oe(),c6=sr(),FC=ae(),u6=FC.erase,zC=FC.cursor,Xa=At(),Dy=Xa.style,LC=Xa.clear,My=Xa.figures,l6=Xa.wrap,d6=Xa.entriesToDisplay,UC=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),m6=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),p6=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},jy=class extends c6{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:p6(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=Dy.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=LC("",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=UC(this.suggestions,t):this.value=this.fallback.value,this.fire()}complete(t){var n=this;return s6(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:m6(u,c),value:UC(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=[Vt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Vt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(a6.hide),super.render();let t=[jP.symbol(this.done,this.aborted),Vt.bold(this.msg),jP.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Vt.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=MP(t,this.out.columns)}};zP.exports=Oy});var GP=I((gJ,ZP)=>{"use strict";function LP(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 l6(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){LP(o,i,r,a,c,"next",u)}function c(u){LP(o,i,r,a,c,"throw",u)}a(void 0)})}}var Xa=oe(),d6=sr(),VP=ae(),m6=VP.erase,UP=VP.cursor,Ja=At(),My=Ja.style,FP=Ja.clear,jy=Ja.figures,p6=Ja.wrap,f6=Ja.entriesToDisplay,BP=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),g6=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),h6=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},zy=class extends d6{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:h6(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=My.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=FP("",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=BP(this.suggestions,t):this.value=this.fallback.value,this.fire()}complete(t){var n=this;return l6(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:g6(u,c),value:BP(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?My.arrowUp:r?My.arrowDown:" ",c=n?Ya.cyan().underline(t.title):t.title;return a=(n?Ya.cyan(My.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
- `+l6(t.description,{margin:3,width:this.out.columns}))),a+" "+c+Ya.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(zC.hide):this.out.write(LC(this.outputText,this.out.columns)),super.render();let t=d6(this.select,this.choices.length,this.limit),n=t.startIndex,i=t.endIndex;if(this.outputText=[Dy.symbol(this.done,this.aborted,this.exited),Ya.bold(this.msg),Dy.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?jy.arrowUp:r?jy.arrowDown:" ",c=n?Xa.cyan().underline(t.title):t.title;return a=(n?Xa.cyan(jy.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
+ `+p6(t.description,{margin:3,width:this.out.columns}))),a+" "+c+Xa.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(UP.hide):this.out.write(FP(this.outputText,this.out.columns)),super.render();let t=f6(this.select,this.choices.length,this.limit),n=t.startIndex,i=t.endIndex;if(this.outputText=[My.symbol(this.done,this.aborted,this.exited),Xa.bold(this.msg),My.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||Ya.gray(this.fallback.title))}this.out.write(u6.line+zC.to(0)+this.outputText)}};BC.exports=jy});var HC=I((mJ,WC)=>{"use strict";var lr=oe(),f6=ae(),g6=f6.cursor,h6=Oy(),Ly=At(),ZC=Ly.clear,GC=Ly.style,Ji=Ly.figures,zy=class extends h6{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=ZC("",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||Xa.gray(this.fallback.title))}this.out.write(m6.line+UP.to(0)+this.outputText)}};ZP.exports=zy});var KP=I((hJ,qP)=>{"use strict";var lr=oe(),v6=ae(),b6=v6.cursor,y6=Dy(),Uy=At(),WP=Uy.clear,HP=Uy.style,Ji=Uy.figures,Ly=class extends y6{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=WP("",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
44
  ${Ji.arrowUp}/${Ji.arrowDown}: Highlight option
45
45
  ${Ji.arrowLeft}/${Ji.arrowRight}/[space]: Toggle selection
@@ -47,31 +47,31 @@ Instructions:
47
47
  enter/return: Complete answer
48
48
  `:""}renderCurrentInput(){return`
49
49
  Filtered results for: ${this.inputValue?this.inputValue:lr.gray("Enter something to filter")}
50
- `}renderOption(t,n,i){let r;return n.disabled?r=t===i?lr.gray().underline(n.title):lr.strikethrough().gray(n.title):r=t===i?lr.cyan().underline(n.title):n.title,(n.selected?lr.green(Ji.radioOn):Ji.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[lr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(lr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(g6.hide),super.render();let t=[GC.symbol(this.done,this.aborted),lr.bold(this.msg),GC.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=lr.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=ZC(t,this.out.columns)}};WC.exports=zy});var eN=I((pJ,QC)=>{"use strict";var qC=oe(),v6=sr(),XC=At(),KC=XC.style,b6=XC.clear,JC=ae(),y6=JC.erase,YC=JC.cursor,Uy=class extends v6{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?lr.gray().underline(n.title):lr.strikethrough().gray(n.title):r=t===i?lr.cyan().underline(n.title):n.title,(n.selected?lr.green(Ji.radioOn):Ji.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[lr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(lr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(b6.hide),super.render();let t=[HP.symbol(this.done,this.aborted),lr.bold(this.msg),HP.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=lr.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=WP(t,this.out.columns)}};qP.exports=Ly});var rN=I((vJ,tN)=>{"use strict";var YP=oe(),S6=sr(),QP=At(),XP=QP.style,_6=QP.clear,eN=ae(),E6=eN.erase,JP=eN.cursor,Fy=class extends S6{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(YC.hide):this.out.write(b6(this.outputText,this.out.columns)),super.render(),this.outputText=[KC.symbol(this.done,this.aborted),qC.bold(this.msg),KC.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:qC.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(y6.line+YC.to(0)+this.outputText))}};QC.exports=Uy});var rN=I((fJ,tN)=>{"use strict";tN.exports={TextPrompt:FP(),SelectPrompt:GP(),TogglePrompt:XP(),DatePrompt:$C(),NumberPrompt:kC(),MultiselectPrompt:Oy(),AutocompletePrompt:VC(),AutocompleteMultiselectPrompt:HC(),ConfirmPrompt:eN()}});var iN=I(nN=>{"use strict";var Ye=nN,S6=rN(),Hl=e=>e;function Zt(e,t,n={}){return new Promise((i,r)=>{let o=new S6[e](t),a=n.onAbort||Hl,c=n.onSubmit||Hl,u=n.onExit||Hl;o.on("state",t.onState||Hl),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Ye.text=e=>Zt("TextPrompt",e);Ye.password=e=>(e.style="password",Ye.text(e));Ye.invisible=e=>(e.style="invisible",Ye.text(e));Ye.number=e=>Zt("NumberPrompt",e);Ye.date=e=>Zt("DatePrompt",e);Ye.confirm=e=>Zt("ConfirmPrompt",e);Ye.list=e=>{let t=e.separator||",";return Zt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Ye.toggle=e=>Zt("TogglePrompt",e);Ye.select=e=>Zt("SelectPrompt",e);Ye.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Zt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Ye.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Zt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var _6=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Ye.autocomplete=e=>(e.suggest=e.suggest||_6,e.choices=[].concat(e.choices||[]),Zt("AutocompletePrompt",e))});var mN=I((hJ,dN)=>{"use strict";function oN(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 aN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oN(Object(n),!0).forEach(function(i){E6(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oN(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function E6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x6(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=A6(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 A6(e,t){if(e){if(typeof e=="string")return sN(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 sN(e,t)}}function sN(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 cN(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 uN(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){cN(o,i,r,a,c,"next",u)}function c(u){cN(o,i,r,a,c,"throw",u)}a(void 0)})}}var Fy=iN(),I6=["suggest","format","onState","validate","onRender","type"],lN=()=>{};function Lr(){return By.apply(this,arguments)}function By(){return By=uN(function*(e=[],{onSubmit:t=lN,onCancel:n=lN}={}){let i={},r=Lr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=(function(){var z=uN(function*(Se,fr,Ne=!1){if(!(!Ne&&Se.validate&&Se.validate(fr)!==!0))return Se.format?yield Se.format(fr,i):fr});return function(fr,Ne){return z.apply(this,arguments)}})();var g=x6(e),v;try{for(g.s();!(v=g.n()).done;){a=v.value;var A=a;if(u=A.name,l=A.type,typeof l=="function"&&(l=yield l(o,aN({},i),a),a.type=l),!!l){for(let z in a){if(I6.includes(z))continue;let Se=a[z];a[z]=typeof Se=="function"?yield Se(o,aN({},i),m):Se}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");var Y=a;if(u=Y.name,l=Y.type,Fy[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=Lr._injected?$6(Lr._injected,a.initial):yield Fy[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(z){g.e(z)}finally{g.f()}return i}),By.apply(this,arguments)}function $6(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function T6(e){Lr._injected=(Lr._injected||[]).concat(e)}function R6(e){Lr._override=Object.assign({},e)}dN.exports=Object.assign(Lr,{prompt:Lr,prompts:Fy,inject:T6,override:R6})});var fN=I((vJ,pN)=>{"use strict";pN.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 ql=I((bJ,gN)=>{"use strict";gN.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 bN=I((yJ,vN)=>{"use strict";var P6=ql(),{erase:hN,cursor:C6}=ae(),N6=e=>[...P6(e)].length;vN.exports=function(e,t){if(!t)return hN.line+C6.to(0);let n=0,i=e.split(/\r?\n/);for(let r of i)n+=1+Math.floor(Math.max(N6(r)-1,0)/t);return hN.lines(n)}});var Vy=I((SJ,yN)=>{"use strict";var Ja={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},w6={arrowUp:Ja.arrowUp,arrowDown:Ja.arrowDown,arrowLeft:Ja.arrowLeft,arrowRight:Ja.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},k6=process.platform==="win32"?w6:Ja;yN.exports=k6});var _N=I((_J,SN)=>{"use strict";var Qi=oe(),In=Vy(),Zy=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}`}}),O6=e=>Zy[e]||Zy.default,Qa=Object.freeze({aborted:Qi.red(In.cross),done:Qi.green(In.tick),exited:Qi.yellow(In.cross),default:Qi.cyan("?")}),D6=(e,t,n)=>t?Qa.aborted:n?Qa.exited:e?Qa.done:Qa.default,M6=e=>Qi.gray(e?In.ellipsis:In.pointerSmall),j6=(e,t)=>Qi.gray(e?t?In.pointerSmall:"+":In.line);SN.exports={styles:Zy,render:O6,symbols:Qa,symbol:D6,delimiter:M6,item:j6}});var xN=I((EJ,EN)=>{"use strict";var z6=ql();EN.exports=function(e,t){let n=String(z6(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var IN=I((xJ,AN)=>{"use strict";AN.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(JP.hide):this.out.write(_6(this.outputText,this.out.columns)),super.render(),this.outputText=[XP.symbol(this.done,this.aborted),YP.bold(this.msg),XP.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:YP.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(E6.line+JP.to(0)+this.outputText))}};tN.exports=Fy});var iN=I((bJ,nN)=>{"use strict";nN.exports={TextPrompt:VC(),SelectPrompt:HC(),TogglePrompt:QC(),DatePrompt:RP(),NumberPrompt:DP(),MultiselectPrompt:Dy(),AutocompletePrompt:GP(),AutocompleteMultiselectPrompt:KP(),ConfirmPrompt:rN()}});var aN=I(oN=>{"use strict";var Ye=oN,x6=iN(),Hl=e=>e;function Zt(e,t,n={}){return new Promise((i,r)=>{let o=new x6[e](t),a=n.onAbort||Hl,c=n.onSubmit||Hl,u=n.onExit||Hl;o.on("state",t.onState||Hl),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Ye.text=e=>Zt("TextPrompt",e);Ye.password=e=>(e.style="password",Ye.text(e));Ye.invisible=e=>(e.style="invisible",Ye.text(e));Ye.number=e=>Zt("NumberPrompt",e);Ye.date=e=>Zt("DatePrompt",e);Ye.confirm=e=>Zt("ConfirmPrompt",e);Ye.list=e=>{let t=e.separator||",";return Zt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Ye.toggle=e=>Zt("TogglePrompt",e);Ye.select=e=>Zt("SelectPrompt",e);Ye.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Zt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Ye.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Zt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var A6=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Ye.autocomplete=e=>(e.suggest=e.suggest||A6,e.choices=[].concat(e.choices||[]),Zt("AutocompletePrompt",e))});var fN=I((SJ,pN)=>{"use strict";function sN(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 cN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sN(Object(n),!0).forEach(function(i){I6(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function I6(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $6(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=T6(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 T6(e,t){if(e){if(typeof e=="string")return uN(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 uN(e,t)}}function uN(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 lN(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 dN(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){lN(o,i,r,a,c,"next",u)}function c(u){lN(o,i,r,a,c,"throw",u)}a(void 0)})}}var By=aN(),R6=["suggest","format","onState","validate","onRender","type"],mN=()=>{};function Lr(){return Vy.apply(this,arguments)}function Vy(){return Vy=dN(function*(e=[],{onSubmit:t=mN,onCancel:n=mN}={}){let i={},r=Lr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=(function(){var z=dN(function*(Se,fr,Ne=!1){if(!(!Ne&&Se.validate&&Se.validate(fr)!==!0))return Se.format?yield Se.format(fr,i):fr});return function(fr,Ne){return z.apply(this,arguments)}})();var g=$6(e),v;try{for(g.s();!(v=g.n()).done;){a=v.value;var A=a;if(u=A.name,l=A.type,typeof l=="function"&&(l=yield l(o,cN({},i),a),a.type=l),!!l){for(let z in a){if(R6.includes(z))continue;let Se=a[z];a[z]=typeof Se=="function"?yield Se(o,cN({},i),m):Se}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");var Y=a;if(u=Y.name,l=Y.type,By[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=Lr._injected?C6(Lr._injected,a.initial):yield By[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(z){g.e(z)}finally{g.f()}return i}),Vy.apply(this,arguments)}function C6(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function P6(e){Lr._injected=(Lr._injected||[]).concat(e)}function N6(e){Lr._override=Object.assign({},e)}pN.exports=Object.assign(Lr,{prompt:Lr,prompts:By,inject:P6,override:N6})});var hN=I((_J,gN)=>{"use strict";gN.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 ql=I((EJ,vN)=>{"use strict";vN.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 SN=I((xJ,yN)=>{"use strict";var w6=ql(),{erase:bN,cursor:k6}=ae(),O6=e=>[...w6(e)].length;yN.exports=function(e,t){if(!t)return bN.line+k6.to(0);let n=0,i=e.split(/\r?\n/);for(let r of i)n+=1+Math.floor(Math.max(O6(r)-1,0)/t);return bN.lines(n)}});var Zy=I((AJ,_N)=>{"use strict";var Qa={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},D6={arrowUp:Qa.arrowUp,arrowDown:Qa.arrowDown,arrowLeft:Qa.arrowLeft,arrowRight:Qa.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},M6=process.platform==="win32"?D6:Qa;_N.exports=M6});var xN=I((IJ,EN)=>{"use strict";var Qi=oe(),$n=Zy(),Gy=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}`}}),j6=e=>Gy[e]||Gy.default,es=Object.freeze({aborted:Qi.red($n.cross),done:Qi.green($n.tick),exited:Qi.yellow($n.cross),default:Qi.cyan("?")}),z6=(e,t,n)=>t?es.aborted:n?es.exited:e?es.done:es.default,L6=e=>Qi.gray(e?$n.ellipsis:$n.pointerSmall),U6=(e,t)=>Qi.gray(e?t?$n.pointerSmall:"+":$n.line);EN.exports={styles:Gy,render:j6,symbols:es,symbol:z6,delimiter:L6,item:U6}});var IN=I(($J,AN)=>{"use strict";var F6=ql();AN.exports=function(e,t){let n=String(F6(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var TN=I((TJ,$N)=>{"use strict";$N.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 TN=I((AJ,$N)=>{"use strict";$N.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 It=I((IJ,RN)=>{"use strict";RN.exports={action:fN(),clear:bN(),style:_N(),strip:ql(),figures:Vy(),lines:xN(),wrap:IN(),entriesToDisplay:TN()}});var dr=I(($J,CN)=>{"use strict";var PN=rs("readline"),{action:L6}=It(),U6=rs("events"),{beep:F6,cursor:B6}=ae(),V6=oe(),Gy=class extends U6{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=PN.createInterface({input:this.in,escapeCodeTimeout:50});PN.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=L6(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(B6.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(F6)}render(){this.onRender(V6),this.firstRender&&(this.firstRender=!1)}};CN.exports=Gy});var wN=I((TJ,NN)=>{var Kl=oe(),Z6=dr(),{erase:G6,cursor:es}=ae(),{style:Wy,clear:Hy,lines:W6,figures:H6}=It(),qy=class extends Z6{constructor(t={}){super(t),this.transform=Wy.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=Hy("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=Kl.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 CN=I((RJ,RN)=>{"use strict";RN.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 It=I((CJ,PN)=>{"use strict";PN.exports={action:hN(),clear:SN(),style:xN(),strip:ql(),figures:Zy(),lines:IN(),wrap:TN(),entriesToDisplay:CN()}});var dr=I((PJ,wN)=>{"use strict";var NN=ns("readline"),{action:B6}=It(),V6=ns("events"),{beep:Z6,cursor:G6}=ae(),W6=oe(),Wy=class extends V6{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=NN.createInterface({input:this.in,escapeCodeTimeout:50});NN.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=B6(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(G6.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(Z6)}render(){this.onRender(W6),this.firstRender&&(this.firstRender=!1)}};wN.exports=Wy});var ON=I((NJ,kN)=>{var Kl=oe(),H6=dr(),{erase:q6,cursor:ts}=ae(),{style:Hy,clear:qy,lines:K6,figures:Y6}=It(),Ky=class extends H6{constructor(t={}){super(t),this.transform=Hy.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=qy("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=Kl.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(es.down(W6(this.outputError,this.out.columns)-1)+Hy(this.outputError,this.out.columns)),this.out.write(Hy(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Wy.symbol(this.done,this.aborted),Kl.bold(this.msg),Wy.delimiter(this.done),this.red?Kl.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(ts.down(K6(this.outputError,this.out.columns)-1)+qy(this.outputError,this.out.columns)),this.out.write(qy(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Hy.symbol(this.done,this.aborted),Kl.bold(this.msg),Hy.delimiter(this.done),this.red?Kl.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
58
58
  `).reduce((t,n,i)=>t+`
59
- ${i?" ":H6.pointerSmall} ${Kl.red().italic(n)}`,"")),this.out.write(G6.line+es.to(0)+this.outputText+es.save+this.outputError+es.restore+es.move(this.cursorOffset,0)))}};NN.exports=qy});var MN=I((RJ,DN)=>{"use strict";var mr=oe(),q6=dr(),{style:kN,clear:ON,figures:Yl,wrap:K6,entriesToDisplay:Y6}=It(),{cursor:X6}=ae(),Ky=class extends q6{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=ON("",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?" ":Y6.pointerSmall} ${Kl.red().italic(n)}`,"")),this.out.write(q6.line+ts.to(0)+this.outputText+ts.save+this.outputError+ts.restore+ts.move(this.cursorOffset,0)))}};kN.exports=Ky});var zN=I((wJ,jN)=>{"use strict";var mr=oe(),X6=dr(),{style:DN,clear:MN,figures:Yl,wrap:J6,entriesToDisplay:Q6}=It(),{cursor:eF}=ae(),Yy=class extends X6{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=MN("",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(X6.hide):this.out.write(ON(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=Y6(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[kN.symbol(this.done,this.aborted),mr.bold(this.msg),kN.delimiter(!1),this.done?this.selection.title:this.selection.disabled?mr.yellow(this.warn):mr.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(eF.hide):this.out.write(MN(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=Q6(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[DN.symbol(this.done,this.aborted),mr.bold(this.msg),DN.delimiter(!1),this.done?this.selection.title:this.selection.disabled?mr.yellow(this.warn):mr.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=Yl.arrowUp:i===n-1&&n<this.choices.length?o=Yl.arrowDown:o=" ",c.disabled?(r=this.cursor===i?mr.gray().underline(c.title):mr.strikethrough().gray(c.title),o=(this.cursor===i?mr.bold().gray(Yl.pointer)+" ":" ")+o):(r=this.cursor===i?mr.cyan().underline(c.title):c.title,o=(this.cursor===i?mr.cyan(Yl.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
- `+K6(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${mr.gray(a)}
64
- `}}this.out.write(this.outputText)}};DN.exports=Ky});var UN=I((PJ,LN)=>{var Xl=oe(),J6=dr(),{style:jN,clear:Q6}=It(),{cursor:zN,erase:eF}=ae(),Yy=class extends J6{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
+ `+J6(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${mr.gray(a)}
64
+ `}}this.out.write(this.outputText)}};jN.exports=Yy});var BN=I((kJ,FN)=>{var Xl=oe(),tF=dr(),{style:LN,clear:rF}=It(),{cursor:UN,erase:nF}=ae(),Xy=class extends tF{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(zN.hide):this.out.write(Q6(this.outputText,this.out.columns)),super.render(),this.outputText=[jN.symbol(this.done,this.aborted),Xl.bold(this.msg),jN.delimiter(this.done),this.value?this.inactive:Xl.cyan().underline(this.inactive),Xl.gray("/"),this.value?Xl.cyan().underline(this.active):this.active].join(" "),this.out.write(eF.line+zN.to(0)+this.outputText))}};LN.exports=Yy});var Gt=I((CJ,FN)=>{"use strict";var Xy=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)}};FN.exports=Xy});var VN=I((NJ,BN)=>{"use strict";var tF=Gt(),Jy=class extends tF{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}};BN.exports=Jy});var GN=I((wJ,ZN)=>{"use strict";var rF=Gt(),nF=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),Qy=class extends rF{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+nF(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};ZN.exports=Qy});var HN=I((kJ,WN)=>{"use strict";var iF=Gt(),eS=class extends iF{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}};WN.exports=eS});var KN=I((OJ,qN)=>{"use strict";var oF=Gt(),tS=class extends oF{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)}};qN.exports=tS});var XN=I((DJ,YN)=>{"use strict";var aF=Gt(),rS=class extends aF{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}};YN.exports=rS});var QN=I((MJ,JN)=>{"use strict";var sF=Gt(),nS=class extends sF{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)}};JN.exports=nS});var tw=I((jJ,ew)=>{"use strict";var cF=Gt(),iS=class extends cF{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}};ew.exports=iS});var nw=I((zJ,rw)=>{"use strict";var uF=Gt(),oS=class extends uF{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}};rw.exports=oS});var ow=I((LJ,iw)=>{"use strict";iw.exports={DatePart:Gt(),Meridiem:VN(),Day:GN(),Hours:HN(),Milliseconds:KN(),Minutes:XN(),Month:QN(),Seconds:tw(),Year:nw()}});var mw=I((UJ,dw)=>{"use strict";var aS=oe(),lF=dr(),{style:aw,clear:sw,figures:dF}=It(),{erase:mF,cursor:cw}=ae(),{DatePart:uw,Meridiem:pF,Day:fF,Hours:gF,Milliseconds:hF,Minutes:vF,Month:bF,Seconds:yF,Year:SF}=ow(),_F=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,lw={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new fF(e),3:e=>new bF(e),4:e=>new SF(e),5:e=>new pF(e),6:e=>new gF(e),7:e=>new vF(e),8:e=>new yF(e),9:e=>new hF(e)},EF={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(",")},sS=class extends lF{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(EF,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=sw("",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=_F.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in lw?lw[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 uw)),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(UN.hide):this.out.write(rF(this.outputText,this.out.columns)),super.render(),this.outputText=[LN.symbol(this.done,this.aborted),Xl.bold(this.msg),LN.delimiter(this.done),this.value?this.inactive:Xl.cyan().underline(this.inactive),Xl.gray("/"),this.value?Xl.cyan().underline(this.active):this.active].join(" "),this.out.write(nF.line+UN.to(0)+this.outputText))}};FN.exports=Xy});var Gt=I((OJ,VN)=>{"use strict";var Jy=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)}};VN.exports=Jy});var GN=I((DJ,ZN)=>{"use strict";var iF=Gt(),Qy=class extends iF{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}};ZN.exports=Qy});var HN=I((MJ,WN)=>{"use strict";var oF=Gt(),aF=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),eS=class extends oF{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+aF(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};WN.exports=eS});var KN=I((jJ,qN)=>{"use strict";var sF=Gt(),tS=class extends sF{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}};qN.exports=tS});var XN=I((zJ,YN)=>{"use strict";var cF=Gt(),rS=class extends cF{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)}};YN.exports=rS});var QN=I((LJ,JN)=>{"use strict";var uF=Gt(),nS=class extends uF{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}};JN.exports=nS});var tw=I((UJ,ew)=>{"use strict";var lF=Gt(),iS=class extends lF{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)}};ew.exports=iS});var nw=I((FJ,rw)=>{"use strict";var dF=Gt(),oS=class extends dF{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}};rw.exports=oS});var ow=I((BJ,iw)=>{"use strict";var mF=Gt(),aS=class extends mF{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}};iw.exports=aS});var sw=I((VJ,aw)=>{"use strict";aw.exports={DatePart:Gt(),Meridiem:GN(),Day:HN(),Hours:KN(),Milliseconds:XN(),Minutes:QN(),Month:tw(),Seconds:nw(),Year:ow()}});var fw=I((ZJ,pw)=>{"use strict";var sS=oe(),pF=dr(),{style:cw,clear:uw,figures:fF}=It(),{erase:gF,cursor:lw}=ae(),{DatePart:dw,Meridiem:hF,Day:vF,Hours:bF,Milliseconds:yF,Minutes:SF,Month:_F,Seconds:EF,Year:xF}=sw(),AF=/\\(.)|"((?:\\["\\]|[^"])+)"|(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,mw={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new vF(e),3:e=>new _F(e),4:e=>new xF(e),5:e=>new hF(e),6:e=>new bF(e),7:e=>new SF(e),8:e=>new EF(e),9:e=>new yF(e)},IF={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(",")},cS=class extends pF{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(IF,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=uw("",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=AF.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in mw?mw[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 dw)),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 uw)),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(cw.hide):this.out.write(sw(this.outputText,this.out.columns)),super.render(),this.outputText=[aw.symbol(this.done,this.aborted),aS.bold(this.msg),aw.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?aS.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 dw)),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(lw.hide):this.out.write(uw(this.outputText,this.out.columns)),super.render(),this.outputText=[cw.symbol(this.done,this.aborted),sS.bold(this.msg),cw.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?sS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
69
69
  `).reduce((t,n,i)=>t+`
70
- ${i?" ":dF.pointerSmall} ${aS.red().italic(n)}`,"")),this.out.write(mF.line+cw.to(0)+this.outputText))}};dw.exports=sS});var hw=I((FJ,gw)=>{var Jl=oe(),xF=dr(),{cursor:Ql,erase:AF}=ae(),{style:cS,figures:IF,clear:pw,lines:$F}=It(),TF=/[0-9]/,uS=e=>e!==void 0,fw=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},lS=class extends xF{constructor(t={}){super(t),this.transform=cS.render(t.style),this.msg=t.message,this.initial=uS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=uS(t.min)?t.min:-1/0,this.max=uS(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=Jl.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${fw(t,this.round)}`),this._value=fw(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||TF.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?" ":fF.pointerSmall} ${sS.red().italic(n)}`,"")),this.out.write(gF.line+lw.to(0)+this.outputText))}};pw.exports=cS});var bw=I((GJ,vw)=>{var Jl=oe(),$F=dr(),{cursor:Ql,erase:TF}=ae(),{style:uS,figures:RF,clear:gw,lines:CF}=It(),PF=/[0-9]/,lS=e=>e!==void 0,hw=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},dS=class extends $F{constructor(t={}){super(t),this.transform=uS.render(t.style),this.msg=t.message,this.initial=lS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=lS(t.min)?t.min:-1/0,this.max=lS(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=Jl.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${hw(t,this.round)}`),this._value=hw(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||PF.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(Ql.down($F(this.outputError,this.out.columns)-1)+pw(this.outputError,this.out.columns)),this.out.write(pw(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[cS.symbol(this.done,this.aborted),Jl.bold(this.msg),cS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Jl[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(Ql.down(CF(this.outputError,this.out.columns)-1)+gw(this.outputError,this.out.columns)),this.out.write(gw(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[uS.symbol(this.done,this.aborted),Jl.bold(this.msg),uS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?Jl[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
73
73
  `).reduce((t,n,i)=>t+`
74
- ${i?" ":IF.pointerSmall} ${Jl.red().italic(n)}`,"")),this.out.write(AF.line+Ql.to(0)+this.outputText+Ql.save+this.outputError+Ql.restore))}};gw.exports=lS});var mS=I((BJ,yw)=>{"use strict";var Wt=oe(),{cursor:RF}=ae(),PF=dr(),{clear:vw,figures:Ur,style:bw,wrap:CF,entriesToDisplay:NF}=It(),dS=class extends PF{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=vw("",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?" ":RF.pointerSmall} ${Jl.red().italic(n)}`,"")),this.out.write(TF.line+Ql.to(0)+this.outputText+Ql.save+this.outputError+Ql.restore))}};vw.exports=dS});var pS=I((WJ,_w)=>{"use strict";var Wt=oe(),{cursor:NF}=ae(),wF=dr(),{clear:yw,figures:Ur,style:Sw,wrap:kF,entriesToDisplay:OF}=It(),mS=class extends wF{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=yw("",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,15 +79,15 @@ Instructions:
79
79
  ${Ur.arrowLeft}/${Ur.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?Wt.green(Ur.radioOn):Ur.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?Wt.gray().underline(n.title):Wt.strikethrough().gray(n.title):(a=t===i?Wt.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
- `+CF(n.description,{margin:o.length,width:this.out.columns})))),o+a+Wt.gray(c||"")}paginateOptions(t){if(t.length===0)return Wt.red("No matches for this query.");let{startIndex:n,endIndex:i}=NF(this.cursor,t.length,this.optionsPerPage),r,o=[];for(let a=n;a<i;a++)a===n&&n>0?r=Ur.arrowUp:a===i-1&&i<t.length?r=Ur.arrowDown:r=" ",o.push(this.renderOption(this.cursor,t[a],a,r));return`
82
+ `+kF(n.description,{margin:o.length,width:this.out.columns})))),o+a+Wt.gray(c||"")}paginateOptions(t){if(t.length===0)return Wt.red("No matches for this query.");let{startIndex:n,endIndex:i}=OF(this.cursor,t.length,this.optionsPerPage),r,o=[];for(let a=n;a<i;a++)a===n&&n>0?r=Ur.arrowUp:a===i-1&&i<t.length?r=Ur.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=[Wt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Wt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(RF.hide),super.render();let t=[bw.symbol(this.done,this.aborted),Wt.bold(this.msg),bw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Wt.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=vw(t,this.out.columns)}};yw.exports=dS});var Aw=I((VJ,xw)=>{"use strict";var ts=oe(),wF=dr(),{erase:kF,cursor:Sw}=ae(),{style:pS,clear:_w,figures:fS,wrap:OF,entriesToDisplay:DF}=It(),Ew=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),MF=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),jF=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},gS=class extends wF{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:jF(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=pS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=_w("",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=Ew(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:MF(c,a),value:Ew(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=[Wt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Wt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(NF.hide),super.render();let t=[Sw.symbol(this.done,this.aborted),Wt.bold(this.msg),Sw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Wt.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=yw(t,this.out.columns)}};_w.exports=mS});var $w=I((HJ,Iw)=>{"use strict";var rs=oe(),DF=dr(),{erase:MF,cursor:Ew}=ae(),{style:fS,clear:xw,figures:gS,wrap:jF,entriesToDisplay:zF}=It(),Aw=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),LF=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),UF=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},hS=class extends DF{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:UF(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=fS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=xw("",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=Aw(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:LF(c,a),value:Aw(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?fS.arrowUp:r?fS.arrowDown:" ",c=n?ts.cyan().underline(t.title):t.title;return a=(n?ts.cyan(fS.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
- `+OF(t.description,{margin:3,width:this.out.columns}))),a+" "+c+ts.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Sw.hide):this.out.write(_w(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=DF(this.select,this.choices.length,this.limit);if(this.outputText=[pS.symbol(this.done,this.aborted,this.exited),ts.bold(this.msg),pS.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?gS.arrowUp:r?gS.arrowDown:" ",c=n?rs.cyan().underline(t.title):t.title;return a=(n?rs.cyan(gS.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
+ `+jF(t.description,{margin:3,width:this.out.columns}))),a+" "+c+rs.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(Ew.hide):this.out.write(xw(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=zF(this.select,this.choices.length,this.limit);if(this.outputText=[fS.symbol(this.done,this.aborted,this.exited),rs.bold(this.msg),fS.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||ts.gray(this.fallback.title))}this.out.write(kF.line+Sw.to(0)+this.outputText)}};xw.exports=gS});var Rw=I((ZJ,Tw)=>{"use strict";var pr=oe(),{cursor:zF}=ae(),LF=mS(),{clear:Iw,style:$w,figures:eo}=It(),hS=class extends LF{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=Iw("",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||rs.gray(this.fallback.title))}this.out.write(MF.line+Ew.to(0)+this.outputText)}};Iw.exports=hS});var Pw=I((qJ,Cw)=>{"use strict";var pr=oe(),{cursor:FF}=ae(),BF=pS(),{clear:Tw,style:Rw,figures:eo}=It(),vS=class extends BF{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=Tw("",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
92
  ${eo.arrowUp}/${eo.arrowDown}: Highlight option
93
93
  ${eo.arrowLeft}/${eo.arrowRight}/[space]: Toggle selection
@@ -95,12 +95,12 @@ Instructions:
95
95
  enter/return: Complete answer
96
96
  `:""}renderCurrentInput(){return`
97
97
  Filtered results for: ${this.inputValue?this.inputValue:pr.gray("Enter something to filter")}
98
- `}renderOption(t,n,i){let r;return n.disabled?r=t===i?pr.gray().underline(n.title):pr.strikethrough().gray(n.title):r=t===i?pr.cyan().underline(n.title):n.title,(n.selected?pr.green(eo.radioOn):eo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[pr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(pr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(zF.hide),super.render();let t=[$w.symbol(this.done,this.aborted),pr.bold(this.msg),$w.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=pr.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=Iw(t,this.out.columns)}};Tw.exports=hS});var kw=I((GJ,ww)=>{var Pw=oe(),UF=dr(),{style:Cw,clear:FF}=It(),{erase:BF,cursor:Nw}=ae(),vS=class extends UF{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?pr.gray().underline(n.title):pr.strikethrough().gray(n.title):r=t===i?pr.cyan().underline(n.title):n.title,(n.selected?pr.green(eo.radioOn):eo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[pr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(pr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(FF.hide),super.render();let t=[Rw.symbol(this.done,this.aborted),pr.bold(this.msg),Rw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=pr.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=Tw(t,this.out.columns)}};Cw.exports=vS});var Dw=I((KJ,Ow)=>{var Nw=oe(),VF=dr(),{style:ww,clear:ZF}=It(),{erase:GF,cursor:kw}=ae(),bS=class extends VF{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(Nw.hide):this.out.write(FF(this.outputText,this.out.columns)),super.render(),this.outputText=[Cw.symbol(this.done,this.aborted),Pw.bold(this.msg),Cw.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Pw.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(BF.line+Nw.to(0)+this.outputText))}};ww.exports=vS});var Dw=I((WJ,Ow)=>{"use strict";Ow.exports={TextPrompt:wN(),SelectPrompt:MN(),TogglePrompt:UN(),DatePrompt:mw(),NumberPrompt:hw(),MultiselectPrompt:mS(),AutocompletePrompt:Aw(),AutocompleteMultiselectPrompt:Rw(),ConfirmPrompt:kw()}});var jw=I(Mw=>{"use strict";var Xe=Mw,VF=Dw(),ed=e=>e;function Ht(e,t,n={}){return new Promise((i,r)=>{let o=new VF[e](t),a=n.onAbort||ed,c=n.onSubmit||ed,u=n.onExit||ed;o.on("state",t.onState||ed),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Xe.text=e=>Ht("TextPrompt",e);Xe.password=e=>(e.style="password",Xe.text(e));Xe.invisible=e=>(e.style="invisible",Xe.text(e));Xe.number=e=>Ht("NumberPrompt",e);Xe.date=e=>Ht("DatePrompt",e);Xe.confirm=e=>Ht("ConfirmPrompt",e);Xe.list=e=>{let t=e.separator||",";return Ht("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Xe.toggle=e=>Ht("TogglePrompt",e);Xe.select=e=>Ht("SelectPrompt",e);Xe.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Ht("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Xe.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Ht("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var ZF=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Xe.autocomplete=e=>(e.suggest=e.suggest||ZF,e.choices=[].concat(e.choices||[]),Ht("AutocompletePrompt",e))});var Uw=I((qJ,Lw)=>{"use strict";var bS=jw(),GF=["suggest","format","onState","validate","onRender","type"],zw=()=>{};async function Fr(e=[],{onSubmit:t=zw,onCancel:n=zw}={}){let i={},r=Fr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=async(g,v,A=!1)=>{if(!(!A&&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(GF.includes(g))continue;let v=a[g];a[g]=typeof v=="function"?await v(o,{...i},m):v}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=a,bS[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=Fr._injected?WF(Fr._injected,a.initial):await bS[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 WF(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function HF(e){Fr._injected=(Fr._injected||[]).concat(e)}function qF(e){Fr._override=Object.assign({},e)}Lw.exports=Object.assign(Fr,{prompt:Fr,prompts:bS,inject:HF,override:qF})});var Bw=I((KJ,Fw)=>{function KF(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}Fw.exports=KF("8.6.0")?mN():Uw()});import{join as ht,dirname as AS,normalize as rk}from"node:path";import{readFileSync as nk,existsSync as ik}from"node:fs";var tk=Object.defineProperty,we=(e,t)=>tk(e,"name",{value:t,configurable:!0}),Br="fjall";function Vr(e,t){let n=rk(e);if(n.includes("..")||n.startsWith("/"))throw new Error(`Invalid ${t}: path traversal is not allowed`)}we(Vr,"assertNoTraversal");function ok(){return Br}we(ok,"getFjallPath");function ak(e){let t=AS(e);return AS(t)||"."}we(ak,"getProjectRoot");function IS(e){if(!ik(e))throw new Error(`Infrastructure file not found: ${e}`);let t=nk(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]}we(IS,"getAppNameFromInfrastructure");function sk(e){let t=ht(e,nd);return IS(t)}we(sk,"getAppName");function qt(e){return Vr(e,"app name"),ht(Br,e,nd)}we(qt,"getInfrastructurePath");function ck(e){return Vr(e,"app name"),ht(Br,e)}we(ck,"getAppPath");function uk(e){return Vr(e,"component name"),ht(Br,e)}we(uk,"getOrganisationComponentPath");function lk(e){return Vr(e,"deployment type"),ht(Br,e,"logs")}we(lk,"getDeploymentLogsPath");function dk(e){return Vr(e,"deployment type"),ht(Br,e,"logs","cloudformation")}we(dk,"getCloudFormationLogsPath");function $S(){return ht(Br,"domains")}we($S,"getDomainsDir");function rd(e){return Vr(e,"domain name"),ht($S(),e)}we(rd,"getDomainComponentPath");function mk(e){return ht(rd(e),nd)}we(mk,"getDomainInfrastructurePath");function pk(e){return ht(rd(e),fk)}we(pk,"getDomainZoneFilePath");var nd="infrastructure.ts",fk="zone.bind",gk="cdk.out";function hk(e){return ht(e,gk)}we(hk,"getCdkOutPath");var vk=Object.defineProperty,Tn=(e,t)=>vk(e,"name",{value:t,configurable:!0});function id(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Tn(id,"escapeRegExp");function Zr(e,t,n){let i=qt(t),r=e.read(i)?.toString();return r?new RegExp(`["']${id(n)}["']`).test(r):!1}Tn(Zr,"resourceExists");function to(e,t,n){let i=qt(t);if(!e.read(i)?.toString())throw new Error(`Infrastructure file not found for ${t}`);if(Zr(e,t,n))throw new Error(`Resource name '${n}' already exists in ${t}. Please choose a different name or remove the existing resource first.`)}Tn(to,"assertResourceNameUnique");function od(e,t,n){let i=qt(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}Tn(od,"countResourcesOfType");function bk(e,t){let n=qt(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 m=u.includes("connections:"),p=[];if(m){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:m,connectedResources:p})}return r}Tn(bk,"detectComputeResources");function yk(e,t,n){let i=qt(t),r=e.read(i)?.toString();return r?new RegExp(`databaseName:\\s*["']${id(n)}["']`).test(r):!1}Tn(yk,"databaseExists");import*as Ki from"fs";import*as oP from"path";var Sk=Object.defineProperty,gr=(e,t)=>Sk(e,"name",{value:t,configurable:!0});function Fe(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase()).replace(/^./,t=>t.toUpperCase())}gr(Fe,"toPascalCase");function Tt(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()}gr(Tt,"toKebab");function Rn(e){return Tt(e).replace(/-/g,"_")}gr(Rn,"toValidDatabaseName");function TS(e){return Tt(e).replace(/-/g,"_").toUpperCase()}gr(TS,"toScreamingSnake");function RS(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}gr(RS,"capitalise");function PS(e){return e.split(".").join("")}gr(PS,"getSafeZoneName");function Gr(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}gr(Gr,"accountConstructKey");function CS(e){let t=e.replace(new RegExp("\\P{ASCII}","gu"),"");return Gr(t)===Gr(e)&&Gr(e)!==""}gr(CS,"hasAsciiStableConstructKey");var _k=Object.defineProperty,ns=(e,t)=>_k(e,"name",{value:t,configurable:!0});function is(e){return`${Fe(e.split(".").join(""))}Domain`}ns(is,"getDomainStackName");function NS(e){return`${e}UsEast1Certificates`}ns(NS,"getDomainUsEast1CertificatesStackName");function ad(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`}}ns(ad,"getDomainExportNames");function wS(e){return typeof e.hostedZoneId=="string"}ns(wS,"isManagedDomainBinding");var Ek=Object.defineProperty,xk=(e,t)=>Ek(e,"name",{value:t,configurable:!0});function kS(e){return`${Fe(e)}ImageTag`}xk(kS,"imageTagParameterName");var Ak=Object.defineProperty,Ik=(e,t)=>Ak(e,"name",{value:t,configurable:!0});function OS(e){let t=new Map;for(let n of e){let i=Gr(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}Ik(OS,"findAccountNameCollision");var $k=Object.defineProperty,ro=(e,t)=>$k(e,"name",{value:t,configurable:!0}),Pn="us-east-2";var it=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}]),Kt=Object.freeze(it.map(e=>e.code)),os=new Set(it.filter(e=>e.optIn).map(e=>e.code));function as(e){return`${e} is an opt-in region: it must be enabled in the AWS account (Account settings \u2192 Regions) before deployment will succeed.`}ro(as,"optInRegionWarning");function Cn(e){return it.find(t=>t.code===e)}ro(Cn,"getRegionInfo");function Nn(e){let t=e.split("-");return t.length===3&&t[0]&&t[1]&&t[2]?`${t[0]}${t[1][0]}${t[2]}`:e}ro(Nn,"abbreviateRegion");var Tk=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"}),Rk=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"}),Pk=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 sd(e){return os.has(e)?Pk[e]??Pn:e}ro(sd,"toDeployableRegion");function ss(e){if(!e)return;let t=Tk[e];if(t!==void 0)return sd(t);let n=e.split("/")[0];if(n===void 0)return;let i=Rk[n];return i===void 0?void 0:sd(i)}ro(ss,"suggestRegionForTimezone");var Ck=Object.defineProperty,no=(e,t)=>Ck(e,"name",{value:t,configurable:!0});function cs(e){return Tt(e).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}no(cs,"slugifyAccountName");function DS(e,t){let n=cs(e),i=cs(t);return n===""?i:i===""?n:`${n}-${i}`}no(DS,"defaultConnectedAccountName");function MS(e,t){let n=cs(t);return n===""?e:`${e}-${n}`}no(MS,"suffixedAccountName");var jS=new Set(it.map(e=>Nn(e.code)));function zS(e){let t=e.toLowerCase().split(/[-\s_]+/).filter(i=>i.length>0),n=t[t.length-1];if(n!==void 0&&jS.has(n))return n}no(zS,"findTrailingRegionShortCode");function LS(e){return`Account name must not end with a region code ("-${e}") \u2014 the region is added automatically when deploying. Remove the "-${e}" suffix.`}no(LS,"regionSuffixRejectionMessage");var Nk=Object.defineProperty,wn=(e,t)=>Nk(e,"name",{value:t,configurable:!0});function vt(e){return e instanceof Error?e:new Error(String(e))}wn(vt,"normaliseError");function Rt(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"}wn(Rt,"getErrorMessage");function us(e,t){return!e||typeof e!="object"?!1:"code"in e&&e.code===t}wn(us,"hasErrorCode");function io(e){if(!(!e||typeof e!="object")&&"code"in e&&typeof e.code=="string")return e.code}wn(io,"getErrorCode");function ls(e){return e instanceof Error?e.stack:void 0}wn(ls,"getErrorStack");function ds(e){let t=Rt(e),n=io(e);return n&&n!=="UNKNOWN_ERROR"?`[${n}] ${t}`:t}wn(ds,"formatErrorString");var wk=Object.defineProperty,kk=(e,t)=>wk(e,"name",{value:t,configurable:!0});function US(e){let t,n=!1;return()=>(n||(t=e(),n=!0),t)}kk(US,"singleton");var Ok=Object.defineProperty,cd=(e,t)=>Ok(e,"name",{value:t,configurable:!0}),FS=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 BS(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!FS.has(t.toUpperCase())))}cd(BS,"filterDangerousEnvVars");var Dk=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g;function kn(e){return e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,"$1***$2").replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,"$1$2***").replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,"$1***").replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,"$1_$2_***").replace(/\bwhsec_[A-Za-z0-9]{8,}/g,"whsec_***").replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"***").replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,"$1***").replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,"***").replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,"***").replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,"***").replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,"***").replace(Dk,"$1***")}cd(kn,"maskSensitiveOutput");function VS(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}cd(VS,"parseShellArgs");var Mk=Object.defineProperty,jk=(e,t)=>Mk(e,"name",{value:t,configurable:!0}),zk=jk(e=>new Promise(t=>setTimeout(t,e)),"sleep");var Lk=Object.defineProperty,ZS=(e,t)=>Lk(e,"name",{value:t,configurable:!0});async function GS(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=ZS(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}ZS(GS,"mapSettledWithConcurrency");var s={};$t(s,{$brand:()=>ld,$input:()=>Np,$output:()=>Cp,NEVER:()=>ud,TimePrecision:()=>Dp,ZodAny:()=>Ig,ZodArray:()=>Pg,ZodBase64:()=>zc,ZodBase64URL:()=>Lc,ZodBigInt:()=>li,ZodBigIntFormat:()=>Bc,ZodBoolean:()=>ui,ZodCIDRv4:()=>Mc,ZodCIDRv6:()=>jc,ZodCUID:()=>Pc,ZodCUID2:()=>Cc,ZodCatch:()=>Xg,ZodCodec:()=>jo,ZodCustom:()=>zo,ZodCustomStringFormat:()=>si,ZodDate:()=>wo,ZodDefault:()=>Gg,ZodDiscriminatedUnion:()=>Ng,ZodE164:()=>Uc,ZodEmail:()=>$c,ZodEmoji:()=>Tc,ZodEnum:()=>oi,ZodError:()=>h1,ZodExactOptional:()=>Bg,ZodFile:()=>Ug,ZodFirstPartyTypeKind:()=>lh,ZodFunction:()=>sh,ZodGUID:()=>To,ZodIPv4:()=>Oc,ZodIPv6:()=>Dc,ZodISODate:()=>Sc,ZodISODateTime:()=>yc,ZodISODuration:()=>Ec,ZodISOTime:()=>_c,ZodIntersection:()=>wg,ZodIssueCode:()=>b1,ZodJWT:()=>Fc,ZodKSUID:()=>kc,ZodLazy:()=>ih,ZodLiteral:()=>Lg,ZodMAC:()=>bg,ZodMap:()=>jg,ZodNaN:()=>Qg,ZodNanoID:()=>Rc,ZodNever:()=>Tg,ZodNonOptional:()=>qc,ZodNull:()=>xg,ZodNullable:()=>Zg,ZodNumber:()=>ci,ZodNumberFormat:()=>en,ZodObject:()=>Oo,ZodOptional:()=>Hc,ZodPipe:()=>Mo,ZodPrefault:()=>Hg,ZodPreprocess:()=>eh,ZodPromise:()=>ah,ZodReadonly:()=>th,ZodRealError:()=>Ze,ZodRecord:()=>ii,ZodSet:()=>zg,ZodString:()=>ai,ZodStringFormat:()=>K,ZodSuccess:()=>Yg,ZodSymbol:()=>_g,ZodTemplateLiteral:()=>nh,ZodTransform:()=>Fg,ZodTuple:()=>Og,ZodType:()=>w,ZodULID:()=>Nc,ZodURL:()=>No,ZodUUID:()=>wt,ZodUndefined:()=>Eg,ZodUnion:()=>Do,ZodUnknown:()=>$g,ZodVoid:()=>Rg,ZodXID:()=>wc,ZodXor:()=>Cg,_ZodString:()=>Ic,_default:()=>Wg,_function:()=>kx,any:()=>lx,array:()=>ko,base64:()=>HE,base64url:()=>qE,bigint:()=>ox,boolean:()=>Sg,catch:()=>Jg,check:()=>Ox,cidrv4:()=>GE,cidrv6:()=>WE,clone:()=>ke,codec:()=>Px,coerce:()=>dh,config:()=>se,core:()=>Jt,cuid:()=>jE,cuid2:()=>zE,custom:()=>Dx,date:()=>mx,decode:()=>dg,decodeAsync:()=>pg,describe:()=>Mx,discriminatedUnion:()=>bx,e164:()=>KE,email:()=>TE,emoji:()=>DE,encode:()=>lg,encodeAsync:()=>mg,endsWith:()=>qn,enum:()=>Gc,exactOptional:()=>Vg,file:()=>Ix,flattenError:()=>po,float32:()=>tx,float64:()=>rx,formatError:()=>fo,fromJSONSchema:()=>Vx,function:()=>kx,getErrorMap:()=>S1,globalRegistry:()=>_e,gt:()=>Ct,gte:()=>De,guid:()=>RE,hash:()=>ex,hex:()=>QE,hostname:()=>JE,httpUrl:()=>OE,includes:()=>Wn,instanceof:()=>zx,int:()=>xc,int32:()=>nx,int64:()=>ax,intersection:()=>kg,invertCodec:()=>Cx,ipv4:()=>BE,ipv6:()=>ZE,iso:()=>ni,json:()=>Ux,jwt:()=>YE,keyof:()=>px,ksuid:()=>FE,lazy:()=>oh,length:()=>Jr,literal:()=>Ax,locales:()=>Eo,looseObject:()=>hx,looseRecord:()=>Sx,lowercase:()=>Zn,lt:()=>Pt,lte:()=>Qe,mac:()=>VE,map:()=>_x,maxLength:()=>Xr,maxSize:()=>Er,meta:()=>jx,mime:()=>Kn,minLength:()=>Xt,minSize:()=>Nt,multipleOf:()=>_r,nan:()=>Rx,nanoid:()=>ME,nativeEnum:()=>xx,negative:()=>uc,never:()=>Vc,nonnegative:()=>dc,nonoptional:()=>Kg,nonpositive:()=>lc,normalize:()=>Yn,null:()=>Ag,nullable:()=>Po,nullish:()=>$x,number:()=>yg,object:()=>fx,optional:()=>Ro,overwrite:()=>yt,parse:()=>ag,parseAsync:()=>sg,partialRecord:()=>yx,pipe:()=>Ac,positive:()=>cc,prefault:()=>qg,preprocess:()=>Fx,prettifyError:()=>xd,promise:()=>wx,property:()=>mc,readonly:()=>rh,record:()=>Mg,refine:()=>ch,regex:()=>Vn,regexes:()=>Je,registry:()=>Fs,safeDecode:()=>gg,safeDecodeAsync:()=>vg,safeEncode:()=>fg,safeEncodeAsync:()=>hg,safeParse:()=>cg,safeParseAsync:()=>ug,set:()=>Ex,setErrorMap:()=>y1,size:()=>Yr,slugify:()=>ei,startsWith:()=>Hn,strictObject:()=>gx,string:()=>$o,stringFormat:()=>XE,stringbool:()=>Lx,success:()=>Tx,superRefine:()=>uh,symbol:()=>cx,templateLiteral:()=>Nx,toJSONSchema:()=>hc,toLowerCase:()=>Jn,toUpperCase:()=>Qn,transform:()=>Wc,treeifyError:()=>Ed,trim:()=>Xn,tuple:()=>Dg,uint32:()=>ix,uint64:()=>sx,ulid:()=>LE,undefined:()=>ux,union:()=>Zc,unknown:()=>Qr,uppercase:()=>Gn,url:()=>kE,util:()=>_,uuid:()=>PE,uuidv4:()=>CE,uuidv6:()=>NE,uuidv7:()=>wE,void:()=>dx,xid:()=>UE,xor:()=>vx});var Jt={};$t(Jt,{$ZodAny:()=>Jm,$ZodArray:()=>np,$ZodAsyncError:()=>bt,$ZodBase64:()=>Bm,$ZodBase64URL:()=>Vm,$ZodBigInt:()=>ks,$ZodBigIntFormat:()=>qm,$ZodBoolean:()=>bo,$ZodCIDRv4:()=>Lm,$ZodCIDRv6:()=>Um,$ZodCUID:()=>Tm,$ZodCUID2:()=>Rm,$ZodCatch:()=>_p,$ZodCheck:()=>X,$ZodCheckBigIntFormat:()=>nm,$ZodCheckEndsWith:()=>gm,$ZodCheckGreaterThan:()=>Ts,$ZodCheckIncludes:()=>pm,$ZodCheckLengthEquals:()=>um,$ZodCheckLessThan:()=>$s,$ZodCheckLowerCase:()=>dm,$ZodCheckMaxLength:()=>sm,$ZodCheckMaxSize:()=>im,$ZodCheckMimeType:()=>vm,$ZodCheckMinLength:()=>cm,$ZodCheckMinSize:()=>om,$ZodCheckMultipleOf:()=>tm,$ZodCheckNumberFormat:()=>rm,$ZodCheckOverwrite:()=>bm,$ZodCheckProperty:()=>hm,$ZodCheckRegex:()=>lm,$ZodCheckSizeEquals:()=>am,$ZodCheckStartsWith:()=>fm,$ZodCheckStringFormat:()=>Fn,$ZodCheckUpperCase:()=>mm,$ZodCodec:()=>So,$ZodCustom:()=>Pp,$ZodCustomStringFormat:()=>Wm,$ZodDate:()=>rp,$ZodDefault:()=>vp,$ZodDiscriminatedUnion:()=>ap,$ZodE164:()=>Zm,$ZodEmail:()=>xm,$ZodEmoji:()=>Im,$ZodEncodeError:()=>hr,$ZodEnum:()=>dp,$ZodError:()=>mo,$ZodExactOptional:()=>gp,$ZodFile:()=>pp,$ZodFunction:()=>$p,$ZodGUID:()=>_m,$ZodIPv4:()=>Mm,$ZodIPv6:()=>jm,$ZodISODate:()=>km,$ZodISODateTime:()=>wm,$ZodISODuration:()=>Dm,$ZodISOTime:()=>Om,$ZodIntersection:()=>sp,$ZodJWT:()=>Gm,$ZodKSUID:()=>Nm,$ZodLazy:()=>Rp,$ZodLiteral:()=>mp,$ZodMAC:()=>zm,$ZodMap:()=>up,$ZodNaN:()=>Ep,$ZodNanoID:()=>$m,$ZodNever:()=>ep,$ZodNonOptional:()=>yp,$ZodNull:()=>Xm,$ZodNullable:()=>hp,$ZodNumber:()=>ws,$ZodNumberFormat:()=>Hm,$ZodObject:()=>E_,$ZodObjectJIT:()=>ip,$ZodOptional:()=>Ds,$ZodPipe:()=>Ms,$ZodPrefault:()=>bp,$ZodPreprocess:()=>xp,$ZodPromise:()=>Tp,$ZodReadonly:()=>Ap,$ZodRealError:()=>Ve,$ZodRecord:()=>cp,$ZodRegistry:()=>Us,$ZodSet:()=>lp,$ZodString:()=>Kr,$ZodStringFormat:()=>q,$ZodSuccess:()=>Sp,$ZodSymbol:()=>Km,$ZodTemplateLiteral:()=>Ip,$ZodTransform:()=>fp,$ZodTuple:()=>Os,$ZodType:()=>N,$ZodULID:()=>Pm,$ZodURL:()=>Am,$ZodUUID:()=>Em,$ZodUndefined:()=>Ym,$ZodUnion:()=>yo,$ZodUnknown:()=>Qm,$ZodVoid:()=>tp,$ZodXID:()=>Cm,$ZodXor:()=>op,$brand:()=>ld,$constructor:()=>f,$input:()=>Np,$output:()=>Cp,Doc:()=>vo,JSONSchema:()=>AE,JSONSchemaGenerator:()=>vc,NEVER:()=>ud,TimePrecision:()=>Dp,_any:()=>rf,_array:()=>lf,_base64:()=>ic,_base64url:()=>oc,_bigint:()=>Kp,_boolean:()=>Hp,_catch:()=>c1,_check:()=>xE,_cidrv4:()=>rc,_cidrv6:()=>nc,_coercedBigint:()=>Yp,_coercedBoolean:()=>qp,_coercedDate:()=>cf,_coercedNumber:()=>Fp,_coercedString:()=>kp,_cuid:()=>Ks,_cuid2:()=>Ys,_custom:()=>mf,_date:()=>sf,_decode:()=>vs,_decodeAsync:()=>ys,_default:()=>o1,_discriminatedUnion:()=>HD,_e164:()=>ac,_email:()=>Bs,_emoji:()=>Hs,_encode:()=>hs,_encodeAsync:()=>bs,_endsWith:()=>qn,_enum:()=>QD,_file:()=>df,_float32:()=>Vp,_float64:()=>Zp,_gt:()=>Ct,_gte:()=>De,_guid:()=>xo,_includes:()=>Wn,_int:()=>Bp,_int32:()=>Gp,_int64:()=>Xp,_intersection:()=>qD,_ipv4:()=>ec,_ipv6:()=>tc,_isoDate:()=>jp,_isoDateTime:()=>Mp,_isoDuration:()=>Lp,_isoTime:()=>zp,_jwt:()=>sc,_ksuid:()=>Qs,_lazy:()=>m1,_length:()=>Jr,_literal:()=>t1,_lowercase:()=>Zn,_lt:()=>Pt,_lte:()=>Qe,_mac:()=>Op,_map:()=>XD,_max:()=>Qe,_maxLength:()=>Xr,_maxSize:()=>Er,_mime:()=>Kn,_min:()=>De,_minLength:()=>Xt,_minSize:()=>Nt,_multipleOf:()=>_r,_nan:()=>uf,_nanoid:()=>qs,_nativeEnum:()=>e1,_negative:()=>uc,_never:()=>of,_nonnegative:()=>dc,_nonoptional:()=>a1,_nonpositive:()=>lc,_normalize:()=>Yn,_null:()=>tf,_nullable:()=>i1,_number:()=>Up,_optional:()=>n1,_overwrite:()=>yt,_parse:()=>jn,_parseAsync:()=>zn,_pipe:()=>u1,_positive:()=>cc,_promise:()=>p1,_property:()=>mc,_readonly:()=>l1,_record:()=>YD,_refine:()=>pf,_regex:()=>Vn,_safeDecode:()=>_s,_safeDecodeAsync:()=>xs,_safeEncode:()=>Ss,_safeEncodeAsync:()=>Es,_safeParse:()=>Ln,_safeParseAsync:()=>Un,_set:()=>JD,_size:()=>Yr,_slugify:()=>ei,_startsWith:()=>Hn,_string:()=>wp,_stringFormat:()=>ti,_stringbool:()=>vf,_success:()=>s1,_superRefine:()=>ff,_symbol:()=>Qp,_templateLiteral:()=>d1,_toLowerCase:()=>Jn,_toUpperCase:()=>Qn,_transform:()=>r1,_trim:()=>Xn,_tuple:()=>KD,_uint32:()=>Wp,_uint64:()=>Jp,_ulid:()=>Xs,_undefined:()=>ef,_union:()=>GD,_unknown:()=>nf,_uppercase:()=>Gn,_url:()=>Ao,_uuid:()=>Vs,_uuidv4:()=>Zs,_uuidv6:()=>Gs,_uuidv7:()=>Ws,_void:()=>af,_xid:()=>Js,_xor:()=>WD,clone:()=>ke,config:()=>se,createStandardJSONSchemaMethod:()=>ri,createToJSONSchemaMethod:()=>bf,decode:()=>pO,decodeAsync:()=>gO,describe:()=>gf,encode:()=>mO,encodeAsync:()=>fO,extractDefs:()=>Ar,finalize:()=>Ir,flattenError:()=>po,formatError:()=>fo,globalConfig:()=>Wr,globalRegistry:()=>_e,initializeContext:()=>xr,isValidBase64:()=>Fm,isValidBase64URL:()=>b_,isValidJWT:()=>y_,locales:()=>Eo,meta:()=>hf,parse:()=>fs,parseAsync:()=>gs,prettifyError:()=>xd,process:()=>Z,regexes:()=>Je,registry:()=>Fs,safeDecode:()=>vO,safeDecodeAsync:()=>yO,safeEncode:()=>hO,safeEncodeAsync:()=>bO,safeParse:()=>Ad,safeParseAsync:()=>Id,toDotPath:()=>XS,toJSONSchema:()=>hc,treeifyError:()=>Ed,util:()=>_,version:()=>ym});var WS,ud=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,m=Object.keys(l);for(let p=0;p<m.length;p++){let g=m[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 m of l._zod.deferred)m();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 ld=Symbol("zod_brand"),bt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},hr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(WS=globalThis).__zod_globalConfig??(WS.__zod_globalConfig={});var Wr=globalThis.__zod_globalConfig;function se(e){return e&&Object.assign(Wr,e),Wr}var _={};$t(_,{BIGINT_FORMAT_RANGES:()=>Sd,Class:()=>md,NUMBER_FORMAT_RANGES:()=>yd,aborted:()=>Sr,allowsEval:()=>gd,assert:()=>Zk,assertEqual:()=>Uk,assertIs:()=>Bk,assertNever:()=>Vk,assertNotEqual:()=>Fk,assignProp:()=>br,base64ToUint8Array:()=>qS,base64urlToUint8Array:()=>sO,cached:()=>Dn,captureStackTrace:()=>ps,cleanEnum:()=>aO,cleanRegex:()=>so,clone:()=>ke,cloneDef:()=>Wk,createTransparentProxy:()=>Jk,defineLazy:()=>M,esc:()=>ms,escapeRegex:()=>ot,explicitlyAborted:()=>_d,extend:()=>tO,finalizeIssue:()=>Oe,floatSafeRemainder:()=>pd,getElementAtPath:()=>Hk,getEnumValues:()=>ao,getLengthableOrigin:()=>lo,getParsedType:()=>Xk,getSizableOrigin:()=>uo,hexToUint8Array:()=>uO,isObject:()=>Hr,isPlainObject:()=>yr,issue:()=>Mn,joinValues:()=>h,jsonStringifyReplacer:()=>On,merge:()=>nO,mergeDefs:()=>Yt,normalizeParams:()=>E,nullish:()=>vr,numKeys:()=>Yk,objectClone:()=>Gk,omit:()=>eO,optionalKeys:()=>bd,parsedType:()=>S,partial:()=>iO,pick:()=>Qk,prefixIssues:()=>Be,primitiveTypes:()=>vd,promiseAllObject:()=>qk,propertyKeyTypes:()=>co,randomString:()=>Kk,required:()=>oO,safeExtend:()=>rO,shallowClone:()=>hd,slugify:()=>fd,stringifyPrimitive:()=>y,uint8ArrayToBase64:()=>KS,uint8ArrayToBase64url:()=>cO,uint8ArrayToHex:()=>lO,unwrapMessage:()=>oo});function Uk(e){return e}function Fk(e){return e}function Bk(e){}function Vk(e){throw new Error("Unexpected value in exhaustive check")}function Zk(e){}function ao(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 On(e,t){return typeof t=="bigint"?t.toString():t}function Dn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function vr(e){return e==null}function so(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function pd(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 HS=Symbol("evaluating");function M(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==HS)return i===void 0&&(i=HS,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Gk(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function br(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Yt(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function Wk(e){return Yt(e._zod.def)}function Hk(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function qk(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 Kk(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function ms(e){return JSON.stringify(e)}function fd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ps="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var gd=Dn(()=>{if(Wr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function yr(e){if(Hr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Hr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function hd(e){return yr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Yk(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var Xk=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}`)}},co=new Set(["string","number","symbol"]),vd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ot(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ke(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 Jk(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 bd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var yd={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]},Sd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Qk(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=Yt(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 br(this,"shape",a),a},checks:[]});return ke(e,o)}function eO(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=Yt(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 br(this,"shape",a),a},checks:[]});return ke(e,o)}function tO(e,t){if(!yr(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=Yt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return br(this,"shape",o),o}});return ke(e,r)}function rO(e,t){if(!yr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Yt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return br(this,"shape",i),i}});return ke(e,n)}function nO(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=Yt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return br(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ke(e,n)}function iO(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=Yt(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 br(this,"shape",u),u},checks:[]});return ke(t,a)}function oO(e,t,n){let i=Yt(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 br(this,"shape",o),o}});return ke(t,i)}function Sr(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 _d(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 Be(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function oo(e){return typeof e=="string"?e:e?.message}function Oe(e,t,n){let i=e.message?e.message:oo(e.inst?._zod.def?.error?.(e))??oo(t?.error?.(e))??oo(n.customError?.(e))??oo(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 uo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function lo(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 Mn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function aO(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function qS(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 KS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function sO(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return qS(t+n)}function cO(e){return KS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function uO(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 lO(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var md=class{constructor(...t){}};var YS=(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,On,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},mo=f("$ZodError",YS),Ve=f("$ZodError",YS,{Parent:Error});function po(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 fo(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 m=c[l];l===c.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(t(a))):u[m]=u[m]||{_errors:[]},u=u[m],l++}}}};return i(e),n}function Ed(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 m=n,p=0;for(;p<l.length;){let g=l[p],v=p===l.length-1;typeof g=="string"?(m.properties??(m.properties={}),(a=m.properties)[g]??(a[g]={errors:[]}),m=m.properties[g]):(m.items??(m.items=[]),(c=m.items)[g]??(c[g]={errors:[]}),m=m.items[g]),v&&m.errors.push(t(u)),p++}}};return i(e),n}function XS(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 xd(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 ${XS(i.path)}`);return t.join(`
101
- `)}var jn=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 bt;if(a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>Oe(u,o,se())));throw ps(c,r?.callee),c}return a.value},fs=jn(Ve),zn=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=>Oe(u,o,se())));throw ps(c,r?.callee),c}return a.value},gs=zn(Ve),Ln=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 bt;return o.issues.length?{success:!1,error:new(e??mo)(o.issues.map(a=>Oe(a,r,se())))}:{success:!0,data:o.value}},Ad=Ln(Ve),Un=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=>Oe(a,r,se())))}:{success:!0,data:o.value}},Id=Un(Ve),hs=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return jn(e)(t,n,r)},mO=hs(Ve),vs=e=>(t,n,i)=>jn(e)(t,n,i),pO=vs(Ve),bs=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return zn(e)(t,n,r)},fO=bs(Ve),ys=e=>async(t,n,i)=>zn(e)(t,n,i),gO=ys(Ve),Ss=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Ln(e)(t,n,r)},hO=Ss(Ve),_s=e=>(t,n,i)=>Ln(e)(t,n,i),vO=_s(Ve),Es=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Un(e)(t,n,r)},bO=Es(Ve),xs=e=>async(t,n,i)=>Un(e)(t,n,i),yO=xs(Ve);var Je={};$t(Je,{base64:()=>Fd,base64url:()=>As,bigint:()=>qd,boolean:()=>Yd,browserEmail:()=>TO,cidrv4:()=>Ld,cidrv6:()=>Ud,cuid:()=>$d,cuid2:()=>Td,date:()=>Zd,datetime:()=>Wd,domain:()=>CO,duration:()=>wd,e164:()=>Vd,email:()=>Od,emoji:()=>Dd,extendedDuration:()=>SO,guid:()=>kd,hex:()=>NO,hostname:()=>PO,html5Email:()=>AO,httpProtocol:()=>Bd,idnEmail:()=>$O,integer:()=>Kd,ipv4:()=>Md,ipv6:()=>jd,ksuid:()=>Cd,lowercase:()=>Qd,mac:()=>zd,md5_base64:()=>kO,md5_base64url:()=>OO,md5_hex:()=>wO,nanoid:()=>Nd,null:()=>Xd,number:()=>Is,rfc5322Email:()=>IO,sha1_base64:()=>MO,sha1_base64url:()=>jO,sha1_hex:()=>DO,sha256_base64:()=>LO,sha256_base64url:()=>UO,sha256_hex:()=>zO,sha384_base64:()=>BO,sha384_base64url:()=>VO,sha384_hex:()=>FO,sha512_base64:()=>GO,sha512_base64url:()=>WO,sha512_hex:()=>ZO,string:()=>Hd,time:()=>Gd,ulid:()=>Rd,undefined:()=>Jd,unicodeEmail:()=>JS,uppercase:()=>em,uuid:()=>qr,uuid4:()=>_O,uuid6:()=>EO,uuid7:()=>xO,xid:()=>Pd});var $d=/^[cC][0-9a-z]{6,}$/,Td=/^[0-9a-z]+$/,Rd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Pd=/^[0-9a-vA-V]{20}$/,Cd=/^[A-Za-z0-9]{27}$/,Nd=/^[a-zA-Z0-9_-]{21}$/,wd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,SO=/^[-+]?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)?)??$/,kd=/^([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})$/,qr=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)$/,_O=qr(4),EO=qr(6),xO=qr(7),Od=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,AO=/^[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])?)*$/,IO=/^(([^<>()\[\]\\.,;:\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,}))$/,JS=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,$O=JS,TO=/^[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])?)*$/,RO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Dd(){return new RegExp(RO,"u")}var Md=/^(?:(?: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])$/,jd=/^(([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}|:))$/,zd=e=>{let t=ot(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ld=/^((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])$/,Ud=/^(([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])$/,Fd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,As=/^[A-Za-z0-9_-]*$/,PO=/^(?=.{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])?)*\.?$/,CO=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bd=/^https?$/,Vd=/^\+[1-9]\d{6,14}$/,QS="(?:(?:\\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])))",Zd=new RegExp(`^${QS}$`);function e_(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 Gd(e){return new RegExp(`^${e_(e)}$`)}function Wd(e){let t=e_({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(`^${QS}T(?:${i})$`)}var Hd=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qd=/^-?\d+n?$/,Kd=/^-?\d+$/,Is=/^-?\d+(?:\.\d+)?$/,Yd=/^(?:true|false)$/i,Xd=/^null$/i;var Jd=/^undefined$/i;var Qd=/^[^A-Z]*$/,em=/^[^a-z]*$/,NO=/^[0-9a-fA-F]*$/;function go(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ho(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var wO=/^[0-9a-fA-F]{32}$/,kO=go(22,"=="),OO=ho(22),DO=/^[0-9a-fA-F]{40}$/,MO=go(27,"="),jO=ho(27),zO=/^[0-9a-fA-F]{64}$/,LO=go(43,"="),UO=ho(43),FO=/^[0-9a-fA-F]{96}$/,BO=go(64,""),VO=ho(64),ZO=/^[0-9a-fA-F]{128}$/,GO=go(86,"=="),WO=ho(86);var X=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),r_={number:"number",bigint:"bigint",object:"date"},$s=f("$ZodCheckLessThan",(e,t)=>{X.init(e,t);let n=r_[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})}}),Ts=f("$ZodCheckGreaterThan",(e,t)=>{X.init(e,t);let n=r_[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)=>{X.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):pd(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})}}),rm=f("$ZodCheckNumberFormat",(e,t)=>{X.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=yd[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=Kd)}),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})}}),nm=f("$ZodCheckBigIntFormat",(e,t)=>{X.init(e,t);let[n,i]=Sd[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})}}),im=f("$ZodCheckMaxSize",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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:uo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),om=f("$ZodCheckMinSize",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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:uo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),am=f("$ZodCheckSizeEquals",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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:uo(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})}}),sm=f("$ZodCheckMaxLength",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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=lo(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cm=f("$ZodCheckMinLength",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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=lo(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),um=f("$ZodCheckLengthEquals",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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=lo(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})}}),Fn=f("$ZodCheckStringFormat",(e,t)=>{var n,i;X.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=()=>{})}),lm=f("$ZodCheckRegex",(e,t)=>{Fn.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})}}),dm=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qd),Fn.init(e,t)}),mm=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=em),Fn.init(e,t)}),pm=f("$ZodCheckIncludes",(e,t)=>{X.init(e,t);let n=ot(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})}}),fm=f("$ZodCheckStartsWith",(e,t)=>{X.init(e,t);let n=new RegExp(`^${ot(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})}}),gm=f("$ZodCheckEndsWith",(e,t)=>{X.init(e,t);let n=new RegExp(`.*${ot(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 t_(e,t,n){e.issues.length&&t.issues.push(...Be(n,e.issues))}var hm=f("$ZodCheckProperty",(e,t)=>{X.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=>t_(r,n,t.property));t_(i,n,t.property)}}),vm=f("$ZodCheckMimeType",(e,t)=>{X.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})}}),bm=f("$ZodCheckOverwrite",(e,t)=>{X.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var vo=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(kw.hide):this.out.write(ZF(this.outputText,this.out.columns)),super.render(),this.outputText=[ww.symbol(this.done,this.aborted),Nw.bold(this.msg),ww.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Nw.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(GF.line+kw.to(0)+this.outputText))}};Ow.exports=bS});var jw=I((YJ,Mw)=>{"use strict";Mw.exports={TextPrompt:ON(),SelectPrompt:zN(),TogglePrompt:BN(),DatePrompt:fw(),NumberPrompt:bw(),MultiselectPrompt:pS(),AutocompletePrompt:$w(),AutocompleteMultiselectPrompt:Pw(),ConfirmPrompt:Dw()}});var Lw=I(zw=>{"use strict";var Xe=zw,WF=jw(),ed=e=>e;function Ht(e,t,n={}){return new Promise((i,r)=>{let o=new WF[e](t),a=n.onAbort||ed,c=n.onSubmit||ed,u=n.onExit||ed;o.on("state",t.onState||ed),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Xe.text=e=>Ht("TextPrompt",e);Xe.password=e=>(e.style="password",Xe.text(e));Xe.invisible=e=>(e.style="invisible",Xe.text(e));Xe.number=e=>Ht("NumberPrompt",e);Xe.date=e=>Ht("DatePrompt",e);Xe.confirm=e=>Ht("ConfirmPrompt",e);Xe.list=e=>{let t=e.separator||",";return Ht("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Xe.toggle=e=>Ht("TogglePrompt",e);Xe.select=e=>Ht("SelectPrompt",e);Xe.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Ht("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Xe.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Ht("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var HF=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Xe.autocomplete=e=>(e.suggest=e.suggest||HF,e.choices=[].concat(e.choices||[]),Ht("AutocompletePrompt",e))});var Bw=I((JJ,Fw)=>{"use strict";var yS=Lw(),qF=["suggest","format","onState","validate","onRender","type"],Uw=()=>{};async function Fr(e=[],{onSubmit:t=Uw,onCancel:n=Uw}={}){let i={},r=Fr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=async(g,v,A=!1)=>{if(!(!A&&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(qF.includes(g))continue;let v=a[g];a[g]=typeof v=="function"?await v(o,{...i},m):v}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=a,yS[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=Fr._injected?KF(Fr._injected,a.initial):await yS[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 KF(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function YF(e){Fr._injected=(Fr._injected||[]).concat(e)}function XF(e){Fr._override=Object.assign({},e)}Fw.exports=Object.assign(Fr,{prompt:Fr,prompts:yS,inject:YF,override:XF})});var Zw=I((QJ,Vw)=>{function JF(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}Vw.exports=JF("8.6.0")?fN():Bw()});import{join as ht,dirname as IS,normalize as ik}from"node:path";import{readFileSync as ok,existsSync as ak}from"node:fs";var nk=Object.defineProperty,we=(e,t)=>nk(e,"name",{value:t,configurable:!0}),Br="fjall";function Vr(e,t){let n=ik(e);if(n.includes("..")||n.startsWith("/"))throw new Error(`Invalid ${t}: path traversal is not allowed`)}we(Vr,"assertNoTraversal");function sk(){return Br}we(sk,"getFjallPath");function ck(e){let t=IS(e);return IS(t)||"."}we(ck,"getProjectRoot");function $S(e){if(!ak(e))throw new Error(`Infrastructure file not found: ${e}`);let t=ok(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]}we($S,"getAppNameFromInfrastructure");function uk(e){let t=ht(e,nd);return $S(t)}we(uk,"getAppName");function qt(e){return Vr(e,"app name"),ht(Br,e,nd)}we(qt,"getInfrastructurePath");function lk(e){return Vr(e,"app name"),ht(Br,e)}we(lk,"getAppPath");function dk(e){return Vr(e,"component name"),ht(Br,e)}we(dk,"getOrganisationComponentPath");function mk(e){return Vr(e,"deployment type"),ht(Br,e,"logs")}we(mk,"getDeploymentLogsPath");function pk(e){return Vr(e,"deployment type"),ht(Br,e,"logs","cloudformation")}we(pk,"getCloudFormationLogsPath");function TS(){return ht(Br,"domains")}we(TS,"getDomainsDir");function rd(e){return Vr(e,"domain name"),ht(TS(),e)}we(rd,"getDomainComponentPath");function fk(e){return ht(rd(e),nd)}we(fk,"getDomainInfrastructurePath");function gk(e){return ht(rd(e),hk)}we(gk,"getDomainZoneFilePath");var nd="infrastructure.ts",hk="zone.bind",vk="cdk.out";function bk(e){return ht(e,vk)}we(bk,"getCdkOutPath");var yk=Object.defineProperty,Rn=(e,t)=>yk(e,"name",{value:t,configurable:!0});function id(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}Rn(id,"escapeRegExp");function Zr(e,t,n){let i=qt(t),r=e.read(i)?.toString();return r?new RegExp(`["']${id(n)}["']`).test(r):!1}Rn(Zr,"resourceExists");function to(e,t,n){let i=qt(t);if(!e.read(i)?.toString())throw new Error(`Infrastructure file not found for ${t}`);if(Zr(e,t,n))throw new Error(`Resource name '${n}' already exists in ${t}. Please choose a different name or remove the existing resource first.`)}Rn(to,"assertResourceNameUnique");function od(e,t,n){let i=qt(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}Rn(od,"countResourcesOfType");function Sk(e,t){let n=qt(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 m=u.includes("connections:"),p=[];if(m){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:m,connectedResources:p})}return r}Rn(Sk,"detectComputeResources");function _k(e,t,n){let i=qt(t),r=e.read(i)?.toString();return r?new RegExp(`databaseName:\\s*["']${id(n)}["']`).test(r):!1}Rn(_k,"databaseExists");import*as Ki from"fs";import*as sC from"path";var Ek=Object.defineProperty,gr=(e,t)=>Ek(e,"name",{value:t,configurable:!0});function Fe(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase()).replace(/^./,t=>t.toUpperCase())}gr(Fe,"toPascalCase");function Tt(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()}gr(Tt,"toKebab");function Cn(e){return Tt(e).replace(/-/g,"_")}gr(Cn,"toValidDatabaseName");function RS(e){return Tt(e).replace(/-/g,"_").toUpperCase()}gr(RS,"toScreamingSnake");function CS(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}gr(CS,"capitalise");function PS(e){return e.split(".").join("")}gr(PS,"getSafeZoneName");function Gr(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}gr(Gr,"accountConstructKey");function NS(e){let t=e.replace(new RegExp("\\P{ASCII}","gu"),"");return Gr(t)===Gr(e)&&Gr(e)!==""}gr(NS,"hasAsciiStableConstructKey");var xk=Object.defineProperty,is=(e,t)=>xk(e,"name",{value:t,configurable:!0});function os(e){return`${Fe(e.split(".").join(""))}Domain`}is(os,"getDomainStackName");function wS(e){return`${e}UsEast1Certificates`}is(wS,"getDomainUsEast1CertificatesStackName");function ad(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`}}is(ad,"getDomainExportNames");function kS(e){return typeof e.hostedZoneId=="string"}is(kS,"isManagedDomainBinding");var Ak=Object.defineProperty,Ik=(e,t)=>Ak(e,"name",{value:t,configurable:!0});function OS(e){return`${Fe(e)}ImageTag`}Ik(OS,"imageTagParameterName");var $k=Object.defineProperty,Tk=(e,t)=>$k(e,"name",{value:t,configurable:!0});function DS(e){let t=new Map;for(let n of e){let i=Gr(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}Tk(DS,"findAccountNameCollision");var Rk=Object.defineProperty,ro=(e,t)=>Rk(e,"name",{value:t,configurable:!0}),Pn="us-east-2";var it=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}]),Kt=Object.freeze(it.map(e=>e.code)),as=new Set(it.filter(e=>e.optIn).map(e=>e.code));function ss(e){return`${e} is an opt-in region: it must be enabled in the AWS account (Account settings \u2192 Regions) before deployment will succeed.`}ro(ss,"optInRegionWarning");function Nn(e){return it.find(t=>t.code===e)}ro(Nn,"getRegionInfo");function wn(e){let t=e.split("-");return t.length===3&&t[0]&&t[1]&&t[2]?`${t[0]}${t[1][0]}${t[2]}`:e}ro(wn,"abbreviateRegion");var Ck=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"}),Pk=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"}),Nk=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 sd(e){return as.has(e)?Nk[e]??Pn:e}ro(sd,"toDeployableRegion");function cs(e){if(!e)return;let t=Ck[e];if(t!==void 0)return sd(t);let n=e.split("/")[0];if(n===void 0)return;let i=Pk[n];return i===void 0?void 0:sd(i)}ro(cs,"suggestRegionForTimezone");var wk=Object.defineProperty,no=(e,t)=>wk(e,"name",{value:t,configurable:!0});function us(e){return Tt(e).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}no(us,"slugifyAccountName");function MS(e,t){let n=us(e),i=us(t);return n===""?i:i===""?n:`${n}-${i}`}no(MS,"defaultConnectedAccountName");function jS(e,t){let n=us(t);return n===""?e:`${e}-${n}`}no(jS,"suffixedAccountName");var zS=new Set(it.map(e=>wn(e.code)));function LS(e){let t=e.toLowerCase().split(/[-\s_]+/).filter(i=>i.length>0),n=t[t.length-1];if(n!==void 0&&zS.has(n))return n}no(LS,"findTrailingRegionShortCode");function US(e){return`Account name must not end with a region code ("-${e}") \u2014 the region is added automatically when deploying. Remove the "-${e}" suffix.`}no(US,"regionSuffixRejectionMessage");var kk=Object.defineProperty,kn=(e,t)=>kk(e,"name",{value:t,configurable:!0});function vt(e){return e instanceof Error?e:new Error(String(e))}kn(vt,"normaliseError");function Rt(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"}kn(Rt,"getErrorMessage");function ls(e,t){return!e||typeof e!="object"?!1:"code"in e&&e.code===t}kn(ls,"hasErrorCode");function io(e){if(!(!e||typeof e!="object")&&"code"in e&&typeof e.code=="string")return e.code}kn(io,"getErrorCode");function ds(e){return e instanceof Error?e.stack:void 0}kn(ds,"getErrorStack");function ms(e){let t=Rt(e),n=io(e);return n&&n!=="UNKNOWN_ERROR"?`[${n}] ${t}`:t}kn(ms,"formatErrorString");var Ok=Object.defineProperty,Dk=(e,t)=>Ok(e,"name",{value:t,configurable:!0});function FS(e){let t,n=!1;return()=>(n||(t=e(),n=!0),t)}Dk(FS,"singleton");var Mk=Object.defineProperty,cd=(e,t)=>Mk(e,"name",{value:t,configurable:!0}),BS=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 VS(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!BS.has(t.toUpperCase())))}cd(VS,"filterDangerousEnvVars");var jk=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g;function On(e){return e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,"-----BEGIN [REDACTED] PRIVATE KEY-----...-----END [REDACTED] PRIVATE KEY-----").replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,"$1***$2").replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,"$1$2***").replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,"$1***").replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,"$1_$2_***").replace(/\bwhsec_[A-Za-z0-9]{8,}/g,"whsec_***").replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,"***").replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,"$1***").replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,"***").replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,"***").replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,"***").replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,"***").replace(jk,"$1***")}cd(On,"maskSensitiveOutput");function ZS(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}cd(ZS,"parseShellArgs");var zk=Object.defineProperty,Lk=(e,t)=>zk(e,"name",{value:t,configurable:!0}),Uk=Lk(e=>new Promise(t=>setTimeout(t,e)),"sleep");var Fk=Object.defineProperty,GS=(e,t)=>Fk(e,"name",{value:t,configurable:!0});async function WS(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=GS(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}GS(WS,"mapSettledWithConcurrency");var s={};$t(s,{$brand:()=>ld,$input:()=>Np,$output:()=>Pp,NEVER:()=>ud,TimePrecision:()=>Dp,ZodAny:()=>Ig,ZodArray:()=>Cg,ZodBase64:()=>Lc,ZodBase64URL:()=>Uc,ZodBigInt:()=>di,ZodBigIntFormat:()=>Vc,ZodBoolean:()=>li,ZodCIDRv4:()=>jc,ZodCIDRv6:()=>zc,ZodCUID:()=>Pc,ZodCUID2:()=>Nc,ZodCatch:()=>Xg,ZodCodec:()=>jo,ZodCustom:()=>zo,ZodCustomStringFormat:()=>ci,ZodDate:()=>wo,ZodDefault:()=>Gg,ZodDiscriminatedUnion:()=>Ng,ZodE164:()=>Fc,ZodEmail:()=>Tc,ZodEmoji:()=>Rc,ZodEnum:()=>ai,ZodError:()=>b1,ZodExactOptional:()=>Bg,ZodFile:()=>Ug,ZodFirstPartyTypeKind:()=>lh,ZodFunction:()=>sh,ZodGUID:()=>To,ZodIPv4:()=>Dc,ZodIPv6:()=>Mc,ZodISODate:()=>_c,ZodISODateTime:()=>Sc,ZodISODuration:()=>xc,ZodISOTime:()=>Ec,ZodIntersection:()=>wg,ZodIssueCode:()=>S1,ZodJWT:()=>Bc,ZodKSUID:()=>Oc,ZodLazy:()=>ih,ZodLiteral:()=>Lg,ZodMAC:()=>bg,ZodMap:()=>jg,ZodNaN:()=>Qg,ZodNanoID:()=>Cc,ZodNever:()=>Tg,ZodNonOptional:()=>Kc,ZodNull:()=>xg,ZodNullable:()=>Zg,ZodNumber:()=>ui,ZodNumberFormat:()=>en,ZodObject:()=>Oo,ZodOptional:()=>qc,ZodPipe:()=>Mo,ZodPrefault:()=>Hg,ZodPreprocess:()=>eh,ZodPromise:()=>ah,ZodReadonly:()=>th,ZodRealError:()=>Ze,ZodRecord:()=>oi,ZodSet:()=>zg,ZodString:()=>si,ZodStringFormat:()=>K,ZodSuccess:()=>Yg,ZodSymbol:()=>_g,ZodTemplateLiteral:()=>nh,ZodTransform:()=>Fg,ZodTuple:()=>Og,ZodType:()=>w,ZodULID:()=>wc,ZodURL:()=>No,ZodUUID:()=>wt,ZodUndefined:()=>Eg,ZodUnion:()=>Do,ZodUnknown:()=>$g,ZodVoid:()=>Rg,ZodXID:()=>kc,ZodXor:()=>Pg,_ZodString:()=>$c,_default:()=>Wg,_function:()=>Ox,any:()=>dx,array:()=>ko,base64:()=>qE,base64url:()=>KE,bigint:()=>ax,boolean:()=>Sg,catch:()=>Jg,check:()=>Dx,cidrv4:()=>WE,cidrv6:()=>HE,clone:()=>ke,codec:()=>Px,coerce:()=>dh,config:()=>se,core:()=>Jt,cuid:()=>zE,cuid2:()=>LE,custom:()=>Mx,date:()=>px,decode:()=>dg,decodeAsync:()=>pg,describe:()=>jx,discriminatedUnion:()=>yx,e164:()=>YE,email:()=>RE,emoji:()=>ME,encode:()=>lg,encodeAsync:()=>mg,endsWith:()=>Kn,enum:()=>Wc,exactOptional:()=>Vg,file:()=>$x,flattenError:()=>po,float32:()=>rx,float64:()=>nx,formatError:()=>fo,fromJSONSchema:()=>Zx,function:()=>Ox,getErrorMap:()=>E1,globalRegistry:()=>_e,gt:()=>Pt,gte:()=>De,guid:()=>CE,hash:()=>tx,hex:()=>ex,hostname:()=>QE,httpUrl:()=>DE,includes:()=>Hn,instanceof:()=>Lx,int:()=>Ac,int32:()=>ix,int64:()=>sx,intersection:()=>kg,invertCodec:()=>Nx,ipv4:()=>VE,ipv6:()=>GE,iso:()=>ii,json:()=>Fx,jwt:()=>XE,keyof:()=>fx,ksuid:()=>BE,lazy:()=>oh,length:()=>Jr,literal:()=>Ix,locales:()=>Eo,looseObject:()=>vx,looseRecord:()=>_x,lowercase:()=>Gn,lt:()=>Ct,lte:()=>Qe,mac:()=>ZE,map:()=>Ex,maxLength:()=>Xr,maxSize:()=>Er,meta:()=>zx,mime:()=>Yn,minLength:()=>Xt,minSize:()=>Nt,multipleOf:()=>_r,nan:()=>Cx,nanoid:()=>jE,nativeEnum:()=>Ax,negative:()=>lc,never:()=>Zc,nonnegative:()=>mc,nonoptional:()=>Kg,nonpositive:()=>dc,normalize:()=>Xn,null:()=>Ag,nullable:()=>Co,nullish:()=>Tx,number:()=>yg,object:()=>gx,optional:()=>Ro,overwrite:()=>yt,parse:()=>ag,parseAsync:()=>sg,partialRecord:()=>Sx,pipe:()=>Ic,positive:()=>uc,prefault:()=>qg,preprocess:()=>Bx,prettifyError:()=>xd,promise:()=>kx,property:()=>pc,readonly:()=>rh,record:()=>Mg,refine:()=>ch,regex:()=>Zn,regexes:()=>Je,registry:()=>Bs,safeDecode:()=>gg,safeDecodeAsync:()=>vg,safeEncode:()=>fg,safeEncodeAsync:()=>hg,safeParse:()=>cg,safeParseAsync:()=>ug,set:()=>xx,setErrorMap:()=>_1,size:()=>Yr,slugify:()=>ti,startsWith:()=>qn,strictObject:()=>hx,string:()=>$o,stringFormat:()=>JE,stringbool:()=>Ux,success:()=>Rx,superRefine:()=>uh,symbol:()=>ux,templateLiteral:()=>wx,toJSONSchema:()=>vc,toLowerCase:()=>Qn,toUpperCase:()=>ei,transform:()=>Hc,treeifyError:()=>Ed,trim:()=>Jn,tuple:()=>Dg,uint32:()=>ox,uint64:()=>cx,ulid:()=>UE,undefined:()=>lx,union:()=>Gc,unknown:()=>Qr,uppercase:()=>Wn,url:()=>OE,util:()=>_,uuid:()=>PE,uuidv4:()=>NE,uuidv6:()=>wE,uuidv7:()=>kE,void:()=>mx,xid:()=>FE,xor:()=>bx});var Jt={};$t(Jt,{$ZodAny:()=>Jm,$ZodArray:()=>np,$ZodAsyncError:()=>bt,$ZodBase64:()=>Bm,$ZodBase64URL:()=>Vm,$ZodBigInt:()=>Os,$ZodBigIntFormat:()=>qm,$ZodBoolean:()=>bo,$ZodCIDRv4:()=>Lm,$ZodCIDRv6:()=>Um,$ZodCUID:()=>Tm,$ZodCUID2:()=>Rm,$ZodCatch:()=>_p,$ZodCheck:()=>X,$ZodCheckBigIntFormat:()=>nm,$ZodCheckEndsWith:()=>gm,$ZodCheckGreaterThan:()=>Rs,$ZodCheckIncludes:()=>pm,$ZodCheckLengthEquals:()=>um,$ZodCheckLessThan:()=>Ts,$ZodCheckLowerCase:()=>dm,$ZodCheckMaxLength:()=>sm,$ZodCheckMaxSize:()=>im,$ZodCheckMimeType:()=>vm,$ZodCheckMinLength:()=>cm,$ZodCheckMinSize:()=>om,$ZodCheckMultipleOf:()=>tm,$ZodCheckNumberFormat:()=>rm,$ZodCheckOverwrite:()=>bm,$ZodCheckProperty:()=>hm,$ZodCheckRegex:()=>lm,$ZodCheckSizeEquals:()=>am,$ZodCheckStartsWith:()=>fm,$ZodCheckStringFormat:()=>Bn,$ZodCheckUpperCase:()=>mm,$ZodCodec:()=>So,$ZodCustom:()=>Cp,$ZodCustomStringFormat:()=>Wm,$ZodDate:()=>rp,$ZodDefault:()=>vp,$ZodDiscriminatedUnion:()=>ap,$ZodE164:()=>Zm,$ZodEmail:()=>xm,$ZodEmoji:()=>Im,$ZodEncodeError:()=>hr,$ZodEnum:()=>dp,$ZodError:()=>mo,$ZodExactOptional:()=>gp,$ZodFile:()=>pp,$ZodFunction:()=>$p,$ZodGUID:()=>_m,$ZodIPv4:()=>Mm,$ZodIPv6:()=>jm,$ZodISODate:()=>km,$ZodISODateTime:()=>wm,$ZodISODuration:()=>Dm,$ZodISOTime:()=>Om,$ZodIntersection:()=>sp,$ZodJWT:()=>Gm,$ZodKSUID:()=>Nm,$ZodLazy:()=>Rp,$ZodLiteral:()=>mp,$ZodMAC:()=>zm,$ZodMap:()=>up,$ZodNaN:()=>Ep,$ZodNanoID:()=>$m,$ZodNever:()=>ep,$ZodNonOptional:()=>yp,$ZodNull:()=>Xm,$ZodNullable:()=>hp,$ZodNumber:()=>ks,$ZodNumberFormat:()=>Hm,$ZodObject:()=>x_,$ZodObjectJIT:()=>ip,$ZodOptional:()=>Ms,$ZodPipe:()=>js,$ZodPrefault:()=>bp,$ZodPreprocess:()=>xp,$ZodPromise:()=>Tp,$ZodReadonly:()=>Ap,$ZodRealError:()=>Ve,$ZodRecord:()=>cp,$ZodRegistry:()=>Fs,$ZodSet:()=>lp,$ZodString:()=>Kr,$ZodStringFormat:()=>q,$ZodSuccess:()=>Sp,$ZodSymbol:()=>Km,$ZodTemplateLiteral:()=>Ip,$ZodTransform:()=>fp,$ZodTuple:()=>Ds,$ZodType:()=>N,$ZodULID:()=>Cm,$ZodURL:()=>Am,$ZodUUID:()=>Em,$ZodUndefined:()=>Ym,$ZodUnion:()=>yo,$ZodUnknown:()=>Qm,$ZodVoid:()=>tp,$ZodXID:()=>Pm,$ZodXor:()=>op,$brand:()=>ld,$constructor:()=>f,$input:()=>Np,$output:()=>Pp,Doc:()=>vo,JSONSchema:()=>IE,JSONSchemaGenerator:()=>bc,NEVER:()=>ud,TimePrecision:()=>Dp,_any:()=>rf,_array:()=>lf,_base64:()=>oc,_base64url:()=>ac,_bigint:()=>Kp,_boolean:()=>Hp,_catch:()=>l1,_check:()=>AE,_cidrv4:()=>nc,_cidrv6:()=>ic,_coercedBigint:()=>Yp,_coercedBoolean:()=>qp,_coercedDate:()=>cf,_coercedNumber:()=>Fp,_coercedString:()=>kp,_cuid:()=>Ys,_cuid2:()=>Xs,_custom:()=>mf,_date:()=>sf,_decode:()=>bs,_decodeAsync:()=>Ss,_default:()=>s1,_discriminatedUnion:()=>KD,_e164:()=>sc,_email:()=>Vs,_emoji:()=>qs,_encode:()=>vs,_encodeAsync:()=>ys,_endsWith:()=>Kn,_enum:()=>t1,_file:()=>df,_float32:()=>Vp,_float64:()=>Zp,_gt:()=>Pt,_gte:()=>De,_guid:()=>xo,_includes:()=>Hn,_int:()=>Bp,_int32:()=>Gp,_int64:()=>Xp,_intersection:()=>YD,_ipv4:()=>tc,_ipv6:()=>rc,_isoDate:()=>jp,_isoDateTime:()=>Mp,_isoDuration:()=>Lp,_isoTime:()=>zp,_jwt:()=>cc,_ksuid:()=>ec,_lazy:()=>f1,_length:()=>Jr,_literal:()=>n1,_lowercase:()=>Gn,_lt:()=>Ct,_lte:()=>Qe,_mac:()=>Op,_map:()=>QD,_max:()=>Qe,_maxLength:()=>Xr,_maxSize:()=>Er,_mime:()=>Yn,_min:()=>De,_minLength:()=>Xt,_minSize:()=>Nt,_multipleOf:()=>_r,_nan:()=>uf,_nanoid:()=>Ks,_nativeEnum:()=>r1,_negative:()=>lc,_never:()=>of,_nonnegative:()=>mc,_nonoptional:()=>c1,_nonpositive:()=>dc,_normalize:()=>Xn,_null:()=>tf,_nullable:()=>a1,_number:()=>Up,_optional:()=>o1,_overwrite:()=>yt,_parse:()=>zn,_parseAsync:()=>Ln,_pipe:()=>d1,_positive:()=>uc,_promise:()=>g1,_property:()=>pc,_readonly:()=>m1,_record:()=>JD,_refine:()=>pf,_regex:()=>Zn,_safeDecode:()=>Es,_safeDecodeAsync:()=>As,_safeEncode:()=>_s,_safeEncodeAsync:()=>xs,_safeParse:()=>Un,_safeParseAsync:()=>Fn,_set:()=>e1,_size:()=>Yr,_slugify:()=>ti,_startsWith:()=>qn,_string:()=>wp,_stringFormat:()=>ri,_stringbool:()=>vf,_success:()=>u1,_superRefine:()=>ff,_symbol:()=>Qp,_templateLiteral:()=>p1,_toLowerCase:()=>Qn,_toUpperCase:()=>ei,_transform:()=>i1,_trim:()=>Jn,_tuple:()=>XD,_uint32:()=>Wp,_uint64:()=>Jp,_ulid:()=>Js,_undefined:()=>ef,_union:()=>HD,_unknown:()=>nf,_uppercase:()=>Wn,_url:()=>Ao,_uuid:()=>Zs,_uuidv4:()=>Gs,_uuidv6:()=>Ws,_uuidv7:()=>Hs,_void:()=>af,_xid:()=>Qs,_xor:()=>qD,clone:()=>ke,config:()=>se,createStandardJSONSchemaMethod:()=>ni,createToJSONSchemaMethod:()=>bf,decode:()=>gO,decodeAsync:()=>vO,describe:()=>gf,encode:()=>fO,encodeAsync:()=>hO,extractDefs:()=>Ar,finalize:()=>Ir,flattenError:()=>po,formatError:()=>fo,globalConfig:()=>Wr,globalRegistry:()=>_e,initializeContext:()=>xr,isValidBase64:()=>Fm,isValidBase64URL:()=>y_,isValidJWT:()=>S_,locales:()=>Eo,meta:()=>hf,parse:()=>gs,parseAsync:()=>hs,prettifyError:()=>xd,process:()=>Z,regexes:()=>Je,registry:()=>Bs,safeDecode:()=>yO,safeDecodeAsync:()=>_O,safeEncode:()=>bO,safeEncodeAsync:()=>SO,safeParse:()=>Ad,safeParseAsync:()=>Id,toDotPath:()=>JS,toJSONSchema:()=>vc,treeifyError:()=>Ed,util:()=>_,version:()=>ym});var HS,ud=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,m=Object.keys(l);for(let p=0;p<m.length;p++){let g=m[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 m of l._zod.deferred)m();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 ld=Symbol("zod_brand"),bt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},hr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(HS=globalThis).__zod_globalConfig??(HS.__zod_globalConfig={});var Wr=globalThis.__zod_globalConfig;function se(e){return e&&Object.assign(Wr,e),Wr}var _={};$t(_,{BIGINT_FORMAT_RANGES:()=>Sd,Class:()=>md,NUMBER_FORMAT_RANGES:()=>yd,aborted:()=>Sr,allowsEval:()=>gd,assert:()=>Wk,assertEqual:()=>Bk,assertIs:()=>Zk,assertNever:()=>Gk,assertNotEqual:()=>Vk,assignProp:()=>br,base64ToUint8Array:()=>KS,base64urlToUint8Array:()=>uO,cached:()=>Mn,captureStackTrace:()=>fs,cleanEnum:()=>cO,cleanRegex:()=>so,clone:()=>ke,cloneDef:()=>qk,createTransparentProxy:()=>eO,defineLazy:()=>M,esc:()=>ps,escapeRegex:()=>ot,explicitlyAborted:()=>_d,extend:()=>nO,finalizeIssue:()=>Oe,floatSafeRemainder:()=>pd,getElementAtPath:()=>Kk,getEnumValues:()=>ao,getLengthableOrigin:()=>lo,getParsedType:()=>Qk,getSizableOrigin:()=>uo,hexToUint8Array:()=>dO,isObject:()=>Hr,isPlainObject:()=>yr,issue:()=>jn,joinValues:()=>h,jsonStringifyReplacer:()=>Dn,merge:()=>oO,mergeDefs:()=>Yt,normalizeParams:()=>E,nullish:()=>vr,numKeys:()=>Jk,objectClone:()=>Hk,omit:()=>rO,optionalKeys:()=>bd,parsedType:()=>S,partial:()=>aO,pick:()=>tO,prefixIssues:()=>Be,primitiveTypes:()=>vd,promiseAllObject:()=>Yk,propertyKeyTypes:()=>co,randomString:()=>Xk,required:()=>sO,safeExtend:()=>iO,shallowClone:()=>hd,slugify:()=>fd,stringifyPrimitive:()=>y,uint8ArrayToBase64:()=>YS,uint8ArrayToBase64url:()=>lO,uint8ArrayToHex:()=>mO,unwrapMessage:()=>oo});function Bk(e){return e}function Vk(e){return e}function Zk(e){}function Gk(e){throw new Error("Unexpected value in exhaustive check")}function Wk(e){}function ao(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 Dn(e,t){return typeof t=="bigint"?t.toString():t}function Mn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function vr(e){return e==null}function so(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function pd(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 qS=Symbol("evaluating");function M(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==qS)return i===void 0&&(i=qS,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function Hk(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function br(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Yt(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function qk(e){return Yt(e._zod.def)}function Kk(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function Yk(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 Xk(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function ps(e){return JSON.stringify(e)}function fd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var gd=Mn(()=>{if(Wr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function yr(e){if(Hr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Hr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function hd(e){return yr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Jk(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var Qk=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}`)}},co=new Set(["string","number","symbol"]),vd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ot(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ke(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 eO(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 bd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var yd={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]},Sd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function tO(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=Yt(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 br(this,"shape",a),a},checks:[]});return ke(e,o)}function rO(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=Yt(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 br(this,"shape",a),a},checks:[]});return ke(e,o)}function nO(e,t){if(!yr(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=Yt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return br(this,"shape",o),o}});return ke(e,r)}function iO(e,t){if(!yr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Yt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return br(this,"shape",i),i}});return ke(e,n)}function oO(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=Yt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return br(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ke(e,n)}function aO(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=Yt(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 br(this,"shape",u),u},checks:[]});return ke(t,a)}function sO(e,t,n){let i=Yt(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 br(this,"shape",o),o}});return ke(t,i)}function Sr(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 _d(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 Be(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function oo(e){return typeof e=="string"?e:e?.message}function Oe(e,t,n){let i=e.message?e.message:oo(e.inst?._zod.def?.error?.(e))??oo(t?.error?.(e))??oo(n.customError?.(e))??oo(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 uo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function lo(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 jn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function cO(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function KS(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 YS(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function uO(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return KS(t+n)}function lO(e){return YS(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function dO(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 mO(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var md=class{constructor(...t){}};var XS=(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,Dn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},mo=f("$ZodError",XS),Ve=f("$ZodError",XS,{Parent:Error});function po(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 fo(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 m=c[l];l===c.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(t(a))):u[m]=u[m]||{_errors:[]},u=u[m],l++}}}};return i(e),n}function Ed(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 m=n,p=0;for(;p<l.length;){let g=l[p],v=p===l.length-1;typeof g=="string"?(m.properties??(m.properties={}),(a=m.properties)[g]??(a[g]={errors:[]}),m=m.properties[g]):(m.items??(m.items=[]),(c=m.items)[g]??(c[g]={errors:[]}),m=m.items[g]),v&&m.errors.push(t(u)),p++}}};return i(e),n}function JS(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 xd(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 ${JS(i.path)}`);return t.join(`
101
+ `)}var zn=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 bt;if(a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>Oe(u,o,se())));throw fs(c,r?.callee),c}return a.value},gs=zn(Ve),Ln=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=>Oe(u,o,se())));throw fs(c,r?.callee),c}return a.value},hs=Ln(Ve),Un=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 bt;return o.issues.length?{success:!1,error:new(e??mo)(o.issues.map(a=>Oe(a,r,se())))}:{success:!0,data:o.value}},Ad=Un(Ve),Fn=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=>Oe(a,r,se())))}:{success:!0,data:o.value}},Id=Fn(Ve),vs=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return zn(e)(t,n,r)},fO=vs(Ve),bs=e=>(t,n,i)=>zn(e)(t,n,i),gO=bs(Ve),ys=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Ln(e)(t,n,r)},hO=ys(Ve),Ss=e=>async(t,n,i)=>Ln(e)(t,n,i),vO=Ss(Ve),_s=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Un(e)(t,n,r)},bO=_s(Ve),Es=e=>(t,n,i)=>Un(e)(t,n,i),yO=Es(Ve),xs=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Fn(e)(t,n,r)},SO=xs(Ve),As=e=>async(t,n,i)=>Fn(e)(t,n,i),_O=As(Ve);var Je={};$t(Je,{base64:()=>Fd,base64url:()=>Is,bigint:()=>qd,boolean:()=>Yd,browserEmail:()=>CO,cidrv4:()=>Ld,cidrv6:()=>Ud,cuid:()=>$d,cuid2:()=>Td,date:()=>Zd,datetime:()=>Wd,domain:()=>wO,duration:()=>wd,e164:()=>Vd,email:()=>Od,emoji:()=>Dd,extendedDuration:()=>EO,guid:()=>kd,hex:()=>kO,hostname:()=>NO,html5Email:()=>$O,httpProtocol:()=>Bd,idnEmail:()=>RO,integer:()=>Kd,ipv4:()=>Md,ipv6:()=>jd,ksuid:()=>Pd,lowercase:()=>Qd,mac:()=>zd,md5_base64:()=>DO,md5_base64url:()=>MO,md5_hex:()=>OO,nanoid:()=>Nd,null:()=>Xd,number:()=>$s,rfc5322Email:()=>TO,sha1_base64:()=>zO,sha1_base64url:()=>LO,sha1_hex:()=>jO,sha256_base64:()=>FO,sha256_base64url:()=>BO,sha256_hex:()=>UO,sha384_base64:()=>ZO,sha384_base64url:()=>GO,sha384_hex:()=>VO,sha512_base64:()=>HO,sha512_base64url:()=>qO,sha512_hex:()=>WO,string:()=>Hd,time:()=>Gd,ulid:()=>Rd,undefined:()=>Jd,unicodeEmail:()=>QS,uppercase:()=>em,uuid:()=>qr,uuid4:()=>xO,uuid6:()=>AO,uuid7:()=>IO,xid:()=>Cd});var $d=/^[cC][0-9a-z]{6,}$/,Td=/^[0-9a-z]+$/,Rd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cd=/^[0-9a-vA-V]{20}$/,Pd=/^[A-Za-z0-9]{27}$/,Nd=/^[a-zA-Z0-9_-]{21}$/,wd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,EO=/^[-+]?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)?)??$/,kd=/^([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})$/,qr=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)$/,xO=qr(4),AO=qr(6),IO=qr(7),Od=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$O=/^[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])?)*$/,TO=/^(([^<>()\[\]\\.,;:\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,}))$/,QS=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,RO=QS,CO=/^[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])?)*$/,PO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Dd(){return new RegExp(PO,"u")}var Md=/^(?:(?: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])$/,jd=/^(([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}|:))$/,zd=e=>{let t=ot(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Ld=/^((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])$/,Ud=/^(([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])$/,Fd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Is=/^[A-Za-z0-9_-]*$/,NO=/^(?=.{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])?)*\.?$/,wO=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bd=/^https?$/,Vd=/^\+[1-9]\d{6,14}$/,e_="(?:(?:\\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])))",Zd=new RegExp(`^${e_}$`);function t_(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 Gd(e){return new RegExp(`^${t_(e)}$`)}function Wd(e){let t=t_({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(`^${e_}T(?:${i})$`)}var Hd=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},qd=/^-?\d+n?$/,Kd=/^-?\d+$/,$s=/^-?\d+(?:\.\d+)?$/,Yd=/^(?:true|false)$/i,Xd=/^null$/i;var Jd=/^undefined$/i;var Qd=/^[^A-Z]*$/,em=/^[^a-z]*$/,kO=/^[0-9a-fA-F]*$/;function go(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ho(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var OO=/^[0-9a-fA-F]{32}$/,DO=go(22,"=="),MO=ho(22),jO=/^[0-9a-fA-F]{40}$/,zO=go(27,"="),LO=ho(27),UO=/^[0-9a-fA-F]{64}$/,FO=go(43,"="),BO=ho(43),VO=/^[0-9a-fA-F]{96}$/,ZO=go(64,""),GO=ho(64),WO=/^[0-9a-fA-F]{128}$/,HO=go(86,"=="),qO=ho(86);var X=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),n_={number:"number",bigint:"bigint",object:"date"},Ts=f("$ZodCheckLessThan",(e,t)=>{X.init(e,t);let n=n_[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})}}),Rs=f("$ZodCheckGreaterThan",(e,t)=>{X.init(e,t);let n=n_[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)=>{X.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):pd(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})}}),rm=f("$ZodCheckNumberFormat",(e,t)=>{X.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=yd[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=Kd)}),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})}}),nm=f("$ZodCheckBigIntFormat",(e,t)=>{X.init(e,t);let[n,i]=Sd[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})}}),im=f("$ZodCheckMaxSize",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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:uo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),om=f("$ZodCheckMinSize",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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:uo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),am=f("$ZodCheckSizeEquals",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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:uo(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})}}),sm=f("$ZodCheckMaxLength",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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=lo(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cm=f("$ZodCheckMinLength",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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=lo(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),um=f("$ZodCheckLengthEquals",(e,t)=>{var n;X.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!vr(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=lo(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})}}),Bn=f("$ZodCheckStringFormat",(e,t)=>{var n,i;X.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=()=>{})}),lm=f("$ZodCheckRegex",(e,t)=>{Bn.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})}}),dm=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Qd),Bn.init(e,t)}),mm=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=em),Bn.init(e,t)}),pm=f("$ZodCheckIncludes",(e,t)=>{X.init(e,t);let n=ot(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})}}),fm=f("$ZodCheckStartsWith",(e,t)=>{X.init(e,t);let n=new RegExp(`^${ot(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})}}),gm=f("$ZodCheckEndsWith",(e,t)=>{X.init(e,t);let n=new RegExp(`.*${ot(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 r_(e,t,n){e.issues.length&&t.issues.push(...Be(n,e.issues))}var hm=f("$ZodCheckProperty",(e,t)=>{X.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=>r_(r,n,t.property));r_(i,n,t.property)}}),vm=f("$ZodCheckMimeType",(e,t)=>{X.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})}}),bm=f("$ZodCheckOverwrite",(e,t)=>{X.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var vo=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 ym={major:4,minor:4,patch:3};var N=f("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ym;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=Sr(a),m;for(let p of c){if(p._zod.def.when){if(_d(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 bt;if(m||v instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=Sr(a,g)))});else{if(a.issues.length===g)continue;l||(l=Sr(a,g))}}return m?m.then(()=>a):a},o=(a,c,u)=>{if(Sr(a))return a.aborted=!0,a;let l=r(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new bt;return l.then(m=>e._zod.parse(m,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(m=>o(m,a,c)):o(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new bt;return u.then(l=>r(l,i,c))}return r(u,i,c)}}M(e,"~standard",()=>({validate:r=>{try{let o=Ad(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Id(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Kr=f("$ZodString",(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hd(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)=>{Fn.init(e,t),Kr.init(e,t)}),_m=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kd),q.init(e,t)}),Em=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=qr(i))}else t.pattern??(t.pattern=qr());q.init(e,t)}),xm=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Od),q.init(e,t)}),Am=f("$ZodURL",(e,t)=>{q.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Bd.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})}}}),Im=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Dd()),q.init(e,t)}),$m=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Nd),q.init(e,t)}),Tm=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$d),q.init(e,t)}),Rm=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Td),q.init(e,t)}),Pm=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Rd),q.init(e,t)}),Cm=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Pd),q.init(e,t)}),Nm=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Cd),q.init(e,t)}),wm=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Wd(t)),q.init(e,t)}),km=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Zd),q.init(e,t)}),Om=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Gd(t)),q.init(e,t)}),Dm=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=wd),q.init(e,t)}),Mm=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Md),q.init(e,t),e._zod.bag.format="ipv4"}),jm=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=jd),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})}}}),zm=f("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=zd(t.delimiter)),q.init(e,t),e._zod.bag.format="mac"}),Lm=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ld),q.init(e,t)}),Um=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ud),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 Fm(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Bm=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Fd),q.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Fm(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function b_(e){if(!As.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fm(n)}var Vm=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=As),q.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{b_(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Zm=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vd),q.init(e,t)});function y_(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 Gm=f("$ZodJWT",(e,t)=>{q.init(e,t),e._zod.check=n=>{y_(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Wm=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})}}),ws=f("$ZodNumber",(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??Is,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}}),Hm=f("$ZodNumberFormat",(e,t)=>{rm.init(e,t),ws.init(e,t)}),bo=f("$ZodBoolean",(e,t)=>{N.init(e,t),e._zod.pattern=Yd,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}}),ks=f("$ZodBigInt",(e,t)=>{N.init(e,t),e._zod.pattern=qd,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}}),qm=f("$ZodBigIntFormat",(e,t)=>{nm.init(e,t),ks.init(e,t)}),Km=f("$ZodSymbol",(e,t)=>{N.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}}),Ym=f("$ZodUndefined",(e,t)=>{N.init(e,t),e._zod.pattern=Jd,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}}),Xm=f("$ZodNull",(e,t)=>{N.init(e,t),e._zod.pattern=Xd,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}}),Jm=f("$ZodAny",(e,t)=>{N.init(e,t),e._zod.parse=n=>n}),Qm=f("$ZodUnknown",(e,t)=>{N.init(e,t),e._zod.parse=n=>n}),ep=f("$ZodNever",(e,t)=>{N.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)=>{N.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}}),rp=f("$ZodDate",(e,t)=>{N.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 i_(e,t,n){e.issues.length&&t.issues.push(...Be(n,e.issues)),t.value[n]=e.value}var np=f("$ZodArray",(e,t)=>{N.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=>i_(l,n,a))):i_(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Ns(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...Be(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 S_(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=bd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function __(e,t,n,i,r,o){let a=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,m=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(A=>Ns(A,n,g,t,m,p))):Ns(v,n,g,t,m,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 E_=f("$ZodObject",(e,t)=>{if(N.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=Dn(()=>S_(t));M(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let m=c[l]._zod;if(m.values){u[l]??(u[l]=new Set);for(let p of m.values)u[l].add(p)}}return u});let r=Hr,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 m=[],p=a.shape;for(let g of a.keys){let v=p[g],A=v._zod.optin==="optional",Y=v._zod.optout==="optional",z=v._zod.run({value:l[g],issues:[]},u);z instanceof Promise?m.push(z.then(Se=>Ns(Se,c,g,l,A,Y))):Ns(z,c,g,l,A,Y)}return o?__(m,l,c,u,i.value,e):m.length?Promise.all(m).then(()=>c):c}}),ip=f("$ZodObjectJIT",(e,t)=>{E_.init(e,t);let n=e._zod.parse,i=Dn(()=>S_(t)),r=g=>{let v=new vo(["shape","payload","ctx"]),A=i.value,Y=Ne=>{let te=ms(Ne);return`shape[${te}]._zod.run({ value: input[${te}], issues: [] }, ctx)`};v.write("const input = payload.value;");let z=Object.create(null),Se=0;for(let Ne of A.keys)z[Ne]=`key_${Se++}`;v.write("const newResult = {};");for(let Ne of A.keys){let te=z[Ne],pe=ms(Ne),$n=g[Ne],xS=$n?._zod?.optin==="optional",Hw=$n?._zod?.optout==="optional";v.write(`const ${te} = ${Y(Ne)};`),xS&&Hw?v.write(`
103
+ `))}};var ym={major:4,minor:4,patch:3};var N=f("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ym;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=Sr(a),m;for(let p of c){if(p._zod.def.when){if(_d(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 bt;if(m||v instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=Sr(a,g)))});else{if(a.issues.length===g)continue;l||(l=Sr(a,g))}}return m?m.then(()=>a):a},o=(a,c,u)=>{if(Sr(a))return a.aborted=!0,a;let l=r(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new bt;return l.then(m=>e._zod.parse(m,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(m=>o(m,a,c)):o(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new bt;return u.then(l=>r(l,i,c))}return r(u,i,c)}}M(e,"~standard",()=>({validate:r=>{try{let o=Ad(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Id(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Kr=f("$ZodString",(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hd(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)=>{Bn.init(e,t),Kr.init(e,t)}),_m=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kd),q.init(e,t)}),Em=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=qr(i))}else t.pattern??(t.pattern=qr());q.init(e,t)}),xm=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Od),q.init(e,t)}),Am=f("$ZodURL",(e,t)=>{q.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Bd.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})}}}),Im=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Dd()),q.init(e,t)}),$m=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Nd),q.init(e,t)}),Tm=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$d),q.init(e,t)}),Rm=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Td),q.init(e,t)}),Cm=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Rd),q.init(e,t)}),Pm=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Cd),q.init(e,t)}),Nm=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Pd),q.init(e,t)}),wm=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Wd(t)),q.init(e,t)}),km=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Zd),q.init(e,t)}),Om=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Gd(t)),q.init(e,t)}),Dm=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=wd),q.init(e,t)}),Mm=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Md),q.init(e,t),e._zod.bag.format="ipv4"}),jm=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=jd),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})}}}),zm=f("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=zd(t.delimiter)),q.init(e,t),e._zod.bag.format="mac"}),Lm=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ld),q.init(e,t)}),Um=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ud),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 Fm(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Bm=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Fd),q.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Fm(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function y_(e){if(!Is.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Fm(n)}var Vm=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Is),q.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{y_(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Zm=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Vd),q.init(e,t)});function S_(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 Gm=f("$ZodJWT",(e,t)=>{q.init(e,t),e._zod.check=n=>{S_(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Wm=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})}}),ks=f("$ZodNumber",(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??$s,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}}),Hm=f("$ZodNumberFormat",(e,t)=>{rm.init(e,t),ks.init(e,t)}),bo=f("$ZodBoolean",(e,t)=>{N.init(e,t),e._zod.pattern=Yd,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}}),Os=f("$ZodBigInt",(e,t)=>{N.init(e,t),e._zod.pattern=qd,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}}),qm=f("$ZodBigIntFormat",(e,t)=>{nm.init(e,t),Os.init(e,t)}),Km=f("$ZodSymbol",(e,t)=>{N.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}}),Ym=f("$ZodUndefined",(e,t)=>{N.init(e,t),e._zod.pattern=Jd,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}}),Xm=f("$ZodNull",(e,t)=>{N.init(e,t),e._zod.pattern=Xd,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}}),Jm=f("$ZodAny",(e,t)=>{N.init(e,t),e._zod.parse=n=>n}),Qm=f("$ZodUnknown",(e,t)=>{N.init(e,t),e._zod.parse=n=>n}),ep=f("$ZodNever",(e,t)=>{N.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)=>{N.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}}),rp=f("$ZodDate",(e,t)=>{N.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 o_(e,t,n){e.issues.length&&t.issues.push(...Be(n,e.issues)),t.value[n]=e.value}var np=f("$ZodArray",(e,t)=>{N.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=>o_(l,n,a))):o_(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function ws(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...Be(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 __(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=bd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function E_(e,t,n,i,r,o){let a=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,m=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(A=>ws(A,n,g,t,m,p))):ws(v,n,g,t,m,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 x_=f("$ZodObject",(e,t)=>{if(N.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=Mn(()=>__(t));M(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let m=c[l]._zod;if(m.values){u[l]??(u[l]=new Set);for(let p of m.values)u[l].add(p)}}return u});let r=Hr,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 m=[],p=a.shape;for(let g of a.keys){let v=p[g],A=v._zod.optin==="optional",Y=v._zod.optout==="optional",z=v._zod.run({value:l[g],issues:[]},u);z instanceof Promise?m.push(z.then(Se=>ws(Se,c,g,l,A,Y))):ws(z,c,g,l,A,Y)}return o?E_(m,l,c,u,i.value,e):m.length?Promise.all(m).then(()=>c):c}}),ip=f("$ZodObjectJIT",(e,t)=>{x_.init(e,t);let n=e._zod.parse,i=Mn(()=>__(t)),r=g=>{let v=new vo(["shape","payload","ctx"]),A=i.value,Y=Ne=>{let te=ps(Ne);return`shape[${te}]._zod.run({ value: input[${te}], issues: [] }, ctx)`};v.write("const input = payload.value;");let z=Object.create(null),Se=0;for(let Ne of A.keys)z[Ne]=`key_${Se++}`;v.write("const newResult = {};");for(let Ne of A.keys){let te=z[Ne],pe=ps(Ne),Tn=g[Ne],AS=Tn?._zod?.optin==="optional",Kw=Tn?._zod?.optout==="optional";v.write(`const ${te} = ${Y(Ne)};`),AS&&Kw?v.write(`
104
104
  if (${te}.issues.length) {
105
105
  if (${pe} in input) {
106
106
  payload.issues = payload.issues.concat(${te}.issues.map(iss => ({
@@ -118,7 +118,7 @@ Filtered results for: ${this.inputValue?this.inputValue:pr.gray("Enter something
118
118
  newResult[${pe}] = ${te}.value;
119
119
  }
120
120
 
121
- `):xS?v.write(`
121
+ `):AS?v.write(`
122
122
  if (${te}.issues.length) {
123
123
  payload.issues = payload.issues.concat(${te}.issues.map(iss => ({
124
124
  ...iss,
@@ -159,54 +159,54 @@ Filtered results for: ${this.inputValue?this.inputValue:pr.gray("Enter something
159
159
  }
160
160
  }
161
161
 
162
- `)}v.write("payload.value = newResult;"),v.write("return payload;");let fr=v.compile();return(Ne,te)=>fr(g,Ne,te)},o,a=Hr,c=!Wr.jitless,l=c&&gd.value,m=t.catchall,p;e._zod.parse=(g,v)=>{p??(p=i.value);let A=g.value;return a(A)?c&&l&&v?.async===!1&&v.jitless!==!0?(o||(o=r(t.shape)),g=o(g,v),m?__([],A,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function o_(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=>!Sr(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=>Oe(a,i,se())))}),t)}var yo=f("$ZodUnion",(e,t)=>{N.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=>so(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=>o_(c,i,e,r)):o_(a,i,e,r)}});function a_(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=>Oe(a,i,se())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var op=f("$ZodXor",(e,t)=>{yo.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=>a_(c,i,e,r)):a_(a,i,e,r)}}),ap=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,yo.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=Dn(()=>{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(!Hr(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)}}),sp=f("$ZodIntersection",(e,t)=>{N.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])=>s_(n,u,l)):s_(n,o,a)}});function Sm(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(yr(e)&&yr(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=Sm(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=Sm(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 s_(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}),Sr(e))return e;let a=Sm(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 Os=f("$ZodTuple",(e,t)=>{N.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=c_(n,"optin"),u=c_(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 m=0;m<n.length;m++){let p=n[m]._zod.run({value:o[m],issues:[]},r);p instanceof Promise?a.push(p.then(g=>{l[m]=g})):l[m]=p}if(t.rest){let m=n.length-1,p=o.slice(n.length);for(let g of p){m++;let v=t.rest._zod.run({value:g,issues:[]},r);v instanceof Promise?a.push(v.then(A=>u_(A,i,m))):u_(v,i,m)}}return a.length?Promise.all(a).then(()=>l_(l,i,n,o,u)):l_(l,i,n,o,u)}});function c_(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function u_(e,t,n){e.issues.length&&t.issues.push(...Be(n,e.issues)),t.value[n]=e.value}function l_(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(...Be(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 cp=f("$ZodRecord",(e,t)=>{N.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!yr(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 m=t.keyType._zod.run({value:l,issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(v=>Oe(v,i,se())),input:l,path:[l],inst:e});continue}let p=m.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(...Be(l,v.issues)),n.value[p]=v.value})):(g.issues.length&&n.issues.push(...Be(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"&&Is.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=>Oe(p,i,se())),input:c,path:[c],inst:e});continue}let m=t.valueType._zod.run({value:r[c],issues:[]},i);m instanceof Promise?o.push(m.then(p=>{p.issues.length&&n.issues.push(...Be(c,p.issues)),n.value[u.value]=p.value})):(m.issues.length&&n.issues.push(...Be(c,m.issues)),n.value[u.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),up=f("$ZodMap",(e,t)=>{N.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(([m,p])=>{d_(m,p,n,a,r,e,i)})):d_(u,l,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function d_(e,t,n,i,r,o,a){e.issues.length&&(co.has(typeof i)?n.issues.push(...Be(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(c=>Oe(c,a,se()))})),t.issues.length&&(co.has(typeof i)?n.issues.push(...Be(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(c=>Oe(c,a,se()))})),n.value.set(e.value,t.value)}var lp=f("$ZodSet",(e,t)=>{N.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=>m_(u,n))):m_(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function m_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var dp=f("$ZodEnum",(e,t)=>{N.init(e,t);let n=ao(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>co.has(typeof r)).map(r=>typeof r=="string"?ot(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}}),mp=f("$ZodLiteral",(e,t)=>{if(N.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"?ot(i):i?ot(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}}),pp=f("$ZodFile",(e,t)=>{N.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}}),fp=f("$ZodTransform",(e,t)=>{N.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new hr(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 bt;return n.value=r,n.fallback=!0,n}});function p_(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ds=f("$ZodOptional",(e,t)=>{N.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(`^(${so(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=>p_(a,r)):p_(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),gp=f("$ZodExactOptional",(e,t)=>{Ds.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)}),hp=f("$ZodNullable",(e,t)=>{N.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(`^(${so(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)}),vp=f("$ZodDefault",(e,t)=>{N.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=>f_(o,t)):f_(r,t)}});function f_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bp=f("$ZodPrefault",(e,t)=>{N.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))}),yp=f("$ZodNonOptional",(e,t)=>{N.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=>g_(o,e)):g_(r,e)}});function g_(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 Sp=f("$ZodSuccess",(e,t)=>{N.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new hr("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)}}),_p=f("$ZodCatch",(e,t)=>{N.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=>Oe(a,i,se()))},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=>Oe(o,i,se()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Ep=f("$ZodNaN",(e,t)=>{N.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)}),Ms=f("$ZodPipe",(e,t)=>{N.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=>Rs(a,t.in,i)):Rs(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Rs(o,t.out,i)):Rs(r,t.out,i)}});function Rs(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 So=f("$ZodCodec",(e,t)=>{N.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=>Ps(a,t,i)):Ps(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Ps(a,t,i)):Ps(o,t,i)}}});function Ps(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=>Cs(e,o,t.out,n)):Cs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Cs(e,o,t.in,n)):Cs(e,r,t.in,n)}}function Cs(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var xp=f("$ZodPreprocess",(e,t)=>{Ms.init(e,t)}),Ap=f("$ZodReadonly",(e,t)=>{N.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(h_):h_(r)}});function h_(e){return e.value=Object.freeze(e.value),e}var Ip=f("$ZodTemplateLiteral",(e,t)=>{N.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||vd.has(typeof i))n.push(ot(`${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)}),$p=f("$ZodFunction",(e,t)=>(N.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?fs(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?fs(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 gs(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await gs(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 Os({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)),Tp=f("$ZodPromise",(e,t)=>{N.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Rp=f("$ZodLazy",(e,t)=>{N.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)}),Pp=f("$ZodCustom",(e,t)=>{X.init(e,t),N.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=>v_(o,n,i,e));v_(r,n,i,e)}});function v_(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(Mn(r))}}var Eo={};$t(Eo,{ar:()=>x_,az:()=>A_,be:()=>$_,bg:()=>T_,ca:()=>R_,cs:()=>P_,da:()=>C_,de:()=>N_,el:()=>w_,en:()=>js,eo:()=>k_,es:()=>O_,fa:()=>D_,fi:()=>M_,fr:()=>j_,frCA:()=>z_,he:()=>L_,hr:()=>U_,hu:()=>F_,hy:()=>V_,id:()=>Z_,is:()=>G_,it:()=>W_,ja:()=>H_,ka:()=>q_,kh:()=>K_,km:()=>zs,ko:()=>Y_,lt:()=>J_,mk:()=>Q_,ms:()=>eE,nl:()=>tE,no:()=>rE,ota:()=>nE,pl:()=>oE,ps:()=>iE,pt:()=>aE,ro:()=>sE,ru:()=>uE,sl:()=>lE,sv:()=>dE,ta:()=>mE,th:()=>pE,tr:()=>fE,ua:()=>gE,uk:()=>Ls,ur:()=>hE,uz:()=>vE,vi:()=>bE,yo:()=>_E,zhCN:()=>yE,zhTW:()=>SE});var qO=()=>{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 x_(){return{localeError:qO()}}var KO=()=>{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 A_(){return{localeError:KO()}}function I_(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 YO=()=>{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=I_(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=I_(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 $_(){return{localeError:YO()}}var XO=()=>{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 T_(){return{localeError:XO()}}var JO=()=>{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 R_(){return{localeError:JO()}}var QO=()=>{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 P_(){return{localeError:QO()}}var eD=()=>{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 C_(){return{localeError:eD()}}var tD=()=>{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 N_(){return{localeError:tD()}}var rD=()=>{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 w_(){return{localeError:rD()}}var nD=()=>{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 js(){return{localeError:nD()}}var iD=()=>{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 k_(){return{localeError:iD()}}var oD=()=>{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 O_(){return{localeError:oD()}}var aD=()=>{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 D_(){return{localeError:aD()}}var sD=()=>{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 M_(){return{localeError:sD()}}var cD=()=>{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 j_(){return{localeError:cD()}}var uD=()=>{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 z_(){return{localeError:uD()}}var lD=()=>{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 m=n(l);return m?m.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 m=l.expected,p=u[m??""]??i(m),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 m=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 ${m[0]} \u05D0\u05D5 ${m[1]}`;let p=m[m.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 ${m.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",Y=l.inclusive?`${l.maximum} ${m?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${m?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${Y}`.trim()}let g=l.inclusive?"<=":"<",v=o(l.origin??"value");return m?.unit?`${m.longLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()} ${m.unit}`:`${m?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()}`}case"too_small":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let z=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${z}`}let Y=l.inclusive?`${l.minimum} ${m?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${m?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${Y}`.trim()}let g=l.inclusive?">=":">",v=o(l.origin??"value");return m?.unit?`${m.shortLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()}`}case"invalid_format":{let m=l;if(m.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${m.prefix}"`;if(m.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${m.suffix}"`;if(m.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${m.includes}"`;if(m.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 ${m.pattern}`;let p=c[m.format],g=p?.label??m.format,A=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${A}`}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 L_(){return{localeError:lD()}}var dD=()=>{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 U_(){return{localeError:dD()}}var mD=()=>{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 F_(){return{localeError:mD()}}function B_(e,t,n){return Math.abs(e)===1?t:n}function Bn(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 pD=()=>{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=B_(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 ${Bn(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 ${Bn(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=B_(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 ${Bn(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 ${Bn(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 ${Bn(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 ${Bn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function V_(){return{localeError:pD()}}var fD=()=>{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 Z_(){return{localeError:fD()}}var gD=()=>{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 G_(){return{localeError:gD()}}var hD=()=>{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 W_(){return{localeError:hD()}}var vD=()=>{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 H_(){return{localeError:vD()}}var bD=()=>{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 q_(){return{localeError:bD()}}var yD=()=>{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 zs(){return{localeError:yD()}}function K_(){return zs()}var SD=()=>{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 Y_(){return{localeError:SD()}}var _o=e=>e.charAt(0).toUpperCase()+e.slice(1);function X_(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 _D=()=>{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,X_(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${_o(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`${_o(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,X_(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${_o(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`${_o(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`${_o(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function J_(){return{localeError:_D()}}var ED=()=>{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 Q_(){return{localeError:ED()}}var xD=()=>{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 eE(){return{localeError:xD()}}var AD=()=>{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 tE(){return{localeError:AD()}}var ID=()=>{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 rE(){return{localeError:ID()}}var $D=()=>{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 nE(){return{localeError:$D()}}var TD=()=>{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 iE(){return{localeError:TD()}}var RD=()=>{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 oE(){return{localeError:RD()}}var PD=()=>{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 aE(){return{localeError:PD()}}var CD=()=>{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 sE(){return{localeError:CD()}}function cE(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 ND=()=>{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=cE(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=cE(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 uE(){return{localeError:ND()}}var wD=()=>{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 lE(){return{localeError:wD()}}var kD=()=>{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 dE(){return{localeError:kD()}}var OD=()=>{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 mE(){return{localeError:OD()}}var DD=()=>{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 pE(){return{localeError:DD()}}var MD=()=>{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 fE(){return{localeError:MD()}}var jD=()=>{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 Ls(){return{localeError:jD()}}function gE(){return Ls()}var zD=()=>{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 hE(){return{localeError:zD()}}var LD=()=>{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 vE(){return{localeError:LD()}}var UD=()=>{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 bE(){return{localeError:UD()}}var FD=()=>{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 yE(){return{localeError:FD()}}var BD=()=>{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 SE(){return{localeError:BD()}}var VD=()=>{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 _E(){return{localeError:VD()}}var EE,Cp=Symbol("ZodOutput"),Np=Symbol("ZodInput"),Us=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 Fs(){return new Us}(EE=globalThis).__zod_globalRegistry??(EE.__zod_globalRegistry=Fs());var _e=globalThis.__zod_globalRegistry;function wp(e,t){return new e({type:"string",...E(t)})}function kp(e,t){return new e({type:"string",coerce:!0,...E(t)})}function Bs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function xo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Vs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function Zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function Gs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function Ws(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function Ao(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function Hs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function qs(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function Ks(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function Ys(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function Xs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function Js(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function Qs(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function ec(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function tc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function Op(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function rc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function nc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function ic(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function oc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function ac(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 Dp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Mp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function jp(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function zp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function Lp(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function Up(e,t){return new e({type:"number",checks:[],...E(t)})}function Fp(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function Bp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function Vp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function Zp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function Gp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function Wp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function Hp(e,t){return new e({type:"boolean",...E(t)})}function qp(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function Kp(e,t){return new e({type:"bigint",...E(t)})}function Yp(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function Xp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function Jp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function Qp(e,t){return new e({type:"symbol",...E(t)})}function ef(e,t){return new e({type:"undefined",...E(t)})}function tf(e,t){return new e({type:"null",...E(t)})}function rf(e){return new e({type:"any"})}function nf(e){return new e({type:"unknown"})}function of(e,t){return new e({type:"never",...E(t)})}function af(e,t){return new e({type:"void",...E(t)})}function sf(e,t){return new e({type:"date",...E(t)})}function cf(e,t){return new e({type:"date",coerce:!0,...E(t)})}function uf(e,t){return new e({type:"nan",...E(t)})}function Pt(e,t){return new $s({check:"less_than",...E(t),value:e,inclusive:!1})}function Qe(e,t){return new $s({check:"less_than",...E(t),value:e,inclusive:!0})}function Ct(e,t){return new Ts({check:"greater_than",...E(t),value:e,inclusive:!1})}function De(e,t){return new Ts({check:"greater_than",...E(t),value:e,inclusive:!0})}function cc(e){return Ct(0,e)}function uc(e){return Pt(0,e)}function lc(e){return Qe(0,e)}function dc(e){return De(0,e)}function _r(e,t){return new tm({check:"multiple_of",...E(t),value:e})}function Er(e,t){return new im({check:"max_size",...E(t),maximum:e})}function Nt(e,t){return new om({check:"min_size",...E(t),minimum:e})}function Yr(e,t){return new am({check:"size_equals",...E(t),size:e})}function Xr(e,t){return new sm({check:"max_length",...E(t),maximum:e})}function Xt(e,t){return new cm({check:"min_length",...E(t),minimum:e})}function Jr(e,t){return new um({check:"length_equals",...E(t),length:e})}function Vn(e,t){return new lm({check:"string_format",format:"regex",...E(t),pattern:e})}function Zn(e){return new dm({check:"string_format",format:"lowercase",...E(e)})}function Gn(e){return new mm({check:"string_format",format:"uppercase",...E(e)})}function Wn(e,t){return new pm({check:"string_format",format:"includes",...E(t),includes:e})}function Hn(e,t){return new fm({check:"string_format",format:"starts_with",...E(t),prefix:e})}function qn(e,t){return new gm({check:"string_format",format:"ends_with",...E(t),suffix:e})}function mc(e,t,n){return new hm({check:"property",property:e,schema:t,...E(n)})}function Kn(e,t){return new vm({check:"mime_type",mime:e,...E(t)})}function yt(e){return new bm({check:"overwrite",tx:e})}function Yn(e){return yt(t=>t.normalize(e))}function Xn(){return yt(e=>e.trim())}function Jn(){return yt(e=>e.toLowerCase())}function Qn(){return yt(e=>e.toUpperCase())}function ei(){return yt(e=>fd(e))}function lf(e,t,n){return new e({type:"array",element:t,...E(n)})}function GD(e,t,n){return new e({type:"union",options:t,...E(n)})}function WD(e,t,n){return new e({type:"union",options:t,inclusive:!1,...E(n)})}function HD(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...E(i)})}function qD(e,t,n){return new e({type:"intersection",left:t,right:n})}function KD(e,t,n,i){let r=n instanceof N,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function YD(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...E(i)})}function XD(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...E(i)})}function JD(e,t,n){return new e({type:"set",valueType:t,...E(n)})}function QD(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 e1(e,t,n){return new e({type:"enum",entries:t,...E(n)})}function t1(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(n)})}function df(e,t){return new e({type:"file",...E(t)})}function r1(e,t){return new e({type:"transform",transform:t})}function n1(e,t){return new e({type:"optional",innerType:t})}function i1(e,t){return new e({type:"nullable",innerType:t})}function o1(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():hd(n)}})}function a1(e,t,n){return new e({type:"nonoptional",innerType:t,...E(n)})}function s1(e,t){return new e({type:"success",innerType:t})}function c1(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function u1(e,t,n){return new e({type:"pipe",in:t,out:n})}function l1(e,t){return new e({type:"readonly",innerType:t})}function d1(e,t,n){return new e({type:"template_literal",parts:t,...E(n)})}function m1(e,t){return new e({type:"lazy",getter:t})}function p1(e,t){return new e({type:"promise",innerType:t})}function mf(e,t,n){let i=E(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function pf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function ff(e,t){let n=xE(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Mn(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(Mn(o))}},e(i.value,i)),t);return n}function xE(e,t){let n=new X({check:"custom",...E(t)});return n._zod.check=e,n}function gf(e){let t=new X({check:"describe"});return t._zod.onattach=[n=>{let i=_e.get(n)??{};_e.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function hf(e){let t=new X({check:"meta"});return t._zod.onattach=[n=>{let i=_e.get(n)??{};_e.add(n,{...i,...e})}],t._zod.check=()=>{},t}function vf(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??So,u=e.Boolean??bo,l=e.String??Kr,m=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new c({type:"pipe",in:m,out:p,transform:((v,A)=>{let Y=v;return n.case!=="sensitive"&&(Y=Y.toLowerCase()),o.has(Y)?!0:a.has(Y)?!1:(A.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:A.value,inst:g,continue:!1}),{})}),reverseTransform:((v,A)=>v===!0?i[0]||"true":r[0]||"false"),error:n.error});return g}function ti(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 xr(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??_e,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 m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,m);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,m)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Z(p,t,m),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&Me(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 Ar(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??(A=>A);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}/`,m=a[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:l+m}},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 m=c.schema;for(let p in m)delete m[p];m.$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 fr=v.compile();return(Ne,te)=>fr(g,Ne,te)},o,a=Hr,c=!Wr.jitless,l=c&&gd.value,m=t.catchall,p;e._zod.parse=(g,v)=>{p??(p=i.value);let A=g.value;return a(A)?c&&l&&v?.async===!1&&v.jitless!==!0?(o||(o=r(t.shape)),g=o(g,v),m?E_([],A,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function a_(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=>!Sr(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=>Oe(a,i,se())))}),t)}var yo=f("$ZodUnion",(e,t)=>{N.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=>so(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=>a_(c,i,e,r)):a_(a,i,e,r)}});function s_(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=>Oe(a,i,se())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var op=f("$ZodXor",(e,t)=>{yo.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=>s_(c,i,e,r)):s_(a,i,e,r)}}),ap=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,yo.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=Mn(()=>{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(!Hr(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)}}),sp=f("$ZodIntersection",(e,t)=>{N.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])=>c_(n,u,l)):c_(n,o,a)}});function Sm(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(yr(e)&&yr(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=Sm(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=Sm(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 c_(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}),Sr(e))return e;let a=Sm(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 Ds=f("$ZodTuple",(e,t)=>{N.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=u_(n,"optin"),u=u_(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 m=0;m<n.length;m++){let p=n[m]._zod.run({value:o[m],issues:[]},r);p instanceof Promise?a.push(p.then(g=>{l[m]=g})):l[m]=p}if(t.rest){let m=n.length-1,p=o.slice(n.length);for(let g of p){m++;let v=t.rest._zod.run({value:g,issues:[]},r);v instanceof Promise?a.push(v.then(A=>l_(A,i,m))):l_(v,i,m)}}return a.length?Promise.all(a).then(()=>d_(l,i,n,o,u)):d_(l,i,n,o,u)}});function u_(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function l_(e,t,n){e.issues.length&&t.issues.push(...Be(n,e.issues)),t.value[n]=e.value}function d_(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(...Be(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 cp=f("$ZodRecord",(e,t)=>{N.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!yr(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 m=t.keyType._zod.run({value:l,issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(v=>Oe(v,i,se())),input:l,path:[l],inst:e});continue}let p=m.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(...Be(l,v.issues)),n.value[p]=v.value})):(g.issues.length&&n.issues.push(...Be(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"&&$s.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=>Oe(p,i,se())),input:c,path:[c],inst:e});continue}let m=t.valueType._zod.run({value:r[c],issues:[]},i);m instanceof Promise?o.push(m.then(p=>{p.issues.length&&n.issues.push(...Be(c,p.issues)),n.value[u.value]=p.value})):(m.issues.length&&n.issues.push(...Be(c,m.issues)),n.value[u.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),up=f("$ZodMap",(e,t)=>{N.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(([m,p])=>{m_(m,p,n,a,r,e,i)})):m_(u,l,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function m_(e,t,n,i,r,o,a){e.issues.length&&(co.has(typeof i)?n.issues.push(...Be(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(c=>Oe(c,a,se()))})),t.issues.length&&(co.has(typeof i)?n.issues.push(...Be(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(c=>Oe(c,a,se()))})),n.value.set(e.value,t.value)}var lp=f("$ZodSet",(e,t)=>{N.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=>p_(u,n))):p_(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function p_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var dp=f("$ZodEnum",(e,t)=>{N.init(e,t);let n=ao(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>co.has(typeof r)).map(r=>typeof r=="string"?ot(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}}),mp=f("$ZodLiteral",(e,t)=>{if(N.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"?ot(i):i?ot(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}}),pp=f("$ZodFile",(e,t)=>{N.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}}),fp=f("$ZodTransform",(e,t)=>{N.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new hr(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 bt;return n.value=r,n.fallback=!0,n}});function f_(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ms=f("$ZodOptional",(e,t)=>{N.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(`^(${so(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=>f_(a,r)):f_(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),gp=f("$ZodExactOptional",(e,t)=>{Ms.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)}),hp=f("$ZodNullable",(e,t)=>{N.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(`^(${so(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)}),vp=f("$ZodDefault",(e,t)=>{N.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=>g_(o,t)):g_(r,t)}});function g_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bp=f("$ZodPrefault",(e,t)=>{N.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))}),yp=f("$ZodNonOptional",(e,t)=>{N.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=>h_(o,e)):h_(r,e)}});function h_(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 Sp=f("$ZodSuccess",(e,t)=>{N.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new hr("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)}}),_p=f("$ZodCatch",(e,t)=>{N.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=>Oe(a,i,se()))},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=>Oe(o,i,se()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Ep=f("$ZodNaN",(e,t)=>{N.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)}),js=f("$ZodPipe",(e,t)=>{N.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=>Cs(a,t.in,i)):Cs(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Cs(o,t.out,i)):Cs(r,t.out,i)}});function Cs(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 So=f("$ZodCodec",(e,t)=>{N.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=>Ps(a,t,i)):Ps(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Ps(a,t,i)):Ps(o,t,i)}}});function Ps(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=>Ns(e,o,t.out,n)):Ns(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Ns(e,o,t.in,n)):Ns(e,r,t.in,n)}}function Ns(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var xp=f("$ZodPreprocess",(e,t)=>{js.init(e,t)}),Ap=f("$ZodReadonly",(e,t)=>{N.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(v_):v_(r)}});function v_(e){return e.value=Object.freeze(e.value),e}var Ip=f("$ZodTemplateLiteral",(e,t)=>{N.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||vd.has(typeof i))n.push(ot(`${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)}),$p=f("$ZodFunction",(e,t)=>(N.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?gs(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?gs(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 hs(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await hs(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 Ds({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)),Tp=f("$ZodPromise",(e,t)=>{N.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Rp=f("$ZodLazy",(e,t)=>{N.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)}),Cp=f("$ZodCustom",(e,t)=>{X.init(e,t),N.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=>b_(o,n,i,e));b_(r,n,i,e)}});function b_(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(jn(r))}}var Eo={};$t(Eo,{ar:()=>A_,az:()=>I_,be:()=>T_,bg:()=>R_,ca:()=>C_,cs:()=>P_,da:()=>N_,de:()=>w_,el:()=>k_,en:()=>zs,eo:()=>O_,es:()=>D_,fa:()=>M_,fi:()=>j_,fr:()=>z_,frCA:()=>L_,he:()=>U_,hr:()=>F_,hu:()=>B_,hy:()=>Z_,id:()=>G_,is:()=>W_,it:()=>H_,ja:()=>q_,ka:()=>K_,kh:()=>Y_,km:()=>Ls,ko:()=>X_,lt:()=>Q_,mk:()=>eE,ms:()=>tE,nl:()=>rE,no:()=>nE,ota:()=>iE,pl:()=>aE,ps:()=>oE,pt:()=>sE,ro:()=>cE,ru:()=>lE,sl:()=>dE,sv:()=>mE,ta:()=>pE,th:()=>fE,tr:()=>gE,ua:()=>hE,uk:()=>Us,ur:()=>vE,uz:()=>bE,vi:()=>yE,yo:()=>EE,zhCN:()=>SE,zhTW:()=>_E});var YO=()=>{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 A_(){return{localeError:YO()}}var XO=()=>{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 I_(){return{localeError:XO()}}function $_(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 JO=()=>{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=$_(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=$_(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 T_(){return{localeError:JO()}}var QO=()=>{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 R_(){return{localeError:QO()}}var eD=()=>{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 C_(){return{localeError:eD()}}var tD=()=>{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 P_(){return{localeError:tD()}}var rD=()=>{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 N_(){return{localeError:rD()}}var nD=()=>{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 w_(){return{localeError:nD()}}var iD=()=>{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 k_(){return{localeError:iD()}}var oD=()=>{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 zs(){return{localeError:oD()}}var aD=()=>{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 O_(){return{localeError:aD()}}var sD=()=>{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 D_(){return{localeError:sD()}}var cD=()=>{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 M_(){return{localeError:cD()}}var uD=()=>{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 j_(){return{localeError:uD()}}var lD=()=>{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 z_(){return{localeError:lD()}}var dD=()=>{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 L_(){return{localeError:dD()}}var mD=()=>{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 m=n(l);return m?m.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 m=l.expected,p=u[m??""]??i(m),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 m=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 ${m[0]} \u05D0\u05D5 ${m[1]}`;let p=m[m.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 ${m.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",Y=l.inclusive?`${l.maximum} ${m?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${m?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${Y}`.trim()}let g=l.inclusive?"<=":"<",v=o(l.origin??"value");return m?.unit?`${m.longLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()} ${m.unit}`:`${m?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()}`}case"too_small":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let z=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${z}`}let Y=l.inclusive?`${l.minimum} ${m?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${m?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${Y}`.trim()}let g=l.inclusive?">=":">",v=o(l.origin??"value");return m?.unit?`${m.shortLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()}`}case"invalid_format":{let m=l;if(m.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${m.prefix}"`;if(m.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${m.suffix}"`;if(m.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${m.includes}"`;if(m.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 ${m.pattern}`;let p=c[m.format],g=p?.label??m.format,A=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${A}`}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 U_(){return{localeError:mD()}}var pD=()=>{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 F_(){return{localeError:pD()}}var fD=()=>{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 B_(){return{localeError:fD()}}function V_(e,t,n){return Math.abs(e)===1?t:n}function Vn(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 gD=()=>{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=V_(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 ${Vn(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 ${Vn(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=V_(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 ${Vn(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 ${Vn(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 ${Vn(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 ${Vn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Z_(){return{localeError:gD()}}var hD=()=>{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 G_(){return{localeError:hD()}}var vD=()=>{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 W_(){return{localeError:vD()}}var bD=()=>{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 H_(){return{localeError:bD()}}var yD=()=>{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 q_(){return{localeError:yD()}}var SD=()=>{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 K_(){return{localeError:SD()}}var _D=()=>{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 Ls(){return{localeError:_D()}}function Y_(){return Ls()}var ED=()=>{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 X_(){return{localeError:ED()}}var _o=e=>e.charAt(0).toUpperCase()+e.slice(1);function J_(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 xD=()=>{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,J_(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${_o(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`${_o(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,J_(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${_o(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`${_o(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`${_o(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Q_(){return{localeError:xD()}}var AD=()=>{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 eE(){return{localeError:AD()}}var ID=()=>{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 tE(){return{localeError:ID()}}var $D=()=>{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 rE(){return{localeError:$D()}}var TD=()=>{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 nE(){return{localeError:TD()}}var RD=()=>{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 iE(){return{localeError:RD()}}var CD=()=>{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 oE(){return{localeError:CD()}}var PD=()=>{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 aE(){return{localeError:PD()}}var ND=()=>{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 sE(){return{localeError:ND()}}var wD=()=>{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 cE(){return{localeError:wD()}}function uE(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 kD=()=>{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=uE(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=uE(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 lE(){return{localeError:kD()}}var OD=()=>{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 dE(){return{localeError:OD()}}var DD=()=>{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 mE(){return{localeError:DD()}}var MD=()=>{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 pE(){return{localeError:MD()}}var jD=()=>{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 fE(){return{localeError:jD()}}var zD=()=>{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 gE(){return{localeError:zD()}}var LD=()=>{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 Us(){return{localeError:LD()}}function hE(){return Us()}var UD=()=>{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 vE(){return{localeError:UD()}}var FD=()=>{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 bE(){return{localeError:FD()}}var BD=()=>{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 yE(){return{localeError:BD()}}var VD=()=>{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 SE(){return{localeError:VD()}}var ZD=()=>{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 _E(){return{localeError:ZD()}}var GD=()=>{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 EE(){return{localeError:GD()}}var xE,Pp=Symbol("ZodOutput"),Np=Symbol("ZodInput"),Fs=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 Bs(){return new Fs}(xE=globalThis).__zod_globalRegistry??(xE.__zod_globalRegistry=Bs());var _e=globalThis.__zod_globalRegistry;function wp(e,t){return new e({type:"string",...E(t)})}function kp(e,t){return new e({type:"string",coerce:!0,...E(t)})}function Vs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function xo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function Gs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function Ws(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function Hs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function Ao(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function qs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function Ks(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function Ys(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function Xs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function Js(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function Qs(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function ec(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function tc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function rc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function Op(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function nc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function ic(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function oc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function ac(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function sc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function cc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}var Dp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Mp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function jp(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function zp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function Lp(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function Up(e,t){return new e({type:"number",checks:[],...E(t)})}function Fp(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function Bp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function Vp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function Zp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function Gp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function Wp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function Hp(e,t){return new e({type:"boolean",...E(t)})}function qp(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function Kp(e,t){return new e({type:"bigint",...E(t)})}function Yp(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function Xp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function Jp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function Qp(e,t){return new e({type:"symbol",...E(t)})}function ef(e,t){return new e({type:"undefined",...E(t)})}function tf(e,t){return new e({type:"null",...E(t)})}function rf(e){return new e({type:"any"})}function nf(e){return new e({type:"unknown"})}function of(e,t){return new e({type:"never",...E(t)})}function af(e,t){return new e({type:"void",...E(t)})}function sf(e,t){return new e({type:"date",...E(t)})}function cf(e,t){return new e({type:"date",coerce:!0,...E(t)})}function uf(e,t){return new e({type:"nan",...E(t)})}function Ct(e,t){return new Ts({check:"less_than",...E(t),value:e,inclusive:!1})}function Qe(e,t){return new Ts({check:"less_than",...E(t),value:e,inclusive:!0})}function Pt(e,t){return new Rs({check:"greater_than",...E(t),value:e,inclusive:!1})}function De(e,t){return new Rs({check:"greater_than",...E(t),value:e,inclusive:!0})}function uc(e){return Pt(0,e)}function lc(e){return Ct(0,e)}function dc(e){return Qe(0,e)}function mc(e){return De(0,e)}function _r(e,t){return new tm({check:"multiple_of",...E(t),value:e})}function Er(e,t){return new im({check:"max_size",...E(t),maximum:e})}function Nt(e,t){return new om({check:"min_size",...E(t),minimum:e})}function Yr(e,t){return new am({check:"size_equals",...E(t),size:e})}function Xr(e,t){return new sm({check:"max_length",...E(t),maximum:e})}function Xt(e,t){return new cm({check:"min_length",...E(t),minimum:e})}function Jr(e,t){return new um({check:"length_equals",...E(t),length:e})}function Zn(e,t){return new lm({check:"string_format",format:"regex",...E(t),pattern:e})}function Gn(e){return new dm({check:"string_format",format:"lowercase",...E(e)})}function Wn(e){return new mm({check:"string_format",format:"uppercase",...E(e)})}function Hn(e,t){return new pm({check:"string_format",format:"includes",...E(t),includes:e})}function qn(e,t){return new fm({check:"string_format",format:"starts_with",...E(t),prefix:e})}function Kn(e,t){return new gm({check:"string_format",format:"ends_with",...E(t),suffix:e})}function pc(e,t,n){return new hm({check:"property",property:e,schema:t,...E(n)})}function Yn(e,t){return new vm({check:"mime_type",mime:e,...E(t)})}function yt(e){return new bm({check:"overwrite",tx:e})}function Xn(e){return yt(t=>t.normalize(e))}function Jn(){return yt(e=>e.trim())}function Qn(){return yt(e=>e.toLowerCase())}function ei(){return yt(e=>e.toUpperCase())}function ti(){return yt(e=>fd(e))}function lf(e,t,n){return new e({type:"array",element:t,...E(n)})}function HD(e,t,n){return new e({type:"union",options:t,...E(n)})}function qD(e,t,n){return new e({type:"union",options:t,inclusive:!1,...E(n)})}function KD(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...E(i)})}function YD(e,t,n){return new e({type:"intersection",left:t,right:n})}function XD(e,t,n,i){let r=n instanceof N,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function JD(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...E(i)})}function QD(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...E(i)})}function e1(e,t,n){return new e({type:"set",valueType:t,...E(n)})}function t1(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 r1(e,t,n){return new e({type:"enum",entries:t,...E(n)})}function n1(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(n)})}function df(e,t){return new e({type:"file",...E(t)})}function i1(e,t){return new e({type:"transform",transform:t})}function o1(e,t){return new e({type:"optional",innerType:t})}function a1(e,t){return new e({type:"nullable",innerType:t})}function s1(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():hd(n)}})}function c1(e,t,n){return new e({type:"nonoptional",innerType:t,...E(n)})}function u1(e,t){return new e({type:"success",innerType:t})}function l1(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function d1(e,t,n){return new e({type:"pipe",in:t,out:n})}function m1(e,t){return new e({type:"readonly",innerType:t})}function p1(e,t,n){return new e({type:"template_literal",parts:t,...E(n)})}function f1(e,t){return new e({type:"lazy",getter:t})}function g1(e,t){return new e({type:"promise",innerType:t})}function mf(e,t,n){let i=E(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function pf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function ff(e,t){let n=AE(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(jn(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(jn(o))}},e(i.value,i)),t);return n}function AE(e,t){let n=new X({check:"custom",...E(t)});return n._zod.check=e,n}function gf(e){let t=new X({check:"describe"});return t._zod.onattach=[n=>{let i=_e.get(n)??{};_e.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function hf(e){let t=new X({check:"meta"});return t._zod.onattach=[n=>{let i=_e.get(n)??{};_e.add(n,{...i,...e})}],t._zod.check=()=>{},t}function vf(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??So,u=e.Boolean??bo,l=e.String??Kr,m=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new c({type:"pipe",in:m,out:p,transform:((v,A)=>{let Y=v;return n.case!=="sensitive"&&(Y=Y.toLowerCase()),o.has(Y)?!0:a.has(Y)?!1:(A.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:A.value,inst:g,continue:!1}),{})}),reverseTransform:((v,A)=>v===!0?i[0]||"true":r[0]||"false"),error:n.error});return g}function ri(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 xr(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??_e,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 m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,m);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,m)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Z(p,t,m),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&Me(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 Ar(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??(A=>A);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}/`,m=a[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:l+m}},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 m=c.schema;for(let p in m)delete m[p];m.$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 Ir(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,m={...l},p=u.ref;if(u.ref=null,p){i(p);let v=e.seen.get(p),A=v.schema;if(A.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(A)):Object.assign(l,A),Object.assign(l,m),c._zod.parent===p)for(let z in l)z==="$ref"||z==="allOf"||z in m||delete l[z];if(A.$ref&&v.def)for(let z in l)z==="$ref"||z==="allOf"||z in v.def&&JSON.stringify(l[z])===JSON.stringify(v.def[z])&&delete l[z]}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 A in l)A==="$ref"||A==="allOf"||A in v.def&&JSON.stringify(l[A])===JSON.stringify(v.def[A])&&delete l[A]}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:ri(t,"input",e.processors),output:ri(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Me(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 Me(i.element,n);if(i.type==="set")return Me(i.valueType,n);if(i.type==="lazy")return Me(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 Me(i.innerType,n);if(i.type==="intersection")return Me(i.left,n)||Me(i.right,n);if(i.type==="record"||i.type==="map")return Me(i.keyType,n)||Me(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Me(i.in,n)||Me(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Me(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Me(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Me(r,n))return!0;return!!(i.rest&&Me(i.rest,n))}return!1}var bf=(e,t={})=>n=>{let i=xr({...n,processors:t});return Z(e,i),Ar(i,e),Ir(i,e)},ri=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=xr({...r??{},target:o,io:t,processors:n});return Z(e,a),Ar(a,e),Ir(a,e)};var f1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yf=(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=f1[c]??c,r.format===""&&delete r.format,c==="time"&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){let m=[...u];m.length===1?r.pattern=m[0].source:m.length>1&&(r.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Sf=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:m}=e._zod.bag;typeof c=="string"&&c.includes("int")?r.type="integer":r.type="number";let p=typeof m=="number"&&m>=(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=m,r.exclusiveMinimum=!0):r.exclusiveMinimum=m: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)},_f=(e,t,n,i)=>{n.type="boolean"},Ef=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},xf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Af=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},If=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$f=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Tf=(e,t,n,i)=>{n.not={}},Rf=(e,t,n,i)=>{},Pf=(e,t,n,i)=>{},Cf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Nf=(e,t,n,i)=>{let r=e._zod.def,o=ao(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},wf=(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},kf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Of=(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},Df=(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)},Mf=(e,t,n,i)=>{n.type="boolean"},jf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},zf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Lf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Uf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Ff=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Bf=(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"]})},Vf=(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 m=o.shape[l]._zod;return t.io==="input"?m.optin===void 0:m.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)},fc=(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},Zf=(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},Gf=(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:m,maximum:p}=e._zod.bag;typeof m=="number"&&(r.minItems=m),typeof p=="number"&&(r.maxItems=p)},Wf=(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 m=Z(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of u)r.patternProperties[p.source]=m}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 m=[...l].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(r.required=m)}},Hf=(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"}]},qf=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Kf=(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))},Yf=(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)))},Xf=(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},Jf=(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},Qf=(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},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},gc=(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},pc={string:yf,number:Sf,boolean:_f,bigint:Ef,symbol:xf,null:Af,undefined:If,void:$f,never:Tf,any:Rf,unknown:Pf,date:Cf,enum:Nf,literal:wf,nan:kf,template_literal:Of,file:Df,success:Mf,custom:jf,function:zf,transform:Lf,map:Uf,set:Ff,array:Bf,object:Vf,union:fc,intersection:Zf,tuple:Gf,record:Wf,nullable:Hf,nonoptional:qf,default:Kf,prefault:Yf,catch:Xf,pipe:Jf,readonly:Qf,promise:eg,optional:gc,lazy:tg};function hc(e,t){if("_idmap"in e){let i=e,r=xr({...t,processors:pc}),o={};for(let u of i._idmap.entries()){let[l,m]=u;Z(m,r)}let a={},c={registry:i,uri:t?.uri,defs:o};r.external=c;for(let u of i._idmap.entries()){let[l,m]=u;Ar(r,m),a[l]=Ir(r,m)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=xr({...t,processors:pc});return Z(e,n),Ar(n,e),Ir(n,e)}var vc=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=xr({processors:pc,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)),Ar(this.ctx,t);let i=Ir(this.ctx,t),{"~standard":r,...o}=i;return o}};var AE={};var Io={};$t(Io,{ZodAny:()=>Ig,ZodArray:()=>Pg,ZodBase64:()=>zc,ZodBase64URL:()=>Lc,ZodBigInt:()=>li,ZodBigIntFormat:()=>Bc,ZodBoolean:()=>ui,ZodCIDRv4:()=>Mc,ZodCIDRv6:()=>jc,ZodCUID:()=>Pc,ZodCUID2:()=>Cc,ZodCatch:()=>Xg,ZodCodec:()=>jo,ZodCustom:()=>zo,ZodCustomStringFormat:()=>si,ZodDate:()=>wo,ZodDefault:()=>Gg,ZodDiscriminatedUnion:()=>Ng,ZodE164:()=>Uc,ZodEmail:()=>$c,ZodEmoji:()=>Tc,ZodEnum:()=>oi,ZodExactOptional:()=>Bg,ZodFile:()=>Ug,ZodFunction:()=>sh,ZodGUID:()=>To,ZodIPv4:()=>Oc,ZodIPv6:()=>Dc,ZodIntersection:()=>wg,ZodJWT:()=>Fc,ZodKSUID:()=>kc,ZodLazy:()=>ih,ZodLiteral:()=>Lg,ZodMAC:()=>bg,ZodMap:()=>jg,ZodNaN:()=>Qg,ZodNanoID:()=>Rc,ZodNever:()=>Tg,ZodNonOptional:()=>qc,ZodNull:()=>xg,ZodNullable:()=>Zg,ZodNumber:()=>ci,ZodNumberFormat:()=>en,ZodObject:()=>Oo,ZodOptional:()=>Hc,ZodPipe:()=>Mo,ZodPrefault:()=>Hg,ZodPreprocess:()=>eh,ZodPromise:()=>ah,ZodReadonly:()=>th,ZodRecord:()=>ii,ZodSet:()=>zg,ZodString:()=>ai,ZodStringFormat:()=>K,ZodSuccess:()=>Yg,ZodSymbol:()=>_g,ZodTemplateLiteral:()=>nh,ZodTransform:()=>Fg,ZodTuple:()=>Og,ZodType:()=>w,ZodULID:()=>Nc,ZodURL:()=>No,ZodUUID:()=>wt,ZodUndefined:()=>Eg,ZodUnion:()=>Do,ZodUnknown:()=>$g,ZodVoid:()=>Rg,ZodXID:()=>wc,ZodXor:()=>Cg,_ZodString:()=>Ic,_default:()=>Wg,_function:()=>kx,any:()=>lx,array:()=>ko,base64:()=>HE,base64url:()=>qE,bigint:()=>ox,boolean:()=>Sg,catch:()=>Jg,check:()=>Ox,cidrv4:()=>GE,cidrv6:()=>WE,codec:()=>Px,cuid:()=>jE,cuid2:()=>zE,custom:()=>Dx,date:()=>mx,describe:()=>Mx,discriminatedUnion:()=>bx,e164:()=>KE,email:()=>TE,emoji:()=>DE,enum:()=>Gc,exactOptional:()=>Vg,file:()=>Ix,float32:()=>tx,float64:()=>rx,function:()=>kx,guid:()=>RE,hash:()=>ex,hex:()=>QE,hostname:()=>JE,httpUrl:()=>OE,instanceof:()=>zx,int:()=>xc,int32:()=>nx,int64:()=>ax,intersection:()=>kg,invertCodec:()=>Cx,ipv4:()=>BE,ipv6:()=>ZE,json:()=>Ux,jwt:()=>YE,keyof:()=>px,ksuid:()=>FE,lazy:()=>oh,literal:()=>Ax,looseObject:()=>hx,looseRecord:()=>Sx,mac:()=>VE,map:()=>_x,meta:()=>jx,nan:()=>Rx,nanoid:()=>ME,nativeEnum:()=>xx,never:()=>Vc,nonoptional:()=>Kg,null:()=>Ag,nullable:()=>Po,nullish:()=>$x,number:()=>yg,object:()=>fx,optional:()=>Ro,partialRecord:()=>yx,pipe:()=>Ac,prefault:()=>qg,preprocess:()=>Fx,promise:()=>wx,readonly:()=>rh,record:()=>Mg,refine:()=>ch,set:()=>Ex,strictObject:()=>gx,string:()=>$o,stringFormat:()=>XE,stringbool:()=>Lx,success:()=>Tx,superRefine:()=>uh,symbol:()=>cx,templateLiteral:()=>Nx,transform:()=>Wc,tuple:()=>Dg,uint32:()=>ix,uint64:()=>sx,ulid:()=>LE,undefined:()=>ux,union:()=>Zc,unknown:()=>Qr,url:()=>kE,uuid:()=>PE,uuidv4:()=>CE,uuidv6:()=>NE,uuidv7:()=>wE,void:()=>dx,xid:()=>UE,xor:()=>vx});var bc={};$t(bc,{endsWith:()=>qn,gt:()=>Ct,gte:()=>De,includes:()=>Wn,length:()=>Jr,lowercase:()=>Zn,lt:()=>Pt,lte:()=>Qe,maxLength:()=>Xr,maxSize:()=>Er,mime:()=>Kn,minLength:()=>Xt,minSize:()=>Nt,multipleOf:()=>_r,negative:()=>uc,nonnegative:()=>dc,nonpositive:()=>lc,normalize:()=>Yn,overwrite:()=>yt,positive:()=>cc,property:()=>mc,regex:()=>Vn,size:()=>Yr,slugify:()=>ei,startsWith:()=>Hn,toLowerCase:()=>Jn,toUpperCase:()=>Qn,trim:()=>Xn,uppercase:()=>Gn});var ni={};$t(ni,{ZodISODate:()=>Sc,ZodISODateTime:()=>yc,ZodISODuration:()=>Ec,ZodISOTime:()=>_c,date:()=>ng,datetime:()=>rg,duration:()=>og,time:()=>ig});var yc=f("ZodISODateTime",(e,t)=>{wm.init(e,t),K.init(e,t)});function rg(e){return Mp(yc,e)}var Sc=f("ZodISODate",(e,t)=>{km.init(e,t),K.init(e,t)});function ng(e){return jp(Sc,e)}var _c=f("ZodISOTime",(e,t)=>{Om.init(e,t),K.init(e,t)});function ig(e){return zp(_c,e)}var Ec=f("ZodISODuration",(e,t)=>{Dm.init(e,t),K.init(e,t)});function og(e){return Lp(Ec,e)}var IE=(e,t)=>{mo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>fo(e,n)},flatten:{value:n=>po(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,On,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,On,2)}},isEmpty:{get(){return e.issues.length===0}}})},h1=f("ZodError",IE),Ze=f("ZodError",IE,{Parent:Error});var ag=jn(Ze),sg=zn(Ze),cg=Ln(Ze),ug=Un(Ze),lg=hs(Ze),dg=vs(Ze),mg=bs(Ze),pg=ys(Ze),fg=Ss(Ze),gg=_s(Ze),hg=Es(Ze),vg=xs(Ze);var $E=new WeakMap;function Co(e,t,n){let i=Object.getPrototypeOf(e),r=$E.get(i);if(r||(r=new Set,$E.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 w=f("ZodType",(e,t)=>(N.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ri(e,"input"),output:ri(e,"output")}}),e.toJSONSchema=bf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>ag(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>cg(e,n,i),e.parseAsync=async(n,i)=>sg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>ug(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>lg(e,n,i),e.decode=(n,i)=>dg(e,n,i),e.encodeAsync=async(n,i)=>mg(e,n,i),e.decodeAsync=async(n,i)=>pg(e,n,i),e.safeEncode=(n,i)=>fg(e,n,i),e.safeDecode=(n,i)=>gg(e,n,i),e.safeEncodeAsync=async(n,i)=>hg(e,n,i),e.safeDecodeAsync=async(n,i)=>vg(e,n,i),Co(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 ke(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(ch(n,i))},superRefine(n,i){return this.check(uh(n,i))},overwrite(n){return this.check(yt(n))},optional(){return Ro(this)},exactOptional(){return Vg(this)},nullable(){return Po(this)},nullish(){return Ro(Po(this))},nonoptional(n){return Kg(this,n)},array(){return ko(this)},or(n){return Zc([this,n])},and(n){return kg(this,n)},transform(n){return Ac(this,Wc(n))},default(n){return Wg(this,n)},prefault(n){return qg(this,n)},catch(n){return Jg(this,n)},pipe(n){return Ac(this,n)},readonly(){return rh(this)},describe(n){let i=this.clone();return _e.add(i,{description:n}),i},meta(...n){if(n.length===0)return _e.get(this);let i=this.clone();return _e.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 _e.get(e)?.description},configurable:!0}),e)),Ic=f("_ZodString",(e,t)=>{Kr.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>yf(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Co(e,"_ZodString",{regex(...i){return this.check(Vn(...i))},includes(...i){return this.check(Wn(...i))},startsWith(...i){return this.check(Hn(...i))},endsWith(...i){return this.check(qn(...i))},min(...i){return this.check(Xt(...i))},max(...i){return this.check(Xr(...i))},length(...i){return this.check(Jr(...i))},nonempty(...i){return this.check(Xt(1,...i))},lowercase(i){return this.check(Zn(i))},uppercase(i){return this.check(Gn(i))},trim(){return this.check(Xn())},normalize(...i){return this.check(Yn(...i))},toLowerCase(){return this.check(Jn())},toUpperCase(){return this.check(Qn())},slugify(){return this.check(ei())}})}),ai=f("ZodString",(e,t)=>{Kr.init(e,t),Ic.init(e,t),e.email=n=>e.check(Bs($c,n)),e.url=n=>e.check(Ao(No,n)),e.jwt=n=>e.check(sc(Fc,n)),e.emoji=n=>e.check(Hs(Tc,n)),e.guid=n=>e.check(xo(To,n)),e.uuid=n=>e.check(Vs(wt,n)),e.uuidv4=n=>e.check(Zs(wt,n)),e.uuidv6=n=>e.check(Gs(wt,n)),e.uuidv7=n=>e.check(Ws(wt,n)),e.nanoid=n=>e.check(qs(Rc,n)),e.guid=n=>e.check(xo(To,n)),e.cuid=n=>e.check(Ks(Pc,n)),e.cuid2=n=>e.check(Ys(Cc,n)),e.ulid=n=>e.check(Xs(Nc,n)),e.base64=n=>e.check(ic(zc,n)),e.base64url=n=>e.check(oc(Lc,n)),e.xid=n=>e.check(Js(wc,n)),e.ksuid=n=>e.check(Qs(kc,n)),e.ipv4=n=>e.check(ec(Oc,n)),e.ipv6=n=>e.check(tc(Dc,n)),e.cidrv4=n=>e.check(rc(Mc,n)),e.cidrv6=n=>e.check(nc(jc,n)),e.e164=n=>e.check(ac(Uc,n)),e.datetime=n=>e.check(rg(n)),e.date=n=>e.check(ng(n)),e.time=n=>e.check(ig(n)),e.duration=n=>e.check(og(n))});function $o(e){return wp(ai,e)}var K=f("ZodStringFormat",(e,t)=>{q.init(e,t),Ic.init(e,t)}),$c=f("ZodEmail",(e,t)=>{xm.init(e,t),K.init(e,t)});function TE(e){return Bs($c,e)}var To=f("ZodGUID",(e,t)=>{_m.init(e,t),K.init(e,t)});function RE(e){return xo(To,e)}var wt=f("ZodUUID",(e,t)=>{Em.init(e,t),K.init(e,t)});function PE(e){return Vs(wt,e)}function CE(e){return Zs(wt,e)}function NE(e){return Gs(wt,e)}function wE(e){return Ws(wt,e)}var No=f("ZodURL",(e,t)=>{Am.init(e,t),K.init(e,t)});function kE(e){return Ao(No,e)}function OE(e){return Ao(No,{protocol:Je.httpProtocol,hostname:Je.domain,..._.normalizeParams(e)})}var Tc=f("ZodEmoji",(e,t)=>{Im.init(e,t),K.init(e,t)});function DE(e){return Hs(Tc,e)}var Rc=f("ZodNanoID",(e,t)=>{$m.init(e,t),K.init(e,t)});function ME(e){return qs(Rc,e)}var Pc=f("ZodCUID",(e,t)=>{Tm.init(e,t),K.init(e,t)});function jE(e){return Ks(Pc,e)}var Cc=f("ZodCUID2",(e,t)=>{Rm.init(e,t),K.init(e,t)});function zE(e){return Ys(Cc,e)}var Nc=f("ZodULID",(e,t)=>{Pm.init(e,t),K.init(e,t)});function LE(e){return Xs(Nc,e)}var wc=f("ZodXID",(e,t)=>{Cm.init(e,t),K.init(e,t)});function UE(e){return Js(wc,e)}var kc=f("ZodKSUID",(e,t)=>{Nm.init(e,t),K.init(e,t)});function FE(e){return Qs(kc,e)}var Oc=f("ZodIPv4",(e,t)=>{Mm.init(e,t),K.init(e,t)});function BE(e){return ec(Oc,e)}var bg=f("ZodMAC",(e,t)=>{zm.init(e,t),K.init(e,t)});function VE(e){return Op(bg,e)}var Dc=f("ZodIPv6",(e,t)=>{jm.init(e,t),K.init(e,t)});function ZE(e){return tc(Dc,e)}var Mc=f("ZodCIDRv4",(e,t)=>{Lm.init(e,t),K.init(e,t)});function GE(e){return rc(Mc,e)}var jc=f("ZodCIDRv6",(e,t)=>{Um.init(e,t),K.init(e,t)});function WE(e){return nc(jc,e)}var zc=f("ZodBase64",(e,t)=>{Bm.init(e,t),K.init(e,t)});function HE(e){return ic(zc,e)}var Lc=f("ZodBase64URL",(e,t)=>{Vm.init(e,t),K.init(e,t)});function qE(e){return oc(Lc,e)}var Uc=f("ZodE164",(e,t)=>{Zm.init(e,t),K.init(e,t)});function KE(e){return ac(Uc,e)}var Fc=f("ZodJWT",(e,t)=>{Gm.init(e,t),K.init(e,t)});function YE(e){return sc(Fc,e)}var si=f("ZodCustomStringFormat",(e,t)=>{Wm.init(e,t),K.init(e,t)});function XE(e,t,n={}){return ti(si,e,t,n)}function JE(e){return ti(si,"hostname",Je.hostname,e)}function QE(e){return ti(si,"hex",Je.hex,e)}function ex(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=Je[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return ti(si,i,r,t)}var ci=f("ZodNumber",(e,t)=>{ws.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Sf(e,i,r,o),Co(e,"ZodNumber",{gt(i,r){return this.check(Ct(i,r))},gte(i,r){return this.check(De(i,r))},min(i,r){return this.check(De(i,r))},lt(i,r){return this.check(Pt(i,r))},lte(i,r){return this.check(Qe(i,r))},max(i,r){return this.check(Qe(i,r))},int(i){return this.check(xc(i))},safe(i){return this.check(xc(i))},positive(i){return this.check(Ct(0,i))},nonnegative(i){return this.check(De(0,i))},negative(i){return this.check(Pt(0,i))},nonpositive(i){return this.check(Qe(0,i))},multipleOf(i,r){return this.check(_r(i,r))},step(i,r){return this.check(_r(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 yg(e){return Up(ci,e)}var en=f("ZodNumberFormat",(e,t)=>{Hm.init(e,t),ci.init(e,t)});function xc(e){return Bp(en,e)}function tx(e){return Vp(en,e)}function rx(e){return Zp(en,e)}function nx(e){return Gp(en,e)}function ix(e){return Wp(en,e)}var ui=f("ZodBoolean",(e,t)=>{bo.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_f(e,n,i,r)});function Sg(e){return Hp(ui,e)}var li=f("ZodBigInt",(e,t)=>{ks.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Ef(e,i,r,o),e.gte=(i,r)=>e.check(De(i,r)),e.min=(i,r)=>e.check(De(i,r)),e.gt=(i,r)=>e.check(Ct(i,r)),e.gte=(i,r)=>e.check(De(i,r)),e.min=(i,r)=>e.check(De(i,r)),e.lt=(i,r)=>e.check(Pt(i,r)),e.lte=(i,r)=>e.check(Qe(i,r)),e.max=(i,r)=>e.check(Qe(i,r)),e.positive=i=>e.check(Ct(BigInt(0),i)),e.negative=i=>e.check(Pt(BigInt(0),i)),e.nonpositive=i=>e.check(Qe(BigInt(0),i)),e.nonnegative=i=>e.check(De(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(_r(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function ox(e){return Kp(li,e)}var Bc=f("ZodBigIntFormat",(e,t)=>{qm.init(e,t),li.init(e,t)});function ax(e){return Xp(Bc,e)}function sx(e){return Jp(Bc,e)}var _g=f("ZodSymbol",(e,t)=>{Km.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xf(e,n,i,r)});function cx(e){return Qp(_g,e)}var Eg=f("ZodUndefined",(e,t)=>{Ym.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>If(e,n,i,r)});function ux(e){return ef(Eg,e)}var xg=f("ZodNull",(e,t)=>{Xm.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Af(e,n,i,r)});function Ag(e){return tf(xg,e)}var Ig=f("ZodAny",(e,t)=>{Jm.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rf(e,n,i,r)});function lx(){return rf(Ig)}var $g=f("ZodUnknown",(e,t)=>{Qm.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Pf(e,n,i,r)});function Qr(){return nf($g)}var Tg=f("ZodNever",(e,t)=>{ep.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tf(e,n,i,r)});function Vc(e){return of(Tg,e)}var Rg=f("ZodVoid",(e,t)=>{tp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$f(e,n,i,r)});function dx(e){return af(Rg,e)}var wo=f("ZodDate",(e,t)=>{rp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Cf(e,i,r,o),e.min=(i,r)=>e.check(De(i,r)),e.max=(i,r)=>e.check(Qe(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 mx(e){return sf(wo,e)}var Pg=f("ZodArray",(e,t)=>{np.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Bf(e,n,i,r),e.element=t.element,Co(e,"ZodArray",{min(n,i){return this.check(Xt(n,i))},nonempty(n){return this.check(Xt(1,n))},max(n,i){return this.check(Xr(n,i))},length(n,i){return this.check(Jr(n,i))},unwrap(){return this.element}})});function ko(e,t){return lf(Pg,e,t)}function px(e){let t=e._zod.def.shape;return Gc(Object.keys(t))}var Oo=f("ZodObject",(e,t)=>{ip.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vf(e,n,i,r),_.defineLazy(e,"shape",()=>t.shape),Co(e,"ZodObject",{keyof(){return Gc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Qr()})},loose(){return this.clone({...this._zod.def,catchall:Qr()})},strict(){return this.clone({...this._zod.def,catchall:Vc()})},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(Hc,this,n[0])},required(...n){return _.required(qc,this,n[0])}})});function fx(e,t){let n={type:"object",shape:e??{},..._.normalizeParams(t)};return new Oo(n)}function gx(e,t){return new Oo({type:"object",shape:e,catchall:Vc(),..._.normalizeParams(t)})}function hx(e,t){return new Oo({type:"object",shape:e,catchall:Qr(),..._.normalizeParams(t)})}var Do=f("ZodUnion",(e,t)=>{yo.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fc(e,n,i,r),e.options=t.options});function Zc(e,t){return new Do({type:"union",options:e,..._.normalizeParams(t)})}var Cg=f("ZodXor",(e,t)=>{Do.init(e,t),op.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fc(e,n,i,r),e.options=t.options});function vx(e,t){return new Cg({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var Ng=f("ZodDiscriminatedUnion",(e,t)=>{Do.init(e,t),ap.init(e,t)});function bx(e,t,n){return new Ng({type:"union",options:t,discriminator:e,..._.normalizeParams(n)})}var wg=f("ZodIntersection",(e,t)=>{sp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zf(e,n,i,r)});function kg(e,t){return new wg({type:"intersection",left:e,right:t})}var Og=f("ZodTuple",(e,t)=>{Os.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gf(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Dg(e,t,n){let i=t instanceof N,r=i?n:t,o=i?t:null;return new Og({type:"tuple",items:e,rest:o,..._.normalizeParams(r)})}var ii=f("ZodRecord",(e,t)=>{cp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wf(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Mg(e,t,n){return!t||!t._zod?new ii({type:"record",keyType:$o(),valueType:e,..._.normalizeParams(t)}):new ii({type:"record",keyType:e,valueType:t,..._.normalizeParams(n)})}function yx(e,t,n){let i=ke(e);return i._zod.values=void 0,new ii({type:"record",keyType:i,valueType:t,..._.normalizeParams(n)})}function Sx(e,t,n){return new ii({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(n)})}var jg=f("ZodMap",(e,t)=>{up.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uf(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Nt(...n)),e.nonempty=n=>e.check(Nt(1,n)),e.max=(...n)=>e.check(Er(...n)),e.size=(...n)=>e.check(Yr(...n))});function _x(e,t,n){return new jg({type:"map",keyType:e,valueType:t,..._.normalizeParams(n)})}var zg=f("ZodSet",(e,t)=>{lp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ff(e,n,i,r),e.min=(...n)=>e.check(Nt(...n)),e.nonempty=n=>e.check(Nt(1,n)),e.max=(...n)=>e.check(Er(...n)),e.size=(...n)=>e.check(Yr(...n))});function Ex(e,t){return new zg({type:"set",valueType:e,..._.normalizeParams(t)})}var oi=f("ZodEnum",(e,t)=>{dp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Nf(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 oi({...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 oi({...t,checks:[],..._.normalizeParams(r),entries:o})}});function Gc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new oi({type:"enum",entries:n,..._.normalizeParams(t)})}function xx(e,t){return new oi({type:"enum",entries:e,..._.normalizeParams(t)})}var Lg=f("ZodLiteral",(e,t)=>{mp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wf(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 Ax(e,t){return new Lg({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var Ug=f("ZodFile",(e,t)=>{pp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Df(e,n,i,r),e.min=(n,i)=>e.check(Nt(n,i)),e.max=(n,i)=>e.check(Er(n,i)),e.mime=(n,i)=>e.check(Kn(Array.isArray(n)?n:[n],i))});function Ix(e){return df(Ug,e)}var Fg=f("ZodTransform",(e,t)=>{fp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lf(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new hr(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 Wc(e){return new Fg({type:"transform",transform:e})}var Hc=f("ZodOptional",(e,t)=>{Ds.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ro(e){return new Hc({type:"optional",innerType:e})}var Bg=f("ZodExactOptional",(e,t)=>{gp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Vg(e){return new Bg({type:"optional",innerType:e})}var Zg=f("ZodNullable",(e,t)=>{hp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Po(e){return new Zg({type:"nullable",innerType:e})}function $x(e){return Ro(Po(e))}var Gg=f("ZodDefault",(e,t)=>{vp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Wg(e,t){return new Gg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var Hg=f("ZodPrefault",(e,t)=>{bp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function qg(e,t){return new Hg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var qc=f("ZodNonOptional",(e,t)=>{yp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Kg(e,t){return new qc({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var Yg=f("ZodSuccess",(e,t)=>{Sp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Tx(e){return new Yg({type:"success",innerType:e})}var Xg=f("ZodCatch",(e,t)=>{_p.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Jg(e,t){return new Xg({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Qg=f("ZodNaN",(e,t)=>{Ep.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>kf(e,n,i,r)});function Rx(e){return uf(Qg,e)}var Mo=f("ZodPipe",(e,t)=>{Ms.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jf(e,n,i,r),e.in=t.in,e.out=t.out});function Ac(e,t){return new Mo({type:"pipe",in:e,out:t})}var jo=f("ZodCodec",(e,t)=>{Mo.init(e,t),So.init(e,t)});function Px(e,t,n){return new jo({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Cx(e){let t=e._zod.def;return new jo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var eh=f("ZodPreprocess",(e,t)=>{Mo.init(e,t),xp.init(e,t)}),th=f("ZodReadonly",(e,t)=>{Ap.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function rh(e){return new th({type:"readonly",innerType:e})}var nh=f("ZodTemplateLiteral",(e,t)=>{Ip.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Of(e,n,i,r)});function Nx(e,t){return new nh({type:"template_literal",parts:e,..._.normalizeParams(t)})}var ih=f("ZodLazy",(e,t)=>{Rp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>tg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function oh(e){return new ih({type:"lazy",getter:e})}var ah=f("ZodPromise",(e,t)=>{Tp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function wx(e){return new ah({type:"promise",innerType:e})}var sh=f("ZodFunction",(e,t)=>{$p.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zf(e,n,i,r)});function kx(e){return new sh({type:"function",input:Array.isArray(e?.input)?Dg(e?.input):e?.input??ko(Qr()),output:e?.output??Qr()})}var zo=f("ZodCustom",(e,t)=>{Pp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jf(e,n,i,r)});function Ox(e){let t=new X({check:"custom"});return t._zod.check=e,t}function Dx(e,t){return mf(zo,e??(()=>!0),t)}function ch(e,t={}){return pf(zo,e,t)}function uh(e,t){return ff(e,t)}var Mx=gf,jx=hf;function zx(e,t={}){let n=new zo({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 Lx=(...e)=>vf({Codec:jo,Boolean:ui,String:ai},...e);function Ux(e){let t=oh(()=>Zc([$o(e),yg(),Sg(),Ag(),ko(t),Mg($o(),t)]));return t}function Fx(e,t){return new eh({type:"pipe",in:Wc(e),out:t})}var b1={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 y1(e){se({customError:e})}function S1(){return se().customError}var lh;lh||(lh={});var x={...Io,...bc,iso:ni},_1=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 E1(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 x1(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 Bx(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.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 x.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=x1(r,t),a=$e(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 x.null();if(r.length===0)return x.never();if(r.length===1)return x.literal(r[0]);if(r.every(a=>typeof a=="string"))return x.enum(r);let o=r.map(a=>x.literal(a));return o.length<2?o[0]:x.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return Bx(a,t)});return r.length===0?x.never():r.length===1?r[0]:x.union(r)}if(!n)return x.any();let i;switch(n){case"string":{let r=x.string();if(e.format){let o=e.format;o==="email"?r=r.check(x.email()):o==="uri"||o==="uri-reference"?r=r.check(x.url()):o==="uuid"||o==="guid"?r=r.check(x.uuid()):o==="date-time"?r=r.check(x.iso.datetime()):o==="date"?r=r.check(x.iso.date()):o==="time"?r=r.check(x.iso.time()):o==="duration"?r=r.check(x.iso.duration()):o==="ipv4"?r=r.check(x.ipv4()):o==="ipv6"?r=r.check(x.ipv6()):o==="mac"?r=r.check(x.mac()):o==="cidr"?r=r.check(x.cidrv4()):o==="cidr-v6"?r=r.check(x.cidrv6()):o==="base64"?r=r.check(x.base64()):o==="base64url"?r=r.check(x.base64url()):o==="e164"?r=r.check(x.e164()):o==="jwt"?r=r.check(x.jwt()):o==="emoji"?r=r.check(x.emoji()):o==="nanoid"?r=r.check(x.nanoid()):o==="cuid"?r=r.check(x.cuid()):o==="cuid2"?r=r.check(x.cuid2()):o==="ulid"?r=r.check(x.ulid()):o==="xid"?r=r.check(x.xid()):o==="ksuid"&&(r=r.check(x.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"?x.number().int():x.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=x.boolean();break}case"null":{i=x.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let m=$e(l,t);r[u]=a.has(u)?m:m.optional()}if(e.propertyNames){let u=$e(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?$e(e.additionalProperties,t):x.any();if(Object.keys(r).length===0){i=x.record(u,l);break}let m=x.object(r).passthrough(),p=x.looseRecord(u,l);i=x.intersection(m,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),m=[];for(let g of l){let v=$e(u[g],t),A=x.string().regex(new RegExp(g));m.push(x.looseRecord(A,v))}let p=[];if(Object.keys(r).length>0&&p.push(x.object(r).passthrough()),p.push(...m),p.length===0)i=x.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=x.intersection(p[0],p[1]);for(let v=2;v<p.length;v++)g=x.intersection(g,p[v]);i=g}break}let c=x.object(r);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall($e(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=>$e(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?$e(o,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>$e(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?$e(e.additionalItems,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(o!==void 0){let a=$e(o,t),c=x.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=x.array(x.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function $e(e,t){if(typeof e=="boolean")return e?x.any():x.never();let n=Bx(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=>$e(l,t)),u=x.union(c);n=i?x.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>$e(l,t)),u=x.xor(c);n=i?x.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:x.any();else{let c=i?n:$e(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,$e(e.allOf[l],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=x.nullable(n)),e.readOnly===!0&&(n=x.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))_1.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 Vx(e,t){if(typeof e=="boolean")return e?x.any():x.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=E1(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??_e};return $e(n,o)}var dh={};$t(dh,{bigint:()=>T1,boolean:()=>$1,date:()=>R1,number:()=>I1,string:()=>A1});function A1(e){return kp(ai,e)}function I1(e){return Fp(ci,e)}function $1(e){return qp(ui,e)}function T1(e){return Yp(li,e)}function R1(e){return cf(wo,e)}se(js());var P1=Object.defineProperty,di=(e,t)=>P1(e,"name",{value:t,configurable:!0}),mh=["production","staging","development","platform","compliance"],Zx={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"},C1=new Set(mh);function Yc(e){return C1.has(e)}di(Yc,"isAccountStage");var Lo={ROOT:"root",PLATFORM:"platform"},N1=[...mh,Lo.ROOT];function Gx(e){return Yc(e)?Zx[e]:e.charAt(0).toUpperCase()+e.slice(1)}di(Gx,"getEnvironmentLabel");var Wx=["organisation","platform","account"],w1=s.enum(Wx),Kc={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"},k1={[Kc.ORGANISATION]:!0,[Kc.PLATFORM]:!0,[Kc.ACCOUNT]:!0},O1=new Set(Object.keys(k1));function Hx(e){return O1.has(e)}di(Hx,"isAccountTier");function ph(e){return e===Lo.ROOT?"organisation":e===Lo.PLATFORM?"platform":"account"}di(ph,"environmentToTier");function qx(e){return e==null||e===""||e===Lo.ROOT?null:Yc(e)?e:null}di(qx,"stageFromWireEnvironment");function Uo(e){return e.tier??ph(e.environment)}di(Uo,"accountTier");var D1=Object.defineProperty,Fo=(e,t)=>D1(e,"name",{value:t,configurable:!0});var Kx=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"}),fh=new Set;function Yx(e){if(!e)return"compute";if(e.startsWith("Custom::"))return Kx[e]??"compute";let t=Kx[e];return t||fh.add(e),t??"compute"}Fo(Yx,"categoriseResource");function M1(){return new Set(fh)}Fo(M1,"getUnmappedResourceTypes");function j1(){fh.clear()}Fo(j1,"clearUnmappedResourceTypes");var z1=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}),L1=30;function Xx(e){return z1[e]??L1}Fo(Xx,"getExpectedDuration");var U1=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 Jx(e){return U1[e]||e.split("::").pop()||e}Fo(Jx,"getFriendlyResourceType");var F1=Object.defineProperty,B1=(e,t)=>F1(e,"name",{value:t,configurable:!0}),V1={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},Z1=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,G1=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,W1=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/;function Qx(e){if(!e)return null;let t=e.replace(/^(https?:\/\/)[^@]+@/,"$1"),n=t.match(Z1)??t.match(G1)??e.match(W1);if(!n)return null;let[,i,r,o]=n;return!i||!r||!o?null:{provider:V1[i]??"other",owner:r,repo:o,host:i}}B1(Qx,"parseGitRemoteUrl");var gh=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy","deploy:oidc:mint"],eA={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"},H1=gh.filter(e=>eA[e]==="machine"),q1=gh.filter(e=>eA[e]==="user");var K1=Object.defineProperty,mi=(e,t)=>K1(e,"name",{value:t,configurable:!0}),Jc=/^[a-zA-Z_][a-zA-Z0-9._-]*$/,hh="Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",Bo=/^[a-zA-Z][a-zA-Z0-9._-]*$/,Qc="Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";var Xc=s.string().regex(Bo,Qc),tA=s.object({app:Xc.describe("Application name"),cluster:Xc.optional().describe("Cluster name"),service:Xc.optional().describe("Service name"),lambda:Xc.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 vh(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}mi(vh,"buildNamespaceParts");function bh(e,t){let n=vh(e);return t&&n.push(t),"/"+n.join("/")}mi(bh,"buildParameterPath");function yh(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}}mi(yh,"parseParameterPath");function rA(e){let t=yh(e);return t?tA.safeParse(t.namespace).success&&bh(t.namespace,t.name)===e:!1}mi(rA,"isManageablePath");function nA(e){let t={};for(let n of e.split(`
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 Ir(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,m={...l},p=u.ref;if(u.ref=null,p){i(p);let v=e.seen.get(p),A=v.schema;if(A.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(A)):Object.assign(l,A),Object.assign(l,m),c._zod.parent===p)for(let z in l)z==="$ref"||z==="allOf"||z in m||delete l[z];if(A.$ref&&v.def)for(let z in l)z==="$ref"||z==="allOf"||z in v.def&&JSON.stringify(l[z])===JSON.stringify(v.def[z])&&delete l[z]}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 A in l)A==="$ref"||A==="allOf"||A in v.def&&JSON.stringify(l[A])===JSON.stringify(v.def[A])&&delete l[A]}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:ni(t,"input",e.processors),output:ni(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Me(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 Me(i.element,n);if(i.type==="set")return Me(i.valueType,n);if(i.type==="lazy")return Me(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 Me(i.innerType,n);if(i.type==="intersection")return Me(i.left,n)||Me(i.right,n);if(i.type==="record"||i.type==="map")return Me(i.keyType,n)||Me(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Me(i.in,n)||Me(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Me(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Me(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Me(r,n))return!0;return!!(i.rest&&Me(i.rest,n))}return!1}var bf=(e,t={})=>n=>{let i=xr({...n,processors:t});return Z(e,i),Ar(i,e),Ir(i,e)},ni=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=xr({...r??{},target:o,io:t,processors:n});return Z(e,a),Ar(a,e),Ir(a,e)};var h1={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},yf=(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=h1[c]??c,r.format===""&&delete r.format,c==="time"&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){let m=[...u];m.length===1?r.pattern=m[0].source:m.length>1&&(r.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Sf=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:m}=e._zod.bag;typeof c=="string"&&c.includes("int")?r.type="integer":r.type="number";let p=typeof m=="number"&&m>=(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=m,r.exclusiveMinimum=!0):r.exclusiveMinimum=m: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)},_f=(e,t,n,i)=>{n.type="boolean"},Ef=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},xf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Af=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},If=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$f=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Tf=(e,t,n,i)=>{n.not={}},Rf=(e,t,n,i)=>{},Cf=(e,t,n,i)=>{},Pf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Nf=(e,t,n,i)=>{let r=e._zod.def,o=ao(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},wf=(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},kf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Of=(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},Df=(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)},Mf=(e,t,n,i)=>{n.type="boolean"},jf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},zf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Lf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Uf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Ff=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Bf=(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"]})},Vf=(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 m=o.shape[l]._zod;return t.io==="input"?m.optin===void 0:m.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)},gc=(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},Zf=(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},Gf=(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:m,maximum:p}=e._zod.bag;typeof m=="number"&&(r.minItems=m),typeof p=="number"&&(r.maxItems=p)},Wf=(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 m=Z(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of u)r.patternProperties[p.source]=m}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 m=[...l].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(r.required=m)}},Hf=(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"}]},qf=(e,t,n,i)=>{let r=e._zod.def;Z(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Kf=(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))},Yf=(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)))},Xf=(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},Jf=(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},Qf=(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},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},hc=(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},fc={string:yf,number:Sf,boolean:_f,bigint:Ef,symbol:xf,null:Af,undefined:If,void:$f,never:Tf,any:Rf,unknown:Cf,date:Pf,enum:Nf,literal:wf,nan:kf,template_literal:Of,file:Df,success:Mf,custom:jf,function:zf,transform:Lf,map:Uf,set:Ff,array:Bf,object:Vf,union:gc,intersection:Zf,tuple:Gf,record:Wf,nullable:Hf,nonoptional:qf,default:Kf,prefault:Yf,catch:Xf,pipe:Jf,readonly:Qf,promise:eg,optional:hc,lazy:tg};function vc(e,t){if("_idmap"in e){let i=e,r=xr({...t,processors:fc}),o={};for(let u of i._idmap.entries()){let[l,m]=u;Z(m,r)}let a={},c={registry:i,uri:t?.uri,defs:o};r.external=c;for(let u of i._idmap.entries()){let[l,m]=u;Ar(r,m),a[l]=Ir(r,m)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=xr({...t,processors:fc});return Z(e,n),Ar(n,e),Ir(n,e)}var bc=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=xr({processors:fc,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)),Ar(this.ctx,t);let i=Ir(this.ctx,t),{"~standard":r,...o}=i;return o}};var IE={};var Io={};$t(Io,{ZodAny:()=>Ig,ZodArray:()=>Cg,ZodBase64:()=>Lc,ZodBase64URL:()=>Uc,ZodBigInt:()=>di,ZodBigIntFormat:()=>Vc,ZodBoolean:()=>li,ZodCIDRv4:()=>jc,ZodCIDRv6:()=>zc,ZodCUID:()=>Pc,ZodCUID2:()=>Nc,ZodCatch:()=>Xg,ZodCodec:()=>jo,ZodCustom:()=>zo,ZodCustomStringFormat:()=>ci,ZodDate:()=>wo,ZodDefault:()=>Gg,ZodDiscriminatedUnion:()=>Ng,ZodE164:()=>Fc,ZodEmail:()=>Tc,ZodEmoji:()=>Rc,ZodEnum:()=>ai,ZodExactOptional:()=>Bg,ZodFile:()=>Ug,ZodFunction:()=>sh,ZodGUID:()=>To,ZodIPv4:()=>Dc,ZodIPv6:()=>Mc,ZodIntersection:()=>wg,ZodJWT:()=>Bc,ZodKSUID:()=>Oc,ZodLazy:()=>ih,ZodLiteral:()=>Lg,ZodMAC:()=>bg,ZodMap:()=>jg,ZodNaN:()=>Qg,ZodNanoID:()=>Cc,ZodNever:()=>Tg,ZodNonOptional:()=>Kc,ZodNull:()=>xg,ZodNullable:()=>Zg,ZodNumber:()=>ui,ZodNumberFormat:()=>en,ZodObject:()=>Oo,ZodOptional:()=>qc,ZodPipe:()=>Mo,ZodPrefault:()=>Hg,ZodPreprocess:()=>eh,ZodPromise:()=>ah,ZodReadonly:()=>th,ZodRecord:()=>oi,ZodSet:()=>zg,ZodString:()=>si,ZodStringFormat:()=>K,ZodSuccess:()=>Yg,ZodSymbol:()=>_g,ZodTemplateLiteral:()=>nh,ZodTransform:()=>Fg,ZodTuple:()=>Og,ZodType:()=>w,ZodULID:()=>wc,ZodURL:()=>No,ZodUUID:()=>wt,ZodUndefined:()=>Eg,ZodUnion:()=>Do,ZodUnknown:()=>$g,ZodVoid:()=>Rg,ZodXID:()=>kc,ZodXor:()=>Pg,_ZodString:()=>$c,_default:()=>Wg,_function:()=>Ox,any:()=>dx,array:()=>ko,base64:()=>qE,base64url:()=>KE,bigint:()=>ax,boolean:()=>Sg,catch:()=>Jg,check:()=>Dx,cidrv4:()=>WE,cidrv6:()=>HE,codec:()=>Px,cuid:()=>zE,cuid2:()=>LE,custom:()=>Mx,date:()=>px,describe:()=>jx,discriminatedUnion:()=>yx,e164:()=>YE,email:()=>RE,emoji:()=>ME,enum:()=>Wc,exactOptional:()=>Vg,file:()=>$x,float32:()=>rx,float64:()=>nx,function:()=>Ox,guid:()=>CE,hash:()=>tx,hex:()=>ex,hostname:()=>QE,httpUrl:()=>DE,instanceof:()=>Lx,int:()=>Ac,int32:()=>ix,int64:()=>sx,intersection:()=>kg,invertCodec:()=>Nx,ipv4:()=>VE,ipv6:()=>GE,json:()=>Fx,jwt:()=>XE,keyof:()=>fx,ksuid:()=>BE,lazy:()=>oh,literal:()=>Ix,looseObject:()=>vx,looseRecord:()=>_x,mac:()=>ZE,map:()=>Ex,meta:()=>zx,nan:()=>Cx,nanoid:()=>jE,nativeEnum:()=>Ax,never:()=>Zc,nonoptional:()=>Kg,null:()=>Ag,nullable:()=>Co,nullish:()=>Tx,number:()=>yg,object:()=>gx,optional:()=>Ro,partialRecord:()=>Sx,pipe:()=>Ic,prefault:()=>qg,preprocess:()=>Bx,promise:()=>kx,readonly:()=>rh,record:()=>Mg,refine:()=>ch,set:()=>xx,strictObject:()=>hx,string:()=>$o,stringFormat:()=>JE,stringbool:()=>Ux,success:()=>Rx,superRefine:()=>uh,symbol:()=>ux,templateLiteral:()=>wx,transform:()=>Hc,tuple:()=>Dg,uint32:()=>ox,uint64:()=>cx,ulid:()=>UE,undefined:()=>lx,union:()=>Gc,unknown:()=>Qr,url:()=>OE,uuid:()=>PE,uuidv4:()=>NE,uuidv6:()=>wE,uuidv7:()=>kE,void:()=>mx,xid:()=>FE,xor:()=>bx});var yc={};$t(yc,{endsWith:()=>Kn,gt:()=>Pt,gte:()=>De,includes:()=>Hn,length:()=>Jr,lowercase:()=>Gn,lt:()=>Ct,lte:()=>Qe,maxLength:()=>Xr,maxSize:()=>Er,mime:()=>Yn,minLength:()=>Xt,minSize:()=>Nt,multipleOf:()=>_r,negative:()=>lc,nonnegative:()=>mc,nonpositive:()=>dc,normalize:()=>Xn,overwrite:()=>yt,positive:()=>uc,property:()=>pc,regex:()=>Zn,size:()=>Yr,slugify:()=>ti,startsWith:()=>qn,toLowerCase:()=>Qn,toUpperCase:()=>ei,trim:()=>Jn,uppercase:()=>Wn});var ii={};$t(ii,{ZodISODate:()=>_c,ZodISODateTime:()=>Sc,ZodISODuration:()=>xc,ZodISOTime:()=>Ec,date:()=>ng,datetime:()=>rg,duration:()=>og,time:()=>ig});var Sc=f("ZodISODateTime",(e,t)=>{wm.init(e,t),K.init(e,t)});function rg(e){return Mp(Sc,e)}var _c=f("ZodISODate",(e,t)=>{km.init(e,t),K.init(e,t)});function ng(e){return jp(_c,e)}var Ec=f("ZodISOTime",(e,t)=>{Om.init(e,t),K.init(e,t)});function ig(e){return zp(Ec,e)}var xc=f("ZodISODuration",(e,t)=>{Dm.init(e,t),K.init(e,t)});function og(e){return Lp(xc,e)}var $E=(e,t)=>{mo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>fo(e,n)},flatten:{value:n=>po(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Dn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Dn,2)}},isEmpty:{get(){return e.issues.length===0}}})},b1=f("ZodError",$E),Ze=f("ZodError",$E,{Parent:Error});var ag=zn(Ze),sg=Ln(Ze),cg=Un(Ze),ug=Fn(Ze),lg=vs(Ze),dg=bs(Ze),mg=ys(Ze),pg=Ss(Ze),fg=_s(Ze),gg=Es(Ze),hg=xs(Ze),vg=As(Ze);var TE=new WeakMap;function Po(e,t,n){let i=Object.getPrototypeOf(e),r=TE.get(i);if(r||(r=new Set,TE.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 w=f("ZodType",(e,t)=>(N.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ni(e,"input"),output:ni(e,"output")}}),e.toJSONSchema=bf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>ag(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>cg(e,n,i),e.parseAsync=async(n,i)=>sg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>ug(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>lg(e,n,i),e.decode=(n,i)=>dg(e,n,i),e.encodeAsync=async(n,i)=>mg(e,n,i),e.decodeAsync=async(n,i)=>pg(e,n,i),e.safeEncode=(n,i)=>fg(e,n,i),e.safeDecode=(n,i)=>gg(e,n,i),e.safeEncodeAsync=async(n,i)=>hg(e,n,i),e.safeDecodeAsync=async(n,i)=>vg(e,n,i),Po(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 ke(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(ch(n,i))},superRefine(n,i){return this.check(uh(n,i))},overwrite(n){return this.check(yt(n))},optional(){return Ro(this)},exactOptional(){return Vg(this)},nullable(){return Co(this)},nullish(){return Ro(Co(this))},nonoptional(n){return Kg(this,n)},array(){return ko(this)},or(n){return Gc([this,n])},and(n){return kg(this,n)},transform(n){return Ic(this,Hc(n))},default(n){return Wg(this,n)},prefault(n){return qg(this,n)},catch(n){return Jg(this,n)},pipe(n){return Ic(this,n)},readonly(){return rh(this)},describe(n){let i=this.clone();return _e.add(i,{description:n}),i},meta(...n){if(n.length===0)return _e.get(this);let i=this.clone();return _e.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 _e.get(e)?.description},configurable:!0}),e)),$c=f("_ZodString",(e,t)=>{Kr.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>yf(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Po(e,"_ZodString",{regex(...i){return this.check(Zn(...i))},includes(...i){return this.check(Hn(...i))},startsWith(...i){return this.check(qn(...i))},endsWith(...i){return this.check(Kn(...i))},min(...i){return this.check(Xt(...i))},max(...i){return this.check(Xr(...i))},length(...i){return this.check(Jr(...i))},nonempty(...i){return this.check(Xt(1,...i))},lowercase(i){return this.check(Gn(i))},uppercase(i){return this.check(Wn(i))},trim(){return this.check(Jn())},normalize(...i){return this.check(Xn(...i))},toLowerCase(){return this.check(Qn())},toUpperCase(){return this.check(ei())},slugify(){return this.check(ti())}})}),si=f("ZodString",(e,t)=>{Kr.init(e,t),$c.init(e,t),e.email=n=>e.check(Vs(Tc,n)),e.url=n=>e.check(Ao(No,n)),e.jwt=n=>e.check(cc(Bc,n)),e.emoji=n=>e.check(qs(Rc,n)),e.guid=n=>e.check(xo(To,n)),e.uuid=n=>e.check(Zs(wt,n)),e.uuidv4=n=>e.check(Gs(wt,n)),e.uuidv6=n=>e.check(Ws(wt,n)),e.uuidv7=n=>e.check(Hs(wt,n)),e.nanoid=n=>e.check(Ks(Cc,n)),e.guid=n=>e.check(xo(To,n)),e.cuid=n=>e.check(Ys(Pc,n)),e.cuid2=n=>e.check(Xs(Nc,n)),e.ulid=n=>e.check(Js(wc,n)),e.base64=n=>e.check(oc(Lc,n)),e.base64url=n=>e.check(ac(Uc,n)),e.xid=n=>e.check(Qs(kc,n)),e.ksuid=n=>e.check(ec(Oc,n)),e.ipv4=n=>e.check(tc(Dc,n)),e.ipv6=n=>e.check(rc(Mc,n)),e.cidrv4=n=>e.check(nc(jc,n)),e.cidrv6=n=>e.check(ic(zc,n)),e.e164=n=>e.check(sc(Fc,n)),e.datetime=n=>e.check(rg(n)),e.date=n=>e.check(ng(n)),e.time=n=>e.check(ig(n)),e.duration=n=>e.check(og(n))});function $o(e){return wp(si,e)}var K=f("ZodStringFormat",(e,t)=>{q.init(e,t),$c.init(e,t)}),Tc=f("ZodEmail",(e,t)=>{xm.init(e,t),K.init(e,t)});function RE(e){return Vs(Tc,e)}var To=f("ZodGUID",(e,t)=>{_m.init(e,t),K.init(e,t)});function CE(e){return xo(To,e)}var wt=f("ZodUUID",(e,t)=>{Em.init(e,t),K.init(e,t)});function PE(e){return Zs(wt,e)}function NE(e){return Gs(wt,e)}function wE(e){return Ws(wt,e)}function kE(e){return Hs(wt,e)}var No=f("ZodURL",(e,t)=>{Am.init(e,t),K.init(e,t)});function OE(e){return Ao(No,e)}function DE(e){return Ao(No,{protocol:Je.httpProtocol,hostname:Je.domain,..._.normalizeParams(e)})}var Rc=f("ZodEmoji",(e,t)=>{Im.init(e,t),K.init(e,t)});function ME(e){return qs(Rc,e)}var Cc=f("ZodNanoID",(e,t)=>{$m.init(e,t),K.init(e,t)});function jE(e){return Ks(Cc,e)}var Pc=f("ZodCUID",(e,t)=>{Tm.init(e,t),K.init(e,t)});function zE(e){return Ys(Pc,e)}var Nc=f("ZodCUID2",(e,t)=>{Rm.init(e,t),K.init(e,t)});function LE(e){return Xs(Nc,e)}var wc=f("ZodULID",(e,t)=>{Cm.init(e,t),K.init(e,t)});function UE(e){return Js(wc,e)}var kc=f("ZodXID",(e,t)=>{Pm.init(e,t),K.init(e,t)});function FE(e){return Qs(kc,e)}var Oc=f("ZodKSUID",(e,t)=>{Nm.init(e,t),K.init(e,t)});function BE(e){return ec(Oc,e)}var Dc=f("ZodIPv4",(e,t)=>{Mm.init(e,t),K.init(e,t)});function VE(e){return tc(Dc,e)}var bg=f("ZodMAC",(e,t)=>{zm.init(e,t),K.init(e,t)});function ZE(e){return Op(bg,e)}var Mc=f("ZodIPv6",(e,t)=>{jm.init(e,t),K.init(e,t)});function GE(e){return rc(Mc,e)}var jc=f("ZodCIDRv4",(e,t)=>{Lm.init(e,t),K.init(e,t)});function WE(e){return nc(jc,e)}var zc=f("ZodCIDRv6",(e,t)=>{Um.init(e,t),K.init(e,t)});function HE(e){return ic(zc,e)}var Lc=f("ZodBase64",(e,t)=>{Bm.init(e,t),K.init(e,t)});function qE(e){return oc(Lc,e)}var Uc=f("ZodBase64URL",(e,t)=>{Vm.init(e,t),K.init(e,t)});function KE(e){return ac(Uc,e)}var Fc=f("ZodE164",(e,t)=>{Zm.init(e,t),K.init(e,t)});function YE(e){return sc(Fc,e)}var Bc=f("ZodJWT",(e,t)=>{Gm.init(e,t),K.init(e,t)});function XE(e){return cc(Bc,e)}var ci=f("ZodCustomStringFormat",(e,t)=>{Wm.init(e,t),K.init(e,t)});function JE(e,t,n={}){return ri(ci,e,t,n)}function QE(e){return ri(ci,"hostname",Je.hostname,e)}function ex(e){return ri(ci,"hex",Je.hex,e)}function tx(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=Je[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return ri(ci,i,r,t)}var ui=f("ZodNumber",(e,t)=>{ks.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Sf(e,i,r,o),Po(e,"ZodNumber",{gt(i,r){return this.check(Pt(i,r))},gte(i,r){return this.check(De(i,r))},min(i,r){return this.check(De(i,r))},lt(i,r){return this.check(Ct(i,r))},lte(i,r){return this.check(Qe(i,r))},max(i,r){return this.check(Qe(i,r))},int(i){return this.check(Ac(i))},safe(i){return this.check(Ac(i))},positive(i){return this.check(Pt(0,i))},nonnegative(i){return this.check(De(0,i))},negative(i){return this.check(Ct(0,i))},nonpositive(i){return this.check(Qe(0,i))},multipleOf(i,r){return this.check(_r(i,r))},step(i,r){return this.check(_r(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 yg(e){return Up(ui,e)}var en=f("ZodNumberFormat",(e,t)=>{Hm.init(e,t),ui.init(e,t)});function Ac(e){return Bp(en,e)}function rx(e){return Vp(en,e)}function nx(e){return Zp(en,e)}function ix(e){return Gp(en,e)}function ox(e){return Wp(en,e)}var li=f("ZodBoolean",(e,t)=>{bo.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_f(e,n,i,r)});function Sg(e){return Hp(li,e)}var di=f("ZodBigInt",(e,t)=>{Os.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Ef(e,i,r,o),e.gte=(i,r)=>e.check(De(i,r)),e.min=(i,r)=>e.check(De(i,r)),e.gt=(i,r)=>e.check(Pt(i,r)),e.gte=(i,r)=>e.check(De(i,r)),e.min=(i,r)=>e.check(De(i,r)),e.lt=(i,r)=>e.check(Ct(i,r)),e.lte=(i,r)=>e.check(Qe(i,r)),e.max=(i,r)=>e.check(Qe(i,r)),e.positive=i=>e.check(Pt(BigInt(0),i)),e.negative=i=>e.check(Ct(BigInt(0),i)),e.nonpositive=i=>e.check(Qe(BigInt(0),i)),e.nonnegative=i=>e.check(De(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(_r(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function ax(e){return Kp(di,e)}var Vc=f("ZodBigIntFormat",(e,t)=>{qm.init(e,t),di.init(e,t)});function sx(e){return Xp(Vc,e)}function cx(e){return Jp(Vc,e)}var _g=f("ZodSymbol",(e,t)=>{Km.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xf(e,n,i,r)});function ux(e){return Qp(_g,e)}var Eg=f("ZodUndefined",(e,t)=>{Ym.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>If(e,n,i,r)});function lx(e){return ef(Eg,e)}var xg=f("ZodNull",(e,t)=>{Xm.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Af(e,n,i,r)});function Ag(e){return tf(xg,e)}var Ig=f("ZodAny",(e,t)=>{Jm.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rf(e,n,i,r)});function dx(){return rf(Ig)}var $g=f("ZodUnknown",(e,t)=>{Qm.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Cf(e,n,i,r)});function Qr(){return nf($g)}var Tg=f("ZodNever",(e,t)=>{ep.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Tf(e,n,i,r)});function Zc(e){return of(Tg,e)}var Rg=f("ZodVoid",(e,t)=>{tp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$f(e,n,i,r)});function mx(e){return af(Rg,e)}var wo=f("ZodDate",(e,t)=>{rp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Pf(e,i,r,o),e.min=(i,r)=>e.check(De(i,r)),e.max=(i,r)=>e.check(Qe(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 px(e){return sf(wo,e)}var Cg=f("ZodArray",(e,t)=>{np.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Bf(e,n,i,r),e.element=t.element,Po(e,"ZodArray",{min(n,i){return this.check(Xt(n,i))},nonempty(n){return this.check(Xt(1,n))},max(n,i){return this.check(Xr(n,i))},length(n,i){return this.check(Jr(n,i))},unwrap(){return this.element}})});function ko(e,t){return lf(Cg,e,t)}function fx(e){let t=e._zod.def.shape;return Wc(Object.keys(t))}var Oo=f("ZodObject",(e,t)=>{ip.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vf(e,n,i,r),_.defineLazy(e,"shape",()=>t.shape),Po(e,"ZodObject",{keyof(){return Wc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Qr()})},loose(){return this.clone({...this._zod.def,catchall:Qr()})},strict(){return this.clone({...this._zod.def,catchall:Zc()})},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(qc,this,n[0])},required(...n){return _.required(Kc,this,n[0])}})});function gx(e,t){let n={type:"object",shape:e??{},..._.normalizeParams(t)};return new Oo(n)}function hx(e,t){return new Oo({type:"object",shape:e,catchall:Zc(),..._.normalizeParams(t)})}function vx(e,t){return new Oo({type:"object",shape:e,catchall:Qr(),..._.normalizeParams(t)})}var Do=f("ZodUnion",(e,t)=>{yo.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gc(e,n,i,r),e.options=t.options});function Gc(e,t){return new Do({type:"union",options:e,..._.normalizeParams(t)})}var Pg=f("ZodXor",(e,t)=>{Do.init(e,t),op.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gc(e,n,i,r),e.options=t.options});function bx(e,t){return new Pg({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var Ng=f("ZodDiscriminatedUnion",(e,t)=>{Do.init(e,t),ap.init(e,t)});function yx(e,t,n){return new Ng({type:"union",options:t,discriminator:e,..._.normalizeParams(n)})}var wg=f("ZodIntersection",(e,t)=>{sp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zf(e,n,i,r)});function kg(e,t){return new wg({type:"intersection",left:e,right:t})}var Og=f("ZodTuple",(e,t)=>{Ds.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gf(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Dg(e,t,n){let i=t instanceof N,r=i?n:t,o=i?t:null;return new Og({type:"tuple",items:e,rest:o,..._.normalizeParams(r)})}var oi=f("ZodRecord",(e,t)=>{cp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wf(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Mg(e,t,n){return!t||!t._zod?new oi({type:"record",keyType:$o(),valueType:e,..._.normalizeParams(t)}):new oi({type:"record",keyType:e,valueType:t,..._.normalizeParams(n)})}function Sx(e,t,n){let i=ke(e);return i._zod.values=void 0,new oi({type:"record",keyType:i,valueType:t,..._.normalizeParams(n)})}function _x(e,t,n){return new oi({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(n)})}var jg=f("ZodMap",(e,t)=>{up.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uf(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Nt(...n)),e.nonempty=n=>e.check(Nt(1,n)),e.max=(...n)=>e.check(Er(...n)),e.size=(...n)=>e.check(Yr(...n))});function Ex(e,t,n){return new jg({type:"map",keyType:e,valueType:t,..._.normalizeParams(n)})}var zg=f("ZodSet",(e,t)=>{lp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ff(e,n,i,r),e.min=(...n)=>e.check(Nt(...n)),e.nonempty=n=>e.check(Nt(1,n)),e.max=(...n)=>e.check(Er(...n)),e.size=(...n)=>e.check(Yr(...n))});function xx(e,t){return new zg({type:"set",valueType:e,..._.normalizeParams(t)})}var ai=f("ZodEnum",(e,t)=>{dp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Nf(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 ai({...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 ai({...t,checks:[],..._.normalizeParams(r),entries:o})}});function Wc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ai({type:"enum",entries:n,..._.normalizeParams(t)})}function Ax(e,t){return new ai({type:"enum",entries:e,..._.normalizeParams(t)})}var Lg=f("ZodLiteral",(e,t)=>{mp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wf(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 Ix(e,t){return new Lg({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var Ug=f("ZodFile",(e,t)=>{pp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Df(e,n,i,r),e.min=(n,i)=>e.check(Nt(n,i)),e.max=(n,i)=>e.check(Er(n,i)),e.mime=(n,i)=>e.check(Yn(Array.isArray(n)?n:[n],i))});function $x(e){return df(Ug,e)}var Fg=f("ZodTransform",(e,t)=>{fp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lf(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new hr(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 Hc(e){return new Fg({type:"transform",transform:e})}var qc=f("ZodOptional",(e,t)=>{Ms.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ro(e){return new qc({type:"optional",innerType:e})}var Bg=f("ZodExactOptional",(e,t)=>{gp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Vg(e){return new Bg({type:"optional",innerType:e})}var Zg=f("ZodNullable",(e,t)=>{hp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Co(e){return new Zg({type:"nullable",innerType:e})}function Tx(e){return Ro(Co(e))}var Gg=f("ZodDefault",(e,t)=>{vp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Wg(e,t){return new Gg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var Hg=f("ZodPrefault",(e,t)=>{bp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function qg(e,t){return new Hg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var Kc=f("ZodNonOptional",(e,t)=>{yp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Kg(e,t){return new Kc({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var Yg=f("ZodSuccess",(e,t)=>{Sp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Rx(e){return new Yg({type:"success",innerType:e})}var Xg=f("ZodCatch",(e,t)=>{_p.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Jg(e,t){return new Xg({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Qg=f("ZodNaN",(e,t)=>{Ep.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>kf(e,n,i,r)});function Cx(e){return uf(Qg,e)}var Mo=f("ZodPipe",(e,t)=>{js.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jf(e,n,i,r),e.in=t.in,e.out=t.out});function Ic(e,t){return new Mo({type:"pipe",in:e,out:t})}var jo=f("ZodCodec",(e,t)=>{Mo.init(e,t),So.init(e,t)});function Px(e,t,n){return new jo({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Nx(e){let t=e._zod.def;return new jo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var eh=f("ZodPreprocess",(e,t)=>{Mo.init(e,t),xp.init(e,t)}),th=f("ZodReadonly",(e,t)=>{Ap.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function rh(e){return new th({type:"readonly",innerType:e})}var nh=f("ZodTemplateLiteral",(e,t)=>{Ip.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Of(e,n,i,r)});function wx(e,t){return new nh({type:"template_literal",parts:e,..._.normalizeParams(t)})}var ih=f("ZodLazy",(e,t)=>{Rp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>tg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function oh(e){return new ih({type:"lazy",getter:e})}var ah=f("ZodPromise",(e,t)=>{Tp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function kx(e){return new ah({type:"promise",innerType:e})}var sh=f("ZodFunction",(e,t)=>{$p.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zf(e,n,i,r)});function Ox(e){return new sh({type:"function",input:Array.isArray(e?.input)?Dg(e?.input):e?.input??ko(Qr()),output:e?.output??Qr()})}var zo=f("ZodCustom",(e,t)=>{Cp.init(e,t),w.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jf(e,n,i,r)});function Dx(e){let t=new X({check:"custom"});return t._zod.check=e,t}function Mx(e,t){return mf(zo,e??(()=>!0),t)}function ch(e,t={}){return pf(zo,e,t)}function uh(e,t){return ff(e,t)}var jx=gf,zx=hf;function Lx(e,t={}){let n=new zo({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 Ux=(...e)=>vf({Codec:jo,Boolean:li,String:si},...e);function Fx(e){let t=oh(()=>Gc([$o(e),yg(),Sg(),Ag(),ko(t),Mg($o(),t)]));return t}function Bx(e,t){return new eh({type:"pipe",in:Hc(e),out:t})}var S1={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 _1(e){se({customError:e})}function E1(){return se().customError}var lh;lh||(lh={});var x={...Io,...yc,iso:ii},x1=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 A1(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 I1(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 Vx(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.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 x.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=I1(r,t),a=$e(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 x.null();if(r.length===0)return x.never();if(r.length===1)return x.literal(r[0]);if(r.every(a=>typeof a=="string"))return x.enum(r);let o=r.map(a=>x.literal(a));return o.length<2?o[0]:x.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return Vx(a,t)});return r.length===0?x.never():r.length===1?r[0]:x.union(r)}if(!n)return x.any();let i;switch(n){case"string":{let r=x.string();if(e.format){let o=e.format;o==="email"?r=r.check(x.email()):o==="uri"||o==="uri-reference"?r=r.check(x.url()):o==="uuid"||o==="guid"?r=r.check(x.uuid()):o==="date-time"?r=r.check(x.iso.datetime()):o==="date"?r=r.check(x.iso.date()):o==="time"?r=r.check(x.iso.time()):o==="duration"?r=r.check(x.iso.duration()):o==="ipv4"?r=r.check(x.ipv4()):o==="ipv6"?r=r.check(x.ipv6()):o==="mac"?r=r.check(x.mac()):o==="cidr"?r=r.check(x.cidrv4()):o==="cidr-v6"?r=r.check(x.cidrv6()):o==="base64"?r=r.check(x.base64()):o==="base64url"?r=r.check(x.base64url()):o==="e164"?r=r.check(x.e164()):o==="jwt"?r=r.check(x.jwt()):o==="emoji"?r=r.check(x.emoji()):o==="nanoid"?r=r.check(x.nanoid()):o==="cuid"?r=r.check(x.cuid()):o==="cuid2"?r=r.check(x.cuid2()):o==="ulid"?r=r.check(x.ulid()):o==="xid"?r=r.check(x.xid()):o==="ksuid"&&(r=r.check(x.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"?x.number().int():x.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=x.boolean();break}case"null":{i=x.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let m=$e(l,t);r[u]=a.has(u)?m:m.optional()}if(e.propertyNames){let u=$e(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?$e(e.additionalProperties,t):x.any();if(Object.keys(r).length===0){i=x.record(u,l);break}let m=x.object(r).passthrough(),p=x.looseRecord(u,l);i=x.intersection(m,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),m=[];for(let g of l){let v=$e(u[g],t),A=x.string().regex(new RegExp(g));m.push(x.looseRecord(A,v))}let p=[];if(Object.keys(r).length>0&&p.push(x.object(r).passthrough()),p.push(...m),p.length===0)i=x.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=x.intersection(p[0],p[1]);for(let v=2;v<p.length;v++)g=x.intersection(g,p[v]);i=g}break}let c=x.object(r);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall($e(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=>$e(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?$e(o,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>$e(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?$e(e.additionalItems,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(o!==void 0){let a=$e(o,t),c=x.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=x.array(x.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function $e(e,t){if(typeof e=="boolean")return e?x.any():x.never();let n=Vx(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=>$e(l,t)),u=x.union(c);n=i?x.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>$e(l,t)),u=x.xor(c);n=i?x.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:x.any();else{let c=i?n:$e(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,$e(e.allOf[l],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=x.nullable(n)),e.readOnly===!0&&(n=x.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))x1.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 Zx(e,t){if(typeof e=="boolean")return e?x.any():x.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=A1(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??_e};return $e(n,o)}var dh={};$t(dh,{bigint:()=>C1,boolean:()=>R1,date:()=>P1,number:()=>T1,string:()=>$1});function $1(e){return kp(si,e)}function T1(e){return Fp(ui,e)}function R1(e){return qp(li,e)}function C1(e){return Yp(di,e)}function P1(e){return cf(wo,e)}se(zs());var N1=Object.defineProperty,tn=(e,t)=>N1(e,"name",{value:t,configurable:!0}),mh=["production","staging","development","platform","compliance"],Gx={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"},w1=new Set(mh);function Yc(e){return w1.has(e)}tn(Yc,"isAccountStage");var Uo={ROOT:"root",PLATFORM:"platform"},k1=[...mh,Uo.ROOT];function Wx(e){return Yc(e)?Gx[e]:e.charAt(0).toUpperCase()+e.slice(1)}tn(Wx,"getEnvironmentLabel");var ph=["organisation","platform","account"],O1=s.enum(ph),Lo={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"},D1={[Lo.ORGANISATION]:!0,[Lo.PLATFORM]:!0,[Lo.ACCOUNT]:!0},M1=new Set(Object.keys(D1));function Hx(e){return M1.has(e)}tn(Hx,"isAccountTier");var qx=ph.filter(e=>e!==Lo.ACCOUNT),j1=new Set(qx);function Kx(e){return j1.has(e)}tn(Kx,"isGovernanceTier");function fh(e){return e===Uo.ROOT?"organisation":e===Uo.PLATFORM?"platform":"account"}tn(fh,"environmentToTier");function Yx(e){return e==null||e===""||e===Uo.ROOT?null:Yc(e)?e:null}tn(Yx,"stageFromWireEnvironment");function Fo(e){return e.tier??fh(e.environment)}tn(Fo,"accountTier");var z1=Object.defineProperty,Bo=(e,t)=>z1(e,"name",{value:t,configurable:!0});var Xx=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 Jx(e){if(!e)return"compute";if(e.startsWith("Custom::"))return Xx[e]??"compute";let t=Xx[e];return t||gh.add(e),t??"compute"}Bo(Jx,"categoriseResource");function L1(){return new Set(gh)}Bo(L1,"getUnmappedResourceTypes");function U1(){gh.clear()}Bo(U1,"clearUnmappedResourceTypes");var F1=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}),B1=30;function Qx(e){return F1[e]??B1}Bo(Qx,"getExpectedDuration");var V1=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 eA(e){return V1[e]||e.split("::").pop()||e}Bo(eA,"getFriendlyResourceType");var Z1=Object.defineProperty,G1=(e,t)=>Z1(e,"name",{value:t,configurable:!0}),W1={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},H1=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,q1=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,K1=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/;function tA(e){if(!e)return null;let t=e.replace(/^(https?:\/\/)[^@]+@/,"$1"),n=t.match(H1)??t.match(q1)??e.match(K1);if(!n)return null;let[,i,r,o]=n;return!i||!r||!o?null:{provider:W1[i]??"other",owner:r,repo:o,host:i}}G1(tA,"parseGitRemoteUrl");var hh=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy","deploy:oidc:mint","deploy:governance"],rA={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"},Y1=hh.filter(e=>rA[e]==="machine");var X1=hh.filter(e=>rA[e]==="user");var J1=Object.defineProperty,mi=(e,t)=>J1(e,"name",{value:t,configurable:!0}),Jc=/^[a-zA-Z_][a-zA-Z0-9._-]*$/,vh="Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",Vo=/^[a-zA-Z][a-zA-Z0-9._-]*$/,Qc="Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";var Xc=s.string().regex(Vo,Qc),nA=s.object({app:Xc.describe("Application name"),cluster:Xc.optional().describe("Cluster name"),service:Xc.optional().describe("Service name"),lambda:Xc.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 bh(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}mi(bh,"buildNamespaceParts");function yh(e,t){let n=bh(e);return t&&n.push(t),"/"+n.join("/")}mi(yh,"buildParameterPath");function Sh(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}}mi(Sh,"parseParameterPath");function iA(e){let t=Sh(e);return t?nA.safeParse(t.namespace).success&&yh(t.namespace,t.name)===e:!1}mi(iA,"isManageablePath");function oA(e){let t={};for(let n of e.split(`
165
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(!Jc.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}mi(nA,"parseDotEnv");function iA(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}mi(iA,"escapeDotEnvValue");var oA=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()}),Y1=s.object({accounts:s.array(oA)});var X1=Object.defineProperty,tn=(e,t)=>X1(e,"name",{value:t,configurable:!0});function Sh(e){let t=[e.primaryRegion,...e.secondaryRegions??[],e.disasterRecoveryRegion].filter(n=>n!==void 0);return[...new Set(t)]}tn(Sh,"deriveRegionsFromOrgConfig");function _h(e){return e.environment??Uo(e)}tn(_h,"environmentOrTier");function Eh(e,t){return`${e.toLowerCase()}-${Nn(t)}`}tn(Eh,"generateTargetName");function xh(e,t){let n=[];for(let i of e){if(Uo(i)==="organisation")continue;let r=_h(i);for(let o of t)n.push({name:Eh(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)})}tn(xh,"deriveTargets");function aA(e){return xh(e.providerAccounts,Sh(e))}tn(aA,"deriveAllTargets");function J1(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}}tn(J1,"mergeSecondaryRegions");function sA(e,t){return e.find(n=>n.name===t)}tn(sA,"findTarget");var Q1=Object.defineProperty,eM=(e,t)=>Q1(e,"name",{value:t,configurable:!0});function cA(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}`}eM(cA,"buildAppConfigPath");var tM=Object.defineProperty,pi=(e,t)=>tM(e,"name",{value:t,configurable:!0}),Ah="infrastructure.ts",Ih="fjall";function uA(e,t){let n=t?.excludedPathPrefixes,i=t?.excludedPathSegments,r=[];for(let o of e){if(!$h(o.path)||n&&dA(o.path,n)||i&&mA(o.path,i))continue;let a=Th(o.path);a!==null&&r.push({configPath:lA(o.path),boundaryPath:a})}return r}pi(uA,"findInfrastructurePaths");function $h(e){return e===Ah||e.endsWith(`/${Ah}`)}pi($h,"isInfrastructureFile");function Th(e){let t=e.split("/");for(let n=0;n<t.length-1;n++)if(t[n]===Ih)return t.slice(0,n+1).join("/");return null}pi(Th,"findBoundaryPath");function lA(e){return e.slice(0,-`/${Ah}`.length)}pi(lA,"toConfigDir");function dA(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}pi(dA,"hasExcludedPrefix");function mA(e,t){let n=e.split("/");for(let i=0;i<n.length-1;i++)if(t.has(n[i]))return!0;return!1}pi(mA,"hasExcludedSegment");var rM=Object.defineProperty,Rh=(e,t)=>rM(e,"name",{value:t,configurable:!0});function pA(e){if(e.length===0)return null;let t=[];for(let i of e){let r=fA(i.boundaryPath);if(r===null)return null;t.push(r)}let n=gA(t);return n.length===0?null:n.join("/")}Rh(pA,"inferContainerFromCandidates");function fA(e){let t=e.split("/").filter(i=>i.length>0);if(t.length===0||t[t.length-1]!==Ih)return null;let n=t.slice(0,t.length-1);return n.length===0?null:n}Rh(fA,"extractContainer");function gA(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}Rh(gA,"longestCommonPrefix");var nM=Object.defineProperty,hA=(e,t)=>nM(e,"name",{value:t,configurable:!0}),vA=["fjall","organisation","platform","account"];function bA(e){return vA.includes(e.toLowerCase())}hA(bA,"isReservedAppName");var yA="-cache";function SA(e){return Tt(e).endsWith(yA)}hA(SA,"hasReservedAppNameSuffix");var iM=Object.defineProperty,Ph=(e,t)=>iM(e,"name",{value:t,configurable:!0});function EA(e){return{success:!0,data:e}}Ph(EA,"success");function Vo(e){return{success:!1,error:e}}Ph(Vo,"failure");var _A="sha256:",eu=12,oM=new RegExp(`-sha-[0-9a-f]{${eu}}$`);function xA(e,t,n){if(!e.startsWith(_A))return Vo(new Error(`expected sha256:... digest, got ${e.slice(0,32)}`));let i=e.slice(_A.length);if(i.length<eu)return Vo(new Error(`digest hex payload too short (need >=${eu} chars, got ${i.length})`));let r=t.trim();if(r==="")return Vo(new Error("serviceName must be a non-empty string"));let o;if(n!==void 0){let u=n.trim();if(u==="")return Vo(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=u.toLowerCase()}let a=i.slice(0,eu).toLowerCase(),c=o!==void 0?`${r.toLowerCase()}-${o}`:r.toLowerCase();return EA(`${c}-sha-${a}`)}Ph(xA,"deriveContentHashTag");var aM=Object.defineProperty,sM=(e,t)=>aM(e,"name",{value:t,configurable:!0}),AA=["full","code-only","rollback","restart"],cM=s.enum(AA),IA=/^[a-zA-Z0-9._-]+$/,$A=s.string().min(1).max(128).regex(IA),TA=s.object({serviceName:s.string().min(1),imageTag:$A,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(),uM=s.array(TA);function RA(e,t){return`${e}${t}`}sM(RA,"artefactOutputKey");var lM=Object.defineProperty,PA=(e,t)=>lM(e,"name",{value:t,configurable:!0}),kt=["payload","nextjs","staticsite"],Ch=new Set(kt);function Nh(e){return typeof e=="string"&&Ch.has(e)}PA(Nh,"isPatternType");var fi={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}},CA=kt.filter(e=>fi[e].deployable),wh=kt.filter(e=>fi[e].artefact==="opennext-lambda"),dM=new Set(wh);function kh(e){return e!=null&&dM.has(e)}PA(kh,"isOpenNextPatternType");var Zo=["multipage","spa"];var mM=Object.defineProperty,Oh=(e,t)=>mM(e,"name",{value:t,configurable:!0}),NA="noreply";function wA(e){return`${NA}@${e}`}Oh(wA,"defaultFormsFromAddress");function kA(e){return`https://${e}`}Oh(kA,"defaultFormsCorsOrigin");function tu(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()}Oh(tu,"isAddressAtDomain");var OA=2;var pM=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>`"})}),DA={appId:s.string().min(1),appKebab:s.string().min(1),engineVersion:s.string().min(1).optional(),adoptSlotEcr:s.boolean().optional(),phase:s.enum(["zone","full"]).optional(),domain:pM.optional()},fM=s.object(DA).strict(),gM=s.object({...DA,version:s.literal(OA),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"]});import{existsSync as TI,mkdirSync as rz,statSync as nz,appendFileSync as iz}from"fs";import{join as RI}from"path";import{join as dv}from"path";var vM=Object.defineProperty,MA=(e,t)=>vM(e,"name",{value:t,configurable:!0});function jA(e){return e.mode==="cli"}MA(jA,"isCLIMode");function zA(e){return e.mode==="ink"}MA(zA,"isInkMode");var LA=(e=0)=>t=>`\x1B[${t+e}m`,UA=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,FA=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,re={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]}},H3=Object.keys(re.modifier),bM=Object.keys(re.color),yM=Object.keys(re.bgColor),q3=[...bM,...yM];function SM(){let e=new Map;for(let[t,n]of Object.entries(re)){for(let[i,r]of Object.entries(n))re[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=re[i],e.set(r[0],r[1]);Object.defineProperty(re,t,{value:n,enumerable:!1})}return Object.defineProperty(re,"codes",{value:e,enumerable:!1}),re.color.close="\x1B[39m",re.bgColor.close="\x1B[49m",re.color.ansi=LA(),re.color.ansi256=UA(),re.color.ansi16m=FA(),re.bgColor.ansi=LA(10),re.bgColor.ansi256=UA(10),re.bgColor.ansi16m=FA(10),Object.defineProperties(re,{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=>re.rgbToAnsi256(...re.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)=>re.ansi256ToAnsi(re.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>re.ansi256ToAnsi(re.hexToAnsi256(t)),enumerable:!1}}),re}var _M=SM(),St=_M;import Dh from"node:process";import EM from"node:os";import BA from"node:tty";function at(e,t=globalThis.Deno?globalThis.Deno.args:Dh.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}=Dh,ru;at("no-color")||at("no-colors")||at("color=false")||at("color=never")?ru=0:(at("color")||at("colors")||at("color=true")||at("color=always"))&&(ru=1);function xM(){if("FORCE_COLOR"in ne)return ne.FORCE_COLOR==="true"?1:ne.FORCE_COLOR==="false"?0:ne.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ne.FORCE_COLOR,10),3)}function AM(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function IM(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=xM();i!==void 0&&(ru=i);let r=n?ru:i;if(r===0)return 0;if(n){if(at("color=16m")||at("color=full")||at("color=truecolor"))return 3;if(at("color=256"))return 2}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(Dh.platform==="win32"){let a=EM.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(".")[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 VA(e,t={}){let n=IM(e,{streamIsTTY:e&&e.isTTY,...t});return AM(n)}var $M={stdout:VA({isTTY:BA.isatty(1)}),stderr:VA({isTTY:BA.isatty(2)})},ZA=$M;function GA(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 WA(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
166
+ `:l==="r"?"\r":l):c.length>=2&&c.startsWith("'")&&c.endsWith("'")?t[a]=c.slice(1,-1):t[a]=c}return t}mi(oA,"parseDotEnv");function aA(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}mi(aA,"escapeDotEnvValue");var sA=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()}),Q1=s.object({accounts:s.array(sA)});var eM=Object.defineProperty,rn=(e,t)=>eM(e,"name",{value:t,configurable:!0});function _h(e){let t=[e.primaryRegion,...e.secondaryRegions??[],e.disasterRecoveryRegion].filter(n=>n!==void 0);return[...new Set(t)]}rn(_h,"deriveRegionsFromOrgConfig");function Eh(e){return e.environment??Fo(e)}rn(Eh,"environmentOrTier");function xh(e,t){return`${e.toLowerCase()}-${wn(t)}`}rn(xh,"generateTargetName");function Ah(e,t){let n=[];for(let i of e){if(Fo(i)==="organisation")continue;let r=Eh(i);for(let o of t)n.push({name:xh(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)})}rn(Ah,"deriveTargets");function cA(e){return Ah(e.providerAccounts,_h(e))}rn(cA,"deriveAllTargets");function tM(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}}rn(tM,"mergeSecondaryRegions");function uA(e,t){return e.find(n=>n.name===t)}rn(uA,"findTarget");var rM=Object.defineProperty,nM=(e,t)=>rM(e,"name",{value:t,configurable:!0});function lA(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}`}nM(lA,"buildAppConfigPath");var iM=Object.defineProperty,pi=(e,t)=>iM(e,"name",{value:t,configurable:!0}),Ih="infrastructure.ts",$h="fjall";function dA(e,t){let n=t?.excludedPathPrefixes,i=t?.excludedPathSegments,r=[];for(let o of e){if(!Th(o.path)||n&&pA(o.path,n)||i&&fA(o.path,i))continue;let a=Rh(o.path);a!==null&&r.push({configPath:mA(o.path),boundaryPath:a})}return r}pi(dA,"findInfrastructurePaths");function Th(e){return e===Ih||e.endsWith(`/${Ih}`)}pi(Th,"isInfrastructureFile");function Rh(e){let t=e.split("/");for(let n=0;n<t.length-1;n++)if(t[n]===$h)return t.slice(0,n+1).join("/");return null}pi(Rh,"findBoundaryPath");function mA(e){return e.slice(0,-`/${Ih}`.length)}pi(mA,"toConfigDir");function pA(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}pi(pA,"hasExcludedPrefix");function fA(e,t){let n=e.split("/");for(let i=0;i<n.length-1;i++)if(t.has(n[i]))return!0;return!1}pi(fA,"hasExcludedSegment");var oM=Object.defineProperty,Ch=(e,t)=>oM(e,"name",{value:t,configurable:!0});function gA(e){if(e.length===0)return null;let t=[];for(let i of e){let r=hA(i.boundaryPath);if(r===null)return null;t.push(r)}let n=vA(t);return n.length===0?null:n.join("/")}Ch(gA,"inferContainerFromCandidates");function hA(e){let t=e.split("/").filter(i=>i.length>0);if(t.length===0||t[t.length-1]!==$h)return null;let n=t.slice(0,t.length-1);return n.length===0?null:n}Ch(hA,"extractContainer");function vA(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}Ch(vA,"longestCommonPrefix");var aM=Object.defineProperty,bA=(e,t)=>aM(e,"name",{value:t,configurable:!0}),yA=["fjall","organisation","platform","account","domain"];function SA(e){return yA.includes(e.toLowerCase())}bA(SA,"isReservedAppName");var _A="-cache";function EA(e){return Tt(e).endsWith(_A)}bA(EA,"hasReservedAppNameSuffix");var sM=Object.defineProperty,Ph=(e,t)=>sM(e,"name",{value:t,configurable:!0});function AA(e){return{success:!0,data:e}}Ph(AA,"success");function Zo(e){return{success:!1,error:e}}Ph(Zo,"failure");var xA="sha256:",eu=12,cM=new RegExp(`-sha-[0-9a-f]{${eu}}$`);function IA(e,t,n){if(!e.startsWith(xA))return Zo(new Error(`expected sha256:... digest, got ${e.slice(0,32)}`));let i=e.slice(xA.length);if(i.length<eu)return Zo(new Error(`digest hex payload too short (need >=${eu} chars, got ${i.length})`));let r=t.trim();if(r==="")return Zo(new Error("serviceName must be a non-empty string"));let o;if(n!==void 0){let u=n.trim();if(u==="")return Zo(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=u.toLowerCase()}let a=i.slice(0,eu).toLowerCase(),c=o!==void 0?`${r.toLowerCase()}-${o}`:r.toLowerCase();return AA(`${c}-sha-${a}`)}Ph(IA,"deriveContentHashTag");var uM=Object.defineProperty,lM=(e,t)=>uM(e,"name",{value:t,configurable:!0}),$A=["full","code-only","rollback","restart"],dM=s.enum($A),TA=/^[a-zA-Z0-9._-]+$/,RA=s.string().min(1).max(128).regex(TA),CA=s.object({serviceName:s.string().min(1),imageTag:RA,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(),mM=s.array(CA);function PA(e,t){return`${e}${t}`}lM(PA,"artefactOutputKey");var pM=Object.defineProperty,NA=(e,t)=>pM(e,"name",{value:t,configurable:!0}),kt=["payload","nextjs","staticsite"],Nh=new Set(kt);function wh(e){return typeof e=="string"&&Nh.has(e)}NA(wh,"isPatternType");var fi={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}},wA=kt.filter(e=>fi[e].deployable),kh=kt.filter(e=>fi[e].artefact==="opennext-lambda"),fM=new Set(kh);function Oh(e){return e!=null&&fM.has(e)}NA(Oh,"isOpenNextPatternType");var Go=["multipage","spa"];var gM=Object.defineProperty,Dh=(e,t)=>gM(e,"name",{value:t,configurable:!0}),kA="noreply";function OA(e){return`${kA}@${e}`}Dh(OA,"defaultFormsFromAddress");function DA(e){return`https://${e}`}Dh(DA,"defaultFormsCorsOrigin");function tu(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()}Dh(tu,"isAddressAtDomain");var MA=2;var hM=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>`"})}),jA={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:hM.optional()},vM=s.object(jA).strict(),bM=s.object({...jA,version:s.literal(MA),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"]});import{existsSync as CI,mkdirSync as oz,statSync as az,appendFileSync as sz}from"fs";import{join as PI}from"path";import{join as mv}from"path";var SM=Object.defineProperty,zA=(e,t)=>SM(e,"name",{value:t,configurable:!0});function LA(e){return e.mode==="cli"}zA(LA,"isCLIMode");function UA(e){return e.mode==="ink"}zA(UA,"isInkMode");var FA=(e=0)=>t=>`\x1B[${t+e}m`,BA=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,VA=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,re={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]}},X3=Object.keys(re.modifier),_M=Object.keys(re.color),EM=Object.keys(re.bgColor),J3=[..._M,...EM];function xM(){let e=new Map;for(let[t,n]of Object.entries(re)){for(let[i,r]of Object.entries(n))re[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=re[i],e.set(r[0],r[1]);Object.defineProperty(re,t,{value:n,enumerable:!1})}return Object.defineProperty(re,"codes",{value:e,enumerable:!1}),re.color.close="\x1B[39m",re.bgColor.close="\x1B[49m",re.color.ansi=FA(),re.color.ansi256=BA(),re.color.ansi16m=VA(),re.bgColor.ansi=FA(10),re.bgColor.ansi256=BA(10),re.bgColor.ansi16m=VA(10),Object.defineProperties(re,{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=>re.rgbToAnsi256(...re.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)=>re.ansi256ToAnsi(re.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>re.ansi256ToAnsi(re.hexToAnsi256(t)),enumerable:!1}}),re}var AM=xM(),St=AM;import Mh from"node:process";import IM from"node:os";import ZA from"node:tty";function at(e,t=globalThis.Deno?globalThis.Deno.args:Mh.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}=Mh,ru;at("no-color")||at("no-colors")||at("color=false")||at("color=never")?ru=0:(at("color")||at("colors")||at("color=true")||at("color=always"))&&(ru=1);function $M(){if("FORCE_COLOR"in ne)return ne.FORCE_COLOR==="true"?1:ne.FORCE_COLOR==="false"?0:ne.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(ne.FORCE_COLOR,10),3)}function TM(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function RM(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=$M();i!==void 0&&(ru=i);let r=n?ru:i;if(r===0)return 0;if(n){if(at("color=16m")||at("color=full")||at("color=truecolor"))return 3;if(at("color=256"))return 2}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(Mh.platform==="win32"){let a=IM.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(".")[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 GA(e,t={}){let n=RM(e,{streamIsTTY:e&&e.isTTY,...t});return TM(n)}var CM={stdout:GA({isTTY:ZA.isatty(1)}),stderr:GA({isTTY:ZA.isatty(2)})},WA=CM;function HA(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 qA(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
167
167
  `:`
168
168
  `)+n,r=i+1,i=e.indexOf(`
169
- `,r)}while(i!==-1);return o+=e.slice(r),o}var{stdout:HA,stderr:qA}=ZA,Mh=Symbol("GENERATOR"),gi=Symbol("STYLER"),Go=Symbol("IS_EMPTY"),KA=["ansi","ansi","ansi256","ansi16m"],hi=Object.create(null),TM=(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=HA?HA.level:0;e.level=t.level===void 0?n:t.level};var RM=e=>{let t=(...n)=>n.join(" ");return TM(t,e),Object.setPrototypeOf(t,Wo.prototype),t};function Wo(e){return RM(e)}Object.setPrototypeOf(Wo.prototype,Function.prototype);for(let[e,t]of Object.entries(St))hi[e]={get(){let n=nu(this,zh(t.open,t.close,this[gi]),this[Go]);return Object.defineProperty(this,e,{value:n}),n}};hi.visible={get(){let e=nu(this,this[gi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var jh=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?St[n].ansi16m(...i):t==="ansi256"?St[n].ansi256(St.rgbToAnsi256(...i)):St[n].ansi(St.rgbToAnsi(...i)):e==="hex"?jh("rgb",t,n,...St.hexToRgb(...i)):St[n][e](...i),PM=["rgb","hex","ansi256"];for(let e of PM){hi[e]={get(){let{level:n}=this;return function(...i){let r=zh(jh(e,KA[n],"color",...i),St.color.close,this[gi]);return nu(this,r,this[Go])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);hi[t]={get(){let{level:n}=this;return function(...i){let r=zh(jh(e,KA[n],"bgColor",...i),St.bgColor.close,this[gi]);return nu(this,r,this[Go])}}}}var CM=Object.defineProperties(()=>{},{...hi,level:{enumerable:!0,get(){return this[Mh].level},set(e){this[Mh].level=e}}}),zh=(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}},nu=(e,t,n)=>{let i=(...r)=>NM(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,CM),i[Mh]=e,i[gi]=t,i[Go]=n,i},NM=(e,t)=>{if(e.level<=0||!t)return e[Go]?"":t;let n=e[gi];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=GA(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
170
- `);return o!==-1&&(t=WA(t,r,i,o)),i+t+r};Object.defineProperties(Wo.prototype,hi);var wM=Wo(),i9=Wo({level:qA?qA.level:0});var Ee=wM;import Xo from"node:process";import{stripVTControlCharacters as Sj}from"node:util";import tI from"node:process";import su from"node:process";var kM=(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);!OM(r,o)&&i||Object.defineProperty(e,n,o)},OM=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)},DM=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},MM=(e,t)=>`/* Wrapped ${e}*/
171
- ${t}`,jM=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),zM=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),LM=(e,t,n)=>{let i=n===""?"":`with ${n.trim()}() `,r=MM.bind(null,i,t.toString());Object.defineProperty(r,"name",zM);let{writable:o,enumerable:a,configurable:c}=jM;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:a,configurable:c})};function Lh(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let r of Reflect.ownKeys(t))kM(e,t,r,n);return DM(e,t),LM(e,t,i),e}var iu=new WeakMap,YA=(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(iu.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 Lh(o,e),iu.set(o,i),o};YA.callCount=e=>{if(!iu.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return iu.get(e)};var XA=YA;var rn=[];rn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&rn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&rn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ou=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",Uh=Symbol.for("signal-exit emitter"),Fh=globalThis,UM=Object.defineProperty.bind(Object),Bh=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Fh[Uh])return Fh[Uh];UM(Fh,Uh,{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}},au=class{},FM=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),Vh=class extends au{onExit(){return()=>{}}load(){}unload(){}},Zh=class extends au{#o=Gh.platform==="win32"?"SIGINT":"SIGHUP";#n=new Bh;#r;#e;#i;#t={};#a=!1;constructor(t){super(),this.#r=t,this.#t={};for(let n of rn)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(!ou(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 rn)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,rn.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 ou(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"&&ou(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)}},Gh=globalThis.process,{onExit:JA,load:d9,unload:m9}=FM(ou(Gh)?new Zh(Gh):new Vh);var QA=su.stderr.isTTY?su.stderr:su.stdout.isTTY?su.stdout:void 0,BM=QA?XA(()=>{JA(()=>{QA.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},eI=BM;var cu=!1,vi={};vi.show=(e=tI.stderr)=>{e.isTTY&&(cu=!1,e.write("\x1B[?25h"))};vi.hide=(e=tI.stderr)=>{e.isTTY&&(eI(),cu=!0,e.write("\x1B[?25l"))};vi.toggle=(e,t)=>{e!==void 0&&(cu=e),cu?vi.show(t):vi.hide(t)};var Wh=vi;var Hh={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 Ho=Hh,x9=Object.keys(Hh);var nn={};$t(nn,{error:()=>KM,info:()=>WM,success:()=>HM,warning:()=>qM});import ZM from"node:tty";var GM=ZM?.WriteStream?.prototype?.hasColors?.()??!1,k=(e,t)=>{if(!GM)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,m=(t===22?i:"")+n;for(;a!==-1;)c+=o.slice(u,a)+m,u=a+i.length,a=o.indexOf(i,u);return c+=o.slice(u)+i,c}},$9=k(0,0),T9=k(1,22),R9=k(2,22),P9=k(3,23),C9=k(4,24),N9=k(53,55),w9=k(7,27),k9=k(8,28),O9=k(9,29),D9=k(30,39),rI=k(31,39),nI=k(32,39),iI=k(33,39),oI=k(34,39),M9=k(35,39),j9=k(36,39),z9=k(37,39),L9=k(90,39),U9=k(40,49),F9=k(41,49),B9=k(42,49),V9=k(43,49),Z9=k(44,49),G9=k(45,49),W9=k(46,49),H9=k(47,49),q9=k(100,49),K9=k(91,39),Y9=k(92,39),X9=k(93,39),J9=k(94,39),Q9=k(95,39),eW=k(96,39),tW=k(97,39),rW=k(101,49),nW=k(102,49),iW=k(103,49),oW=k(104,49),aW=k(105,49),sW=k(106,49),cW=k(107,49);import aI from"node:process";function qo(){let{env:e}=aI,{TERM:t,TERM_PROGRAM:n}=e;return aI.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 uu=qo(),WM=oI(uu?"\u2139":"i"),HM=nI(uu?"\u2714":"\u221A"),qM=iI(uu?"\u26A0":"\u203C"),KM=rI(uu?"\u2716":"\xD7");function qh({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 YM=qh();function Kh(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(YM,"")}var lu=[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],du=[12288,12288,65281,65376,65504,65510],Yh=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Xh=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Ko=[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 mu=(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 XM=lu[0],JM=lu.at(-1),QM=du[0],ej=du.at(-1),EW=Yh[0],xW=Yh.at(-1),AW=Xh[0],IW=Xh.at(-1),tj=Ko[0],rj=Ko.at(-1),sI=19968,[nj,ij]=oj(Ko);function oj(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(sI>=r&&sI<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}var cI=e=>e<XM||e>JM?!1:mu(lu,e),uI=e=>e<QM||e>ej?!1:mu(du,e);var lI=e=>e>=nj&&e<=ij?!0:e<tj||e>rj?!1:mu(Ko,e);function aj(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Yo(e,{ambiguousAsWide:t=!1}={}){return aj(e),uI(e)||lI(e)||t&&cI(e)?2:1}var sj=new Intl.Segmenter,dI=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),cj=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),uj=new RegExp("^\\p{RGI_Emoji}$","v"),lj=/^[\d#*]\u20E3$/,dj=new RegExp("\\p{Extended_Pictographic}","gu");function mj(e){if(e.length>50)return!1;if(lj.test(e))return!0;if(e.includes("\u200D")){let t=e.match(dj);return t!==null&&t.length>=2}return!1}function pj(e){return e.replace(cj,"")}function fj(e){return dI.test(e)}function mI(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function pI(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function fI(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function gj(e){return mI(e)||pI(e)||fI(e)}function hj(e,t){let n=[];for(let r of e)dI.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(!gj(o)){if(i===0)return;for(let a=r;a<n.length;a++)i+=Yo(n[a],t);return i}if(mI(o)&&pI(n[r+1])){i+=2,r+=fI(n[r+2])?2:1;continue}i+=Yo(o,t)}return i}function vj(e,t){let n=0,i=!0;for(let r of e){if(i){i=!1;continue}r>="\uFF00"&&r<="\uFFEF"&&(n+=Yo(r.codePointAt(0),t))}return n}function Jh(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=Kh(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 sj.segment(r)){if(fj(c))continue;if(uj.test(c)||mj(c)){o+=2;continue}let u=pj(c),l=hj(u,a);if(l!==void 0){o+=l;continue}let m=u.codePointAt(0);o+=Yo(m,a),o+=vj(u,a)}return o}function Qh({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import pu from"node:process";var bj=3,ev=class{#o=0;#n;#r=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===bj&&pu.kill(pu.pid,"SIGINT")};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#a()}#t(){let{stdin:t}=pu;if(pu.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}},yj=new ev,tv=Object.freeze(yj);var _j=200,Ej="\x1B[?2026h",xj="\x1B[?2026l",fu=new Map,Aj=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),rv=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===`
172
- `||n==="\r"}#x(){this.#s||(this.#s=setTimeout(()=>{this.#s=void 0,this.isSpinning&&this.#g()},_j),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:Xo.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=Qh({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,Xo.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(!qo())this.#i=Ho.line;else if(t===void 0)this.#i=Ho.dots;else if(t!=="default"&&Ho[t])this.#i=Ho[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 Sj(t).split(`
173
- `))i+=Math.max(1,Math.ceil(Jh(r)/n));return i}get color(){return this.#m}set color(t){if(t!==void 0&&t!==!1&&!Aj.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=Ee[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;fu.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),fu.set(t,this),t.write=(i,r,o)=>this.#T(t,n,i,r,o)}#I(){if(!this.isEnabled||this.#c.size>0)return;let t=new Set([this.#t,Xo.stdout,Xo.stderr]);for(let n of t)this.#A(n)}#$(){for(let[t,n]of this.#c)t.write=n,fu.get(t)===this&&fu.delete(t);this.#c.clear()}#T(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(Ej)),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(`
169
+ `,r)}while(i!==-1);return o+=e.slice(r),o}var{stdout:KA,stderr:YA}=WA,jh=Symbol("GENERATOR"),gi=Symbol("STYLER"),Wo=Symbol("IS_EMPTY"),XA=["ansi","ansi","ansi256","ansi16m"],hi=Object.create(null),PM=(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=KA?KA.level:0;e.level=t.level===void 0?n:t.level};var NM=e=>{let t=(...n)=>n.join(" ");return PM(t,e),Object.setPrototypeOf(t,Ho.prototype),t};function Ho(e){return NM(e)}Object.setPrototypeOf(Ho.prototype,Function.prototype);for(let[e,t]of Object.entries(St))hi[e]={get(){let n=nu(this,Lh(t.open,t.close,this[gi]),this[Wo]);return Object.defineProperty(this,e,{value:n}),n}};hi.visible={get(){let e=nu(this,this[gi],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var zh=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?St[n].ansi16m(...i):t==="ansi256"?St[n].ansi256(St.rgbToAnsi256(...i)):St[n].ansi(St.rgbToAnsi(...i)):e==="hex"?zh("rgb",t,n,...St.hexToRgb(...i)):St[n][e](...i),wM=["rgb","hex","ansi256"];for(let e of wM){hi[e]={get(){let{level:n}=this;return function(...i){let r=Lh(zh(e,XA[n],"color",...i),St.color.close,this[gi]);return nu(this,r,this[Wo])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);hi[t]={get(){let{level:n}=this;return function(...i){let r=Lh(zh(e,XA[n],"bgColor",...i),St.bgColor.close,this[gi]);return nu(this,r,this[Wo])}}}}var kM=Object.defineProperties(()=>{},{...hi,level:{enumerable:!0,get(){return this[jh].level},set(e){this[jh].level=e}}}),Lh=(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}},nu=(e,t,n)=>{let i=(...r)=>OM(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,kM),i[jh]=e,i[gi]=t,i[Wo]=n,i},OM=(e,t)=>{if(e.level<=0||!t)return e[Wo]?"":t;let n=e[gi];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=HA(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
170
+ `);return o!==-1&&(t=qA(t,r,i,o)),i+t+r};Object.defineProperties(Ho.prototype,hi);var DM=Ho(),c9=Ho({level:YA?YA.level:0});var Ee=DM;import Jo from"node:process";import{stripVTControlCharacters as xj}from"node:util";import nI from"node:process";import su from"node:process";var MM=(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);!jM(r,o)&&i||Object.defineProperty(e,n,o)},jM=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)},zM=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},LM=(e,t)=>`/* Wrapped ${e}*/
171
+ ${t}`,UM=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),FM=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),BM=(e,t,n)=>{let i=n===""?"":`with ${n.trim()}() `,r=LM.bind(null,i,t.toString());Object.defineProperty(r,"name",FM);let{writable:o,enumerable:a,configurable:c}=UM;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:a,configurable:c})};function Uh(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let r of Reflect.ownKeys(t))MM(e,t,r,n);return zM(e,t),BM(e,t,i),e}var iu=new WeakMap,JA=(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(iu.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 Uh(o,e),iu.set(o,i),o};JA.callCount=e=>{if(!iu.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return iu.get(e)};var QA=JA;var nn=[];nn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&nn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&nn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ou=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",Fh=Symbol.for("signal-exit emitter"),Bh=globalThis,VM=Object.defineProperty.bind(Object),Vh=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Bh[Fh])return Bh[Fh];VM(Bh,Fh,{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}},au=class{},ZM=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),Zh=class extends au{onExit(){return()=>{}}load(){}unload(){}},Gh=class extends au{#o=Wh.platform==="win32"?"SIGINT":"SIGHUP";#n=new Vh;#r;#e;#i;#t={};#a=!1;constructor(t){super(),this.#r=t,this.#t={};for(let n of nn)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(!ou(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 nn)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,nn.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 ou(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"&&ou(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)}},Wh=globalThis.process,{onExit:eI,load:g9,unload:h9}=ZM(ou(Wh)?new Gh(Wh):new Zh);var tI=su.stderr.isTTY?su.stderr:su.stdout.isTTY?su.stdout:void 0,GM=tI?QA(()=>{eI(()=>{tI.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},rI=GM;var cu=!1,vi={};vi.show=(e=nI.stderr)=>{e.isTTY&&(cu=!1,e.write("\x1B[?25h"))};vi.hide=(e=nI.stderr)=>{e.isTTY&&(rI(),cu=!0,e.write("\x1B[?25l"))};vi.toggle=(e,t)=>{e!==void 0&&(cu=e),cu?vi.show(t):vi.hide(t)};var Hh=vi;var qh={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 qo=qh,T9=Object.keys(qh);var on={};$t(on,{error:()=>JM,info:()=>KM,success:()=>YM,warning:()=>XM});import HM from"node:tty";var qM=HM?.WriteStream?.prototype?.hasColors?.()??!1,k=(e,t)=>{if(!qM)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,m=(t===22?i:"")+n;for(;a!==-1;)c+=o.slice(u,a)+m,u=a+i.length,a=o.indexOf(i,u);return c+=o.slice(u)+i,c}},P9=k(0,0),N9=k(1,22),w9=k(2,22),k9=k(3,23),O9=k(4,24),D9=k(53,55),M9=k(7,27),j9=k(8,28),z9=k(9,29),L9=k(30,39),iI=k(31,39),oI=k(32,39),aI=k(33,39),sI=k(34,39),U9=k(35,39),F9=k(36,39),B9=k(37,39),V9=k(90,39),Z9=k(40,49),G9=k(41,49),W9=k(42,49),H9=k(43,49),q9=k(44,49),K9=k(45,49),Y9=k(46,49),X9=k(47,49),J9=k(100,49),Q9=k(91,39),eW=k(92,39),tW=k(93,39),rW=k(94,39),nW=k(95,39),iW=k(96,39),oW=k(97,39),aW=k(101,49),sW=k(102,49),cW=k(103,49),uW=k(104,49),lW=k(105,49),dW=k(106,49),mW=k(107,49);import cI from"node:process";function Ko(){let{env:e}=cI,{TERM:t,TERM_PROGRAM:n}=e;return cI.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 uu=Ko(),KM=sI(uu?"\u2139":"i"),YM=oI(uu?"\u2714":"\u221A"),XM=aI(uu?"\u26A0":"\u203C"),JM=iI(uu?"\u2716":"\xD7");function Kh({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 QM=Kh();function Yh(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(QM,"")}var lu=[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],du=[12288,12288,65281,65376,65504,65510],Xh=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Jh=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Yo=[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 mu=(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 ej=lu[0],tj=lu.at(-1),rj=du[0],nj=du.at(-1),$W=Xh[0],TW=Xh.at(-1),RW=Jh[0],CW=Jh.at(-1),ij=Yo[0],oj=Yo.at(-1),uI=19968,[aj,sj]=cj(Yo);function cj(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(uI>=r&&uI<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}var lI=e=>e<ej||e>tj?!1:mu(lu,e),dI=e=>e<rj||e>nj?!1:mu(du,e);var mI=e=>e>=aj&&e<=sj?!0:e<ij||e>oj?!1:mu(Yo,e);function uj(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function Xo(e,{ambiguousAsWide:t=!1}={}){return uj(e),dI(e)||mI(e)||t&&lI(e)?2:1}var lj=new Intl.Segmenter,pI=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),dj=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),mj=new RegExp("^\\p{RGI_Emoji}$","v"),pj=/^[\d#*]\u20E3$/,fj=new RegExp("\\p{Extended_Pictographic}","gu");function gj(e){if(e.length>50)return!1;if(pj.test(e))return!0;if(e.includes("\u200D")){let t=e.match(fj);return t!==null&&t.length>=2}return!1}function hj(e){return e.replace(dj,"")}function vj(e){return pI.test(e)}function fI(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function gI(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function hI(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function bj(e){return fI(e)||gI(e)||hI(e)}function yj(e,t){let n=[];for(let r of e)pI.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(!bj(o)){if(i===0)return;for(let a=r;a<n.length;a++)i+=Xo(n[a],t);return i}if(fI(o)&&gI(n[r+1])){i+=2,r+=hI(n[r+2])?2:1;continue}i+=Xo(o,t)}return i}function Sj(e,t){let n=0,i=!0;for(let r of e){if(i){i=!1;continue}r>="\uFF00"&&r<="\uFFEF"&&(n+=Xo(r.codePointAt(0),t))}return n}function Qh(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=Yh(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 lj.segment(r)){if(vj(c))continue;if(mj.test(c)||gj(c)){o+=2;continue}let u=hj(c),l=yj(u,a);if(l!==void 0){o+=l;continue}let m=u.codePointAt(0);o+=Xo(m,a),o+=Sj(u,a)}return o}function ev({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import pu from"node:process";var _j=3,tv=class{#o=0;#n;#r=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===_j&&pu.kill(pu.pid,"SIGINT")};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#a()}#t(){let{stdin:t}=pu;if(pu.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}},Ej=new tv,rv=Object.freeze(Ej);var Aj=200,Ij="\x1B[?2026h",$j="\x1B[?2026l",fu=new Map,Tj=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),nv=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===`
172
+ `||n==="\r"}#x(){this.#s||(this.#s=setTimeout(()=>{this.#s=void 0,this.isSpinning&&this.#g()},Aj),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:Jo.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=ev({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,Jo.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(!Ko())this.#i=qo.line;else if(t===void 0)this.#i=qo.dots;else if(t!=="default"&&qo[t])this.#i=qo[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 xj(t).split(`
173
+ `))i+=Math.max(1,Math.ceil(Qh(r)/n));return i}get color(){return this.#m}set color(t){if(t!==void 0&&t!==!1&&!Tj.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=Ee[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;fu.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),fu.set(t,this),t.write=(i,r,o)=>this.#T(t,n,i,r,o)}#I(){if(!this.isEnabled||this.#c.size>0)return;let t=new Set([this.#t,Jo.stdout,Jo.stderr]);for(let n of t)this.#A(n)}#$(){for(let[t,n]of this.#c)t.write=n,fu.get(t)===this&&fu.delete(t);this.#c.clear()}#T(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(Ij)),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(`
174
174
  `),l=a-1;i=[...u.slice(0,l),"... (content truncated to fit terminal)"].join(`
175
- `)}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(xj))}return this}start(t){if(t&&(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+`
176
- `)),this}return this.isSpinning?this:(this.#e.hideCursor&&Wh.hide(this.#t),this.#e.discardStdin&&Xo.stdin.isTTY&&(tv.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.#$(),this.#u&&(this.#t.removeListener("drain",this.#u),this.#u=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&Wh.show(this.#t)),this.#p&&(this.#p=!1,tv.stop()),this}succeed(t){return this.stopAndPersist({symbol:nn.success,text:t})}fail(t){return this.stopAndPersist({symbol:nn.error,text:t})}warn(t){return this.stopAndPersist({symbol:nn.warning,text:t})}info(t){return this.stopAndPersist({symbol:nn.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)+`
177
- `;return this.stop(),this.#l(()=>this.#t.write(a)),this}};function gu(e){return new rv(e)}var Ij=Object.defineProperty,Ge=(e,t)=>Ij(e,"name",{value:t,configurable:!0}),gI={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},F=null,nv=class e{static{Ge(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 $j(){return nv.getInstance()}Ge($j,"getLoggingControl");function hu(e,...t){he.shouldSuppressOutput||(F&&F.stop(),console.log(e,...t),F&&F.start())}Ge(hu,"info");function Tj(e,...t){hu(e,...t)}Ge(Tj,"message");function iv(e,...t){he.shouldSuppressOutput||(F?(F.succeed(Ee.hex("#A4C2A5")(`\u2705 ${e}`)),F=null):console.log(Ee.hex("#A4C2A5")(`\u2705 ${e}`),...t))}Ge(iv,"success");function ov(e,...t){he.shouldSuppressOutput||(F?(F.warn(`\u26A0\uFE0F ${e}`),F=null):console.log(Ee.yellow(`\u26A0\uFE0F ${e}`),...t))}Ge(ov,"warning");function vu(e,...t){he.shouldSuppressOutput||(F?(F.fail(Ee.red.bold(`\u274C Error: ${e}`)),F=null):console.error(Ee.red.bold(`\u274C Error: ${e}`),...t))}Ge(vu,"error");function Rj(e,t,n){if(vu(t),he.shouldSuppressOutput||console.error(e),n?.tipMessage&&hI(n.tipMessage),n?.supportEmail&&!he.shouldSuppressOutput&&(console.log(Ee.yellow(`
175
+ `)}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($j))}return this}start(t){if(t&&(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+`
176
+ `)),this}return this.isSpinning?this:(this.#e.hideCursor&&Hh.hide(this.#t),this.#e.discardStdin&&Jo.stdin.isTTY&&(rv.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.#$(),this.#u&&(this.#t.removeListener("drain",this.#u),this.#u=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&Hh.show(this.#t)),this.#p&&(this.#p=!1,rv.stop()),this}succeed(t){return this.stopAndPersist({symbol:on.success,text:t})}fail(t){return this.stopAndPersist({symbol:on.error,text:t})}warn(t){return this.stopAndPersist({symbol:on.warning,text:t})}info(t){return this.stopAndPersist({symbol:on.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)+`
177
+ `;return this.stop(),this.#l(()=>this.#t.write(a)),this}};function gu(e){return new nv(e)}var Rj=Object.defineProperty,Ge=(e,t)=>Rj(e,"name",{value:t,configurable:!0}),vI={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},F=null,iv=class e{static{Ge(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 Cj(){return iv.getInstance()}Ge(Cj,"getLoggingControl");function hu(e,...t){he.shouldSuppressOutput||(F&&F.stop(),console.log(e,...t),F&&F.start())}Ge(hu,"info");function Pj(e,...t){hu(e,...t)}Ge(Pj,"message");function ov(e,...t){he.shouldSuppressOutput||(F?(F.succeed(Ee.hex("#A4C2A5")(`\u2705 ${e}`)),F=null):console.log(Ee.hex("#A4C2A5")(`\u2705 ${e}`),...t))}Ge(ov,"success");function av(e,...t){he.shouldSuppressOutput||(F?(F.warn(`\u26A0\uFE0F ${e}`),F=null):console.log(Ee.yellow(`\u26A0\uFE0F ${e}`),...t))}Ge(av,"warning");function vu(e,...t){he.shouldSuppressOutput||(F?(F.fail(Ee.red.bold(`\u274C Error: ${e}`)),F=null):console.error(Ee.red.bold(`\u274C Error: ${e}`),...t))}Ge(vu,"error");function Nj(e,t,n){if(vu(t),he.shouldSuppressOutput||console.error(e),n?.tipMessage&&bI(n.tipMessage),n?.supportEmail&&!he.shouldSuppressOutput&&(console.log(Ee.yellow(`
178
178
  Please contact ${Ee.bold(n.supportEmail)} for assistance with this issue.`)),console.log(Ee.yellow("Include the error details above in your support request."))),n?.learnMoreUrl&&!he.shouldSuppressOutput&&console.log(Ee.blue(`
179
- \u{1F4D8} Learn more: ${n.learnMoreUrl}`)),n?.throwError!==!1)throw e;return e}Ge(Rj,"handleError");function hI(e,...t){he.shouldSuppressOutput||(F&&F.stop(),console.log(Ee.blue(`\u{1F4A1} Tip: ${e}`),...t),F&&F.start())}Ge(hI,"tip");function Pj(e){he.shouldSuppressOutput||(F&&F.stop(),console.log(`
180
- ${Ee.hex("#D9622E").bold(`--- ${e} ---`)}`),F&&F.start())}Ge(Pj,"step");function bu(){return he.shouldSuppressOutput||he.isNonInteractive}Ge(bu,"shouldSuppressSpinner");function av(e){if(bu())return null;if(F)return F.text=e,F;let t=Ee.hex("#FF7BFF")(e);return F=gu({text:t,spinner:gI,color:"magenta"}).start(),F}Ge(av,"startSpinner");function sv(e){if(bu())return null;if(F)F.text=Ee.hex("#FF7BFF")(e);else{let t=Ee.hex("#FF7BFF")(e);F=gu({text:t,spinner:gI,color:"magenta"}).start()}return F}Ge(sv,"updateSpinner");function cv(){bu()||F&&(F.stop(),F=null)}Ge(cv,"stopSpinner");var Cj=Object.defineProperty,vI=(e,t)=>Cj(e,"name",{value:t,configurable:!0}),uv=class{static{vI(this,"CLILogger")}info(t){hu(t)}error(t){vu(t)}warning(t){ov(t)}success(t){iv(t)}debug(t){yu.debug("CLI",t)}startSpinner(t){return av(t)}stopSpinner(){cv()}updateSpinner(t){sv(t)}},Jo=class{static{vI(this,"CLIContext")}mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(t={}){this.isNonInteractive=t.noPrompt??!1,this.logger=new uv}};var Nj=Object.defineProperty,bI=(e,t)=>Nj(e,"name",{value:t,configurable:!0}),lv=class{static{bI(this,"SilentLogger")}info(t){}error(t){}warning(t){}success(t){}debug(t){}startSpinner(t){return null}stopSpinner(){}updateSpinner(t){}},Qo=class{static{bI(this,"InkContext")}mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new lv}};var wj=Object.defineProperty,kj=(e,t)=>wj(e,"name",{value:t,configurable:!0}),he=class{static{kj(this,"ContextManager")}static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new Jo({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 Qo)}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 Oj=Object.defineProperty,Dj=(e,t)=>Oj(e,"name",{value:t,configurable:!0}),bi=class{static{Dj(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 Bj,existsSync as AI,mkdirSync as II}from"fs";import{existsSync as on,renameSync as yI,unlinkSync as SI,statSync as zj,mkdirSync as Lj}from"fs";import{dirname as _I,basename as EI,extname as xI,join as ea}from"path";var Mj=Object.defineProperty,jj=(e,t)=>Mj(e,"name",{value:t,configurable:!0}),yi=class{static{jj(this,"FileRotator")}maxFiles;constructor(t){this.maxFiles=t.maxFiles}needsRotation(t,n){try{return on(t)?zj(t).size>n:!1}catch{return!1}}rotate(t){try{let n=_I(t);if(!on(n)){Lj(n,{recursive:!0});return}if(!on(t))return;let i=xI(t),r=EI(t,i),o=ea(n,`${r}.${this.maxFiles-1}${i}`);on(o)&&SI(o);for(let c=this.maxFiles-2;c>=1;c--){let u=ea(n,`${r}.${c}${i}`),l=ea(n,`${r}.${c+1}${i}`);on(u)&&yI(u,l)}let a=ea(n,`${r}.1${i}`);yI(t,a)}catch{}}rotateIfNeeded(t,n){return this.needsRotation(t,n)?(this.rotate(t),!0):!1}getRotatedFiles(t){let n=[],i=_I(t),r=xI(t),o=EI(t,r);on(t)&&n.push(t);for(let a=1;a<this.maxFiles;a++){let c=ea(i,`${o}.${a}${r}`);if(on(c))n.push(c);else break}return n}cleanAll(t){let n=this.getRotatedFiles(t);for(let i of n)try{SI(i)}catch{}}};var Uj=Object.defineProperty,Fj=(e,t)=>Uj(e,"name",{value:t,configurable:!0}),Su=class{static{Fj(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 yi({maxFiles:t.maxFiles})}get isInitialised(){return this.initialised}openStream(t){let n=Bj(t,{flags:"a"});return n.on("error",i=>{process.stderr.write(`[fjall] Log stream error: ${i.message}
181
- `)}),n}initialise(){if(!(this.initialised||this.isClosing))try{AI(this.config.logDir)||II(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)}
182
- `)}}initialiseDebugStream(){if(!this.debugLogStream)try{AI(this.config.debugLogDir)||II(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)}
179
+ \u{1F4D8} Learn more: ${n.learnMoreUrl}`)),n?.throwError!==!1)throw e;return e}Ge(Nj,"handleError");function bI(e,...t){he.shouldSuppressOutput||(F&&F.stop(),console.log(Ee.blue(`\u{1F4A1} Tip: ${e}`),...t),F&&F.start())}Ge(bI,"tip");function wj(e){he.shouldSuppressOutput||(F&&F.stop(),console.log(`
180
+ ${Ee.hex("#D9622E").bold(`--- ${e} ---`)}`),F&&F.start())}Ge(wj,"step");function bu(){return he.shouldSuppressOutput||he.isNonInteractive}Ge(bu,"shouldSuppressSpinner");function sv(e){if(bu())return null;if(F)return F.text=e,F;let t=Ee.hex("#FF7BFF")(e);return F=gu({text:t,spinner:vI,color:"magenta"}).start(),F}Ge(sv,"startSpinner");function cv(e){if(bu())return null;if(F)F.text=Ee.hex("#FF7BFF")(e);else{let t=Ee.hex("#FF7BFF")(e);F=gu({text:t,spinner:vI,color:"magenta"}).start()}return F}Ge(cv,"updateSpinner");function uv(){bu()||F&&(F.stop(),F=null)}Ge(uv,"stopSpinner");var kj=Object.defineProperty,yI=(e,t)=>kj(e,"name",{value:t,configurable:!0}),lv=class{static{yI(this,"CLILogger")}info(t){hu(t)}error(t){vu(t)}warning(t){av(t)}success(t){ov(t)}debug(t){yu.debug("CLI",t)}startSpinner(t){return sv(t)}stopSpinner(){uv()}updateSpinner(t){cv(t)}},Qo=class{static{yI(this,"CLIContext")}mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(t={}){this.isNonInteractive=t.noPrompt??!1,this.logger=new lv}};var Oj=Object.defineProperty,SI=(e,t)=>Oj(e,"name",{value:t,configurable:!0}),dv=class{static{SI(this,"SilentLogger")}info(t){}error(t){}warning(t){}success(t){}debug(t){}startSpinner(t){return null}stopSpinner(){}updateSpinner(t){}},ea=class{static{SI(this,"InkContext")}mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new dv}};var Dj=Object.defineProperty,Mj=(e,t)=>Dj(e,"name",{value:t,configurable:!0}),he=class{static{Mj(this,"ContextManager")}static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new Qo({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 ea)}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 jj=Object.defineProperty,zj=(e,t)=>jj(e,"name",{value:t,configurable:!0}),bi=class{static{zj(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 Gj,existsSync as $I,mkdirSync as TI}from"fs";import{existsSync as an,renameSync as _I,unlinkSync as EI,statSync as Fj,mkdirSync as Bj}from"fs";import{dirname as xI,basename as AI,extname as II,join as ta}from"path";var Lj=Object.defineProperty,Uj=(e,t)=>Lj(e,"name",{value:t,configurable:!0}),yi=class{static{Uj(this,"FileRotator")}maxFiles;constructor(t){this.maxFiles=t.maxFiles}needsRotation(t,n){try{return an(t)?Fj(t).size>n:!1}catch{return!1}}rotate(t){try{let n=xI(t);if(!an(n)){Bj(n,{recursive:!0});return}if(!an(t))return;let i=II(t),r=AI(t,i),o=ta(n,`${r}.${this.maxFiles-1}${i}`);an(o)&&EI(o);for(let c=this.maxFiles-2;c>=1;c--){let u=ta(n,`${r}.${c}${i}`),l=ta(n,`${r}.${c+1}${i}`);an(u)&&_I(u,l)}let a=ta(n,`${r}.1${i}`);_I(t,a)}catch{}}rotateIfNeeded(t,n){return this.needsRotation(t,n)?(this.rotate(t),!0):!1}getRotatedFiles(t){let n=[],i=xI(t),r=II(t),o=AI(t,r);an(t)&&n.push(t);for(let a=1;a<this.maxFiles;a++){let c=ta(i,`${o}.${a}${r}`);if(an(c))n.push(c);else break}return n}cleanAll(t){let n=this.getRotatedFiles(t);for(let i of n)try{EI(i)}catch{}}};var Vj=Object.defineProperty,Zj=(e,t)=>Vj(e,"name",{value:t,configurable:!0}),Su=class{static{Zj(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 yi({maxFiles:t.maxFiles})}get isInitialised(){return this.initialised}openStream(t){let n=Gj(t,{flags:"a"});return n.on("error",i=>{process.stderr.write(`[fjall] Log stream error: ${i.message}
181
+ `)}),n}initialise(){if(!(this.initialised||this.isClosing))try{$I(this.config.logDir)||TI(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)}
182
+ `)}}initialiseDebugStream(){if(!this.debugLogStream)try{$I(this.config.debugLogDir)||TI(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)}
183
183
  `)}}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)+`
184
- `);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 Kj,existsSync as Yj,mkdirSync as Xj}from"fs";import{join as $I}from"path";var an={trace:0,debug:1,info:2,warn:3,error:4},We={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 Gj}from"path";import{homedir as Wj}from"os";var Vj=Object.defineProperty,Zj=(e,t)=>Vj(e,"name",{value:t,configurable:!0});function $r(){let e=process.env.FJALL_LOG_DIR;return e!==void 0&&e!==""?e:Gj(Wj(),".fjall","logs")}Zj($r,"getDefaultLogDir");var Hj=Object.defineProperty,qj=(e,t)=>Hj(e,"name",{value:t,configurable:!0}),ta=class{static{qj(this,"DeploymentLoggerImpl")}mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=We.MAX_BUFFER_SIZE;constructor(t,n,i){this.mainLogger=t,this.appName=n,this.operationType=i,this.deploymentId=`${i}-${Date.now()}`;let r=$r(),o=$I(r,"deployments",n);Yj(o)||Xj(o,{recursive:!0});let a=new Date().toISOString().replace(/[:.]/g,"-"),c=`${i}-${a}.jsonl`;this.logPath=$I(o,c);try{this.logStream=Kj(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),We.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)+`
185
- `);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 Jj=Object.defineProperty,Qj=(e,t)=>Jj(e,"name",{value:t,configurable:!0}),_u=class e{static{Qj(this,"Logger")}static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let t=$r(),n=dv(t,"debug"),i=this.parseEnvInt("FJALL_LOG_MAX_SIZE",We.MAX_FILE_SIZE),r=this.parseEnvInt("FJALL_LOG_MAX_FILES",We.MAX_FILES);this.config={logDir:t,debugLogDir:n,maxFileSize:i,maxFiles:r,maxBufferSize:We.MAX_BUFFER_SIZE,flushIntervalMs:We.FLUSH_INTERVAL_MS},this.mainLogPath=dv(t,We.LOG_FILENAME),this.debugLogPath=dv(n,We.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 an?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new Su(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 an[t]>=an[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(he.shouldSuppressOutput||he.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(`${kn(o)}
186
- `)}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,an[this.minLevel]>an.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(t){return new bi(this,t)}forDeployment(t,n="deploy"){return new ta(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 ez=Object.defineProperty,tz=(e,t)=>ez(e,"name",{value:t,configurable:!0}),yu=_u.getInstance();function oz(e){let t=$r(),n=RI(t,"debug"),i=RI(n,We.DEBUG_LOG_FILENAME);try{TI(n)||rz(n,{recursive:!0}),TI(i)&&nz(i).size>We.MAX_FILE_SIZE&&new yi({maxFiles:We.MAX_FILES}).rotate(i);let r={timestamp:new Date().toISOString(),level:"debug",component:"Emergency",message:e};iz(i,JSON.stringify(r)+`
187
- `)}catch{}}tz(oz,"writeDebugSync");var az=Object.defineProperty,Si=(e,t)=>az(e,"name",{value:t,configurable:!0});function mv(e){return e.success===!0}Si(mv,"isSuccess");function pv(e){return e.success===!1}Si(pv,"isFailure");function C(e){return{success:!0,data:e}}Si(C,"success");function $(e){return{success:!1,error:e}}Si($,"failure");async function fv(e){try{let t=await e();return C(t)}catch(t){return $(vt(t))}}Si(fv,"tryAsync");function gv(e){try{let t=e();return C(t)}catch(t){return $(vt(t))}}Si(gv,"trySync");var sz=Object.defineProperty,cz=(e,t)=>sz(e,"name",{value:t,configurable:!0}),PI=/^[a-zA-Z][a-zA-Z0-9-]*$/,uz=Bo.source.replace(/^\^|\$$/g,""),L=Object.freeze({IDENTIFIER:PI,NEW_APP_NAME:/^[a-z][a-z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:PI,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(`^(?:/${uz})+$`),SECRET_NAME:Jc,SSM_COMPONENT:Bo,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 hv(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}}cz(hv,"parseRateExpression");var d=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:hh,SSM_COMPONENT:Qc,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 lz=Object.defineProperty,st=(e,t)=>lz(e,"name",{value:t,configurable:!0}),dz=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],mz=Object.freeze(dz.flatMap(e=>{let t=Cn(e);return t?[t]:[]})),vv=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function Eu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}st(Eu,"parseRegionList");function bv(e){return Kt.includes(e)}st(bv,"isValidRegion");function yv(e){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(e)}st(yv,"isValidRegionFormat");function Sv(e){if(!e)return vv.slice(0,3);let t=e.toLowerCase().split("-"),n=t[0],i=t.length>1?t[1]:"",r=[];return n&&i&&(r=Kt.filter(o=>o.startsWith(`${n}-${i}`))),r.length===0&&n&&(r=Kt.filter(o=>o.startsWith(`${n}-`))),r.length>0?r.slice(0,3):vv.slice(0,3)}st(Sv,"getSuggestions");function _v(e){if(bv(e))return!0;let t=Sv(e);return yv(e)?`Unknown region. Try: ${t.join(", ")}`:`Invalid format. Try: ${t.join(", ")}`}st(_v,"validateRegion");function CI(e){if(!e||e.trim()==="")return!0;let t=Eu(e);for(let n of t){let i=_v(n);if(i!==!0)return i}return!0}st(CI,"validateRegionList");function Ev(e,t){return e.filter(n=>n!==t)}st(Ev,"filterDuplicateRegions");function xv(e){return{label:e.city,value:e.code,description:e.optIn?`${e.code} \u2014 opt-in required`:e.code}}st(xv,"toRegionOption");function NI(){return it.map(xv)}st(NI,"getRegionOptions");function wI(e){return it.filter(t=>t.code!==e).map(xv)}st(wI,"getRegionOptionsExcluding");function kI(e){let t=it.find(n=>n.code===e);return t?t.city:e}st(kI,"getRegionName");function OI(e){return t=>{let n=Eu(t);return Ev(n,e)}}st(OI,"createRegionFormatter");var xu="3.11.0";var Au=["Aurora","Instance","GlobalAurora","ClickHouse"],_i=["FARGATE","FARGATE_SPOT","EC2"],_t=["standard","resilient","enterprise"],Iu=["tinkerer","lightweight","standard","resilient","enterprise"],Av="custom",ra=[...Iu,Av];var pz=Object.defineProperty,fz=(e,t)=>pz(e,"name",{value:t,configurable:!0}),DI=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})}),na=["ecs","lambda","ec2"],Ei=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),$u=["code","container"],ia=Object.freeze({CODE:"code",CONTAINER:"container"}),Tu=["ARM_64","X86_64"],MI="ARM_64",oa=["NONE","AWS_IAM"],Ru=["public","internal"],Pu=["CPU","MEMORY"],Cu=["ARM","STANDARD"],Iv=["Instance","Aurora"],xi=["postgresql","mysql"],jI=["foundation","compliance","hardened"];var Nu=["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"],zI=[0,1,5,10,15,30,60];function ct(e,t){return e.includes(t)}fz(ct,"constIncludes");var LI=1,UI=65535,p5=Object.freeze({postgresql:5432,mysql:3306}),FI=128,BI=10240,wu=1,ku=900,$v=1,Tv=1e3,Ai=100,VI=100;var ZI=3e3;var GI=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],WI=["standard","assets","upload","website"],Ii=["AES256","KMS"];var gz=Object.defineProperty,aa=(e,t)=>gz(e,"name",{value:t,configurable:!0}),He=aa(e=>s.union([s.literal(!1),e]),"optionalOrDisabled"),sn={check:aa(e=>e.minCapacity!==void 0&&e.maxCapacity!==void 0?e.minCapacity<=e.maxCapacity:!0,"check"),params:{message:d.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},sa=aa(e=>s.number().int(d.MEMORY_LIMIT.INTEGER).min(e,e===128?d.MEMORY_LIMIT.MIN_128:d.MEMORY_LIMIT.MIN_512).max(30720,d.MEMORY_LIMIT.MAX),"memoryLimitMiBSchema"),V=s.string().min(1,d.REQUIRED.RESOURCE_NAME).max(63,d.MAX_LENGTH.RESOURCE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),qI=s.string().min(1,d.REQUIRED.BUCKET_NAME).max(63,d.MAX_LENGTH.BUCKET_NAME).regex(L.BUCKET_NAME,d.BUCKET_NAME),KI=s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME);function Ou(e,t=L.IDENTIFIER,n=d.IDENTIFIER){return s.string().min(2,d.IDENTIFIER_MIN_LENGTH).max(50,e).regex(t,n).refine(i=>!i.endsWith("-"),{message:d.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(i=>!i.includes("--"),{message:d.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}aa(Ou,"identifierSchema");var ve=Ou(d.MAX_LENGTH.APP_NAME),S5=Ou(d.MAX_LENGTH.APP_NAME,L.NEW_APP_NAME,d.NEW_APP_NAME),cn=s.number().int(d.PORT.INTEGER).min(LI,d.PORT.MIN).max(UI,d.PORT.MAX),Te=s.object({key:s.string(),sourceText:s.string()}).strict(),hz=s.object({__identifier:s.string()}).strict(),vz=s.object({__expression:s.string()}).strict(),bz=s.object({__call:s.string()}).strict(),yz=s.union([hz,vz,bz]),Sz=s.union([s.string(),s.number(),s.boolean(),yz]),$i=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),Sz),_z=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`."}),YI=s.record(s.string(),_z),_5=s.record(s.string(),s.unknown()),Rv=s.enum(ra).describe(`Application type must be one of: ${ra.join(", ")}`),Pv=s.enum(kt).describe(`OpenNext deployment pattern: ${kt.join(", ")}`),Ez=s.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),xz=s.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),XI=s.object({sourceText:s.string(),position:Ez,afterManagedResource:s.object({type:xz,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(),JI=s.union([s.object({tier:s.enum(_t)}).strict(),s.literal(!1)]),QI=s.union([s.object({instanceType:s.string().optional()}).strict(),s.literal(!1)]),Az=Ou(d.MAX_LENGTH.ORGANISATION_NAME),Iz=s.string().regex(L.EMAIL,d.EMAIL),HI=s.string().refine(e=>Kt.includes(e),{message:d.REGION}),E5=s.object({name:Az,email:Iz,accountName:s.string().optional(),primaryRegion:HI.optional().default(Pn),secondaryRegions:s.array(HI).optional(),security:s.enum(jI).optional(),force:s.boolean().optional()}).strict();function ca(e){return e.issues.map(t=>`${t.path.length>0?`${t.path.join(".")}: `:""}${t.message}`).join(`
188
- `)}aa(ca,"getZodErrorMessage");var Ti=s.number().min(1,d.ALARM.PERCENTAGE.MIN).max(100,d.ALARM.PERCENTAGE.MAX),$z=s.number().min(1,d.ALARM.FREE_STORAGE_GIB.MIN),e$=s.union([s.literal(!1),s.object({cpuThreshold:Ti.optional(),memoryThreshold:Ti.optional(),runningTasksMinimum:s.number().int().min(0).optional(),http5xxThreshold:Ti.optional()}).strict()]),t$=s.union([s.literal(!1),s.object({cpuThreshold:Ti.optional(),freeStorageThresholdGiB:$z.optional(),connectionsThreshold:s.number().int().min(1).optional()}).strict()]),r$=s.union([s.literal(!1),s.object({errorRateThreshold:Ti.optional(),durationThresholdPercent:Ti.optional()}).strict()]);var Qt=s.number().int(d.BACKUP_RETENTION.INTEGER).min(1,d.BACKUP_RETENTION.MIN).max(35,d.BACKUP_RETENTION.MAX),ua=s.number().int(d.MONITORING_INTERVAL.INTEGER).refine(e=>ct(zI,e),{message:d.MONITORING_INTERVAL.VALUES}),Mu=s.number().int(d.DATABASE.PORT.INTEGER).min(1024,d.DATABASE.PORT.MIN).max(65535,d.DATABASE.PORT.MAX),Tz=s.enum(Au).describe(`Database type must be one of: ${Au.join(", ")}`),Rz=s.object({maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional()}).strict().describe("RDS Proxy configuration"),Pz=s.object({instanceType:s.string().optional(),availabilityZone:s.string().optional()}).strict().describe("Read replica configuration"),Cz=s.object({automaticallyAfterDays:s.number().int(d.ROTATION.INTEGER).min(1,d.ROTATION.MIN).max(365,d.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),ju=s.object({username:s.string().min(1,d.REQUIRED.USERNAME).max(63,d.USERNAME.MAX_LENGTH).optional(),secretRotation:Cz.optional()}).strict().describe("Database credentials configuration"),zu=He(Rz),Lu=He(Pz),Nz=s.object({scaleWithWriter:s.boolean().optional(),enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),la=s.object({enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for Aurora writer instance"),wz=s.object({count:s.number().int(d.READER.COUNT.INTEGER).min(0,d.READER.COUNT.MIN).max(15,d.READER.COUNT.MAX).optional(),instances:s.array(Nz).max(15,d.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:s.boolean().optional()}).strict().refine(e=>!(e.count!==void 0&&e.instances!==void 0),{message:d.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),da=He(wz),kz=s.object({awsManaged:s.literal(!0)}).strict(),Oz=s.object({useCMK:s.literal(!0)}).strict(),n$=s.union([kz,Oz]),Dz=s.object({mode:s.enum(["standard","advanced"]).optional(),encryptionKey:n$.optional()}).strict().describe("Database Insights configuration"),Uu=He(Dz),Fu=s.object({storageKey:n$.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),i$=s.object({name:V,type:Tz,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),instanceType:s.string().optional(),allocatedStorage:s.number().optional(),multiAz:s.boolean().optional(),publiclyAccessible:s.boolean().optional(),databaseInsights:Uu.optional(),port:Mu.optional(),deletionProtection:s.boolean().optional(),proxy:zu.optional(),credentials:ju.optional(),readReplica:Lu.optional(),encryption:Fu.optional(),writer:la.optional(),readers:da.optional(),backupRetention:Qt.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:ua.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(xi).optional(),engineExpression:s.string().optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional(),alarms:t$.optional()}).strict(),Bu=s.object({appName:ve,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional(),databaseInsights:Uu.optional(),port:Mu.optional(),proxy:zu.optional(),credentials:ju.optional(),encryption:Fu.optional(),deletionProtection:s.boolean().optional()}).strict(),o$={databaseType:s.literal("Instance"),instanceType:s.string().optional(),multiAz:s.boolean().optional(),readReplica:Lu.optional(),publiclyAccessible:s.boolean().optional(),backupRetention:Qt.optional(),allocatedStorage:s.number().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},a$={databaseType:s.literal("Aurora"),writer:la.optional(),readers:da.optional(),backupRetention:Qt.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:ua.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},s$={databaseType:s.literal("GlobalAurora"),primaryRegion:s.string().min(1,d.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),writer:la.optional(),readers:da.optional(),backupRetention:Qt.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:ua.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},c$=s.object({appName:ve,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict(),u$={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:Qt.optional()},Mz=Bu.extend(o$).strict(),jz=Bu.extend(a$).strict(),zz=Bu.extend(s$).strict(),Lz=c$.extend(u$).strict(),w5=s.discriminatedUnion("databaseType",[Mz,jz,zz,Lz]),Cv=Bu.extend({resourceName:V}).strict(),Uz=Cv.extend(o$).strict(),Fz=Cv.extend(a$).strict(),Bz=Cv.extend(s$).strict(),Vz=c$.extend({resourceName:V}).strict(),Zz=Vz.extend(u$).strict(),k5=s.discriminatedUnion("databaseType",[Uz,Fz,Bz,Zz]),O5=s.object({appName:ve,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional(),nameProvidedByFlag:s.boolean().optional()}).strict(),Gz=["S","N","B"],Du=s.object({name:s.string(),type:s.enum(Gz)}).strict(),l$=s.object({name:V,partitionKey:Du,sortKey:Du.optional(),globalSecondaryIndexes:s.array(s.object({indexName:s.string(),partitionKey:Du,sortKey:Du.optional()}).strict()).optional(),ttlAttribute:s.string().optional(),stream:s.boolean().optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict(),Wz=s.object({mode:s.literal("s3")}).strict(),d$=s.object({name:V,type:s.literal("ClickHouse"),databaseName:KI,instanceType:s.string().optional(),coldTier:s.union([Wz,s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:Qt.optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict();var Hz=s.object({count:s.number().int(d.NAT_GATEWAY.INTEGER).min(0,d.NAT_GATEWAY.MIN).max(3,d.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),m$=He(Hz),Nv=s.enum(["cloudwatch","s3"]),qz=s.object({destination:Nv.optional(),retentionDays:s.number().int(d.RETENTION_DAYS.INTEGER).min(1,d.RETENTION_DAYS.MIN).max(365,d.RETENTION_DAYS.MAX).optional(),trafficType:s.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),p$=He(qz),Kz=s.object({s3:s.boolean().optional(),dynamodb:s.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),Yz=He(Kz),Xz=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)"),Jz=He(Xz),Qz=s.object({gateway:Yz.optional(),interface:Jz.optional()}).strict().describe("VPC endpoints configuration"),f$=He(Qz),Vu=s.object({maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:m$.optional(),flowLogs:p$.optional(),vpcEndpoints:f$.optional(),cidrMask:s.number().int(d.CIDR_MASK.INTEGER).min(16,d.CIDR_MASK.MIN).max(28,d.CIDR_MASK.MAX).optional()}).strict(),g$=s.string().min(1,d.REQUIRED.NETWORK_NAME).max(50,d.MAX_LENGTH.NETWORK_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),h$=Vu.extend({name:g$}).strict(),v$=He(Vu),L5=s.object({appName:ve,networkName:g$.optional(),maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:m$.optional(),flowLogs:p$.optional(),vpcEndpoints:f$.optional()}).strict(),eL=L.CIDR,wv=s.string().regex(eL,d.CIDR),tL=s.object({kind:s.literal("database"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),name:V,allowedFromCidrs:s.array(wv),access:s.enum(["read","write","readWrite"]).optional()}).strict(),rL=s.object({kind:s.literal("ecsService"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),serviceName:s.string().min(1,d.REQUIRED.SERVICE_NAME),name:V,allowedFromCidrs:s.array(wv),port:cn.optional()}).strict(),nL=s.discriminatedUnion("kind",[tL,rL]),U5=s.object({name:V,peerAppName:s.string().min(1,d.REQUIRED.APP_NAME),peerAccountId:s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID),peerRegion:s.string().min(1,d.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:s.string().regex(L.VPC_ID,d.VPC_ID).optional(),peerVpcCidr:wv.optional(),peerRoleArn:s.string().regex(L.ROLE_ARN,d.ROLE_ARN).optional(),peerRouteTableIds:s.array(s.string().min(1,d.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:s.boolean().optional()}).strict(),F5=s.object({name:V,requesterAccountIds:s.array(s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID)).min(1,d.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),publishToSsm:s.boolean().optional(),exposedResources:s.array(nL).optional()}).strict();var Zu=["storage","cdn","compute"],iL=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(),b$=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(_t).optional(),versioned:s.boolean().optional(),encryption:s.enum(Ii).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(iL).optional(),stackPlacement:s.enum(Zu).optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:d.KMS.KEY_REQUIRED}),H5=s.object({appName:ve,bucketName:qI,nameProvidedByFlag:s.boolean().optional(),storagePreset:s.enum(WI).optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum(_t).optional(),versioned:s.boolean().optional(),encryption:s.enum(Ii).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:d.KMS.KEY_REQUIRED,path:["kmsKeyArn"]});var kv=s.enum(["DESTROY","RETAIN"]),y$=s.object({name:V,queueType:s.enum(["standard","fifo"]).default("standard"),visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),retentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),contentBasedDeduplication:s.boolean().optional(),removalPolicy:kv.optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict();var S$=s.object({type:s.literal("basic-auth"),username:s.string().min(1),password:s.string().min(1)}).strict(),_$=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),S$]).optional(),extraProperties:s.array(Te).optional()}).strict(),tH=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),S$]).optional(),nameProvidedByFlag:s.boolean().optional()}).strict();var oL=Object.defineProperty,Ov=(e,t)=>oL(e,"name",{value:t,configurable:!0}),aL=new Set(["t4g","c6g","c6gd","c6gn","c7g","c7gd","c7gn","r6g","r6gd","r7g","r7gd","m6g","m6gd","m7g","m7gd","a1","x2gd","im4gn","is4gen","i4g","hpc7g"]);function Ri(e){let t=e.split(".")[0]??"";return aL.has(t)?"ARM":"STANDARD"}Ov(Ri,"getArchitectureForInstanceType");function Gu(e,t){let n=Ri(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}}Ov(Gu,"validateArchitectureMatch");function E$(e,t){return Ri(e)===t}Ov(E$,"isArchitectureCompatible");var sL=Object.defineProperty,Wu=(e,t)=>sL(e,"name",{value:t,configurable:!0});var cL=1,uL=/^[A-Za-z0-9_.-]+$/,lL=s.object({id:s.string().min(1,"buildSecret id cannot be empty").regex(uL,"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)"})}),dL=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)"})})]),Ot=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(),dL).optional(),buildSecrets:s.array(lL).optional()}).strict(),aH=Ot.partial();function mL(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}}}Wu(mL,"mergeDockerBuild");function Dv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}Wu(Dv,"isRecord");function x$(e){if(!Dv(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=Dv(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=Ot.safeParse(o);return a.success?a.data:void 0}Wu(x$,"normaliseDockerBuild");function pL(e){if(e===void 0)return;let t=x$(e);return t===void 0?void 0:JSON.stringify(t)}Wu(pL,"dockerBuildFingerprint");var fL=s.object({name:s.string(),clusterName:s.string().optional(),docker:Ot.optional(),containerPort:s.number().optional(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional()}).strict(),gL=s.object({type:s.enum(kt),name:s.string(),source:s.string()}).strict(),hL=s.object({repositoryName:s.string()}).strict(),vL=["x86_64","arm64"],bL=s.object({name:s.string(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),docker:Ot.optional(),imageKey:s.string().optional(),architecture:s.enum(vL).optional()}).strict(),yL=s.object({templateHash:s.string(),synthTimestamp:s.string()}).strict(),SL=s.object({constructPath:s.string().max(512),group:s.string().max(128),resourceType:s.string().max(256)}).strict(),sH=s.object({version:s.literal(cL),generatedAt:s.string(),appName:s.string(),services:s.array(fL),lambdas:s.array(bL),pattern:gL.optional(),ecr:hL.optional(),stacks:s.record(s.string(),yL),resourceMap:s.record(s.string(),SL).optional()}).strict();var _L=Object.defineProperty,EL=(e,t)=>_L(e,"name",{value:t,configurable:!0});function I$(e){return!(e.image!==void 0&&e.docker!==void 0)}EL(I$,"imageDockerMutexCheck");var $$=s.number().int(d.CAPACITY.MIN.INTEGER).min($v,d.GENERATOR_CAPACITY.MIN.MIN).max(Tv,d.GENERATOR_CAPACITY.MIN.MAX),T$=s.number().int(d.CAPACITY.MAX.INTEGER).min($v,d.GENERATOR_CAPACITY.MAX.MIN).max(Tv,d.GENERATOR_CAPACITY.MAX.MAX),Pi=s.number().int(d.LAMBDA.MEMORY.INTEGER).min(FI,d.LAMBDA.MEMORY.MIN).max(BI,d.LAMBDA.MEMORY.MAX).refine(e=>e===128||e%64===0,d.LAMBDA.MEMORY.MULTIPLE),R$=s.string().regex(L.LAMBDA_RUNTIME_IDENTIFIER,d.LAMBDA.RUNTIME),Mv=s.number().int(d.CPU.INTEGER).min(256,d.CPU.MIN).max(4096,d.CPU.MAX),qu=s.number().int(d.CAPACITY.DESIRED.INTEGER).min(0,d.CAPACITY.DESIRED.MIN).max(Ai,d.CAPACITY.DESIRED.MAX),ma=s.object({connectToDatabase:s.array(s.string()).optional()}).strict(),xL=s.object({minSize:s.number().int(d.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,d.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(VI,d.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:s.boolean().optional()}).strict(),jv=s.object({instanceType:s.string().optional(),amiHardwareType:s.enum(Cu).optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(Ai,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(Ai,d.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:sa(128).optional(),warmPool:xL.optional(),extraProperties:s.array(Te).optional()}).strict().superRefine((e,t)=>{if(!e.instanceType||!e.amiHardwareType)return;let n=Gu(e.instanceType,e.amiHardwareType);n.valid||t.addIssue({code:"custom",message:n.message??d.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((e,t)=>{e.minCapacity===0&&!e.warmPool&&t.addIssue({code:"custom",message:d.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:d.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),AL=s.enum(na).describe(`Compute type must be one of: ${na.join(", ")}`),zv=s.enum(_i).describe(`ECS capacity provider must be one of: ${_i.join(", ")}`),Lv=s.string().refine(e=>ct(Nu,e),{message:d.INSTANCE_TYPE}),P$=s.object({sourceType:s.enum(["sqs","dynamodb","eventbridge"]),sourceRef:s.string().describe("Name of the source resource"),batchSize:s.number().int(d.BATCH_SIZE.INTEGER).min(1,d.BATCH_SIZE.MIN).max(1e4,d.BATCH_SIZE.MAX).optional(),startingPosition:s.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:s.number().int(d.BATCHING_WINDOW.INTEGER).min(0,d.BATCHING_WINDOW.MIN).max(300,d.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:s.boolean().optional()}).strict(),IL=s.object({name:s.string().min(1,d.REQUIRED.CONTAINER_NAME).optional(),image:s.string().optional(),port:cn.optional(),environment:$i.optional(),secretsImport:YI.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(d.HEALTH_CHECK.INTERVAL.INTEGER).min(5,d.HEALTH_CHECK.INTERVAL.MIN).max(300,d.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:s.number().int(d.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,d.HEALTH_CHECK.TIMEOUT.MIN).max(60,d.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:s.number().int(d.HEALTH_CHECK.RETRIES.INTEGER).min(1,d.HEALTH_CHECK.RETRIES.MIN).max(10,d.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:s.number().int(d.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,d.HEALTH_CHECK.START_PERIOD.MIN).max(300,d.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:s.array(s.string().regex(L.SECRET_NAME,d.SECRET_NAME)).optional(),extraProperties:s.array(Te).optional()}).strict(),C$=s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.ECS_SERVICE_NAME,d.ECS_SERVICE_NAME),N$=s.object({domain:s.string().optional(),loadBalancer:s.union([s.literal(!1),s.enum(Ru)]).optional(),directAccess:s.boolean().optional(),extraProperties:s.array(Te).optional()}).strict().refine(e=>!(e.directAccess&&e.domain),{message:d.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(e=>!(e.directAccess&&typeof e.loadBalancer=="string"),{message:d.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),Hu=s.object({path:s.string().optional(),host:s.string().optional(),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional(),healthCheckPath:s.string().optional()}).strict().describe("Path/host-based routing configuration"),$L=s.object({desiredCount:qu.optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(Ai,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(Ai,d.CAPACITY.MAX.MAX).optional(),scalingType:s.enum(Pu).optional()}).strict().refine(sn.check,sn.params).describe("ECS service scaling configuration"),w$=s.object({name:C$,docker:Ot.optional(),needsDatabaseConnection:s.boolean().optional(),needsStorageConnection:s.boolean().optional(),needsMessagingConnection:s.boolean().optional(),image:s.string().optional(),containers:s.array(IL).optional(),routing:s.union([Hu,s.array(Hu).min(1)]).optional(),cpu:Mv.optional(),memoryLimitMiB:sa(512).optional(),desiredCount:qu.optional(),scaling:He($L).optional(),capacityProvider:zv,ec2Config:jv.optional(),ssmSecretsPath:s.string().regex(L.SSM_PATH,d.SSM_PATH).optional(),extraProperties:s.array(Te).optional(),alarms:e$.optional()}).strict().superRefine((e,t)=>{I$(e)||t.addIssue({code:"custom",path:["docker"],message:d.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),k$=s.object({name:V,type:AL,needsConnection:s.boolean(),connectedDatabase:s.array(s.string()).optional(),connectedStorage:s.array(s.string()).optional(),connectedMessaging:s.array(s.string()).optional(),cluster:N$.optional(),services:s.array(w$).optional(),docker:Ot.partial().optional(),deployment:s.enum($u).optional(),codePath:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(wu,d.LAMBDA.TIMEOUT.MIN).max(ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Pi.optional(),handler:s.string().optional(),runtime:R$.optional(),environment:$i.optional(),secrets:$i.optional(),eventSources:s.array(P$).optional(),functionUrl:s.object({authType:s.enum(oa)}).strict().optional(),description:s.string().optional(),scheduleExpression:s.string().optional(),architecture:s.enum(Tu).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional(),functionName:s.string().optional(),ssmSecrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),alarms:r$.optional(),instanceType:Lv.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(Te).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&&Ri(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"]})}),hH=s.object({appName:ve,clusterName:V,containerPort:cn,nameProvidedByFlag:s.boolean().optional(),ecrRepository:s.string().optional(),capacityProvider:zv.optional(),useAppEcr:s.boolean().optional(),desiredCount:qu.optional(),cpu:Mv.optional(),memoryLimitMiB:sa(512).optional(),minCapacity:$$.optional(),maxCapacity:T$.optional(),ec2Config:jv.optional(),connectionConfig:ma.optional()}).strict().refine(sn.check,sn.params),vH=s.object({appName:ve,functionName:V,nameProvidedByFlag:s.boolean().optional(),lambdaType:s.enum(["basic","web","custom"]).optional(),ecrRepository:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(wu,d.LAMBDA.TIMEOUT.MIN).max(ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Pi.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(GI)).optional(),corsCredentials:s.boolean().optional(),connectionConfig:ma.optional()}).strict(),bH=s.object({appName:ve,instanceName:V,nameProvidedByFlag:s.boolean().optional(),instanceType:Lv.optional(),enableSSH:s.boolean().optional(),minCapacity:$$.optional(),maxCapacity:T$.optional(),connectionConfig:ma.optional()}).strict().refine(sn.check,sn.params),yH=s.object({appName:ve,clusterName:V,serviceName:C$,capacityProvider:zv,containerPort:cn.optional(),cpu:Mv.optional(),memoryLimitMiB:sa(512).optional(),desiredCount:qu.optional(),ec2Config:jv.optional(),routing:s.union([Hu,s.array(Hu).min(1)]).optional(),docker:Ot.partial().optional(),nameProvidedByFlag:s.boolean().optional(),connectionConfig:ma.optional()}).strict(),Uv=s.object({appName:ve,computeName:V,nameProvidedByFlag:s.boolean().optional(),connectionConfig:ma.optional()}).strict(),TL=Uv.extend({type:s.literal("ecs"),cluster:N$.optional(),services:s.array(w$).min(1,d.SERVICE.MIN_REQUIRED),docker:Ot.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:d.SERVICE.ROUTING_REQUIRED}).refine(e=>{let t=e.services.map(n=>n.name);return new Set(t).size===t.length},{message:d.SERVICE.UNIQUE_WITHIN_CLUSTER}),RL=Uv.extend({type:s.literal("lambda"),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(wu,d.LAMBDA.TIMEOUT.MIN).max(ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Pi.optional(),handler:s.string().optional(),runtime:R$.optional(),environment:$i.optional(),secrets:$i.optional(),description:s.string().optional(),functionUrl:s.union([s.object({authType:s.enum(oa).optional()}).strict(),s.literal(!1)]).optional(),eventSources:s.array(P$).optional()}).strict(),PL=Uv.extend({type:s.literal("ec2"),instanceType:Lv.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional()}).strict(),O$=s.discriminatedUnion("type",[TL,RL,PL]),A$=s.object({path:s.string().min(1,d.REQUIRED.ROUTING_PATH),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional()}).strict(),D$=s.object({name:s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),serviceType:s.enum(["web","worker"]).optional(),docker:Ot.partial().optional(),containerPort:cn.optional(),needsDatabaseConnection:s.boolean().optional(),routing:s.union([A$,s.array(A$).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."}))}),SH=s.object({appName:ve,instanceType:s.string().optional()}).strict();var Fv=s.object({memorySize:Pi.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional()}).strict(),M$=s.object({type:s.enum(Iv).optional(),databaseName:s.string().optional(),databaseEngine:s.enum(xi).optional(),deletionProtection:s.boolean().optional(),backupRetention:Qt.optional(),port:Mu.optional(),publiclyAccessible:s.boolean().optional(),allowedIpCidr:s.string().optional(),instanceType:s.string().optional(),allocatedStorage:s.number().int(d.ALLOCATED_STORAGE.INTEGER).min(20,d.ALLOCATED_STORAGE.MIN).max(65536,d.ALLOCATED_STORAGE.MAX).optional(),multiAz:s.boolean().optional(),readReplica:Lu.optional(),writer:la.optional(),readers:da.optional(),allowVpcAccess:s.boolean().optional(),monitoringInterval:ua.optional(),preferredMaintenanceWindow:s.string().optional(),databaseInsights:Uu.optional(),proxy:zu.optional(),credentials:ju.optional(),encryption:Fu.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict(),j$=s.object({server:Fv.optional(),imageOptimisation:Fv.optional(),revalidation:Fv.optional()}).strict(),Bv=s.object({versioned:s.boolean().optional()}).strict(),z$=s.object({assets:Bv.optional(),cache:Bv.optional(),media:Bv.optional()}).strict(),CL=s.object({visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:s.number().int(d.MAX_MESSAGE_SIZE.INTEGER).min(1024,d.MAX_MESSAGE_SIZE.MIN).max(262144,d.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:s.union([s.literal(!1),s.object({enabled:s.boolean().optional(),maxReceiveCount:s.number().int(d.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,d.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,d.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),L$=s.object({revalidationQueue:CL.optional()}).strict(),U$=s.object({domainNames:s.array(s.string()).optional(),certificateArn:s.string().optional()}).strict(),F$=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),s.string()).optional(),NL=s.object({type:s.literal("payload"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:M$.optional(),compute:j$.optional(),storage:z$.optional(),messaging:L$.optional(),cdn:U$.optional(),environment:F$}).strict(),wL=s.object({type:s.literal("nextjs"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:M$.optional(),compute:j$.optional(),storage:z$.optional(),messaging:L$.optional(),cdn:U$.optional(),environment:F$}).strict(),Vv=s.enum(Zo),kL=s.object({command:s.string().min(1,d.REQUIRED.BUILD_COMMAND),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR)}).strict(),OL=s.object({headers:s.boolean().optional(),contentSecurityPolicy:s.string().optional()}).strict(),DL=s.object({to:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.EMAIL),from:s.string().regex(L.EMAIL,d.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(),ML=s.object({behaviours:s.array(s.unknown()).optional()}).strict(),Zv=s.object({type:s.literal("staticsite"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),source:s.string().min(1,d.REQUIRED.SOURCE),build:kL,routing:Vv.optional(),security:OL.optional(),domain:s.string().optional(),forms:DL.optional(),cdn:ML.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&&!tu(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.`})}),pa=s.discriminatedUnion("type",[NL,wL,Zv]),B$=s.enum(["lightweight","standard","resilient","custom"]),V$=s.object({type:s.enum(Iv),instanceType:s.string().optional(),backupRetention:Qt.optional(),deletionProtection:s.boolean().optional(),encryption:s.union([s.object({useCMK:s.literal(!0)}).strict(),s.literal(!1)]).optional()}).strict(),Z$=s.object({memorySize:Pi.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional()}).strict();var G$=s.object({appName:ve,type:Rv,pattern:Pv.optional(),patternConfig:pa.optional(),owner:s.string().optional(),tags:s.record(s.string(),s.string()).optional(),vpcId:s.string().optional(),network:Vu.optional(),backup:JI.optional(),tunnel:QI.optional(),additionalNetworks:s.array(h$).optional(),database:s.array(i$),s3:s.array(b$),compute:s.array(k$),dynamodb:s.array(l$).optional(),clickhouse:s.array(d$).optional(),sqs:s.array(y$).optional(),cdn:_$.optional(),customCodeBlocks:s.array(XI).optional(),additionalManagedImports:s.array(s.object({moduleSpecifier:s.string(),namedImports:s.array(s.string()),defaultImport:s.string().optional()}).strict()).optional()}).strict(),UH=s.object({name:ve,type:Rv,pattern:Pv.optional(),patternTier:B$.optional(),patternDomain:s.string().optional(),source:s.string().min(1,d.REQUIRED.SOURCE).optional(),buildCommand:s.string().min(1,d.REQUIRED.BUILD_COMMAND).optional(),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR).optional(),routing:Vv.optional(),formsTo:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.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:V$.optional(),customCompute:Z$.optional(),region:s.string().optional(),owner:s.string().optional(),includeDatabase:s.boolean().optional(),databaseName:s.string().min(1,d.DATABASE.NAME.REQUIRED).max(63,d.DATABASE.NAME.MAX_LENGTH).optional(),vpcId:s.string().optional(),network:v$.optional(),services:s.array(D$).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"}))}),FH=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 jL=["fjall-managed","external","external-manual"],WH=s.enum(jL);var W$=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(),H$=s.object({name:s.string().min(1),path:s.string().min(1).optional()}).strict(),zL=s.union([s.object({managedPolicyArn:s.string().min(1)}).strict(),s.object({customerManagedPolicy:H$}).strict()]),LL=s.object({managedPolicies:s.array(s.string().min(1)).optional(),inlinePolicy:s.record(s.string(),s.unknown()).optional(),customerManagedPolicies:s.array(H$).optional(),permissionsBoundary:zL.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(),UL=s.object({description:s.string().optional()}).strict(),Ku=s.string().regex(L.EMAIL,d.EMAIL),Gv={groups:s.record(s.string(),UL).optional(),permissionSets:s.record(s.string(),LL).optional(),memberships:s.record(s.string(),s.array(Ku)).optional(),resolutionVersion:s.number().int().min(1).optional(),defaultPermissionSets:s.boolean().optional()},FL=s.discriminatedUnion("source",[s.object({...Gv,source:s.literal("fjall-managed"),users:s.record(Ku,W$)}).strict(),s.object({...Gv,source:s.literal("external")}).strict(),s.object({...Gv,source:s.literal("external-manual"),users:s.record(Ku,W$).optional()}).strict()]),HH=s.object({name:V,type:s.literal("organisation").optional(),organisationName:s.string().min(1).optional(),orgEmail:Ku.optional(),accounts:s.unknown().optional(),accountIds:s.record(s.string(),s.string()).optional(),identityCentre:s.union([FL,s.literal(!1)]).optional(),allowedRegions:s.array(s.string().min(1)).optional()}).strict();var BL=Object.defineProperty,VL=(e,t)=>BL(e,"name",{value:t,configurable:!0}),ZL=[1,3,5,7,14,30,60,90,120,150,180,365,400,545,731,1827,3653],GL=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(ZL).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(),WL=GL.refine(e=>e.agentMinInstances<=e.agentMaxInstances,{message:"agentMinInstances must be <= agentMaxInstances"});function HL(e){let t=WL.safeParse(e);if(!t.success){let n=t.error.issues.map(i=>` - ${i.path.join(".")||"(root)"}: ${i.message}`).join(`
184
+ `);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 Jj,existsSync as Qj,mkdirSync as ez}from"fs";import{join as RI}from"path";var sn={trace:0,debug:1,info:2,warn:3,error:4},We={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 qj}from"path";import{homedir as Kj}from"os";var Wj=Object.defineProperty,Hj=(e,t)=>Wj(e,"name",{value:t,configurable:!0});function $r(){let e=process.env.FJALL_LOG_DIR;return e!==void 0&&e!==""?e:qj(Kj(),".fjall","logs")}Hj($r,"getDefaultLogDir");var Yj=Object.defineProperty,Xj=(e,t)=>Yj(e,"name",{value:t,configurable:!0}),ra=class{static{Xj(this,"DeploymentLoggerImpl")}mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=We.MAX_BUFFER_SIZE;constructor(t,n,i){this.mainLogger=t,this.appName=n,this.operationType=i,this.deploymentId=`${i}-${Date.now()}`;let r=$r(),o=RI(r,"deployments",n);Qj(o)||ez(o,{recursive:!0});let a=new Date().toISOString().replace(/[:.]/g,"-"),c=`${i}-${a}.jsonl`;this.logPath=RI(o,c);try{this.logStream=Jj(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),We.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)+`
185
+ `);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 tz=Object.defineProperty,rz=(e,t)=>tz(e,"name",{value:t,configurable:!0}),_u=class e{static{rz(this,"Logger")}static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let t=$r(),n=mv(t,"debug"),i=this.parseEnvInt("FJALL_LOG_MAX_SIZE",We.MAX_FILE_SIZE),r=this.parseEnvInt("FJALL_LOG_MAX_FILES",We.MAX_FILES);this.config={logDir:t,debugLogDir:n,maxFileSize:i,maxFiles:r,maxBufferSize:We.MAX_BUFFER_SIZE,flushIntervalMs:We.FLUSH_INTERVAL_MS},this.mainLogPath=mv(t,We.LOG_FILENAME),this.debugLogPath=mv(n,We.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 Su(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(he.shouldSuppressOutput||he.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(`${On(o)}
186
+ `)}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 bi(this,t)}forDeployment(t,n="deploy"){return new ra(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 nz=Object.defineProperty,iz=(e,t)=>nz(e,"name",{value:t,configurable:!0}),yu=_u.getInstance();function cz(e){let t=$r(),n=PI(t,"debug"),i=PI(n,We.DEBUG_LOG_FILENAME);try{CI(n)||oz(n,{recursive:!0}),CI(i)&&az(i).size>We.MAX_FILE_SIZE&&new yi({maxFiles:We.MAX_FILES}).rotate(i);let r={timestamp:new Date().toISOString(),level:"debug",component:"Emergency",message:e};sz(i,JSON.stringify(r)+`
187
+ `)}catch{}}iz(cz,"writeDebugSync");var uz=Object.defineProperty,Si=(e,t)=>uz(e,"name",{value:t,configurable:!0});function pv(e){return e.success===!0}Si(pv,"isSuccess");function fv(e){return e.success===!1}Si(fv,"isFailure");function P(e){return{success:!0,data:e}}Si(P,"success");function $(e){return{success:!1,error:e}}Si($,"failure");async function gv(e){try{let t=await e();return P(t)}catch(t){return $(vt(t))}}Si(gv,"tryAsync");function hv(e){try{let t=e();return P(t)}catch(t){return $(vt(t))}}Si(hv,"trySync");var lz=Object.defineProperty,dz=(e,t)=>lz(e,"name",{value:t,configurable:!0}),NI=/^[a-zA-Z][a-zA-Z0-9-]*$/,mz=Vo.source.replace(/^\^|\$$/g,""),L=Object.freeze({IDENTIFIER:NI,NEW_APP_NAME:/^[a-z][a-z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:NI,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(`^(?:/${mz})+$`),SECRET_NAME:Jc,SSM_COMPONENT:Vo,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 vv(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}}dz(vv,"parseRateExpression");var d=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:vh,SSM_COMPONENT:Qc,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 pz=Object.defineProperty,st=(e,t)=>pz(e,"name",{value:t,configurable:!0}),fz=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],gz=Object.freeze(fz.flatMap(e=>{let t=Nn(e);return t?[t]:[]})),bv=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function Eu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}st(Eu,"parseRegionList");function yv(e){return Kt.includes(e)}st(yv,"isValidRegion");function Sv(e){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(e)}st(Sv,"isValidRegionFormat");function _v(e){if(!e)return bv.slice(0,3);let t=e.toLowerCase().split("-"),n=t[0],i=t.length>1?t[1]:"",r=[];return n&&i&&(r=Kt.filter(o=>o.startsWith(`${n}-${i}`))),r.length===0&&n&&(r=Kt.filter(o=>o.startsWith(`${n}-`))),r.length>0?r.slice(0,3):bv.slice(0,3)}st(_v,"getSuggestions");function Ev(e){if(yv(e))return!0;let t=_v(e);return Sv(e)?`Unknown region. Try: ${t.join(", ")}`:`Invalid format. Try: ${t.join(", ")}`}st(Ev,"validateRegion");function wI(e){if(!e||e.trim()==="")return!0;let t=Eu(e);for(let n of t){let i=Ev(n);if(i!==!0)return i}return!0}st(wI,"validateRegionList");function xv(e,t){return e.filter(n=>n!==t)}st(xv,"filterDuplicateRegions");function Av(e){return{label:e.city,value:e.code,description:e.optIn?`${e.code} \u2014 opt-in required`:e.code}}st(Av,"toRegionOption");function kI(){return it.map(Av)}st(kI,"getRegionOptions");function OI(e){return it.filter(t=>t.code!==e).map(Av)}st(OI,"getRegionOptionsExcluding");function DI(e){let t=it.find(n=>n.code===e);return t?t.city:e}st(DI,"getRegionName");function MI(e){return t=>{let n=Eu(t);return xv(n,e)}}st(MI,"createRegionFormatter");var xu="4.1.0";var Au=["Aurora","Instance","GlobalAurora","ClickHouse"],_i=["FARGATE","FARGATE_SPOT","EC2"],_t=["standard","resilient","enterprise"],Iu=["tinkerer","lightweight","standard","resilient","enterprise"],Iv="custom",na=[...Iu,Iv];var hz=Object.defineProperty,vz=(e,t)=>hz(e,"name",{value:t,configurable:!0}),jI=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})}),ia=["ecs","lambda","ec2"],Ei=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),$u=["code","container"],oa=Object.freeze({CODE:"code",CONTAINER:"container"}),Tu=["ARM_64","X86_64"],zI="ARM_64",aa=["NONE","AWS_IAM"],Ru=["public","internal"],Cu=["CPU","MEMORY"],Pu=["ARM","STANDARD"],$v=["Instance","Aurora"],xi=["postgresql","mysql"],LI=["foundation","compliance","hardened"];var Nu=["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"],UI=[0,1,5,10,15,30,60];function ct(e,t){return e.includes(t)}vz(ct,"constIncludes");var FI=1,BI=65535,v5=Object.freeze({postgresql:5432,mysql:3306}),VI=128,ZI=10240,wu=1,ku=900,Tv=1,Rv=1e3,Ai=100,GI=100;var WI=3e3;var HI=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],qI=["standard","assets","upload","website"],Ii=["AES256","KMS"];var bz=Object.defineProperty,sa=(e,t)=>bz(e,"name",{value:t,configurable:!0}),He=sa(e=>s.union([s.literal(!1),e]),"optionalOrDisabled"),cn={check:sa(e=>e.minCapacity!==void 0&&e.maxCapacity!==void 0?e.minCapacity<=e.maxCapacity:!0,"check"),params:{message:d.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},ca=sa(e=>s.number().int(d.MEMORY_LIMIT.INTEGER).min(e,e===128?d.MEMORY_LIMIT.MIN_128:d.MEMORY_LIMIT.MIN_512).max(30720,d.MEMORY_LIMIT.MAX),"memoryLimitMiBSchema"),V=s.string().min(1,d.REQUIRED.RESOURCE_NAME).max(63,d.MAX_LENGTH.RESOURCE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),YI=s.string().min(1,d.REQUIRED.BUCKET_NAME).max(63,d.MAX_LENGTH.BUCKET_NAME).regex(L.BUCKET_NAME,d.BUCKET_NAME),XI=s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME);function Ou(e,t=L.IDENTIFIER,n=d.IDENTIFIER){return s.string().min(2,d.IDENTIFIER_MIN_LENGTH).max(50,e).regex(t,n).refine(i=>!i.endsWith("-"),{message:d.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(i=>!i.includes("--"),{message:d.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}sa(Ou,"identifierSchema");var ve=Ou(d.MAX_LENGTH.APP_NAME),A5=Ou(d.MAX_LENGTH.APP_NAME,L.NEW_APP_NAME,d.NEW_APP_NAME),un=s.number().int(d.PORT.INTEGER).min(FI,d.PORT.MIN).max(BI,d.PORT.MAX),Te=s.object({key:s.string(),sourceText:s.string()}).strict(),yz=s.object({__identifier:s.string()}).strict(),Sz=s.object({__expression:s.string()}).strict(),_z=s.object({__call:s.string()}).strict(),Ez=s.union([yz,Sz,_z]),xz=s.union([s.string(),s.number(),s.boolean(),Ez]),$i=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),xz),Az=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`."}),JI=s.record(s.string(),Az),I5=s.record(s.string(),s.unknown()),Cv=s.enum(na).describe(`Application type must be one of: ${na.join(", ")}`),Pv=s.enum(kt).describe(`OpenNext deployment pattern: ${kt.join(", ")}`),Iz=s.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),$z=s.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),QI=s.object({sourceText:s.string(),position:Iz,afterManagedResource:s.object({type:$z,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(),e$=s.union([s.object({tier:s.enum(_t)}).strict(),s.literal(!1)]),t$=s.union([s.object({instanceType:s.string().optional()}).strict(),s.literal(!1)]),Tz=Ou(d.MAX_LENGTH.ORGANISATION_NAME),Rz=s.string().regex(L.EMAIL,d.EMAIL),KI=s.string().refine(e=>Kt.includes(e),{message:d.REGION}),$5=s.object({name:Tz,email:Rz,accountName:s.string().optional(),primaryRegion:KI.optional().default(Pn),secondaryRegions:s.array(KI).optional(),security:s.enum(LI).optional(),force:s.boolean().optional()}).strict();function ua(e){return e.issues.map(t=>`${t.path.length>0?`${t.path.join(".")}: `:""}${t.message}`).join(`
188
+ `)}sa(ua,"getZodErrorMessage");var Ti=s.number().min(1,d.ALARM.PERCENTAGE.MIN).max(100,d.ALARM.PERCENTAGE.MAX),Cz=s.number().min(1,d.ALARM.FREE_STORAGE_GIB.MIN),r$=s.union([s.literal(!1),s.object({cpuThreshold:Ti.optional(),memoryThreshold:Ti.optional(),runningTasksMinimum:s.number().int().min(0).optional(),http5xxThreshold:Ti.optional()}).strict()]),n$=s.union([s.literal(!1),s.object({cpuThreshold:Ti.optional(),freeStorageThresholdGiB:Cz.optional(),connectionsThreshold:s.number().int().min(1).optional()}).strict()]),i$=s.union([s.literal(!1),s.object({errorRateThreshold:Ti.optional(),durationThresholdPercent:Ti.optional()}).strict()]);var Qt=s.number().int(d.BACKUP_RETENTION.INTEGER).min(1,d.BACKUP_RETENTION.MIN).max(35,d.BACKUP_RETENTION.MAX),la=s.number().int(d.MONITORING_INTERVAL.INTEGER).refine(e=>ct(UI,e),{message:d.MONITORING_INTERVAL.VALUES}),Mu=s.number().int(d.DATABASE.PORT.INTEGER).min(1024,d.DATABASE.PORT.MIN).max(65535,d.DATABASE.PORT.MAX),Pz=s.enum(Au).describe(`Database type must be one of: ${Au.join(", ")}`),Nz=s.object({maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional()}).strict().describe("RDS Proxy configuration"),wz=s.object({instanceType:s.string().optional(),availabilityZone:s.string().optional()}).strict().describe("Read replica configuration"),kz=s.object({automaticallyAfterDays:s.number().int(d.ROTATION.INTEGER).min(1,d.ROTATION.MIN).max(365,d.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),ju=s.object({username:s.string().min(1,d.REQUIRED.USERNAME).max(63,d.USERNAME.MAX_LENGTH).optional(),secretRotation:kz.optional()}).strict().describe("Database credentials configuration"),zu=He(Nz),Lu=He(wz),Oz=s.object({scaleWithWriter:s.boolean().optional(),enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),da=s.object({enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for Aurora writer instance"),Dz=s.object({count:s.number().int(d.READER.COUNT.INTEGER).min(0,d.READER.COUNT.MIN).max(15,d.READER.COUNT.MAX).optional(),instances:s.array(Oz).max(15,d.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:s.boolean().optional()}).strict().refine(e=>!(e.count!==void 0&&e.instances!==void 0),{message:d.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),ma=He(Dz),Mz=s.object({awsManaged:s.literal(!0)}).strict(),jz=s.object({useCMK:s.literal(!0)}).strict(),o$=s.union([Mz,jz]),zz=s.object({mode:s.enum(["standard","advanced"]).optional(),encryptionKey:o$.optional()}).strict().describe("Database Insights configuration"),Uu=He(zz),Fu=s.object({storageKey:o$.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),a$=s.object({name:V,type:Pz,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),instanceType:s.string().optional(),allocatedStorage:s.number().optional(),multiAz:s.boolean().optional(),publiclyAccessible:s.boolean().optional(),databaseInsights:Uu.optional(),port:Mu.optional(),deletionProtection:s.boolean().optional(),proxy:zu.optional(),credentials:ju.optional(),readReplica:Lu.optional(),encryption:Fu.optional(),writer:da.optional(),readers:ma.optional(),backupRetention:Qt.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:la.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(xi).optional(),engineExpression:s.string().optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional(),alarms:n$.optional()}).strict(),Bu=s.object({appName:ve,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional(),databaseInsights:Uu.optional(),port:Mu.optional(),proxy:zu.optional(),credentials:ju.optional(),encryption:Fu.optional(),deletionProtection:s.boolean().optional()}).strict(),s$={databaseType:s.literal("Instance"),instanceType:s.string().optional(),multiAz:s.boolean().optional(),readReplica:Lu.optional(),publiclyAccessible:s.boolean().optional(),backupRetention:Qt.optional(),allocatedStorage:s.number().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},c$={databaseType:s.literal("Aurora"),writer:da.optional(),readers:ma.optional(),backupRetention:Qt.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:la.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},u$={databaseType:s.literal("GlobalAurora"),primaryRegion:s.string().min(1,d.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),writer:da.optional(),readers:ma.optional(),backupRetention:Qt.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:la.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},l$=s.object({appName:ve,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict(),d$={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:Qt.optional()},Lz=Bu.extend(s$).strict(),Uz=Bu.extend(c$).strict(),Fz=Bu.extend(u$).strict(),Bz=l$.extend(d$).strict(),M5=s.discriminatedUnion("databaseType",[Lz,Uz,Fz,Bz]),Nv=Bu.extend({resourceName:V}).strict(),Vz=Nv.extend(s$).strict(),Zz=Nv.extend(c$).strict(),Gz=Nv.extend(u$).strict(),Wz=l$.extend({resourceName:V}).strict(),Hz=Wz.extend(d$).strict(),j5=s.discriminatedUnion("databaseType",[Vz,Zz,Gz,Hz]),z5=s.object({appName:ve,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional(),nameProvidedByFlag:s.boolean().optional()}).strict(),qz=["S","N","B"],Du=s.object({name:s.string(),type:s.enum(qz)}).strict(),m$=s.object({name:V,partitionKey:Du,sortKey:Du.optional(),globalSecondaryIndexes:s.array(s.object({indexName:s.string(),partitionKey:Du,sortKey:Du.optional()}).strict()).optional(),ttlAttribute:s.string().optional(),stream:s.boolean().optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict(),Kz=s.object({mode:s.literal("s3")}).strict(),p$=s.object({name:V,type:s.literal("ClickHouse"),databaseName:XI,instanceType:s.string().optional(),coldTier:s.union([Kz,s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:Qt.optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict();var Yz=s.object({count:s.number().int(d.NAT_GATEWAY.INTEGER).min(0,d.NAT_GATEWAY.MIN).max(3,d.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),f$=He(Yz),wv=s.enum(["cloudwatch","s3"]),Xz=s.object({destination:wv.optional(),retentionDays:s.number().int(d.RETENTION_DAYS.INTEGER).min(1,d.RETENTION_DAYS.MIN).max(365,d.RETENTION_DAYS.MAX).optional(),trafficType:s.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),g$=He(Xz),Jz=s.object({s3:s.boolean().optional(),dynamodb:s.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),Qz=He(Jz),eL=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)"),tL=He(eL),rL=s.object({gateway:Qz.optional(),interface:tL.optional()}).strict().describe("VPC endpoints configuration"),h$=He(rL),Vu=s.object({maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:f$.optional(),flowLogs:g$.optional(),vpcEndpoints:h$.optional(),cidrMask:s.number().int(d.CIDR_MASK.INTEGER).min(16,d.CIDR_MASK.MIN).max(28,d.CIDR_MASK.MAX).optional()}).strict(),v$=s.string().min(1,d.REQUIRED.NETWORK_NAME).max(50,d.MAX_LENGTH.NETWORK_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),b$=Vu.extend({name:v$}).strict(),y$=He(Vu),V5=s.object({appName:ve,networkName:v$.optional(),maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:f$.optional(),flowLogs:g$.optional(),vpcEndpoints:h$.optional()}).strict(),nL=L.CIDR,kv=s.string().regex(nL,d.CIDR),iL=s.object({kind:s.literal("database"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),name:V,allowedFromCidrs:s.array(kv),access:s.enum(["read","write","readWrite"]).optional()}).strict(),oL=s.object({kind:s.literal("ecsService"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),serviceName:s.string().min(1,d.REQUIRED.SERVICE_NAME),name:V,allowedFromCidrs:s.array(kv),port:un.optional()}).strict(),aL=s.discriminatedUnion("kind",[iL,oL]),Z5=s.object({name:V,peerAppName:s.string().min(1,d.REQUIRED.APP_NAME),peerAccountId:s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID),peerRegion:s.string().min(1,d.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:s.string().regex(L.VPC_ID,d.VPC_ID).optional(),peerVpcCidr:kv.optional(),peerRoleArn:s.string().regex(L.ROLE_ARN,d.ROLE_ARN).optional(),peerRouteTableIds:s.array(s.string().min(1,d.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:s.boolean().optional()}).strict(),G5=s.object({name:V,requesterAccountIds:s.array(s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID)).min(1,d.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),publishToSsm:s.boolean().optional(),exposedResources:s.array(aL).optional()}).strict();var Zu=["storage","cdn","compute"],sL=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(),S$=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(_t).optional(),versioned:s.boolean().optional(),encryption:s.enum(Ii).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(sL).optional(),stackPlacement:s.enum(Zu).optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:d.KMS.KEY_REQUIRED}),X5=s.object({appName:ve,bucketName:YI,nameProvidedByFlag:s.boolean().optional(),storagePreset:s.enum(qI).optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum(_t).optional(),versioned:s.boolean().optional(),encryption:s.enum(Ii).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:d.KMS.KEY_REQUIRED,path:["kmsKeyArn"]});var Ov=s.enum(["DESTROY","RETAIN"]),_$=s.object({name:V,queueType:s.enum(["standard","fifo"]).default("standard"),visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),retentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),contentBasedDeduplication:s.boolean().optional(),removalPolicy:Ov.optional(),variableName:s.string().optional(),extraProperties:s.array(Te).optional()}).strict();var E$=s.object({type:s.literal("basic-auth"),username:s.string().min(1),password:s.string().min(1)}).strict(),x$=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),E$]).optional(),extraProperties:s.array(Te).optional()}).strict(),oH=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),E$]).optional(),nameProvidedByFlag:s.boolean().optional()}).strict();var cL=Object.defineProperty,Dv=(e,t)=>cL(e,"name",{value:t,configurable:!0}),uL=new Set(["t4g","c6g","c6gd","c6gn","c7g","c7gd","c7gn","r6g","r6gd","r7g","r7gd","m6g","m6gd","m7g","m7gd","a1","x2gd","im4gn","is4gen","i4g","hpc7g"]);function Ri(e){let t=e.split(".")[0]??"";return uL.has(t)?"ARM":"STANDARD"}Dv(Ri,"getArchitectureForInstanceType");function Gu(e,t){let n=Ri(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}}Dv(Gu,"validateArchitectureMatch");function A$(e,t){return Ri(e)===t}Dv(A$,"isArchitectureCompatible");var lL=Object.defineProperty,Wu=(e,t)=>lL(e,"name",{value:t,configurable:!0});var dL=1,mL=/^[A-Za-z0-9_.-]+$/,pL=s.object({id:s.string().min(1,"buildSecret id cannot be empty").regex(mL,"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)"})}),fL=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)"})})]),Ot=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(),fL).optional(),buildSecrets:s.array(pL).optional()}).strict(),lH=Ot.partial();function gL(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}}}Wu(gL,"mergeDockerBuild");function Mv(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}Wu(Mv,"isRecord");function I$(e){if(!Mv(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=Mv(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=Ot.safeParse(o);return a.success?a.data:void 0}Wu(I$,"normaliseDockerBuild");function hL(e){if(e===void 0)return;let t=I$(e);return t===void 0?void 0:JSON.stringify(t)}Wu(hL,"dockerBuildFingerprint");var vL=s.object({name:s.string(),clusterName:s.string().optional(),docker:Ot.optional(),containerPort:s.number().optional(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional()}).strict(),bL=s.object({type:s.enum(kt),name:s.string(),source:s.string()}).strict(),yL=s.object({repositoryName:s.string()}).strict(),SL=["x86_64","arm64"],_L=s.object({name:s.string(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),docker:Ot.optional(),imageKey:s.string().optional(),architecture:s.enum(SL).optional()}).strict(),EL=s.object({templateHash:s.string(),synthTimestamp:s.string()}).strict(),xL=s.object({constructPath:s.string().max(512),group:s.string().max(128),resourceType:s.string().max(256)}).strict(),dH=s.object({version:s.literal(dL),generatedAt:s.string(),appName:s.string(),services:s.array(vL),lambdas:s.array(_L),pattern:bL.optional(),ecr:yL.optional(),stacks:s.record(s.string(),EL),resourceMap:s.record(s.string(),xL).optional()}).strict();var AL=Object.defineProperty,IL=(e,t)=>AL(e,"name",{value:t,configurable:!0});function T$(e){return!(e.image!==void 0&&e.docker!==void 0)}IL(T$,"imageDockerMutexCheck");var R$=s.number().int(d.CAPACITY.MIN.INTEGER).min(Tv,d.GENERATOR_CAPACITY.MIN.MIN).max(Rv,d.GENERATOR_CAPACITY.MIN.MAX),C$=s.number().int(d.CAPACITY.MAX.INTEGER).min(Tv,d.GENERATOR_CAPACITY.MAX.MIN).max(Rv,d.GENERATOR_CAPACITY.MAX.MAX),Ci=s.number().int(d.LAMBDA.MEMORY.INTEGER).min(VI,d.LAMBDA.MEMORY.MIN).max(ZI,d.LAMBDA.MEMORY.MAX).refine(e=>e===128||e%64===0,d.LAMBDA.MEMORY.MULTIPLE),P$=s.string().regex(L.LAMBDA_RUNTIME_IDENTIFIER,d.LAMBDA.RUNTIME),jv=s.number().int(d.CPU.INTEGER).min(256,d.CPU.MIN).max(4096,d.CPU.MAX),qu=s.number().int(d.CAPACITY.DESIRED.INTEGER).min(0,d.CAPACITY.DESIRED.MIN).max(Ai,d.CAPACITY.DESIRED.MAX),pa=s.object({connectToDatabase:s.array(s.string()).optional()}).strict(),$L=s.object({minSize:s.number().int(d.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,d.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(GI,d.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:s.boolean().optional()}).strict(),zv=s.object({instanceType:s.string().optional(),amiHardwareType:s.enum(Pu).optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(Ai,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(Ai,d.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:ca(128).optional(),warmPool:$L.optional(),extraProperties:s.array(Te).optional()}).strict().superRefine((e,t)=>{if(!e.instanceType||!e.amiHardwareType)return;let n=Gu(e.instanceType,e.amiHardwareType);n.valid||t.addIssue({code:"custom",message:n.message??d.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((e,t)=>{e.minCapacity===0&&!e.warmPool&&t.addIssue({code:"custom",message:d.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:d.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),TL=s.enum(ia).describe(`Compute type must be one of: ${ia.join(", ")}`),Lv=s.enum(_i).describe(`ECS capacity provider must be one of: ${_i.join(", ")}`),Uv=s.string().refine(e=>ct(Nu,e),{message:d.INSTANCE_TYPE}),N$=s.object({sourceType:s.enum(["sqs","dynamodb","eventbridge"]),sourceRef:s.string().describe("Name of the source resource"),batchSize:s.number().int(d.BATCH_SIZE.INTEGER).min(1,d.BATCH_SIZE.MIN).max(1e4,d.BATCH_SIZE.MAX).optional(),startingPosition:s.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:s.number().int(d.BATCHING_WINDOW.INTEGER).min(0,d.BATCHING_WINDOW.MIN).max(300,d.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:s.boolean().optional()}).strict(),RL=s.object({name:s.string().min(1,d.REQUIRED.CONTAINER_NAME).optional(),image:s.string().optional(),port:un.optional(),environment:$i.optional(),secretsImport:JI.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(d.HEALTH_CHECK.INTERVAL.INTEGER).min(5,d.HEALTH_CHECK.INTERVAL.MIN).max(300,d.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:s.number().int(d.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,d.HEALTH_CHECK.TIMEOUT.MIN).max(60,d.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:s.number().int(d.HEALTH_CHECK.RETRIES.INTEGER).min(1,d.HEALTH_CHECK.RETRIES.MIN).max(10,d.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:s.number().int(d.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,d.HEALTH_CHECK.START_PERIOD.MIN).max(300,d.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:s.array(s.string().regex(L.SECRET_NAME,d.SECRET_NAME)).optional(),extraProperties:s.array(Te).optional()}).strict(),w$=s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.ECS_SERVICE_NAME,d.ECS_SERVICE_NAME),k$=s.object({domain:s.string().optional(),loadBalancer:s.union([s.literal(!1),s.enum(Ru)]).optional(),directAccess:s.boolean().optional(),extraProperties:s.array(Te).optional()}).strict().refine(e=>!(e.directAccess&&e.domain),{message:d.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(e=>!(e.directAccess&&typeof e.loadBalancer=="string"),{message:d.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),Hu=s.object({path:s.string().optional(),host:s.string().optional(),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional(),healthCheckPath:s.string().optional()}).strict().describe("Path/host-based routing configuration"),CL=s.object({desiredCount:qu.optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(Ai,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(Ai,d.CAPACITY.MAX.MAX).optional(),scalingType:s.enum(Cu).optional()}).strict().refine(cn.check,cn.params).describe("ECS service scaling configuration"),O$=s.object({name:w$,docker:Ot.optional(),needsDatabaseConnection:s.boolean().optional(),needsStorageConnection:s.boolean().optional(),needsMessagingConnection:s.boolean().optional(),image:s.string().optional(),containers:s.array(RL).optional(),routing:s.union([Hu,s.array(Hu).min(1)]).optional(),cpu:jv.optional(),memoryLimitMiB:ca(512).optional(),desiredCount:qu.optional(),scaling:He(CL).optional(),capacityProvider:Lv,ec2Config:zv.optional(),ssmSecretsPath:s.string().regex(L.SSM_PATH,d.SSM_PATH).optional(),extraProperties:s.array(Te).optional(),alarms:r$.optional()}).strict().superRefine((e,t)=>{T$(e)||t.addIssue({code:"custom",path:["docker"],message:d.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),D$=s.object({name:V,type:TL,needsConnection:s.boolean(),connectedDatabase:s.array(s.string()).optional(),connectedStorage:s.array(s.string()).optional(),connectedMessaging:s.array(s.string()).optional(),cluster:k$.optional(),services:s.array(O$).optional(),docker:Ot.partial().optional(),deployment:s.enum($u).optional(),codePath:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(wu,d.LAMBDA.TIMEOUT.MIN).max(ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Ci.optional(),handler:s.string().optional(),runtime:P$.optional(),environment:$i.optional(),secrets:$i.optional(),eventSources:s.array(N$).optional(),functionUrl:s.object({authType:s.enum(aa)}).strict().optional(),description:s.string().optional(),scheduleExpression:s.string().optional(),architecture:s.enum(Tu).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional(),functionName:s.string().optional(),ssmSecrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),alarms:i$.optional(),instanceType:Uv.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(Te).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&&Ri(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"]})}),SH=s.object({appName:ve,clusterName:V,containerPort:un,nameProvidedByFlag:s.boolean().optional(),ecrRepository:s.string().optional(),capacityProvider:Lv.optional(),useAppEcr:s.boolean().optional(),desiredCount:qu.optional(),cpu:jv.optional(),memoryLimitMiB:ca(512).optional(),minCapacity:R$.optional(),maxCapacity:C$.optional(),ec2Config:zv.optional(),connectionConfig:pa.optional()}).strict().refine(cn.check,cn.params),_H=s.object({appName:ve,functionName:V,nameProvidedByFlag:s.boolean().optional(),lambdaType:s.enum(["basic","web","custom"]).optional(),ecrRepository:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(wu,d.LAMBDA.TIMEOUT.MIN).max(ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Ci.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(HI)).optional(),corsCredentials:s.boolean().optional(),connectionConfig:pa.optional()}).strict(),EH=s.object({appName:ve,instanceName:V,nameProvidedByFlag:s.boolean().optional(),instanceType:Uv.optional(),enableSSH:s.boolean().optional(),minCapacity:R$.optional(),maxCapacity:C$.optional(),connectionConfig:pa.optional()}).strict().refine(cn.check,cn.params),xH=s.object({appName:ve,clusterName:V,serviceName:w$,capacityProvider:Lv,containerPort:un.optional(),cpu:jv.optional(),memoryLimitMiB:ca(512).optional(),desiredCount:qu.optional(),ec2Config:zv.optional(),routing:s.union([Hu,s.array(Hu).min(1)]).optional(),docker:Ot.partial().optional(),nameProvidedByFlag:s.boolean().optional(),connectionConfig:pa.optional()}).strict(),Fv=s.object({appName:ve,computeName:V,nameProvidedByFlag:s.boolean().optional(),connectionConfig:pa.optional()}).strict(),PL=Fv.extend({type:s.literal("ecs"),cluster:k$.optional(),services:s.array(O$).min(1,d.SERVICE.MIN_REQUIRED),docker:Ot.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:d.SERVICE.ROUTING_REQUIRED}).refine(e=>{let t=e.services.map(n=>n.name);return new Set(t).size===t.length},{message:d.SERVICE.UNIQUE_WITHIN_CLUSTER}),NL=Fv.extend({type:s.literal("lambda"),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(wu,d.LAMBDA.TIMEOUT.MIN).max(ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Ci.optional(),handler:s.string().optional(),runtime:P$.optional(),environment:$i.optional(),secrets:$i.optional(),description:s.string().optional(),functionUrl:s.union([s.object({authType:s.enum(aa).optional()}).strict(),s.literal(!1)]).optional(),eventSources:s.array(N$).optional()}).strict(),wL=Fv.extend({type:s.literal("ec2"),instanceType:Uv.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional()}).strict(),M$=s.discriminatedUnion("type",[PL,NL,wL]),$$=s.object({path:s.string().min(1,d.REQUIRED.ROUTING_PATH),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional()}).strict(),j$=s.object({name:s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),serviceType:s.enum(["web","worker"]).optional(),docker:Ot.partial().optional(),containerPort:un.optional(),needsDatabaseConnection:s.boolean().optional(),routing:s.union([$$,s.array($$).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."}))}),AH=s.object({appName:ve,instanceType:s.string().optional()}).strict();var Bv=s.object({memorySize:Ci.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional()}).strict(),z$=s.object({type:s.enum($v).optional(),databaseName:s.string().optional(),databaseEngine:s.enum(xi).optional(),deletionProtection:s.boolean().optional(),backupRetention:Qt.optional(),port:Mu.optional(),publiclyAccessible:s.boolean().optional(),allowedIpCidr:s.string().optional(),instanceType:s.string().optional(),allocatedStorage:s.number().int(d.ALLOCATED_STORAGE.INTEGER).min(20,d.ALLOCATED_STORAGE.MIN).max(65536,d.ALLOCATED_STORAGE.MAX).optional(),multiAz:s.boolean().optional(),readReplica:Lu.optional(),writer:da.optional(),readers:ma.optional(),allowVpcAccess:s.boolean().optional(),monitoringInterval:la.optional(),preferredMaintenanceWindow:s.string().optional(),databaseInsights:Uu.optional(),proxy:zu.optional(),credentials:ju.optional(),encryption:Fu.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict(),L$=s.object({server:Bv.optional(),imageOptimisation:Bv.optional(),revalidation:Bv.optional()}).strict(),Vv=s.object({versioned:s.boolean().optional()}).strict(),U$=s.object({assets:Vv.optional(),cache:Vv.optional(),media:Vv.optional()}).strict(),kL=s.object({visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:s.number().int(d.MAX_MESSAGE_SIZE.INTEGER).min(1024,d.MAX_MESSAGE_SIZE.MIN).max(262144,d.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:s.union([s.literal(!1),s.object({enabled:s.boolean().optional(),maxReceiveCount:s.number().int(d.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,d.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,d.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),F$=s.object({revalidationQueue:kL.optional()}).strict(),B$=s.object({domainNames:s.array(s.string()).optional(),certificateArn:s.string().optional()}).strict(),V$=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),s.string()).optional(),OL=s.object({type:s.literal("payload"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:z$.optional(),compute:L$.optional(),storage:U$.optional(),messaging:F$.optional(),cdn:B$.optional(),environment:V$}).strict(),DL=s.object({type:s.literal("nextjs"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:z$.optional(),compute:L$.optional(),storage:U$.optional(),messaging:F$.optional(),cdn:B$.optional(),environment:V$}).strict(),Zv=s.enum(Go),ML=s.object({command:s.string().min(1,d.REQUIRED.BUILD_COMMAND),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR)}).strict(),jL=s.object({headers:s.boolean().optional(),contentSecurityPolicy:s.string().optional()}).strict(),zL=s.object({to:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.EMAIL),from:s.string().regex(L.EMAIL,d.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(),LL=s.object({behaviours:s.array(s.unknown()).optional()}).strict(),Gv=s.object({type:s.literal("staticsite"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),source:s.string().min(1,d.REQUIRED.SOURCE),build:ML,routing:Zv.optional(),security:jL.optional(),domain:s.string().optional(),forms:zL.optional(),cdn:LL.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&&!tu(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.`})}),fa=s.discriminatedUnion("type",[OL,DL,Gv]),Z$=s.enum(["lightweight","standard","resilient","custom"]),G$=s.object({type:s.enum($v),instanceType:s.string().optional(),backupRetention:Qt.optional(),deletionProtection:s.boolean().optional(),encryption:s.union([s.object({useCMK:s.literal(!0)}).strict(),s.literal(!1)]).optional()}).strict(),W$=s.object({memorySize:Ci.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional()}).strict();var H$=s.object({appName:ve,type:Cv,pattern:Pv.optional(),patternConfig:fa.optional(),owner:s.string().optional(),tags:s.record(s.string(),s.string()).optional(),vpcId:s.string().optional(),network:Vu.optional(),backup:e$.optional(),tunnel:t$.optional(),additionalNetworks:s.array(b$).optional(),database:s.array(a$),s3:s.array(S$),compute:s.array(D$),dynamodb:s.array(m$).optional(),clickhouse:s.array(p$).optional(),sqs:s.array(_$).optional(),cdn:x$.optional(),customCodeBlocks:s.array(QI).optional(),additionalManagedImports:s.array(s.object({moduleSpecifier:s.string(),namedImports:s.array(s.string()),defaultImport:s.string().optional()}).strict()).optional()}).strict(),ZH=s.object({name:ve,type:Cv,pattern:Pv.optional(),patternTier:Z$.optional(),patternDomain:s.string().optional(),source:s.string().min(1,d.REQUIRED.SOURCE).optional(),buildCommand:s.string().min(1,d.REQUIRED.BUILD_COMMAND).optional(),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR).optional(),routing:Zv.optional(),formsTo:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.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:G$.optional(),customCompute:W$.optional(),region:s.string().optional(),owner:s.string().optional(),includeDatabase:s.boolean().optional(),databaseName:s.string().min(1,d.DATABASE.NAME.REQUIRED).max(63,d.DATABASE.NAME.MAX_LENGTH).optional(),vpcId:s.string().optional(),network:y$.optional(),services:s.array(j$).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"}))}),GH=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 UL=["fjall-managed","external","external-manual"],YH=s.enum(UL);var q$=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(),K$=s.object({name:s.string().min(1),path:s.string().min(1).optional()}).strict(),FL=s.union([s.object({managedPolicyArn:s.string().min(1)}).strict(),s.object({customerManagedPolicy:K$}).strict()]),BL=s.object({managedPolicies:s.array(s.string().min(1)).optional(),inlinePolicy:s.record(s.string(),s.unknown()).optional(),customerManagedPolicies:s.array(K$).optional(),permissionsBoundary:FL.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(),VL=s.object({description:s.string().optional()}).strict(),Ku=s.string().regex(L.EMAIL,d.EMAIL),Wv={groups:s.record(s.string(),VL).optional(),permissionSets:s.record(s.string(),BL).optional(),memberships:s.record(s.string(),s.array(Ku)).optional(),resolutionVersion:s.number().int().min(1).optional(),defaultPermissionSets:s.boolean().optional()},ZL=s.discriminatedUnion("source",[s.object({...Wv,source:s.literal("fjall-managed"),users:s.record(Ku,q$)}).strict(),s.object({...Wv,source:s.literal("external")}).strict(),s.object({...Wv,source:s.literal("external-manual"),users:s.record(Ku,q$).optional()}).strict()]),XH=s.object({name:V,type:s.literal("organisation").optional(),organisationName:s.string().min(1).optional(),orgEmail:Ku.optional(),accounts:s.unknown().optional(),accountIds:s.record(s.string(),s.string()).optional(),identityCentre:s.union([ZL,s.literal(!1)]).optional(),allowedRegions:s.array(s.string().min(1)).optional()}).strict();var GL=Object.defineProperty,WL=(e,t)=>GL(e,"name",{value:t,configurable:!0}),HL=[1,3,5,7,14,30,60,90,120,150,180,365,400,545,731,1827,3653],qL=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(HL).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(),KL=qL.refine(e=>e.agentMinInstances<=e.agentMaxInstances,{message:"agentMinInstances must be <= agentMaxInstances"});function YL(e){let t=KL.safeParse(e);if(!t.success){let n=t.error.issues.map(i=>` - ${i.path.join(".")||"(root)"}: ${i.message}`).join(`
189
189
  `);throw new Error(`Buildkite: invalid props:
190
- ${n}`)}return t.data}VL(HL,"validateBuildkiteProps");var qL=Object.defineProperty,KL=(e,t)=>qL(e,"name",{value:t,configurable:!0});function YL(e){return`FjallDeployBoundary${e}`}KL(YL,"deployBoundaryName");var Wv={Sid:"FjallInheritAdministratorAccess",Effect:"Allow",Action:"*",Resource:"*"},q$=[{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:"*"}],K$=[...q$,{Sid:"FjallDenyStandingHumanCredentials",Effect:"Deny",Action:["iam:CreateUser","iam:CreateLoginProfile","iam:CreateAccessKey","iam:CreateAccountAlias"],Resource:"*"},{Sid:"FjallDenyDisableConfigRecorder",Effect:"Deny",Action:["config:StopConfigurationRecorder"],Resource:"*"}],XL=[...K$,{Sid:"FjallDenyAccountPasswordPolicyTamper",Effect:"Deny",Action:["iam:UpdateAccountPasswordPolicy","iam:DeleteAccountPasswordPolicy"],Resource:"*"},{Sid:"FjallDenyDisableDefaultEbsEncryption",Effect:"Deny",Action:["ec2:DisableEbsEncryptionByDefault"],Resource:"*"}],uq={foundation:[Wv,...q$],compliance:[Wv,...K$],hardened:[Wv,...XL]};var JL=Object.defineProperty,je=(e,t)=>JL(e,"name",{value:t,configurable:!0});var Hv="sts.amazonaws.com";function QL(e){return`FjallDevDeploy${e}`}je(QL,"devDeployRoleName");function eU(e){return`FjallDevProvisioner${e}`}je(eU,"devProvisionerRoleName");function tU(e){return`FjallDevSyncWriter${e}`}je(tU,"devSyncWriterRoleName");var rU="FjallDevBoundary";function Y$(e){return`arn:aws:iam::${e}:policy/${rU}`}je(Y$,"devBoundaryPolicyArn");function X$(e){return`org:${e}:dev-provisioner`}je(X$,"devProvisionerSubject");function J$(e){return`org:${e}:dev-sync`}je(J$,"devSyncSubject");function nU(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i}=e,r={[`${i}:aud`]:Hv};return[{Sid:"FjallMachineSubject",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...r,[`${i}:sub`]:`org:${t}:*`}}},{Sid:"FjallUserSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:r,StringLike:{[`${i}:sub`]:`org:${t}:user:*`}}},{Sid:"FjallServiceSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...r,[`${i}:sub`]:[`org:${t}:discovery`,`org:${t}:connection`,`org:${t}:org-setup`,`org:${t}:dev-substrate-setup`]}}}]}je(nU,"buildNarrowedDeployTrustStatements");function iU(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`]:Hv},StringLike:{[`${i}:sub`]:`org:${t}:dev:${r}:*`}}}]}je(iU,"buildDevDeployTrustStatements");function qv(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`]:Hv,[`${n}:sub`]:r}}}]}je(qv,"buildServiceSubjectTrustStatements");function oU(e){return qv({...e,sid:"FjallDevProvisionerSubject",subject:X$(e.fjallOrgId)})}je(oU,"buildDevProvisionerTrustStatements");function aU(e){return qv({...e,sid:"FjallDevSyncSubject",subject:J$(e.fjallOrgId)})}je(aU,"buildDevSyncWriterTrustStatements");function sU({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/*`}]}je(sU,"buildDevDeployPolicyStatements");function cU({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":Y$(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"}}}]}je(cU,"buildDevProvisionerPolicyStatements");function uU({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}}}]}je(uU,"buildDevSyncWriterPolicyStatements");function lU({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}-*`}]}je(lU,"buildDevBoundaryStatements");var dU=Object.defineProperty,Et=(e,t)=>dU(e,"name",{value:t,configurable:!0});function T(e){return JSON.stringify(e)}Et(T,"escapeStringLiteral");function un(e){return e.map(T).join(", ")}Et(un,"formatStringArray");var mU="import:SharedAlarmTopicArn";function ln(e=" "){return`
191
- ${e}...(getConfig().environment === "production" ? { alertsTopic: ${T(mU)} } : {}),`}Et(ln,"emitProductionAlertsTopicSpread");function Kv(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"}Et(Kv,"isSpecialValue");function er(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("")}Et(er,"toVariableName");function ie(e){return e.variableName??er(e.name)}Et(ie,"getVariableName");function fa(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 er(t)}Et(fa,"resolveResourceVariable");function Q$(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)}Et(Q$,"isSimpleObject");function G(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(Kv(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=>G(n,t)).join(", ")}]`;if(typeof e=="object"){let n=Object.entries(e).filter(([,o])=>o!==void 0);if(Q$(e)){let o=n.map(([a,c])=>`${a}: ${G(c,t)}`).join(", ");return o?`{ ${o} }`:"{}"}let i=t+" ",r=n.map(([o,a])=>`${i}${o}: ${G(a,i)}`).join(`,
190
+ ${n}`)}return t.data}WL(YL,"validateBuildkiteProps");var XL=Object.defineProperty,JL=(e,t)=>XL(e,"name",{value:t,configurable:!0});function QL(e){return`FjallDeployBoundary${e}`}JL(QL,"deployBoundaryName");var Hv={Sid:"FjallInheritAdministratorAccess",Effect:"Allow",Action:"*",Resource:"*"},Y$=[{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:"*"}],X$=[...Y$,{Sid:"FjallDenyStandingHumanCredentials",Effect:"Deny",Action:["iam:CreateUser","iam:CreateLoginProfile","iam:CreateAccessKey","iam:CreateAccountAlias"],Resource:"*"},{Sid:"FjallDenyDisableConfigRecorder",Effect:"Deny",Action:["config:StopConfigurationRecorder"],Resource:"*"}],eU=[...X$,{Sid:"FjallDenyAccountPasswordPolicyTamper",Effect:"Deny",Action:["iam:UpdateAccountPasswordPolicy","iam:DeleteAccountPasswordPolicy"],Resource:"*"},{Sid:"FjallDenyDisableDefaultEbsEncryption",Effect:"Deny",Action:["ec2:DisableEbsEncryptionByDefault"],Resource:"*"}],pq={foundation:[Hv,...Y$],compliance:[Hv,...X$],hardened:[Hv,...eU]};var tU=Object.defineProperty,je=(e,t)=>tU(e,"name",{value:t,configurable:!0});var qv="sts.amazonaws.com";function rU(e){return`FjallDevDeploy${e}`}je(rU,"devDeployRoleName");function nU(e){return`FjallDevProvisioner${e}`}je(nU,"devProvisionerRoleName");function iU(e){return`FjallDevSyncWriter${e}`}je(iU,"devSyncWriterRoleName");var oU="FjallDevBoundary";function J$(e){return`arn:aws:iam::${e}:policy/${oU}`}je(J$,"devBoundaryPolicyArn");function Q$(e){return`org:${e}:dev-provisioner`}je(Q$,"devProvisionerSubject");function eT(e){return`org:${e}:dev-sync`}je(eT,"devSyncSubject");function aU(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i}=e,r={[`${i}:aud`]:qv};return[{Sid:"FjallMachineSubject",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...r,[`${i}:sub`]:`org:${t}:*`}}},{Sid:"FjallUserSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:r,StringLike:{[`${i}:sub`]:`org:${t}:user:*`}}},{Sid:"FjallServiceSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...r,[`${i}:sub`]:[`org:${t}:discovery`,`org:${t}:connection`,`org:${t}:org-setup`,`org:${t}:dev-substrate-setup`]}}}]}je(aU,"buildNarrowedDeployTrustStatements");function sU(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`]:qv},StringLike:{[`${i}:sub`]:`org:${t}:dev:${r}:*`}}}]}je(sU,"buildDevDeployTrustStatements");function Kv(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`]:qv,[`${n}:sub`]:r}}}]}je(Kv,"buildServiceSubjectTrustStatements");function cU(e){return Kv({...e,sid:"FjallDevProvisionerSubject",subject:Q$(e.fjallOrgId)})}je(cU,"buildDevProvisionerTrustStatements");function uU(e){return Kv({...e,sid:"FjallDevSyncSubject",subject:eT(e.fjallOrgId)})}je(uU,"buildDevSyncWriterTrustStatements");function lU({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/*`}]}je(lU,"buildDevDeployPolicyStatements");function dU({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":J$(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"}}}]}je(dU,"buildDevProvisionerPolicyStatements");function mU({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}}}]}je(mU,"buildDevSyncWriterPolicyStatements");function pU({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}-*`}]}je(pU,"buildDevBoundaryStatements");var fU=Object.defineProperty,Et=(e,t)=>fU(e,"name",{value:t,configurable:!0});function T(e){return JSON.stringify(e)}Et(T,"escapeStringLiteral");function ln(e){return e.map(T).join(", ")}Et(ln,"formatStringArray");var gU="import:SharedAlarmTopicArn";function dn(e=" "){return`
191
+ ${e}...(getConfig().environment === "production" ? { alertsTopic: ${T(gU)} } : {}),`}Et(dn,"emitProductionAlertsTopicSpread");function Yv(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"}Et(Yv,"isSpecialValue");function er(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("")}Et(er,"toVariableName");function ie(e){return e.variableName??er(e.name)}Et(ie,"getVariableName");function ga(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 er(t)}Et(ga,"resolveResourceVariable");function tT(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)}Et(tT,"isSimpleObject");function G(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(Yv(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=>G(n,t)).join(", ")}]`;if(typeof e=="object"){let n=Object.entries(e).filter(([,o])=>o!==void 0);if(tT(e)){let o=n.map(([a,c])=>`${a}: ${G(c,t)}`).join(", ");return o?`{ ${o} }`:"{}"}let i=t+" ",r=n.map(([o,a])=>`${i}${o}: ${G(a,i)}`).join(`,
192
192
  `);return r?`{
193
193
  ${r}
194
194
  ${t}}`:"{}"}return JSON.stringify(e)}Et(G,"formatValue");function O(e,t,n,i="raw"){if(!e)return"";let r;switch(i){case"string":r=T(String(n));break;case"object":r=G(n);break;case"boolean-or-object":r=n===!1?"false":G(n);break;default:r=String(n)}return`
195
195
  ${t}: ${r},`}Et(O,"buildProperty");function fe(e,t=" "){return e?.length?e.map(n=>`
196
- ${t}${n.key}: ${n.sourceText},`).join(""):""}Et(fe,"emitExtraProperties");var pU=Object.defineProperty,ze=(e,t)=>pU(e,"name",{value:t,configurable:!0}),le=Object.freeze({HOST:"DATABASE_HOST",PORT:"DATABASE_PORT",NAME:"DATABASE_NAME",SSL:"DATABASE_SSL",USERNAME:"DATABASE_USERNAME",PASSWORD:"DATABASE_PASSWORD"}),ga=Object.freeze({USERNAME:"username",PASSWORD:"password"});function dn(e,t){let n=t.connectedDatabase;return n?.length?e.database.filter(i=>n.includes(i.name)):[]}ze(dn,"getConnectedDatabases");function ha(e,t){return`${e}.getCredentials().getImport(${T(t)})`}ze(ha,"getCredentialExpression");function va(e){let t=[],n=ze((i,r,o)=>{t.push({key:i,expression:r,isSecret:o})},"addEntry");if(e.length===1){let i=ie(e[0]);n(le.HOST,`${i}.getHostEndpoint()`,!1),n(le.PORT,`${i}.getHostPort()`,!1),n(le.NAME,`${i}.getDatabaseName()`,!1),n(le.SSL,'"true"',!1),n(le.USERNAME,ha(i,ga.USERNAME),!0),n(le.PASSWORD,ha(i,ga.PASSWORD),!0)}else for(let[i,r]of e.entries()){let o=ie(r),a=i===0?"":`_${i+1}`;n(`${le.HOST}${a}`,`${o}.getHostEndpoint()`,!1),n(`${le.PORT}${a}`,`${o}.getHostPort()`,!1),n(`${le.NAME}${a}`,`${o}.getDatabaseName()`,!1),n(`${le.SSL}${a}`,'"true"',!1),n(`${le.USERNAME}${a}`,ha(o,ga.USERNAME),!0),n(`${le.PASSWORD}${a}`,ha(o,ga.PASSWORD),!0)}return t}ze(va,"generateDatabaseEnvVarEntries");function eT(e){return`connections: [${e.map(t=>ie(t)).join(", ")}],`}ze(eT,"formatConnectionsCode");function Yu(e){return e.expression==='"true"'?"true":{__expression:e.expression}}ze(Yu,"toDatabaseEnvVarValue");function Xu(e,t){let n={},i={};if(!t.needsConnection||!t.connectedDatabase?.length)return{env:n,secrets:i};let r=dn(e,t),o=va(r);for(let a of o){let c=Yu(a);a.isSecret?i[a.key]={__expression:a.expression}:n[a.key]=c}return{env:n,secrets:i}}ze(Xu,"buildDatabaseEnvVars");function tT(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}ze(tT,"generateDatabaseSharedProps");function rT(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}ze(rT,"generateDatabaseInstanceProps");function nT(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}ze(nT,"generateDatabaseAuroraProps");function iT(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+=`
197
- secondaryRegions: [${un(e.secondaryRegions)}],`),t+=O(e.globalClusterIdentifier!==void 0,"globalClusterIdentifier",e.globalClusterIdentifier,"string"),t+=O(e.enableGlobalWriteForwarding!==void 0,"enableGlobalWriteForwarding",e.enableGlobalWriteForwarding),t}ze(iT,"generateDatabaseGlobalAuroraProps");function Yv(e,t){return t.compute.some(n=>n.needsConnection&&n.connectedDatabase?.includes(e.name))}ze(Yv,"databaseNeedsVariable");function Ju(e){if(e.database.length===0)return"";let t="";for(let n=0;n<e.database.length;n++){let i=e.database[n],r=ie(i),o=Yv(i,e),a=n>0,c=o?`const ${r} = `:"";t+=`${a?`
196
+ ${t}${n.key}: ${n.sourceText},`).join(""):""}Et(fe,"emitExtraProperties");var hU=Object.defineProperty,ze=(e,t)=>hU(e,"name",{value:t,configurable:!0}),le=Object.freeze({HOST:"DATABASE_HOST",PORT:"DATABASE_PORT",NAME:"DATABASE_NAME",SSL:"DATABASE_SSL",USERNAME:"DATABASE_USERNAME",PASSWORD:"DATABASE_PASSWORD"}),ha=Object.freeze({USERNAME:"username",PASSWORD:"password"});function mn(e,t){let n=t.connectedDatabase;return n?.length?e.database.filter(i=>n.includes(i.name)):[]}ze(mn,"getConnectedDatabases");function va(e,t){return`${e}.getCredentials().getImport(${T(t)})`}ze(va,"getCredentialExpression");function ba(e){let t=[],n=ze((i,r,o)=>{t.push({key:i,expression:r,isSecret:o})},"addEntry");if(e.length===1){let i=ie(e[0]);n(le.HOST,`${i}.getHostEndpoint()`,!1),n(le.PORT,`${i}.getHostPort()`,!1),n(le.NAME,`${i}.getDatabaseName()`,!1),n(le.SSL,'"true"',!1),n(le.USERNAME,va(i,ha.USERNAME),!0),n(le.PASSWORD,va(i,ha.PASSWORD),!0)}else for(let[i,r]of e.entries()){let o=ie(r),a=i===0?"":`_${i+1}`;n(`${le.HOST}${a}`,`${o}.getHostEndpoint()`,!1),n(`${le.PORT}${a}`,`${o}.getHostPort()`,!1),n(`${le.NAME}${a}`,`${o}.getDatabaseName()`,!1),n(`${le.SSL}${a}`,'"true"',!1),n(`${le.USERNAME}${a}`,va(o,ha.USERNAME),!0),n(`${le.PASSWORD}${a}`,va(o,ha.PASSWORD),!0)}return t}ze(ba,"generateDatabaseEnvVarEntries");function rT(e){return`connections: [${e.map(t=>ie(t)).join(", ")}],`}ze(rT,"formatConnectionsCode");function Yu(e){return e.expression==='"true"'?"true":{__expression:e.expression}}ze(Yu,"toDatabaseEnvVarValue");function Xu(e,t){let n={},i={};if(!t.needsConnection||!t.connectedDatabase?.length)return{env:n,secrets:i};let r=mn(e,t),o=ba(r);for(let a of o){let c=Yu(a);a.isSecret?i[a.key]={__expression:a.expression}:n[a.key]=c}return{env:n,secrets:i}}ze(Xu,"buildDatabaseEnvVars");function nT(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}ze(nT,"generateDatabaseSharedProps");function iT(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}ze(iT,"generateDatabaseInstanceProps");function oT(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}ze(oT,"generateDatabaseAuroraProps");function aT(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+=`
197
+ secondaryRegions: [${ln(e.secondaryRegions)}],`),t+=O(e.globalClusterIdentifier!==void 0,"globalClusterIdentifier",e.globalClusterIdentifier,"string"),t+=O(e.enableGlobalWriteForwarding!==void 0,"enableGlobalWriteForwarding",e.enableGlobalWriteForwarding),t}ze(aT,"generateDatabaseGlobalAuroraProps");function Xv(e,t){return t.compute.some(n=>n.needsConnection&&n.connectedDatabase?.includes(e.name))}ze(Xv,"databaseNeedsVariable");function Ju(e){if(e.database.length===0)return"";let t="";for(let n=0;n<e.database.length;n++){let i=e.database[n],r=ie(i),o=Xv(i,e),a=n>0,c=o?`const ${r} = `:"";t+=`${a?`
198
198
  `:""}${c}app.addDatabase(
199
199
  DatabaseFactory.build(${T(i.name)}, {
200
200
  vpc: app.getVpc(),
201
201
  type: ${T(i.type)},
202
202
  databaseName: ${T(i.databaseName)},`,i.engineExpression?t+=`
203
203
  engine: ${i.engineExpression},`:i.databaseEngine&&(t+=`
204
- databaseEngine: ${T(i.databaseEngine)},`),t+=tT(i),t+=rT(i),t+=nT(i),t+=iT(i),t+=fe(i.extraProperties),i.alarms===!1?t+=`
204
+ databaseEngine: ${T(i.databaseEngine)},`),t+=nT(i),t+=iT(i),t+=oT(i),t+=aT(i),t+=fe(i.extraProperties),i.alarms===!1?t+=`
205
205
  alarms: false,`:typeof i.alarms=="object"&&(t+=`
206
- alarms: ${G(i.alarms," ")},`),i.type!=="GlobalAurora"&&(t+=ln()),t+=`
206
+ alarms: ${G(i.alarms," ")},`),i.type!=="GlobalAurora"&&(t+=dn()),t+=`
207
207
  })
208
208
  );
209
- `}return t}ze(Ju,"generateDatabaseCode");function Qu(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=ie(i),o=oT(i,e),a=n>0?`
209
+ `}return t}ze(Ju,"generateDatabaseCode");function Qu(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=ie(i),o=sT(i,e),a=n>0?`
210
210
  `:"",c=o?`const ${r} = `:"";t+=`${a}${c}app.addDatabase(
211
211
  DatabaseFactory.build(${T(i.name)}, {
212
212
  type: "ClickHouse",
@@ -218,87 +218,87 @@ ${t}${n.key}: ${n.sourceText},`).join(""):""}Et(fe,"emitExtraProperties");var pU
218
218
  backupRetentionDays: ${i.backupRetentionDays},`),t+=fe(i.extraProperties),t+=`
219
219
  })
220
220
  );
221
- `}return t}ze(Qu,"generateClickHouseCode");function oT(e,t){return t.compute.some(n=>n.connectedDatabase?.includes(e.name))}ze(oT,"clickhouseNeedsVariable");var fU=Object.defineProperty,el=(e,t)=>fU(e,"name",{value:t,configurable:!0}),ba=Object.freeze({NAME:"BUCKET_NAME"});function mn(e,t){let{connectedStorage:n}=t;return n?.length?e.s3.filter(i=>n.includes(i.name)):[]}el(mn,"getConnectedStorage");function ya(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ie(n);t.push({key:ba.NAME,expression:`${i}.getBucketName()`})}else for(let[n,i]of e.entries()){let r=ie(i),o=n===0?"":`_${n+1}`;t.push({key:`${ba.NAME}${o}`,expression:`${r}.getBucketName()`})}return t}el(ya,"generateStorageEnvVarEntries");function tl(e,t){let n={},i={};if(!t.connectedStorage?.length)return{env:n,secrets:i};let r=mn(e,t),o=ya(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}el(tl,"buildStorageEnvVars");function Ci(e,t,n=[]){let i=e.map(a=>ie(a)),r=t.map(a=>ie(a)),o=n.map(a=>ie(a));return`connections: [${[...i,...r,...o].join(", ")}],`}el(Ci,"formatAllConnectionsCode");var gU=Object.defineProperty,Xv=(e,t)=>gU(e,"name",{value:t,configurable:!0}),Tr=Object.freeze({URL:"QUEUE_URL",ARN:"QUEUE_ARN"});function pn(e,t){let{connectedMessaging:n}=t;return n?.length?(e.sqs??[]).filter(i=>n.includes(i.name)):[]}Xv(pn,"getConnectedMessaging");function Sa(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ie(n);t.push({key:Tr.URL,expression:`${i}.getQueueUrl()`}),t.push({key:Tr.ARN,expression:`${i}.getQueueArn()`})}else for(let[n,i]of e.entries()){let r=ie(i),o=n===0?"":`_${n+1}`;t.push({key:`${Tr.URL}${o}`,expression:`${r}.getQueueUrl()`}),t.push({key:`${Tr.ARN}${o}`,expression:`${r}.getQueueArn()`})}return t}Xv(Sa,"generateMessagingEnvVarEntries");function rl(e,t){let n={},i={};if(!t.connectedMessaging?.length)return{env:n,secrets:i};let r=pn(e,t),o=Sa(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}Xv(rl,"buildMessagingEnvVars");var hU=Object.defineProperty,Ni=(e,t)=>hU(e,"name",{value:t,configurable:!0});function fn(e){return!!(e.needsConnection&&e.connectedDatabase?.length)}Ni(fn,"computeHasDatabaseConnections");function gn(e){return!!e.connectedStorage?.length}Ni(gn,"computeHasStorageConnections");function hn(e){return!!e.connectedMessaging?.length}Ni(hn,"computeHasMessagingConnections");function _a(e){return fn(e)||gn(e)||hn(e)}Ni(_a,"computeHasConnections");var Ea={ENVIRONMENT:{__expression:"getConfig().environment"}};function wi(e,t){return Object.entries(e).map(([n,i])=>`${t}${n}: ${G(i)},`).join(`
221
+ `}return t}ze(Qu,"generateClickHouseCode");function sT(e,t){return t.compute.some(n=>n.connectedDatabase?.includes(e.name))}ze(sT,"clickhouseNeedsVariable");var vU=Object.defineProperty,el=(e,t)=>vU(e,"name",{value:t,configurable:!0}),ya=Object.freeze({NAME:"BUCKET_NAME"});function pn(e,t){let{connectedStorage:n}=t;return n?.length?e.s3.filter(i=>n.includes(i.name)):[]}el(pn,"getConnectedStorage");function Sa(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ie(n);t.push({key:ya.NAME,expression:`${i}.getBucketName()`})}else for(let[n,i]of e.entries()){let r=ie(i),o=n===0?"":`_${n+1}`;t.push({key:`${ya.NAME}${o}`,expression:`${r}.getBucketName()`})}return t}el(Sa,"generateStorageEnvVarEntries");function tl(e,t){let n={},i={};if(!t.connectedStorage?.length)return{env:n,secrets:i};let r=pn(e,t),o=Sa(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}el(tl,"buildStorageEnvVars");function Pi(e,t,n=[]){let i=e.map(a=>ie(a)),r=t.map(a=>ie(a)),o=n.map(a=>ie(a));return`connections: [${[...i,...r,...o].join(", ")}],`}el(Pi,"formatAllConnectionsCode");var bU=Object.defineProperty,Jv=(e,t)=>bU(e,"name",{value:t,configurable:!0}),Tr=Object.freeze({URL:"QUEUE_URL",ARN:"QUEUE_ARN"});function fn(e,t){let{connectedMessaging:n}=t;return n?.length?(e.sqs??[]).filter(i=>n.includes(i.name)):[]}Jv(fn,"getConnectedMessaging");function _a(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ie(n);t.push({key:Tr.URL,expression:`${i}.getQueueUrl()`}),t.push({key:Tr.ARN,expression:`${i}.getQueueArn()`})}else for(let[n,i]of e.entries()){let r=ie(i),o=n===0?"":`_${n+1}`;t.push({key:`${Tr.URL}${o}`,expression:`${r}.getQueueUrl()`}),t.push({key:`${Tr.ARN}${o}`,expression:`${r}.getQueueArn()`})}return t}Jv(_a,"generateMessagingEnvVarEntries");function rl(e,t){let n={},i={};if(!t.connectedMessaging?.length)return{env:n,secrets:i};let r=fn(e,t),o=_a(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}Jv(rl,"buildMessagingEnvVars");var yU=Object.defineProperty,Ni=(e,t)=>yU(e,"name",{value:t,configurable:!0});function gn(e){return!!(e.needsConnection&&e.connectedDatabase?.length)}Ni(gn,"computeHasDatabaseConnections");function hn(e){return!!e.connectedStorage?.length}Ni(hn,"computeHasStorageConnections");function vn(e){return!!e.connectedMessaging?.length}Ni(vn,"computeHasMessagingConnections");function Ea(e){return gn(e)||hn(e)||vn(e)}Ni(Ea,"computeHasConnections");var xa={ENVIRONMENT:{__expression:"getConfig().environment"}};function wi(e,t){return Object.entries(e).map(([n,i])=>`${t}${n}: ${G(i)},`).join(`
222
222
  `)}Ni(wi,"formatEnvBlock");function ki(e,t,n){return e.length<=1?`{ ${e[0]??""} }`:`{${e.map(i=>`
223
223
  ${n}${i},`).join("")}
224
- ${t}}`}Ni(ki,"formatCompactOrExpandedObject");var vU=Object.defineProperty,aT=(e,t)=>vU(e,"name",{value:t,configurable:!0});function xa(e){let t="";if(e.deployment===ia.CODE&&e.codePath?(t+=`
225
- deployment: "${ia.CODE}",
224
+ ${t}}`}Ni(ki,"formatCompactOrExpandedObject");var SU=Object.defineProperty,cT=(e,t)=>SU(e,"name",{value:t,configurable:!0});function Aa(e){let t="";if(e.deployment===oa.CODE&&e.codePath?(t+=`
225
+ deployment: "${oa.CODE}",
226
226
  code: Code.fromAsset(${T(e.codePath)}),`,e.handler&&(t+=`
227
227
  handler: ${T(e.handler)},`),e.runtime&&(t+=`
228
228
  runtime: Runtime.${e.runtime},`)):t+=`
229
- deployment: "${ia.CONTAINER}",
229
+ deployment: "${oa.CONTAINER}",
230
230
  ecrRepository: app.getDefaultContainerRegistry(),`,e.timeout!==void 0&&(t+=`
231
231
  timeout: ${e.timeout},`),e.memory!==void 0&&(t+=`
232
232
  memorySize: ${e.memory},`),e.functionUrl&&(t+=`
233
233
  functionUrl: { authType: FunctionUrlAuthType.${e.functionUrl.authType} },`),e.description&&(t+=`
234
- lambdaDescription: ${T(e.description)},`),e.architecture||e.deployment===ia.CONTAINER){let n=e.architecture??MI;t+=`
234
+ lambdaDescription: ${T(e.description)},`),e.architecture||e.deployment===oa.CONTAINER){let n=e.architecture??zI;t+=`
235
235
  architecture: Architecture.${n},`}if(e.ephemeralStorageSize!==void 0&&(t+=`
236
236
  ephemeralStorageSize: ${e.ephemeralStorageSize},`),e.functionName&&(t+=`
237
237
  functionName: ${T(e.functionName)},`),e.ssmSecretsPath&&(t+=`
238
238
  ssmSecretsPath: ${T(e.ssmSecretsPath)},`),e.ssmSecrets&&e.ssmSecrets.length>0&&(t+=`
239
- secrets: [${un(e.ssmSecrets)}],`),!_a(e)){let n={...Ea,...e.environment};t+=`
239
+ secrets: [${ln(e.ssmSecrets)}],`),!Ea(e)){let n={...xa,...e.environment};t+=`
240
240
  environment: {
241
241
  ${wi(n," ")}
242
- },`}return t+=fe(e.extraProperties),t}aT(xa,"generateLambdaCode");function Aa(e,t){let n=fn(e),i=gn(e),r=hn(e);if(!n&&!i&&!r)return"";let o=n?dn(t,e):[],a=i?mn(t,e):[],c=r?pn(t,e):[];if(o.length===0&&a.length===0&&c.length===0)return"";let u={...Ea},l={};if(o.length>0){let p=va(o);for(let g of p){let v=Yu(g);g.isSecret?l[g.key]={__expression:g.expression}:u[g.key]=v}}if(a.length>0){let p=ya(a);for(let g of p)u[g.key]={__expression:g.expression}}if(c.length>0){let p=Sa(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 m="";if(Object.keys(l).length>0){m+=`
242
+ },`}return t+=fe(e.extraProperties),t}cT(Aa,"generateLambdaCode");function Ia(e,t){let n=gn(e),i=hn(e),r=vn(e);if(!n&&!i&&!r)return"";let o=n?mn(t,e):[],a=i?pn(t,e):[],c=r?fn(t,e):[];if(o.length===0&&a.length===0&&c.length===0)return"";let u={...xa},l={};if(o.length>0){let p=ba(o);for(let g of p){let v=Yu(g);g.isSecret?l[g.key]={__expression:g.expression}:u[g.key]=v}}if(a.length>0){let p=Sa(a);for(let g of p)u[g.key]={__expression:g.expression}}if(c.length>0){let p=_a(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 m="";if(Object.keys(l).length>0){m+=`
243
243
  containerSecretsImport: {`;for(let[p,g]of Object.entries(l))m+=`
244
244
  ${p}: ${G(g)},`;m+=`
245
245
  },`}if(Object.keys(u).length>0){m+=`
246
246
  environment: {`;for(let[p,g]of Object.entries(u))m+=`
247
247
  ${p}: ${G(g)},`;m+=`
248
248
  },`}return m+=`
249
- ${Ci(o,a,c)}`,m}aT(Aa,"generateLambdaConnectionsCode");var bU=Object.defineProperty,yU=(e,t)=>bU(e,"name",{value:t,configurable:!0});function Ia(e){let t="";return e.instanceType&&(t+=`
249
+ ${Pi(o,a,c)}`,m}cT(Ia,"generateLambdaConnectionsCode");var _U=Object.defineProperty,EU=(e,t)=>_U(e,"name",{value:t,configurable:!0});function $a(e){let t="";return e.instanceType&&(t+=`
250
250
  instanceType: ${T(e.instanceType)},`),e.enableSSH!==void 0&&(t+=e.enableSSH?`
251
251
  ssh: {},`:`
252
- ssh: false,`),t+=fe(e.extraProperties),t}yU(Ia,"generateEc2Code");var SU=Object.defineProperty,Dt=(e,t)=>SU(e,"name",{value:t,configurable:!0});function sT(e){let t=[];if(e.instanceType!==void 0&&t.push(`instanceType: ${T(e.instanceType)}`),e.amiHardwareType!==void 0&&t.push(`amiHardwareType: ${T(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: ${G(e.warmPool," ")}`),e.extraProperties?.length)for(let n of e.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
253
- ec2Config: ${ki(t," "," ")},`}Dt(sT,"generateEcsServiceEc2ConfigCode");function cT(e){if(!e.cluster)return"";let t=[];if(e.cluster.directAccess&&t.push("directAccess: true"),e.cluster.domain&&t.push(`domain: ${T(e.cluster.domain)}`),e.cluster.loadBalancer!==void 0&&t.push(e.cluster.loadBalancer===!1?"loadBalancer: false":`loadBalancer: ${T(e.cluster.loadBalancer)}`),e.cluster.extraProperties?.length)for(let n of e.cluster.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
254
- cluster: ${ki(t," "," ")},`}Dt(cT,"generateEcsClusterCode");function uT(e,t,n,i,r,o){let a="";e.name&&(a+=`
252
+ ssh: false,`),t+=fe(e.extraProperties),t}EU($a,"generateEc2Code");var xU=Object.defineProperty,Dt=(e,t)=>xU(e,"name",{value:t,configurable:!0});function uT(e){let t=[];if(e.instanceType!==void 0&&t.push(`instanceType: ${T(e.instanceType)}`),e.amiHardwareType!==void 0&&t.push(`amiHardwareType: ${T(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: ${G(e.warmPool," ")}`),e.extraProperties?.length)for(let n of e.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
253
+ ec2Config: ${ki(t," "," ")},`}Dt(uT,"generateEcsServiceEc2ConfigCode");function lT(e){if(!e.cluster)return"";let t=[];if(e.cluster.directAccess&&t.push("directAccess: true"),e.cluster.domain&&t.push(`domain: ${T(e.cluster.domain)}`),e.cluster.loadBalancer!==void 0&&t.push(e.cluster.loadBalancer===!1?"loadBalancer: false":`loadBalancer: ${T(e.cluster.loadBalancer)}`),e.cluster.extraProperties?.length)for(let n of e.cluster.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
254
+ cluster: ${ki(t," "," ")},`}Dt(lT,"generateEcsClusterCode");function dT(e,t,n,i,r,o){let a="";e.name&&(a+=`
255
255
  name: ${T(e.name)},`),e.image&&(a+=`
256
256
  image: ${T(e.image)},`),e.port!==void 0&&(a+=`
257
257
  port: ${e.port},`),e.essential!==void 0&&(a+=`
258
258
  essential: ${e.essential},`),e.command?.length&&(a+=`
259
259
  command: ${JSON.stringify(e.command)},`),e.entryPoint?.length&&(a+=`
260
- entryPoint: ${JSON.stringify(e.entryPoint)},`);let c=[le.HOST,le.PORT,le.NAME,le.SSL,le.USERNAME,le.PASSWORD,ba.NAME,Tr.URL,Tr.ARN],u=Dt(p=>{if(!p)return p;let g={};for(let[v,A]of Object.entries(p))c.some(Y=>v===Y||v.startsWith(`${Y}_`))||(g[v]=A);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)},m=t?{...n.secrets,...e.secretsImport}:u(e.secretsImport);return l&&Object.keys(l).length>0&&(a+=`
260
+ entryPoint: ${JSON.stringify(e.entryPoint)},`);let c=[le.HOST,le.PORT,le.NAME,le.SSL,le.USERNAME,le.PASSWORD,ya.NAME,Tr.URL,Tr.ARN],u=Dt(p=>{if(!p)return p;let g={};for(let[v,A]of Object.entries(p))c.some(Y=>v===Y||v.startsWith(`${Y}_`))||(g[v]=A);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)},m=t?{...n.secrets,...e.secretsImport}:u(e.secretsImport);return l&&Object.keys(l).length>0&&(a+=`
261
261
  environment: {
262
262
  ${wi(l," ")}
263
263
  },`),m&&Object.keys(m).length>0&&(a+=`
264
264
  secretsImport: {
265
265
  ${wi(m," ")}
266
266
  },`),e.ssmSecrets&&e.ssmSecrets.length>0&&(a+=`
267
- secrets: [${un(e.ssmSecrets)}],`),e.healthCheck&&(a+=`
268
- healthCheck: ${G(e.healthCheck," ")},`),a+=fe(e.extraProperties," "),a}Dt(uT,"generateEcsContainerCode");function Jv(e,t){let n=[];return e.path&&n.push(`path: ${T(e.path)}`),e.host&&n.push(`host: ${T(e.host)}`),e.priority!==void 0&&n.push(`priority: ${e.priority}`),e.healthCheckPath&&n.push(`healthCheckPath: ${T(e.healthCheckPath)}`),ki(n,t,`${t} `)}Dt(Jv,"formatRoutingRule");function lT(e){let t=Array.isArray(e)?e:[e];return t.length===1?`
269
- routing: ${Jv(t[0]," ")},`:`
267
+ secrets: [${ln(e.ssmSecrets)}],`),e.healthCheck&&(a+=`
268
+ healthCheck: ${G(e.healthCheck," ")},`),a+=fe(e.extraProperties," "),a}Dt(dT,"generateEcsContainerCode");function Qv(e,t){let n=[];return e.path&&n.push(`path: ${T(e.path)}`),e.host&&n.push(`host: ${T(e.host)}`),e.priority!==void 0&&n.push(`priority: ${e.priority}`),e.healthCheckPath&&n.push(`healthCheckPath: ${T(e.healthCheckPath)}`),ki(n,t,`${t} `)}Dt(Qv,"formatRoutingRule");function mT(e){let t=Array.isArray(e)?e:[e];return t.length===1?`
269
+ routing: ${Qv(t[0]," ")},`:`
270
270
  routing: [
271
- ${t.map(n=>Jv(n," ")).join(`,
271
+ ${t.map(n=>Qv(n," ")).join(`,
272
272
  `)},
273
- ],`}Dt(lT,"generateEcsServiceRoutingCode");function dT(e){if(e===!1)return`
273
+ ],`}Dt(mT,"generateEcsServiceRoutingCode");function pT(e){if(e===!1)return`
274
274
  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: ${T(e.scalingType)}`),`
275
- scaling: ${ki(t," "," ")},`}Dt(dT,"generateEcsServiceScalingCode");function mT(e,t,n){return{needsDb:e.needsDatabaseConnection!==void 0?e.needsDatabaseConnection:t&&fn(n),needsStorage:e.needsStorageConnection!==void 0?e.needsStorageConnection:t&&gn(n),needsMessaging:e.needsMessagingConnection!==void 0?e.needsMessagingConnection:t&&hn(n)}}Dt(mT,"deriveServiceConnectionNeeds");function pT(e){let{service:t,isFirstService:n,hasConnections:i,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:c,plan:u,compute:l}=e,m=`
275
+ scaling: ${ki(t," "," ")},`}Dt(pT,"generateEcsServiceScalingCode");function fT(e,t,n){return{needsDb:e.needsDatabaseConnection!==void 0?e.needsDatabaseConnection:t&&gn(n),needsStorage:e.needsStorageConnection!==void 0?e.needsStorageConnection:t&&hn(n),needsMessaging:e.needsMessagingConnection!==void 0?e.needsMessagingConnection:t&&vn(n)}}Dt(fT,"deriveServiceConnectionNeeds");function gT(e){let{service:t,isFirstService:n,hasConnections:i,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:c,plan:u,compute:l}=e,m=`
276
276
  name: ${T(t.name)},`;m+=`
277
- capacityProvider: ${T(t.capacityProvider)},`,t.ec2Config&&(m+=sT(t.ec2Config)),t.docker&&(m+=`
277
+ capacityProvider: ${T(t.capacityProvider)},`,t.ec2Config&&(m+=uT(t.ec2Config)),t.docker&&(m+=`
278
278
  docker: ${G(t.docker," ")},`),t.image&&(m+=`
279
279
  image: ${T(t.image)},`),t.ssmSecretsPath&&(m+=`
280
- ssmSecretsPath: ${T(t.ssmSecretsPath)},`);let p=mT(t,n,l);if(t.containers?.length){m+=`
280
+ ssmSecretsPath: ${T(t.ssmSecretsPath)},`);let p=fT(t,n,l);if(t.containers?.length){m+=`
281
281
  containers: [{`;for(let g=0;g<t.containers.length;g++){let v=t.containers[g];if(!v)continue;let A=g===0&&(p.needsDb||p.needsStorage||p.needsMessaging)&&i,Y=p.needsDb?r:{env:{},secrets:{}},z=p.needsStorage?o:{env:{},secrets:{}},Se=p.needsMessaging?a:{env:{},secrets:{}};g>0&&(m+=`
282
- }, {`),m+=uT(v,A,Y,z,Se,c)}m+=`
283
- }],`}if(t.routing&&(m+=lT(t.routing)),t.cpu!==void 0&&(m+=`
282
+ }, {`),m+=dT(v,A,Y,z,Se,c)}m+=`
283
+ }],`}if(t.routing&&(m+=mT(t.routing)),t.cpu!==void 0&&(m+=`
284
284
  cpu: ${t.cpu},`),t.memoryLimitMiB!==void 0&&(m+=`
285
285
  memoryLimitMiB: ${t.memoryLimitMiB},`),t.desiredCount!==void 0&&(m+=`
286
- desiredCount: ${t.desiredCount},`),t.scaling!==void 0&&(m+=dT(t.scaling)),t.alarms===!1?m+=`
286
+ desiredCount: ${t.desiredCount},`),t.scaling!==void 0&&(m+=pT(t.scaling)),t.alarms===!1?m+=`
287
287
  alarms: false,`:typeof t.alarms=="object"&&(m+=`
288
- alarms: ${G(t.alarms," ")},`),m+=fe(t.extraProperties," "),p.needsDb||p.needsStorage||p.needsMessaging){let g=p.needsDb?dn(u,l):[],v=p.needsStorage?mn(u,l):[],A=p.needsMessaging?pn(u,l):[];(g.length>0||v.length>0||A.length>0)&&(m+=`
289
- ${Ci(g,v,A)}`)}return m}Dt(pT,"generateEcsServiceCode");function $a(e,t){let n=_a(e),i={...Ea},r={env:{},secrets:{}};if(fn(e)){let u=Xu(t,e);Object.assign(r.env,u.env),Object.assign(r.secrets,u.secrets)}let o={env:{},secrets:{}};if(gn(e)){let u=tl(t,e);Object.assign(o.env,u.env)}let a={env:{},secrets:{}};if(hn(e)){let u=rl(t,e);Object.assign(a.env,u.env)}let c=`
290
- ecrRepository: app.getDefaultContainerRegistry(),`;if(c+=cT(e),e.services?.length){c+=`
288
+ alarms: ${G(t.alarms," ")},`),m+=fe(t.extraProperties," "),p.needsDb||p.needsStorage||p.needsMessaging){let g=p.needsDb?mn(u,l):[],v=p.needsStorage?pn(u,l):[],A=p.needsMessaging?fn(u,l):[];(g.length>0||v.length>0||A.length>0)&&(m+=`
289
+ ${Pi(g,v,A)}`)}return m}Dt(gT,"generateEcsServiceCode");function Ta(e,t){let n=Ea(e),i={...xa},r={env:{},secrets:{}};if(gn(e)){let u=Xu(t,e);Object.assign(r.env,u.env),Object.assign(r.secrets,u.secrets)}let o={env:{},secrets:{}};if(hn(e)){let u=tl(t,e);Object.assign(o.env,u.env)}let a={env:{},secrets:{}};if(vn(e)){let u=rl(t,e);Object.assign(a.env,u.env)}let c=`
290
+ ecrRepository: app.getDefaultContainerRegistry(),`;if(c+=lT(e),e.services?.length){c+=`
291
291
  services: [{`;for(let u=0;u<e.services.length;u++){let l=e.services[u];l&&(u>0&&(c+=`
292
- }, {`),c+=pT({service:l,isFirstService:u===0,hasConnections:n,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:i,plan:t,compute:e}))}c+=`
293
- }],`}return c+=fe(e.extraProperties),c+=ln(),c}Dt($a,"generateEcsCode");var _U=Object.defineProperty,EU=(e,t)=>_U(e,"name",{value:t,configurable:!0});function nl(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=ie(r),c=e.database.length>0||e.s3.length>0||i>0,u=o?`const ${a} = `:"";switch(n+=`${c?`
292
+ }, {`),c+=gT({service:l,isFirstService:u===0,hasConnections:n,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:i,plan:t,compute:e}))}c+=`
293
+ }],`}return c+=fe(e.extraProperties),c+=dn(),c}Dt(Ta,"generateEcsCode");var AU=Object.defineProperty,IU=(e,t)=>AU(e,"name",{value:t,configurable:!0});function nl(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=ie(r),c=e.database.length>0||e.s3.length>0||i>0,u=o?`const ${a} = `:"";switch(n+=`${c?`
294
294
  `:""}${u}app.addCompute(
295
295
  ComputeFactory.build(${T(r.name)}, {
296
- type: ${T(r.type)},`,r.type){case"lambda":n+=xa(r),n+=Aa(r,e);break;case"ec2":n+=Ia(r);break;case"ecs":n+=$a(r,e);break;default:{let l=r.type;throw new Error(`Unhandled compute type: ${String(l)}`)}}n+=`
296
+ type: ${T(r.type)},`,r.type){case"lambda":n+=Aa(r),n+=Ia(r,e);break;case"ec2":n+=$a(r);break;case"ecs":n+=Ta(r,e);break;default:{let l=r.type;throw new Error(`Unhandled compute type: ${String(l)}`)}}n+=`
297
297
  })
298
298
  );
299
299
  `,r.scheduleExpression!==void 0&&(n+=`app.addSchedule(${T(`${r.name}Schedule`)}, { schedule: ${T(r.scheduleExpression)}, target: ${a} });
300
- `)}return n}EU(nl,"generateComputeCode");var xU=Object.defineProperty,Oi=(e,t)=>xU(e,"name",{value:t,configurable:!0});function fT(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}Oi(fT,"generateS3BucketProps");function Qv(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)))}Oi(Qv,"s3NeedsVariable");function il(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){let i=e.s3[n],r=ie(i),o=Qv(i,e),a=e.database.length>0||n>0?`
301
- `:"",c=fT(i),u=o?`const ${r} = `:"",l=fe(i.extraProperties);c||l?t+=`${a}${u}app.addStorage(
300
+ `)}return n}IU(nl,"generateComputeCode");var $U=Object.defineProperty,Oi=(e,t)=>$U(e,"name",{value:t,configurable:!0});function hT(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}Oi(hT,"generateS3BucketProps");function eb(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)))}Oi(eb,"s3NeedsVariable");function il(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){let i=e.s3[n],r=ie(i),o=eb(i,e),a=e.database.length>0||n>0?`
301
+ `:"",c=hT(i),u=o?`const ${r} = `:"",l=fe(i.extraProperties);c||l?t+=`${a}${u}app.addStorage(
302
302
  StorageFactory.build(${T(i.name)}, {${c}${l}
303
303
  })
304
304
  );
@@ -335,7 +335,7 @@ const ${i} = app.addDatabase(
335
335
  stream: true`),t+=fe(n.extraProperties),t+=`
336
336
  })
337
337
  );
338
- `}return t}Oi(ol,"generateDynamoDBCode");function eb(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}Oi(eb,"sqsNeedsVariable");function al(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(let n of e.sqs){let i=ie(n),r=eb(n,e)?`const ${i} = `:"";t+=`
338
+ `}return t}Oi(ol,"generateDynamoDBCode");function tb(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}Oi(tb,"sqsNeedsVariable");function al(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(let n of e.sqs){let i=ie(n),r=tb(n,e)?`const ${i} = `:"";t+=`
339
339
  ${r}app.addMessaging(
340
340
  MessagingFactory.build(${T(n.name)}, {
341
341
  type: "queue",
@@ -343,20 +343,20 @@ ${r}app.addMessaging(
343
343
  visibilityTimeout: ${n.visibilityTimeout}`),n.retentionPeriod!==void 0&&(t+=`,
344
344
  messageRetentionPeriod: ${n.retentionPeriod}`),n.contentBasedDeduplication&&(t+=`,
345
345
  contentBasedDeduplication: true`),n.removalPolicy!==void 0&&(t+=`,
346
- removalPolicy: ${T(n.removalPolicy)}`),t+=",",t+=fe(n.extraProperties),t+=ln(),t+=`
346
+ removalPolicy: ${T(n.removalPolicy)}`),t+=",",t+=fe(n.extraProperties),t+=dn(),t+=`
347
347
  })
348
348
  );
349
- `}return t}Oi(al,"generateSQSCode");var AU=Object.defineProperty,lt=(e,t)=>AU(e,"name",{value:t,configurable:!0}),jt=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 vn(e,t,n){return t===void 0?"":`
350
- ${n}${e}: ${t},`}lt(vn,"emitScalar");function Mt(e,t,n){return t===void 0?"":`
351
- ${n}${e}: ${JSON.stringify(t)},`}lt(Mt,"emitStringField");function Ta(e,t,n){return t===void 0?"":t===!1?`
349
+ `}return t}Oi(al,"generateSQSCode");var TU=Object.defineProperty,lt=(e,t)=>TU(e,"name",{value:t,configurable:!0}),jt=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 bn(e,t,n){return t===void 0?"":`
350
+ ${n}${e}: ${t},`}lt(bn,"emitScalar");function Mt(e,t,n){return t===void 0?"":`
351
+ ${n}${e}: ${JSON.stringify(t)},`}lt(Mt,"emitStringField");function Ra(e,t,n){return t===void 0?"":t===!1?`
352
352
  ${n}${e}: false,`:`
353
- ${n}${e}: ${G(t,n)},`}lt(Ta,"emitObjectOrFalse");function ut(e,t,n){return t===void 0||Object.keys(t).length===0?"":`
354
- ${n}${e}: ${G(t,n)},`}lt(ut,"emitObject");function gT(e){let t=e??{},n=" ",i=t.type??jt.database.type,r=t.backupRetention??jt.database.backupRetention,o=t.deletionProtection??jt.database.deletionProtection,a=`
355
- ${n}type: "${i}",`;return a+=Mt("databaseName",t.databaseName,n),a+=Mt("databaseEngine",t.databaseEngine,n),i==="Instance"&&t.instanceType!==void 0&&(a+=Mt("instanceType",t.instanceType,n)),a+=vn("allocatedStorage",t.allocatedStorage,n),a+=vn("port",t.port,n),a+=`
353
+ ${n}${e}: ${G(t,n)},`}lt(Ra,"emitObjectOrFalse");function ut(e,t,n){return t===void 0||Object.keys(t).length===0?"":`
354
+ ${n}${e}: ${G(t,n)},`}lt(ut,"emitObject");function vT(e){let t=e??{},n=" ",i=t.type??jt.database.type,r=t.backupRetention??jt.database.backupRetention,o=t.deletionProtection??jt.database.deletionProtection,a=`
355
+ ${n}type: "${i}",`;return a+=Mt("databaseName",t.databaseName,n),a+=Mt("databaseEngine",t.databaseEngine,n),i==="Instance"&&t.instanceType!==void 0&&(a+=Mt("instanceType",t.instanceType,n)),a+=bn("allocatedStorage",t.allocatedStorage,n),a+=bn("port",t.port,n),a+=`
356
356
  ${n}backupRetention: ${r},`,a+=`
357
- ${n}deletionProtection: ${o},`,a+=vn("publiclyAccessible",t.publiclyAccessible,n),a+=Mt("allowedIpCidr",t.allowedIpCidr,n),a+=vn("multiAz",t.multiAz,n),a+=vn("allowVpcAccess",t.allowVpcAccess,n),a+=vn("monitoringInterval",t.monitoringInterval,n),a+=Mt("preferredMaintenanceWindow",t.preferredMaintenanceWindow,n),a+=Mt("snapshotIdentifier",t.snapshotIdentifier,n),a+=Mt("snapshotUsername",t.snapshotUsername,n),a+=Ta("readReplica",t.readReplica,n),a+=ut("writer",t.writer,n),a+=Ta("readers",t.readers,n),a+=Ta("databaseInsights",t.databaseInsights,n),a+=Ta("proxy",t.proxy,n),a+=ut("credentials",t.credentials,n),a+=ut("encryption",t.encryption,n),`
357
+ ${n}deletionProtection: ${o},`,a+=bn("publiclyAccessible",t.publiclyAccessible,n),a+=Mt("allowedIpCidr",t.allowedIpCidr,n),a+=bn("multiAz",t.multiAz,n),a+=bn("allowVpcAccess",t.allowVpcAccess,n),a+=bn("monitoringInterval",t.monitoringInterval,n),a+=Mt("preferredMaintenanceWindow",t.preferredMaintenanceWindow,n),a+=Mt("snapshotIdentifier",t.snapshotIdentifier,n),a+=Mt("snapshotUsername",t.snapshotUsername,n),a+=Ra("readReplica",t.readReplica,n),a+=ut("writer",t.writer,n),a+=Ra("readers",t.readers,n),a+=Ra("databaseInsights",t.databaseInsights,n),a+=Ra("proxy",t.proxy,n),a+=ut("credentials",t.credentials,n),a+=ut("encryption",t.encryption,n),`
358
358
  database: {${a}
359
- },`}lt(gT,"emitDatabaseBlock");function hT(e){let t=e??{},n=t.server?.memorySize??jt.compute.server.memorySize,i=t.server?.timeout??jt.compute.server.timeout,r=t.imageOptimisation?.memorySize??jt.compute.imageOptimisation.memorySize,o=t.imageOptimisation?.timeout??jt.compute.imageOptimisation.timeout,a=t.revalidation?.memorySize??jt.compute.revalidation.memorySize,c=t.revalidation?.timeout??jt.compute.revalidation.timeout;return`
359
+ },`}lt(vT,"emitDatabaseBlock");function bT(e){let t=e??{},n=t.server?.memorySize??jt.compute.server.memorySize,i=t.server?.timeout??jt.compute.server.timeout,r=t.imageOptimisation?.memorySize??jt.compute.imageOptimisation.memorySize,o=t.imageOptimisation?.timeout??jt.compute.imageOptimisation.timeout,a=t.revalidation?.memorySize??jt.compute.revalidation.memorySize,c=t.revalidation?.timeout??jt.compute.revalidation.timeout;return`
360
360
  compute: {
361
361
  server: {
362
362
  memorySize: ${n},
@@ -370,20 +370,20 @@ ${n}deletionProtection: ${o},`,a+=vn("publiclyAccessible",t.publiclyAccessible,n
370
370
  memorySize: ${a},
371
371
  timeout: ${c},
372
372
  },
373
- },`}lt(hT,"emitComputeBlock");function vT(e){return ut("storage",e," ")}lt(vT,"emitStorageBlock");function bT(e){return ut("messaging",e," ")}lt(bT,"emitMessagingBlock");function yT(e){return ut("cdn",e," ")}lt(yT,"emitCdnBlock");function ST(e){return ut("environment",e," ")}lt(ST,"emitEnvironmentBlock");function _T(e){let t=" ",n="";return n+=Mt("source",e.source,t),n+=ut("build",e.build,t),n+=Mt("routing",e.routing,t),n+=ut("security",e.security,t),e.domain!==void 0&&e.domain!==""&&(n+=`
374
- ${t}domain: ${JSON.stringify(e.domain)},`),n+=ut("forms",e.forms,t),n+=ut("cdn",e.cdn,t),n}lt(_T,"emitStaticSiteFields");function Ra(e){if(!e.patternConfig)return"";let t=e.patternConfig,n=`app.addPattern(
373
+ },`}lt(bT,"emitComputeBlock");function yT(e){return ut("storage",e," ")}lt(yT,"emitStorageBlock");function ST(e){return ut("messaging",e," ")}lt(ST,"emitMessagingBlock");function _T(e){return ut("cdn",e," ")}lt(_T,"emitCdnBlock");function ET(e){return ut("environment",e," ")}lt(ET,"emitEnvironmentBlock");function xT(e){let t=" ",n="";return n+=Mt("source",e.source,t),n+=ut("build",e.build,t),n+=Mt("routing",e.routing,t),n+=ut("security",e.security,t),e.domain!==void 0&&e.domain!==""&&(n+=`
374
+ ${t}domain: ${JSON.stringify(e.domain)},`),n+=ut("forms",e.forms,t),n+=ut("cdn",e.cdn,t),n}lt(xT,"emitStaticSiteFields");function Ca(e){if(!e.patternConfig)return"";let t=e.patternConfig,n=`app.addPattern(
375
375
  PatternFactory.build("${`${Fe(t.name)}${fi[t.type].constructIdSuffix}`}", {
376
376
  type: "${t.type}",
377
377
  name: "${t.name}",`;return t.type==="payload"||t.type==="nextjs"?(t.domain!==void 0&&t.domain!==""&&(n+=`
378
- domain: "${t.domain}",`),n+=gT(t.database),n+=hT(t.compute),n+=vT(t.storage),n+=bT(t.messaging),n+=yT(t.cdn),n+=ST(t.environment)):n+=_T(t),n+=`
378
+ domain: "${t.domain}",`),n+=vT(t.database),n+=bT(t.compute),n+=yT(t.storage),n+=ST(t.messaging),n+=_T(t.cdn),n+=ET(t.environment)):n+=xT(t),n+=`
379
379
  })
380
380
  );
381
381
 
382
- `,n}lt(Ra,"generatePatternCodeWithComments");var IU=Object.defineProperty,tr=(e,t)=>IU(e,"name",{value:t,configurable:!0}),Pa="fjall:costAllocation:owner",$U="engineering";function ET(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}tr(ET,"isEmptyObject");function tb(e){let t={...e};return ET(t.flowLogs)&&delete t.flowLogs,t}tr(tb,"cleanNetworkConfig");function Ca(e){if(!e.additionalNetworks||e.additionalNetworks.length===0)return"";let t="";for(let n of e.additionalNetworks){let i=er(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=tb(r);t+=`const ${i} = app.addNetwork(
382
+ `,n}lt(Ca,"generatePatternCodeWithComments");var RU=Object.defineProperty,tr=(e,t)=>RU(e,"name",{value:t,configurable:!0}),Pa="fjall:costAllocation:owner",CU="engineering";function AT(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}tr(AT,"isEmptyObject");function rb(e){let t={...e};return AT(t.flowLogs)&&delete t.flowLogs,t}tr(rb,"cleanNetworkConfig");function Na(e){if(!e.additionalNetworks||e.additionalNetworks.length===0)return"";let t="";for(let n of e.additionalNetworks){let i=er(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=rb(r);t+=`const ${i} = app.addNetwork(
383
383
  NetworkFactory.build("${n.name}", ${G(o," ")})
384
384
  );
385
385
 
386
- `}return t}tr(Ca,"generateNetworkCode");function sl(e){let t={};return e.tags&&Object.keys(e.tags).length>0&&Object.assign(t,e.tags),t[Pa]||(t[Pa]=e.owner||$U),`app.addTags({
386
+ `}return t}tr(Na,"generateNetworkCode");function sl(e){let t={};return e.tags&&Object.keys(e.tags).length>0&&Object.assign(t,e.tags),t[Pa]||(t[Pa]=e.owner||CU),`app.addTags({
387
387
  ${Object.entries(t).map(([n,i])=>` "${n}": "${i}"`).join(`,
388
388
  `)}
389
389
  });
@@ -395,7 +395,7 @@ const appName = "${e.appName}";
395
395
  backup: { tier: "${n.tier}" }`),r&&(t+=`,
396
396
  ${r}`),t+=`
397
397
  });
398
- `;else if(e.network){let o=tb(e.network);t+=`const app = App.getApp(appName, {
398
+ `;else if(e.network){let o=rb(e.network);t+=`const app = App.getApp(appName, {
399
399
  network: ${G(o," ")}`,n&&(t+=`,
400
400
  backup: { tier: "${n.tier}" }`),r&&(t+=`,
401
401
  ${r}`),t+=`
@@ -406,11 +406,11 @@ const appName = "${e.appName}";
406
406
 
407
407
  import { App${t.length>0?`, ${t.join(", ")}`:""} } from "@fjall/components-infrastructure";
408
408
  `;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}";
409
- `)}return n}tr(ul,"generateImports");function ll(e){if(!e.cdn)return"";let t=fa(e,e.cdn.defaultOriginRef),n=`
409
+ `)}return n}tr(ul,"generateImports");function ll(e){if(!e.cdn)return"";let t=ga(e,e.cdn.defaultOriginRef),n=`
410
410
  app.addCdn(
411
411
  CdnFactory.build("${e.cdn.name}", {
412
412
  originType: "auto",
413
- origin: ${t}`;if(e.cdn.behaviours&&e.cdn.behaviours.length>0){let i=e.cdn.behaviours.map(r=>{let o=fa(e,r.originRef),a=`{
413
+ origin: ${t}`;if(e.cdn.behaviours&&e.cdn.behaviours.length>0){let i=e.cdn.behaviours.map(r=>{let o=ga(e,r.originRef),a=`{
414
414
  pathPattern: "${r.pathPattern}",
415
415
  origin: ${o},`;return r.cachePolicy&&(a+=`
416
416
  cachePolicy: "${r.cachePolicy}",`),a+=`
@@ -425,31 +425,31 @@ app.addCdn(
425
425
  accessGate: ${G(e.cdn.accessGate," ")}`),n+=fe(e.cdn.extraProperties),n+=`
426
426
  })
427
427
  );
428
- `,n}tr(ll,"generateCDNCode");function dl(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}tr(dl,"collectCdnReferencedResources");function ml(e){return e.patternConfig!==void 0}tr(ml,"usesPatternApproach");var TU=Object.defineProperty,bn=(e,t)=>TU(e,"name",{value:t,configurable:!0}),Na="service",rb="0 4 * * ? *",nb="0 5 * * ? *",rr=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:Na,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:Na,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:rb,backupSchedule:nb,backupRetentionDays:14}},compute:{ecs:{services:[{name:Na,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:rb,backupSchedule:nb,backupRetentionDays:14}},compute:{ecs:{services:[{name:Na,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:rb,backupSchedule:nb,backupRetentionDays:30}},compute:{ecs:{services:[{name:Na,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 RU(e,t){return rr[e].database[t]}bn(RU,"getDatabasePreset");function PU(e){return rr[e].compute.ecs}bn(PU,"getEcsPreset");function ib(e){return rr[e].network}bn(ib,"getNetworkPreset");function xT(e){return Iu.filter(t=>rr[t].database[e]!==null)}bn(xT,"getAvailableTiersForDatabase");function CU(e){return xT(e).map(t=>({label:rr[t].displayName,value:t,description:rr[t].description}))}bn(CU,"getTierOptionsForDatabase");function ob(e){switch(e){case"tinkerer":case"lightweight":case"standard":return"Instance";case"resilient":case"enterprise":return"Aurora"}}bn(ob,"getDefaultDatabaseTypeForTier");function ab(e,t){let n=rr[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,m=c.serviceType==="worker",p;return r&&!m&&(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}})}bn(ab,"applyTierDefaultsToServices");var NU=Object.defineProperty,sb=(e,t)=>NU(e,"name",{value:t,configurable:!0}),wa=["lightweight","standard","resilient"],wU=[...wa,"custom"],Rr=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 pl(e){return Rr[e]}sb(pl,"getPatternTierPreset");function AT(){return[{label:Rr.standard.displayName,value:"standard",description:Rr.standard.description},{label:Rr.lightweight.displayName,value:"lightweight",description:Rr.lightweight.description},{label:Rr.resilient.displayName,value:"resilient",description:Rr.resilient.description},{label:"Custom",value:"custom",description:"Full control \xB7 Configure everything"}]}sb(AT,"getPatternTierOptions");var kU=new Set(wa);function fl(e){return kU.has(e)}sb(fl,"isPatternTierName");var OU=Object.defineProperty,IT=(e,t)=>OU(e,"name",{value:t,configurable:!0}),$T=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 TT(e){return{...$T[e]}}IT(TT,"getStoragePreset");function RT(){return[{label:"Standard",value:"standard"},{label:"Assets",value:"assets"},{label:"Upload",value:"upload"},{label:"Website Hosting",value:"website"}]}IT(RT,"getStoragePresetOptions");import*as ge from"typescript";import*as D from"typescript";var DU=Object.defineProperty,Di=(e,t)=>DU(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]=Pr(n.initializer))}return t}Di(B,"parseObjectLiteral");function Pr(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=>Pr(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=Pr(e.left),n=Pr(e.right);return typeof n=="string"?n:t}else if(D.isConditionalExpression(e)){let t=Pr(e.whenTrue),n=Pr(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()}}Di(Pr,"evaluateExpression");function ka(e,t){return et(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)}}}})}Di(ka,"findVariableValue");function cb(e,t){return et(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)}})}Di(cb,"findObjectDeclaration");function Oa(e,t){if(!D.isIdentifier(t.expression))return;let n=cb(e,t.expression.text),i=t.name.text;if(n&&n[i]!==void 0)return String(n[i])}Di(Oa,"evaluatePropertyAccess");function gl(e,t){let n=t.head.text;for(let i of t.templateSpans){if(D.isIdentifier(i.expression)){let r=ka(e,i.expression.text);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else if(D.isPropertyAccessExpression(i.expression)){let r=Oa(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}Di(gl,"resolveTemplateLiteral");var MU=Object.defineProperty,J=(e,t)=>MU(e,"name",{value:t,configurable:!0});function dt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}J(dt,"isPlainObject");function nr(e){return dt(e)&&"__identifier"in e}J(nr,"isIdentifierRef");function Cr(e){return dt(e)&&"__expression"in e}J(Cr,"isExpressionRef");function xt(e){return dt(e)&&"__call"in e}J(xt,"isCallRef");function P(e){return dt(e)&&!("__identifier"in e)&&!("__expression"in e)&&!("__call"in e)&&!("__unknown"in e)}J(P,"isParsedObject");function b(e){return typeof e=="string"?e:void 0}J(b,"asString");function R(e){return typeof e=="number"?e:void 0}J(R,"asNumber");function j(e){return typeof e=="boolean"?e:void 0}J(j,"asBoolean");function ue(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}J(ue,"asStringArray");function U(e,t){let n=b(e);if(n!==void 0)return ct(t,n)?n:void 0}J(U,"asStringUnion");function qe(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i);return t}J(qe,"omitUndefined");function hl(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(hl).join(", ")}]`;if(!dt(e))return String(e);if(nr(e))return e.__identifier;if(Cr(e))return e.__expression;if(xt(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}: ${hl(i)}`).join(", ")} }`}J(hl,"parsedValueToSourceText");function ce(e,t){let n=[];for(let[i,r]of Object.entries(e))t.has(i)||r===void 0||n.push({key:i,sourceText:hl(r)});return n}J(ce,"captureExtraProperties");function Nr(e,t){return ge.isPropertyAssignment(e)&&ge.isIdentifier(e.name)&&e.name.text===t}J(Nr,"isNamedProperty");function zt(e){return ge.isCallExpression(e)&&ge.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="getApp"&&ge.isIdentifier(e.expression.expression)&&e.expression.expression.text==="App"}J(zt,"isAppGetAppCall");function xe(e,t){let{expression:n}=e;return ge.isPropertyAccessExpression(n)&&n.name.text===t&&e.arguments.length>0}J(xe,"isFactoryMethodCall");function et(e,t){let n,i=J(r=>{n===void 0&&(n=t(r),n===void 0&&ge.forEachChild(r,i))},"visit");return i(e),n}J(et,"findFirstInAst");function Re(e,t){let n=[],i=J(r=>{let o=t(r);o!==null&&n.push(o),ge.forEachChild(r,i)},"visit");return i(e),n}J(Re,"collectFromAst");function Le(e,t){return ge.isCallExpression(e)&&ge.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="build"&&ge.isIdentifier(e.expression.expression)&&e.expression.expression.text===t}J(Le,"isFactoryBuildCall");function tt(e){let t=e.parent;if(ge.isVariableDeclaration(t)&&ge.isIdentifier(t.name))return t.name.text}J(tt,"extractVariableName");var mt=J(()=>e=>e,"typed");function Mi(e){if(e!=null){if(e===!1)return!1;if(typeof e=="object"&&!Array.isArray(e))return e}}J(Mi,"asObjectOrFalse");function ir(e,t){return e===!1?!1:P(e)?t(e):void 0}J(ir,"parseBooleanOrConfig");function Pe(e,t){return P(e)?t(e):void 0}J(Pe,"parseOptionalConfig");function pt(e,t,n){let i=e[t];return P(i)?n(i):void 0}J(pt,"extractSubConfig");import*as W from"typescript";import*as ji from"typescript";var jU=Object.defineProperty,rt=(e,t)=>jU(e,"name",{value:t,configurable:!0});function Da(e){return e!==void 0&&dt(e)}rt(Da,"isEnvironmentRecord");function PT(e){if(!P(e))return;let t={};for(let[n,i]of Object.entries(e))if(P(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}rt(PT,"parseContainerSecretsImport");function CT(e){if(!P(e))return;let t=ue(e.command);if(!(!t||t.length===0))return{command:t,interval:R(e.interval),timeout:R(e.timeout),retries:R(e.retries),startPeriod:R(e.startPeriod)}}rt(CT,"parseContainerHealthCheck");function NT(e){let t=ce(e,new Set(["name","image","port","environment","essential","command","entryPoint","secretsImport","secrets","healthCheck"]));return{name:b(e.name),image:b(e.image),port:R(e.port),environment:Da(e.environment)?e.environment:void 0,essential:j(e.essential),command:ue(e.command),entryPoint:ue(e.entryPoint),secretsImport:PT(e.secretsImport),ssmSecrets:ue(e.secrets),healthCheck:CT(e.healthCheck),extraProperties:t.length>0?t:void 0}}rt(NT,"parseServiceContainer");function wT(e){if(Array.isArray(e))return e.filter(P).map(t=>({path:b(t.path),host:b(t.host),priority:R(t.priority),healthCheckPath:b(t.healthCheckPath)}));if(P(e))return{path:b(e.path),host:b(e.host),priority:R(e.priority),healthCheckPath:b(e.healthCheckPath)}}rt(wT,"parseServiceRouting");function kT(e){if(e===!1)return!1;if(P(e))return{minCapacity:R(e.minCapacity),maxCapacity:R(e.maxCapacity),desiredCount:R(e.desiredCount),scalingType:U(e.scalingType,Pu)}}rt(kT,"parseServiceScaling");var zU=new Set(["instanceType","amiHardwareType","minCapacity","maxCapacity","memoryLimitMiB","warmPool"]);function OT(e){if(!P(e))return;let t=e.warmPool,n=P(t)?{minSize:R(t.minSize),reuseOnScaleIn:j(t.reuseOnScaleIn)}:void 0,i=ce(e,zU);return{instanceType:b(e.instanceType),amiHardwareType:U(e.amiHardwareType,Cu),minCapacity:R(e.minCapacity),maxCapacity:R(e.maxCapacity),memoryLimitMiB:R(e.memoryLimitMiB),warmPool:n,extraProperties:i.length>0?i:void 0}}rt(OT,"parseServiceEc2Config");var LU=new Set(["domain","loadBalancer","directAccess"]);function ub(e){if(!P(e))return;let t=e.loadBalancer,n=ce(e,LU);return{domain:b(e.domain),loadBalancer:t===!1?!1:U(t,Ru),directAccess:j(e.directAccess),...n.length>0&&{extraProperties:n}}}rt(ub,"extractClusterConfig");function lb(e){let t=e.containers,n=Array.isArray(t)?t.filter(P).map(NT):void 0,i=ce(e,new Set(["name","image","docker","ssmSecretsPath","containers","routing","connections","cpu","memoryLimitMiB","desiredCount","scaling","capacityProvider","ec2Config"]));return{name:b(e.name)??"",image:b(e.image),docker:DT(e.docker),ssmSecretsPath:b(e.ssmSecretsPath),containers:n,routing:wT(e.routing),cpu:R(e.cpu),memoryLimitMiB:R(e.memoryLimitMiB),desiredCount:R(e.desiredCount),scaling:kT(e.scaling),capacityProvider:U(e.capacityProvider,_i)??"FARGATE",ec2Config:OT(e.ec2Config),...i.length>0&&{extraProperties:i}}}rt(lb,"parseEcsService");function DT(e){if(!P(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}}}rt(DT,"parseServiceDocker");function Ma(e,t){let n=b(e);if(n)return n;if(Cr(e)&&e.__expression.startsWith(t+"."))return e.__expression.slice(t.length+1)}rt(Ma,"extractEnumString");function db(e){return xt(e)?e.__call.match(/\(\s*"([^"]+)"\s*\)/)?.[1]:void 0}rt(db,"extractCallStringArg");function Ce(e,t,n){n!==void 0&&(e[t]=n)}rt(Ce,"assignIfDefined");var UU=Object.defineProperty,vl=(e,t)=>UU(e,"name",{value:t,configurable:!0}),FU=10;function mb(e,t){return Array.isArray(e)?e.filter(nr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}vl(mb,"resolveConnectedDatabaseNames");function pb(e,t){return Array.isArray(e)?e.filter(nr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}vl(pb,"resolveConnectedStorageNames");function fb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!P(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];if(!P(o)||!P(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<=FU;c++)(a[`DATABASE_HOST_${c}`]||a[`DATABASE_PORT_${c}`]||a[`DATABASE_NAME_${c}`])&&(e.needsConnection=!0)}vl(fb,"inferDatabaseConnectionsFromEnv");function gb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!P(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];!P(o)||!P(o.environment)||o.environment.BUCKET_NAME&&n.length>0&&(e.connectedStorage??[]).length===0&&(e.connectedStorage=[n[0].name])}vl(gb,"inferStorageConnectionsFromEnv");var BU=Object.defineProperty,or=(e,t)=>BU(e,"name",{value:t,configurable:!0});function MT(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];if(!ji.isStringLiteral(t)||!ji.isObjectLiteralExpression(n))return null;let i=t.text,r=B(n);return{resourceName:i,type:b(r.type)??"ecs",config:r,node:e}}or(MT,"extractComputeResource");function bl(e){return Re(e,t=>{if(!ji.isCallExpression(t)||!xe(t,"addCompute"))return null;let n=t.arguments[0];if(!Le(n,"ComputeFactory"))return null;let i=MT(n);if(i){let r=tt(t);r&&(i.variableName=r)}return i})}or(bl,"findComputeResources");function yl(e,t,n){let i=ce(e.config,n);i.length>0&&(t.extraProperties=i)}or(yl,"applyExtras");function jT(e,t){let n=e.config.docker;if(P(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=ub(i));let r=e.config.services;r!==void 0&&Array.isArray(r)&&(t.services=r.filter(o=>P(o)).map(lb)),yl(e,t,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}or(jT,"convertEcsCompute");function zT(e,t){if(Ce(t,"deployment",U(e.config.deployment,$u)),Ce(t,"timeout",R(e.config.timeout)),Ce(t,"memory",R(e.config.memorySize)??R(e.config.memory)),Ce(t,"handler",b(e.config.handler)),Ce(t,"runtime",Ma(e.config.runtime,"Runtime")),Da(e.config.environment)&&(t.environment=e.config.environment),Da(e.config.secrets))t.secrets=e.config.secrets;else{let r=ue(e.config.secrets);r&&(t.ssmSecrets=r)}let n=e.config.functionUrl;if(P(n)){let r=U(Ma(n.authType,"FunctionUrlAuthType"),oa);r!==void 0&&(t.functionUrl={authType:r})}let i=e.config.code;if(i!==void 0){let r=db(i);r&&(t.codePath=r)}Ce(t,"description",b(e.config.lambdaDescription)),Ce(t,"architecture",U(Ma(e.config.architecture,"Architecture"),Tu)),Ce(t,"ephemeralStorageSize",R(e.config.ephemeralStorageSize)),Ce(t,"functionName",b(e.config.functionName)),Ce(t,"ssmSecretsPath",b(e.config.ssmSecretsPath)),yl(e,t,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}or(zT,"convertLambdaCompute");function LT(e,t){Ce(t,"instanceType",U(e.config.instanceType,Nu));let n=e.config.ssh;n===!1?t.enableSSH=!1:n!==void 0&&P(n)?t.enableSSH=!0:Ce(t,"enableSSH",j(e.config.enableSSH)),Ce(t,"keyName",b(e.config.keyName)),Ce(t,"userData",b(e.config.userData)),e.config.securityGroups!==void 0&&(t.securityGroups=ue(e.config.securityGroups)),yl(e,t,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}or(LT,"convertEc2Compute");function UT(e,t,n,i){let r=t.config.connections;if(!r&&Array.isArray(t.config.services)){let c=t.config.services[0];P(c)&&(r=c.connections)}if(!r)return;let o=mb(r,n);o.length>0&&(e.needsConnection=!0,e.connectedDatabase=o);let a=pb(r,i);a.length>0&&(e.connectedStorage=a)}or(UT,"applyConnectionConfig");function FT(e,t){({ecs:jT,lambda:zT,ec2:LT})[e.type]?.(t,e)}or(FT,"applyTypeSpecificConfig");function hb(e,t,n,i){return e.map(r=>{let o=U(r.config.type,na)??"ecs",a={name:r.resourceName,type:o,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return UT(a,r,t,n),FT(a,r),fb(a,r.config.services,i.database),gb(a,r.config.services,i.s3),a})}or(hb,"convertComputeResources");import*as ft from"typescript";var VU=Object.defineProperty,ZU=(e,t)=>VU(e,"name",{value:t,configurable:!0});function Sl(e){return Re(e,t=>{if(!ft.isCallExpression(t)||!xe(t,"addSchedule")||t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!ft.isStringLiteral(n)||!ft.isObjectLiteralExpression(i))return null;let r=B(i),o=b(r.schedule);if(o===void 0)return null;let a=i.properties.find(c=>ft.isPropertyAssignment(c)&&ft.isIdentifier(c.name)&&c.name.text==="target");return!a||!ft.isPropertyAssignment(a)||!ft.isIdentifier(a.initializer)?null:{id:n.text,schedule:o,targetVariableName:a.initializer.text}})}ZU(Sl,"findSchedules");import*as Q from"typescript";import*as Ue from"typescript";var GU=Object.defineProperty,ja=(e,t)=>GU(e,"name",{value:t,configurable:!0}),vb=new Set(["S3Bucket"]);function BT(e,t,n){let i=Ue.isIdentifier(e.name)?e.name.text:"";if(t.arguments&&t.arguments.length>=2){let r=t.arguments[1],o=Ue.isStringLiteral(r)?r.text:"",a=t.arguments.length>=3?t.arguments[2]:void 0,c=a&&Ue.isObjectLiteralExpression(a)?B(a):{};return{variableName:i,resourceName:o,bucketClass:n,config:c,node:e}}return null}ja(BT,"extractS3Resource");function VT(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Ue.isStringLiteral(n)||!Ue.isObjectLiteralExpression(i))return null;let r=B(i);return{variableName:tt(e)??"",resourceName:n.text,bucketClass:"StorageFactory",config:r,node:e}}ja(VT,"extractS3FactoryResource");function bb(e){return Re(e,t=>{if(!Ue.isVariableDeclaration(t)||!t.initializer||!Ue.isNewExpression(t.initializer))return null;let n=t.initializer;if(!Ue.isIdentifier(n.expression))return null;let i=n.expression.text;return vb.has(i)?BT(t,n,i):null})}ja(bb,"findS3Resources");function yb(e){return Re(e,t=>{if(!Ue.isCallExpression(t)||!xe(t,"addStorage"))return null;let n=t.arguments[0];return Le(n,"StorageFactory")?VT(t,n):null})}ja(yb,"findS3FactoryResources");function Sb(e){return e.map(t=>({name:t.resourceName,...b(t.config.bucketName)&&{bucketName:b(t.config.bucketName)},...j(t.config.publicReadAccess)===!0&&{publicReadAccess:!0},...P(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,_t)&&{backupVaultTier:U(t.config.backupVaultTier,_t)},...j(t.config.versioned)!==void 0&&{versioned:j(t.config.versioned)},...U(t.config.encryption,Ii)&&{encryption:U(t.config.encryption,Ii)},...b(t.config.kmsKeyArn)&&{kmsKeyArn:b(t.config.kmsKeyArn)},...Array.isArray(t.config.cors)&&t.config.cors.length>0&&{cors:t.config.cors.filter(P).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"):[]}))},...P(t.config.deployment)&&(()=>{let n=t.config.deployment;return{deployment:{source:b(n.source)??"",...j(n.prune)!==void 0&&{prune:j(n.prune)},...P(n.cacheControl)&&(()=>{let i=n.cacheControl;return{cacheControl:{...R(i.maxAge)!==void 0&&{maxAge:R(i.maxAge)},...j(i.immutable)!==void 0&&{immutable:j(i.immutable)}}}})()}}})(),...U(t.config.stackPlacement,Zu)&&{stackPlacement:U(t.config.stackPlacement,Zu)},...t.variableName&&{variableName:t.variableName},...(()=>{let n=new Set(["bucketName","publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors","deployment","stackPlacement"]),i=ce(t.config,n);return i.length>0?{extraProperties:i}:{}})()}))}ja(Sb,"convertS3Resources");var WU=Object.defineProperty,yn=(e,t)=>WU(e,"name",{value:t,configurable:!0}),ZT=new Set(["App","Architecture","DatabaseFactory","StorageFactory","ComputeFactory","getConfig","MessagingFactory","CdnFactory","Code","Runtime","FunctionUrlAuthType","NetworkFactory","PatternFactory","VpcPeerFactory","VpcPeerAccepterFactory","CrossPlanConnectionFactory"]);function _l(e){return!!(e.startsWith("@fjall/")||e==="aws-cdk-lib"||e.startsWith("aws-cdk-lib/")||e==="constructs")}yn(_l,"isManagedModuleSpecifier");function Ke(e){let t=[];for(let n of e.statements){let i=n.getFullStart(),r=n.getEnd();if(Q.isImportDeclaration(n)){t.push({type:"import",node:n,startPos:i,endPos:r,isManaged:GT(n)});continue}if(Q.isVariableStatement(n)){t.push(WT(n,i,r));continue}if(Q.isExpressionStatement(n)){t.push(HT(n,i,r));continue}t.push({type:"custom",node:n,startPos:i,endPos:r,isManaged:!1})}return t}yn(Ke,"classifyStatements");function GT(e){return Q.isStringLiteral(e.moduleSpecifier)?_l(e.moduleSpecifier.text):!1}yn(GT,"isManagedImport");function WT(e,t,n){for(let i of e.declarationList.declarations)if(i.initializer){if(zt(i.initializer))return{type:"app-init",node:e,resourceName:Q.isIdentifier(i.name)?i.name.text:void 0,startPos:t,endPos:n,isManaged:!0};if(Q.isIdentifier(i.name)&&i.name.text==="appName"&&Q.isStringLiteral(i.initializer))return{type:"app-init",node:e,startPos:t,endPos:n,isManaged:!0};if(Q.isNewExpression(i.initializer)){let r=i.initializer;if(Q.isIdentifier(r.expression)){let o=r.expression.text;if(vb.has(o)){let a=r.arguments&&r.arguments.length>=2&&Q.isStringLiteral(r.arguments[1])?r.arguments[1].text:void 0;return{type:"storage",node:e,resourceName:a,startPos:t,endPos:n,isManaged:!0}}}}if(Q.isCallExpression(i.initializer)){let r=_b(i.initializer,e,t,n);if(r.type!=="custom")return r}}return{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}yn(WT,"classifyVariableStatement");function HT(e,t,n){let i=e.expression;return Q.isCallExpression(i)?_b(i,e,t,n):{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}yn(HT,"classifyExpressionStatement");function _b(e,t,n,i){let r=e.expression;if(Q.isPropertyAccessExpression(r)&&Q.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"},addVpcPeer:{type:"vpc-peer",factory:"VpcPeerFactory"},addVpcPeerAccepter:{type:"vpc-peer-accepter",factory:"VpcPeerAccepterFactory"}}[o];if(a){let c=qT(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}}yn(_b,"classifyCallExpression");function qT(e,t){if(e.arguments.length===0)return;let n=e.arguments[0];if(!Q.isCallExpression(n))return;let i=n.expression;if(!Q.isPropertyAccessExpression(i)||i.name.text!=="build"||!Q.isIdentifier(i.expression)||i.expression.text!==t||n.arguments.length===0)return;let r=n.arguments[0];if(Q.isStringLiteral(r))return r.text}yn(qT,"extractResourceNameFromFactoryCall");import*as KT from"typescript";var HU=Object.defineProperty,Sn=(e,t)=>HU(e,"name",{value:t,configurable:!0}),qU={import:"after-imports","app-init":"after-app-init",tags:"after-tags"};function YT(e){if(!e)return{position:"before-imports"};let t=qU[e.type];return t?{position:t}:{position:"after-resource",afterManagedResource:{type:e.type,name:e.resourceName}}}Sn(YT,"determineCustomBlockPosition");function za(e,t){let n=t??Ke(e),i=[],r=e.getFullText(),o=null;for(let a of n)if(a.type==="custom"&&!a.isManaged){let{position:c,afterManagedResource:u}=YT(o),l=XT(r,a.node),m=JT(r,a.node),p=e.getLineAndCharacterOfPosition(a.node.getStart());i.push({sourceText:l,position:c,afterManagedResource:u,originalLine:p.line+1,leadingComments:m.length>0?m:void 0})}else a.isManaged&&(o=a);return i}Sn(za,"extractCustomCodeBlocks");function XT(e,t){let n=t.getFullStart(),i=t.getEnd(),r=e.slice(n,i).split(`
428
+ `,n}tr(ll,"generateCDNCode");function dl(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}tr(dl,"collectCdnReferencedResources");function ml(e){return e.patternConfig!==void 0}tr(ml,"usesPatternApproach");var PU=Object.defineProperty,yn=(e,t)=>PU(e,"name",{value:t,configurable:!0}),wa="service",nb="0 4 * * ? *",ib="0 5 * * ? *",rr=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:wa,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:wa,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:nb,backupSchedule:ib,backupRetentionDays:14}},compute:{ecs:{services:[{name:wa,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:nb,backupSchedule:ib,backupRetentionDays:14}},compute:{ecs:{services:[{name:wa,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:nb,backupSchedule:ib,backupRetentionDays:30}},compute:{ecs:{services:[{name:wa,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 NU(e,t){return rr[e].database[t]}yn(NU,"getDatabasePreset");function wU(e){return rr[e].compute.ecs}yn(wU,"getEcsPreset");function ob(e){return rr[e].network}yn(ob,"getNetworkPreset");function IT(e){return Iu.filter(t=>rr[t].database[e]!==null)}yn(IT,"getAvailableTiersForDatabase");function kU(e){return IT(e).map(t=>({label:rr[t].displayName,value:t,description:rr[t].description}))}yn(kU,"getTierOptionsForDatabase");function ab(e){switch(e){case"tinkerer":case"lightweight":case"standard":return"Instance";case"resilient":case"enterprise":return"Aurora"}}yn(ab,"getDefaultDatabaseTypeForTier");function sb(e,t){let n=rr[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,m=c.serviceType==="worker",p;return r&&!m&&(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}})}yn(sb,"applyTierDefaultsToServices");var OU=Object.defineProperty,cb=(e,t)=>OU(e,"name",{value:t,configurable:!0}),ka=["lightweight","standard","resilient"],DU=[...ka,"custom"],Rr=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 pl(e){return Rr[e]}cb(pl,"getPatternTierPreset");function $T(){return[{label:Rr.standard.displayName,value:"standard",description:Rr.standard.description},{label:Rr.lightweight.displayName,value:"lightweight",description:Rr.lightweight.description},{label:Rr.resilient.displayName,value:"resilient",description:Rr.resilient.description},{label:"Custom",value:"custom",description:"Full control \xB7 Configure everything"}]}cb($T,"getPatternTierOptions");var MU=new Set(ka);function fl(e){return MU.has(e)}cb(fl,"isPatternTierName");var jU=Object.defineProperty,TT=(e,t)=>jU(e,"name",{value:t,configurable:!0}),RT=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 CT(e){return{...RT[e]}}TT(CT,"getStoragePreset");function PT(){return[{label:"Standard",value:"standard"},{label:"Assets",value:"assets"},{label:"Upload",value:"upload"},{label:"Website Hosting",value:"website"}]}TT(PT,"getStoragePresetOptions");import*as ge from"typescript";import*as D from"typescript";var zU=Object.defineProperty,Di=(e,t)=>zU(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]=Cr(n.initializer))}return t}Di(B,"parseObjectLiteral");function Cr(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=>Cr(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=Cr(e.left),n=Cr(e.right);return typeof n=="string"?n:t}else if(D.isConditionalExpression(e)){let t=Cr(e.whenTrue),n=Cr(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()}}Di(Cr,"evaluateExpression");function Oa(e,t){return et(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)}}}})}Di(Oa,"findVariableValue");function ub(e,t){return et(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)}})}Di(ub,"findObjectDeclaration");function Da(e,t){if(!D.isIdentifier(t.expression))return;let n=ub(e,t.expression.text),i=t.name.text;if(n&&n[i]!==void 0)return String(n[i])}Di(Da,"evaluatePropertyAccess");function gl(e,t){let n=t.head.text;for(let i of t.templateSpans){if(D.isIdentifier(i.expression)){let r=Oa(e,i.expression.text);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else if(D.isPropertyAccessExpression(i.expression)){let r=Da(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}Di(gl,"resolveTemplateLiteral");var LU=Object.defineProperty,J=(e,t)=>LU(e,"name",{value:t,configurable:!0});function dt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}J(dt,"isPlainObject");function nr(e){return dt(e)&&"__identifier"in e}J(nr,"isIdentifierRef");function Pr(e){return dt(e)&&"__expression"in e}J(Pr,"isExpressionRef");function xt(e){return dt(e)&&"__call"in e}J(xt,"isCallRef");function C(e){return dt(e)&&!("__identifier"in e)&&!("__expression"in e)&&!("__call"in e)&&!("__unknown"in e)}J(C,"isParsedObject");function b(e){return typeof e=="string"?e:void 0}J(b,"asString");function R(e){return typeof e=="number"?e:void 0}J(R,"asNumber");function j(e){return typeof e=="boolean"?e:void 0}J(j,"asBoolean");function ue(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}J(ue,"asStringArray");function U(e,t){let n=b(e);if(n!==void 0)return ct(t,n)?n:void 0}J(U,"asStringUnion");function qe(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i);return t}J(qe,"omitUndefined");function hl(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(hl).join(", ")}]`;if(!dt(e))return String(e);if(nr(e))return e.__identifier;if(Pr(e))return e.__expression;if(xt(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}: ${hl(i)}`).join(", ")} }`}J(hl,"parsedValueToSourceText");function ce(e,t){let n=[];for(let[i,r]of Object.entries(e))t.has(i)||r===void 0||n.push({key:i,sourceText:hl(r)});return n}J(ce,"captureExtraProperties");function Nr(e,t){return ge.isPropertyAssignment(e)&&ge.isIdentifier(e.name)&&e.name.text===t}J(Nr,"isNamedProperty");function zt(e){return ge.isCallExpression(e)&&ge.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="getApp"&&ge.isIdentifier(e.expression.expression)&&e.expression.expression.text==="App"}J(zt,"isAppGetAppCall");function xe(e,t){let{expression:n}=e;return ge.isPropertyAccessExpression(n)&&n.name.text===t&&e.arguments.length>0}J(xe,"isFactoryMethodCall");function et(e,t){let n,i=J(r=>{n===void 0&&(n=t(r),n===void 0&&ge.forEachChild(r,i))},"visit");return i(e),n}J(et,"findFirstInAst");function Re(e,t){let n=[],i=J(r=>{let o=t(r);o!==null&&n.push(o),ge.forEachChild(r,i)},"visit");return i(e),n}J(Re,"collectFromAst");function Le(e,t){return ge.isCallExpression(e)&&ge.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="build"&&ge.isIdentifier(e.expression.expression)&&e.expression.expression.text===t}J(Le,"isFactoryBuildCall");function tt(e){let t=e.parent;if(ge.isVariableDeclaration(t)&&ge.isIdentifier(t.name))return t.name.text}J(tt,"extractVariableName");var mt=J(()=>e=>e,"typed");function Mi(e){if(e!=null){if(e===!1)return!1;if(typeof e=="object"&&!Array.isArray(e))return e}}J(Mi,"asObjectOrFalse");function ir(e,t){return e===!1?!1:C(e)?t(e):void 0}J(ir,"parseBooleanOrConfig");function Ce(e,t){return C(e)?t(e):void 0}J(Ce,"parseOptionalConfig");function pt(e,t,n){let i=e[t];return C(i)?n(i):void 0}J(pt,"extractSubConfig");import*as W from"typescript";import*as ji from"typescript";var UU=Object.defineProperty,rt=(e,t)=>UU(e,"name",{value:t,configurable:!0});function Ma(e){return e!==void 0&&dt(e)}rt(Ma,"isEnvironmentRecord");function NT(e){if(!C(e))return;let t={};for(let[n,i]of Object.entries(e))if(C(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}rt(NT,"parseContainerSecretsImport");function wT(e){if(!C(e))return;let t=ue(e.command);if(!(!t||t.length===0))return{command:t,interval:R(e.interval),timeout:R(e.timeout),retries:R(e.retries),startPeriod:R(e.startPeriod)}}rt(wT,"parseContainerHealthCheck");function kT(e){let t=ce(e,new Set(["name","image","port","environment","essential","command","entryPoint","secretsImport","secrets","healthCheck"]));return{name:b(e.name),image:b(e.image),port:R(e.port),environment:Ma(e.environment)?e.environment:void 0,essential:j(e.essential),command:ue(e.command),entryPoint:ue(e.entryPoint),secretsImport:NT(e.secretsImport),ssmSecrets:ue(e.secrets),healthCheck:wT(e.healthCheck),extraProperties:t.length>0?t:void 0}}rt(kT,"parseServiceContainer");function OT(e){if(Array.isArray(e))return e.filter(C).map(t=>({path:b(t.path),host:b(t.host),priority:R(t.priority),healthCheckPath:b(t.healthCheckPath)}));if(C(e))return{path:b(e.path),host:b(e.host),priority:R(e.priority),healthCheckPath:b(e.healthCheckPath)}}rt(OT,"parseServiceRouting");function DT(e){if(e===!1)return!1;if(C(e))return{minCapacity:R(e.minCapacity),maxCapacity:R(e.maxCapacity),desiredCount:R(e.desiredCount),scalingType:U(e.scalingType,Cu)}}rt(DT,"parseServiceScaling");var FU=new Set(["instanceType","amiHardwareType","minCapacity","maxCapacity","memoryLimitMiB","warmPool"]);function MT(e){if(!C(e))return;let t=e.warmPool,n=C(t)?{minSize:R(t.minSize),reuseOnScaleIn:j(t.reuseOnScaleIn)}:void 0,i=ce(e,FU);return{instanceType:b(e.instanceType),amiHardwareType:U(e.amiHardwareType,Pu),minCapacity:R(e.minCapacity),maxCapacity:R(e.maxCapacity),memoryLimitMiB:R(e.memoryLimitMiB),warmPool:n,extraProperties:i.length>0?i:void 0}}rt(MT,"parseServiceEc2Config");var BU=new Set(["domain","loadBalancer","directAccess"]);function lb(e){if(!C(e))return;let t=e.loadBalancer,n=ce(e,BU);return{domain:b(e.domain),loadBalancer:t===!1?!1:U(t,Ru),directAccess:j(e.directAccess),...n.length>0&&{extraProperties:n}}}rt(lb,"extractClusterConfig");function db(e){let t=e.containers,n=Array.isArray(t)?t.filter(C).map(kT):void 0,i=ce(e,new Set(["name","image","docker","ssmSecretsPath","containers","routing","connections","cpu","memoryLimitMiB","desiredCount","scaling","capacityProvider","ec2Config"]));return{name:b(e.name)??"",image:b(e.image),docker:jT(e.docker),ssmSecretsPath:b(e.ssmSecretsPath),containers:n,routing:OT(e.routing),cpu:R(e.cpu),memoryLimitMiB:R(e.memoryLimitMiB),desiredCount:R(e.desiredCount),scaling:DT(e.scaling),capacityProvider:U(e.capacityProvider,_i)??"FARGATE",ec2Config:MT(e.ec2Config),...i.length>0&&{extraProperties:i}}}rt(db,"parseEcsService");function jT(e){if(!C(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}}}rt(jT,"parseServiceDocker");function ja(e,t){let n=b(e);if(n)return n;if(Pr(e)&&e.__expression.startsWith(t+"."))return e.__expression.slice(t.length+1)}rt(ja,"extractEnumString");function mb(e){return xt(e)?e.__call.match(/\(\s*"([^"]+)"\s*\)/)?.[1]:void 0}rt(mb,"extractCallStringArg");function Pe(e,t,n){n!==void 0&&(e[t]=n)}rt(Pe,"assignIfDefined");var VU=Object.defineProperty,vl=(e,t)=>VU(e,"name",{value:t,configurable:!0}),ZU=10;function pb(e,t){return Array.isArray(e)?e.filter(nr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}vl(pb,"resolveConnectedDatabaseNames");function fb(e,t){return Array.isArray(e)?e.filter(nr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}vl(fb,"resolveConnectedStorageNames");function gb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!C(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];if(!C(o)||!C(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<=ZU;c++)(a[`DATABASE_HOST_${c}`]||a[`DATABASE_PORT_${c}`]||a[`DATABASE_NAME_${c}`])&&(e.needsConnection=!0)}vl(gb,"inferDatabaseConnectionsFromEnv");function hb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!C(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];!C(o)||!C(o.environment)||o.environment.BUCKET_NAME&&n.length>0&&(e.connectedStorage??[]).length===0&&(e.connectedStorage=[n[0].name])}vl(hb,"inferStorageConnectionsFromEnv");var GU=Object.defineProperty,or=(e,t)=>GU(e,"name",{value:t,configurable:!0});function zT(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];if(!ji.isStringLiteral(t)||!ji.isObjectLiteralExpression(n))return null;let i=t.text,r=B(n);return{resourceName:i,type:b(r.type)??"ecs",config:r,node:e}}or(zT,"extractComputeResource");function bl(e){return Re(e,t=>{if(!ji.isCallExpression(t)||!xe(t,"addCompute"))return null;let n=t.arguments[0];if(!Le(n,"ComputeFactory"))return null;let i=zT(n);if(i){let r=tt(t);r&&(i.variableName=r)}return i})}or(bl,"findComputeResources");function yl(e,t,n){let i=ce(e.config,n);i.length>0&&(t.extraProperties=i)}or(yl,"applyExtras");function LT(e,t){let n=e.config.docker;if(C(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=lb(i));let r=e.config.services;r!==void 0&&Array.isArray(r)&&(t.services=r.filter(o=>C(o)).map(db)),yl(e,t,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}or(LT,"convertEcsCompute");function UT(e,t){if(Pe(t,"deployment",U(e.config.deployment,$u)),Pe(t,"timeout",R(e.config.timeout)),Pe(t,"memory",R(e.config.memorySize)??R(e.config.memory)),Pe(t,"handler",b(e.config.handler)),Pe(t,"runtime",ja(e.config.runtime,"Runtime")),Ma(e.config.environment)&&(t.environment=e.config.environment),Ma(e.config.secrets))t.secrets=e.config.secrets;else{let r=ue(e.config.secrets);r&&(t.ssmSecrets=r)}let n=e.config.functionUrl;if(C(n)){let r=U(ja(n.authType,"FunctionUrlAuthType"),aa);r!==void 0&&(t.functionUrl={authType:r})}let i=e.config.code;if(i!==void 0){let r=mb(i);r&&(t.codePath=r)}Pe(t,"description",b(e.config.lambdaDescription)),Pe(t,"architecture",U(ja(e.config.architecture,"Architecture"),Tu)),Pe(t,"ephemeralStorageSize",R(e.config.ephemeralStorageSize)),Pe(t,"functionName",b(e.config.functionName)),Pe(t,"ssmSecretsPath",b(e.config.ssmSecretsPath)),yl(e,t,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}or(UT,"convertLambdaCompute");function FT(e,t){Pe(t,"instanceType",U(e.config.instanceType,Nu));let n=e.config.ssh;n===!1?t.enableSSH=!1:n!==void 0&&C(n)?t.enableSSH=!0:Pe(t,"enableSSH",j(e.config.enableSSH)),Pe(t,"keyName",b(e.config.keyName)),Pe(t,"userData",b(e.config.userData)),e.config.securityGroups!==void 0&&(t.securityGroups=ue(e.config.securityGroups)),yl(e,t,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}or(FT,"convertEc2Compute");function BT(e,t,n,i){let r=t.config.connections;if(!r&&Array.isArray(t.config.services)){let c=t.config.services[0];C(c)&&(r=c.connections)}if(!r)return;let o=pb(r,n);o.length>0&&(e.needsConnection=!0,e.connectedDatabase=o);let a=fb(r,i);a.length>0&&(e.connectedStorage=a)}or(BT,"applyConnectionConfig");function VT(e,t){({ecs:LT,lambda:UT,ec2:FT})[e.type]?.(t,e)}or(VT,"applyTypeSpecificConfig");function vb(e,t,n,i){return e.map(r=>{let o=U(r.config.type,ia)??"ecs",a={name:r.resourceName,type:o,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return BT(a,r,t,n),VT(a,r),gb(a,r.config.services,i.database),hb(a,r.config.services,i.s3),a})}or(vb,"convertComputeResources");import*as ft from"typescript";var WU=Object.defineProperty,HU=(e,t)=>WU(e,"name",{value:t,configurable:!0});function Sl(e){return Re(e,t=>{if(!ft.isCallExpression(t)||!xe(t,"addSchedule")||t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!ft.isStringLiteral(n)||!ft.isObjectLiteralExpression(i))return null;let r=B(i),o=b(r.schedule);if(o===void 0)return null;let a=i.properties.find(c=>ft.isPropertyAssignment(c)&&ft.isIdentifier(c.name)&&c.name.text==="target");return!a||!ft.isPropertyAssignment(a)||!ft.isIdentifier(a.initializer)?null:{id:n.text,schedule:o,targetVariableName:a.initializer.text}})}HU(Sl,"findSchedules");import*as Q from"typescript";import*as Ue from"typescript";var qU=Object.defineProperty,za=(e,t)=>qU(e,"name",{value:t,configurable:!0}),bb=new Set(["S3Bucket"]);function ZT(e,t,n){let i=Ue.isIdentifier(e.name)?e.name.text:"";if(t.arguments&&t.arguments.length>=2){let r=t.arguments[1],o=Ue.isStringLiteral(r)?r.text:"",a=t.arguments.length>=3?t.arguments[2]:void 0,c=a&&Ue.isObjectLiteralExpression(a)?B(a):{};return{variableName:i,resourceName:o,bucketClass:n,config:c,node:e}}return null}za(ZT,"extractS3Resource");function GT(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Ue.isStringLiteral(n)||!Ue.isObjectLiteralExpression(i))return null;let r=B(i);return{variableName:tt(e)??"",resourceName:n.text,bucketClass:"StorageFactory",config:r,node:e}}za(GT,"extractS3FactoryResource");function yb(e){return Re(e,t=>{if(!Ue.isVariableDeclaration(t)||!t.initializer||!Ue.isNewExpression(t.initializer))return null;let n=t.initializer;if(!Ue.isIdentifier(n.expression))return null;let i=n.expression.text;return bb.has(i)?ZT(t,n,i):null})}za(yb,"findS3Resources");function Sb(e){return Re(e,t=>{if(!Ue.isCallExpression(t)||!xe(t,"addStorage"))return null;let n=t.arguments[0];return Le(n,"StorageFactory")?GT(t,n):null})}za(Sb,"findS3FactoryResources");function _b(e){return e.map(t=>({name:t.resourceName,...b(t.config.bucketName)&&{bucketName:b(t.config.bucketName)},...j(t.config.publicReadAccess)===!0&&{publicReadAccess:!0},...C(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,_t)&&{backupVaultTier:U(t.config.backupVaultTier,_t)},...j(t.config.versioned)!==void 0&&{versioned:j(t.config.versioned)},...U(t.config.encryption,Ii)&&{encryption:U(t.config.encryption,Ii)},...b(t.config.kmsKeyArn)&&{kmsKeyArn:b(t.config.kmsKeyArn)},...Array.isArray(t.config.cors)&&t.config.cors.length>0&&{cors:t.config.cors.filter(C).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"):[]}))},...C(t.config.deployment)&&(()=>{let n=t.config.deployment;return{deployment:{source:b(n.source)??"",...j(n.prune)!==void 0&&{prune:j(n.prune)},...C(n.cacheControl)&&(()=>{let i=n.cacheControl;return{cacheControl:{...R(i.maxAge)!==void 0&&{maxAge:R(i.maxAge)},...j(i.immutable)!==void 0&&{immutable:j(i.immutable)}}}})()}}})(),...U(t.config.stackPlacement,Zu)&&{stackPlacement:U(t.config.stackPlacement,Zu)},...t.variableName&&{variableName:t.variableName},...(()=>{let n=new Set(["bucketName","publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors","deployment","stackPlacement"]),i=ce(t.config,n);return i.length>0?{extraProperties:i}:{}})()}))}za(_b,"convertS3Resources");var KU=Object.defineProperty,Sn=(e,t)=>KU(e,"name",{value:t,configurable:!0}),WT=new Set(["App","Architecture","DatabaseFactory","StorageFactory","ComputeFactory","getConfig","MessagingFactory","CdnFactory","Code","Runtime","FunctionUrlAuthType","NetworkFactory","PatternFactory","VpcPeerFactory","VpcPeerAccepterFactory","CrossPlanConnectionFactory"]);function _l(e){return!!(e.startsWith("@fjall/")||e==="aws-cdk-lib"||e.startsWith("aws-cdk-lib/")||e==="constructs")}Sn(_l,"isManagedModuleSpecifier");function Ke(e){let t=[];for(let n of e.statements){let i=n.getFullStart(),r=n.getEnd();if(Q.isImportDeclaration(n)){t.push({type:"import",node:n,startPos:i,endPos:r,isManaged:HT(n)});continue}if(Q.isVariableStatement(n)){t.push(qT(n,i,r));continue}if(Q.isExpressionStatement(n)){t.push(KT(n,i,r));continue}t.push({type:"custom",node:n,startPos:i,endPos:r,isManaged:!1})}return t}Sn(Ke,"classifyStatements");function HT(e){return Q.isStringLiteral(e.moduleSpecifier)?_l(e.moduleSpecifier.text):!1}Sn(HT,"isManagedImport");function qT(e,t,n){for(let i of e.declarationList.declarations)if(i.initializer){if(zt(i.initializer))return{type:"app-init",node:e,resourceName:Q.isIdentifier(i.name)?i.name.text:void 0,startPos:t,endPos:n,isManaged:!0};if(Q.isIdentifier(i.name)&&i.name.text==="appName"&&Q.isStringLiteral(i.initializer))return{type:"app-init",node:e,startPos:t,endPos:n,isManaged:!0};if(Q.isNewExpression(i.initializer)){let r=i.initializer;if(Q.isIdentifier(r.expression)){let o=r.expression.text;if(bb.has(o)){let a=r.arguments&&r.arguments.length>=2&&Q.isStringLiteral(r.arguments[1])?r.arguments[1].text:void 0;return{type:"storage",node:e,resourceName:a,startPos:t,endPos:n,isManaged:!0}}}}if(Q.isCallExpression(i.initializer)){let r=Eb(i.initializer,e,t,n);if(r.type!=="custom")return r}}return{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}Sn(qT,"classifyVariableStatement");function KT(e,t,n){let i=e.expression;return Q.isCallExpression(i)?Eb(i,e,t,n):{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}Sn(KT,"classifyExpressionStatement");function Eb(e,t,n,i){let r=e.expression;if(Q.isPropertyAccessExpression(r)&&Q.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"},addVpcPeer:{type:"vpc-peer",factory:"VpcPeerFactory"},addVpcPeerAccepter:{type:"vpc-peer-accepter",factory:"VpcPeerAccepterFactory"}}[o];if(a){let c=YT(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}}Sn(Eb,"classifyCallExpression");function YT(e,t){if(e.arguments.length===0)return;let n=e.arguments[0];if(!Q.isCallExpression(n))return;let i=n.expression;if(!Q.isPropertyAccessExpression(i)||i.name.text!=="build"||!Q.isIdentifier(i.expression)||i.expression.text!==t||n.arguments.length===0)return;let r=n.arguments[0];if(Q.isStringLiteral(r))return r.text}Sn(YT,"extractResourceNameFromFactoryCall");import*as XT from"typescript";var YU=Object.defineProperty,_n=(e,t)=>YU(e,"name",{value:t,configurable:!0}),XU={import:"after-imports","app-init":"after-app-init",tags:"after-tags"};function JT(e){if(!e)return{position:"before-imports"};let t=XU[e.type];return t?{position:t}:{position:"after-resource",afterManagedResource:{type:e.type,name:e.resourceName}}}_n(JT,"determineCustomBlockPosition");function La(e,t){let n=t??Ke(e),i=[],r=e.getFullText(),o=null;for(let a of n)if(a.type==="custom"&&!a.isManaged){let{position:c,afterManagedResource:u}=JT(o),l=QT(r,a.node),m=e0(r,a.node),p=e.getLineAndCharacterOfPosition(a.node.getStart());i.push({sourceText:l,position:c,afterManagedResource:u,originalLine:p.line+1,leadingComments:m.length>0?m:void 0})}else a.isManaged&&(o=a);return i}_n(La,"extractCustomCodeBlocks");function QT(e,t){let n=t.getFullStart(),i=t.getEnd(),r=e.slice(n,i).split(`
429
429
  `),o=r.findIndex(a=>a.trim()!=="");return r.slice(o===-1?0:o).join(`
430
- `)}Sn(XT,"getStatementTextWithComments");function JT(e,t){let n=[],i=KT.getLeadingCommentRanges(e,t.getFullStart());if(i)for(let r of i){let o=e.slice(r.pos,r.end);n.push(o)}return n}Sn(JT,"extractLeadingComments");function zi(e,t,n,i){let r=i??Ke(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}Sn(zi,"findManagedResourcePosition");function Eb(e,t,n){let i=n??Ke(e),r=null;for(let o of i)o.type===t&&o.isManaged&&(r=o);return r}Sn(Eb,"getLastManagedStatementOfType");function xb(e,t){let n=t??Ke(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}Sn(xb,"getManagedResourcesByType");import*as ar from"typescript";import*as Ua from"typescript";var KU=Object.defineProperty,Ab=(e,t)=>KU(e,"name",{value:t,configurable:!0}),YU=["S","N","B"];function La(e){if(!P(e))return;let t=b(e.name),n=U(e.type,YU);if(!(!t||!n))return{name:t,type:n}}Ab(La,"parseDynamoDBKey");function Ib(e){let t=e.node;if(!Ua.isCallExpression(t))return null;let n=t.arguments[0];if(!Ua.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!Ua.isObjectLiteralExpression(i))return null;let r=B(i),o=La(r.partitionKey);if(!o)return null;let a={resourceName:e.resourceName,partitionKey:o,node:e.node};e.variableName&&(a.variableName=e.variableName);let c=La(r.sortKey);if(c&&(a.sortKey=c),Array.isArray(r.globalSecondaryIndexes)){let p=r.globalSecondaryIndexes.filter(P).map(g=>{let v=La(g.partitionKey);if(!v)return null;let A=b(g.indexName);if(!A)return null;let Y={indexName:A,partitionKey:v},z=La(g.sortKey);return z&&(Y.sortKey=z),Y}).filter(g=>g!==null);p.length>0&&(a.globalSecondaryIndexes=p)}let u=b(r.ttlAttribute);u&&(a.ttlAttribute=u);let l=j(r.stream);l!==void 0&&(a.stream=l);let m=ce(r,new Set(["type","databaseName","partitionKey","sortKey","globalSecondaryIndexes","ttlAttribute","stream"]));return m.length>0&&(a.extraProperties=m),a}Ab(Ib,"extractDynamoDBFields");function El(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})}))}Ab(El,"convertDynamoDBResources");import*as Fa from"typescript";var XU=Object.defineProperty,QT=(e,t)=>XU(e,"name",{value:t,configurable:!0}),JU=new Set(["type","databaseName","instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays"]);function $b(e){let t=e.node;if(!Fa.isCallExpression(t))return null;let n=t.arguments[0];if(!Fa.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!Fa.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:P(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 m=R(r.backupRetentionDays);m!==void 0&&(o.backupRetentionDays=m);let p=ce(r,JU);return p.length>0&&(o.extraProperties=p),o}QT($b,"extractClickHouseFields");function xl(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})}))}QT(xl,"convertClickHouseResources");var QU=Object.defineProperty,Li=(e,t)=>QU(e,"name",{value:t,configurable:!0});function e0(e){let t=b(e.databaseEngine);if(t!==void 0&&ct(xi,t))return t;let n=e.engine;if(xt(n)){let i=String(n.__call);if(i.includes("postgres")||i.includes("auroraPostgres"))return"postgresql";if(i.includes("mysql")||i.includes("auroraMysql"))return"mysql"}}Li(e0,"extractDatabaseEngine");function t0(e){let t=e.engine;if(xt(t))return String(t.__call)}Li(t0,"extractEngineExpression");var e4=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 r0(e,t,n){if(n.arguments.length<2)return null;let i=n.arguments[0],r=n.arguments[1];if(!ar.isStringLiteral(i)&&!ar.isTemplateExpression(i))return null;let o=ar.isStringLiteral(i)?i.text:gl(e,i);if(!ar.isObjectLiteralExpression(r))return null;let a=B(r),c={resourceName:o,type:b(a.type)??"",databaseName:b(a.databaseName)??"",databaseEngine:e0(a),engineExpression:t0(a),port:R(a.port),deletionProtection:j(a.deletionProtection),instanceType:b(a.instanceType),multiAz:j(a.multiAz),publiclyAccessible:j(a.publiclyAccessible),enableSecretRotation:j(a.enableSecretRotation),encryption:Pe(a.encryption,mt()),databaseInsights:ir(a.databaseInsights,mt()),proxy:ir(a.proxy,mt()),readReplica:ir(a.readReplica,mt()),credentials:Pe(a.credentials,mt()),writer:Pe(a.writer,mt()),readers:ir(a.readers,mt()),backupRetention:R(a.backupRetention),preferredMaintenanceWindow:b(a.preferredMaintenanceWindow),primaryRegion:b(a.primaryRegion),secondaryRegions:ue(a.secondaryRegions),globalClusterIdentifier:b(a.globalClusterIdentifier),enableGlobalWriteForwarding:j(a.enableGlobalWriteForwarding),allocatedStorage:R(a.allocatedStorage),monitoringInterval:R(a.monitoringInterval),snapshotIdentifier:b(a.snapshotIdentifier),snapshotUsername:b(a.snapshotUsername),node:t},u=tt(t);u&&(c.variableName=u);let l=ce(a,e4);return l.length>0&&(c.extraProperties=l),c}Li(r0,"extractDatabaseResource");function Tb(e){return Re(e,t=>{if(!ar.isCallExpression(t)||!xe(t,"addDatabase"))return null;let n=t.arguments[0];return Le(n,"DatabaseFactory")?r0(e,t,n):null})}Li(Tb,"findDatabaseResources");function Rb(e){let t=[],n=[],i=[];for(let r of e)if(r.type==="DynamoDB"){let o=Ib(r);o&&n.push(o)}else if(r.type==="ClickHouse"){let o=$b(r);o&&i.push(o)}else t.push(r);return{databases:t,dynamodb:n,clickhouse:i}}Li(Rb,"splitDatabaseResources");var t4=["Instance","Aurora","GlobalAurora"];function Pb(e){return e.filter(t=>t.type!=="DynamoDB").map(t=>({name:t.resourceName,type:ct(t4,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})}))}Li(Pb,"convertDatabaseResources");import*as Fi from"typescript";var r4=Object.defineProperty,Ui=(e,t)=>r4(e,"name",{value:t,configurable:!0});function n0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Fi.isStringLiteral(n)||!Fi.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:n.text,queueType:b(r.queueType)??"standard",visibilityTimeout:R(r.visibilityTimeout),retentionPeriod:R(r.messageRetentionPeriod),contentBasedDeduplication:j(r.contentBasedDeduplication),removalPolicy:b(r.removalPolicy),node:e},a=tt(e);a&&(o.variableName=a);let c=ce(r,new Set(["type","queueType","visibilityTimeout","messageRetentionPeriod","contentBasedDeduplication","removalPolicy"]));return c.length>0&&(o.extraProperties=c),o}Ui(n0,"extractSQSResource");function Cb(e){if(e!=null){if(e===!1)return!1;if(P(e))return qe({enabled:j(e.enabled),maxReceiveCount:R(e.maxReceiveCount)})}}Ui(Cb,"parseDeadLetterQueueConfig");function Nb(e){return Re(e,t=>{if(!Fi.isCallExpression(t)||!xe(t,"addMessaging"))return null;let n=t.arguments[0];return Le(n,"MessagingFactory")?n0(t,n):null})}Ui(Nb,"findSQSResources");function wb(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:o0(t.removalPolicy),variableName:t.variableName,extraProperties:t.extraProperties})}))}Ui(wb,"convertSQSResources");var n4=new Set(kv.options);function i0(e){return n4.has(e)}Ui(i0,"isSqsRemovalPolicy");function o0(e){return e!==void 0&&i0(e)?e:void 0}Ui(o0,"toSqsRemovalPolicy");import*as Bi from"typescript";var i4=Object.defineProperty,Ba=(e,t)=>i4(e,"name",{value:t,configurable:!0});function s0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];return!Bi.isStringLiteral(t)||!Bi.isObjectLiteralExpression(n)?null:{resourceName:t.text,config:B(n),node:e}}Ba(s0,"extractCDNResource");function c0(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}Ba(c0,"resolveOriginIdentifier");var a0=["CACHING_OPTIMIZED","CACHING_DISABLED"];function kb(e){return et(e,t=>{if(!Bi.isCallExpression(t)||!xe(t,"addCdn"))return;let n=t.arguments[0];if(Le(n,"CdnFactory"))return s0(n)??void 0})}Ba(kb,"findCDNResource");function Ob(e,t,n){if(!e)return;let i=e,r=i.config,o=Ba(p=>nr(p)?c0(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(P).map(g=>({pathPattern:b(g.pathPattern)??"",originRef:o(g.origin),...U(g.cachePolicy,a0)!==void 0&&{cachePolicy:U(g.cachePolicy,a0)}}));p.length>0&&(c.behaviours=p)}let u=b(r.customDomain);if(u)c.customDomain=u;else{let p=ue(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(P(r.accessGate)){let p=r.accessGate,g=b(p.type),v=b(p.username),A=b(p.password);g==="basic-auth"&&v&&A&&(c.accessGate={type:"basic-auth",username:v,password:A})}}let m=ce(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return m.length>0&&(c.extraProperties=m),c}Ba(Ob,"convertCDNResource");import*as de from"typescript";var o4=Object.defineProperty,nt=(e,t)=>o4(e,"name",{value:t,configurable:!0}),a4=new Set(Nv.options);function u0(e){if(e!==void 0)return a4.has(e)?e:void 0}nt(u0,"asFlowLogDestination");function Db(e){return{maxAzs:R(e.maxAzs),natGateways:ir(e.natGateways,t=>({count:R(t.count)})),flowLogs:ir(e.flowLogs,t=>({destination:b(t.destination),retentionDays:R(t.retentionDays)})),vpcEndpoints:P(e.vpcEndpoints)?e.vpcEndpoints:void 0}}nt(Db,"parseNetworkConfigFields");function l0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!de.isStringLiteral(n))return null;let r=n.text,o=de.isObjectLiteralExpression(i)?B(i):{},a=Db(o),c={name:r,config:qe({...a}),node:e},u=tt(e);return u&&(c.variableName=u),c}nt(l0,"extractNetworkResource");function Mb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"network")&&de.isObjectLiteralExpression(i.initializer)){for(let r of i.initializer.properties)if(Nr(r,"useExisting")&&de.isStringLiteral(r.initializer))return r.initializer.text}}})}nt(Mb,"findVpcId");function jb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"network")){if(i.initializer.kind===de.SyntaxKind.FalseKeyword)return;if(de.isObjectLiteralExpression(i.initializer)&&!i.initializer.properties.some(r=>Nr(r,"useExisting"))){let r=B(i.initializer);return Db(r)}}}})}nt(jb,"findNetworkConfig");function zb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"backup")){if(i.initializer.kind===de.SyntaxKind.FalseKeyword)return!1;if(de.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.tier);if(o)return{tier:o}}}}})}nt(zb,"findBackupConfig");function Lb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"tunnel")){if(i.initializer.kind===de.SyntaxKind.FalseKeyword)return!1;if(i.initializer.kind===de.SyntaxKind.TrueKeyword)return!0;if(de.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.instanceType);return o?{instanceType:o}:{}}}}})}nt(Lb,"findTunnelConfig");function Ub(e){return Re(e,t=>{if(!de.isCallExpression(t)||!xe(t,"addNetwork"))return null;let n=t.arguments[0];return Le(n,"NetworkFactory")?l0(t,n):null})}nt(Ub,"findNetworkResources");function Fb(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:u0(t.destination),retentionDays:t.retentionDays})}}}nt(Fb,"buildNetworkFields");function Bb(e){if(e)return Fb(e)}nt(Bb,"convertNetworkConfig");function Vb(e){if(e===void 0)return;if(e===!1)return!1;let t=e.tier;if(ct(_t,t))return{tier:t}}nt(Vb,"convertBackupConfig");function Zb(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}nt(Zb,"convertTunnelConfig");function Gb(e){if(!(!e||e.length===0))return e.map(t=>({name:t.name,...Fb(t.config)}))}nt(Gb,"convertAdditionalNetworks");import*as Vi from"typescript";var s4=Object.defineProperty,be=(e,t)=>s4(e,"name",{value:t,configurable:!0}),c4=["Instance","Aurora"],u4=["postgresql","mysql"];function Al(e){if(!P(e))return;let t={...e.memorySize!==void 0&&{memorySize:R(e.memorySize)},...e.timeout!==void 0&&{timeout:R(e.timeout)},...e.ephemeralStorageSize!==void 0&&{ephemeralStorageSize:R(e.ephemeralStorageSize)}};return Object.keys(t).length>0?t:void 0}be(Al,"parseLambdaConfig");function d0(e){return pt(e,"database",t=>({type:U(t.type,c4),databaseName:b(t.databaseName),databaseEngine:U(t.databaseEngine,u4),deletionProtection:j(t.deletionProtection),backupRetention:R(t.backupRetention),port:R(t.port),publiclyAccessible:j(t.publiclyAccessible),allowedIpCidr:b(t.allowedIpCidr),instanceType:b(t.instanceType),allocatedStorage:R(t.allocatedStorage),multiAz:j(t.multiAz),allowVpcAccess:j(t.allowVpcAccess),monitoringInterval:R(t.monitoringInterval),preferredMaintenanceWindow:b(t.preferredMaintenanceWindow),snapshotIdentifier:b(t.snapshotIdentifier),snapshotUsername:b(t.snapshotUsername),readReplica:Mi(t.readReplica),writer:Pe(t.writer,mt()),readers:Mi(t.readers),databaseInsights:Mi(t.databaseInsights),proxy:Mi(t.proxy),credentials:Pe(t.credentials,mt()),encryption:Pe(t.encryption,mt())}))}be(d0,"extractPatternDatabaseConfig");function m0(e){return pt(e,"compute",t=>({server:Pe(t.server,Al),imageOptimisation:Pe(t.imageOptimisation,Al),revalidation:Pe(t.revalidation,Al)}))}be(m0,"extractPatternComputeConfig");function p0(e){let t=be(n=>({versioned:j(n.versioned)}),"parseVersionedConfig");return pt(e,"storage",n=>({assets:Pe(n.assets,t),cache:Pe(n.cache,t),media:Pe(n.media,t)}))}be(p0,"extractPatternStorageConfig");function f0(e){return pt(e,"messaging",t=>({revalidationQueue:Pe(t.revalidationQueue,n=>({visibilityTimeout:R(n.visibilityTimeout),messageRetentionPeriod:R(n.messageRetentionPeriod),maxMessageSize:R(n.maxMessageSize),deadLetterQueue:Cb(n.deadLetterQueue)}))}))}be(f0,"extractPatternMessagingConfig");function g0(e){return pt(e,"cdn",t=>({domainNames:ue(t.domainNames),certificateArn:b(t.certificateArn)}))}be(g0,"extractPatternCdnConfig");function h0(e){return pt(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})}be(h0,"extractPatternEnvironmentConfig");function v0(e,t){let n=b0(e);return{name:t,source:b(e.source),build:pt(e,"build",i=>({command:b(i.command),outputDir:b(i.outputDir)})),routing:U(e.routing,Zo),security:pt(e,"security",i=>({headers:j(i.headers),contentSecurityPolicy:b(i.contentSecurityPolicy)})),domain:b(e.domain),forms:pt(e,"forms",i=>({to:b(i.to),from:b(i.from),corsOrigin:b(i.corsOrigin),maxConcurrency:R(i.maxConcurrency)})),cdn:pt(e,"cdn",i=>({behaviours:Array.isArray(i.behaviours)?i.behaviours:void 0})),...n.length>0&&{unreadableFields:n}}}be(v0,"extractStaticSiteConfig");function Wb(e){return dt(e)&&("__identifier"in e||"__expression"in e||"__call"in e||"__unknown"in e)}be(Wb,"isUnreadableRef");function b0(e){let t=[],n=be((r,o)=>{Wb(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(Wb(r))t.push(o);else if(P(r))for(let c of a)n(r[c],`${o}.${c}`);return t}be(b0,"collectUnreadableStaticSiteFields");function wr(e){return e!==void 0&&e!==""}be(wr,"isReadable");function Il(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.`)}be(Il,"unreadableStaticSiteFields");function y0(e,t){let n=t.to;if(!wr(n))throw Il(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}}}be(y0,"readStaticSiteForms");function S0(e,t){if(e.arguments.length<2)return null;let n=e.arguments[0],i=e.arguments[1];if(!Vi.isStringLiteral(n)||!Vi.isObjectLiteralExpression(i))return null;let r=n.text,o=B(i),a=o.type,c=tt(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:d0(o),compute:m0(o),storage:p0(o),messaging:f0(o),cdn:g0(o),environment:h0(o)},node:e}:a==="staticsite"?{variableName:c,constructId:r,type:"staticsite",config:v0(o,u),node:e}:null:null}be(S0,"extractPatternResource");function Hb(e){return Re(e,t=>{if(!Vi.isCallExpression(t)||!xe(t,"addPattern"))return null;let n=t.arguments[0];return Le(n,"PatternFactory")?S0(n,t):null})}be(Hb,"findPatternResources");function qb(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 Il(r.name,r.unreadableFields);if(!wr(o)||!wr(a)||!wr(c)){let u=[];throw wr(o)||u.push("source"),wr(a)||u.push("build.command"),wr(c)||u.push("build.outputDir"),Il(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:y0(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}}be(qb,"applyPatternConfig");var l4=Object.defineProperty,$l=(e,t)=>l4(e,"name",{value:t,configurable:!0});function _0(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)}}$l(_0,"applyScheduleBackfill");function E0(e,t){Object.keys(t).length>0&&(e.tags={...t}),t[Pa]&&(e.owner=t[Pa])}$l(E0,"applyTagsAndOwner");function x0(e){let t=[];for(let n of e)if(_l(n.moduleSpecifier))if(n.moduleSpecifier==="@fjall/components-infrastructure"||n.moduleSpecifier==="@fjall/infrastructure"){let i=n.namedImports.filter(r=>!ZT.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}$l(x0,"computeAdditionalManagedImports");function _n(e,t,n){let i={appName:t,type:"standard",database:[],s3:[],compute:[]};if(qb(i,e.patternResources),e.vpcId&&(i.vpcId=e.vpcId),i.network=Bb(e.network),i.backup=Vb(e.backup),i.tunnel=Zb(e.tunnel),i.additionalNetworks=Gb(e.networkResources),E0(i,e.tags),i.database=Pb(e.databaseResources),i.dynamodb=El(e.dynamodbResources),i.clickhouse=xl(e.clickhouseResources),i.sqs=wb(e.sqsResources),i.cdn=Ob(e.cdnResource,e.s3Resources,e.computeResources),i.s3=Sb(e.s3Resources),i.compute=hb(e.computeResources,e.databaseResources,e.s3Resources,i),_0(i,e.schedules),i.additionalManagedImports=x0(e.imports),n?.skipValidation)return i;try{return G$.parse(i)}catch(r){if(r instanceof s.ZodError){let o=ca(r);throw new Error(`Invalid infrastructure configuration:
431
- ${o}`)}throw r}}$l(_n,"convertToResourcePlan");var d4=Object.defineProperty,Zi=(e,t)=>d4(e,"name",{value:t,configurable:!0});function kr(e,t){let n=W.createSourceFile("infrastructure.ts",e,W.ScriptTarget.Latest,!0,W.ScriptKind.TS),i=A0(n),{appVariableName:r,appName:o}=$0(n),a=Mb(n),c=jb(n),u=zb(n),l=Lb(n),m=Ub(n),p=Tb(n),{databases:g,dynamodb:v,clickhouse:A}=Rb(p),Y=Nb(n),z=kb(n),Se=[...bb(n),...yb(n)],fr=bl(n),Ne=Sl(n),te=Hb(n),pe=T0(n),$n={sourceFile:n,imports:i,appVariableName:r,appName:o,vpcId:a,network:c,backup:u,tunnel:l,networkResources:m,databaseResources:g,dynamodbResources:v,clickhouseResources:A,sqsResources:Y,cdnResource:z,s3Resources:Se,computeResources:fr,schedules:Ne,patternResources:te,tags:pe};return t?.extractCustomCode&&($n.customCodeBlocks=za(n),$n.classifiedStatements=Ke(n)),$n}Zi(kr,"parseInfrastructure");function A0(e){let t=[];return W.forEachChild(e,n=>{if(W.isImportDeclaration(n)){if(!W.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&&W.isNamedImports(n.importClause.namedBindings)&&(i.namedImports=n.importClause.namedBindings.elements.map(r=>r.name.text))),t.push(i)}}),t}Zi(A0,"extractImports");function I0(e,t){return W.isStringLiteral(t)?t.text:W.isIdentifier(t)?ka(e,t.text)??"":W.isPropertyAccessExpression(t)?Oa(e,t)??"":""}Zi(I0,"resolveAppName");function $0(e){return et(e,t=>{if(W.isVariableStatement(t))for(let n of t.declarationList.declarations){if(!n.initializer||!zt(n.initializer))continue;let i=W.isIdentifier(n.name)?n.name.text:"",r=n.initializer.arguments.length>0?I0(e,n.initializer.arguments[0]):"";return{appVariableName:i,appName:r}}})??{appVariableName:"",appName:""}}Zi($0,"findAppVariable");function T0(e){let t={};function n(i){if(W.isCallExpression(i)&&W.isPropertyAccessExpression(i.expression)&&i.expression.name.text==="addTags"&&W.isIdentifier(i.expression.expression)&&i.arguments.length>0){let r=i.arguments[0];if(W.isObjectLiteralExpression(r)){let o=B(r);for(let[a,c]of Object.entries(o))typeof c=="string"?t[a]=c:Cr(c)&&(t[a]="default-value")}}W.forEachChild(i,n)}return Zi(n,"visit"),n(e),t}Zi(T0,"extractTags");import*as Gi from"typescript";var m4=Object.defineProperty,Ae=(e,t)=>m4(e,"name",{value:t,configurable:!0});function Wi(e,t,n){return e.slice(0,t)+n+e.slice(t)}Ae(Wi,"insertAtPosition");function Tl(e,t){return e.find(n=>n.type===t)}Ae(Tl,"findClassification");function Kb(e,t){return e.filter(n=>n.type===t).pop()}Ae(Kb,"findLastClassification");function Or(e){return Gi.createSourceFile("infrastructure.ts",e,Gi.ScriptTarget.Latest,!0,Gi.ScriptKind.TS)}Ae(Or,"parseSourceFile");function Rl(e,t){return e.endsWith(`
430
+ `)}_n(QT,"getStatementTextWithComments");function e0(e,t){let n=[],i=XT.getLeadingCommentRanges(e,t.getFullStart());if(i)for(let r of i){let o=e.slice(r.pos,r.end);n.push(o)}return n}_n(e0,"extractLeadingComments");function zi(e,t,n,i){let r=i??Ke(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}_n(zi,"findManagedResourcePosition");function xb(e,t,n){let i=n??Ke(e),r=null;for(let o of i)o.type===t&&o.isManaged&&(r=o);return r}_n(xb,"getLastManagedStatementOfType");function Ab(e,t){let n=t??Ke(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}_n(Ab,"getManagedResourcesByType");import*as ar from"typescript";import*as Fa from"typescript";var JU=Object.defineProperty,Ib=(e,t)=>JU(e,"name",{value:t,configurable:!0}),QU=["S","N","B"];function Ua(e){if(!C(e))return;let t=b(e.name),n=U(e.type,QU);if(!(!t||!n))return{name:t,type:n}}Ib(Ua,"parseDynamoDBKey");function $b(e){let t=e.node;if(!Fa.isCallExpression(t))return null;let n=t.arguments[0];if(!Fa.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!Fa.isObjectLiteralExpression(i))return null;let r=B(i),o=Ua(r.partitionKey);if(!o)return null;let a={resourceName:e.resourceName,partitionKey:o,node:e.node};e.variableName&&(a.variableName=e.variableName);let c=Ua(r.sortKey);if(c&&(a.sortKey=c),Array.isArray(r.globalSecondaryIndexes)){let p=r.globalSecondaryIndexes.filter(C).map(g=>{let v=Ua(g.partitionKey);if(!v)return null;let A=b(g.indexName);if(!A)return null;let Y={indexName:A,partitionKey:v},z=Ua(g.sortKey);return z&&(Y.sortKey=z),Y}).filter(g=>g!==null);p.length>0&&(a.globalSecondaryIndexes=p)}let u=b(r.ttlAttribute);u&&(a.ttlAttribute=u);let l=j(r.stream);l!==void 0&&(a.stream=l);let m=ce(r,new Set(["type","databaseName","partitionKey","sortKey","globalSecondaryIndexes","ttlAttribute","stream"]));return m.length>0&&(a.extraProperties=m),a}Ib($b,"extractDynamoDBFields");function El(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})}))}Ib(El,"convertDynamoDBResources");import*as Ba from"typescript";var e4=Object.defineProperty,t0=(e,t)=>e4(e,"name",{value:t,configurable:!0}),t4=new Set(["type","databaseName","instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays"]);function Tb(e){let t=e.node;if(!Ba.isCallExpression(t))return null;let n=t.arguments[0];if(!Ba.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!Ba.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:C(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 m=R(r.backupRetentionDays);m!==void 0&&(o.backupRetentionDays=m);let p=ce(r,t4);return p.length>0&&(o.extraProperties=p),o}t0(Tb,"extractClickHouseFields");function xl(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})}))}t0(xl,"convertClickHouseResources");var r4=Object.defineProperty,Li=(e,t)=>r4(e,"name",{value:t,configurable:!0});function r0(e){let t=b(e.databaseEngine);if(t!==void 0&&ct(xi,t))return t;let n=e.engine;if(xt(n)){let i=String(n.__call);if(i.includes("postgres")||i.includes("auroraPostgres"))return"postgresql";if(i.includes("mysql")||i.includes("auroraMysql"))return"mysql"}}Li(r0,"extractDatabaseEngine");function n0(e){let t=e.engine;if(xt(t))return String(t.__call)}Li(n0,"extractEngineExpression");var n4=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 i0(e,t,n){if(n.arguments.length<2)return null;let i=n.arguments[0],r=n.arguments[1];if(!ar.isStringLiteral(i)&&!ar.isTemplateExpression(i))return null;let o=ar.isStringLiteral(i)?i.text:gl(e,i);if(!ar.isObjectLiteralExpression(r))return null;let a=B(r),c={resourceName:o,type:b(a.type)??"",databaseName:b(a.databaseName)??"",databaseEngine:r0(a),engineExpression:n0(a),port:R(a.port),deletionProtection:j(a.deletionProtection),instanceType:b(a.instanceType),multiAz:j(a.multiAz),publiclyAccessible:j(a.publiclyAccessible),enableSecretRotation:j(a.enableSecretRotation),encryption:Ce(a.encryption,mt()),databaseInsights:ir(a.databaseInsights,mt()),proxy:ir(a.proxy,mt()),readReplica:ir(a.readReplica,mt()),credentials:Ce(a.credentials,mt()),writer:Ce(a.writer,mt()),readers:ir(a.readers,mt()),backupRetention:R(a.backupRetention),preferredMaintenanceWindow:b(a.preferredMaintenanceWindow),primaryRegion:b(a.primaryRegion),secondaryRegions:ue(a.secondaryRegions),globalClusterIdentifier:b(a.globalClusterIdentifier),enableGlobalWriteForwarding:j(a.enableGlobalWriteForwarding),allocatedStorage:R(a.allocatedStorage),monitoringInterval:R(a.monitoringInterval),snapshotIdentifier:b(a.snapshotIdentifier),snapshotUsername:b(a.snapshotUsername),node:t},u=tt(t);u&&(c.variableName=u);let l=ce(a,n4);return l.length>0&&(c.extraProperties=l),c}Li(i0,"extractDatabaseResource");function Rb(e){return Re(e,t=>{if(!ar.isCallExpression(t)||!xe(t,"addDatabase"))return null;let n=t.arguments[0];return Le(n,"DatabaseFactory")?i0(e,t,n):null})}Li(Rb,"findDatabaseResources");function Cb(e){let t=[],n=[],i=[];for(let r of e)if(r.type==="DynamoDB"){let o=$b(r);o&&n.push(o)}else if(r.type==="ClickHouse"){let o=Tb(r);o&&i.push(o)}else t.push(r);return{databases:t,dynamodb:n,clickhouse:i}}Li(Cb,"splitDatabaseResources");var i4=["Instance","Aurora","GlobalAurora"];function Pb(e){return e.filter(t=>t.type!=="DynamoDB").map(t=>({name:t.resourceName,type:ct(i4,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})}))}Li(Pb,"convertDatabaseResources");import*as Fi from"typescript";var o4=Object.defineProperty,Ui=(e,t)=>o4(e,"name",{value:t,configurable:!0});function o0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Fi.isStringLiteral(n)||!Fi.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:n.text,queueType:b(r.queueType)??"standard",visibilityTimeout:R(r.visibilityTimeout),retentionPeriod:R(r.messageRetentionPeriod),contentBasedDeduplication:j(r.contentBasedDeduplication),removalPolicy:b(r.removalPolicy),node:e},a=tt(e);a&&(o.variableName=a);let c=ce(r,new Set(["type","queueType","visibilityTimeout","messageRetentionPeriod","contentBasedDeduplication","removalPolicy"]));return c.length>0&&(o.extraProperties=c),o}Ui(o0,"extractSQSResource");function Nb(e){if(e!=null){if(e===!1)return!1;if(C(e))return qe({enabled:j(e.enabled),maxReceiveCount:R(e.maxReceiveCount)})}}Ui(Nb,"parseDeadLetterQueueConfig");function wb(e){return Re(e,t=>{if(!Fi.isCallExpression(t)||!xe(t,"addMessaging"))return null;let n=t.arguments[0];return Le(n,"MessagingFactory")?o0(t,n):null})}Ui(wb,"findSQSResources");function kb(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:s0(t.removalPolicy),variableName:t.variableName,extraProperties:t.extraProperties})}))}Ui(kb,"convertSQSResources");var a4=new Set(Ov.options);function a0(e){return a4.has(e)}Ui(a0,"isSqsRemovalPolicy");function s0(e){return e!==void 0&&a0(e)?e:void 0}Ui(s0,"toSqsRemovalPolicy");import*as Bi from"typescript";var s4=Object.defineProperty,Va=(e,t)=>s4(e,"name",{value:t,configurable:!0});function u0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];return!Bi.isStringLiteral(t)||!Bi.isObjectLiteralExpression(n)?null:{resourceName:t.text,config:B(n),node:e}}Va(u0,"extractCDNResource");function l0(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}Va(l0,"resolveOriginIdentifier");var c0=["CACHING_OPTIMIZED","CACHING_DISABLED"];function Ob(e){return et(e,t=>{if(!Bi.isCallExpression(t)||!xe(t,"addCdn"))return;let n=t.arguments[0];if(Le(n,"CdnFactory"))return u0(n)??void 0})}Va(Ob,"findCDNResource");function Db(e,t,n){if(!e)return;let i=e,r=i.config,o=Va(p=>nr(p)?l0(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(C).map(g=>({pathPattern:b(g.pathPattern)??"",originRef:o(g.origin),...U(g.cachePolicy,c0)!==void 0&&{cachePolicy:U(g.cachePolicy,c0)}}));p.length>0&&(c.behaviours=p)}let u=b(r.customDomain);if(u)c.customDomain=u;else{let p=ue(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(C(r.accessGate)){let p=r.accessGate,g=b(p.type),v=b(p.username),A=b(p.password);g==="basic-auth"&&v&&A&&(c.accessGate={type:"basic-auth",username:v,password:A})}}let m=ce(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return m.length>0&&(c.extraProperties=m),c}Va(Db,"convertCDNResource");import*as de from"typescript";var c4=Object.defineProperty,nt=(e,t)=>c4(e,"name",{value:t,configurable:!0}),u4=new Set(wv.options);function d0(e){if(e!==void 0)return u4.has(e)?e:void 0}nt(d0,"asFlowLogDestination");function Mb(e){return{maxAzs:R(e.maxAzs),natGateways:ir(e.natGateways,t=>({count:R(t.count)})),flowLogs:ir(e.flowLogs,t=>({destination:b(t.destination),retentionDays:R(t.retentionDays)})),vpcEndpoints:C(e.vpcEndpoints)?e.vpcEndpoints:void 0}}nt(Mb,"parseNetworkConfigFields");function m0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!de.isStringLiteral(n))return null;let r=n.text,o=de.isObjectLiteralExpression(i)?B(i):{},a=Mb(o),c={name:r,config:qe({...a}),node:e},u=tt(e);return u&&(c.variableName=u),c}nt(m0,"extractNetworkResource");function jb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"network")&&de.isObjectLiteralExpression(i.initializer)){for(let r of i.initializer.properties)if(Nr(r,"useExisting")&&de.isStringLiteral(r.initializer))return r.initializer.text}}})}nt(jb,"findVpcId");function zb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"network")){if(i.initializer.kind===de.SyntaxKind.FalseKeyword)return;if(de.isObjectLiteralExpression(i.initializer)&&!i.initializer.properties.some(r=>Nr(r,"useExisting"))){let r=B(i.initializer);return Mb(r)}}}})}nt(zb,"findNetworkConfig");function Lb(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"backup")){if(i.initializer.kind===de.SyntaxKind.FalseKeyword)return!1;if(de.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.tier);if(o)return{tier:o}}}}})}nt(Lb,"findBackupConfig");function Ub(e){return et(e,t=>{if(!zt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(de.isObjectLiteralExpression(n)){for(let i of n.properties)if(Nr(i,"tunnel")){if(i.initializer.kind===de.SyntaxKind.FalseKeyword)return!1;if(i.initializer.kind===de.SyntaxKind.TrueKeyword)return!0;if(de.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.instanceType);return o?{instanceType:o}:{}}}}})}nt(Ub,"findTunnelConfig");function Fb(e){return Re(e,t=>{if(!de.isCallExpression(t)||!xe(t,"addNetwork"))return null;let n=t.arguments[0];return Le(n,"NetworkFactory")?m0(t,n):null})}nt(Fb,"findNetworkResources");function Bb(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:d0(t.destination),retentionDays:t.retentionDays})}}}nt(Bb,"buildNetworkFields");function Vb(e){if(e)return Bb(e)}nt(Vb,"convertNetworkConfig");function Zb(e){if(e===void 0)return;if(e===!1)return!1;let t=e.tier;if(ct(_t,t))return{tier:t}}nt(Zb,"convertBackupConfig");function Gb(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}nt(Gb,"convertTunnelConfig");function Wb(e){if(!(!e||e.length===0))return e.map(t=>({name:t.name,...Bb(t.config)}))}nt(Wb,"convertAdditionalNetworks");import*as Vi from"typescript";var l4=Object.defineProperty,be=(e,t)=>l4(e,"name",{value:t,configurable:!0}),d4=["Instance","Aurora"],m4=["postgresql","mysql"];function Al(e){if(!C(e))return;let t={...e.memorySize!==void 0&&{memorySize:R(e.memorySize)},...e.timeout!==void 0&&{timeout:R(e.timeout)},...e.ephemeralStorageSize!==void 0&&{ephemeralStorageSize:R(e.ephemeralStorageSize)}};return Object.keys(t).length>0?t:void 0}be(Al,"parseLambdaConfig");function p0(e){return pt(e,"database",t=>({type:U(t.type,d4),databaseName:b(t.databaseName),databaseEngine:U(t.databaseEngine,m4),deletionProtection:j(t.deletionProtection),backupRetention:R(t.backupRetention),port:R(t.port),publiclyAccessible:j(t.publiclyAccessible),allowedIpCidr:b(t.allowedIpCidr),instanceType:b(t.instanceType),allocatedStorage:R(t.allocatedStorage),multiAz:j(t.multiAz),allowVpcAccess:j(t.allowVpcAccess),monitoringInterval:R(t.monitoringInterval),preferredMaintenanceWindow:b(t.preferredMaintenanceWindow),snapshotIdentifier:b(t.snapshotIdentifier),snapshotUsername:b(t.snapshotUsername),readReplica:Mi(t.readReplica),writer:Ce(t.writer,mt()),readers:Mi(t.readers),databaseInsights:Mi(t.databaseInsights),proxy:Mi(t.proxy),credentials:Ce(t.credentials,mt()),encryption:Ce(t.encryption,mt())}))}be(p0,"extractPatternDatabaseConfig");function f0(e){return pt(e,"compute",t=>({server:Ce(t.server,Al),imageOptimisation:Ce(t.imageOptimisation,Al),revalidation:Ce(t.revalidation,Al)}))}be(f0,"extractPatternComputeConfig");function g0(e){let t=be(n=>({versioned:j(n.versioned)}),"parseVersionedConfig");return pt(e,"storage",n=>({assets:Ce(n.assets,t),cache:Ce(n.cache,t),media:Ce(n.media,t)}))}be(g0,"extractPatternStorageConfig");function h0(e){return pt(e,"messaging",t=>({revalidationQueue:Ce(t.revalidationQueue,n=>({visibilityTimeout:R(n.visibilityTimeout),messageRetentionPeriod:R(n.messageRetentionPeriod),maxMessageSize:R(n.maxMessageSize),deadLetterQueue:Nb(n.deadLetterQueue)}))}))}be(h0,"extractPatternMessagingConfig");function v0(e){return pt(e,"cdn",t=>({domainNames:ue(t.domainNames),certificateArn:b(t.certificateArn)}))}be(v0,"extractPatternCdnConfig");function b0(e){return pt(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})}be(b0,"extractPatternEnvironmentConfig");function y0(e,t){let n=S0(e);return{name:t,source:b(e.source),build:pt(e,"build",i=>({command:b(i.command),outputDir:b(i.outputDir)})),routing:U(e.routing,Go),security:pt(e,"security",i=>({headers:j(i.headers),contentSecurityPolicy:b(i.contentSecurityPolicy)})),domain:b(e.domain),forms:pt(e,"forms",i=>({to:b(i.to),from:b(i.from),corsOrigin:b(i.corsOrigin),maxConcurrency:R(i.maxConcurrency)})),cdn:pt(e,"cdn",i=>({behaviours:Array.isArray(i.behaviours)?i.behaviours:void 0})),...n.length>0&&{unreadableFields:n}}}be(y0,"extractStaticSiteConfig");function Hb(e){return dt(e)&&("__identifier"in e||"__expression"in e||"__call"in e||"__unknown"in e)}be(Hb,"isUnreadableRef");function S0(e){let t=[],n=be((r,o)=>{Hb(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(Hb(r))t.push(o);else if(C(r))for(let c of a)n(r[c],`${o}.${c}`);return t}be(S0,"collectUnreadableStaticSiteFields");function wr(e){return e!==void 0&&e!==""}be(wr,"isReadable");function Il(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.`)}be(Il,"unreadableStaticSiteFields");function _0(e,t){let n=t.to;if(!wr(n))throw Il(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}}}be(_0,"readStaticSiteForms");function E0(e,t){if(e.arguments.length<2)return null;let n=e.arguments[0],i=e.arguments[1];if(!Vi.isStringLiteral(n)||!Vi.isObjectLiteralExpression(i))return null;let r=n.text,o=B(i),a=o.type,c=tt(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:p0(o),compute:f0(o),storage:g0(o),messaging:h0(o),cdn:v0(o),environment:b0(o)},node:e}:a==="staticsite"?{variableName:c,constructId:r,type:"staticsite",config:y0(o,u),node:e}:null:null}be(E0,"extractPatternResource");function qb(e){return Re(e,t=>{if(!Vi.isCallExpression(t)||!xe(t,"addPattern"))return null;let n=t.arguments[0];return Le(n,"PatternFactory")?E0(n,t):null})}be(qb,"findPatternResources");function Kb(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 Il(r.name,r.unreadableFields);if(!wr(o)||!wr(a)||!wr(c)){let u=[];throw wr(o)||u.push("source"),wr(a)||u.push("build.command"),wr(c)||u.push("build.outputDir"),Il(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:_0(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}}be(Kb,"applyPatternConfig");var p4=Object.defineProperty,$l=(e,t)=>p4(e,"name",{value:t,configurable:!0});function x0(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)}}$l(x0,"applyScheduleBackfill");function A0(e,t){Object.keys(t).length>0&&(e.tags={...t}),t[Pa]&&(e.owner=t[Pa])}$l(A0,"applyTagsAndOwner");function I0(e){let t=[];for(let n of e)if(_l(n.moduleSpecifier))if(n.moduleSpecifier==="@fjall/components-infrastructure"||n.moduleSpecifier==="@fjall/infrastructure"){let i=n.namedImports.filter(r=>!WT.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}$l(I0,"computeAdditionalManagedImports");function En(e,t,n){let i={appName:t,type:"standard",database:[],s3:[],compute:[]};if(Kb(i,e.patternResources),e.vpcId&&(i.vpcId=e.vpcId),i.network=Vb(e.network),i.backup=Zb(e.backup),i.tunnel=Gb(e.tunnel),i.additionalNetworks=Wb(e.networkResources),A0(i,e.tags),i.database=Pb(e.databaseResources),i.dynamodb=El(e.dynamodbResources),i.clickhouse=xl(e.clickhouseResources),i.sqs=kb(e.sqsResources),i.cdn=Db(e.cdnResource,e.s3Resources,e.computeResources),i.s3=_b(e.s3Resources),i.compute=vb(e.computeResources,e.databaseResources,e.s3Resources,i),x0(i,e.schedules),i.additionalManagedImports=I0(e.imports),n?.skipValidation)return i;try{return H$.parse(i)}catch(r){if(r instanceof s.ZodError){let o=ua(r);throw new Error(`Invalid infrastructure configuration:
431
+ ${o}`)}throw r}}$l(En,"convertToResourcePlan");var f4=Object.defineProperty,Zi=(e,t)=>f4(e,"name",{value:t,configurable:!0});function kr(e,t){let n=W.createSourceFile("infrastructure.ts",e,W.ScriptTarget.Latest,!0,W.ScriptKind.TS),i=$0(n),{appVariableName:r,appName:o}=R0(n),a=jb(n),c=zb(n),u=Lb(n),l=Ub(n),m=Fb(n),p=Rb(n),{databases:g,dynamodb:v,clickhouse:A}=Cb(p),Y=wb(n),z=Ob(n),Se=[...yb(n),...Sb(n)],fr=bl(n),Ne=Sl(n),te=qb(n),pe=C0(n),Tn={sourceFile:n,imports:i,appVariableName:r,appName:o,vpcId:a,network:c,backup:u,tunnel:l,networkResources:m,databaseResources:g,dynamodbResources:v,clickhouseResources:A,sqsResources:Y,cdnResource:z,s3Resources:Se,computeResources:fr,schedules:Ne,patternResources:te,tags:pe};return t?.extractCustomCode&&(Tn.customCodeBlocks=La(n),Tn.classifiedStatements=Ke(n)),Tn}Zi(kr,"parseInfrastructure");function $0(e){let t=[];return W.forEachChild(e,n=>{if(W.isImportDeclaration(n)){if(!W.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&&W.isNamedImports(n.importClause.namedBindings)&&(i.namedImports=n.importClause.namedBindings.elements.map(r=>r.name.text))),t.push(i)}}),t}Zi($0,"extractImports");function T0(e,t){return W.isStringLiteral(t)?t.text:W.isIdentifier(t)?Oa(e,t.text)??"":W.isPropertyAccessExpression(t)?Da(e,t)??"":""}Zi(T0,"resolveAppName");function R0(e){return et(e,t=>{if(W.isVariableStatement(t))for(let n of t.declarationList.declarations){if(!n.initializer||!zt(n.initializer))continue;let i=W.isIdentifier(n.name)?n.name.text:"",r=n.initializer.arguments.length>0?T0(e,n.initializer.arguments[0]):"";return{appVariableName:i,appName:r}}})??{appVariableName:"",appName:""}}Zi(R0,"findAppVariable");function C0(e){let t={};function n(i){if(W.isCallExpression(i)&&W.isPropertyAccessExpression(i.expression)&&i.expression.name.text==="addTags"&&W.isIdentifier(i.expression.expression)&&i.arguments.length>0){let r=i.arguments[0];if(W.isObjectLiteralExpression(r)){let o=B(r);for(let[a,c]of Object.entries(o))typeof c=="string"?t[a]=c:Pr(c)&&(t[a]="default-value")}}W.forEachChild(i,n)}return Zi(n,"visit"),n(e),t}Zi(C0,"extractTags");import*as Gi from"typescript";var g4=Object.defineProperty,Ae=(e,t)=>g4(e,"name",{value:t,configurable:!0});function Wi(e,t,n){return e.slice(0,t)+n+e.slice(t)}Ae(Wi,"insertAtPosition");function Tl(e,t){return e.find(n=>n.type===t)}Ae(Tl,"findClassification");function Yb(e,t){return e.filter(n=>n.type===t).pop()}Ae(Yb,"findLastClassification");function Or(e){return Gi.createSourceFile("infrastructure.ts",e,Gi.ScriptTarget.Latest,!0,Gi.ScriptKind.TS)}Ae(Or,"parseSourceFile");function Rl(e,t){return e.endsWith(`
432
432
 
433
433
  `)||t.startsWith(`
434
434
  `)?"":e.endsWith(`
435
435
  `)?`
436
436
  `:`
437
437
 
438
- `}Ae(Rl,"formatLeadingNewlines");function Pl(e,t){return e.slice(Math.max(0,t-2),t)}Ae(Pl,"getContextBeforePosition");function Dr(e,t){return t?`${e}:${t}`:e}Ae(Dr,"formatResourceId");function Lt(e,t){return{content:t,success:!1,error:Rt(e)}}Ae(Lt,"createErrorResult");function Yb(e,t,n,i){return zi(e,n,i)||Lt(new Error(`Resource not found: ${Dr(n,i)}`),t)}Ae(Yb,"findResourceOrFail");function Xb(e){return"success"in e&&!e.success}Ae(Xb,"isFailureResult");function R0(e,t){let{resourceType:n,code:i,afterResource:r}=t;try{let o=Or(e),a;if(r){let u=zi(o,r.type,r.name);if(!u)return Lt(new Error(`Insertion target not found: ${Dr(r.type,r.name)}`),e);a=u.endPos}else a=P0(o,n);let c=C0(e,a,i);return{content:Wi(e,a,c),success:!0}}catch(o){return Lt(o,e)}}Ae(R0,"addResourceSurgically");function P0(e,t){let n=Ke(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()}Ae(P0,"findInsertionPositionByType");function C0(e,t,n){let i=Pl(e,t),r=e.slice(t,Math.min(e.length,t+2)),o=Rl(i,n),a=r.startsWith(`
438
+ `}Ae(Rl,"formatLeadingNewlines");function Cl(e,t){return e.slice(Math.max(0,t-2),t)}Ae(Cl,"getContextBeforePosition");function Dr(e,t){return t?`${e}:${t}`:e}Ae(Dr,"formatResourceId");function Lt(e,t){return{content:t,success:!1,error:Rt(e)}}Ae(Lt,"createErrorResult");function Xb(e,t,n,i){return zi(e,n,i)||Lt(new Error(`Resource not found: ${Dr(n,i)}`),t)}Ae(Xb,"findResourceOrFail");function Jb(e){return"success"in e&&!e.success}Ae(Jb,"isFailureResult");function P0(e,t){let{resourceType:n,code:i,afterResource:r}=t;try{let o=Or(e),a;if(r){let u=zi(o,r.type,r.name);if(!u)return Lt(new Error(`Insertion target not found: ${Dr(r.type,r.name)}`),e);a=u.endPos}else a=N0(o,n);let c=w0(e,a,i);return{content:Wi(e,a,c),success:!0}}catch(o){return Lt(o,e)}}Ae(P0,"addResourceSurgically");function N0(e,t){let n=Ke(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()}Ae(N0,"findInsertionPositionByType");function w0(e,t,n){let i=Cl(e,t),r=e.slice(t,Math.min(e.length,t+2)),o=Rl(i,n),a=r.startsWith(`
439
439
  `)?"":`
440
- `;return o+n+a}Ae(C0,"formatCodeForInsertion");function N0(e,t){let{resourceType:n,resourceName:i,newCode:r}=t;try{let o=Or(e),a=Yb(o,e,n,i);if(Xb(a))return a;let c=a,u=c.node.getFullStart(),l=c.endPos,m=e.slice(u,c.node.getStart()),p=w0(m);return{content:e.slice(0,u)+p+r+e.slice(l),success:!0}}catch(o){return Lt(o,e)}}Ae(N0,"updateResourceSurgically");function w0(e){let t=e.match(/^[\s]*[\n\r]+[\s]*/);return t?t[0]:""}Ae(w0,"extractLeadingWhitespace");function k0(e,t,n,i){let r=e,o=0;for(let a of t){let c=`// [ORPHANED: was after ${Dr(n,i)}]
441
- `,u=a.sourceText.trim(),l=r.indexOf(u,o);l!==-1&&(r=Wi(r,l,c),o=l+c.length+u.length)}return r}Ae(k0,"insertOrphanMarkers");function O0(e,t){let{resourceType:n,resourceName:i,orphanHandling:r}=t,o=[];try{let a=Or(e),c=Yb(a,e,n,i);if(Xb(c))return c;let u=c,l=(kr(e,{extractCustomCode:!0}).customCodeBlocks??[]).filter(A=>A.position==="after-resource"&&A.afterManagedResource?.type===n&&A.afterManagedResource?.name===i);if(l.length>0)if(r==="preserve-with-warning")o.push(`Custom code after ${Dr(n,i)} will be orphaned. Added // [ORPHANED] marker comment.`);else return Lt(new Error(`Orphan handling "${r}" is not yet implemented`),e);let m=u.node.getFullStart(),p=u.endPos,g=e[p]===`
442
- `?p+1:p,v=e.slice(0,m)+e.slice(g);return l.length>0&&r==="preserve-with-warning"&&(v=k0(v,l,n,i)),{content:v,success:!0,warnings:o.length>0?o:void 0}}catch(a){return Lt(a,e)}}Ae(O0,"removeResourceSurgically");import*as En from"typescript";var p4=Object.defineProperty,gt=(e,t)=>p4(e,"name",{value:t,configurable:!0});function z0(e,t){try{let n=Or(e),i=new Set;for(let c of n.statements)En.isImportDeclaration(c)&&i.add(c.getText(n).trim());let r=[];for(let c of t){let u=c.trim();[...i].some(l=>U0(l,u))||r.push(u)}if(r.length===0)return{content:e,success:!0};let o=n.statements.filter(En.isImportDeclaration).at(-1)?.getEnd()??0,a=`
440
+ `;return o+n+a}Ae(w0,"formatCodeForInsertion");function k0(e,t){let{resourceType:n,resourceName:i,newCode:r}=t;try{let o=Or(e),a=Xb(o,e,n,i);if(Jb(a))return a;let c=a,u=c.node.getFullStart(),l=c.endPos,m=e.slice(u,c.node.getStart()),p=O0(m);return{content:e.slice(0,u)+p+r+e.slice(l),success:!0}}catch(o){return Lt(o,e)}}Ae(k0,"updateResourceSurgically");function O0(e){let t=e.match(/^[\s]*[\n\r]+[\s]*/);return t?t[0]:""}Ae(O0,"extractLeadingWhitespace");function D0(e,t,n,i){let r=e,o=0;for(let a of t){let c=`// [ORPHANED: was after ${Dr(n,i)}]
441
+ `,u=a.sourceText.trim(),l=r.indexOf(u,o);l!==-1&&(r=Wi(r,l,c),o=l+c.length+u.length)}return r}Ae(D0,"insertOrphanMarkers");function M0(e,t){let{resourceType:n,resourceName:i,orphanHandling:r}=t,o=[];try{let a=Or(e),c=Xb(a,e,n,i);if(Jb(c))return c;let u=c,l=(kr(e,{extractCustomCode:!0}).customCodeBlocks??[]).filter(A=>A.position==="after-resource"&&A.afterManagedResource?.type===n&&A.afterManagedResource?.name===i);if(l.length>0)if(r==="preserve-with-warning")o.push(`Custom code after ${Dr(n,i)} will be orphaned. Added // [ORPHANED] marker comment.`);else return Lt(new Error(`Orphan handling "${r}" is not yet implemented`),e);let m=u.node.getFullStart(),p=u.endPos,g=e[p]===`
442
+ `?p+1:p,v=e.slice(0,m)+e.slice(g);return l.length>0&&r==="preserve-with-warning"&&(v=D0(v,l,n,i)),{content:v,success:!0,warnings:o.length>0?o:void 0}}catch(a){return Lt(a,e)}}Ae(M0,"removeResourceSurgically");import*as xn from"typescript";var h4=Object.defineProperty,gt=(e,t)=>h4(e,"name",{value:t,configurable:!0});function U0(e,t){try{let n=Or(e),i=new Set;for(let c of n.statements)xn.isImportDeclaration(c)&&i.add(c.getText(n).trim());let r=[];for(let c of t){let u=c.trim();[...i].some(l=>B0(l,u))||r.push(u)}if(r.length===0)return{content:e,success:!0};let o=n.statements.filter(xn.isImportDeclaration).at(-1)?.getEnd()??0,a=`
443
443
  `+r.join(`
444
- `);return{content:Wi(e,o,a),success:!0}}catch(n){return Lt(n,e)}}gt(z0,"ensureImports");function Jb(e){return new Set(e.split(",").map(t=>t.trim()).filter(Boolean))}gt(Jb,"parseNamedImports");function L0(e,t){let n=Jb(e),i=Jb(t);for(let r of i)if(!n.has(r))return!1;return!0}gt(L0,"existingImportCoversRequired");function U0(e,t){let n=e.match(D0),i=t.match(D0);if(!n||!i||n[1]!==i[1])return!1;let r=e.match(M0),o=t.match(M0);return r&&o?L0(r[1],o[1]):!!r==!!o}gt(U0,"importsAreEquivalent");var D0=/from\s+["']([^"']+)["']/,M0=/\{([^}]+)\}/,j0={"before-imports":0,"after-imports":1,"after-app-init":2,"after-tags":3,"after-resource":4,"end-of-file":5};function F0(e){return[...e].sort((t,n)=>{let i=j0[n.position]-j0[t.position];return i!==0?i:(n.originalLine??0)-(t.originalLine??0)})}gt(F0,"sortCustomBlocksForInsertion");function B0(e,t,n,i){if(n!==null){let o=G0(e,n,t);return Wi(e,n,o)}let r=t.afterManagedResource?`// [ORPHANED: was after ${Dr(t.afterManagedResource.type,t.afterManagedResource.name)}]
444
+ `);return{content:Wi(e,o,a),success:!0}}catch(n){return Lt(n,e)}}gt(U0,"ensureImports");function Qb(e){return new Set(e.split(",").map(t=>t.trim()).filter(Boolean))}gt(Qb,"parseNamedImports");function F0(e,t){let n=Qb(e),i=Qb(t);for(let r of i)if(!n.has(r))return!1;return!0}gt(F0,"existingImportCoversRequired");function B0(e,t){let n=e.match(j0),i=t.match(j0);if(!n||!i||n[1]!==i[1])return!1;let r=e.match(z0),o=t.match(z0);return r&&o?F0(r[1],o[1]):!!r==!!o}gt(B0,"importsAreEquivalent");var j0=/from\s+["']([^"']+)["']/,z0=/\{([^}]+)\}/,L0={"before-imports":0,"after-imports":1,"after-app-init":2,"after-tags":3,"after-resource":4,"end-of-file":5};function V0(e){return[...e].sort((t,n)=>{let i=L0[n.position]-L0[t.position];return i!==0?i:(n.originalLine??0)-(t.originalLine??0)})}gt(V0,"sortCustomBlocksForInsertion");function Z0(e,t,n,i){if(n!==null){let o=H0(e,n,t);return Wi(e,n,o)}let r=t.afterManagedResource?`// [ORPHANED: was after ${Dr(t.afterManagedResource.type,t.afterManagedResource.name)}]
445
445
  `:`// [ORPHANED]
446
446
  `;return i.push(`Custom code from line ${t.originalLine} could not be positioned. Added at end of file.`),e+`
447
- `+r+t.sourceText}gt(B0,"insertOrOrphanBlock");function Cl(e,t,n){if(!t||t.length===0)return{content:e,success:!0};try{let i=Or(e),r=Ke(i),o=[],a=F0(t),c=e;for(let u of a){let l=Z0(i,r,u,n,o);c=B0(c,u,l,o)}return{content:c,success:!0,warnings:o.length>0?o:void 0}}catch(i){return Lt(i,e)}}gt(Cl,"injectCustomCodeBlocks");function V0(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 ${Dr(t.afterManagedResource.type,t.afterManagedResource.name)} not found. Custom code may be orphaned.`),null)}gt(V0,"findAfterResourcePosition");function Z0(e,t,n,i,r){switch(n.position){case"before-imports":return 0;case"after-imports":return Kb(t,"import")?.endPos??0;case"after-app-init":return Tl(t,"app-init")?.endPos??null;case"after-tags":return Tl(t,"tags")?.endPos??null;case"after-resource":return V0(t,n,i,r);case"end-of-file":return e.getEnd();default:return null}}gt(Z0,"findCustomCodeInsertPosition");function G0(e,t,n){let i=Pl(e,t),r=n.sourceText;return r=Rl(i,r)+r,r.endsWith(`
447
+ `+r+t.sourceText}gt(Z0,"insertOrOrphanBlock");function Pl(e,t,n){if(!t||t.length===0)return{content:e,success:!0};try{let i=Or(e),r=Ke(i),o=[],a=V0(t),c=e;for(let u of a){let l=W0(i,r,u,n,o);c=Z0(c,u,l,o)}return{content:c,success:!0,warnings:o.length>0?o:void 0}}catch(i){return Lt(i,e)}}gt(Pl,"injectCustomCodeBlocks");function G0(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 ${Dr(t.afterManagedResource.type,t.afterManagedResource.name)} not found. Custom code may be orphaned.`),null)}gt(G0,"findAfterResourcePosition");function W0(e,t,n,i,r){switch(n.position){case"before-imports":return 0;case"after-imports":return Yb(t,"import")?.endPos??0;case"after-app-init":return Tl(t,"app-init")?.endPos??null;case"after-tags":return Tl(t,"tags")?.endPos??null;case"after-resource":return G0(t,n,i,r);case"end-of-file":return e.getEnd();default:return null}}gt(W0,"findCustomCodeInsertPosition");function H0(e,t,n){let i=Cl(e,t),r=n.sourceText;return r=Rl(i,r)+r,r.endsWith(`
448
448
  `)||(r+=`
449
- `),r}gt(G0,"formatCustomCodeForInsertion");function W0(e){try{let t=function(r){r.kind===En.SyntaxKind.Unknown&&i.push("Unknown node found in AST - possible parse error"),En.forEachChild(r,t)};gt(t,"visit");let n=Or(e),i=[];return t(n),i.length>0?{valid:!1,errors:i}:{valid:!0}}catch(t){return{valid:!1,errors:[Rt(t)]}}}gt(W0,"validateModifiedFile");import*as Ie from"typescript";var Va=s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),f4=s.object({name:s.string(),type:Va,ttl:s.number().optional(),value:s.string(),priority:s.number().optional(),weight:s.number().optional(),port:s.number().optional()}).strict(),g4=s.object({subdomain:s.string(),targetAccount:s.string(),auto:s.boolean()}).strict(),h4=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string())}).strict(),oY=s.object({origin:s.string(),ttl:s.number(),records:s.array(f4),delegations:s.array(g4),certificates:s.array(h4)}).strict(),Ut=Object.freeze({ORIGIN:"$ORIGIN",TTL:"$TTL",FJALL_DELEGATE:"$FJALL-DELEGATE",FJALL_CERT:"$FJALL-CERT"}),Nl="ALIAS ";var H0=s.discriminatedUnion("kind",[s.object({kind:s.literal("ecs"),appName:s.string()}).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()]),q0=H0.options.map(e=>e.shape.kind.value),Qb=s.enum(["A","AAAA"]),ey=s.enum(["route53","external-delegated","external-records"]),K0=s.enum(["zone","full"]),v4=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(),b4=s.object({kind:s.literal("alias"),type:Qb,name:s.string(),target:H0}).strict(),y4=s.discriminatedUnion("kind",[v4,b4]),S4=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string()).optional(),transparencyLogging:s.boolean().optional(),cloudFront:s.boolean().optional()}).strict(),_4=s.object({subdomain:s.string(),toAccount:s.string(),auto:s.boolean().optional()}).strict(),cY=s.object({zoneName:s.string(),registrar:ey,hostedZoneId:s.string().optional(),delegatedSubdomain:s.string().optional(),adoptedNameServers:s.array(s.string().min(1)).min(1).optional(),records:s.array(y4),certificates:s.array(S4),delegations:s.array(_4)}).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 E4=Object.defineProperty,me=(e,t)=>E4(e,"name",{value:t,configurable:!0}),X0=ey.options,Y0=K0.options,x4=Va.options,A4=Qb.options;function J0(e){let t=[],n=me(r=>{if(Ie.isNewExpression(r)&&Q0(r.expression)){let o=eR(r);o!==void 0&&t.push(o)}Ie.forEachChild(r,n)},"visit");if(n(e),t.length===0)return C(void 0);if(t.length>1)return $(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${t.length}`));let i=t[0];return i?C(i):C(void 0)}me(J0,"findDomainConstructCall");function Q0(e){return Ie.isIdentifier(e)&&e.text==="Domain"}me(Q0,"isDomainIdentifier");function eR(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||!Ie.isObjectLiteralExpression(r))return;let o=tR(e);if(o===void 0)return;let a=rR(e),c=Ie.isStringLiteral(i)?i.text:void 0;return{callExpression:e,containingStatement:o,propsObjectLiteral:r,domainVarId:a,scopeArgumentText:n.getText(),constructIdLiteral:c}}me(eR,"buildMatch");function tR(e){let t=e;for(;t!==void 0;){if(Ie.isExpressionStatement(t)||Ie.isVariableStatement(t))return t;t=t.parent}}me(tR,"findContainingTopLevelStatement");function rR(e){let t=e.parent;for(;t!==void 0;){if(Ie.isVariableDeclaration(t)&&Ie.isIdentifier(t.name)&&t.initializer===e)return t.name.text;t=t.parent}}me(rR,"extractDomainVarId");function nR(e){switch(e.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${X0.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}`}}me(nR,"errorMessage");var I4="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 iR(e){let t=B(e),n=U(t.registrar,X0);if(n===void 0){let c=t.registrar;if(c===void 0)return $({kind:"registrar_required"});let u=typeof c=="string"?c:kl(c);return $({kind:"registrar_unsupported",value:u})}let i=b(t.zoneName);if(i===void 0)return $({kind:"missing_field",field:"zoneName"});let r=aR(t.records);if(!r.success)return r;let o=dR(t.certificates);if(!o.success)return o;if(t.delegations!==void 0)return $({kind:"removed_field",field:"delegations",cure:I4});let a={zoneName:i,description:b(t.description),costAllocationEnvironment:b(t.costAllocationEnvironment),tags:mR(t.tags),records:r.data,certificates:o.data};switch(n){case"route53":return C({...a,registrar:n,hostedZoneId:b(t.hostedZoneId)});case"external-delegated":{let c=b(t.delegatedSubdomain);if(c===void 0)return $({kind:"missing_field",field:"delegatedSubdomain"});let u=b(t.hostedZoneId);if(t.hostedZoneId!==void 0&&u===void 0)return $({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=ue(t.adoptedNameServers);if(t.adoptedNameServers!==void 0&&l===void 0)return $({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 $({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 m=b(t.parentDelegationRoleArn);if(t.parentDelegationRoleArn!==void 0&&m===void 0)return $({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,Y0);return t.phase!==void 0&&p===void 0?$({kind:"invalid_literal",field:"phase",reason:`must be one of ${Y0.map(g=>`'${g}'`).join(", ")}`}):C({...a,registrar:n,delegatedSubdomain:c,hostedZoneId:u,adoptedNameServers:l,parentDelegationRoleArn:m,phase:p})}case"external-records":return C({...a,registrar:n})}}me(iR,"parseDomainProps");function oR(e){return nR(e)}me(oR,"parseDomainErrorMessage");function aR(e){if(e===void 0)return C([]);if(!Array.isArray(e))return $({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(!P(i))return $({kind:"invalid_literal",field:`records[${n}]`,reason:"must be an object literal"});let r=sR(i,n);if(!r.success)return r;t.push(r.data)}return C(t)}me(aR,"parseRecordsArray");function sR(e,t){let n=b(e.type),i=b(e.name);if(n===void 0)return $({kind:"missing_field",field:`records[${t}].type`});if(i===void 0)return $({kind:"missing_field",field:`records[${t}].name`});if(e.target!==void 0){if(!A4.some(u=>u===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`alias records must have type 'A' or 'AAAA', got '${n}'`});let c=uR(e.target);return C({kind:"alias",type:n,name:i,target:c})}if(!x4.some(c=>c===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`unsupported record type '${n}'`});let r=cR(e.value);if(r===void 0)return $({kind:"invalid_literal",field:`records[${t}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(e.value)})`});let o=R(e.ttl),a={kind:"standard",type:n,name:i,value:r,...o!==void 0?{ttl:o}:{}};return C(a)}me(sR,"parseRecord");function cR(e){if(e===void 0)return;if(typeof e=="string")return e;let t=ue(e);if(t!==void 0)return t}me(cR,"parseRecordValue");function uR(e){if(xt(e))return lR(e);if(P(e)){let t=U(e.kind,q0);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:kl(e)}}me(uR,"parseTarget");function lR(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=wl(r);switch(i){case"fjallApp":{let a=xn(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"ecs",appName:a}}case"fjallCdn":{let a=xn(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"cdn",appName:a}}case"fjallBucket":{let a=xn(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"bucket",bucketName:a}}case"aliasTo":{if(o.length>=2){let a=xn(o,0),c=xn(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=ty(a,"dnsName"),u=ty(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}}}me(lR,"resolveCallRefTarget");function wl(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}me(wl,"splitTopLevelArgs");function xn(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)}me(xn,"extractStringLiteralArg");function ty(e,t){let n=e.trim().replace(/^\{|\}$/g,""),i=wl(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 xn([a],0)}}me(ty,"extractObjectFieldString");function dR(e){if(e===void 0)return C([]);if(!Array.isArray(e))return $({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(!P(i))return $({kind:"invalid_literal",field:`certificates[${n}]`,reason:"must be a string or object literal"});let r=b(i.domainName);if(r===void 0)return $({kind:"missing_field",field:`certificates[${n}].domainName`});let o=ue(i.subjectAlternativeNames),a=j(i.transparencyLogging),c=j(i.cloudFront);if(i.cloudFront!==void 0&&c===void 0)return $({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 C(t)}me(dR,"parseCertificatesArray");function mR(e){if(e===void 0||!P(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}me(mR,"parseStringRecord");function kl(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=>kl(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)}me(kl,"stringifyParsedValue");var $4=Object.defineProperty,Mr=(e,t)=>$4(e,"name",{value:t,configurable:!0});function pR(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}}))}Mr(pR,"toUserServiceConfigs");function fR(e,t,n=!0,i,r){let o={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return o;let a=t,c=rr[a];return{...o,database:gR(e,c,a,n,r),compute:yR(e,c,a,n,i),network:c.network,backup:c.backup}}Mr(fR,"planApplicationResources");function gR(e,t,n,i,r){let o=ob(n),a=t.database[o];return!i||a===null?[]:[{name:e,type:o,databaseName:Rn(e),variableName:`${er(e)}Database`,...a,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}Mr(gR,"buildDatabasePlan");function hR(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}Mr(hR,"buildScalingConfig");function vR(e,t){let{minCapacity:n,maxCapacity:i,...r}=e,o=t?.serviceType==="worker",a=t?.containerPort??ZI,c=t?.docker;return{...r,...c?.path!==void 0&&{docker:{path:c.path,...c.context!==void 0&&{context:c.context},...c.target!==void 0&&{target:c.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},containers:o?[{}]:[{port:a}],...hR(n,i)}}Mr(vR,"buildServiceEntry");function bR(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}Mr(bR,"resolveClusterConfig");function yR(e,t,n,i,r){let o=t.compute.ecs,a=(r&&r.length>0?ab(n,r):o.services.map((u,l)=>({...u,name:l===0?"api":`service-${l+1}`}))).map((u,l)=>vR(u,r?.[l])),c=a.some(u=>u.containers?.some(l=>l.port!==void 0));return[{name:e,type:Ei.ECS,needsConnection:i,connectedDatabase:i?[e]:void 0,variableName:`${er(e)}Compute`,cluster:bR(o.cluster,c),services:a}]}Mr(yR,"buildComputePlan");function Hi(e,t){let n=[ul(e),cl(e),sl(e)];if(ml(e))n.push(Ra(e),Ca(e));else{let r=dl(e);n.push(Ca(e),Ju(e),Qu(e),il(e),ol(e),al(e),nl(e,r),ll(e))}let i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){let r=Cl(i,e.customCodeBlocks,t?.resourceMapping);return r.success?C(r.content):$(new Error(`Custom code injection failed: ${r.error??"unknown error"}`))}return C(i)}Mr(Hi,"generateInfrastructureFromPlan");var T4=Object.defineProperty,qi=(e,t)=>T4(e,"name",{value:t,configurable:!0}),R4=ib("standard");function SR(e){return pa.options.some(t=>t.shape?.type?.value===e)}qi(SR,"isPatternConfigType");function _R(e,t,n){let{tier:i="standard",domain:r,database:o,compute:a,cdn:c,environment:u,tags:l}=n??{},m=fl(i);if(!m&&i!=="custom")return $(new Error(`Invalid pattern tier: "${i}". Valid tiers are: ${[...wa,"custom"].join(", ")}`));if(!SR(t))return $(new Error(`Unsupported pattern type: ${t}`));let p=m?pl(i):null,g=IR(t,e,{domain:r,database:o,compute:a,cdn:c,environment:u,tierPreset:p});if(!g.success)return g;let v=g.data;return C({appName:e,type:"standard",pattern:t,network:p?p.network:R4,backup:p?p.backup:!1,patternConfig:v,database:[],s3:[],compute:[],tags:l??{}})}qi(_R,"planOpenNextResources");function ER(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}}}qi(ER,"mergeDatabaseConfig");function xR(e,t){return{memorySize:e?.memorySize??t.compute.memorySize,timeout:e?.timeout??t.compute.timeout}}qi(xR,"mergeComputeConfig");function AR(e){let{encryption:t,...n}=e;return{...n,...t&&{encryption:{storageKey:t}}}}qi(AR,"toPatternDatabaseConfig");function IR(e,t,n){let{domain:i,database:r,compute:o,cdn:a,environment:c,tierPreset:u}=n,l=u?ER(r,u):r,m=u?xR(o,u):o,p={type:e,name:t,domain:i,database:l?AR(l):void 0,compute:m?{server:m}:void 0,cdn:a?{domainNames:a.domainNames,certificateArn:a.certificateArn}:void 0,environment:c},g=pa.safeParse(p);return g.success?C(g.data):$(new Error(`Invalid pattern config: ${g.error.message}`))}qi(IR,"buildPatternConfig");var P4=Object.defineProperty,C4=(e,t)=>P4(e,"name",{value:t,configurable:!0});function $R(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=Zv.safeParse(n);return i.success?C({appName:e,type:"standard",pattern:"staticsite",patternConfig:i.data,database:[],s3:[],compute:[],tags:t.tags??{}}):$(new Error(`Invalid static-site pattern config: ${i.error.message}`))}C4($R,"planStaticSiteResources");var N4=Object.defineProperty,Ol=(e,t)=>N4(e,"name",{value:t,configurable:!0});function TR(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]}Ol(TR,"parseServiceReference");function ry(e,t,n){n==="database"?(e.needsConnection=!0,e.connectedDatabase=[...new Set([...e.connectedDatabase??[],t])]):e.connectedStorage=[...new Set([...e.connectedStorage??[],t])]}Ol(ry,"addResourceConnection");function Dl(e,t,n,i){let r=new Set(t),o=[...new Set(t.map(TR))];for(let a of o){let c=e.compute.find(u=>u.name===a);if(c?.services){ry(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)}}}}Ol(Dl,"applyServiceConnections");function Ml(e,t,n,i){for(let r of e.compute)if(t.includes(r.name)&&(ry(r,n,i),r.services))for(let o of r.services)i==="database"?o.needsDatabaseConnection=!0:o.needsStorageConnection=!0}Ol(Ml,"applyComputeConnections");var w4=Object.defineProperty,ye=(e,t)=>w4(e,"name",{value:t,configurable:!0});function RR(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"}]}ye(RR,"listAvailableResources");function Za(e,t){if(FR(e,t.resourceName))return $(new Error(`Resource name '${t.resourceName}' is already used in this application.`));switch(t.type){case"database":return PR(e,t);case"database:proxy":return CR(e,t);case"storage:s3":return C(void 0);case"network":return C(void 0);case"compute:ecs":return!t.services||t.services.length===0?$(new Error("ECS compute requires at least one service.")):C(void 0);case"compute:lambda":return C(void 0);case"cdn":return NR(e,t);case"tunnel":return wR(e);default:{let n=t;return $(new Error(`Unknown resource type: ${String(n)}`))}}}ye(Za,"validateResourceAddition");function PR(e,t){let n=t.databaseName??t.resourceName.toLowerCase();return e.database.some(i=>i.databaseName===n)?$(new Error(`Database name '${n}' already exists. Choose a different database name.`)):t.databaseType==="GlobalAurora"&&!t.primaryRegion?$(new Error("GlobalAurora databases require a primaryRegion.")):C(void 0)}ye(PR,"validateDatabaseAddition");function CR(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 $(new Error(`Database '${t.targetDatabase}' not found. Available databases: ${i}`))}return n.proxy!==void 0&&n.proxy!==!1?$(new Error(`Database '${n.name}' already has RDS Proxy enabled.`)):C(void 0)}ye(CR,"validateProxyAddition");function NR(e,t){if(e.cdn)return $(new Error("A CDN is already configured for this application. Remove the existing CDN first."));if(!ny(e,t.defaultOriginRef))return $(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(!ny(e,n.originRef))return $(new Error(`Behaviour origin '${n.originRef}' not found in plan.`))}return C(void 0)}ye(NR,"validateCdnAddition");function wR(e){return e.tunnel&&typeof e.tunnel=="object"?$(new Error("Tunnel is already enabled for this application.")):e.database.length===0?$(new Error("No databases found \u2014 tunnel requires at least one relational database.")):C(void 0)}ye(wR,"validateTunnelAddition");function jl(e,t){let n=Za(e,t);if(!n.success)return n;switch(t.type){case"database":return kR(e,t);case"database:proxy":return OR(e,t);case"storage:s3":return DR(e,t);case"network":return MR(e,t);case"compute:ecs":return jR(e,t);case"compute:lambda":return zR(e,t);case"cdn":return LR(e,t);case"tunnel":return UR(e,t);default:{let i=t;return $(new Error(`Unknown resource type: ${String(i)}`))}}}ye(jl,"addResourceToPlan");function kR(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 $(new Error(`Unknown database type: ${String(a)}`))}}let o={...e,database:[...e.database,r]};return iy(o,t.resourceName,"database",t),C(o)}ye(kR,"addDatabase");function OR(e,t){let n=e.database.map(o=>({...o})),i=n.find(o=>o.name===t.targetDatabase||o.databaseName===t.targetDatabase);if(!i)return $(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:{},C({...e,database:n})}ye(OR,"addProxy");function DR(e,t){let n=t.bucketName??t.resourceName.toLowerCase(),i=Fe(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 iy(c,i,"storage",t),C(c)}ye(DR,"addS3");function MR(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 C({...e,additionalNetworks:[...e.additionalNetworks??[],i]})}return C({...e,network:{...e.network??{},...n}})}ye(MR,"addNetwork");function jR(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 C({...e,compute:[...e.compute,i]})}ye(jR,"addEcsCompute");function zR(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 C({...e,compute:[...e.compute,i]})}ye(zR,"addLambdaCompute");function LR(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 C({...e,cdn:n})}ye(LR,"addCdn");function UR(e,t){let n=t.instanceType?{instanceType:t.instanceType}:{};return C({...e,tunnel:n})}ye(UR,"addTunnel");function FR(e,t){let n=[...e.database.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)];return e.cdn&&n.push(e.cdn.name),n.includes(t)}ye(FR,"isResourceNameTaken");function ny(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)}ye(ny,"resourceExistsInPlan");function iy(e,t,n,i){i.connectToCompute&&i.connectToCompute.length>0&&Ml(e,[...i.connectToCompute],t,n),i.connectToServices&&i.connectToServices.length>0&&Dl(e,[...i.connectToServices],t,n)}ye(iy,"applyConnections");var k4=Object.defineProperty,O4=(e,t)=>k4(e,"name",{value:t,configurable:!0});function BR(e,t,n){let i;try{i=kr(e,{extractCustomCode:!0})}catch(u){return $(new Error(`Failed to parse infrastructure.ts: ${u instanceof Error?u.message:String(u)}`))}let r;try{r=_n(i,t,{skipValidation:!0})}catch(u){return $(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=Za(r,n);if(!o.success)return o;let a=jl(r,n);if(!a.success)return a;let c=Hi(a.data);return c.success?C({originalContent:e,modifiedContent:c.data,addedResource:{type:n.type,name:n.resourceName}}):$(new Error(`Code generation failed: ${c.error.message}`))}O4(BR,"generateResourceChange");var D4=Object.defineProperty,Ft=(e,t)=>D4(e,"name",{value:t,configurable:!0}),M4=new Set(Va.options);function VR(e){return M4.has(e.toUpperCase())}Ft(VR,"isRecordType");function ZR(e){return e.endsWith(".")?e.slice(0,-1):e}Ft(ZR,"stripTrailingDot");function GR(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}Ft(GR,"stripInlineComment");function WR(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(" ")}Ft(WR,"parseTxtValue");function HR(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}}Ft(HR,"parseDelegateDirective");function qR(e){if(e.length<2)return;let t=e[1],n=e.slice(2);return{domainName:t,subjectAlternativeNames:n}}Ft(qR,"parseCertDirective");function KR(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}Ft(KR,"tokenise");function YR(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(VR(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=WR(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":{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:`${Nl}${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]}}}Ft(YR,"parseRecord");function XR(e){let t=e.split(`
450
- `),n,i=300,r=[],o=[],a=[];for(let c of t){let u=c.trim();if(u===""||u.startsWith(";"))continue;if(u.toUpperCase().startsWith(Ut.FJALL_DELEGATE)){let v=HR(u);v&&o.push(v);continue}let l=GR(u);if(l==="")continue;let m=KR(l);if(m.length===0)continue;let p=m[0].toUpperCase();if(p===Ut.ORIGIN){if(m.length<2)continue;n=ZR(m[1]);continue}if(p===Ut.TTL){if(m.length<2)continue;i=parseInt(m[1],10);continue}if(p===Ut.FJALL_CERT){let v=qR(m);v&&a.push(v);continue}let g=YR(m);g&&r.push(g)}return n?C({origin:n,ttl:i,records:r,delegations:o,certificates:a}):$(new Error("Missing $ORIGIN directive"))}Ft(XR,"parseZoneFile");function JR(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)}Ft(JR,"resolveAlias");var j4=Object.defineProperty,oy=(e,t)=>j4(e,"name",{value:t,configurable:!0});function QR(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}oy(QR,"padRight");function eP(e,t){let n=QR(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 e.type==="A"&&e.value.startsWith(Nl)?`${n} ${i}IN A ${e.value}`:`${n} ${i}IN ${e.type} ${e.value}`}}oy(eP,"formatRecord");function tP(e){let t=[];if(t.push("; zone.bind \u2014 managed by fjall"),t.push(`${Ut.ORIGIN} ${e.origin}.`),t.push(`${Ut.TTL} ${e.ttl}`),t.push(""),e.certificates.length>0){for(let n of e.certificates){let i=[n.domainName,...n.subjectAlternativeNames];t.push(`${Ut.FJALL_CERT} ${i.join(" ")}`)}t.push("")}if(e.delegations.length>0){for(let n of e.delegations){let i=n.auto?" ; auto":"";t.push(`${Ut.FJALL_DELEGATE} ${n.subdomain} TO ${n.targetAccount}${i}`)}t.push("")}for(let n of e.records)t.push(eP(n,e.ttl));return t.join(`
449
+ `),r}gt(H0,"formatCustomCodeForInsertion");function q0(e){try{let t=function(r){r.kind===xn.SyntaxKind.Unknown&&i.push("Unknown node found in AST - possible parse error"),xn.forEachChild(r,t)};gt(t,"visit");let n=Or(e),i=[];return t(n),i.length>0?{valid:!1,errors:i}:{valid:!0}}catch(t){return{valid:!1,errors:[Rt(t)]}}}gt(q0,"validateModifiedFile");import*as Ie from"typescript";var Za=s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),v4=s.object({name:s.string(),type:Za,ttl:s.number().optional(),value:s.string(),priority:s.number().optional(),weight:s.number().optional(),port:s.number().optional()}).strict(),b4=s.object({subdomain:s.string(),targetAccount:s.string(),auto:s.boolean()}).strict(),y4=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string())}).strict(),uY=s.object({origin:s.string(),ttl:s.number(),records:s.array(v4),delegations:s.array(b4),certificates:s.array(y4)}).strict(),Ut=Object.freeze({ORIGIN:"$ORIGIN",TTL:"$TTL",FJALL_DELEGATE:"$FJALL-DELEGATE",FJALL_CERT:"$FJALL-CERT"}),Nl="ALIAS ";var K0=s.discriminatedUnion("kind",[s.object({kind:s.literal("ecs"),appName:s.string()}).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()]),Y0=K0.options.map(e=>e.shape.kind.value),ey=s.enum(["A","AAAA"]),ty=s.enum(["route53","external-delegated","external-records"]),X0=s.enum(["zone","full"]),S4=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(),_4=s.object({kind:s.literal("alias"),type:ey,name:s.string(),target:K0}).strict(),E4=s.discriminatedUnion("kind",[S4,_4]),x4=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string()).optional(),transparencyLogging:s.boolean().optional(),cloudFront:s.boolean().optional()}).strict(),A4=s.object({subdomain:s.string(),toAccount:s.string(),auto:s.boolean().optional()}).strict(),mY=s.object({zoneName:s.string(),registrar:ty,hostedZoneId:s.string().optional(),delegatedSubdomain:s.string().optional(),adoptedNameServers:s.array(s.string().min(1)).min(1).optional(),records:s.array(E4),certificates:s.array(x4),delegations:s.array(A4)}).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 I4=Object.defineProperty,me=(e,t)=>I4(e,"name",{value:t,configurable:!0}),Q0=ty.options,J0=X0.options,$4=Za.options,T4=ey.options;function eR(e){let t=[],n=me(r=>{if(Ie.isNewExpression(r)&&tR(r.expression)){let o=rR(r);o!==void 0&&t.push(o)}Ie.forEachChild(r,n)},"visit");if(n(e),t.length===0)return P(void 0);if(t.length>1)return $(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)}me(eR,"findDomainConstructCall");function tR(e){return Ie.isIdentifier(e)&&e.text==="Domain"}me(tR,"isDomainIdentifier");function rR(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||!Ie.isObjectLiteralExpression(r))return;let o=nR(e);if(o===void 0)return;let a=iR(e),c=Ie.isStringLiteral(i)?i.text:void 0;return{callExpression:e,containingStatement:o,propsObjectLiteral:r,domainVarId:a,scopeArgumentText:n.getText(),constructIdLiteral:c}}me(rR,"buildMatch");function nR(e){let t=e;for(;t!==void 0;){if(Ie.isExpressionStatement(t)||Ie.isVariableStatement(t))return t;t=t.parent}}me(nR,"findContainingTopLevelStatement");function iR(e){let t=e.parent;for(;t!==void 0;){if(Ie.isVariableDeclaration(t)&&Ie.isIdentifier(t.name)&&t.initializer===e)return t.name.text;t=t.parent}}me(iR,"extractDomainVarId");function oR(e){switch(e.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${Q0.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}`}}me(oR,"errorMessage");var R4="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 aR(e){let t=B(e),n=U(t.registrar,Q0);if(n===void 0){let c=t.registrar;if(c===void 0)return $({kind:"registrar_required"});let u=typeof c=="string"?c:kl(c);return $({kind:"registrar_unsupported",value:u})}let i=b(t.zoneName);if(i===void 0)return $({kind:"missing_field",field:"zoneName"});let r=cR(t.records);if(!r.success)return r;let o=pR(t.certificates);if(!o.success)return o;if(t.delegations!==void 0)return $({kind:"removed_field",field:"delegations",cure:R4});let a={zoneName:i,description:b(t.description),costAllocationEnvironment:b(t.costAllocationEnvironment),tags:fR(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 $({kind:"missing_field",field:"delegatedSubdomain"});let u=b(t.hostedZoneId);if(t.hostedZoneId!==void 0&&u===void 0)return $({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=ue(t.adoptedNameServers);if(t.adoptedNameServers!==void 0&&l===void 0)return $({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 $({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 m=b(t.parentDelegationRoleArn);if(t.parentDelegationRoleArn!==void 0&&m===void 0)return $({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,J0);return t.phase!==void 0&&p===void 0?$({kind:"invalid_literal",field:"phase",reason:`must be one of ${J0.map(g=>`'${g}'`).join(", ")}`}):P({...a,registrar:n,delegatedSubdomain:c,hostedZoneId:u,adoptedNameServers:l,parentDelegationRoleArn:m,phase:p})}case"external-records":return P({...a,registrar:n})}}me(aR,"parseDomainProps");function sR(e){return oR(e)}me(sR,"parseDomainErrorMessage");function cR(e){if(e===void 0)return P([]);if(!Array.isArray(e))return $({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(!C(i))return $({kind:"invalid_literal",field:`records[${n}]`,reason:"must be an object literal"});let r=uR(i,n);if(!r.success)return r;t.push(r.data)}return P(t)}me(cR,"parseRecordsArray");function uR(e,t){let n=b(e.type),i=b(e.name);if(n===void 0)return $({kind:"missing_field",field:`records[${t}].type`});if(i===void 0)return $({kind:"missing_field",field:`records[${t}].name`});if(e.target!==void 0){if(!T4.some(u=>u===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`alias records must have type 'A' or 'AAAA', got '${n}'`});let c=dR(e.target);return P({kind:"alias",type:n,name:i,target:c})}if(!$4.some(c=>c===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`unsupported record type '${n}'`});let r=lR(e.value);if(r===void 0)return $({kind:"invalid_literal",field:`records[${t}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(e.value)})`});let o=R(e.ttl),a={kind:"standard",type:n,name:i,value:r,...o!==void 0?{ttl:o}:{}};return P(a)}me(uR,"parseRecord");function lR(e){if(e===void 0)return;if(typeof e=="string")return e;let t=ue(e);if(t!==void 0)return t}me(lR,"parseRecordValue");function dR(e){if(xt(e))return mR(e);if(C(e)){let t=U(e.kind,Y0);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:kl(e)}}me(dR,"parseTarget");function mR(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=wl(r);switch(i){case"fjallApp":{let a=An(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"ecs",appName:a}}case"fjallCdn":{let a=An(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"cdn",appName:a}}case"fjallBucket":{let a=An(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"bucket",bucketName:a}}case"aliasTo":{if(o.length>=2){let a=An(o,0),c=An(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=ry(a,"dnsName"),u=ry(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}}}me(mR,"resolveCallRefTarget");function wl(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}me(wl,"splitTopLevelArgs");function An(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)}me(An,"extractStringLiteralArg");function ry(e,t){let n=e.trim().replace(/^\{|\}$/g,""),i=wl(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 An([a],0)}}me(ry,"extractObjectFieldString");function pR(e){if(e===void 0)return P([]);if(!Array.isArray(e))return $({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(!C(i))return $({kind:"invalid_literal",field:`certificates[${n}]`,reason:"must be a string or object literal"});let r=b(i.domainName);if(r===void 0)return $({kind:"missing_field",field:`certificates[${n}].domainName`});let o=ue(i.subjectAlternativeNames),a=j(i.transparencyLogging),c=j(i.cloudFront);if(i.cloudFront!==void 0&&c===void 0)return $({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)}me(pR,"parseCertificatesArray");function fR(e){if(e===void 0||!C(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}me(fR,"parseStringRecord");function kl(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=>kl(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)}me(kl,"stringifyParsedValue");var C4=Object.defineProperty,Mr=(e,t)=>C4(e,"name",{value:t,configurable:!0});function gR(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}}))}Mr(gR,"toUserServiceConfigs");function hR(e,t,n=!0,i,r){let o={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return o;let a=t,c=rr[a];return{...o,database:vR(e,c,a,n,r),compute:_R(e,c,a,n,i),network:c.network,backup:c.backup}}Mr(hR,"planApplicationResources");function vR(e,t,n,i,r){let o=ab(n),a=t.database[o];return!i||a===null?[]:[{name:e,type:o,databaseName:Cn(e),variableName:`${er(e)}Database`,...a,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}Mr(vR,"buildDatabasePlan");function bR(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}Mr(bR,"buildScalingConfig");function yR(e,t){let{minCapacity:n,maxCapacity:i,...r}=e,o=t?.serviceType==="worker",a=t?.containerPort??WI,c=t?.docker;return{...r,...c?.path!==void 0&&{docker:{path:c.path,...c.context!==void 0&&{context:c.context},...c.target!==void 0&&{target:c.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},containers:o?[{}]:[{port:a}],...bR(n,i)}}Mr(yR,"buildServiceEntry");function SR(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}Mr(SR,"resolveClusterConfig");function _R(e,t,n,i,r){let o=t.compute.ecs,a=(r&&r.length>0?sb(n,r):o.services.map((u,l)=>({...u,name:l===0?"api":`service-${l+1}`}))).map((u,l)=>yR(u,r?.[l])),c=a.some(u=>u.containers?.some(l=>l.port!==void 0));return[{name:e,type:Ei.ECS,needsConnection:i,connectedDatabase:i?[e]:void 0,variableName:`${er(e)}Compute`,cluster:SR(o.cluster,c),services:a}]}Mr(_R,"buildComputePlan");function Hi(e,t){let n=[ul(e),cl(e),sl(e)];if(ml(e))n.push(Ca(e),Na(e));else{let r=dl(e);n.push(Na(e),Ju(e),Qu(e),il(e),ol(e),al(e),nl(e,r),ll(e))}let i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){let r=Pl(i,e.customCodeBlocks,t?.resourceMapping);return r.success?P(r.content):$(new Error(`Custom code injection failed: ${r.error??"unknown error"}`))}return P(i)}Mr(Hi,"generateInfrastructureFromPlan");var P4=Object.defineProperty,qi=(e,t)=>P4(e,"name",{value:t,configurable:!0}),N4=ob("standard");function ER(e){return fa.options.some(t=>t.shape?.type?.value===e)}qi(ER,"isPatternConfigType");function xR(e,t,n){let{tier:i="standard",domain:r,database:o,compute:a,cdn:c,environment:u,tags:l}=n??{},m=fl(i);if(!m&&i!=="custom")return $(new Error(`Invalid pattern tier: "${i}". Valid tiers are: ${[...ka,"custom"].join(", ")}`));if(!ER(t))return $(new Error(`Unsupported pattern type: ${t}`));let p=m?pl(i):null,g=TR(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:N4,backup:p?p.backup:!1,patternConfig:v,database:[],s3:[],compute:[],tags:l??{}})}qi(xR,"planOpenNextResources");function AR(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}}}qi(AR,"mergeDatabaseConfig");function IR(e,t){return{memorySize:e?.memorySize??t.compute.memorySize,timeout:e?.timeout??t.compute.timeout}}qi(IR,"mergeComputeConfig");function $R(e){let{encryption:t,...n}=e;return{...n,...t&&{encryption:{storageKey:t}}}}qi($R,"toPatternDatabaseConfig");function TR(e,t,n){let{domain:i,database:r,compute:o,cdn:a,environment:c,tierPreset:u}=n,l=u?AR(r,u):r,m=u?IR(o,u):o,p={type:e,name:t,domain:i,database:l?$R(l):void 0,compute:m?{server:m}:void 0,cdn:a?{domainNames:a.domainNames,certificateArn:a.certificateArn}:void 0,environment:c},g=fa.safeParse(p);return g.success?P(g.data):$(new Error(`Invalid pattern config: ${g.error.message}`))}qi(TR,"buildPatternConfig");var w4=Object.defineProperty,k4=(e,t)=>w4(e,"name",{value:t,configurable:!0});function RR(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=Gv.safeParse(n);return i.success?P({appName:e,type:"standard",pattern:"staticsite",patternConfig:i.data,database:[],s3:[],compute:[],tags:t.tags??{}}):$(new Error(`Invalid static-site pattern config: ${i.error.message}`))}k4(RR,"planStaticSiteResources");var O4=Object.defineProperty,Ol=(e,t)=>O4(e,"name",{value:t,configurable:!0});function CR(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]}Ol(CR,"parseServiceReference");function ny(e,t,n){n==="database"?(e.needsConnection=!0,e.connectedDatabase=[...new Set([...e.connectedDatabase??[],t])]):e.connectedStorage=[...new Set([...e.connectedStorage??[],t])]}Ol(ny,"addResourceConnection");function Dl(e,t,n,i){let r=new Set(t),o=[...new Set(t.map(CR))];for(let a of o){let c=e.compute.find(u=>u.name===a);if(c?.services){ny(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)}}}}Ol(Dl,"applyServiceConnections");function Ml(e,t,n,i){for(let r of e.compute)if(t.includes(r.name)&&(ny(r,n,i),r.services))for(let o of r.services)i==="database"?o.needsDatabaseConnection=!0:o.needsStorageConnection=!0}Ol(Ml,"applyComputeConnections");var D4=Object.defineProperty,ye=(e,t)=>D4(e,"name",{value:t,configurable:!0});function PR(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"}]}ye(PR,"listAvailableResources");function Ga(e,t){if(VR(e,t.resourceName))return $(new Error(`Resource name '${t.resourceName}' is already used in this application.`));switch(t.type){case"database":return NR(e,t);case"database:proxy":return wR(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?$(new Error("ECS compute requires at least one service.")):P(void 0);case"compute:lambda":return P(void 0);case"cdn":return kR(e,t);case"tunnel":return OR(e);default:{let n=t;return $(new Error(`Unknown resource type: ${String(n)}`))}}}ye(Ga,"validateResourceAddition");function NR(e,t){let n=t.databaseName??t.resourceName.toLowerCase();return e.database.some(i=>i.databaseName===n)?$(new Error(`Database name '${n}' already exists. Choose a different database name.`)):t.databaseType==="GlobalAurora"&&!t.primaryRegion?$(new Error("GlobalAurora databases require a primaryRegion.")):P(void 0)}ye(NR,"validateDatabaseAddition");function wR(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 $(new Error(`Database '${t.targetDatabase}' not found. Available databases: ${i}`))}return n.proxy!==void 0&&n.proxy!==!1?$(new Error(`Database '${n.name}' already has RDS Proxy enabled.`)):P(void 0)}ye(wR,"validateProxyAddition");function kR(e,t){if(e.cdn)return $(new Error("A CDN is already configured for this application. Remove the existing CDN first."));if(!iy(e,t.defaultOriginRef))return $(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(!iy(e,n.originRef))return $(new Error(`Behaviour origin '${n.originRef}' not found in plan.`))}return P(void 0)}ye(kR,"validateCdnAddition");function OR(e){return e.tunnel&&typeof e.tunnel=="object"?$(new Error("Tunnel is already enabled for this application.")):e.database.length===0?$(new Error("No databases found \u2014 tunnel requires at least one relational database.")):P(void 0)}ye(OR,"validateTunnelAddition");function jl(e,t){let n=Ga(e,t);if(!n.success)return n;switch(t.type){case"database":return DR(e,t);case"database:proxy":return MR(e,t);case"storage:s3":return jR(e,t);case"network":return zR(e,t);case"compute:ecs":return LR(e,t);case"compute:lambda":return UR(e,t);case"cdn":return FR(e,t);case"tunnel":return BR(e,t);default:{let i=t;return $(new Error(`Unknown resource type: ${String(i)}`))}}}ye(jl,"addResourceToPlan");function DR(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 $(new Error(`Unknown database type: ${String(a)}`))}}let o={...e,database:[...e.database,r]};return oy(o,t.resourceName,"database",t),P(o)}ye(DR,"addDatabase");function MR(e,t){let n=e.database.map(o=>({...o})),i=n.find(o=>o.name===t.targetDatabase||o.databaseName===t.targetDatabase);if(!i)return $(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})}ye(MR,"addProxy");function jR(e,t){let n=t.bucketName??t.resourceName.toLowerCase(),i=Fe(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 oy(c,i,"storage",t),P(c)}ye(jR,"addS3");function zR(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}})}ye(zR,"addNetwork");function LR(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]})}ye(LR,"addEcsCompute");function UR(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]})}ye(UR,"addLambdaCompute");function FR(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})}ye(FR,"addCdn");function BR(e,t){let n=t.instanceType?{instanceType:t.instanceType}:{};return P({...e,tunnel:n})}ye(BR,"addTunnel");function VR(e,t){let n=[...e.database.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)];return e.cdn&&n.push(e.cdn.name),n.includes(t)}ye(VR,"isResourceNameTaken");function iy(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)}ye(iy,"resourceExistsInPlan");function oy(e,t,n,i){i.connectToCompute&&i.connectToCompute.length>0&&Ml(e,[...i.connectToCompute],t,n),i.connectToServices&&i.connectToServices.length>0&&Dl(e,[...i.connectToServices],t,n)}ye(oy,"applyConnections");var M4=Object.defineProperty,j4=(e,t)=>M4(e,"name",{value:t,configurable:!0});function ZR(e,t,n){let i;try{i=kr(e,{extractCustomCode:!0})}catch(u){return $(new Error(`Failed to parse infrastructure.ts: ${u instanceof Error?u.message:String(u)}`))}let r;try{r=En(i,t,{skipValidation:!0})}catch(u){return $(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=Ga(r,n);if(!o.success)return o;let a=jl(r,n);if(!a.success)return a;let c=Hi(a.data);return c.success?P({originalContent:e,modifiedContent:c.data,addedResource:{type:n.type,name:n.resourceName}}):$(new Error(`Code generation failed: ${c.error.message}`))}j4(ZR,"generateResourceChange");var z4=Object.defineProperty,Ft=(e,t)=>z4(e,"name",{value:t,configurable:!0}),L4=new Set(Za.options);function GR(e){return L4.has(e.toUpperCase())}Ft(GR,"isRecordType");function WR(e){return e.endsWith(".")?e.slice(0,-1):e}Ft(WR,"stripTrailingDot");function HR(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}Ft(HR,"stripInlineComment");function qR(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(" ")}Ft(qR,"parseTxtValue");function KR(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}}Ft(KR,"parseDelegateDirective");function YR(e){if(e.length<2)return;let t=e[1],n=e.slice(2);return{domainName:t,subjectAlternativeNames:n}}Ft(YR,"parseCertDirective");function XR(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}Ft(XR,"tokenise");function JR(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(GR(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=qR(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":{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:`${Nl}${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]}}}Ft(JR,"parseRecord");function QR(e){let t=e.split(`
450
+ `),n,i=300,r=[],o=[],a=[];for(let c of t){let u=c.trim();if(u===""||u.startsWith(";"))continue;if(u.toUpperCase().startsWith(Ut.FJALL_DELEGATE)){let v=KR(u);v&&o.push(v);continue}let l=HR(u);if(l==="")continue;let m=XR(l);if(m.length===0)continue;let p=m[0].toUpperCase();if(p===Ut.ORIGIN){if(m.length<2)continue;n=WR(m[1]);continue}if(p===Ut.TTL){if(m.length<2)continue;i=parseInt(m[1],10);continue}if(p===Ut.FJALL_CERT){let v=YR(m);v&&a.push(v);continue}let g=JR(m);g&&r.push(g)}return n?P({origin:n,ttl:i,records:r,delegations:o,certificates:a}):$(new Error("Missing $ORIGIN directive"))}Ft(QR,"parseZoneFile");function eC(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)}Ft(eC,"resolveAlias");var U4=Object.defineProperty,ay=(e,t)=>U4(e,"name",{value:t,configurable:!0});function tC(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}ay(tC,"padRight");function rC(e,t){let n=tC(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 e.type==="A"&&e.value.startsWith(Nl)?`${n} ${i}IN A ${e.value}`:`${n} ${i}IN ${e.type} ${e.value}`}}ay(rC,"formatRecord");function nC(e){let t=[];if(t.push("; zone.bind \u2014 managed by fjall"),t.push(`${Ut.ORIGIN} ${e.origin}.`),t.push(`${Ut.TTL} ${e.ttl}`),t.push(""),e.certificates.length>0){for(let n of e.certificates){let i=[n.domainName,...n.subjectAlternativeNames];t.push(`${Ut.FJALL_CERT} ${i.join(" ")}`)}t.push("")}if(e.delegations.length>0){for(let n of e.delegations){let i=n.auto?" ; auto":"";t.push(`${Ut.FJALL_DELEGATE} ${n.subdomain} TO ${n.targetAccount}${i}`)}t.push("")}for(let n of e.records)t.push(rC(n,e.ttl));return t.join(`
451
451
  `)+`
452
- `}oy(tP,"generateZoneFile");var z4=Object.defineProperty,ay=(e,t)=>z4(e,"name",{value:t,configurable:!0});function rP(e){let{domainName:t,hostedZoneId:n,records:i=[]}=e,r=`fjall/domains/${t}`;return[{path:`${r}/infrastructure.ts`,content:nP({domainName:t,records:i,hostedZoneId:n})},{path:`${r}/package.json`,content:iP(t)},{path:`${r}/tsconfig.json`,content:U4},{path:`${r}/cdk.json`,content:F4},{path:`${r}/.gitignore`,content:L4}]}ay(rP,"generateDomainFiles");function nP(e){let{domainName:t,records:n,hostedZoneId:i}=e,r=Fe(t.split(".").join("")),o=is(t),a=n.map(l=>{let m=l.ttl!==void 0?`, ttl: ${l.ttl}`:"";return` { type: ${JSON.stringify(l.type)}, name: ${JSON.stringify(l.name)}, value: ${JSON.stringify(l.value)}${m} },`}),c=a.length>0?`[
452
+ `}ay(nC,"generateZoneFile");var F4=Object.defineProperty,sy=(e,t)=>F4(e,"name",{value:t,configurable:!0});function iC(e){let{domainName:t,hostedZoneId:n,records:i=[]}=e,r=`fjall/domains/${t}`;return[{path:`${r}/infrastructure.ts`,content:oC({domainName:t,records:i,hostedZoneId:n})},{path:`${r}/package.json`,content:aC(t)},{path:`${r}/tsconfig.json`,content:V4},{path:`${r}/cdk.json`,content:Z4},{path:`${r}/.gitignore`,content:B4}]}sy(iC,"generateDomainFiles");function oC(e){let{domainName:t,records:n,hostedZoneId:i}=e,r=Fe(t.split(".").join("")),o=os(t),a=n.map(l=>{let m=l.ttl!==void 0?`, ttl: ${l.ttl}`:"";return` { type: ${JSON.stringify(l.type)}, name: ${JSON.stringify(l.name)}, value: ${JSON.stringify(l.value)}${m} },`}),c=a.length>0?`[
453
453
  ${a.join(`
454
454
  `)}
455
455
  ]`:"[]",u=i?` hostedZoneId: ${JSON.stringify(i)},
@@ -475,8 +475,8 @@ ${u} certificates: [
475
475
  ],
476
476
  records: ${c},
477
477
  });
478
- `}ay(nP,"generateDefaultInfrastructureTs");function iP(e){return JSON.stringify({name:`domain-${e}`,version:xu,scripts:{},devDependencies:{"@types/node":"20.4.9","ts-node":"^10.9.1",typescript:"~5.1.6"},dependencies:{"@fjall/components-infrastructure":`^${xu}`,"aws-cdk-lib":"^2.260.0",constructs:"^10.6.0"}},null,2)+`
479
- `}ay(iP,"generateDomainPackageJson");var L4=`node_modules/
478
+ `}sy(oC,"generateDefaultInfrastructureTs");function aC(e){return JSON.stringify({name:`domain-${e}`,version:xu,scripts:{},devDependencies:{"@types/node":"20.4.9","ts-node":"^10.9.1",typescript:"~5.1.6"},dependencies:{"@fjall/components-infrastructure":`^${xu}`,"aws-cdk-lib":"^2.260.0",constructs:"^10.6.0"}},null,2)+`
479
+ `}sy(aC,"generateDomainPackageJson");var B4=`node_modules/
480
480
  cdk.out/
481
481
  *.d.ts
482
482
  *.js
@@ -484,12 +484,12 @@ cdk.out/
484
484
  .fjall-state*.json.tmp
485
485
  .deploy-state.json
486
486
  .deploy-state.json.tmp
487
- `,U4=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)+`
488
- `,F4=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)+`
489
- `;var B4=Object.defineProperty,jr=(e,t)=>B4(e,"name",{value:t,configurable:!0});function aP(e,t,n){let i=e.root?oP.join(e.root,t):t;try{if(Ki.existsSync(i)){let r=`${i}.bak`,o=`${r}.tmp`;Ki.writeFileSync(o,n),Ki.renameSync(o,r)}return C(void 0)}catch(r){let o=vt(r);return yu.warn("Generator",`Failed to create backup of ${t}`,{error:kn(o.message)}),$(o)}}jr(aP,"createInfrastructureBackup");function V4(e,...t){let n={};for(let i of t)e[i]!==void 0&&(n[i]=e[i]);return n}jr(V4,"pickDefined");function sP(e,t){try{let n=kr(e,{extractCustomCode:!0}),i=_n(n,t,{skipValidation:!0});return n.customCodeBlocks?.length&&(i.customCodeBlocks=n.customCodeBlocks),C({parsed:n,plan:i})}catch(n){return $(vt(n))}}jr(sP,"parseAndBuildPlan");function cP(e,t){let n=sP(e,t);if(!n.success)throw new Error(`Failed to parse infrastructure: ${n.error.message}`,{cause:n.error});return n.data}jr(cP,"parseAndBuildPlanOrThrow");function uP(e,t,n){let i=e.safeParse(t);if(!i.success)throw new Error(`Invalid ${n} generator options:
490
- ${ca(i.error)}`);return i.data}jr(uP,"validateGeneratorOptions");function lP(e,t){let n=qt(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}}jr(lP,"readInfrastructureOrThrow");async function sy(e,t,n,i,r){let o=uP(t,n,i),{path:a,content:c}=lP(e,o.appName),{plan:u}=cP(c,o.appName),l=await r({tree:e,validated:o,plan:u,infrastructurePath:a,content:c}),m=dP(e,a,c,l);if(!m.success)throw new Error(m.error.message,{cause:m.error})}jr(sy,"withInfrastructurePlan");function dP(e,t,n,i){let r=Hi(i);if(!r.success)return $(r.error);let o=aP(e,t,n);return o.success?(e.write(t,r.data),C(void 0)):$(new Error(`Failed to create backup: ${o.error.message}`))}jr(dP,"generateAndWriteInfrastructure");var Z4=Object.defineProperty,zl=(e,t)=>Z4(e,"name",{value:t,configurable:!0}),Yi=1e3;function G4(e,t,n,i){if(od(e,t,i)===0)return n;for(let r=2;r<=Yi;r++){let o=`${n}${r}`;try{return to(e,t,o),o}catch{}}return`${n}${Yi}`}zl(G4,"generateUniqueResourceName");function mP(e,t){let n=DI.RESOURCE_SUFFIXES[t];return`${e}${n}`}zl(mP,"getDefaultResourceName");function W4(e,t,n){let i=mP(t,n);if(!Zr(e,t,i))return i;for(let r=2;r<=Yi;r++){let o=`${i}${r}`;if(!Zr(e,t,o))return o}return`${i}${Yi}`}zl(W4,"getUniqueDefaultResourceName");function cy(e,t,n){if(!Zr(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+Yi;a++){let c=`${r}${a}`;if(!Zr(e,t,c))return c}return`${r}${o+Yi}`}zl(cy,"ensureUniqueResourceName");var yS=ek(Bw(),1),YF=Object.defineProperty,Vw=(e,t)=>YF(e,"name",{value:t,configurable:!0});async function SS(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,yS.default)([{type:"confirm",name:"shouldConnect",message:a,initial:!0}]);return c?c.shouldConnect:!1}Vw(SS,"promptForConnection");async function _S(e,t,n){if(e.length===1)return process.stdout.write(`
487
+ `,V4=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)+`
488
+ `,Z4=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)+`
489
+ `;var G4=Object.defineProperty,jr=(e,t)=>G4(e,"name",{value:t,configurable:!0});function cC(e,t,n){let i=e.root?sC.join(e.root,t):t;try{if(Ki.existsSync(i)){let r=`${i}.bak`,o=`${r}.tmp`;Ki.writeFileSync(o,n),Ki.renameSync(o,r)}return P(void 0)}catch(r){let o=vt(r);return yu.warn("Generator",`Failed to create backup of ${t}`,{error:On(o.message)}),$(o)}}jr(cC,"createInfrastructureBackup");function W4(e,...t){let n={};for(let i of t)e[i]!==void 0&&(n[i]=e[i]);return n}jr(W4,"pickDefined");function uC(e,t){try{let n=kr(e,{extractCustomCode:!0}),i=En(n,t,{skipValidation:!0});return n.customCodeBlocks?.length&&(i.customCodeBlocks=n.customCodeBlocks),P({parsed:n,plan:i})}catch(n){return $(vt(n))}}jr(uC,"parseAndBuildPlan");function lC(e,t){let n=uC(e,t);if(!n.success)throw new Error(`Failed to parse infrastructure: ${n.error.message}`,{cause:n.error});return n.data}jr(lC,"parseAndBuildPlanOrThrow");function dC(e,t,n){let i=e.safeParse(t);if(!i.success)throw new Error(`Invalid ${n} generator options:
490
+ ${ua(i.error)}`);return i.data}jr(dC,"validateGeneratorOptions");function mC(e,t){let n=qt(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}}jr(mC,"readInfrastructureOrThrow");async function cy(e,t,n,i,r){let o=dC(t,n,i),{path:a,content:c}=mC(e,o.appName),{plan:u}=lC(c,o.appName),l=await r({tree:e,validated:o,plan:u,infrastructurePath:a,content:c}),m=pC(e,a,c,l);if(!m.success)throw new Error(m.error.message,{cause:m.error})}jr(cy,"withInfrastructurePlan");function pC(e,t,n,i){let r=Hi(i);if(!r.success)return $(r.error);let o=cC(e,t,n);return o.success?(e.write(t,r.data),P(void 0)):$(new Error(`Failed to create backup: ${o.error.message}`))}jr(pC,"generateAndWriteInfrastructure");var H4=Object.defineProperty,zl=(e,t)=>H4(e,"name",{value:t,configurable:!0}),Yi=1e3;function q4(e,t,n,i){if(od(e,t,i)===0)return n;for(let r=2;r<=Yi;r++){let o=`${n}${r}`;try{return to(e,t,o),o}catch{}}return`${n}${Yi}`}zl(q4,"generateUniqueResourceName");function fC(e,t){let n=jI.RESOURCE_SUFFIXES[t];return`${e}${n}`}zl(fC,"getDefaultResourceName");function K4(e,t,n){let i=fC(t,n);if(!Zr(e,t,i))return i;for(let r=2;r<=Yi;r++){let o=`${i}${r}`;if(!Zr(e,t,o))return o}return`${i}${Yi}`}zl(K4,"getUniqueDefaultResourceName");function uy(e,t,n){if(!Zr(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+Yi;a++){let c=`${r}${a}`;if(!Zr(e,t,c))return c}return`${r}${o+Yi}`}zl(uy,"ensureUniqueResourceName");var SS=rk(Zw(),1),QF=Object.defineProperty,Gw=(e,t)=>QF(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,SS.default)([{type:"confirm",name:"shouldConnect",message:a,initial:!0}]);return c?c.shouldConnect:!1}Gw(_S,"promptForConnection");async function ES(e,t,n){if(e.length===1)return process.stdout.write(`
491
491
  Auto-selected: ${e[0].name}
492
- `),[e[0].name];let i=[];for(;i.length===0;)i=(await(0,yS.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(`
492
+ `),[e[0].name];let i=[];for(;i.length===0;)i=(await(0,SS.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(`
493
493
  Please select at least one resource
494
494
 
495
- `);return i}Vw(_S,"selectResources");var XF=Object.defineProperty,ES=(e,t)=>XF(e,"name",{value:t,configurable:!0});function Zw(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}}ES(Zw,"buildComputeResourcePlan");async function Gw(e,t){await sy(e,O$,t,"compute",async({tree:n,validated:i,plan:r})=>{i.nameProvidedByFlag||to(n,i.appName,i.computeName);let o=i.nameProvidedByFlag?cy(n,i.appName,i.computeName):i.computeName,a=await Ww(i,r),c=Zw(o,i,a);return{...r,compute:[...r.compute,c]}})}ES(Gw,"computeGenerator");async function Ww(e,t){return e.connectionConfig?e.connectionConfig.connectToDatabase??[]:t.database.length>0&&!e.nameProvidedByFlag&&await SS(t.database.length,"database","Connect to existing database?","Found {count} databases. Configure connections?")?_S(t.database,"Select databases to connect:",n=>`${n.type} - ${n.databaseName}`):[]}ES(Ww,"resolveConnectedDatabase");var rQ=Gw;export{Gw as computeGenerator,rQ as default};
495
+ `);return i}Gw(ES,"selectResources");var eB=Object.defineProperty,xS=(e,t)=>eB(e,"name",{value:t,configurable:!0});function Ww(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}}xS(Ww,"buildComputeResourcePlan");async function Hw(e,t){await cy(e,M$,t,"compute",async({tree:n,validated:i,plan:r})=>{i.nameProvidedByFlag||to(n,i.appName,i.computeName);let o=i.nameProvidedByFlag?uy(n,i.appName,i.computeName):i.computeName,a=await qw(i,r),c=Ww(o,i,a);return{...r,compute:[...r.compute,c]}})}xS(Hw,"computeGenerator");async function qw(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?")?ES(t.database,"Select databases to connect:",n=>`${n.type} - ${n.databaseName}`):[]}xS(qw,"resolveConnectedDatabase");var aQ=Hw;export{Hw as computeGenerator,aQ as default};