@stacksjs/whois 0.67.0 → 0.68.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +1 -1
- package/dist/index.d.ts +63 -82
- package/dist/index.js +28 -28
- package/dist/types.d.ts +20 -89
- package/dist/utils.d.ts +1 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var c$=Object.create;var{getPrototypeOf:f$,defineProperty:f8,getOwnPropertyNames:n$}=Object;var r$=Object.prototype.hasOwnProperty;var p=(D,u,F)=>{F=D!=null?c$(f$(D)):{};let $=u||!D||!D.__esModule?f8(F,"default",{value:D,enumerable:!0}):F;for(let E of n$(D))if(!r$.call($,E))f8($,E,{get:()=>D[E],enumerable:!0});return $};var b=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var c1=(D,u)=>{for(var F in u)f8(D,F,{get:u[F],enumerable:!0,configurable:!0,set:($)=>u[F]=()=>$})};var C0=(D,u)=>()=>(D&&(u=D(D=0)),u);var wD=b((y0,t8)=>{Object.defineProperty(y0,"__esModule",{value:!0});y0.default=C7;function i8(D){return i8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},i8(D)}function C7(D){var u=typeof D==="string"||D instanceof String;if(!u){var F=i8(D);if(D===null)F="null";else if(F==="object")F=D.constructor.name;throw new TypeError("Expected a string but received a ".concat(F))}}t8.exports=y0.default;t8.exports.default=y0.default});var j0=b((g0,a8)=>{Object.defineProperty(g0,"__esModule",{value:!0});g0.default=s8;var E7=w7(wD());function w7(D){return D&&D.__esModule?D:{default:D}}var C3="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",qu="(".concat(C3,"[.]){3}").concat(C3),B7=new RegExp("^".concat(qu,"$")),ZD="(?:[0-9a-fA-F]{1,4})",Y7=new RegExp("^("+"(?:".concat(ZD,":){7}(?:").concat(ZD,"|:)|")+"(?:".concat(ZD,":){6}(?:").concat(qu,"|:").concat(ZD,"|:)|")+"(?:".concat(ZD,":){5}(?::").concat(qu,"|(:").concat(ZD,"){1,2}|:)|")+"(?:".concat(ZD,":){4}(?:(:").concat(ZD,"){0,1}:").concat(qu,"|(:").concat(ZD,"){1,3}|:)|")+"(?:".concat(ZD,":){3}(?:(:").concat(ZD,"){0,2}:").concat(qu,"|(:").concat(ZD,"){1,4}|:)|")+"(?:".concat(ZD,":){2}(?:(:").concat(ZD,"){0,3}:").concat(qu,"|(:").concat(ZD,"){1,5}|:)|")+"(?:".concat(ZD,":){1}(?:(:").concat(ZD,"){0,4}:").concat(qu,"|(:").concat(ZD,"){1,6}|:)|")+"(?::((?::".concat(ZD,"){0,5}:").concat(qu,"|(?::").concat(ZD,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function s8(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(E7.default(D),u=String(u),!u)return s8(D,4)||s8(D,6);if(u==="4")return B7.test(D);if(u==="6")return Y7.test(D);return!1}a8.exports=g0.default;a8.exports.default=g0.default});var Hu=b((R0,o8)=>{Object.defineProperty(R0,"__esModule",{value:!0});R0.default=Z7;function Z7(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;for(var F in u)if(typeof D[F]==="undefined")D[F]=u[F];return D}o8.exports=R0.default;o8.exports.default=R0.default});var E3=b((k0,e8)=>{Object.defineProperty(k0,"__esModule",{value:!0});k0.default=z7;var M7=$3(wD()),X7=$3(Hu());function $3(D){return D&&D.__esModule?D:{default:D}}var W7=/[^A-Z0-9+\/=]/i,A7=/^[A-Z0-9_\-]*$/i,Q7={urlSafe:!1};function z7(D,u){M7.default(D),u=X7.default(u,Q7);var F=D.length;if(u.urlSafe)return A7.test(D);if(F%4!==0||W7.test(D))return!1;var $=D.indexOf("=");return $===-1||$===F-1||$===F-2&&D[F-1]==="="}e8.exports=k0.default;e8.exports.default=k0.default});var B3=b((b0,D2)=>{Object.defineProperty(b0,"__esModule",{value:!0});b0.default=U7;var q7=w3(wD()),H7=w3(E3());function w3(D){return D&&D.__esModule?D:{default:D}}function U7(D){q7.default(D);var u=D.split("."),F=u.length;if(F!==3)return!1;return u.reduce(function($,E){return $&&H7.default(E,{urlSafe:!0})},!0)}D2.exports=b0.default;D2.exports.default=b0.default});var F2=b((_0,u2)=>{Object.defineProperty(_0,"__esModule",{value:!0});_0.default=N7;var V7=Y3(wD()),L7=Y3(Hu());function Y3(D){return D&&D.__esModule?D:{default:D}}var T7={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function N7(D,u){if(V7.default(D),u=L7.default(u,T7),u.allow_trailing_dot&&D[D.length-1]===".")D=D.substring(0,D.length-1);if(u.allow_wildcard===!0&&D.indexOf("*.")===0)D=D.substring(2);var F=D.split("."),$=F[F.length-1];if(u.require_tld){if(F.length<2)return!1;if(!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test($))return!1;if(/\s/.test($))return!1}if(!u.allow_numeric_tld&&/^\d+$/.test($))return!1;return F.every(function(E){if(E.length>63&&!u.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(E))return!1;if(/[\uff01-\uff5e]/.test(E))return!1;if(/^-|-$/.test(E))return!1;if(!u.allow_underscores&&/_/.test(E))return!1;return!0})}u2.exports=_0.default;u2.exports.default=_0.default});var M3=b((m0,C2)=>{Object.defineProperty(m0,"__esModule",{value:!0});m0.default=m7;var x7=P0(wD()),S7=P0(F2()),J3=P0(j0()),h7=P0(Hu());function P0(D){return D&&D.__esModule?D:{default:D}}function y7(D,u){return k7(D)||R7(D,u)||j7(D,u)||g7()}function g7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function j7(D,u){if(!D)return;if(typeof D==="string")return Z3(D,u);var F=Object.prototype.toString.call(D).slice(8,-1);if(F==="Object"&&D.constructor)F=D.constructor.name;if(F==="Map"||F==="Set")return Array.from(D);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return Z3(D,u)}function Z3(D,u){if(u==null||u>D.length)u=D.length;for(var F=0,$=new Array(u);F<u;F++)$[F]=D[F];return $}function R7(D,u){var F=D==null?null:typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(F!=null){var $,E,w,C,Z=[],M=!0,W=!1;try{if(w=(F=F.call(D)).next,u===0){if(Object(F)!==F)return;M=!1}else for(;!(M=($=w.call(F)).done)&&(Z.push($.value),Z.length!==u);M=!0);}catch(X){W=!0,E=X}finally{try{if(!M&&F.return!=null&&(C=F.return(),Object(C)!==C))return}finally{if(W)throw E}}return Z}}function k7(D){if(Array.isArray(D))return D}var b7={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},_7=/^\[([^\]]+)\](?::([0-9]+))?$/;function P7(D){return Object.prototype.toString.call(D)==="[object RegExp]"}function K3(D,u){for(var F=0;F<u.length;F++){var $=u[F];if(D===$||P7($)&&$.test(D))return!0}return!1}function m7(D,u){if(x7.default(D),!D||/[\s<>]/.test(D))return!1;if(D.indexOf("mailto:")===0)return!1;if(u=h7.default(u,b7),u.validate_length&&D.length>=2083)return!1;if(!u.allow_fragments&&D.includes("#"))return!1;if(!u.allow_query_components&&(D.includes("?")||D.includes("&")))return!1;var F,$,E,w,C,Z,M,W;if(M=D.split("#"),D=M.shift(),M=D.split("?"),D=M.shift(),M=D.split("://"),M.length>1){if(F=M.shift().toLowerCase(),u.require_valid_protocol&&u.protocols.indexOf(F)===-1)return!1}else if(u.require_protocol)return!1;else if(D.slice(0,2)==="//"){if(!u.allow_protocol_relative_urls)return!1;M[0]=D.slice(2)}if(D=M.join("://"),D==="")return!1;if(M=D.split("/"),D=M.shift(),D===""&&!u.require_host)return!0;if(M=D.split("@"),M.length>1){if(u.disallow_auth)return!1;if(M[0]==="")return!1;if($=M.shift(),$.indexOf(":")>=0&&$.split(":").length>2)return!1;var X=$.split(":"),q=y7(X,2),U=q[0],L=q[1];if(U===""&&L==="")return!1}w=M.join("@"),Z=null,W=null;var Q=w.match(_7);if(Q)E="",W=Q[1],Z=Q[2]||null;else if(M=w.split(":"),E=M.shift(),M.length)Z=M.join(":");if(Z!==null&&Z.length>0){if(C=parseInt(Z,10),!/^[0-9]+$/.test(Z)||C<=0||C>65535)return!1}else if(u.require_port)return!1;if(u.host_whitelist)return K3(E,u.host_whitelist);if(E===""&&!u.require_host)return!0;if(!J3.default(E)&&!S7.default(E,u)&&(!W||!J3.default(W,6)))return!1;if(E=E||W,u.host_blacklist&&K3(E,u.host_blacklist))return!1;return!0}C2.exports=m0.default;C2.exports.default=m0.default});var X3=b((v0,$2)=>{Object.defineProperty(v0,"__esModule",{value:!0});v0.default=r7;var c7=f7(wD());function f7(D){return D&&D.__esModule?D:{default:D}}var n7=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function r7(D){return c7.default(D),n7.test(D)}$2.exports=v0.default;$2.exports.default=v0.default});var Q3=b((W3)=>{Object.defineProperty(W3,"__esModule",{value:!0});W3.default=a7;W3.locales=void 0;var l7=p7(wD());function p7(D){return D&&D.__esModule?D:{default:D}}var c0={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function i7(D){var u=D.filter(function(F){return!(F in c0)});if(u.length>0)return!1;return!0}function t7(D,u){var F=D.replace(/[\s\-]+/gi,"").toUpperCase(),$=F.slice(0,2).toUpperCase(),E=$ in c0;if(u.whitelist){if(!i7(u.whitelist))return!1;var w=u.whitelist.includes($);if(!w)return!1}if(u.blacklist){var C=u.blacklist.includes($);if(C)return!1}return E&&c0[$].test(F)}function s7(D){var u=D.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),F=u.slice(4)+u.slice(0,4),$=F.replace(/[A-Z]/g,function(w){return w.charCodeAt(0)-55}),E=$.match(/\d{1,7}/g).reduce(function(w,C){return Number(w+C)%97},"");return E===1}function a7(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return l7.default(D),t7(D,u)&&s7(D)}var CW=W3.locales=Object.keys(c0)});var z3=b((f0,E2)=>{Object.defineProperty(f0,"__esModule",{value:!0});f0.default=FE;var e7=DE(wD());function DE(D){return D&&D.__esModule?D:{default:D}}var uE={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function FE(D,u){e7.default(D);var F=uE[![void 0,null].includes(u)?u:"all"];return!!F&&F.test(D)}E2.exports=f0.default;E2.exports.default=f0.default});var G3=b((n0,w2)=>{Object.defineProperty(n0,"__esModule",{value:!0});n0.default=BE;var $E=EE(wD());function EE(D){return D&&D.__esModule?D:{default:D}}var wE=/^[\x00-\x7F]+$/;function BE(D){return $E.default(D),wE.test(D)}w2.exports=n0.default;w2.exports.default=n0.default});var q3=b((r0,Y2)=>{Object.defineProperty(r0,"__esModule",{value:!0});r0.default=KE;var JE=ZE(wD());function ZE(D){return D&&D.__esModule?D:{default:D}}function B2(D){return B2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},B2(D)}function KE(D,u){JE.default(D);var F,$;if(B2(u)==="object")F=u.min||0,$=u.max;else F=arguments[1],$=arguments[2];var E=encodeURI(D).split(/%..|./).length-1;return E>=F&&(typeof $==="undefined"||E<=$)}Y2.exports=r0.default;Y2.exports.default=r0.default});var U3=b((d0,Z2)=>{Object.defineProperty(d0,"__esModule",{value:!0});d0.default=TE;var XE=w0(wD()),J2=w0(q3()),WE=w0(F2()),H3=w0(j0()),AE=w0(Hu());function w0(D){return D&&D.__esModule?D:{default:D}}var QE={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},zE=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,GE=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,qE=/^[a-z\d]+$/,HE=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,UE=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,OE=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,VE=254;function LE(D){var u=D.replace(/^"(.+)"$/,"$1");if(!u.trim())return!1;var F=/[\.";<>]/.test(u);if(F){if(u===D)return!1;var $=u.split('"').length===u.split('\\"').length;if(!$)return!1}return!0}function TE(D,u){if(XE.default(D),u=AE.default(u,QE),u.require_display_name||u.allow_display_name){var F=D.match(zE);if(F){var $=F[1];if(D=D.replace($,"").replace(/(^<|>$)/g,""),$.endsWith(" "))$=$.slice(0,-1);if(!LE($))return!1}else if(u.require_display_name)return!1}if(!u.ignore_max_length&&D.length>VE)return!1;var E=D.split("@"),w=E.pop(),C=w.toLowerCase();if(u.host_blacklist.includes(C))return!1;if(u.host_whitelist.length>0&&!u.host_whitelist.includes(C))return!1;var Z=E.join("@");if(u.domain_specific_validation&&(C==="gmail.com"||C==="googlemail.com")){Z=Z.toLowerCase();var M=Z.split("+")[0];if(!J2.default(M.replace(/\./g,""),{min:6,max:30}))return!1;var W=M.split(".");for(var X=0;X<W.length;X++)if(!qE.test(W[X]))return!1}if(u.ignore_max_length===!1&&(!J2.default(Z,{max:64})||!J2.default(w,{max:254})))return!1;if(!WE.default(w,{require_tld:u.require_tld,ignore_max_length:u.ignore_max_length,allow_underscores:u.allow_underscores})){if(!u.allow_ip_domain)return!1;if(!H3.default(w)){if(!w.startsWith("[")||!w.endsWith("]"))return!1;var q=w.slice(1,-1);if(q.length===0||!H3.default(q))return!1}}if(Z[0]==='"')return Z=Z.slice(1,Z.length-1),u.allow_utf8_local_part?OE.test(Z):HE.test(Z);var U=u.allow_utf8_local_part?UE:GE,L=Z.split(".");for(var Q=0;Q<L.length;Q++)if(!U.test(L[Q]))return!1;if(u.blacklisted_chars){if(Z.search(new RegExp("[".concat(u.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}Z2.exports=d0.default;Z2.exports.default=d0.default});var e0=b((x3)=>{Object.defineProperty(x3,"__esModule",{value:!0});x3.farsiLocales=x3.englishLocales=x3.dotDecimal=x3.decimal=x3.commaDecimal=x3.bengaliLocales=x3.arabicLocales=x3.alphanumeric=x3.alpha=void 0;var _D=x3.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[\u0410-\u042F]+$/i,"cs-CZ":/^[A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[\u0391-\u03CE]+$/i,"es-ES":/^[A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fa-IR":/^[\u0627\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u06CC]+$/i,"fi-FI":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"nb-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"hu-HU":/^[A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"pl-PL":/^[A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E50\s]+$/i,"tr-TR":/^[A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"vi-VN":/^[A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,"ko-KR":/^[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,ar:/^[\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[\u05D0-\u05EA]+$/,fa:/^['\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},PD=x3.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[0-9\u0410-\u042F]+$/i,"cs-CZ":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[0-9A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[0-9\u0391-\u03C9]+$/i,"es-ES":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fi-FI":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[0-9A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[0-9A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[0-9\uFF10-\uFF19\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"hu-HU":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"nb-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[0-9A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"pl-PL":/^[0-9A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[0-9A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[0-9\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[0-9\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[0-9A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[0-9\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E59\s]+$/i,"tr-TR":/^[0-9A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[0-9\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"ko-KR":/^[0-9\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,"vi-VN":/^[0-9A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,ar:/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[0-9\u05D0-\u05EA]+$/,fa:/^['0-9\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u06F0']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[0-9ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},yD=x3.decimal={"en-US":".",ar:"\u066B"},O3=x3.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(l0=0;l0<O3.length;l0++)B0="en-".concat(O3[l0]),_D[B0]=_D["en-US"],PD[B0]=PD["en-US"],yD[B0]=yD["en-US"];var B0,l0,V3=x3.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(p0=0;p0<V3.length;p0++)Y0="ar-".concat(V3[p0]),_D[Y0]=_D.ar,PD[Y0]=PD.ar,yD[Y0]=yD.ar;var Y0,p0,L3=x3.farsiLocales=["IR","AF"];for(t0=0;t0<L3.length;t0++)i0="fa-".concat(L3[t0]),PD[i0]=PD.fa,yD[i0]=yD.ar;var i0,t0,T3=x3.bengaliLocales=["BD","IN"];for(s0=0;s0<T3.length;s0++)J0="bn-".concat(T3[s0]),_D[J0]=_D.bn,PD[J0]=PD.bn,yD[J0]=yD["en-US"];var J0,s0,N3=x3.dotDecimal=["ar-EG","ar-LB","ar-LY"],I3=x3.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];for(a0=0;a0<N3.length;a0++)yD[N3[a0]]=yD["en-US"];var a0;for(o0=0;o0<I3.length;o0++)yD[I3[o0]]=",";var o0;_D["fr-CA"]=_D["fr-FR"];PD["fr-CA"]=PD["fr-FR"];_D["pt-BR"]=_D["pt-PT"];PD["pt-BR"]=PD["pt-PT"];yD["pt-BR"]=yD["pt-PT"];_D["pl-Pl"]=_D["pl-PL"];PD["pl-Pl"]=PD["pl-PL"];yD["pl-Pl"]=yD["pl-PL"];_D["fa-AF"]=_D.fa});var g3=b((h3)=>{Object.defineProperty(h3,"__esModule",{value:!0});h3.default=_E;h3.locales=void 0;var kE=bE(wD()),K2=e0();function bE(D){return D&&D.__esModule?D:{default:D}}function _E(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};kE.default(D);var $=D,E=F.ignore;if(E)if(E instanceof RegExp)$=$.replace(E,"");else if(typeof E==="string")$=$.replace(new RegExp("[".concat(E.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in K2.alpha)return K2.alpha[u].test($);throw new Error("Invalid locale '".concat(u,"'"))}var wW=h3.locales=Object.keys(K2.alpha)});var R3=b((D8,M2)=>{Object.defineProperty(D8,"__esModule",{value:!0});D8.default=lE;var mE=j3(wD()),vE=j3(Hu());function j3(D){return D&&D.__esModule?D:{default:D}}var cE=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,fE=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,nE=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,rE=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,dE={checkDMS:!1};function lE(D,u){if(mE.default(D),u=vE.default(u,dE),!D.includes(","))return!1;var F=D.split(",");if(F[0].startsWith("(")&&!F[1].endsWith(")")||F[1].endsWith(")")&&!F[0].startsWith("("))return!1;if(u.checkDMS)return nE.test(F[0])&&rE.test(F[1]);return cE.test(F[0])&&fE.test(F[1])}M2.exports=D8.default;M2.exports.default=D8.default});var b3=b((u8,X2)=>{Object.defineProperty(u8,"__esModule",{value:!0});u8.default=void 0;var iE=function D(u,F){return u.some(function($){return F===$})},YW=u8.default=iE;X2.exports=u8.default;X2.exports.default=u8.default});var P3=b((F8,A2)=>{Object.defineProperty(F8,"__esModule",{value:!0});F8.default=u5;var tE=W2(Hu()),sE=W2(wD()),aE=W2(b3()),_3=e0();function W2(D){return D&&D.__esModule?D:{default:D}}function oE(D){var u=new RegExp("^[-+]?([0-9]+)?(\\".concat(_3.decimal[D.locale],"[0-9]{").concat(D.decimal_digits,"})").concat(D.force_decimal?"":"?","$"));return u}var eE={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},D5=["","-","+"];function u5(D,u){if(sE.default(D),u=tE.default(u,eE),u.locale in _3.decimal)return!aE.default(D5,D.replace(/ /g,""))&&oE(u).test(D);throw new Error("Invalid locale '".concat(u.locale,"'"))}A2.exports=F8.default;A2.exports.default=F8.default});var m3=b((C8,Q2)=>{Object.defineProperty(C8,"__esModule",{value:!0});C8.default=w5;var C5=$5(wD());function $5(D){return D&&D.__esModule?D:{default:D}}var E5=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function w5(D){return C5.default(D),E5.test(D)}Q2.exports=C8.default;Q2.exports.default=C8.default});var v3=b(($8,z2)=>{Object.defineProperty($8,"__esModule",{value:!0});$8.default=Z5;var Y5=J5(wD());function J5(D){return D&&D.__esModule?D:{default:D}}function Z5(D){Y5.default(D);var u=D.replace(/[- ]+/g,""),F=0,$,E,w;for(var C=u.length-1;C>=0;C--){if($=u.substring(C,C+1),E=parseInt($,10),w)if(E*=2,E>=10)F+=E%10+1;else F+=E;else F+=E;w=!w}return!!(F%10===0?u:!1)}z2.exports=$8.default;z2.exports.default=$8.default});var f3=b((E8,G2)=>{Object.defineProperty(E8,"__esModule",{value:!0});E8.default=A5;var M5=c3(wD()),X5=c3(v3());function c3(D){return D&&D.__esModule?D:{default:D}}var _u={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},W5=function(){var D=[];for(var u in _u)if(_u.hasOwnProperty(u))D.push(_u[u]);return D}();function A5(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};M5.default(D);var F=u.provider,$=D.replace(/[- ]+/g,"");if(F&&F.toLowerCase()in _u){if(!_u[F.toLowerCase()].test($))return!1}else if(F&&!(F.toLowerCase()in _u))throw new Error("".concat(F," is not a valid credit card provider."));else if(!W5.some(function(E){return E.test($)}))return!1;return X5.default(D)}G2.exports=E8.default;G2.exports.default=E8.default});var d3=b((n3)=>{Object.defineProperty(n3,"__esModule",{value:!0});n3.default=q5;n3.locales=void 0;var z5=G5(wD()),q2=e0();function G5(D){return D&&D.__esModule?D:{default:D}}function q5(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};z5.default(D);var $=D,E=F.ignore;if(E)if(E instanceof RegExp)$=$.replace(E,"");else if(typeof E==="string")$=$.replace(new RegExp("[".concat(E.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in q2.alphanumeric)return q2.alphanumeric[u].test($);throw new Error("Invalid locale '".concat(u,"'"))}var JW=n3.locales=Object.keys(q2.alphanumeric)});var p3=b((w8,H2)=>{Object.defineProperty(w8,"__esModule",{value:!0});w8.default=V5;var U5=O5(wD());function O5(D){return D&&D.__esModule?D:{default:D}}var l3={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function V5(D,u){U5.default(D);var F=D.replace(/\s/g,"").toUpperCase();return u.toUpperCase()in l3&&l3[u].test(F)}H2.exports=w8.default;H2.exports.default=w8.default});var O2=b((t3)=>{Object.defineProperty(t3,"__esModule",{value:!0});t3.default=I5;t3.locales=void 0;var T5=N5(wD());function N5(D){return D&&D.__esModule?D:{default:D}}var i3=/^\d{3}$/,nD=/^\d{4}$/,gD=/^\d{5}$/,U2=/^\d{6}$/,Pu={AD:/^AD\d{3}$/,AT:nD,AU:nD,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:nD,BG:nD,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:nD,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:gD,DK:nD,DO:gD,DZ:gD,EE:gD,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:gD,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:nD,ID:gD,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:i3,IT:gD,JP:/^\d{3}\-\d{4}$/,KE:gD,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:nD,LV:/^LV\-\d{4}$/,LK:gD,MG:i3,MX:gD,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:gD,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:nD,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:nD,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:U2,RU:U2,SA:gD,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:U2,SI:nD,SK:/^\d{3}\s?\d{2}$/,TH:gD,TN:nD,TW:/^\d{3}(\d{2})?$/,UA:gD,US:/^\d{5}(-\d{4})?$/,ZA:nD,ZM:gD},KW=t3.locales=Object.keys(Pu);function I5(D,u){if(T5.default(D),u in Pu)return Pu[u].test(D);else if(u==="any"){for(var F in Pu)if(Pu.hasOwnProperty(F)){var $=Pu[F];if($.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}});var V2=b((a3)=>{Object.defineProperty(a3,"__esModule",{value:!0});a3.default=y5;a3.locales=void 0;var S5=h5(wD());function h5(D){return D&&D.__esModule?D:{default:D}}var CD={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};CD["en-CA"]=CD["en-US"];CD["fr-CA"]=CD["en-CA"];CD["fr-BE"]=CD["nl-BE"];CD["zh-HK"]=CD["en-HK"];CD["zh-MO"]=CD["en-MO"];CD["ga-IE"]=CD["en-IE"];CD["fr-CH"]=CD["de-CH"];CD["it-CH"]=CD["fr-CH"];function y5(D,u,F){if(S5.default(D),F&&F.strictMode&&!D.startsWith("+"))return!1;if(Array.isArray(u))return u.some(function(w){if(CD.hasOwnProperty(w)){var C=CD[w];if(C.test(D))return!0}return!1});else if(u in CD)return CD[u].test(D);else if(!u||u==="any"){for(var $ in CD)if(CD.hasOwnProperty($)){var E=CD[$];if(E.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}var XW=a3.locales=Object.keys(CD)});var S2=b((I2,x2)=>{(function(D,u){typeof I2=="object"&&typeof x2!="undefined"?x2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs=u()})(I2,function(){var D=1000,u=60000,F=3600000,$="millisecond",E="second",w="minute",C="hour",Z="day",M="week",W="month",X="quarter",q="year",U="date",L="Invalid Date",Q=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(g){var T=["th","st","nd","rd"],O=g%100;return"["+g+(T[(O-20)%10]||T[O]||T[0])+"]"}},l=function(g,T,O){var h=String(g);return!h||h.length>=T?g:""+Array(T+1-h.length).join(O)+g},uD={s:l,z:function(g){var T=-g.utcOffset(),O=Math.abs(T),h=Math.floor(O/60),N=O%60;return(T<=0?"+":"-")+l(h,2,"0")+":"+l(N,2,"0")},m:function g(T,O){if(T.date()<O.date())return-g(O,T);var h=12*(O.year()-T.year())+(O.month()-T.month()),N=T.clone().add(h,W),k=O-N<0,_=T.clone().add(h+(k?-1:1),W);return+(-(h+(O-N)/(k?N-_:_-N))||0)},a:function(g){return g<0?Math.ceil(g)||0:Math.floor(g)},p:function(g){return{M:W,y:q,w:M,d:Z,D:U,h:C,m:w,s:E,ms:$,Q:X}[g]||String(g||"").toLowerCase().replace(/s$/,"")},u:function(g){return g===void 0}},FD="en",xD={};xD[FD]=d;var dD="$isDayjsObject",SD=function(g){return g instanceof UD||!(!g||!g[dD])},VD=function g(T,O,h){var N;if(!T)return FD;if(typeof T=="string"){var k=T.toLowerCase();xD[k]&&(N=k),O&&(xD[k]=O,N=k);var _=T.split("-");if(!N&&_.length>1)return g(_[0])}else{var v=T.name;xD[v]=T,N=v}return!h&&N&&(FD=N),N||!h&&FD},i=function(g,T){if(SD(g))return g.clone();var O=typeof T=="object"?T:{};return O.date=g,O.args=arguments,new UD(O)},m=uD;m.l=VD,m.i=SD,m.w=function(g,T){return i(g,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var UD=function(){function g(O){this.$L=VD(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[dD]=!0}var T=g.prototype;return T.parse=function(O){this.$d=function(h){var{date:N,utc:k}=h;if(N===null)return new Date(NaN);if(m.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var _=N.match(Q);if(_){var v=_[2]-1||0,r=(_[7]||"0").substring(0,3);return k?new Date(Date.UTC(_[1],v,_[3]||1,_[4]||0,_[5]||0,_[6]||0,r)):new Date(_[1],v,_[3]||1,_[4]||0,_[5]||0,_[6]||0,r)}}return new Date(N)}(O),this.init()},T.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},T.$utils=function(){return m},T.isValid=function(){return this.$d.toString()!==L},T.isSame=function(O,h){var N=i(O);return this.startOf(h)<=N&&N<=this.endOf(h)},T.isAfter=function(O,h){return i(O)<this.startOf(h)},T.isBefore=function(O,h){return this.endOf(h)<i(O)},T.$g=function(O,h,N){return m.u(O)?this[h]:this.set(N,O)},T.unix=function(){return Math.floor(this.valueOf()/1000)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(O,h){var N=this,k=!!m.u(h)||h,_=m.p(O),v=function(XD,KD){var bD=m.w(N.$u?Date.UTC(N.$y,KD,XD):new Date(N.$y,KD,XD),N);return k?bD:bD.endOf(Z)},r=function(XD,KD){return m.w(N.toDate()[XD].apply(N.toDate("s"),(k?[0,0,0,0]:[23,59,59,999]).slice(KD)),N)},a=this.$W,JD=this.$M,TD=this.$D,Eu="set"+(this.$u?"UTC":"");switch(_){case q:return k?v(1,0):v(31,11);case W:return k?v(1,JD):v(0,JD+1);case M:var sD=this.$locale().weekStart||0,Mu=(a<sD?a+7:a)-sD;return v(k?TD-Mu:TD+(6-Mu),JD);case Z:case U:return r(Eu+"Hours",0);case C:return r(Eu+"Minutes",1);case w:return r(Eu+"Seconds",2);case E:return r(Eu+"Milliseconds",3);default:return this.clone()}},T.endOf=function(O){return this.startOf(O,!1)},T.$set=function(O,h){var N,k=m.p(O),_="set"+(this.$u?"UTC":""),v=(N={},N[Z]=_+"Date",N[U]=_+"Date",N[W]=_+"Month",N[q]=_+"FullYear",N[C]=_+"Hours",N[w]=_+"Minutes",N[E]=_+"Seconds",N[$]=_+"Milliseconds",N)[k],r=k===Z?this.$D+(h-this.$W):h;if(k===W||k===q){var a=this.clone().set(U,1);a.$d[v](r),a.init(),this.$d=a.set(U,Math.min(this.$D,a.daysInMonth())).$d}else v&&this.$d[v](r);return this.init(),this},T.set=function(O,h){return this.clone().$set(O,h)},T.get=function(O){return this[m.p(O)]()},T.add=function(O,h){var N,k=this;O=Number(O);var _=m.p(h),v=function(JD){var TD=i(k);return m.w(TD.date(TD.date()+Math.round(JD*O)),k)};if(_===W)return this.set(W,this.$M+O);if(_===q)return this.set(q,this.$y+O);if(_===Z)return v(1);if(_===M)return v(7);var r=(N={},N[w]=u,N[C]=F,N[E]=D,N)[_]||1,a=this.$d.getTime()+O*r;return m.w(a,this)},T.subtract=function(O,h){return this.add(-1*O,h)},T.format=function(O){var h=this,N=this.$locale();if(!this.isValid())return N.invalidDate||L;var k=O||"YYYY-MM-DDTHH:mm:ssZ",_=m.z(this),v=this.$H,r=this.$m,a=this.$M,JD=N.weekdays,TD=N.months,Eu=N.meridiem,sD=function(KD,bD,aD,wu){return KD&&(KD[bD]||KD(h,k))||aD[bD].slice(0,wu)},Mu=function(KD){return m.s(v%12||12,KD,"0")},XD=Eu||function(KD,bD,aD){var wu=KD<12?"AM":"PM";return aD?wu.toLowerCase():wu};return k.replace(P,function(KD,bD){return bD||function(aD){switch(aD){case"YY":return String(h.$y).slice(-2);case"YYYY":return m.s(h.$y,4,"0");case"M":return a+1;case"MM":return m.s(a+1,2,"0");case"MMM":return sD(N.monthsShort,a,TD,3);case"MMMM":return sD(TD,a);case"D":return h.$D;case"DD":return m.s(h.$D,2,"0");case"d":return String(h.$W);case"dd":return sD(N.weekdaysMin,h.$W,JD,2);case"ddd":return sD(N.weekdaysShort,h.$W,JD,3);case"dddd":return JD[h.$W];case"H":return String(v);case"HH":return m.s(v,2,"0");case"h":return Mu(1);case"hh":return Mu(2);case"a":return XD(v,r,!0);case"A":return XD(v,r,!1);case"m":return String(r);case"mm":return m.s(r,2,"0");case"s":return String(h.$s);case"ss":return m.s(h.$s,2,"0");case"SSS":return m.s(h.$ms,3,"0");case"Z":return _}return null}(KD)||_.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(O,h,N){var k,_=this,v=m.p(h),r=i(O),a=(r.utcOffset()-this.utcOffset())*u,JD=this-r,TD=function(){return m.m(_,r)};switch(v){case q:k=TD()/12;break;case W:k=TD();break;case X:k=TD()/3;break;case M:k=(JD-a)/604800000;break;case Z:k=(JD-a)/86400000;break;case C:k=JD/F;break;case w:k=JD/u;break;case E:k=JD/D;break;default:k=JD}return N?k:m.a(k)},T.daysInMonth=function(){return this.endOf(W).$D},T.$locale=function(){return xD[this.$L]},T.locale=function(O,h){if(!O)return this.$L;var N=this.clone(),k=VD(O,h,!0);return k&&(N.$L=k),N},T.clone=function(){return m.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},g}(),LD=UD.prototype;return i.prototype=LD,[["$ms",$],["$s",E],["$m",w],["$H",C],["$W",Z],["$M",W],["$y",q],["$D",U]].forEach(function(g){LD[g[1]]=function(T){return this.$g(T,g[0],g[1])}}),i.extend=function(g,T){return g.$i||(g(T,UD,i),g.$i=!0),i},i.locale=VD,i.isDayjs=SD,i.unix=function(g){return i(1000*g)},i.en=xD[FD],i.Ls=xD,i.p={},i})});var VF=b((h2,y2)=>{(function(D,u){typeof h2=="object"&&typeof y2!="undefined"?y2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrAfter=u()})(h2,function(){return function(D,u){u.prototype.isSameOrAfter=function(F,$){return this.isSame(F,$)||this.isAfter(F,$)}}})});var LF=b((g2,j2)=>{(function(D,u){typeof g2=="object"&&typeof j2!="undefined"?j2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrBefore=u()})(g2,function(){return function(D,u){u.prototype.isSameOrBefore=function(F,$){return this.isSame(F,$)||this.isBefore(F,$)}}})});var TF=b((R2,k2)=>{(function(D,u){typeof R2=="object"&&typeof k2!="undefined"?k2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_customParseFormat=u()})(R2,function(){var D={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},u=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,F=/\d/,$=/\d\d/,E=/\d\d?/,w=/\d*[^-_:/,()\s\d]+/,C={},Z=function(Q){return(Q=+Q)+(Q>68?1900:2000)},M=function(Q){return function(P){this[Q]=+P}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(Q){(this.zone||(this.zone={})).offset=function(P){if(!P)return 0;if(P==="Z")return 0;var d=P.match(/([+-]|\d\d)/g),l=60*d[1]+(+d[2]||0);return l===0?0:d[0]==="+"?-l:l}(Q)}],X=function(Q){var P=C[Q];return P&&(P.indexOf?P:P.s.concat(P.f))},q=function(Q,P){var d,l=C.meridiem;if(l){for(var uD=1;uD<=24;uD+=1)if(Q.indexOf(l(uD,0,P))>-1){d=uD>12;break}}else d=Q===(P?"pm":"PM");return d},U={A:[w,function(Q){this.afternoon=q(Q,!1)}],a:[w,function(Q){this.afternoon=q(Q,!0)}],Q:[F,function(Q){this.month=3*(Q-1)+1}],S:[F,function(Q){this.milliseconds=100*+Q}],SS:[$,function(Q){this.milliseconds=10*+Q}],SSS:[/\d{3}/,function(Q){this.milliseconds=+Q}],s:[E,M("seconds")],ss:[E,M("seconds")],m:[E,M("minutes")],mm:[E,M("minutes")],H:[E,M("hours")],h:[E,M("hours")],HH:[E,M("hours")],hh:[E,M("hours")],D:[E,M("day")],DD:[$,M("day")],Do:[w,function(Q){var P=C.ordinal,d=Q.match(/\d+/);if(this.day=d[0],P)for(var l=1;l<=31;l+=1)P(l).replace(/\[|\]/g,"")===Q&&(this.day=l)}],w:[E,M("week")],ww:[$,M("week")],M:[E,M("month")],MM:[$,M("month")],MMM:[w,function(Q){var P=X("months"),d=(X("monthsShort")||P.map(function(l){return l.slice(0,3)})).indexOf(Q)+1;if(d<1)throw new Error;this.month=d%12||d}],MMMM:[w,function(Q){var P=X("months").indexOf(Q)+1;if(P<1)throw new Error;this.month=P%12||P}],Y:[/[+-]?\d+/,M("year")],YY:[$,function(Q){this.year=Z(Q)}],YYYY:[/\d{4}/,M("year")],Z:W,ZZ:W};function L(Q){var P,d;P=Q,d=C&&C.formats;for(var l=(Q=P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(i,m,UD){var LD=UD&&UD.toUpperCase();return m||d[UD]||D[UD]||d[LD].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,T,O){return T||O.slice(1)})})).match(u),uD=l.length,FD=0;FD<uD;FD+=1){var xD=l[FD],dD=U[xD],SD=dD&&dD[0],VD=dD&&dD[1];l[FD]=VD?{regex:SD,parser:VD}:xD.replace(/^\[|\]$/g,"")}return function(i){for(var m={},UD=0,LD=0;UD<uD;UD+=1){var g=l[UD];if(typeof g=="string")LD+=g.length;else{var{regex:T,parser:O}=g,h=i.slice(LD),N=T.exec(h)[0];O.call(m,N),i=i.replace(N,"")}}return function(k){var _=k.afternoon;if(_!==void 0){var v=k.hours;_?v<12&&(k.hours+=12):v===12&&(k.hours=0),delete k.afternoon}}(m),m}}return function(Q,P,d){d.p.customParseFormat=!0,Q&&Q.parseTwoDigitYear&&(Z=Q.parseTwoDigitYear);var l=P.prototype,uD=l.parse;l.parse=function(FD){var{date:xD,utc:dD,args:SD}=FD;this.$u=dD;var VD=SD[1];if(typeof VD=="string"){var i=SD[2]===!0,m=SD[3]===!0,UD=i||m,LD=SD[2];m&&(LD=SD[2]),C=this.$locale(),!i&&LD&&(C=d.Ls[LD]),this.$d=function(h,N,k,_){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1000:1)*h);var v=L(N)(h),r=v.year,a=v.month,JD=v.day,TD=v.hours,Eu=v.minutes,sD=v.seconds,Mu=v.milliseconds,XD=v.zone,KD=v.week,bD=new Date,aD=JD||(r||a?1:bD.getDate()),wu=r||bD.getFullYear(),ku=0;r&&!a||(ku=a>0?a-1:bD.getMonth());var bu,ou=TD||0,eu=Eu||0,D0=sD||0,u0=Mu||0;return XD?new Date(Date.UTC(wu,ku,aD,ou,eu,D0,u0+60*XD.offset*1000)):k?new Date(Date.UTC(wu,ku,aD,ou,eu,D0,u0)):(bu=new Date(wu,ku,aD,ou,eu,D0,u0),KD&&(bu=_(bu).week(KD).toDate()),bu)}catch(R1){return new Date("")}}(xD,VD,dD,d),this.init(),LD&&LD!==!0&&(this.$L=this.locale(LD).$L),UD&&xD!=this.format(VD)&&(this.$d=new Date("")),C={}}else if(VD instanceof Array)for(var g=VD.length,T=1;T<=g;T+=1){SD[1]=VD[T-1];var O=d.apply(this,SD);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}T===g&&(this.$d=new Date(""))}else uD.call(this,FD)}}})});var NF=b((Y8,P2)=>{Object.defineProperty(Y8,"__esModule",{value:!0});Y8.default=l5;var r5=d5(wD());function d5(D){return D&&D.__esModule?D:{default:D}}function l5(D){return r5.default(D),D.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}P2.exports=Y8.default;P2.exports.default=Y8.default});var IF=b((J8,m2)=>{Object.defineProperty(J8,"__esModule",{value:!0});J8.default=Fw;var i5=t5(Hu());function t5(D){return D&&D.__esModule?D:{default:D}}var s5={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},a5=["icloud.com","me.com"],o5=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],e5=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],Dw=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function uw(D){if(D.length>1)return D;return""}function Fw(D,u){u=i5.default(u,s5);var F=D.split("@"),$=F.pop(),E=F.join("@"),w=[E,$];if(w[1]=w[1].toLowerCase(),w[1]==="gmail.com"||w[1]==="googlemail.com"){if(u.gmail_remove_subaddress)w[0]=w[0].split("+")[0];if(u.gmail_remove_dots)w[0]=w[0].replace(/\.+/g,uw);if(!w[0].length)return!1;if(u.all_lowercase||u.gmail_lowercase)w[0]=w[0].toLowerCase();w[1]=u.gmail_convert_googlemaildotcom?"gmail.com":w[1]}else if(a5.indexOf(w[1])>=0){if(u.icloud_remove_subaddress)w[0]=w[0].split("+")[0];if(!w[0].length)return!1;if(u.all_lowercase||u.icloud_lowercase)w[0]=w[0].toLowerCase()}else if(o5.indexOf(w[1])>=0){if(u.outlookdotcom_remove_subaddress)w[0]=w[0].split("+")[0];if(!w[0].length)return!1;if(u.all_lowercase||u.outlookdotcom_lowercase)w[0]=w[0].toLowerCase()}else if(e5.indexOf(w[1])>=0){if(u.yahoo_remove_subaddress){var C=w[0].split("-");w[0]=C.length>1?C.slice(0,-1).join("-"):C[0]}if(!w[0].length)return!1;if(u.all_lowercase||u.yahoo_lowercase)w[0]=w[0].toLowerCase()}else if(Dw.indexOf(w[1])>=0){if(u.all_lowercase||u.yandex_lowercase)w[0]=w[0].toLowerCase();w[1]="yandex.ru"}else if(u.all_lowercase)w[0]=w[0].toLowerCase();return w.join("@")}m2.exports=J8.default;m2.exports.default=J8.default});function l2(D){return D!==null&&typeof D==="object"}function s2(D,u,F=".",$){if(!l2(u))return s2(D,{},F,$);let E=Object.assign({},u);for(let w in D){if(w==="__proto__"||w==="constructor")continue;let C=D[w];if(C===null||C===void 0)continue;if($&&$(E,w,C,F))continue;if(Array.isArray(C)&&Array.isArray(E[w]))E[w]=[...C,...E[w]];else if(l2(C)&&l2(E[w]))E[w]=s2(C,E[w],(F?`${F}.`:"")+w.toString(),$);else E[w]=C}return E}function KY(D){return(...u)=>u.reduce((F,$)=>s2(F,$,"",D),{})}function XY(D){return Object.prototype.toString.call(D)==="[object Object]"}function WY(D){if(!XY(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}class zD{constructor(D={}){let u=D.types||t2;this.options=MY({...D,defaults:{...D.defaults},level:i2(D.level,u),reporters:[...D.reporters||[]]},{types:t2,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let F in u){let $={type:F,...this.options.defaults,...u[F]};this[F]=this._wrapLogFn($),this[F].raw=this._wrapLogFn($,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=i2(D,this.options.types,this.options.level)}prompt(D,u){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(D,u)}create(D){let u=new zD({...this.options,...D});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){let u=this.options.reporters.indexOf(D);if(u>=0)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,u){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(F)=>{this[u].raw(String(F).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){p2=!0}resumeLogs(){p2=!1;let D=pC.splice(0);for(let u of D)u[0]._logFn(u[1],u[2])}mockTypes(D){let u=D||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let F in this.options.types)this[F]=u(F,this.options.types[F])||this[F],this[F].raw=this[F]}_wrapLogFn(D,u){return(...F)=>{if(p2){pC.push([this,D,F,u]);return}return this._logFn(D,F,u)}}_logFn(D,u,F){if((D.level||0)>this.level)return!1;let $={date:new Date,args:[],...D,level:i2(D.level,this.options.types)};if(!F&&u.length===1&&WY(u[0]))Object.assign($,u[0]);else $.args=[...u];if($.message)$.args.unshift($.message),delete $.message;if($.additional){if(!Array.isArray($.additional))$.additional=$.additional.split("\n");$.args.push("\n"+$.additional.join("\n")),delete $.additional}$.type=typeof $.type==="string"?$.type.toLowerCase():"log",$.tag=typeof $.tag==="string"?$.tag:"";let E=(C=!1)=>{let Z=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&Z>0){let M=[...this._lastLog.object.args];if(Z>1)M.push(`(repeated ${Z} times)`);this._log({...this._lastLog.object,args:M}),this._lastLog.count=1}if(C)this._lastLog.object=$,this._log($)};clearTimeout(this._lastLog.timeout);let w=this._lastLog.time&&$.date?$.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=$.date,w<this.options.throttle)try{let C=JSON.stringify([$.type,$.tag,$.args]),Z=this._lastLog.serialized===C;if(this._lastLog.serialized=C,Z){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(E,this.options.throttle);return}}}catch{}E(!0)}_log(D){for(let u of this.options.reporters)u.log(D,{options:this.options})}}function i2(D,u={},F=3){if(D===void 0)return F;if(typeof D==="number")return D;if(u[D]&&u[D].level!==void 0)return u[D].level;return F}function iC(D={}){return new zD(D)}var QD,t2,MY,p2=!1,pC;var z8=C0(()=>{QD={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},t2={silent:{level:-1},fatal:{level:QD.fatal},error:{level:QD.error},warn:{level:QD.warn},log:{level:QD.log},info:{level:QD.info},success:{level:QD.success},fail:{level:QD.fail},ready:{level:QD.info},start:{level:QD.info},box:{level:QD.info},debug:{level:QD.debug},trace:{level:QD.trace},verbose:{level:QD.verbose}};MY=KY();pC=[];zD.prototype.add=zD.prototype.addReporter;zD.prototype.remove=zD.prototype.removeReporter;zD.prototype.clear=zD.prototype.removeReporter;zD.prototype.withScope=zD.prototype.withTag;zD.prototype.mock=zD.prototype.mockTypes;zD.prototype.pause=zD.prototype.pauseLogs;zD.prototype.resume=zD.prototype.resumeLogs});import{formatWithOptions as AY}from"util";import{sep as QY}from"path";function o2(D){let u=process.cwd()+QY;return D.split("\n").splice(1).map(($)=>$.trim().replace("file://","").replace(u,""))}function zY(D,u){return(u.__write||u.write).call(u,D)}class G8{formatStack(D,u){return" "+o2(D).join("\n ")}formatArgs(D,u){let F=D.map(($)=>{if($&&typeof $.stack==="string")return $.message+"\n"+this.formatStack($.stack,u);return $});return AY(u,...F)}formatDate(D,u){return u.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,u){let F=this.formatArgs(D.args,u);if(D.type==="box")return"\n"+[a2(D.tag),D.title&&D.title,...F.split("\n")].filter(Boolean).map(($)=>" > "+$).join("\n")+"\n";return this.filterAndJoin([a2(D.type),a2(D.tag),F])}log(D,u){let F=this.formatLogObj(D,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return zY(F+"\n",D.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}var a2=(D)=>D?`[${D}]`:"";var q8=()=>{};import*as H8 from"tty";function eC(D,u,F,$,E=u.slice(0,Math.max(0,D))+$,w=u.slice(Math.max(0,D+F.length)),C=w.indexOf(F)){return E+(C<0?w:eC(C,w,F,$))}function TY(D,u,F,$,E){return D<0?F+u+$:F+eC(D,u,$,E)+$}function NY(D,u,F=D,$=D.length+1){return(E)=>E||!(E===""||E===void 0)?TY((""+E).indexOf(u,$),E,D,u,F):""}function c(D,u,F){return NY(`\x1B[${D}m`,`\x1B[${u}m`,F)}function IY(D=LY){return D?tC:Object.fromEntries(Object.keys(tC).map((u)=>[u,String]))}function xY(D,u="reset"){return z[D]||z[u]}function lu(D){return D.replace(new RegExp(SY,"g"),"")}function D9(D,u={}){let F={...u,style:{...hY,...u.style}},$=D.split("\n"),E=[],w=xY(F.style.borderColor),C={...typeof F.style.borderStyle==="string"?sC[F.style.borderStyle]||sC.solid:F.style.borderStyle};if(w)for(let L in C)C[L]=w(C[L]);let Z=F.style.padding%2===0?F.style.padding:F.style.padding+1,M=$.length+Z,W=Math.max(...$.map((L)=>L.length))+Z,X=W+Z,q=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)E.push("".repeat(F.style.marginTop));if(F.title){let L=C.h.repeat(Math.floor((W-lu(F.title).length)/2)),Q=C.h.repeat(W-lu(F.title).length-lu(L).length+Z);E.push(`${q}${C.tl}${L}${F.title}${Q}${C.tr}`)}else E.push(`${q}${C.tl}${C.h.repeat(X)}${C.tr}`);let U=F.style.valign==="center"?Math.floor((M-$.length)/2):F.style.valign==="top"?M-$.length-Z:M-$.length;for(let L=0;L<M;L++)if(L<U||L>=U+$.length)E.push(`${q}${C.v}${" ".repeat(X)}${C.v}`);else{let Q=$[L-U],P=" ".repeat(Z),d=" ".repeat(W-lu(Q).length);E.push(`${q}${C.v}${P}${Q}${d}${C.v}`)}if(E.push(`${q}${C.bl}${C.h.repeat(X)}${C.br}`),F.style.marginBottom>0)E.push("".repeat(F.style.marginBottom));return E.join("\n")}var Vu,aC,GY,qY,HY,UY,oC,OY,VY,LY,tC,z,SY,sC,hY;var U8=C0(()=>{({env:Vu={},argv:aC=[],platform:GY=""}=typeof process==="undefined"?{}:process),qY="NO_COLOR"in Vu||aC.includes("--no-color"),HY="FORCE_COLOR"in Vu||aC.includes("--color"),UY=GY==="win32",oC=Vu.TERM==="dumb",OY=H8&&H8.isatty&&H8.isatty(1)&&Vu.TERM&&!oC,VY="CI"in Vu&&(("GITHUB_ACTIONS"in Vu)||("GITLAB_CI"in Vu)||("CIRCLECI"in Vu)),LY=!qY&&(HY||UY&&!oC||OY||VY);tC={reset:c(0,0),bold:c(1,22,"\x1B[22m\x1B[1m"),dim:c(2,22,"\x1B[22m\x1B[2m"),italic:c(3,23),underline:c(4,24),inverse:c(7,27),hidden:c(8,28),strikethrough:c(9,29),black:c(30,39),red:c(31,39),green:c(32,39),yellow:c(33,39),blue:c(34,39),magenta:c(35,39),cyan:c(36,39),white:c(37,39),gray:c(90,39),bgBlack:c(40,49),bgRed:c(41,49),bgGreen:c(42,49),bgYellow:c(43,49),bgBlue:c(44,49),bgMagenta:c(45,49),bgCyan:c(46,49),bgWhite:c(47,49),blackBright:c(90,39),redBright:c(91,39),greenBright:c(92,39),yellowBright:c(93,39),blueBright:c(94,39),magentaBright:c(95,39),cyanBright:c(96,39),whiteBright:c(97,39),bgBlackBright:c(100,49),bgRedBright:c(101,49),bgGreenBright:c(102,49),bgYellowBright:c(103,49),bgBlueBright:c(104,49),bgMagentaBright:c(105,49),bgCyanBright:c(106,49),bgWhiteBright:c(107,49)};z=IY();SY=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");sC={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},hY={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var q9={};c1(q9,{prompt:()=>WJ});import{stdin as yY,stdout as gY}from"process";import u9 from"readline";import{WriteStream as jY}from"tty";import RY from"tty";function cY({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function M9(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(cY(),"")}function Q0(D,u={}){if(typeof D!="string"||D.length===0||(u={ambiguousIsNarrow:!0,...u},D=M9(D),D.length===0))return 0;D=D.replace(rY()," ");let F=u.ambiguousIsNarrow?1:2,$=0;for(let E of D){let w=E.codePointAt(0);if(w<=31||w>=127&&w<=159||w>=768&&w<=879)continue;switch(nY.eastAsianWidth(E)){case"F":case"W":$+=2;break;case"A":$+=F;break;default:$+=1}}return $}function pY(){let D=new Map;for(let[u,F]of Object.entries(ED)){for(let[$,E]of Object.entries(F))ED[$]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[$]=ED[$],D.set(E[0],E[1]);Object.defineProperty(ED,u,{value:F,enumerable:!1})}return Object.defineProperty(ED,"codes",{value:D,enumerable:!1}),ED.color.close="\x1B[39m",ED.bgColor.close="\x1B[49m",ED.color.ansi=F9(),ED.color.ansi256=C9(),ED.color.ansi16m=$9(),ED.bgColor.ansi=F9(D1),ED.bgColor.ansi256=C9(D1),ED.bgColor.ansi16m=$9(D1),Object.defineProperties(ED,{rgbToAnsi256:{value:(u,F,$)=>u===F&&F===$?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round($/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[$]=F;$.length===3&&($=[...$].map((w)=>w+w).join(""));let E=Number.parseInt($,16);return[E>>16&255,E>>8&255,E&255]},enumerable:!1},hexToAnsi256:{value:(u)=>ED.rgbToAnsi256(...ED.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,$,E;if(u>=232)F=((u-232)*10+8)/255,$=F,E=F;else{u-=16;let Z=u%36;F=Math.floor(u/36)/5,$=Math.floor(Z/6)/5,E=Z%6/5}let w=Math.max(F,$,E)*2;if(w===0)return 30;let C=30+(Math.round(E)<<2|Math.round($)<<1|Math.round(F));return w===2&&(C+=60),C},enumerable:!1},rgbToAnsi:{value:(u,F,$)=>ED.ansi256ToAnsi(ED.rgbToAnsi256(u,F,$)),enumerable:!1},hexToAnsi:{value:(u)=>ED.ansi256ToAnsi(ED.hexToAnsi256(u)),enumerable:!1}}),ED}function B9(D,u,F){return String(D).normalize().replace(/\r\n/g,`
|
|
2
|
+
var n$=Object.create;var{getPrototypeOf:r$,defineProperty:f8,getOwnPropertyNames:d$}=Object;var l$=Object.prototype.hasOwnProperty;var p=(D,u,F)=>{F=D!=null?n$(r$(D)):{};let $=u||!D||!D.__esModule?f8(F,"default",{value:D,enumerable:!0}):F;for(let E of d$(D))if(!l$.call($,E))f8($,E,{get:()=>D[E],enumerable:!0});return $};var b=(D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports);var c1=(D,u)=>{for(var F in u)f8(D,F,{get:u[F],enumerable:!0,configurable:!0,set:($)=>u[F]=()=>$})};var C0=(D,u)=>()=>(D&&(u=D(D=0)),u);var wD=b((j0,t8)=>{Object.defineProperty(j0,"__esModule",{value:!0});j0.default=E7;function i8(D){return i8=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},i8(D)}function E7(D){var u=typeof D==="string"||D instanceof String;if(!u){var F=i8(D);if(D===null)F="null";else if(F==="object")F=D.constructor.name;throw new TypeError("Expected a string but received a ".concat(F))}}t8.exports=j0.default;t8.exports.default=j0.default});var k0=b((R0,a8)=>{Object.defineProperty(R0,"__esModule",{value:!0});R0.default=s8;var B7=Y7(wD());function Y7(D){return D&&D.__esModule?D:{default:D}}var C3="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",Hu="(".concat(C3,"[.]){3}").concat(C3),J7=new RegExp("^".concat(Hu,"$")),ZD="(?:[0-9a-fA-F]{1,4})",Z7=new RegExp("^("+"(?:".concat(ZD,":){7}(?:").concat(ZD,"|:)|")+"(?:".concat(ZD,":){6}(?:").concat(Hu,"|:").concat(ZD,"|:)|")+"(?:".concat(ZD,":){5}(?::").concat(Hu,"|(:").concat(ZD,"){1,2}|:)|")+"(?:".concat(ZD,":){4}(?:(:").concat(ZD,"){0,1}:").concat(Hu,"|(:").concat(ZD,"){1,3}|:)|")+"(?:".concat(ZD,":){3}(?:(:").concat(ZD,"){0,2}:").concat(Hu,"|(:").concat(ZD,"){1,4}|:)|")+"(?:".concat(ZD,":){2}(?:(:").concat(ZD,"){0,3}:").concat(Hu,"|(:").concat(ZD,"){1,5}|:)|")+"(?:".concat(ZD,":){1}(?:(:").concat(ZD,"){0,4}:").concat(Hu,"|(:").concat(ZD,"){1,6}|:)|")+"(?::((?::".concat(ZD,"){0,5}:").concat(Hu,"|(?::").concat(ZD,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");function s8(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(B7.default(D),u=String(u),!u)return s8(D,4)||s8(D,6);if(u==="4")return J7.test(D);if(u==="6")return Z7.test(D);return!1}a8.exports=R0.default;a8.exports.default=R0.default});var Uu=b((g0,o8)=>{Object.defineProperty(g0,"__esModule",{value:!0});g0.default=M7;function M7(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;for(var F in u)if(typeof D[F]==="undefined")D[F]=u[F];return D}o8.exports=g0.default;o8.exports.default=g0.default});var E3=b((b0,e8)=>{Object.defineProperty(b0,"__esModule",{value:!0});b0.default=q7;var W7=$3(wD()),Q7=$3(Uu());function $3(D){return D&&D.__esModule?D:{default:D}}var A7=/[^A-Z0-9+\/=]/i,z7=/^[A-Z0-9_\-]*$/i,G7={urlSafe:!1};function q7(D,u){W7.default(D),u=Q7.default(u,G7);var F=D.length;if(u.urlSafe)return z7.test(D);if(F%4!==0||A7.test(D))return!1;var $=D.indexOf("=");return $===-1||$===F-1||$===F-2&&D[F-1]==="="}e8.exports=b0.default;e8.exports.default=b0.default});var B3=b((_0,D2)=>{Object.defineProperty(_0,"__esModule",{value:!0});_0.default=V7;var U7=w3(wD()),O7=w3(E3());function w3(D){return D&&D.__esModule?D:{default:D}}function V7(D){U7.default(D);var u=D.split("."),F=u.length;if(F!==3)return!1;return u.reduce(function($,E){return $&&O7.default(E,{urlSafe:!0})},!0)}D2.exports=_0.default;D2.exports.default=_0.default});var F2=b((P0,u2)=>{Object.defineProperty(P0,"__esModule",{value:!0});P0.default=x7;var T7=Y3(wD()),N7=Y3(Uu());function Y3(D){return D&&D.__esModule?D:{default:D}}var I7={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function x7(D,u){if(T7.default(D),u=N7.default(u,I7),u.allow_trailing_dot&&D[D.length-1]===".")D=D.substring(0,D.length-1);if(u.allow_wildcard===!0&&D.indexOf("*.")===0)D=D.substring(2);var F=D.split("."),$=F[F.length-1];if(u.require_tld){if(F.length<2)return!1;if(!u.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test($))return!1;if(/\s/.test($))return!1}if(!u.allow_numeric_tld&&/^\d+$/.test($))return!1;return F.every(function(E){if(E.length>63&&!u.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(E))return!1;if(/[\uff01-\uff5e]/.test(E))return!1;if(/^-|-$/.test(E))return!1;if(!u.allow_underscores&&/_/.test(E))return!1;return!0})}u2.exports=P0.default;u2.exports.default=P0.default});var M3=b((v0,C2)=>{Object.defineProperty(v0,"__esModule",{value:!0});v0.default=c7;var h7=m0(wD()),y7=m0(F2()),J3=m0(k0()),j7=m0(Uu());function m0(D){return D&&D.__esModule?D:{default:D}}function R7(D,u){return _7(D)||b7(D,u)||g7(D,u)||k7()}function k7(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g7(D,u){if(!D)return;if(typeof D==="string")return Z3(D,u);var F=Object.prototype.toString.call(D).slice(8,-1);if(F==="Object"&&D.constructor)F=D.constructor.name;if(F==="Map"||F==="Set")return Array.from(D);if(F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F))return Z3(D,u)}function Z3(D,u){if(u==null||u>D.length)u=D.length;for(var F=0,$=new Array(u);F<u;F++)$[F]=D[F];return $}function b7(D,u){var F=D==null?null:typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(F!=null){var $,E,w,C,Z=[],M=!0,W=!1;try{if(w=(F=F.call(D)).next,u===0){if(Object(F)!==F)return;M=!1}else for(;!(M=($=w.call(F)).done)&&(Z.push($.value),Z.length!==u);M=!0);}catch(X){W=!0,E=X}finally{try{if(!M&&F.return!=null&&(C=F.return(),Object(C)!==C))return}finally{if(W)throw E}}return Z}}function _7(D){if(Array.isArray(D))return D}var P7={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},m7=/^\[([^\]]+)\](?::([0-9]+))?$/;function v7(D){return Object.prototype.toString.call(D)==="[object RegExp]"}function K3(D,u){for(var F=0;F<u.length;F++){var $=u[F];if(D===$||v7($)&&$.test(D))return!0}return!1}function c7(D,u){if(h7.default(D),!D||/[\s<>]/.test(D))return!1;if(D.indexOf("mailto:")===0)return!1;if(u=j7.default(u,P7),u.validate_length&&D.length>=2083)return!1;if(!u.allow_fragments&&D.includes("#"))return!1;if(!u.allow_query_components&&(D.includes("?")||D.includes("&")))return!1;var F,$,E,w,C,Z,M,W;if(M=D.split("#"),D=M.shift(),M=D.split("?"),D=M.shift(),M=D.split("://"),M.length>1){if(F=M.shift().toLowerCase(),u.require_valid_protocol&&u.protocols.indexOf(F)===-1)return!1}else if(u.require_protocol)return!1;else if(D.slice(0,2)==="//"){if(!u.allow_protocol_relative_urls)return!1;M[0]=D.slice(2)}if(D=M.join("://"),D==="")return!1;if(M=D.split("/"),D=M.shift(),D===""&&!u.require_host)return!0;if(M=D.split("@"),M.length>1){if(u.disallow_auth)return!1;if(M[0]==="")return!1;if($=M.shift(),$.indexOf(":")>=0&&$.split(":").length>2)return!1;var X=$.split(":"),q=R7(X,2),L=q[0],U=q[1];if(L===""&&U==="")return!1}w=M.join("@"),Z=null,W=null;var A=w.match(m7);if(A)E="",W=A[1],Z=A[2]||null;else if(M=w.split(":"),E=M.shift(),M.length)Z=M.join(":");if(Z!==null&&Z.length>0){if(C=parseInt(Z,10),!/^[0-9]+$/.test(Z)||C<=0||C>65535)return!1}else if(u.require_port)return!1;if(u.host_whitelist)return K3(E,u.host_whitelist);if(E===""&&!u.require_host)return!0;if(!J3.default(E)&&!y7.default(E,u)&&(!W||!J3.default(W,6)))return!1;if(E=E||W,u.host_blacklist&&K3(E,u.host_blacklist))return!1;return!0}C2.exports=v0.default;C2.exports.default=v0.default});var X3=b((c0,$2)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.default=l7;var n7=r7(wD());function r7(D){return D&&D.__esModule?D:{default:D}}var d7=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;function l7(D){return n7.default(D),d7.test(D)}$2.exports=c0.default;$2.exports.default=c0.default});var A3=b((W3)=>{Object.defineProperty(W3,"__esModule",{value:!0});W3.default=e7;W3.locales=void 0;var i7=t7(wD());function t7(D){return D&&D.__esModule?D:{default:D}}var f0={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,DZ:/^(DZ\d{24})$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MA:/^(MA[0-9]{26})$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/};function s7(D){var u=D.filter(function(F){return!(F in f0)});if(u.length>0)return!1;return!0}function a7(D,u){var F=D.replace(/[\s\-]+/gi,"").toUpperCase(),$=F.slice(0,2).toUpperCase(),E=$ in f0;if(u.whitelist){if(!s7(u.whitelist))return!1;var w=u.whitelist.includes($);if(!w)return!1}if(u.blacklist){var C=u.blacklist.includes($);if(C)return!1}return E&&f0[$].test(F)}function o7(D){var u=D.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),F=u.slice(4)+u.slice(0,4),$=F.replace(/[A-Z]/g,function(w){return w.charCodeAt(0)-55}),E=$.match(/\d{1,7}/g).reduce(function(w,C){return Number(w+C)%97},"");return E===1}function e7(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i7.default(D),a7(D,u)&&o7(D)}var wW=W3.locales=Object.keys(f0)});var z3=b((n0,E2)=>{Object.defineProperty(n0,"__esModule",{value:!0});n0.default=$E;var uE=FE(wD());function FE(D){return D&&D.__esModule?D:{default:D}}var CE={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,7:/^[0-9A-F]{8}-[0-9A-F]{4}-7[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};function $E(D,u){uE.default(D);var F=CE[![void 0,null].includes(u)?u:"all"];return!!F&&F.test(D)}E2.exports=n0.default;E2.exports.default=n0.default});var G3=b((r0,w2)=>{Object.defineProperty(r0,"__esModule",{value:!0});r0.default=JE;var wE=BE(wD());function BE(D){return D&&D.__esModule?D:{default:D}}var YE=/^[\x00-\x7F]+$/;function JE(D){return wE.default(D),YE.test(D)}w2.exports=r0.default;w2.exports.default=r0.default});var q3=b((d0,Y2)=>{Object.defineProperty(d0,"__esModule",{value:!0});d0.default=XE;var KE=ME(wD());function ME(D){return D&&D.__esModule?D:{default:D}}function B2(D){return B2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},B2(D)}function XE(D,u){KE.default(D);var F,$;if(B2(u)==="object")F=u.min||0,$=u.max;else F=arguments[1],$=arguments[2];var E=encodeURI(D).split(/%..|./).length-1;return E>=F&&(typeof $==="undefined"||E<=$)}Y2.exports=d0.default;Y2.exports.default=d0.default});var U3=b((l0,Z2)=>{Object.defineProperty(l0,"__esModule",{value:!0});l0.default=IE;var QE=w0(wD()),J2=w0(q3()),AE=w0(F2()),H3=w0(k0()),zE=w0(Uu());function w0(D){return D&&D.__esModule?D:{default:D}}var GE={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},qE=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,HE=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,UE=/^[a-z\d]+$/,OE=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,VE=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,LE=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,TE=254;function NE(D){var u=D.replace(/^"(.+)"$/,"$1");if(!u.trim())return!1;var F=/[\.";<>]/.test(u);if(F){if(u===D)return!1;var $=u.split('"').length===u.split('\\"').length;if(!$)return!1}return!0}function IE(D,u){if(QE.default(D),u=zE.default(u,GE),u.require_display_name||u.allow_display_name){var F=D.match(qE);if(F){var $=F[1];if(D=D.replace($,"").replace(/(^<|>$)/g,""),$.endsWith(" "))$=$.slice(0,-1);if(!NE($))return!1}else if(u.require_display_name)return!1}if(!u.ignore_max_length&&D.length>TE)return!1;var E=D.split("@"),w=E.pop(),C=w.toLowerCase();if(u.host_blacklist.includes(C))return!1;if(u.host_whitelist.length>0&&!u.host_whitelist.includes(C))return!1;var Z=E.join("@");if(u.domain_specific_validation&&(C==="gmail.com"||C==="googlemail.com")){Z=Z.toLowerCase();var M=Z.split("+")[0];if(!J2.default(M.replace(/\./g,""),{min:6,max:30}))return!1;var W=M.split(".");for(var X=0;X<W.length;X++)if(!UE.test(W[X]))return!1}if(u.ignore_max_length===!1&&(!J2.default(Z,{max:64})||!J2.default(w,{max:254})))return!1;if(!AE.default(w,{require_tld:u.require_tld,ignore_max_length:u.ignore_max_length,allow_underscores:u.allow_underscores})){if(!u.allow_ip_domain)return!1;if(!H3.default(w)){if(!w.startsWith("[")||!w.endsWith("]"))return!1;var q=w.slice(1,-1);if(q.length===0||!H3.default(q))return!1}}if(Z[0]==='"')return Z=Z.slice(1,Z.length-1),u.allow_utf8_local_part?LE.test(Z):OE.test(Z);var L=u.allow_utf8_local_part?VE:HE,U=Z.split(".");for(var A=0;A<U.length;A++)if(!L.test(U[A]))return!1;if(u.blacklisted_chars){if(Z.search(new RegExp("[".concat(u.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}Z2.exports=l0.default;Z2.exports.default=l0.default});var D8=b((x3)=>{Object.defineProperty(x3,"__esModule",{value:!0});x3.farsiLocales=x3.englishLocales=x3.dotDecimal=x3.decimal=x3.commaDecimal=x3.bengaliLocales=x3.arabicLocales=x3.alphanumeric=x3.alpha=void 0;var _D=x3.alpha={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[\u0410-\u042F]+$/i,"cs-CZ":/^[A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[\u0391-\u03CE]+$/i,"es-ES":/^[A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fa-IR":/^[\u0627\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u06CC]+$/i,"fi-FI":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"nb-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[A-Z\u00C6\u00D8\u00C5]+$/i,"hu-HU":/^[A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"pl-PL":/^[A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E50\s]+$/i,"tr-TR":/^[A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"vi-VN":/^[A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,"ko-KR":/^[\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,ar:/^[\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[\u05D0-\u05EA]+$/,fa:/^['\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/},PD=x3.alphanumeric={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZ\u00C7\u018F\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"bg-BG":/^[0-9\u0410-\u042F]+$/i,"cs-CZ":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u011A\u00CD\u0147\u00D3\u0158\u0160\u0164\u00DA\u016E\u00DD\u017D]+$/i,"da-DK":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"de-DE":/^[0-9A-Z\u00C4\u00D6\u00DC\u00DF]+$/i,"el-GR":/^[0-9\u0391-\u03C9]+$/i,"es-ES":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D1\u00D3\u00DA\u00DC]+$/i,"fi-FI":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"fr-FR":/^[0-9A-Z\u00C0\u00C2\u00C6\u00C7\u00C9\u00C8\u00CA\u00CB\u00CF\u00CE\u00D4\u0152\u00D9\u00DB\u00DC\u0178]+$/i,"it-IT":/^[0-9A-Z\u00C0\u00C9\u00C8\u00CC\u00CE\u00D3\u00D2\u00D9]+$/i,"ja-JP":/^[0-9\uFF10-\uFF19\u3041-\u3093\u30A1-\u30F6\uFF66-\uFF9F\u4E00-\u9FA0\u30FC\u30FB\u3002\u3001]+$/i,"hu-HU":/^[0-9A-Z\u00C1\u00C9\u00CD\u00D3\u00D6\u0150\u00DA\u00DC\u0170]+$/i,"nb-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"nl-NL":/^[0-9A-Z\u00C1\u00C9\u00CB\u00CF\u00D3\u00D6\u00DC\u00DA]+$/i,"nn-NO":/^[0-9A-Z\u00C6\u00D8\u00C5]+$/i,"pl-PL":/^[0-9A-Z\u0104\u0106\u0118\u015A\u0141\u0143\u00D3\u017B\u0179]+$/i,"pt-PT":/^[0-9A-Z\u00C3\u00C1\u00C0\u00C2\u00C4\u00C7\u00C9\u00CA\u00CB\u00CD\u00CF\u00D5\u00D3\u00D4\u00D6\u00DA\u00DC]+$/i,"ru-RU":/^[0-9\u0410-\u042F\u0401]+$/i,"kk-KZ":/^[0-9\u0410-\u042F\u0401\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,"sl-SI":/^[0-9A-Z\u010C\u0106\u0110\u0160\u017D]+$/i,"sk-SK":/^[0-9A-Z\u00C1\u010C\u010E\u00C9\u00CD\u0147\u00D3\u0160\u0164\u00DA\u00DD\u017D\u0139\u0154\u013D\u00C4\u00D4]+$/i,"sr-RS@latin":/^[0-9A-Z\u010C\u0106\u017D\u0160\u0110]+$/i,"sr-RS":/^[0-9\u0410-\u042F\u0402\u0408\u0409\u040A\u040B\u040F]+$/i,"sv-SE":/^[0-9A-Z\u00C5\u00C4\u00D6]+$/i,"th-TH":/^[\u0E01-\u0E59\s]+$/i,"tr-TR":/^[0-9A-Z\u00C7\u011E\u0130\u0131\u00D6\u015E\u00DC]+$/i,"uk-UA":/^[0-9\u0410-\u0429\u042C\u042E\u042F\u0404I\u0407\u0490\u0456]+$/i,"ko-KR":/^[0-9\u3131-\u314E\u314F-\u3163\uAC00-\uD7A3]*$/,"ku-IQ":/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0626\u0627\u0628\u067E\u062A\u062C\u0686\u062D\u062E\u062F\u0631\u0695\u0632\u0698\u0633\u0634\u0639\u063A\u0641\u06A4\u0642\u06A9\u06AF\u0644\u06B5\u0645\u0646\u0648\u06C6\u06BE\u06D5\u06CC\u06CE\u064A\u0637\u0624\u062B\u0622\u0625\u0623\u0643\u0636\u0635\u0629\u0638\u0630]+$/i,"vi-VN":/^[0-9A-Z\u00C0\u00C1\u1EA0\u1EA2\u00C3\u00C2\u1EA6\u1EA4\u1EAC\u1EA8\u1EAA\u0102\u1EB0\u1EAE\u1EB6\u1EB2\u1EB4\u0110\u00C8\u00C9\u1EB8\u1EBA\u1EBC\u00CA\u1EC0\u1EBE\u1EC6\u1EC2\u1EC4\u00CC\u00CD\u1ECA\u1EC8\u0128\u00D2\u00D3\u1ECC\u1ECE\u00D5\u00D4\u1ED2\u1ED0\u1ED8\u1ED4\u1ED6\u01A0\u1EDC\u1EDA\u1EE2\u1EDE\u1EE0\u00D9\u00DA\u1EE4\u1EE6\u0168\u01AF\u1EEA\u1EE8\u1EF0\u1EEC\u1EEE\u1EF2\u00DD\u1EF4\u1EF6\u1EF8]+$/i,ar:/^[\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u06690-9\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062A\u062B\u062C\u062D\u062E\u062F\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064A\u064B\u064C\u064D\u064E\u064F\u0650\u0651\u0652\u0670]+$/,he:/^[0-9\u05D0-\u05EA]+$/,fa:/^['0-9\u0622\u0627\u0621\u0623\u0624\u0626\u0628\u067E\u062A\u062B\u062C\u0686\u062D\u062E\u062F\u0630\u0631\u0632\u0698\u0633\u0634\u0635\u0636\u0637\u0638\u0639\u063A\u0641\u0642\u06A9\u06AF\u0644\u0645\u0646\u0648\u0647\u0629\u06CC\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9\u06F0']+$/i,bn:/^['\u0980\u0981\u0982\u0983\u0985\u0986\u0987\u0988\u0989\u098A\u098B\u098C\u098F\u0990\u0993\u0994\u0995\u0996\u0997\u0998\u0999\u099A\u099B\u099C\u099D\u099E\u099F\u09A0\u09A1\u09A2\u09A3\u09A4\u09A5\u09A6\u09A7\u09A8\u09AA\u09AB\u09AC\u09AD\u09AE\u09AF\u09B0\u09B2\u09B6\u09B7\u09B8\u09B9\u09BC\u09BD\u09BE\u09BF\u09C0\u09C1\u09C2\u09C3\u09C4\u09C7\u09C8\u09CB\u09CC\u09CD\u09CE\u09D7\u09DC\u09DD\u09DF\u09E0\u09E1\u09E2\u09E3\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF\u09F0\u09F1\u09F2\u09F3\u09F4\u09F5\u09F6\u09F7\u09F8\u09F9\u09FA\u09FB']+$/,eo:/^[0-9ABC\u0108D-G\u011CH\u0124IJ\u0134K-PRS\u015CTU\u016CVZ]+$/i,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/},yD=x3.decimal={"en-US":".",ar:"\u066B"},O3=x3.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(p0=0;p0<O3.length;p0++)B0="en-".concat(O3[p0]),_D[B0]=_D["en-US"],PD[B0]=PD["en-US"],yD[B0]=yD["en-US"];var B0,p0,V3=x3.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(i0=0;i0<V3.length;i0++)Y0="ar-".concat(V3[i0]),_D[Y0]=_D.ar,PD[Y0]=PD.ar,yD[Y0]=yD.ar;var Y0,i0,L3=x3.farsiLocales=["IR","AF"];for(s0=0;s0<L3.length;s0++)t0="fa-".concat(L3[s0]),PD[t0]=PD.fa,yD[t0]=yD.ar;var t0,s0,T3=x3.bengaliLocales=["BD","IN"];for(a0=0;a0<T3.length;a0++)J0="bn-".concat(T3[a0]),_D[J0]=_D.bn,PD[J0]=PD.bn,yD[J0]=yD["en-US"];var J0,a0,N3=x3.dotDecimal=["ar-EG","ar-LB","ar-LY"],I3=x3.commaDecimal=["bg-BG","cs-CZ","da-DK","de-DE","el-GR","en-ZM","eo","es-ES","fr-CA","fr-FR","id-ID","it-IT","ku-IQ","hi-IN","hu-HU","nb-NO","nn-NO","nl-NL","pl-PL","pt-PT","ru-RU","kk-KZ","si-LK","sl-SI","sr-RS@latin","sr-RS","sv-SE","tr-TR","uk-UA","vi-VN"];for(o0=0;o0<N3.length;o0++)yD[N3[o0]]=yD["en-US"];var o0;for(e0=0;e0<I3.length;e0++)yD[I3[e0]]=",";var e0;_D["fr-CA"]=_D["fr-FR"];PD["fr-CA"]=PD["fr-FR"];_D["pt-BR"]=_D["pt-PT"];PD["pt-BR"]=PD["pt-PT"];yD["pt-BR"]=yD["pt-PT"];_D["pl-Pl"]=_D["pl-PL"];PD["pl-Pl"]=PD["pl-PL"];yD["pl-Pl"]=yD["pl-PL"];_D["fa-AF"]=_D.fa});var j3=b((h3)=>{Object.defineProperty(h3,"__esModule",{value:!0});h3.default=mE;h3.locales=void 0;var _E=PE(wD()),K2=D8();function PE(D){return D&&D.__esModule?D:{default:D}}function mE(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_E.default(D);var $=D,E=F.ignore;if(E)if(E instanceof RegExp)$=$.replace(E,"");else if(typeof E==="string")$=$.replace(new RegExp("[".concat(E.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in K2.alpha)return K2.alpha[u].test($);throw new Error("Invalid locale '".concat(u,"'"))}var JW=h3.locales=Object.keys(K2.alpha)});var k3=b((u8,M2)=>{Object.defineProperty(u8,"__esModule",{value:!0});u8.default=iE;var cE=R3(wD()),fE=R3(Uu());function R3(D){return D&&D.__esModule?D:{default:D}}var nE=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,rE=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,dE=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,lE=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,pE={checkDMS:!1};function iE(D,u){if(cE.default(D),u=fE.default(u,pE),!D.includes(","))return!1;var F=D.split(",");if(F[0].startsWith("(")&&!F[1].endsWith(")")||F[1].endsWith(")")&&!F[0].startsWith("("))return!1;if(u.checkDMS)return dE.test(F[0])&&lE.test(F[1]);return nE.test(F[0])&&rE.test(F[1])}M2.exports=u8.default;M2.exports.default=u8.default});var b3=b((F8,X2)=>{Object.defineProperty(F8,"__esModule",{value:!0});F8.default=void 0;var sE=function D(u,F){return u.some(function($){return F===$})},KW=F8.default=sE;X2.exports=F8.default;X2.exports.default=F8.default});var P3=b((C8,Q2)=>{Object.defineProperty(C8,"__esModule",{value:!0});C8.default=C5;var aE=W2(Uu()),oE=W2(wD()),eE=W2(b3()),_3=D8();function W2(D){return D&&D.__esModule?D:{default:D}}function D5(D){var u=new RegExp("^[-+]?([0-9]+)?(\\".concat(_3.decimal[D.locale],"[0-9]{").concat(D.decimal_digits,"})").concat(D.force_decimal?"":"?","$"));return u}var u5={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},F5=["","-","+"];function C5(D,u){if(oE.default(D),u=aE.default(u,u5),u.locale in _3.decimal)return!eE.default(F5,D.replace(/ /g,""))&&D5(u).test(D);throw new Error("Invalid locale '".concat(u.locale,"'"))}Q2.exports=C8.default;Q2.exports.default=C8.default});var m3=b(($8,A2)=>{Object.defineProperty($8,"__esModule",{value:!0});$8.default=Y5;var E5=w5(wD());function w5(D){return D&&D.__esModule?D:{default:D}}var B5=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;function Y5(D){return E5.default(D),B5.test(D)}A2.exports=$8.default;A2.exports.default=$8.default});var v3=b((E8,z2)=>{Object.defineProperty(E8,"__esModule",{value:!0});E8.default=M5;var Z5=K5(wD());function K5(D){return D&&D.__esModule?D:{default:D}}function M5(D){Z5.default(D);var u=D.replace(/[- ]+/g,""),F=0,$,E,w;for(var C=u.length-1;C>=0;C--){if($=u.substring(C,C+1),E=parseInt($,10),w)if(E*=2,E>=10)F+=E%10+1;else F+=E;else F+=E;w=!w}return!!(F%10===0?u:!1)}z2.exports=E8.default;z2.exports.default=E8.default});var f3=b((w8,G2)=>{Object.defineProperty(w8,"__esModule",{value:!0});w8.default=z5;var W5=c3(wD()),Q5=c3(v3());function c3(D){return D&&D.__esModule?D:{default:D}}var _u={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},A5=function(){var D=[];for(var u in _u)if(_u.hasOwnProperty(u))D.push(_u[u]);return D}();function z5(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};W5.default(D);var F=u.provider,$=D.replace(/[- ]+/g,"");if(F&&F.toLowerCase()in _u){if(!_u[F.toLowerCase()].test($))return!1}else if(F&&!(F.toLowerCase()in _u))throw new Error("".concat(F," is not a valid credit card provider."));else if(!A5.some(function(E){return E.test($)}))return!1;return Q5.default(D)}G2.exports=w8.default;G2.exports.default=w8.default});var d3=b((n3)=>{Object.defineProperty(n3,"__esModule",{value:!0});n3.default=U5;n3.locales=void 0;var q5=H5(wD()),q2=D8();function H5(D){return D&&D.__esModule?D:{default:D}}function U5(D){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};q5.default(D);var $=D,E=F.ignore;if(E)if(E instanceof RegExp)$=$.replace(E,"");else if(typeof E==="string")$=$.replace(new RegExp("[".concat(E.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(u in q2.alphanumeric)return q2.alphanumeric[u].test($);throw new Error("Invalid locale '".concat(u,"'"))}var MW=n3.locales=Object.keys(q2.alphanumeric)});var p3=b((B8,H2)=>{Object.defineProperty(B8,"__esModule",{value:!0});B8.default=T5;var V5=L5(wD());function L5(D){return D&&D.__esModule?D:{default:D}}var l3={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{1}\d{8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/,ZA:/^[TAMD]\d{8}$/};function T5(D,u){V5.default(D);var F=D.replace(/\s/g,"").toUpperCase();return u.toUpperCase()in l3&&l3[u].test(F)}H2.exports=B8.default;H2.exports.default=B8.default});var O2=b((t3)=>{Object.defineProperty(t3,"__esModule",{value:!0});t3.default=S5;t3.locales=void 0;var I5=x5(wD());function x5(D){return D&&D.__esModule?D:{default:D}}var i3=/^\d{3}$/,nD=/^\d{4}$/,jD=/^\d{5}$/,U2=/^\d{6}$/,Pu={AD:/^AD\d{3}$/,AT:nD,AU:nD,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:nD,BG:nD,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:nD,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:jD,DK:nD,DO:jD,DZ:jD,EE:jD,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:jD,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:nD,ID:jD,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:i3,IT:jD,JP:/^\d{3}\-\d{4}$/,KE:jD,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:nD,LV:/^LV\-\d{4}$/,LK:jD,MG:i3,MX:jD,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:jD,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:nD,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:nD,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:U2,RU:U2,SA:jD,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:U2,SI:nD,SK:/^\d{3}\s?\d{2}$/,TH:jD,TN:nD,TW:/^\d{3}(\d{2})?$/,UA:jD,US:/^\d{5}(-\d{4})?$/,ZA:nD,ZM:jD},WW=t3.locales=Object.keys(Pu);function S5(D,u){if(I5.default(D),u in Pu)return Pu[u].test(D);else if(u==="any"){for(var F in Pu)if(Pu.hasOwnProperty(F)){var $=Pu[F];if($.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}});var V2=b((a3)=>{Object.defineProperty(a3,"__esModule",{value:!0});a3.default=R5;a3.locales=void 0;var y5=j5(wD());function j5(D){return D&&D.__esModule?D:{default:D}}var CD={"am-AM":/^(\+?374|0)(33|4[134]|55|77|88|9[13-689])\d{6}$/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SD":/^((\+?249)|0)?(9[012369]|1[012])\d{7}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"fr-CF":/^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-MW":/^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}$/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"fr-WF":/^(\+681)?\d{6}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"so-SO":/^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};CD["en-CA"]=CD["en-US"];CD["fr-CA"]=CD["en-CA"];CD["fr-BE"]=CD["nl-BE"];CD["zh-HK"]=CD["en-HK"];CD["zh-MO"]=CD["en-MO"];CD["ga-IE"]=CD["en-IE"];CD["fr-CH"]=CD["de-CH"];CD["it-CH"]=CD["fr-CH"];function R5(D,u,F){if(y5.default(D),F&&F.strictMode&&!D.startsWith("+"))return!1;if(Array.isArray(u))return u.some(function(w){if(CD.hasOwnProperty(w)){var C=CD[w];if(C.test(D))return!0}return!1});else if(u in CD)return CD[u].test(D);else if(!u||u==="any"){for(var $ in CD)if(CD.hasOwnProperty($)){var E=CD[$];if(E.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(u,"'"))}var AW=a3.locales=Object.keys(CD)});var S2=b((I2,x2)=>{(function(D,u){typeof I2=="object"&&typeof x2!="undefined"?x2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs=u()})(I2,function(){var D=1000,u=60000,F=3600000,$="millisecond",E="second",w="minute",C="hour",Z="day",M="week",W="month",X="quarter",q="year",L="date",U="Invalid Date",A=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,P=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,n={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var T=["th","st","nd","rd"],O=R%100;return"["+R+(T[(O-20)%10]||T[O]||T[0])+"]"}},d=function(R,T,O){var h=String(R);return!h||h.length>=T?R:""+Array(T+1-h.length).join(O)+R},uD={s:d,z:function(R){var T=-R.utcOffset(),O=Math.abs(T),h=Math.floor(O/60),N=O%60;return(T<=0?"+":"-")+d(h,2,"0")+":"+d(N,2,"0")},m:function R(T,O){if(T.date()<O.date())return-R(O,T);var h=12*(O.year()-T.year())+(O.month()-T.month()),N=T.clone().add(h,W),g=O-N<0,_=T.clone().add(h+(g?-1:1),W);return+(-(h+(O-N)/(g?N-_:_-N))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:W,y:q,w:M,d:Z,D:L,h:C,m:w,s:E,ms:$,Q:X}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},FD="en",xD={};xD[FD]=n;var dD="$isDayjsObject",SD=function(R){return R instanceof UD||!(!R||!R[dD])},VD=function R(T,O,h){var N;if(!T)return FD;if(typeof T=="string"){var g=T.toLowerCase();xD[g]&&(N=g),O&&(xD[g]=O,N=g);var _=T.split("-");if(!N&&_.length>1)return R(_[0])}else{var v=T.name;xD[v]=T,N=v}return!h&&N&&(FD=N),N||!h&&FD},i=function(R,T){if(SD(R))return R.clone();var O=typeof T=="object"?T:{};return O.date=R,O.args=arguments,new UD(O)},m=uD;m.l=VD,m.i=SD,m.w=function(R,T){return i(R,{locale:T.$L,utc:T.$u,x:T.$x,$offset:T.$offset})};var UD=function(){function R(O){this.$L=VD(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[dD]=!0}var T=R.prototype;return T.parse=function(O){this.$d=function(h){var{date:N,utc:g}=h;if(N===null)return new Date(NaN);if(m.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var _=N.match(A);if(_){var v=_[2]-1||0,l=(_[7]||"0").substring(0,3);return g?new Date(Date.UTC(_[1],v,_[3]||1,_[4]||0,_[5]||0,_[6]||0,l)):new Date(_[1],v,_[3]||1,_[4]||0,_[5]||0,_[6]||0,l)}}return new Date(N)}(O),this.init()},T.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},T.$utils=function(){return m},T.isValid=function(){return this.$d.toString()!==U},T.isSame=function(O,h){var N=i(O);return this.startOf(h)<=N&&N<=this.endOf(h)},T.isAfter=function(O,h){return i(O)<this.startOf(h)},T.isBefore=function(O,h){return this.endOf(h)<i(O)},T.$g=function(O,h,N){return m.u(O)?this[h]:this.set(N,O)},T.unix=function(){return Math.floor(this.valueOf()/1000)},T.valueOf=function(){return this.$d.getTime()},T.startOf=function(O,h){var N=this,g=!!m.u(h)||h,_=m.p(O),v=function(XD,KD){var bD=m.w(N.$u?Date.UTC(N.$y,KD,XD):new Date(N.$y,KD,XD),N);return g?bD:bD.endOf(Z)},l=function(XD,KD){return m.w(N.toDate()[XD].apply(N.toDate("s"),(g?[0,0,0,0]:[23,59,59,999]).slice(KD)),N)},a=this.$W,JD=this.$M,TD=this.$D,Eu="set"+(this.$u?"UTC":"");switch(_){case q:return g?v(1,0):v(31,11);case W:return g?v(1,JD):v(0,JD+1);case M:var sD=this.$locale().weekStart||0,Xu=(a<sD?a+7:a)-sD;return v(g?TD-Xu:TD+(6-Xu),JD);case Z:case L:return l(Eu+"Hours",0);case C:return l(Eu+"Minutes",1);case w:return l(Eu+"Seconds",2);case E:return l(Eu+"Milliseconds",3);default:return this.clone()}},T.endOf=function(O){return this.startOf(O,!1)},T.$set=function(O,h){var N,g=m.p(O),_="set"+(this.$u?"UTC":""),v=(N={},N[Z]=_+"Date",N[L]=_+"Date",N[W]=_+"Month",N[q]=_+"FullYear",N[C]=_+"Hours",N[w]=_+"Minutes",N[E]=_+"Seconds",N[$]=_+"Milliseconds",N)[g],l=g===Z?this.$D+(h-this.$W):h;if(g===W||g===q){var a=this.clone().set(L,1);a.$d[v](l),a.init(),this.$d=a.set(L,Math.min(this.$D,a.daysInMonth())).$d}else v&&this.$d[v](l);return this.init(),this},T.set=function(O,h){return this.clone().$set(O,h)},T.get=function(O){return this[m.p(O)]()},T.add=function(O,h){var N,g=this;O=Number(O);var _=m.p(h),v=function(JD){var TD=i(g);return m.w(TD.date(TD.date()+Math.round(JD*O)),g)};if(_===W)return this.set(W,this.$M+O);if(_===q)return this.set(q,this.$y+O);if(_===Z)return v(1);if(_===M)return v(7);var l=(N={},N[w]=u,N[C]=F,N[E]=D,N)[_]||1,a=this.$d.getTime()+O*l;return m.w(a,this)},T.subtract=function(O,h){return this.add(-1*O,h)},T.format=function(O){var h=this,N=this.$locale();if(!this.isValid())return N.invalidDate||U;var g=O||"YYYY-MM-DDTHH:mm:ssZ",_=m.z(this),v=this.$H,l=this.$m,a=this.$M,JD=N.weekdays,TD=N.months,Eu=N.meridiem,sD=function(KD,bD,aD,wu){return KD&&(KD[bD]||KD(h,g))||aD[bD].slice(0,wu)},Xu=function(KD){return m.s(v%12||12,KD,"0")},XD=Eu||function(KD,bD,aD){var wu=KD<12?"AM":"PM";return aD?wu.toLowerCase():wu};return g.replace(P,function(KD,bD){return bD||function(aD){switch(aD){case"YY":return String(h.$y).slice(-2);case"YYYY":return m.s(h.$y,4,"0");case"M":return a+1;case"MM":return m.s(a+1,2,"0");case"MMM":return sD(N.monthsShort,a,TD,3);case"MMMM":return sD(TD,a);case"D":return h.$D;case"DD":return m.s(h.$D,2,"0");case"d":return String(h.$W);case"dd":return sD(N.weekdaysMin,h.$W,JD,2);case"ddd":return sD(N.weekdaysShort,h.$W,JD,3);case"dddd":return JD[h.$W];case"H":return String(v);case"HH":return m.s(v,2,"0");case"h":return Xu(1);case"hh":return Xu(2);case"a":return XD(v,l,!0);case"A":return XD(v,l,!1);case"m":return String(l);case"mm":return m.s(l,2,"0");case"s":return String(h.$s);case"ss":return m.s(h.$s,2,"0");case"SSS":return m.s(h.$ms,3,"0");case"Z":return _}return null}(KD)||_.replace(":","")})},T.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},T.diff=function(O,h,N){var g,_=this,v=m.p(h),l=i(O),a=(l.utcOffset()-this.utcOffset())*u,JD=this-l,TD=function(){return m.m(_,l)};switch(v){case q:g=TD()/12;break;case W:g=TD();break;case X:g=TD()/3;break;case M:g=(JD-a)/604800000;break;case Z:g=(JD-a)/86400000;break;case C:g=JD/F;break;case w:g=JD/u;break;case E:g=JD/D;break;default:g=JD}return N?g:m.a(g)},T.daysInMonth=function(){return this.endOf(W).$D},T.$locale=function(){return xD[this.$L]},T.locale=function(O,h){if(!O)return this.$L;var N=this.clone(),g=VD(O,h,!0);return g&&(N.$L=g),N},T.clone=function(){return m.w(this.$d,this)},T.toDate=function(){return new Date(this.valueOf())},T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toISOString=function(){return this.$d.toISOString()},T.toString=function(){return this.$d.toUTCString()},R}(),LD=UD.prototype;return i.prototype=LD,[["$ms",$],["$s",E],["$m",w],["$H",C],["$W",Z],["$M",W],["$y",q],["$D",L]].forEach(function(R){LD[R[1]]=function(T){return this.$g(T,R[0],R[1])}}),i.extend=function(R,T){return R.$i||(R(T,UD,i),R.$i=!0),i},i.locale=VD,i.isDayjs=SD,i.unix=function(R){return i(1000*R)},i.en=xD[FD],i.Ls=xD,i.p={},i})});var VF=b((h2,y2)=>{(function(D,u){typeof h2=="object"&&typeof y2!="undefined"?y2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrAfter=u()})(h2,function(){return function(D,u){u.prototype.isSameOrAfter=function(F,$){return this.isSame(F,$)||this.isAfter(F,$)}}})});var LF=b((j2,R2)=>{(function(D,u){typeof j2=="object"&&typeof R2!="undefined"?R2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrBefore=u()})(j2,function(){return function(D,u){u.prototype.isSameOrBefore=function(F,$){return this.isSame(F,$)||this.isBefore(F,$)}}})});var TF=b((k2,g2)=>{(function(D,u){typeof k2=="object"&&typeof g2!="undefined"?g2.exports=u():typeof define=="function"&&define.amd?define(u):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_customParseFormat=u()})(k2,function(){var D={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},u=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,F=/\d/,$=/\d\d/,E=/\d\d?/,w=/\d*[^-_:/,()\s\d]+/,C={},Z=function(A){return(A=+A)+(A>68?1900:2000)},M=function(A){return function(P){this[A]=+P}},W=[/[+-]\d\d:?(\d\d)?|Z/,function(A){(this.zone||(this.zone={})).offset=function(P){if(!P)return 0;if(P==="Z")return 0;var n=P.match(/([+-]|\d\d)/g),d=60*n[1]+(+n[2]||0);return d===0?0:n[0]==="+"?-d:d}(A)}],X=function(A){var P=C[A];return P&&(P.indexOf?P:P.s.concat(P.f))},q=function(A,P){var n,d=C.meridiem;if(d){for(var uD=1;uD<=24;uD+=1)if(A.indexOf(d(uD,0,P))>-1){n=uD>12;break}}else n=A===(P?"pm":"PM");return n},L={A:[w,function(A){this.afternoon=q(A,!1)}],a:[w,function(A){this.afternoon=q(A,!0)}],Q:[F,function(A){this.month=3*(A-1)+1}],S:[F,function(A){this.milliseconds=100*+A}],SS:[$,function(A){this.milliseconds=10*+A}],SSS:[/\d{3}/,function(A){this.milliseconds=+A}],s:[E,M("seconds")],ss:[E,M("seconds")],m:[E,M("minutes")],mm:[E,M("minutes")],H:[E,M("hours")],h:[E,M("hours")],HH:[E,M("hours")],hh:[E,M("hours")],D:[E,M("day")],DD:[$,M("day")],Do:[w,function(A){var P=C.ordinal,n=A.match(/\d+/);if(this.day=n[0],P)for(var d=1;d<=31;d+=1)P(d).replace(/\[|\]/g,"")===A&&(this.day=d)}],w:[E,M("week")],ww:[$,M("week")],M:[E,M("month")],MM:[$,M("month")],MMM:[w,function(A){var P=X("months"),n=(X("monthsShort")||P.map(function(d){return d.slice(0,3)})).indexOf(A)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[w,function(A){var P=X("months").indexOf(A)+1;if(P<1)throw new Error;this.month=P%12||P}],Y:[/[+-]?\d+/,M("year")],YY:[$,function(A){this.year=Z(A)}],YYYY:[/\d{4}/,M("year")],Z:W,ZZ:W};function U(A){var P,n;P=A,n=C&&C.formats;for(var d=(A=P.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(i,m,UD){var LD=UD&&UD.toUpperCase();return m||n[UD]||D[UD]||n[LD].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(R,T,O){return T||O.slice(1)})})).match(u),uD=d.length,FD=0;FD<uD;FD+=1){var xD=d[FD],dD=L[xD],SD=dD&&dD[0],VD=dD&&dD[1];d[FD]=VD?{regex:SD,parser:VD}:xD.replace(/^\[|\]$/g,"")}return function(i){for(var m={},UD=0,LD=0;UD<uD;UD+=1){var R=d[UD];if(typeof R=="string")LD+=R.length;else{var{regex:T,parser:O}=R,h=i.slice(LD),N=T.exec(h)[0];O.call(m,N),i=i.replace(N,"")}}return function(g){var _=g.afternoon;if(_!==void 0){var v=g.hours;_?v<12&&(g.hours+=12):v===12&&(g.hours=0),delete g.afternoon}}(m),m}}return function(A,P,n){n.p.customParseFormat=!0,A&&A.parseTwoDigitYear&&(Z=A.parseTwoDigitYear);var d=P.prototype,uD=d.parse;d.parse=function(FD){var{date:xD,utc:dD,args:SD}=FD;this.$u=dD;var VD=SD[1];if(typeof VD=="string"){var i=SD[2]===!0,m=SD[3]===!0,UD=i||m,LD=SD[2];m&&(LD=SD[2]),C=this.$locale(),!i&&LD&&(C=n.Ls[LD]),this.$d=function(h,N,g,_){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1000:1)*h);var v=U(N)(h),l=v.year,a=v.month,JD=v.day,TD=v.hours,Eu=v.minutes,sD=v.seconds,Xu=v.milliseconds,XD=v.zone,KD=v.week,bD=new Date,aD=JD||(l||a?1:bD.getDate()),wu=l||bD.getFullYear(),gu=0;l&&!a||(gu=a>0?a-1:bD.getMonth());var bu,ou=TD||0,eu=Eu||0,D0=sD||0,u0=Xu||0;return XD?new Date(Date.UTC(wu,gu,aD,ou,eu,D0,u0+60*XD.offset*1000)):g?new Date(Date.UTC(wu,gu,aD,ou,eu,D0,u0)):(bu=new Date(wu,gu,aD,ou,eu,D0,u0),KD&&(bu=_(bu).week(KD).toDate()),bu)}catch(k1){return new Date("")}}(xD,VD,dD,n),this.init(),LD&&LD!==!0&&(this.$L=this.locale(LD).$L),UD&&xD!=this.format(VD)&&(this.$d=new Date("")),C={}}else if(VD instanceof Array)for(var R=VD.length,T=1;T<=R;T+=1){SD[1]=VD[T-1];var O=n.apply(this,SD);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}T===R&&(this.$d=new Date(""))}else uD.call(this,FD)}}})});var NF=b((J8,P2)=>{Object.defineProperty(J8,"__esModule",{value:!0});J8.default=i5;var l5=p5(wD());function p5(D){return D&&D.__esModule?D:{default:D}}function i5(D){return l5.default(D),D.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")}P2.exports=J8.default;P2.exports.default=J8.default});var IF=b((Z8,m2)=>{Object.defineProperty(Z8,"__esModule",{value:!0});Z8.default=$w;var s5=a5(Uu());function a5(D){return D&&D.__esModule?D:{default:D}}var o5={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},e5=["icloud.com","me.com"],Dw=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],uw=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],Fw=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function Cw(D){if(D.length>1)return D;return""}function $w(D,u){u=s5.default(u,o5);var F=D.split("@"),$=F.pop(),E=F.join("@"),w=[E,$];if(w[1]=w[1].toLowerCase(),w[1]==="gmail.com"||w[1]==="googlemail.com"){if(u.gmail_remove_subaddress)w[0]=w[0].split("+")[0];if(u.gmail_remove_dots)w[0]=w[0].replace(/\.+/g,Cw);if(!w[0].length)return!1;if(u.all_lowercase||u.gmail_lowercase)w[0]=w[0].toLowerCase();w[1]=u.gmail_convert_googlemaildotcom?"gmail.com":w[1]}else if(e5.indexOf(w[1])>=0){if(u.icloud_remove_subaddress)w[0]=w[0].split("+")[0];if(!w[0].length)return!1;if(u.all_lowercase||u.icloud_lowercase)w[0]=w[0].toLowerCase()}else if(Dw.indexOf(w[1])>=0){if(u.outlookdotcom_remove_subaddress)w[0]=w[0].split("+")[0];if(!w[0].length)return!1;if(u.all_lowercase||u.outlookdotcom_lowercase)w[0]=w[0].toLowerCase()}else if(uw.indexOf(w[1])>=0){if(u.yahoo_remove_subaddress){var C=w[0].split("-");w[0]=C.length>1?C.slice(0,-1).join("-"):C[0]}if(!w[0].length)return!1;if(u.all_lowercase||u.yahoo_lowercase)w[0]=w[0].toLowerCase()}else if(Fw.indexOf(w[1])>=0){if(u.all_lowercase||u.yandex_lowercase)w[0]=w[0].toLowerCase();w[1]="yandex.ru"}else if(u.all_lowercase)w[0]=w[0].toLowerCase();return w.join("@")}m2.exports=Z8.default;m2.exports.default=Z8.default});function l2(D){return D!==null&&typeof D==="object"}function s2(D,u,F=".",$){if(!l2(u))return s2(D,{},F,$);let E=Object.assign({},u);for(let w in D){if(w==="__proto__"||w==="constructor")continue;let C=D[w];if(C===null||C===void 0)continue;if($&&$(E,w,C,F))continue;if(Array.isArray(C)&&Array.isArray(E[w]))E[w]=[...C,...E[w]];else if(l2(C)&&l2(E[w]))E[w]=s2(C,E[w],(F?`${F}.`:"")+w.toString(),$);else E[w]=C}return E}function XY(D){return(...u)=>u.reduce((F,$)=>s2(F,$,"",D),{})}function QY(D){return Object.prototype.toString.call(D)==="[object Object]"}function AY(D){if(!QY(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}class zD{constructor(D={}){let u=D.types||t2;this.options=WY({...D,defaults:{...D.defaults},level:i2(D.level,u),reporters:[...D.reporters||[]]},{types:t2,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let F in u){let $={type:F,...this.options.defaults,...u[F]};this[F]=this._wrapLogFn($),this[F].raw=this._wrapLogFn($,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=i2(D,this.options.types,this.options.level)}prompt(D,u){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(D,u)}create(D){let u=new zD({...this.options,...D});if(this._mockFn)u.mockTypes(this._mockFn);return u}withDefaults(D){return this.create({...this.options,defaults:{...this.options.defaults,...D}})}withTag(D){return this.withDefaults({tag:this.options.defaults.tag?this.options.defaults.tag+":"+D:D})}addReporter(D){return this.options.reporters.push(D),this}removeReporter(D){if(D){let u=this.options.reporters.indexOf(D);if(u>=0)return this.options.reporters.splice(u,1)}else this.options.reporters.splice(0);return this}setReporters(D){return this.options.reporters=Array.isArray(D)?D:[D],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(let D in this.options.types){if(!console["__"+D])console["__"+D]=console[D];console[D]=this[D].raw}}restoreConsole(){for(let D in this.options.types)if(console["__"+D])console[D]=console["__"+D],delete console["__"+D]}wrapStd(){this._wrapStream(this.options.stdout,"log"),this._wrapStream(this.options.stderr,"log")}_wrapStream(D,u){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(F)=>{this[u].raw(String(F).trim())}}restoreStd(){this._restoreStream(this.options.stdout),this._restoreStream(this.options.stderr)}_restoreStream(D){if(!D)return;if(D.__write)D.write=D.__write,delete D.__write}pauseLogs(){p2=!0}resumeLogs(){p2=!1;let D=tC.splice(0);for(let u of D)u[0]._logFn(u[1],u[2])}mockTypes(D){let u=D||this.options.mockFn;if(this._mockFn=u,typeof u!=="function")return;for(let F in this.options.types)this[F]=u(F,this.options.types[F])||this[F],this[F].raw=this[F]}_wrapLogFn(D,u){return(...F)=>{if(p2){tC.push([this,D,F,u]);return}return this._logFn(D,F,u)}}_logFn(D,u,F){if((D.level||0)>this.level)return!1;let $={date:new Date,args:[],...D,level:i2(D.level,this.options.types)};if(!F&&u.length===1&&AY(u[0]))Object.assign($,u[0]);else $.args=[...u];if($.message)$.args.unshift($.message),delete $.message;if($.additional){if(!Array.isArray($.additional))$.additional=$.additional.split("\n");$.args.push("\n"+$.additional.join("\n")),delete $.additional}$.type=typeof $.type==="string"?$.type.toLowerCase():"log",$.tag=typeof $.tag==="string"?$.tag:"";let E=(C=!1)=>{let Z=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&Z>0){let M=[...this._lastLog.object.args];if(Z>1)M.push(`(repeated ${Z} times)`);this._log({...this._lastLog.object,args:M}),this._lastLog.count=1}if(C)this._lastLog.object=$,this._log($)};clearTimeout(this._lastLog.timeout);let w=this._lastLog.time&&$.date?$.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=$.date,w<this.options.throttle)try{let C=JSON.stringify([$.type,$.tag,$.args]),Z=this._lastLog.serialized===C;if(this._lastLog.serialized=C,Z){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout(E,this.options.throttle);return}}}catch{}E(!0)}_log(D){for(let u of this.options.reporters)u.log(D,{options:this.options})}}function i2(D,u={},F=3){if(D===void 0)return F;if(typeof D==="number")return D;if(u[D]&&u[D].level!==void 0)return u[D].level;return F}function sC(D={}){return new zD(D)}var AD,t2,WY,p2=!1,tC;var z8=C0(()=>{AD={silent:Number.NEGATIVE_INFINITY,fatal:0,error:0,warn:1,log:2,info:3,success:3,fail:3,ready:3,start:3,box:3,debug:4,trace:5,verbose:Number.POSITIVE_INFINITY},t2={silent:{level:-1},fatal:{level:AD.fatal},error:{level:AD.error},warn:{level:AD.warn},log:{level:AD.log},info:{level:AD.info},success:{level:AD.success},fail:{level:AD.fail},ready:{level:AD.info},start:{level:AD.info},box:{level:AD.info},debug:{level:AD.debug},trace:{level:AD.trace},verbose:{level:AD.verbose}};WY=XY();tC=[];zD.prototype.add=zD.prototype.addReporter;zD.prototype.remove=zD.prototype.removeReporter;zD.prototype.clear=zD.prototype.removeReporter;zD.prototype.withScope=zD.prototype.withTag;zD.prototype.mock=zD.prototype.mockTypes;zD.prototype.pause=zD.prototype.pauseLogs;zD.prototype.resume=zD.prototype.resumeLogs});import{formatWithOptions as zY}from"util";import{sep as GY}from"path";function o2(D){let u=process.cwd()+GY;return D.split("\n").splice(1).map(($)=>$.trim().replace("file://","").replace(u,""))}function qY(D,u){return(u.__write||u.write).call(u,D)}class G8{formatStack(D,u){return" "+o2(D).join("\n ")}formatArgs(D,u){let F=D.map(($)=>{if($&&typeof $.stack==="string")return $.message+"\n"+this.formatStack($.stack,u);return $});return zY(u,...F)}formatDate(D,u){return u.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,u){let F=this.formatArgs(D.args,u);if(D.type==="box")return"\n"+[a2(D.tag),D.title&&D.title,...F.split("\n")].filter(Boolean).map(($)=>" > "+$).join("\n")+"\n";return this.filterAndJoin([a2(D.type),a2(D.tag),F])}log(D,u){let F=this.formatLogObj(D,{columns:u.options.stdout.columns||0,...u.options.formatOptions});return qY(F+"\n",D.level<2?u.options.stderr||process.stderr:u.options.stdout||process.stdout)}}var a2=(D)=>D?`[${D}]`:"";var q8=()=>{};import*as H8 from"tty";function u9(D,u,F,$,E=u.slice(0,Math.max(0,D))+$,w=u.slice(Math.max(0,D+F.length)),C=w.indexOf(F)){return E+(C<0?w:u9(C,w,F,$))}function IY(D,u,F,$,E){return D<0?F+u+$:F+u9(D,u,$,E)+$}function xY(D,u,F=D,$=D.length+1){return(E)=>E||!(E===""||E===void 0)?IY((""+E).indexOf(u,$),E,D,u,F):""}function c(D,u,F){return xY(`\x1B[${D}m`,`\x1B[${u}m`,F)}function SY(D=NY){return D?aC:Object.fromEntries(Object.keys(aC).map((u)=>[u,String]))}function hY(D,u="reset"){return z[D]||z[u]}function lu(D){return D.replace(new RegExp(yY,"g"),"")}function F9(D,u={}){let F={...u,style:{...jY,...u.style}},$=D.split("\n"),E=[],w=hY(F.style.borderColor),C={...typeof F.style.borderStyle==="string"?oC[F.style.borderStyle]||oC.solid:F.style.borderStyle};if(w)for(let U in C)C[U]=w(C[U]);let Z=F.style.padding%2===0?F.style.padding:F.style.padding+1,M=$.length+Z,W=Math.max(...$.map((U)=>U.length))+Z,X=W+Z,q=F.style.marginLeft>0?" ".repeat(F.style.marginLeft):"";if(F.style.marginTop>0)E.push("".repeat(F.style.marginTop));if(F.title){let U=C.h.repeat(Math.floor((W-lu(F.title).length)/2)),A=C.h.repeat(W-lu(F.title).length-lu(U).length+Z);E.push(`${q}${C.tl}${U}${F.title}${A}${C.tr}`)}else E.push(`${q}${C.tl}${C.h.repeat(X)}${C.tr}`);let L=F.style.valign==="center"?Math.floor((M-$.length)/2):F.style.valign==="top"?M-$.length-Z:M-$.length;for(let U=0;U<M;U++)if(U<L||U>=L+$.length)E.push(`${q}${C.v}${" ".repeat(X)}${C.v}`);else{let A=$[U-L],P=" ".repeat(Z),n=" ".repeat(W-lu(A).length);E.push(`${q}${C.v}${P}${A}${n}${C.v}`)}if(E.push(`${q}${C.bl}${C.h.repeat(X)}${C.br}`),F.style.marginBottom>0)E.push("".repeat(F.style.marginBottom));return E.join("\n")}var Lu,eC,HY,UY,OY,VY,D9,LY,TY,NY,aC,z,yY,oC,jY;var U8=C0(()=>{({env:Lu={},argv:eC=[],platform:HY=""}=typeof process==="undefined"?{}:process),UY="NO_COLOR"in Lu||eC.includes("--no-color"),OY="FORCE_COLOR"in Lu||eC.includes("--color"),VY=HY==="win32",D9=Lu.TERM==="dumb",LY=H8&&H8.isatty&&H8.isatty(1)&&Lu.TERM&&!D9,TY="CI"in Lu&&(("GITHUB_ACTIONS"in Lu)||("GITLAB_CI"in Lu)||("CIRCLECI"in Lu)),NY=!UY&&(OY||VY&&!D9||LY||TY);aC={reset:c(0,0),bold:c(1,22,"\x1B[22m\x1B[1m"),dim:c(2,22,"\x1B[22m\x1B[2m"),italic:c(3,23),underline:c(4,24),inverse:c(7,27),hidden:c(8,28),strikethrough:c(9,29),black:c(30,39),red:c(31,39),green:c(32,39),yellow:c(33,39),blue:c(34,39),magenta:c(35,39),cyan:c(36,39),white:c(37,39),gray:c(90,39),bgBlack:c(40,49),bgRed:c(41,49),bgGreen:c(42,49),bgYellow:c(43,49),bgBlue:c(44,49),bgMagenta:c(45,49),bgCyan:c(46,49),bgWhite:c(47,49),blackBright:c(90,39),redBright:c(91,39),greenBright:c(92,39),yellowBright:c(93,39),blueBright:c(94,39),magentaBright:c(95,39),cyanBright:c(96,39),whiteBright:c(97,39),bgBlackBright:c(100,49),bgRedBright:c(101,49),bgGreenBright:c(102,49),bgYellowBright:c(103,49),bgBlueBright:c(104,49),bgMagentaBright:c(105,49),bgCyanBright:c(106,49),bgWhiteBright:c(107,49)};z=SY();yY=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");oC={solid:{tl:"\u250C",tr:"\u2510",bl:"\u2514",br:"\u2518",h:"\u2500",v:"\u2502"},double:{tl:"\u2554",tr:"\u2557",bl:"\u255A",br:"\u255D",h:"\u2550",v:"\u2551"},doubleSingle:{tl:"\u2553",tr:"\u2556",bl:"\u2559",br:"\u255C",h:"\u2500",v:"\u2551"},doubleSingleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2551"},singleThick:{tl:"\u250F",tr:"\u2513",bl:"\u2517",br:"\u251B",h:"\u2501",v:"\u2503"},singleDouble:{tl:"\u2552",tr:"\u2555",bl:"\u2558",br:"\u255B",h:"\u2550",v:"\u2502"},singleDoubleRounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2550",v:"\u2502"},rounded:{tl:"\u256D",tr:"\u256E",bl:"\u2570",br:"\u256F",h:"\u2500",v:"\u2502"}},jY={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var U9={};c1(U9,{prompt:()=>AJ});import{stdin as RY,stdout as kY}from"process";import C9 from"readline";import{WriteStream as gY}from"tty";import bY from"tty";function nY({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function W9(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(nY(),"")}function z0(D,u={}){if(typeof D!="string"||D.length===0||(u={ambiguousIsNarrow:!0,...u},D=W9(D),D.length===0))return 0;D=D.replace(lY()," ");let F=u.ambiguousIsNarrow?1:2,$=0;for(let E of D){let w=E.codePointAt(0);if(w<=31||w>=127&&w<=159||w>=768&&w<=879)continue;switch(dY.eastAsianWidth(E)){case"F":case"W":$+=2;break;case"A":$+=F;break;default:$+=1}}return $}function tY(){let D=new Map;for(let[u,F]of Object.entries(ED)){for(let[$,E]of Object.entries(F))ED[$]={open:`\x1B[${E[0]}m`,close:`\x1B[${E[1]}m`},F[$]=ED[$],D.set(E[0],E[1]);Object.defineProperty(ED,u,{value:F,enumerable:!1})}return Object.defineProperty(ED,"codes",{value:D,enumerable:!1}),ED.color.close="\x1B[39m",ED.bgColor.close="\x1B[49m",ED.color.ansi=$9(),ED.color.ansi256=E9(),ED.color.ansi16m=w9(),ED.bgColor.ansi=$9(D1),ED.bgColor.ansi256=E9(D1),ED.bgColor.ansi16m=w9(D1),Object.defineProperties(ED,{rgbToAnsi256:{value:(u,F,$)=>u===F&&F===$?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(F/255*5)+Math.round($/255*5),enumerable:!1},hexToRgb:{value:(u)=>{let F=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!F)return[0,0,0];let[$]=F;$.length===3&&($=[...$].map((w)=>w+w).join(""));let E=Number.parseInt($,16);return[E>>16&255,E>>8&255,E&255]},enumerable:!1},hexToAnsi256:{value:(u)=>ED.rgbToAnsi256(...ED.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:(u)=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let F,$,E;if(u>=232)F=((u-232)*10+8)/255,$=F,E=F;else{u-=16;let Z=u%36;F=Math.floor(u/36)/5,$=Math.floor(Z/6)/5,E=Z%6/5}let w=Math.max(F,$,E)*2;if(w===0)return 30;let C=30+(Math.round(E)<<2|Math.round($)<<1|Math.round(F));return w===2&&(C+=60),C},enumerable:!1},rgbToAnsi:{value:(u,F,$)=>ED.ansi256ToAnsi(ED.rgbToAnsi256(u,F,$)),enumerable:!1},hexToAnsi:{value:(u)=>ED.ansi256ToAnsi(ED.hexToAnsi256(u)),enumerable:!1}}),ED}function J9(D,u,F){return String(D).normalize().replace(/\r\n/g,`
|
|
3
3
|
`).split(`
|
|
4
|
-
`).map(($)=>
|
|
5
|
-
`)}function
|
|
4
|
+
`).map(($)=>uJ($,u,F)).join(`
|
|
5
|
+
`)}function FJ(D,u){if(D===u)return;let F=D.split(`
|
|
6
6
|
`),$=u.split(`
|
|
7
|
-
`),E=[];for(let w=0;w<Math.max(F.length,$.length);w++)F[w]!==$[w]&&E.push(w);return E}function O8(D,u){D.isTTY&&D.setRawMode(u)}class
|
|
8
|
-
`),O8(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=
|
|
9
|
-
`).length-1;this.output.write(Fu.cursor.move(-999,D*-1))}render(){let D=
|
|
7
|
+
`),E=[];for(let w=0;w<Math.max(F.length,$.length);w++)F[w]!==$[w]&&E.push(w);return E}function O8(D,u){D.isTTY&&D.setRawMode(u)}class G0{constructor({render:D,input:u=RY,output:F=kY,...$},E=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=$,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=D.bind(this),this._track=E,this.input=u,this.output=F}prompt(){let D=new gY(0);return D._write=(u,F,$)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),$()},this.input.pipe(D),this.rl=C9.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),C9.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),O8(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((u,F)=>{this.once("submit",()=>{this.output.write(Fu.cursor.show),this.output.off("resize",this.render),O8(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(Fu.cursor.show),this.output.off("resize",this.render),O8(this.input,!1),u(CJ)})})}on(D,u){let F=this.subscribers.get(D)??[];F.push({cb:u}),this.subscribers.set(D,F)}once(D,u){let F=this.subscribers.get(D)??[];F.push({cb:u,once:!0}),this.subscribers.set(D,F)}emit(D,...u){let F=this.subscribers.get(D)??[],$=[];for(let E of F)E.cb(...u),E.once&&$.push(()=>F.splice(F.indexOf(E),1));for(let E of $)E()}unsubscribe(){this.subscribers.clear()}onKeypress(D,u){if(this.state==="error"&&(this.state="active"),u?.name&&!this._track&&Z9.has(u.name)&&this.emit("cursor",Z9.get(u.name)),u?.name&&$J.has(u.name)&&this.emit("cursor",u.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D&&this.emit("key",D.toLowerCase()),u?.name==="return"){if(this.opts.validate){let F=this.opts.validate(this.value);F&&(this.error=F,this.state="error",this.rl.write(this.value))}this.state!=="error"&&(this.state="submit")}D===""&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
8
|
+
`),O8(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let D=J9(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
9
|
+
`).length-1;this.output.write(Fu.cursor.move(-999,D*-1))}render(){let D=J9(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(Fu.cursor.hide);else{let u=FJ(this._prevFrame,D);if(this.restoreCursor(),u&&u?.length===1){let F=u[0];this.output.write(Fu.cursor.move(0,F)),this.output.write(Fu.erase.lines(1));let $=D.split(`
|
|
10
10
|
`);this.output.write($[F]),this._prevFrame=D,this.output.write(Fu.cursor.move(0,$.length-F-1));return}else if(u&&u?.length>1){let F=u[0];this.output.write(Fu.cursor.move(0,F)),this.output.write(Fu.erase.down());let $=D.split(`
|
|
11
11
|
`).slice(F);this.output.write($.join(`
|
|
12
|
-
`)),this._prevFrame=D;return}this.output.write(Fu.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}async function WJ(D,u={}){if(!u.type||u.type==="text")return await ZJ({message:D,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial});if(u.type==="confirm")return await KJ({message:D,initialValue:u.initial});if(u.type==="select")return await MJ({message:D,options:u.options.map((F)=>typeof F==="string"?{value:F,label:F}:F)});if(u.type==="multiselect")return await XJ({message:D,options:u.options.map((F)=>typeof F==="string"?{value:F,label:F}:F),required:u.required});throw new Error(`Unknown prompt type: ${u.type}`)}var F1="\x1B",YD,kY="\x07",C1,bY,_Y,Fu,B1,PY,mY,$D=(D,u,F=D)=>($)=>{let E=""+$,w=E.indexOf(u,D.length);return~w?D+Z9(E,u,F,w)+u:D+E+u},Z9=(D,u,F,$)=>{let E=D.substring(0,$)+F,w=D.substring($+u.length),C=w.indexOf(u);return~C?E+Z9(w,u,F,C):E+w},K9=(D=mY)=>({isColorSupported:D,reset:D?(u)=>`\x1B[0m${u}\x1B[0m`:String,bold:D?$D("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?$D("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?$D("\x1B[3m","\x1B[23m"):String,underline:D?$D("\x1B[4m","\x1B[24m"):String,inverse:D?$D("\x1B[7m","\x1B[27m"):String,hidden:D?$D("\x1B[8m","\x1B[28m"):String,strikethrough:D?$D("\x1B[9m","\x1B[29m"):String,black:D?$D("\x1B[30m","\x1B[39m"):String,red:D?$D("\x1B[31m","\x1B[39m"):String,green:D?$D("\x1B[32m","\x1B[39m"):String,yellow:D?$D("\x1B[33m","\x1B[39m"):String,blue:D?$D("\x1B[34m","\x1B[39m"):String,magenta:D?$D("\x1B[35m","\x1B[39m"):String,cyan:D?$D("\x1B[36m","\x1B[39m"):String,white:D?$D("\x1B[37m","\x1B[39m"):String,gray:D?$D("\x1B[90m","\x1B[39m"):String,bgBlack:D?$D("\x1B[40m","\x1B[49m"):String,bgRed:D?$D("\x1B[41m","\x1B[49m"):String,bgGreen:D?$D("\x1B[42m","\x1B[49m"):String,bgYellow:D?$D("\x1B[43m","\x1B[49m"):String,bgBlue:D?$D("\x1B[44m","\x1B[49m"):String,bgMagenta:D?$D("\x1B[45m","\x1B[49m"):String,bgCyan:D?$D("\x1B[46m","\x1B[49m"):String,bgWhite:D?$D("\x1B[47m","\x1B[49m"):String}),vY,e2,$1,fY,nY,rY=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},D1=10,F9=(D=0)=>(u)=>`\x1B[${u+D}m`,C9=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,$9=(D=0)=>(u,F,$)=>`\x1B[${38+D};2;${u};${F};${$}m`,ED,dY,lY,iY,V8,tY=39,Y1="\x07",X9="[",sY="]",W9="m",J1,E9=(D)=>`${V8.values().next().value}${X9}${D}${W9}`,w9=(D)=>`${V8.values().next().value}${J1}${D}${Y1}`,aY=(D)=>D.split(" ").map((u)=>Q0(u)),u1=(D,u,F)=>{let $=[...u],E=!1,w=!1,C=Q0(M9(D[D.length-1]));for(let[Z,M]of $.entries()){let W=Q0(M);if(C+W<=F?D[D.length-1]+=M:(D.push(M),C=0),V8.has(M)&&(E=!0,w=$.slice(Z+1).join("").startsWith(J1)),E){w?M===Y1&&(E=!1,w=!1):M===W9&&(E=!1);continue}C+=W,C===F&&Z<$.length-1&&(D.push(""),C=0)}!C&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},oY=(D)=>{let u=D.split(" "),F=u.length;for(;F>0&&!(Q0(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},eY=(D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let $="",E,w,C=aY(D),Z=[""];for(let[W,X]of D.split(" ").entries()){F.trim!==!1&&(Z[Z.length-1]=Z[Z.length-1].trimStart());let q=Q0(Z[Z.length-1]);if(W!==0&&(q>=u&&(F.wordWrap===!1||F.trim===!1)&&(Z.push(""),q=0),(q>0||F.trim===!1)&&(Z[Z.length-1]+=" ",q++)),F.hard&&C[W]>u){let U=u-q,L=1+Math.floor((C[W]-U-1)/u);Math.floor((C[W]-1)/u)<L&&Z.push(""),u1(Z,X,u);continue}if(q+C[W]>u&&q>0&&C[W]>0){if(F.wordWrap===!1&&q<u){u1(Z,X,u);continue}Z.push("")}if(q+C[W]>u&&F.wordWrap===!1){u1(Z,X,u);continue}Z[Z.length-1]+=X}F.trim!==!1&&(Z=Z.map((W)=>oY(W)));let M=[...Z.join(`
|
|
13
|
-
`)];for(let[W,X]of M.entries()){if($+=X,V8.has(X)){let{groups:
|
|
14
|
-
`?(w&&($+=
|
|
15
|
-
`&&(E&&q&&($+=
|
|
12
|
+
`)),this._prevFrame=D;return}this.output.write(Fu.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}async function AJ(D,u={}){if(!u.type||u.type==="text")return await MJ({message:D,defaultValue:u.default,placeholder:u.placeholder,initialValue:u.initial});if(u.type==="confirm")return await XJ({message:D,initialValue:u.initial});if(u.type==="select")return await WJ({message:D,options:u.options.map((F)=>typeof F==="string"?{value:F,label:F}:F)});if(u.type==="multiselect")return await QJ({message:D,options:u.options.map((F)=>typeof F==="string"?{value:F,label:F}:F),required:u.required});throw new Error(`Unknown prompt type: ${u.type}`)}var F1="\x1B",YD,_Y="\x07",C1,PY,mY,Fu,B1,vY,cY,$D=(D,u,F=D)=>($)=>{let E=""+$,w=E.indexOf(u,D.length);return~w?D+M9(E,u,F,w)+u:D+E+u},M9=(D,u,F,$)=>{let E=D.substring(0,$)+F,w=D.substring($+u.length),C=w.indexOf(u);return~C?E+M9(w,u,F,C):E+w},X9=(D=cY)=>({isColorSupported:D,reset:D?(u)=>`\x1B[0m${u}\x1B[0m`:String,bold:D?$D("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?$D("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?$D("\x1B[3m","\x1B[23m"):String,underline:D?$D("\x1B[4m","\x1B[24m"):String,inverse:D?$D("\x1B[7m","\x1B[27m"):String,hidden:D?$D("\x1B[8m","\x1B[28m"):String,strikethrough:D?$D("\x1B[9m","\x1B[29m"):String,black:D?$D("\x1B[30m","\x1B[39m"):String,red:D?$D("\x1B[31m","\x1B[39m"):String,green:D?$D("\x1B[32m","\x1B[39m"):String,yellow:D?$D("\x1B[33m","\x1B[39m"):String,blue:D?$D("\x1B[34m","\x1B[39m"):String,magenta:D?$D("\x1B[35m","\x1B[39m"):String,cyan:D?$D("\x1B[36m","\x1B[39m"):String,white:D?$D("\x1B[37m","\x1B[39m"):String,gray:D?$D("\x1B[90m","\x1B[39m"):String,bgBlack:D?$D("\x1B[40m","\x1B[49m"):String,bgRed:D?$D("\x1B[41m","\x1B[49m"):String,bgGreen:D?$D("\x1B[42m","\x1B[49m"):String,bgYellow:D?$D("\x1B[43m","\x1B[49m"):String,bgBlue:D?$D("\x1B[44m","\x1B[49m"):String,bgMagenta:D?$D("\x1B[45m","\x1B[49m"):String,bgCyan:D?$D("\x1B[46m","\x1B[49m"):String,bgWhite:D?$D("\x1B[47m","\x1B[49m"):String}),fY,e2,$1,rY,dY,lY=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},D1=10,$9=(D=0)=>(u)=>`\x1B[${u+D}m`,E9=(D=0)=>(u)=>`\x1B[${38+D};5;${u}m`,w9=(D=0)=>(u,F,$)=>`\x1B[${38+D};2;${u};${F};${$}m`,ED,pY,iY,sY,V8,aY=39,Y1="\x07",Q9="[",oY="]",A9="m",J1,B9=(D)=>`${V8.values().next().value}${Q9}${D}${A9}`,Y9=(D)=>`${V8.values().next().value}${J1}${D}${Y1}`,eY=(D)=>D.split(" ").map((u)=>z0(u)),u1=(D,u,F)=>{let $=[...u],E=!1,w=!1,C=z0(W9(D[D.length-1]));for(let[Z,M]of $.entries()){let W=z0(M);if(C+W<=F?D[D.length-1]+=M:(D.push(M),C=0),V8.has(M)&&(E=!0,w=$.slice(Z+1).join("").startsWith(J1)),E){w?M===Y1&&(E=!1,w=!1):M===A9&&(E=!1);continue}C+=W,C===F&&Z<$.length-1&&(D.push(""),C=0)}!C&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},DJ=(D)=>{let u=D.split(" "),F=u.length;for(;F>0&&!(z0(u[F-1])>0);)F--;return F===u.length?D:u.slice(0,F).join(" ")+u.slice(F).join("")},uJ=(D,u,F={})=>{if(F.trim!==!1&&D.trim()==="")return"";let $="",E,w,C=eY(D),Z=[""];for(let[W,X]of D.split(" ").entries()){F.trim!==!1&&(Z[Z.length-1]=Z[Z.length-1].trimStart());let q=z0(Z[Z.length-1]);if(W!==0&&(q>=u&&(F.wordWrap===!1||F.trim===!1)&&(Z.push(""),q=0),(q>0||F.trim===!1)&&(Z[Z.length-1]+=" ",q++)),F.hard&&C[W]>u){let L=u-q,U=1+Math.floor((C[W]-L-1)/u);Math.floor((C[W]-1)/u)<U&&Z.push(""),u1(Z,X,u);continue}if(q+C[W]>u&&q>0&&C[W]>0){if(F.wordWrap===!1&&q<u){u1(Z,X,u);continue}Z.push("")}if(q+C[W]>u&&F.wordWrap===!1){u1(Z,X,u);continue}Z[Z.length-1]+=X}F.trim!==!1&&(Z=Z.map((W)=>DJ(W)));let M=[...Z.join(`
|
|
13
|
+
`)];for(let[W,X]of M.entries()){if($+=X,V8.has(X)){let{groups:L}=new RegExp(`(?:\\${Q9}(?<code>\\d+)m|\\${J1}(?<uri>.*)${Y1})`).exec(M.slice(W).join(""))||{groups:{}};if(L.code!==void 0){let U=Number.parseFloat(L.code);E=U===aY?void 0:U}else L.uri!==void 0&&(w=L.uri.length===0?void 0:L.uri)}let q=sY.codes.get(Number(E));M[W+1]===`
|
|
14
|
+
`?(w&&($+=Y9("")),E&&q&&($+=B9(q))):X===`
|
|
15
|
+
`&&(E&&q&&($+=B9(E)),w&&($+=Y9(w)))}return $},CJ,Z9,$J,z9,G9,q9,H9,EJ,zu=(D,u)=>EJ?D:u,wJ,BJ,YJ,JJ,DD="",pu="",E1,w1,ZJ,K9,KJ,L8=(D)=>{switch(D){case"initial":case"active":return z.cyan(wJ);case"cancel":return z.red(BJ);case"error":return z.yellow(YJ);case"submit":return z.green(JJ)}},MJ=(D)=>{return new H9({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){let u=`${z.gray(DD)}
|
|
16
16
|
${L8(this.state)} ${D.message}
|
|
17
17
|
`,F=D.placeholder?z.inverse(D.placeholder[0])+z.dim(D.placeholder.slice(1)):z.inverse(z.hidden("_")),$=this.value?this.valueWithCursor:F;switch(this.state){case"error":return`${u.trim()}
|
|
18
18
|
${z.yellow(DD)} ${$}
|
|
19
19
|
${z.yellow(pu)} ${z.yellow(this.error)}
|
|
20
20
|
`;case"submit":return`${u}${z.gray(DD)} ${z.dim(this.value||D.placeholder)}`;case"cancel":return`${u}${z.gray(DD)} ${z.strikethrough(z.dim(this.value??""))}${this.value?.trim()?"\n"+z.gray(DD):""}`;default:return`${u}${z.cyan(DD)} ${$}
|
|
21
21
|
${z.cyan(pu)}
|
|
22
|
-
`}}}).prompt()},
|
|
22
|
+
`}}}).prompt()},XJ=(D)=>{let u=D.active??"Yes",F=D.inactive??"No";return new z9({active:u,inactive:F,initialValue:D.initialValue??!0,render(){let $=`${z.gray(DD)}
|
|
23
23
|
${L8(this.state)} ${D.message}
|
|
24
24
|
`,E=this.value?u:F;switch(this.state){case"submit":return`${$}${z.gray(DD)} ${z.dim(E)}`;case"cancel":return`${$}${z.gray(DD)} ${z.strikethrough(z.dim(E))}
|
|
25
25
|
${z.gray(DD)}`;default:return`${$}${z.cyan(DD)} ${this.value?`${z.green(E1)} ${u}`:`${z.dim(w1)} ${z.dim(u)}`} ${z.dim("/")} ${this.value?`${z.dim(w1)} ${z.dim(F)}`:`${z.green(E1)} ${F}`}
|
|
26
26
|
${z.cyan(pu)}
|
|
27
|
-
`}}}).prompt()},
|
|
27
|
+
`}}}).prompt()},WJ=(D)=>{let u=(F,$)=>{let E=F.label??String(F.value);switch($){case"active":return`${z.green(E1)} ${E} ${F.hint?z.dim(`(${F.hint})`):""}`;case"selected":return`${z.dim(E)}`;case"cancelled":return`${z.strikethrough(z.dim(E))}`}return`${z.dim(w1)} ${z.dim(E)}`};return new q9({options:D.options,initialValue:D.initialValue,render(){let F=`${z.gray(DD)}
|
|
28
28
|
${L8(this.state)} ${D.message}
|
|
29
29
|
`;switch(this.state){case"submit":return`${F}${z.gray(DD)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${F}${z.gray(DD)} ${u(this.options[this.cursor],"cancelled")}
|
|
30
30
|
${z.gray(DD)}`;default:return`${F}${z.cyan(DD)} ${this.options.map(($,E)=>u($,E===this.cursor?"active":"inactive")).join(`
|
|
31
31
|
${z.cyan(DD)} `)}
|
|
32
32
|
${z.cyan(pu)}
|
|
33
|
-
`}}}).prompt()},
|
|
33
|
+
`}}}).prompt()},QJ=(D)=>{let u=(F,$)=>{let E=F.label??String(F.value);switch($){case"active":return`${z.cyan(ZJ)} ${E} ${F.hint?z.dim(`(${F.hint})`):""}`;case"selected":return`${z.green(K9)} ${z.dim(E)}`;case"cancelled":return`${z.strikethrough(z.dim(E))}`;case"active-selected":return`${z.green(K9)} ${E} ${F.hint?z.dim(`(${F.hint})`):""}`;case"submitted":return`${z.dim(E)}`}return`${z.dim(KJ)} ${z.dim(E)}`};return new G9({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(F){if(this.required&&F.length===0)return`Please select at least one option.
|
|
34
34
|
${z.reset(z.dim(`Press ${z.gray(z.bgWhite(z.inverse(" space ")))} to select, ${z.gray(z.bgWhite(z.inverse(" enter ")))} to submit`))}`},render(){let F=`${z.gray(DD)}
|
|
35
35
|
${L8(this.state)} ${D.message}
|
|
36
36
|
`;switch(this.state){case"submit":return`${F}${z.gray(DD)} ${this.options.filter(({value:$})=>this.value.includes($)).map(($)=>u($,"submitted")).join(z.dim(", "))||z.dim("none")}`;case"cancel":{let $=this.options.filter(({value:E})=>this.value.includes(E)).map((E)=>u(E,"cancelled")).join(z.dim(", "));return`${F}${z.gray(DD)} ${$.trim()?`${$}
|
|
@@ -38,7 +38,7 @@ ${z.gray(DD)}`:""}`}case"error":{let $=this.error.split("\n").map((E,w)=>w===0?`
|
|
|
38
38
|
${z.yellow(DD)} `)+"\n"+$+"\n"}default:return`${F}${z.cyan(DD)} ${this.options.map(($,E)=>{let w=this.value.includes($.value),C=E===this.cursor;if(C&&w)return u($,"active-selected");if(w)return u($,"selected");return u($,C?"active":"inactive")}).join(`
|
|
39
39
|
${z.cyan(DD)} `)}
|
|
40
40
|
${z.cyan(pu)}
|
|
41
|
-
`}}}).prompt()};var H9=C0(()=>{M1();U8();z8();q8();YD=`${F1}[`,C1={to(D,u){if(!u)return`${YD}${D+1}G`;return`${YD}${u+1};${D+1}H`},move(D,u){let F="";if(D<0)F+=`${YD}${-D}D`;else if(D>0)F+=`${YD}${D}C`;if(u<0)F+=`${YD}${-u}A`;else if(u>0)F+=`${YD}${u}B`;return F},up:(D=1)=>`${YD}${D}A`,down:(D=1)=>`${YD}${D}B`,forward:(D=1)=>`${YD}${D}C`,backward:(D=1)=>`${YD}${D}D`,nextLine:(D=1)=>`${YD}E`.repeat(D),prevLine:(D=1)=>`${YD}F`.repeat(D),left:`${YD}G`,hide:`${YD}?25l`,show:`${YD}?25h`,save:`${F1}7`,restore:`${F1}8`},bY={up:(D=1)=>`${YD}S`.repeat(D),down:(D=1)=>`${YD}T`.repeat(D)},_Y={screen:`${YD}2J`,up:(D=1)=>`${YD}1J`.repeat(D),down:(D=1)=>`${YD}J`.repeat(D),line:`${YD}2K`,lineEnd:`${YD}K`,lineStart:`${YD}1K`,lines(D){let u="";for(let F=0;F<D;F++)u+=this.line+(F<D-1?C1.up():"");if(D)u+=C1.left;return u}},Fu={cursor:C1,scroll:bY,erase:_Y,beep:kY},B1={exports:{}},PY=RY,mY=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||PY.isatty(1)&&process.env.TERM!=="dumb"||("CI"in process.env));B1.exports=K9();B1.exports.createColors=K9;vY=B1.exports,e2=Z1(vY);$1={},fY={get exports(){return $1},set exports(D){$1=D}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function($){var E=$.charCodeAt(0),w=$.length==2?$.charCodeAt(1):0,C=E;return 55296<=E&&E<=56319&&56320<=w&&w<=57343&&(E&=1023,w&=1023,C=E<<10|w,C+=65536),C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510?"F":C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518?"H":4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141?"W":32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630?"Na":C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109?"A":"N"},u.characterLength=function($){var E=this.eastAsianWidth($);return E=="F"||E=="W"||E=="A"?2:1};function F($){return $.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function($){for(var E=F($),w=0,C=0;C<E.length;C++)w=w+this.characterLength(E[C]);return w},u.slice=function($,E,w){textLen=u.length($),E=E||0,w=w||1,E<0&&(E=textLen+E),w<0&&(w=textLen+w);for(var C="",Z=0,M=F($),W=0;W<M.length;W++){var X=M[W],q=u.length(X);if(Z>=E-(q==2?1:0))if(Z+q<=w)C+=X;else break;Z+=q}return C}})(fY);nY=$1;ED={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]}};Object.keys(ED.modifier);dY=Object.keys(ED.color),lY=Object.keys(ED.bgColor);[...dY];iY=pY(),V8=new Set(["\x1B","\x9B"]),J1=`${sY}8;;`;uJ=Symbol("clack:cancel");Y9=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),FJ=new Set(["up","down","left","right","space","enter"]);A9=class A9 extends z0{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(u)=>{this.output.write(Fu.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};Q9=class Q9 extends z0{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:u})=>u===D.cursorAt),0),this.on("key",(u)=>{u==="a"&&this.toggleAll()}),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let D=this.value.length===this.options.length;this.value=D?[]:this.options.map((u)=>u.value)}toggleValue(){let D=this.value.includes(this._value);this.value=D?this.value.filter((u)=>u!==this._value):[...this.value,this._value]}};z9=class z9 extends z0{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.cursor=this.options.findIndex(({value:u})=>u===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};G9=class G9 extends z0{constructor(D){super(D),this.valueWithCursor="",this.on("finalize",()=>{this.value||(this.value=D.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${e2.inverse(e2.hidden("_"))}`;else{let u=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor);this.valueWithCursor=`${u}${e2.inverse(F[0])}${F.slice(1)}`}})}get cursor(){return this._cursor}};CJ=K1(),$J=Qu("\u276F",">"),EJ=Qu("\u25A0","x"),wJ=Qu("\u25B2","x"),BJ=Qu("\u2714","\u221A"),E1=Qu("\u25CF",">"),w1=Qu("\u25CB"," "),YJ=Qu("\u25FB","[\u2022]"),J9=Qu("\u25FC","[+]"),JJ=Qu("\u25FB","[ ]")});import Cu from"process";function QJ(D){for(let u of AJ){let F=u[1]||u[0];if(D[F])return{name:u[0].toLowerCase(),...u[2]}}if(D.SHELL&&D.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function q0(D){return D?D!=="false":!1}function HJ({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function OJ(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(UJ,"")}function Z1(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function NJ(D,u){if(typeof D!=="string"||D.length===0)return 0;if(u={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...u},!u.countAnsiEscapeCodes)D=OJ(D);if(D.length===0)return 0;let F=u.ambiguousIsNarrow?1:2,$=0;for(let{segment:E}of new Intl.Segmenter().segment(D)){let w=E.codePointAt(0);if(w<=31||w>=127&&w<=159)continue;if(w>=768&&w<=879)continue;if(TJ().test(E)){$+=2;continue}switch(LJ.eastAsianWidth(E)){case"F":case"W":{$+=2;break}case"A":{$+=F;break}default:$+=1}}return $}function K1(){if(Cu.platform!=="win32")return Cu.env.TERM!=="linux";return Boolean(Cu.env.CI)||Boolean(Cu.env.WT_SESSION)||Boolean(Cu.env.TERMINUS_SUBLIME)||Cu.env.ConEmuTask==="{cmd::Cmder}"||Cu.env.TERM_PROGRAM==="Terminus-Sublime"||Cu.env.TERM_PROGRAM==="vscode"||Cu.env.TERM==="xterm-256color"||Cu.env.TERM==="alacritty"||Cu.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function O9(D){if(!Intl.Segmenter)return lu(D).length;return NJ(D)}function T8(D){return D.replace(/`([^`]+)`/gm,(u,F)=>z.cyan(F)).replace(/\s+_([^_]+)_\s+/gm,(u,F)=>` ${z.underline(F)} `)}function hJ(D="white"){return z[D]||z.white}function yJ(D="bgWhite"){return z[`bg${D[0].toUpperCase()}${D.slice(1)}`]||z.bgWhite}function I8(D={}){let u=gJ();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return iC({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...$)=>Promise.resolve().then(() => (H9(),q9)).then((E)=>E.prompt(...$)),reporters:D.reporters||[D.fancy??!(L9||X1)?new N9:new G8],...D})}function gJ(){if(qJ)return QD.debug;if(X1)return QD.warn;return QD.info}var AJ,N8,G0,V9,zJ,L9,GJ,qJ,X1,UJ,T9,VJ,LJ,TJ=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},IJ,xJ,SJ,Ju=(D,u)=>SJ?D:u,U9,N9,W1;var M1=C0(()=>{z8();q8();U8();AJ=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];N8=typeof process!=="undefined"?process:{},G0=N8.env||{},V9=QJ(G0),zJ=typeof process!=="undefined"&&process.env&&"development"||"";N8.platform;V9.name;L9=q0(G0.CI)||V9.ci!==!1,GJ=q0(N8.stdout&&N8.stdout.isTTY),qJ=q0(G0.DEBUG),X1=zJ==="test"||q0(G0.TEST);q0(G0.MINIMAL);UJ=HJ();T9={exports:{}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function($){var E=$.charCodeAt(0),w=$.length==2?$.charCodeAt(1):0,C=E;if(55296<=E&&E<=56319&&(56320<=w&&w<=57343))E&=1023,w&=1023,C=E<<10|w,C+=65536;if(C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510)return"F";if(C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518)return"H";if(4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141)return"W";if(32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630)return"Na";if(C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109)return"A";return"N"},u.characterLength=function($){var E=this.eastAsianWidth($);if(E=="F"||E=="W"||E=="A")return 2;else return 1};function F($){return $.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function($){var E=F($),w=0;for(var C=0;C<E.length;C++)w=w+this.characterLength(E[C]);return w},u.slice=function($,E,w){if(textLen=u.length($),E=E?E:0,w=w?w:1,E<0)E=textLen+E;if(w<0)w=textLen+w;var C="",Z=0,M=F($);for(var W=0;W<M.length;W++){var X=M[W],q=u.length(X);if(Z>=E-(q==2?1:0))if(Z+q<=w)C+=X;else break;Z+=q}return C}})(T9);VJ=T9.exports,LJ=Z1(VJ);IJ={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},xJ={0:"red",1:"yellow"},SJ=K1(),U9={error:Ju("\u2716","\xD7"),fatal:Ju("\u2716","\xD7"),ready:Ju("\u2714","\u221A"),warn:Ju("\u26A0","\u203C"),info:Ju("\u2139","i"),success:Ju("\u2714","\u221A"),debug:Ju("\u2699","D"),trace:Ju("\u2192","\u2192"),fail:Ju("\u2716","\xD7"),start:Ju("\u25D0","o"),log:""};N9=class N9 extends G8{formatStack(D){return"\n"+o2(D).map((u)=>" "+u.replace(/^at +/,(F)=>z.gray(F)).replace(/\((.+)\)/,(F,$)=>`(${z.cyan($)})`)).join("\n")}formatType(D,u,F){let $=IJ[D.type]||xJ[D.level]||"gray";if(u)return yJ($)(z.black(` ${D.type.toUpperCase()} `));let E=typeof U9[D.type]==="string"?U9[D.type]:D.icon||D.type;return E?hJ($)(E):""}formatLogObj(D,u){let[F,...$]=this.formatArgs(D.args,u).split("\n");if(D.type==="box")return D9(T8(F+($.length>0?"\n"+$.join("\n"):"")),{title:D.title?T8(D.title):void 0,style:D.style});let E=this.formatDate(D.date,u),w=E&&z.gray(E),C=D.badge??D.level<2,Z=this.formatType(D,C,u),M=D.tag?z.gray(D.tag):"",W,X=this.filterAndJoin([Z,T8(F)]),q=this.filterAndJoin(u.columns?[M,w]:[M]),U=(u.columns||0)-O9(X)-O9(q)-2;if(W=U>0&&(u.columns||0)>=80?X+" ".repeat(U)+q:(q?`${z.gray(`[${q}]`)} `:"")+X,W+=T8($.length>0?"\n"+$.join("\n"):""),D.type==="trace"){let L=new Error("Trace: "+D.message);W+=this.formatStack(L.stack||"")}return C?"\n"+W+"\n":W}};W1=I8()});var y9=b((h9)=>{Object.defineProperty(h9,"__esModule",{value:!0});var I9=import.meta.require("buffer"),yu={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};h9.ERRORS=yu;function kJ(D){if(!I9.Buffer.isEncoding(D))throw new Error(yu.INVALID_ENCODING)}h9.checkEncoding=kJ;function x9(D){return typeof D==="number"&&isFinite(D)&&mJ(D)}h9.isFiniteInteger=x9;function S9(D,u){if(typeof D==="number"){if(!x9(D)||D<0)throw new Error(u?yu.INVALID_OFFSET:yu.INVALID_LENGTH)}else throw new Error(u?yu.INVALID_OFFSET_NON_NUMBER:yu.INVALID_LENGTH_NON_NUMBER)}function bJ(D){S9(D,!1)}h9.checkLengthValue=bJ;function _J(D){S9(D,!0)}h9.checkOffsetValue=_J;function PJ(D,u){if(D<0||D>u.length)throw new Error(yu.INVALID_TARGET_OFFSET)}h9.checkTargetOffset=PJ;function mJ(D){return typeof D==="number"&&isFinite(D)&&Math.floor(D)===D}function vJ(D){if(typeof BigInt==="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof I9.Buffer.prototype[D]==="undefined")throw new Error(`Platform does not support Buffer.prototype.${D}.`)}h9.bigIntAndBufferInt64Check=vJ});var R9=b((j9)=>{Object.defineProperty(j9,"__esModule",{value:!0});var f=y9(),g9=4096,iJ="utf8";class A1{constructor(D){if(this.length=0,this._encoding=iJ,this._writeOffset=0,this._readOffset=0,A1.isSmartBufferOptions(D)){if(D.encoding)f.checkEncoding(D.encoding),this._encoding=D.encoding;if(D.size)if(f.isFiniteInteger(D.size)&&D.size>0)this._buff=Buffer.allocUnsafe(D.size);else throw new Error(f.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(D.buff)if(Buffer.isBuffer(D.buff))this._buff=D.buff,this.length=D.buff.length;else throw new Error(f.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(g9)}else{if(typeof D!=="undefined")throw new Error(f.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(g9)}}static fromSize(D,u){return new this({size:D,encoding:u})}static fromBuffer(D,u){return new this({buff:D,encoding:u})}static fromOptions(D){return new this(D)}static isSmartBufferOptions(D){let u=D;return u&&(u.encoding!==void 0||u.size!==void 0||u.buff!==void 0)}readInt8(D){return this._readNumberValue(Buffer.prototype.readInt8,1,D)}readInt16BE(D){return this._readNumberValue(Buffer.prototype.readInt16BE,2,D)}readInt16LE(D){return this._readNumberValue(Buffer.prototype.readInt16LE,2,D)}readInt32BE(D){return this._readNumberValue(Buffer.prototype.readInt32BE,4,D)}readInt32LE(D){return this._readNumberValue(Buffer.prototype.readInt32LE,4,D)}readBigInt64BE(D){return f.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,D)}readBigInt64LE(D){return f.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,D)}writeInt8(D,u){return this._writeNumberValue(Buffer.prototype.writeInt8,1,D,u),this}insertInt8(D,u){return this._insertNumberValue(Buffer.prototype.writeInt8,1,D,u)}writeInt16BE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,D,u)}insertInt16BE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,D,u)}writeInt16LE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,D,u)}insertInt16LE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,D,u)}writeInt32BE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,D,u)}insertInt32BE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,D,u)}writeInt32LE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,D,u)}insertInt32LE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,D,u)}writeBigInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}insertBigInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}writeBigInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}insertBigInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}readUInt8(D){return this._readNumberValue(Buffer.prototype.readUInt8,1,D)}readUInt16BE(D){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,D)}readUInt16LE(D){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,D)}readUInt32BE(D){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,D)}readUInt32LE(D){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,D)}readBigUInt64BE(D){return f.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,D)}readBigUInt64LE(D){return f.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,D)}writeUInt8(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,D,u)}insertUInt8(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,D,u)}writeUInt16BE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,D,u)}insertUInt16BE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,D,u)}writeUInt16LE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,D,u)}insertUInt16LE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,D,u)}writeUInt32BE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,D,u)}insertUInt32BE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,D,u)}writeUInt32LE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,D,u)}insertUInt32LE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,D,u)}writeBigUInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}insertBigUInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}writeBigUInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}insertBigUInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}readFloatBE(D){return this._readNumberValue(Buffer.prototype.readFloatBE,4,D)}readFloatLE(D){return this._readNumberValue(Buffer.prototype.readFloatLE,4,D)}writeFloatBE(D,u){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,D,u)}insertFloatBE(D,u){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,D,u)}writeFloatLE(D,u){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,D,u)}insertFloatLE(D,u){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,D,u)}readDoubleBE(D){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,D)}readDoubleLE(D){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,D)}writeDoubleBE(D,u){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,D,u)}insertDoubleBE(D,u){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,D,u)}writeDoubleLE(D,u){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,D,u)}insertDoubleLE(D,u){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,D,u)}readString(D,u){let F;if(typeof D==="number")f.checkLengthValue(D),F=Math.min(D,this.length-this._readOffset);else u=D,F=this.length-this._readOffset;if(typeof u!=="undefined")f.checkEncoding(u);let $=this._buff.slice(this._readOffset,this._readOffset+F).toString(u||this._encoding);return this._readOffset+=F,$}insertString(D,u,F){return f.checkOffsetValue(u),this._handleString(D,!0,u,F)}writeString(D,u,F){return this._handleString(D,!1,u,F)}readStringNT(D){if(typeof D!=="undefined")f.checkEncoding(D);let u=this.length;for(let $=this._readOffset;$<this.length;$++)if(this._buff[$]===0){u=$;break}let F=this._buff.slice(this._readOffset,u);return this._readOffset=u+1,F.toString(D||this._encoding)}insertStringNT(D,u,F){return f.checkOffsetValue(u),this.insertString(D,u,F),this.insertUInt8(0,u+D.length),this}writeStringNT(D,u,F){return this.writeString(D,u,F),this.writeUInt8(0,typeof u==="number"?u+D.length:this.writeOffset),this}readBuffer(D){if(typeof D!=="undefined")f.checkLengthValue(D);let u=typeof D==="number"?D:this.length,F=Math.min(this.length,this._readOffset+u),$=this._buff.slice(this._readOffset,F);return this._readOffset=F,$}insertBuffer(D,u){return f.checkOffsetValue(u),this._handleBuffer(D,!0,u)}writeBuffer(D,u){return this._handleBuffer(D,!1,u)}readBufferNT(){let D=this.length;for(let F=this._readOffset;F<this.length;F++)if(this._buff[F]===0){D=F;break}let u=this._buff.slice(this._readOffset,D);return this._readOffset=D+1,u}insertBufferNT(D,u){return f.checkOffsetValue(u),this.insertBuffer(D,u),this.insertUInt8(0,u+D.length),this}writeBufferNT(D,u){if(typeof u!=="undefined")f.checkOffsetValue(u);return this.writeBuffer(D,u),this.writeUInt8(0,typeof u==="number"?u+D.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(D){f.checkOffsetValue(D),f.checkTargetOffset(D,this),this._readOffset=D}get writeOffset(){return this._writeOffset}set writeOffset(D){f.checkOffsetValue(D),f.checkTargetOffset(D,this),this._writeOffset=D}get encoding(){return this._encoding}set encoding(D){f.checkEncoding(D),this._encoding=D}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(D){let u=typeof D==="string"?D:this._encoding;return f.checkEncoding(u),this._buff.toString(u,0,this.length)}destroy(){return this.clear(),this}_handleString(D,u,F,$){let E=this._writeOffset,w=this._encoding;if(typeof F==="number")E=F;else if(typeof F==="string")f.checkEncoding(F),w=F;if(typeof $==="string")f.checkEncoding($),w=$;let C=Buffer.byteLength(D,w);if(u)this.ensureInsertable(C,E);else this._ensureWriteable(C,E);if(this._buff.write(D,E,C,w),u)this._writeOffset+=C;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,E+C);else this._writeOffset+=C;return this}_handleBuffer(D,u,F){let $=typeof F==="number"?F:this._writeOffset;if(u)this.ensureInsertable(D.length,$);else this._ensureWriteable(D.length,$);if(D.copy(this._buff,$),u)this._writeOffset+=D.length;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,$+D.length);else this._writeOffset+=D.length;return this}ensureReadable(D,u){let F=this._readOffset;if(typeof u!=="undefined")f.checkOffsetValue(u),F=u;if(F<0||F+D>this.length)throw new Error(f.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(D,u){if(f.checkOffsetValue(u),this._ensureCapacity(this.length+D),u<this.length)this._buff.copy(this._buff,u+D,u,this._buff.length);if(u+D>this.length)this.length=u+D;else this.length+=D}_ensureWriteable(D,u){let F=typeof u==="number"?u:this._writeOffset;if(this._ensureCapacity(F+D),F+D>this.length)this.length=F+D}_ensureCapacity(D){let u=this._buff.length;if(D>u){let F=this._buff,$=u*3/2+1;if($<D)$=D;this._buff=Buffer.allocUnsafe($),F.copy(this._buff,0,0,u)}}_readNumberValue(D,u,F){this.ensureReadable(u,F);let $=D.call(this._buff,typeof F==="number"?F:this._readOffset);if(typeof F==="undefined")this._readOffset+=u;return $}_insertNumberValue(D,u,F,$){return f.checkOffsetValue($),this.ensureInsertable(u,$),D.call(this._buff,F,$),this._writeOffset+=u,this}_writeNumberValue(D,u,F,$){if(typeof $==="number"){if($<0)throw new Error(f.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);f.checkOffsetValue($)}let E=typeof $==="number"?$:this._writeOffset;if(this._ensureWriteable(u,E),D.call(this._buff,F,E),typeof $==="number")this._writeOffset=Math.max(this._writeOffset,E+u);else this._writeOffset+=u;return this}}j9.SmartBuffer=A1});var Q1=b((c9)=>{Object.defineProperty(c9,"__esModule",{value:!0});c9.SOCKS5_NO_ACCEPTABLE_AUTH=c9.SOCKS5_CUSTOM_AUTH_END=c9.SOCKS5_CUSTOM_AUTH_START=c9.SOCKS_INCOMING_PACKET_SIZES=c9.SocksClientState=c9.Socks5Response=c9.Socks5HostType=c9.Socks5Auth=c9.Socks4Response=c9.SocksCommand=c9.ERRORS=c9.DEFAULT_TIMEOUT=void 0;var sJ=30000;c9.DEFAULT_TIMEOUT=sJ;var aJ={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};c9.ERRORS=aJ;var oJ={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:(D)=>D+7,Socks4Response:8};c9.SOCKS_INCOMING_PACKET_SIZES=oJ;var k9;(function(D){D[D.connect=1]="connect",D[D.bind=2]="bind",D[D.associate=3]="associate"})(k9||(c9.SocksCommand=k9={}));var b9;(function(D){D[D.Granted=90]="Granted",D[D.Failed=91]="Failed",D[D.Rejected=92]="Rejected",D[D.RejectedIdent=93]="RejectedIdent"})(b9||(c9.Socks4Response=b9={}));var _9;(function(D){D[D.NoAuth=0]="NoAuth",D[D.GSSApi=1]="GSSApi",D[D.UserPass=2]="UserPass"})(_9||(c9.Socks5Auth=_9={}));var eJ=128;c9.SOCKS5_CUSTOM_AUTH_START=eJ;var DZ=254;c9.SOCKS5_CUSTOM_AUTH_END=DZ;var uZ=255;c9.SOCKS5_NO_ACCEPTABLE_AUTH=uZ;var P9;(function(D){D[D.Granted=0]="Granted",D[D.Failure=1]="Failure",D[D.NotAllowed=2]="NotAllowed",D[D.NetworkUnreachable=3]="NetworkUnreachable",D[D.HostUnreachable=4]="HostUnreachable",D[D.ConnectionRefused=5]="ConnectionRefused",D[D.TTLExpired=6]="TTLExpired",D[D.CommandNotSupported=7]="CommandNotSupported",D[D.AddressNotSupported=8]="AddressNotSupported"})(P9||(c9.Socks5Response=P9={}));var m9;(function(D){D[D.IPv4=1]="IPv4",D[D.Hostname=3]="Hostname",D[D.IPv6=4]="IPv6"})(m9||(c9.Socks5HostType=m9={}));var v9;(function(D){D[D.Created=0]="Created",D[D.Connecting=1]="Connecting",D[D.Connected=2]="Connected",D[D.SentInitialHandshake=3]="SentInitialHandshake",D[D.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",D[D.SentAuthentication=5]="SentAuthentication",D[D.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",D[D.SentFinalHandshake=7]="SentFinalHandshake",D[D.ReceivedFinalResponse=8]="ReceivedFinalResponse",D[D.BoundWaitingForConnection=9]="BoundWaitingForConnection",D[D.Established=10]="Established",D[D.Disconnected=11]="Disconnected",D[D.Error=99]="Error"})(v9||(c9.SocksClientState=v9={}))});var z1=b((r9)=>{Object.defineProperty(r9,"__esModule",{value:!0});r9.shuffleArray=r9.SocksClientError=void 0;class n9 extends Error{constructor(D,u){super(D);this.options=u}}r9.SocksClientError=n9;function XZ(D){for(let u=D.length-1;u>0;u--){let F=Math.floor(Math.random()*(u+1));[D[u],D[F]]=[D[F],D[u]]}}r9.shuffleArray=XZ});var G1=b((l9)=>{Object.defineProperty(l9,"__esModule",{value:!0});l9.isCorrect=l9.isInSubnet=void 0;function AZ(D){if(this.subnetMask<D.subnetMask)return!1;if(this.mask(D.subnetMask)===D.mask())return!0;return!1}l9.isInSubnet=AZ;function QZ(D){return function(){if(this.addressMinusSuffix!==this.correctForm())return!1;if(this.subnetMask===D&&!this.parsedSubnet)return!0;return this.parsedSubnet===String(this.subnetMask)}}l9.isCorrect=QZ});var q1=b((i9)=>{Object.defineProperty(i9,"__esModule",{value:!0});i9.RE_SUBNET_STRING=i9.RE_ADDRESS=i9.GROUPS=i9.BITS=void 0;i9.BITS=32;i9.GROUPS=4;i9.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;i9.RE_SUBNET_STRING=/\/\d{1,2}$/});var S8=b((a9)=>{Object.defineProperty(a9,"__esModule",{value:!0});a9.AddressError=void 0;class s9 extends Error{constructor(D,u){super(D);if(this.name="AddressError",u!==null)this.parseMessage=u}}a9.AddressError=s9});var H1=b((h8,e9)=>{(function(){var D,u=244837814094590,F=(u&16777215)==15715070;function $(B,Y,J){if(B!=null)if(typeof B=="number")this.fromNumber(B,Y,J);else if(Y==null&&typeof B!="string")this.fromString(B,256);else this.fromString(B,Y)}function E(){return new $(null)}function w(B,Y,J,K,A,G){while(--G>=0){var I=Y*this[B++]+J[K]+A;A=Math.floor(I/67108864),J[K++]=I&67108863}return A}function C(B,Y,J,K,A,G){var I=Y&32767,S=Y>>15;while(--G>=0){var o=this[B]&32767,AD=this[B++]>>15,lD=S*o+AD*I;o=I*o+((lD&32767)<<15)+J[K]+(A&1073741823),A=(o>>>30)+(lD>>>15)+S*AD+(A>>>30),J[K++]=o&1073741823}return A}function Z(B,Y,J,K,A,G){var I=Y&16383,S=Y>>14;while(--G>=0){var o=this[B]&16383,AD=this[B++]>>14,lD=S*o+AD*I;o=I*o+((lD&16383)<<14)+J[K]+A,A=(o>>28)+(lD>>14)+S*AD,J[K++]=o&268435455}return A}var M=typeof navigator!=="undefined";if(M&&F&&navigator.appName=="Microsoft Internet Explorer")$.prototype.am=C,D=30;else if(M&&F&&navigator.appName!="Netscape")$.prototype.am=w,D=26;else $.prototype.am=Z,D=28;$.prototype.DB=D,$.prototype.DM=(1<<D)-1,$.prototype.DV=1<<D;var W=52;$.prototype.FV=Math.pow(2,W),$.prototype.F1=W-D,$.prototype.F2=2*D-W;var X="0123456789abcdefghijklmnopqrstuvwxyz",q=new Array,U,L;U="0".charCodeAt(0);for(L=0;L<=9;++L)q[U++]=L;U="a".charCodeAt(0);for(L=10;L<36;++L)q[U++]=L;U="A".charCodeAt(0);for(L=10;L<36;++L)q[U++]=L;function Q(B){return X.charAt(B)}function P(B,Y){var J=q[B.charCodeAt(Y)];return J==null?-1:J}function d(B){for(var Y=this.t-1;Y>=0;--Y)B[Y]=this[Y];B.t=this.t,B.s=this.s}function l(B){if(this.t=1,this.s=B<0?-1:0,B>0)this[0]=B;else if(B<-1)this[0]=B+this.DV;else this.t=0}function uD(B){var Y=E();return Y.fromInt(B),Y}function FD(B,Y){var J;if(Y==16)J=4;else if(Y==8)J=3;else if(Y==256)J=8;else if(Y==2)J=1;else if(Y==32)J=5;else if(Y==4)J=2;else{this.fromRadix(B,Y);return}this.t=0,this.s=0;var K=B.length,A=!1,G=0;while(--K>=0){var I=J==8?B[K]&255:P(B,K);if(I<0){if(B.charAt(K)=="-")A=!0;continue}if(A=!1,G==0)this[this.t++]=I;else if(G+J>this.DB)this[this.t-1]|=(I&(1<<this.DB-G)-1)<<G,this[this.t++]=I>>this.DB-G;else this[this.t-1]|=I<<G;if(G+=J,G>=this.DB)G-=this.DB}if(J==8&&(B[0]&128)!=0){if(this.s=-1,G>0)this[this.t-1]|=(1<<this.DB-G)-1<<G}if(this.clamp(),A)$.ZERO.subTo(this,this)}function xD(){var B=this.s&this.DM;while(this.t>0&&this[this.t-1]==B)--this.t}function dD(B){if(this.s<0)return"-"+this.negate().toString(B);var Y;if(B==16)Y=4;else if(B==8)Y=3;else if(B==2)Y=1;else if(B==32)Y=5;else if(B==4)Y=2;else return this.toRadix(B);var J=(1<<Y)-1,K,A=!1,G="",I=this.t,S=this.DB-I*this.DB%Y;if(I-- >0){if(S<this.DB&&(K=this[I]>>S)>0)A=!0,G=Q(K);while(I>=0){if(S<Y)K=(this[I]&(1<<S)-1)<<Y-S,K|=this[--I]>>(S+=this.DB-Y);else if(K=this[I]>>(S-=Y)&J,S<=0)S+=this.DB,--I;if(K>0)A=!0;if(A)G+=Q(K)}}return A?G:"0"}function SD(){var B=E();return $.ZERO.subTo(this,B),B}function VD(){return this.s<0?this.negate():this}function i(B){var Y=this.s-B.s;if(Y!=0)return Y;var J=this.t;if(Y=J-B.t,Y!=0)return this.s<0?-Y:Y;while(--J>=0)if((Y=this[J]-B[J])!=0)return Y;return 0}function m(B){var Y=1,J;if((J=B>>>16)!=0)B=J,Y+=16;if((J=B>>8)!=0)B=J,Y+=8;if((J=B>>4)!=0)B=J,Y+=4;if((J=B>>2)!=0)B=J,Y+=2;if((J=B>>1)!=0)B=J,Y+=1;return Y}function UD(){if(this.t<=0)return 0;return this.DB*(this.t-1)+m(this[this.t-1]^this.s&this.DM)}function LD(B,Y){var J;for(J=this.t-1;J>=0;--J)Y[J+B]=this[J];for(J=B-1;J>=0;--J)Y[J]=0;Y.t=this.t+B,Y.s=this.s}function g(B,Y){for(var J=B;J<this.t;++J)Y[J-B]=this[J];Y.t=Math.max(this.t-B,0),Y.s=this.s}function T(B,Y){var J=B%this.DB,K=this.DB-J,A=(1<<K)-1,G=Math.floor(B/this.DB),I=this.s<<J&this.DM,S;for(S=this.t-1;S>=0;--S)Y[S+G+1]=this[S]>>K|I,I=(this[S]&A)<<J;for(S=G-1;S>=0;--S)Y[S]=0;Y[G]=I,Y.t=this.t+G+1,Y.s=this.s,Y.clamp()}function O(B,Y){Y.s=this.s;var J=Math.floor(B/this.DB);if(J>=this.t){Y.t=0;return}var K=B%this.DB,A=this.DB-K,G=(1<<K)-1;Y[0]=this[J]>>K;for(var I=J+1;I<this.t;++I)Y[I-J-1]|=(this[I]&G)<<A,Y[I-J]=this[I]>>K;if(K>0)Y[this.t-J-1]|=(this.s&G)<<A;Y.t=this.t-J,Y.clamp()}function h(B,Y){var J=0,K=0,A=Math.min(B.t,this.t);while(J<A)K+=this[J]-B[J],Y[J++]=K&this.DM,K>>=this.DB;if(B.t<this.t){K-=B.s;while(J<this.t)K+=this[J],Y[J++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(J<B.t)K-=B[J],Y[J++]=K&this.DM,K>>=this.DB;K-=B.s}if(Y.s=K<0?-1:0,K<-1)Y[J++]=this.DV+K;else if(K>0)Y[J++]=K;Y.t=J,Y.clamp()}function N(B,Y){var J=this.abs(),K=B.abs(),A=J.t;Y.t=A+K.t;while(--A>=0)Y[A]=0;for(A=0;A<K.t;++A)Y[A+J.t]=J.am(0,K[A],Y,A,0,J.t);if(Y.s=0,Y.clamp(),this.s!=B.s)$.ZERO.subTo(Y,Y)}function k(B){var Y=this.abs(),J=B.t=2*Y.t;while(--J>=0)B[J]=0;for(J=0;J<Y.t-1;++J){var K=Y.am(J,Y[J],B,2*J,0,1);if((B[J+Y.t]+=Y.am(J+1,2*Y[J],B,2*J+1,K,Y.t-J-1))>=Y.DV)B[J+Y.t]-=Y.DV,B[J+Y.t+1]=1}if(B.t>0)B[B.t-1]+=Y.am(J,Y[J],B,2*J,0,1);B.s=0,B.clamp()}function _(B,Y,J){var K=B.abs();if(K.t<=0)return;var A=this.abs();if(A.t<K.t){if(Y!=null)Y.fromInt(0);if(J!=null)this.copyTo(J);return}if(J==null)J=E();var G=E(),I=this.s,S=B.s,o=this.DB-m(K[K.t-1]);if(o>0)K.lShiftTo(o,G),A.lShiftTo(o,J);else K.copyTo(G),A.copyTo(J);var AD=G.t,lD=G[AD-1];if(lD==0)return;var fD=lD*(1<<this.F1)+(AD>1?G[AD-2]>>this.F2:0),Xu=this.FV/fD,T0=(1<<this.F1)/fD,eD=1<<this.F2,Du=J.t,N0=Du-AD,Gu=Y==null?E():Y;if(G.dlShiftTo(N0,Gu),J.compareTo(Gu)>=0)J[J.t++]=1,J.subTo(Gu,J);$.ONE.dlShiftTo(AD,Gu),Gu.subTo(G,G);while(G.t<AD)G[G.t++]=0;while(--N0>=0){var c8=J[--Du]==lD?this.DM:Math.floor(J[Du]*Xu+(J[Du-1]+eD)*T0);if((J[Du]+=G.am(0,c8,J,N0,0,AD))<c8){G.dlShiftTo(N0,Gu),J.subTo(Gu,J);while(J[Du]<--c8)J.subTo(Gu,J)}}if(Y!=null){if(J.drShiftTo(AD,Y),I!=S)$.ZERO.subTo(Y,Y)}if(J.t=AD,J.clamp(),o>0)J.rShiftTo(o,J);if(I<0)$.ZERO.subTo(J,J)}function v(B){var Y=E();if(this.abs().divRemTo(B,null,Y),this.s<0&&Y.compareTo($.ZERO)>0)B.subTo(Y,Y);return Y}function r(B){this.m=B}function a(B){if(B.s<0||B.compareTo(this.m)>=0)return B.mod(this.m);else return B}function JD(B){return B}function TD(B){B.divRemTo(this.m,null,B)}function Eu(B,Y,J){B.multiplyTo(Y,J),this.reduce(J)}function sD(B,Y){B.squareTo(Y),this.reduce(Y)}r.prototype.convert=a,r.prototype.revert=JD,r.prototype.reduce=TD,r.prototype.mulTo=Eu,r.prototype.sqrTo=sD;function Mu(){if(this.t<1)return 0;var B=this[0];if((B&1)==0)return 0;var Y=B&3;return Y=Y*(2-(B&15)*Y)&15,Y=Y*(2-(B&255)*Y)&255,Y=Y*(2-((B&65535)*Y&65535))&65535,Y=Y*(2-B*Y%this.DV)%this.DV,Y>0?this.DV-Y:-Y}function XD(B){this.m=B,this.mp=B.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<B.DB-15)-1,this.mt2=2*B.t}function KD(B){var Y=E();if(B.abs().dlShiftTo(this.m.t,Y),Y.divRemTo(this.m,null,Y),B.s<0&&Y.compareTo($.ZERO)>0)this.m.subTo(Y,Y);return Y}function bD(B){var Y=E();return B.copyTo(Y),this.reduce(Y),Y}function aD(B){while(B.t<=this.mt2)B[B.t++]=0;for(var Y=0;Y<this.m.t;++Y){var J=B[Y]&32767,K=J*this.mpl+((J*this.mph+(B[Y]>>15)*this.mpl&this.um)<<15)&B.DM;J=Y+this.m.t,B[J]+=this.m.am(0,K,B,Y,0,this.m.t);while(B[J]>=B.DV)B[J]-=B.DV,B[++J]++}if(B.clamp(),B.drShiftTo(this.m.t,B),B.compareTo(this.m)>=0)B.subTo(this.m,B)}function wu(B,Y){B.squareTo(Y),this.reduce(Y)}function ku(B,Y,J){B.multiplyTo(Y,J),this.reduce(J)}XD.prototype.convert=KD,XD.prototype.revert=bD,XD.prototype.reduce=aD,XD.prototype.mulTo=ku,XD.prototype.sqrTo=wu;function bu(){return(this.t>0?this[0]&1:this.s)==0}function ou(B,Y){if(B>4294967295||B<1)return $.ONE;var J=E(),K=E(),A=Y.convert(this),G=m(B)-1;A.copyTo(J);while(--G>=0)if(Y.sqrTo(J,K),(B&1<<G)>0)Y.mulTo(K,A,J);else{var I=J;J=K,K=I}return Y.revert(J)}function eu(B,Y){var J;if(B<256||Y.isEven())J=new r(Y);else J=new XD(Y);return this.exp(B,J)}$.prototype.copyTo=d,$.prototype.fromInt=l,$.prototype.fromString=FD,$.prototype.clamp=xD,$.prototype.dlShiftTo=LD,$.prototype.drShiftTo=g,$.prototype.lShiftTo=T,$.prototype.rShiftTo=O,$.prototype.subTo=h,$.prototype.multiplyTo=N,$.prototype.squareTo=k,$.prototype.divRemTo=_,$.prototype.invDigit=Mu,$.prototype.isEven=bu,$.prototype.exp=ou,$.prototype.toString=dD,$.prototype.negate=SD,$.prototype.abs=VD,$.prototype.compareTo=i,$.prototype.bitLength=UD,$.prototype.mod=v,$.prototype.modPowInt=eu,$.ZERO=uD(0),$.ONE=uD(1);function D0(){var B=E();return this.copyTo(B),B}function u0(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function R1(){return this.t==0?this.s:this[0]<<24>>24}function R4(){return this.t==0?this.s:this[0]<<16>>16}function k4(B){return Math.floor(Math.LN2*this.DB/Math.log(B))}function b4(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function _4(B){if(B==null)B=10;if(this.signum()==0||B<2||B>36)return"0";var Y=this.chunkSize(B),J=Math.pow(B,Y),K=uD(J),A=E(),G=E(),I="";this.divRemTo(K,A,G);while(A.signum()>0)I=(J+G.intValue()).toString(B).substr(1)+I,A.divRemTo(K,A,G);return G.intValue().toString(B)+I}function P4(B,Y){if(this.fromInt(0),Y==null)Y=10;var J=this.chunkSize(Y),K=Math.pow(Y,J),A=!1,G=0,I=0;for(var S=0;S<B.length;++S){var o=P(B,S);if(o<0){if(B.charAt(S)=="-"&&this.signum()==0)A=!0;continue}if(I=Y*I+o,++G>=J)this.dMultiply(K),this.dAddOffset(I,0),G=0,I=0}if(G>0)this.dMultiply(Math.pow(Y,G)),this.dAddOffset(I,0);if(A)$.ZERO.subTo(this,this)}function m4(B,Y,J){if(typeof Y=="number")if(B<2)this.fromInt(1);else{if(this.fromNumber(B,J),!this.testBit(B-1))this.bitwiseTo($.ONE.shiftLeft(B-1),_8,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(Y))if(this.dAddOffset(2,0),this.bitLength()>B)this.subTo($.ONE.shiftLeft(B-1),this)}else{var K=new Array,A=B&7;if(K.length=(B>>3)+1,Y.nextBytes(K),A>0)K[0]&=(1<<A)-1;else K[0]=0;this.fromString(K,256)}}function v4(){var B=this.t,Y=new Array;Y[0]=this.s;var J=this.DB-B*this.DB%8,K,A=0;if(B-- >0){if(J<this.DB&&(K=this[B]>>J)!=(this.s&this.DM)>>J)Y[A++]=K|this.s<<this.DB-J;while(B>=0){if(J<8)K=(this[B]&(1<<J)-1)<<8-J,K|=this[--B]>>(J+=this.DB-8);else if(K=this[B]>>(J-=8)&255,J<=0)J+=this.DB,--B;if((K&128)!=0)K|=-256;if(A==0&&(this.s&128)!=(K&128))++A;if(A>0||K!=this.s)Y[A++]=K}}return Y}function c4(B){return this.compareTo(B)==0}function f4(B){return this.compareTo(B)<0?this:B}function n4(B){return this.compareTo(B)>0?this:B}function r4(B,Y,J){var K,A,G=Math.min(B.t,this.t);for(K=0;K<G;++K)J[K]=Y(this[K],B[K]);if(B.t<this.t){A=B.s&this.DM;for(K=G;K<this.t;++K)J[K]=Y(this[K],A);J.t=this.t}else{A=this.s&this.DM;for(K=G;K<B.t;++K)J[K]=Y(A,B[K]);J.t=B.t}J.s=Y(this.s,B.s),J.clamp()}function d4(B,Y){return B&Y}function l4(B){var Y=E();return this.bitwiseTo(B,d4,Y),Y}function _8(B,Y){return B|Y}function p4(B){var Y=E();return this.bitwiseTo(B,_8,Y),Y}function k1(B,Y){return B^Y}function i4(B){var Y=E();return this.bitwiseTo(B,k1,Y),Y}function b1(B,Y){return B&~Y}function t4(B){var Y=E();return this.bitwiseTo(B,b1,Y),Y}function s4(){var B=E();for(var Y=0;Y<this.t;++Y)B[Y]=this.DM&~this[Y];return B.t=this.t,B.s=~this.s,B}function a4(B){var Y=E();if(B<0)this.rShiftTo(-B,Y);else this.lShiftTo(B,Y);return Y}function o4(B){var Y=E();if(B<0)this.lShiftTo(-B,Y);else this.rShiftTo(B,Y);return Y}function e4(B){if(B==0)return-1;var Y=0;if((B&65535)==0)B>>=16,Y+=16;if((B&255)==0)B>>=8,Y+=8;if((B&15)==0)B>>=4,Y+=4;if((B&3)==0)B>>=2,Y+=2;if((B&1)==0)++Y;return Y}function D$(){for(var B=0;B<this.t;++B)if(this[B]!=0)return B*this.DB+e4(this[B]);if(this.s<0)return this.t*this.DB;return-1}function u$(B){var Y=0;while(B!=0)B&=B-1,++Y;return Y}function F$(){var B=0,Y=this.s&this.DM;for(var J=0;J<this.t;++J)B+=u$(this[J]^Y);return B}function C$(B){var Y=Math.floor(B/this.DB);if(Y>=this.t)return this.s!=0;return(this[Y]&1<<B%this.DB)!=0}function $$(B,Y){var J=$.ONE.shiftLeft(B);return this.bitwiseTo(J,Y,J),J}function E$(B){return this.changeBit(B,_8)}function w$(B){return this.changeBit(B,b1)}function B$(B){return this.changeBit(B,k1)}function Y$(B,Y){var J=0,K=0,A=Math.min(B.t,this.t);while(J<A)K+=this[J]+B[J],Y[J++]=K&this.DM,K>>=this.DB;if(B.t<this.t){K+=B.s;while(J<this.t)K+=this[J],Y[J++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(J<B.t)K+=B[J],Y[J++]=K&this.DM,K>>=this.DB;K+=B.s}if(Y.s=K<0?-1:0,K>0)Y[J++]=K;else if(K<-1)Y[J++]=this.DV+K;Y.t=J,Y.clamp()}function J$(B){var Y=E();return this.addTo(B,Y),Y}function Z$(B){var Y=E();return this.subTo(B,Y),Y}function K$(B){var Y=E();return this.multiplyTo(B,Y),Y}function M$(){var B=E();return this.squareTo(B),B}function X$(B){var Y=E();return this.divRemTo(B,Y,null),Y}function W$(B){var Y=E();return this.divRemTo(B,null,Y),Y}function A$(B){var Y=E(),J=E();return this.divRemTo(B,Y,J),new Array(Y,J)}function Q$(B){this[this.t]=this.am(0,B-1,this,0,0,this.t),++this.t,this.clamp()}function z$(B,Y){if(B==0)return;while(this.t<=Y)this[this.t++]=0;this[Y]+=B;while(this[Y]>=this.DV){if(this[Y]-=this.DV,++Y>=this.t)this[this.t++]=0;++this[Y]}}function F0(){}function _1(B){return B}function G$(B,Y,J){B.multiplyTo(Y,J)}function q$(B,Y){B.squareTo(Y)}F0.prototype.convert=_1,F0.prototype.revert=_1,F0.prototype.mulTo=G$,F0.prototype.sqrTo=q$;function H$(B){return this.exp(B,new F0)}function U$(B,Y,J){var K=Math.min(this.t+B.t,Y);J.s=0,J.t=K;while(K>0)J[--K]=0;var A;for(A=J.t-this.t;K<A;++K)J[K+this.t]=this.am(0,B[K],J,K,0,this.t);for(A=Math.min(B.t,Y);K<A;++K)this.am(0,B[K],J,K,0,Y-K);J.clamp()}function O$(B,Y,J){--Y;var K=J.t=this.t+B.t-Y;J.s=0;while(--K>=0)J[K]=0;for(K=Math.max(Y-this.t,0);K<B.t;++K)J[this.t+K-Y]=this.am(Y-K,B[K],J,0,0,this.t+K-Y);J.clamp(),J.drShiftTo(1,J)}function Tu(B){this.r2=E(),this.q3=E(),$.ONE.dlShiftTo(2*B.t,this.r2),this.mu=this.r2.divide(B),this.m=B}function V$(B){if(B.s<0||B.t>2*this.m.t)return B.mod(this.m);else if(B.compareTo(this.m)<0)return B;else{var Y=E();return B.copyTo(Y),this.reduce(Y),Y}}function L$(B){return B}function T$(B){if(B.drShiftTo(this.m.t-1,this.r2),B.t>this.m.t+1)B.t=this.m.t+1,B.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(B.compareTo(this.r2)<0)B.dAddOffset(1,this.m.t+1);B.subTo(this.r2,B);while(B.compareTo(this.m)>=0)B.subTo(this.m,B)}function N$(B,Y){B.squareTo(Y),this.reduce(Y)}function I$(B,Y,J){B.multiplyTo(Y,J),this.reduce(J)}Tu.prototype.convert=V$,Tu.prototype.revert=L$,Tu.prototype.reduce=T$,Tu.prototype.mulTo=I$,Tu.prototype.sqrTo=N$;function x$(B,Y){var J=B.bitLength(),K,A=uD(1),G;if(J<=0)return A;else if(J<18)K=1;else if(J<48)K=3;else if(J<144)K=4;else if(J<768)K=5;else K=6;if(J<8)G=new r(Y);else if(Y.isEven())G=new Tu(Y);else G=new XD(Y);var I=new Array,S=3,o=K-1,AD=(1<<K)-1;if(I[1]=G.convert(this),K>1){var lD=E();G.sqrTo(I[1],lD);while(S<=AD)I[S]=E(),G.mulTo(lD,I[S-2],I[S]),S+=2}var fD=B.t-1,Xu,T0=!0,eD=E(),Du;J=m(B[fD])-1;while(fD>=0){if(J>=o)Xu=B[fD]>>J-o&AD;else if(Xu=(B[fD]&(1<<J+1)-1)<<o-J,fD>0)Xu|=B[fD-1]>>this.DB+J-o;S=K;while((Xu&1)==0)Xu>>=1,--S;if((J-=S)<0)J+=this.DB,--fD;if(T0)I[Xu].copyTo(A),T0=!1;else{while(S>1)G.sqrTo(A,eD),G.sqrTo(eD,A),S-=2;if(S>0)G.sqrTo(A,eD);else Du=A,A=eD,eD=Du;G.mulTo(eD,I[Xu],A)}while(fD>=0&&(B[fD]&1<<J)==0)if(G.sqrTo(A,eD),Du=A,A=eD,eD=Du,--J<0)J=this.DB-1,--fD}return G.revert(A)}function S$(B){var Y=this.s<0?this.negate():this.clone(),J=B.s<0?B.negate():B.clone();if(Y.compareTo(J)<0){var K=Y;Y=J,J=K}var A=Y.getLowestSetBit(),G=J.getLowestSetBit();if(G<0)return Y;if(A<G)G=A;if(G>0)Y.rShiftTo(G,Y),J.rShiftTo(G,J);while(Y.signum()>0){if((A=Y.getLowestSetBit())>0)Y.rShiftTo(A,Y);if((A=J.getLowestSetBit())>0)J.rShiftTo(A,J);if(Y.compareTo(J)>=0)Y.subTo(J,Y),Y.rShiftTo(1,Y);else J.subTo(Y,J),J.rShiftTo(1,J)}if(G>0)J.lShiftTo(G,J);return J}function h$(B){if(B<=0)return 0;var Y=this.DV%B,J=this.s<0?B-1:0;if(this.t>0)if(Y==0)J=this[0]%B;else for(var K=this.t-1;K>=0;--K)J=(Y*J+this[K])%B;return J}function y$(B){var Y=B.isEven();if(this.isEven()&&Y||B.signum()==0)return $.ZERO;var J=B.clone(),K=this.clone(),A=uD(1),G=uD(0),I=uD(0),S=uD(1);while(J.signum()!=0){while(J.isEven()){if(J.rShiftTo(1,J),Y){if(!A.isEven()||!G.isEven())A.addTo(this,A),G.subTo(B,G);A.rShiftTo(1,A)}else if(!G.isEven())G.subTo(B,G);G.rShiftTo(1,G)}while(K.isEven()){if(K.rShiftTo(1,K),Y){if(!I.isEven()||!S.isEven())I.addTo(this,I),S.subTo(B,S);I.rShiftTo(1,I)}else if(!S.isEven())S.subTo(B,S);S.rShiftTo(1,S)}if(J.compareTo(K)>=0){if(J.subTo(K,J),Y)A.subTo(I,A);G.subTo(S,G)}else{if(K.subTo(J,K),Y)I.subTo(A,I);S.subTo(G,S)}}if(K.compareTo($.ONE)!=0)return $.ZERO;if(S.compareTo(B)>=0)return S.subtract(B);if(S.signum()<0)S.addTo(B,S);else return S;if(S.signum()<0)return S.add(B);else return S}var hD=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],g$=67108864/hD[hD.length-1];function j$(B){var Y,J=this.abs();if(J.t==1&&J[0]<=hD[hD.length-1]){for(Y=0;Y<hD.length;++Y)if(J[0]==hD[Y])return!0;return!1}if(J.isEven())return!1;Y=1;while(Y<hD.length){var K=hD[Y],A=Y+1;while(A<hD.length&&K<g$)K*=hD[A++];K=J.modInt(K);while(Y<A)if(K%hD[Y++]==0)return!1}return J.millerRabin(B)}function R$(B){var Y=this.subtract($.ONE),J=Y.getLowestSetBit();if(J<=0)return!1;var K=Y.shiftRight(J);if(B=B+1>>1,B>hD.length)B=hD.length;var A=E();for(var G=0;G<B;++G){A.fromInt(hD[Math.floor(Math.random()*hD.length)]);var I=A.modPow(K,this);if(I.compareTo($.ONE)!=0&&I.compareTo(Y)!=0){var S=1;while(S++<J&&I.compareTo(Y)!=0)if(I=I.modPowInt(2,this),I.compareTo($.ONE)==0)return!1;if(I.compareTo(Y)!=0)return!1}}return!0}$.prototype.chunkSize=k4,$.prototype.toRadix=_4,$.prototype.fromRadix=P4,$.prototype.fromNumber=m4,$.prototype.bitwiseTo=r4,$.prototype.changeBit=$$,$.prototype.addTo=Y$,$.prototype.dMultiply=Q$,$.prototype.dAddOffset=z$,$.prototype.multiplyLowerTo=U$,$.prototype.multiplyUpperTo=O$,$.prototype.modInt=h$,$.prototype.millerRabin=R$,$.prototype.clone=D0,$.prototype.intValue=u0,$.prototype.byteValue=R1,$.prototype.shortValue=R4,$.prototype.signum=b4,$.prototype.toByteArray=v4,$.prototype.equals=c4,$.prototype.min=f4,$.prototype.max=n4,$.prototype.and=l4,$.prototype.or=p4,$.prototype.xor=i4,$.prototype.andNot=t4,$.prototype.not=s4,$.prototype.shiftLeft=a4,$.prototype.shiftRight=o4,$.prototype.getLowestSetBit=D$,$.prototype.bitCount=F$,$.prototype.testBit=C$,$.prototype.setBit=E$,$.prototype.clearBit=w$,$.prototype.flipBit=B$,$.prototype.add=J$,$.prototype.subtract=Z$,$.prototype.multiply=K$,$.prototype.divide=X$,$.prototype.remainder=W$,$.prototype.divideAndRemainder=A$,$.prototype.modPow=x$,$.prototype.modInverse=y$,$.prototype.pow=H$,$.prototype.gcd=S$,$.prototype.isProbablePrime=j$,$.prototype.square=M$,$.prototype.Barrett=Tu;var L0,cD,WD;function k$(B){if(cD[WD++]^=B&255,cD[WD++]^=B>>8&255,cD[WD++]^=B>>16&255,cD[WD++]^=B>>24&255,WD>=v8)WD-=v8}function P1(){k$(new Date().getTime())}if(cD==null){cD=new Array,WD=0;var oD;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var m1=new Uint8Array(32);window.crypto.getRandomValues(m1);for(oD=0;oD<32;++oD)cD[WD++]=m1[oD]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var v1=window.crypto.random(32);for(oD=0;oD<v1.length;++oD)cD[WD++]=v1.charCodeAt(oD)&255}}while(WD<v8)oD=Math.floor(65536*Math.random()),cD[WD++]=oD>>>8,cD[WD++]=oD&255;WD=0,P1()}function b$(){if(L0==null){P1(),L0=v$(),L0.init(cD);for(WD=0;WD<cD.length;++WD)cD[WD]=0;WD=0}return L0.next()}function _$(B){var Y;for(Y=0;Y<B.length;++Y)B[Y]=b$()}function P8(){}P8.prototype.nextBytes=_$;function m8(){this.i=0,this.j=0,this.S=new Array}function P$(B){var Y,J,K;for(Y=0;Y<256;++Y)this.S[Y]=Y;J=0;for(Y=0;Y<256;++Y)J=J+this.S[Y]+B[Y%B.length]&255,K=this.S[Y],this.S[Y]=this.S[J],this.S[J]=K;this.i=0,this.j=0}function m$(){var B;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,B=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=B,this.S[B+this.S[this.i]&255]}m8.prototype.init=P$,m8.prototype.next=m$;function v$(){return new m8}var v8=256;if(typeof h8!=="undefined")h8=e9.exports={default:$,BigInteger:$,SecureRandom:P8};else this.jsbn={BigInteger:$,SecureRandom:P8}}).call(h8)});var O0=b((D4)=>{(function(){var D={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(C){return $(w(C),arguments)}function F(C,Z){return u.apply(null,[C].concat(Z||[]))}function $(C,Z){var M=1,W=C.length,X,q="",U,L,Q,P,d,l,uD,FD;for(U=0;U<W;U++)if(typeof C[U]==="string")q+=C[U];else if(typeof C[U]==="object"){if(Q=C[U],Q.keys){X=Z[M];for(L=0;L<Q.keys.length;L++){if(X==null)throw new Error(u('[sprintf] Cannot access property "%s" of undefined value "%s"',Q.keys[L],Q.keys[L-1]));X=X[Q.keys[L]]}}else if(Q.param_no)X=Z[Q.param_no];else X=Z[M++];if(D.not_type.test(Q.type)&&D.not_primitive.test(Q.type)&&X instanceof Function)X=X();if(D.numeric_arg.test(Q.type)&&(typeof X!=="number"&&isNaN(X)))throw new TypeError(u("[sprintf] expecting number but found %T",X));if(D.number.test(Q.type))uD=X>=0;switch(Q.type){case"b":X=parseInt(X,10).toString(2);break;case"c":X=String.fromCharCode(parseInt(X,10));break;case"d":case"i":X=parseInt(X,10);break;case"j":X=JSON.stringify(X,null,Q.width?parseInt(Q.width):0);break;case"e":X=Q.precision?parseFloat(X).toExponential(Q.precision):parseFloat(X).toExponential();break;case"f":X=Q.precision?parseFloat(X).toFixed(Q.precision):parseFloat(X);break;case"g":X=Q.precision?String(Number(X.toPrecision(Q.precision))):parseFloat(X);break;case"o":X=(parseInt(X,10)>>>0).toString(8);break;case"s":X=String(X),X=Q.precision?X.substring(0,Q.precision):X;break;case"t":X=String(!!X),X=Q.precision?X.substring(0,Q.precision):X;break;case"T":X=Object.prototype.toString.call(X).slice(8,-1).toLowerCase(),X=Q.precision?X.substring(0,Q.precision):X;break;case"u":X=parseInt(X,10)>>>0;break;case"v":X=X.valueOf(),X=Q.precision?X.substring(0,Q.precision):X;break;case"x":X=(parseInt(X,10)>>>0).toString(16);break;case"X":X=(parseInt(X,10)>>>0).toString(16).toUpperCase();break}if(D.json.test(Q.type))q+=X;else{if(D.number.test(Q.type)&&(!uD||Q.sign))FD=uD?"+":"-",X=X.toString().replace(D.sign,"");else FD="";d=Q.pad_char?Q.pad_char==="0"?"0":Q.pad_char.charAt(1):" ",l=Q.width-(FD+X).length,P=Q.width?l>0?d.repeat(l):"":"",q+=Q.align?FD+X+P:d==="0"?FD+P+X:P+FD+X}}return q}var E=Object.create(null);function w(C){if(E[C])return E[C];var Z=C,M,W=[],X=0;while(Z){if((M=D.text.exec(Z))!==null)W.push(M[0]);else if((M=D.modulo.exec(Z))!==null)W.push("%");else if((M=D.placeholder.exec(Z))!==null){if(M[2]){X|=1;var q=[],U=M[2],L=[];if((L=D.key.exec(U))!==null){q.push(L[1]);while((U=U.substring(L[0].length))!=="")if((L=D.key_access.exec(U))!==null)q.push(L[1]);else if((L=D.index_access.exec(U))!==null)q.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key")}else throw new SyntaxError("[sprintf] failed to parse named argument key");M[2]=q}else X|=2;if(X===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");W.push({placeholder:M[0],param_no:M[1],keys:M[2],sign:M[3],pad_char:M[4],align:M[5],width:M[6],precision:M[7],type:M[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");Z=Z.substring(M[0].length)}return E[C]=W}if(typeof D4!=="undefined")D4.sprintf=u,D4.vsprintf=F;if(typeof window!=="undefined"){if(window.sprintf=u,window.vsprintf=F,typeof define==="function"&&define.amd)define(function(){return{sprintf:u,vsprintf:F}})}})()});var U1=b((Zu)=>{var UZ=Zu&&Zu.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),OZ=Zu&&Zu.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),C4=Zu&&Zu.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))UZ(u,D,F)}return OZ(u,D),u};Object.defineProperty(Zu,"__esModule",{value:!0});Zu.Address4=void 0;var u4=C4(G1()),$u=C4(q1()),F4=S8(),V0=H1(),iu=O0();class tD{constructor(D){this.groups=$u.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=u4.isCorrect($u.BITS),this.isInSubnet=u4.isInSubnet,this.address=D;let u=$u.RE_SUBNET_STRING.exec(D);if(u){if(this.parsedSubnet=u[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>$u.BITS)throw new F4.AddressError("Invalid subnet mask.");D=D.replace($u.RE_SUBNET_STRING,"")}this.addressMinusSuffix=D,this.parsedAddress=this.parse(D)}static isValid(D){try{return new tD(D),!0}catch(u){return!1}}parse(D){let u=D.split(".");if(!D.match($u.RE_ADDRESS))throw new F4.AddressError("Invalid IPv4 address.");return u}correctForm(){return this.parsedAddress.map((D)=>parseInt(D,10)).join(".")}static fromHex(D){let u=D.replace(/:/g,"").padStart(8,"0"),F=[],$;for($=0;$<8;$+=2){let E=u.slice($,$+2);F.push(parseInt(E,16))}return new tD(F.join("."))}static fromInteger(D){return tD.fromHex(D.toString(16))}static fromArpa(D){let F=D.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new tD(F)}toHex(){return this.parsedAddress.map((D)=>iu.sprintf("%02x",parseInt(D,10))).join(":")}toArray(){return this.parsedAddress.map((D)=>parseInt(D,10))}toGroup6(){let D=[],u;for(u=0;u<$u.GROUPS;u+=2){let F=iu.sprintf("%02x%02x",parseInt(this.parsedAddress[u],10),parseInt(this.parsedAddress[u+1],10));D.push(iu.sprintf("%x",parseInt(F,16)))}return D.join(":")}bigInteger(){return new V0.BigInteger(this.parsedAddress.map((D)=>iu.sprintf("%02x",parseInt(D,10))).join(""),16)}_startAddress(){return new V0.BigInteger(this.mask()+"0".repeat($u.BITS-this.subnetMask),2)}startAddress(){return tD.fromBigInteger(this._startAddress())}startAddressExclusive(){let D=new V0.BigInteger("1");return tD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new V0.BigInteger(this.mask()+"1".repeat($u.BITS-this.subnetMask),2)}endAddress(){return tD.fromBigInteger(this._endAddress())}endAddressExclusive(){let D=new V0.BigInteger("1");return tD.fromBigInteger(this._endAddress().subtract(D))}static fromBigInteger(D){return tD.fromInteger(parseInt(D.toString(),10))}mask(D){if(D===void 0)D=this.subnetMask;return this.getBitsBase2(0,D)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}reverseForm(D){if(!D)D={};let u=this.correctForm().split(".").reverse().join(".");if(D.omitSuffix)return u;return iu.sprintf("%s.in-addr.arpa.",u)}isMulticast(){return this.isInSubnet(new tD("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart($u.BITS,"0")}groupForV6(){let D=this.parsedAddress;return this.address.replace($u.RE_ADDRESS,iu.sprintf('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',D.slice(0,2).join("."),D.slice(2,4).join(".")))}}Zu.Address4=tD});var O1=b(($4)=>{Object.defineProperty($4,"__esModule",{value:!0});$4.RE_URL_WITH_PORT=$4.RE_URL=$4.RE_ZONE_STRING=$4.RE_SUBNET_STRING=$4.RE_BAD_ADDRESS=$4.RE_BAD_CHARACTERS=$4.TYPES=$4.SCOPES=$4.GROUPS=$4.BITS=void 0;$4.BITS=128;$4.GROUPS=8;$4.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};$4.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};$4.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;$4.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;$4.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;$4.RE_ZONE_STRING=/%.*$/;$4.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);$4.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var V1=b((J4)=>{Object.defineProperty(J4,"__esModule",{value:!0});J4.simpleGroup=J4.spanLeadingZeroes=J4.spanAll=J4.spanAllZeroes=void 0;var w4=O0();function B4(D){return D.replace(/(0+)/g,'<span class="zero">$1</span>')}J4.spanAllZeroes=B4;function gZ(D,u=0){return D.split("").map(($,E)=>w4.sprintf('<span class="digit value-%s position-%d">%s</span>',$,E+u,B4($))).join("")}J4.spanAll=gZ;function Y4(D){return D.replace(/^(0+)/,'<span class="zero">$1</span>')}function jZ(D){return D.split(":").map((F)=>Y4(F)).join(":")}J4.spanLeadingZeroes=jZ;function RZ(D,u=0){return D.split(":").map(($,E)=>{if(/group-v4/.test($))return $;return w4.sprintf('<span class="hover-group group-%d">%s</span>',E+u,Y4($))})}J4.simpleGroup=RZ});var K4=b((GD)=>{var PZ=GD&&GD.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),mZ=GD&&GD.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),vZ=GD&&GD.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))PZ(u,D,F)}return mZ(u,D),u};Object.defineProperty(GD,"__esModule",{value:!0});GD.possibleElisions=GD.simpleRegularExpression=GD.ADDRESS_BOUNDARY=GD.padGroup=GD.groupPossibilities=void 0;var cZ=vZ(O1()),tu=O0();function g8(D){return tu.sprintf("(%s)",D.join("|"))}GD.groupPossibilities=g8;function y8(D){if(D.length<4)return tu.sprintf("0{0,%d}%s",4-D.length,D);return D}GD.padGroup=y8;GD.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function fZ(D){let u=[];D.forEach(($,E)=>{if(parseInt($,16)===0)u.push(E)});let F=u.map(($)=>D.map((E,w)=>{if(w===$){let C=w===0||w===cZ.GROUPS-1?":":"";return g8([y8(E),C])}return y8(E)}).join(":"));return F.push(D.map(y8).join(":")),g8(F)}GD.simpleRegularExpression=fZ;function nZ(D,u,F){let $=u?"":":",E=F?"":":",w=[];if(!u&&!F)w.push("::");if(u&&F)w.push("");if(F&&!u||!F&&u)w.push(":");w.push(tu.sprintf("%s(:0{1,4}){1,%d}",$,D-1)),w.push(tu.sprintf("(0{1,4}:){1,%d}%s",D-1,E)),w.push(tu.sprintf("(0{1,4}:){%d}0{1,4}",D-1));for(let C=1;C<D-1;C++)for(let Z=1;Z<D-C;Z++)w.push(tu.sprintf("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",Z,D-Z-C-1));return g8(w)}GD.possibleElisions=nZ});var A4=b((Ku)=>{var rZ=Ku&&Ku.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),dZ=Ku&&Ku.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),R8=Ku&&Ku.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))rZ(u,D,F)}return dZ(u,D),u};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.Address6=void 0;var M4=R8(G1()),L1=R8(q1()),s=R8(O1()),T1=R8(V1()),gu=U1(),ju=K4(),zu=S8(),jD=H1(),RD=O0();function j8(D){if(!D)throw new Error("Assertion failed.")}function lZ(D){let u=/(\d+)(\d{3})/;while(u.test(D))D=D.replace(u,"$1,$2");return D}function pZ(D){return D=D.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),D=D.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),D}function iZ(D,u){let F=[],$=[],E;for(E=0;E<D.length;E++)if(E<u[0])F.push(D[E]);else if(E>u[1])$.push(D[E]);return F.concat(["compact"]).concat($)}function X4(D){return RD.sprintf("%04x",parseInt(D,16))}function W4(D){return D&255}class qD{constructor(D,u){if(this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=M4.isInSubnet,this.isCorrect=M4.isCorrect(s.BITS),u===void 0)this.groups=s.GROUPS;else this.groups=u;this.address=D;let F=s.RE_SUBNET_STRING.exec(D);if(F){if(this.parsedSubnet=F[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>s.BITS)throw new zu.AddressError("Invalid subnet mask.");D=D.replace(s.RE_SUBNET_STRING,"")}else if(/\//.test(D))throw new zu.AddressError("Invalid subnet mask.");let $=s.RE_ZONE_STRING.exec(D);if($)this.zone=$[0],D=D.replace(s.RE_ZONE_STRING,"");this.addressMinusSuffix=D,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(D){try{return new qD(D),!0}catch(u){return!1}}static fromBigInteger(D){let u=D.toString(16).padStart(32,"0"),F=[],$;for($=0;$<s.GROUPS;$++)F.push(u.slice($*4,($+1)*4));return new qD(F.join(":"))}static fromURL(D){let u,F=null,$;if(D.indexOf("[")!==-1&&D.indexOf("]:")!==-1){if($=s.RE_URL_WITH_PORT.exec(D),$===null)return{error:"failed to parse address with port",address:null,port:null};u=$[1],F=$[2]}else if(D.indexOf("/")!==-1){if(D=D.replace(/^[a-z0-9]+:\/\//,""),$=s.RE_URL.exec(D),$===null)return{error:"failed to parse address from URL",address:null,port:null};u=$[1]}else u=D;if(F){if(F=parseInt(F,10),F<0||F>65536)F=null}else F=null;return{address:new qD(u),port:F}}static fromAddress4(D){let u=new gu.Address4(D),F=s.BITS-(L1.BITS-u.subnetMask);return new qD(`::ffff:${u.correctForm()}/${F}`)}static fromArpa(D){let u=D.replace(/(\.ip6\.arpa)?\.$/,""),F=7;if(u.length!==63)throw new zu.AddressError("Invalid 'ip6.arpa' form.");let $=u.split(".").reverse();for(let E=F;E>0;E--){let w=E*4;$.splice(w,0,":")}return u=$.join(""),new qD(u)}microsoftTranscription(){return RD.sprintf("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(D=this.subnetMask){return this.getBitsBase2(0,D)}possibleSubnets(D=128){let u=s.BITS-this.subnetMask,F=Math.abs(D-s.BITS),$=u-F;if($<0)return"0";return lZ(new jD.BigInteger("2",10).pow($).toString(10))}_startAddress(){return new jD.BigInteger(this.mask()+"0".repeat(s.BITS-this.subnetMask),2)}startAddress(){return qD.fromBigInteger(this._startAddress())}startAddressExclusive(){let D=new jD.BigInteger("1");return qD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new jD.BigInteger(this.mask()+"1".repeat(s.BITS-this.subnetMask),2)}endAddress(){return qD.fromBigInteger(this._endAddress())}endAddressExclusive(){let D=new jD.BigInteger("1");return qD.fromBigInteger(this._endAddress().subtract(D))}getScope(){let D=s.SCOPES[this.getBits(12,16).intValue()];if(this.getType()==="Global unicast"&&D!=="Link local")D="Global";return D||"Unknown"}getType(){for(let D of Object.keys(s.TYPES))if(this.isInSubnet(new qD(D)))return s.TYPES[D];return"Global unicast"}getBits(D,u){return new jD.BigInteger(this.getBitsBase2(D,u),2)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}getBitsBase16(D,u){let F=u-D;if(F%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(D,u).toString(16).padStart(F/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,s.BITS)}reverseForm(D){if(!D)D={};let u=Math.floor(this.subnetMask/4),F=this.canonicalForm().replace(/:/g,"").split("").slice(0,u).reverse().join(".");if(u>0){if(D.omitSuffix)return F;return RD.sprintf("%s.ip6.arpa.",F)}if(D.omitSuffix)return"";return"ip6.arpa."}correctForm(){let D,u=[],F=0,$=[];for(D=0;D<this.parsedAddress.length;D++){let C=parseInt(this.parsedAddress[D],16);if(C===0)F++;if(C!==0&&F>0){if(F>1)$.push([D-F,D-1]);F=0}}if(F>1)$.push([this.parsedAddress.length-F,this.parsedAddress.length-1]);let E=$.map((C)=>C[1]-C[0]+1);if($.length>0){let C=E.indexOf(Math.max(...E));u=iZ(this.parsedAddress,$[C])}else u=this.parsedAddress;for(D=0;D<u.length;D++)if(u[D]!=="compact")u[D]=parseInt(u[D],16).toString(16);let w=u.join(":");return w=w.replace(/^compact$/,"::"),w=w.replace(/^compact|compact$/,":"),w=w.replace(/compact/,""),w}binaryZeroPad(){return this.bigInteger().toString(2).padStart(s.BITS,"0")}parse4in6(D){let u=D.split(":"),$=u.slice(-1)[0].match(L1.RE_ADDRESS);if($){this.parsedAddress4=$[0],this.address4=new gu.Address4(this.parsedAddress4);for(let E=0;E<this.address4.groups;E++)if(/^0[0-9]+/.test(this.address4.parsedAddress[E]))throw new zu.AddressError("IPv4 addresses can't have leading zeroes.",D.replace(L1.RE_ADDRESS,this.address4.parsedAddress.map(pZ).join(".")));this.v4=!0,u[u.length-1]=this.address4.toGroup6(),D=u.join(":")}return D}parse(D){D=this.parse4in6(D);let u=D.match(s.RE_BAD_CHARACTERS);if(u)throw new zu.AddressError(RD.sprintf("Bad character%s detected in address: %s",u.length>1?"s":"",u.join("")),D.replace(s.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let F=D.match(s.RE_BAD_ADDRESS);if(F)throw new zu.AddressError(RD.sprintf("Address failed regex: %s",F.join("")),D.replace(s.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let $=[],E=D.split("::");if(E.length===2){let w=E[0].split(":"),C=E[1].split(":");if(w.length===1&&w[0]==="")w=[];if(C.length===1&&C[0]==="")C=[];let Z=this.groups-(w.length+C.length);if(!Z)throw new zu.AddressError("Error parsing groups");this.elidedGroups=Z,this.elisionBegin=w.length,this.elisionEnd=w.length+this.elidedGroups,$=$.concat(w);for(let M=0;M<Z;M++)$.push("0");$=$.concat(C)}else if(E.length===1)$=D.split(":"),this.elidedGroups=0;else throw new zu.AddressError("Too many :: groups found");if($=$.map((w)=>RD.sprintf("%x",parseInt(w,16))),$.length!==this.groups)throw new zu.AddressError("Incorrect number of groups found");return $}canonicalForm(){return this.parsedAddress.map(X4).join(":")}decimal(){return this.parsedAddress.map((D)=>RD.sprintf("%05d",parseInt(D,16))).join(":")}bigInteger(){return new jD.BigInteger(this.parsedAddress.map(X4).join(""),16)}to4(){let D=this.binaryZeroPad().split("");return gu.Address4.fromHex(new jD.BigInteger(D.slice(96,128).join(""),2).toString(16))}to4in6(){let D=this.to4(),F=new qD(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),$="";if(!/:$/.test(F))$=":";return F+$+D.address}inspectTeredo(){let D=this.getBitsBase16(0,32),u=this.getBits(80,96).xor(new jD.BigInteger("ffff",16)).toString(),F=gu.Address4.fromHex(this.getBitsBase16(32,64)),$=gu.Address4.fromHex(this.getBits(96,128).xor(new jD.BigInteger("ffffffff",16)).toString(16)),E=this.getBits(64,80),w=this.getBitsBase2(64,80),C=E.testBit(15),Z=E.testBit(14),M=E.testBit(8),W=E.testBit(9),X=new jD.BigInteger(w.slice(2,6)+w.slice(8,16),2).toString(10);return{prefix:RD.sprintf("%s:%s",D.slice(0,4),D.slice(4,8)),server4:F.address,client4:$.address,flags:w,coneNat:C,microsoft:{reserved:Z,universalLocal:W,groupIndividual:M,nonce:X},udpPort:u}}inspect6to4(){let D=this.getBitsBase16(0,16),u=gu.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:RD.sprintf("%s",D.slice(0,4)),gateway:u.address}}to6to4(){if(!this.is4())return null;let D=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new qD(D)}toByteArray(){let D=this.bigInteger().toByteArray();if(D.length===17&&D[0]===0)return D.slice(1);return D}toUnsignedByteArray(){return this.toByteArray().map(W4)}static fromByteArray(D){return this.fromUnsignedByteArray(D.map(W4))}static fromUnsignedByteArray(D){let u=new jD.BigInteger("256",10),F=new jD.BigInteger("0",10),$=new jD.BigInteger("1",10);for(let E=D.length-1;E>=0;E--)F=F.add($.multiply(new jD.BigInteger(D[E].toString(10),10))),$=$.multiply(u);return qD.fromBigInteger(F)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){if(this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000")return!0;return!1}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new qD("2001::/32"))}is6to4(){return this.isInSubnet(new qD("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(D){if(D===void 0)D="";else D=RD.sprintf(":%s",D);return RD.sprintf("http://[%s]%s/",this.correctForm(),D)}link(D){if(!D)D={};if(D.className===void 0)D.className="";if(D.prefix===void 0)D.prefix="/#address=";if(D.v4===void 0)D.v4=!1;let u=this.correctForm;if(D.v4)u=this.to4in6;if(D.className)return RD.sprintf('<a href="%1$s%2$s" class="%3$s">%2$s</a>',D.prefix,u.call(this),D.className);return RD.sprintf('<a href="%1$s%2$s">%2$s</a>',D.prefix,u.call(this))}group(){if(this.elidedGroups===0)return T1.simpleGroup(this.address).join(":");j8(typeof this.elidedGroups==="number"),j8(typeof this.elisionBegin==="number");let D=[],[u,F]=this.address.split("::");if(u.length)D.push(...T1.simpleGroup(u));else D.push("");let $=["hover-group"];for(let E=this.elisionBegin;E<this.elisionBegin+this.elidedGroups;E++)$.push(RD.sprintf("group-%d",E));if(D.push(RD.sprintf('<span class="%s"></span>',$.join(" "))),F.length)D.push(...T1.simpleGroup(F,this.elisionEnd));else D.push("");if(this.is4())j8(this.address4 instanceof gu.Address4),D.pop(),D.push(this.address4.groupForV6());return D.join(":")}regularExpressionString(D=!1){let u=[],F=new qD(this.correctForm());if(F.elidedGroups===0)u.push(ju.simpleRegularExpression(F.parsedAddress));else if(F.elidedGroups===s.GROUPS)u.push(ju.possibleElisions(s.GROUPS));else{let $=F.address.split("::");if($[0].length)u.push(ju.simpleRegularExpression($[0].split(":")));if(j8(typeof F.elidedGroups==="number"),u.push(ju.possibleElisions(F.elidedGroups,$[0].length!==0,$[1].length!==0)),$[1].length)u.push(ju.simpleRegularExpression($[1].split(":")));u=[u.join(":")]}if(!D)u=["(?=^|",ju.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...u,")(?=[^\\w\\:]|",ju.ADDRESS_BOUNDARY,"|$)"];return u.join("")}regularExpression(D=!1){return new RegExp(this.regularExpressionString(D),"i")}}Ku.Address6=qD});var N1=b((ID)=>{var tZ=ID&&ID.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),sZ=ID&&ID.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),aZ=ID&&ID.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))tZ(u,D,F)}return sZ(u,D),u};Object.defineProperty(ID,"__esModule",{value:!0});ID.v6=ID.AddressError=ID.Address6=ID.Address4=void 0;var oZ=U1();Object.defineProperty(ID,"Address4",{enumerable:!0,get:function(){return oZ.Address4}});var eZ=A4();Object.defineProperty(ID,"Address6",{enumerable:!0,get:function(){return eZ.Address6}});var DK=S8();Object.defineProperty(ID,"AddressError",{enumerable:!0,get:function(){return DK.AddressError}});var uK=aZ(V1());ID.v6={helpers:uK}});var V4=b((U4)=>{Object.defineProperty(U4,"__esModule",{value:!0});U4.ipToBuffer=U4.int32ToIpv4=U4.ipv4ToInt32=U4.validateSocksClientChainOptions=U4.validateSocksClientOptions=void 0;var kD=z1(),HD=Q1(),FK=import.meta.require("stream"),I1=N1(),Q4=import.meta.require("net");function CK(D,u=["connect","bind","associate"]){if(!HD.SocksCommand[D.command])throw new kD.SocksClientError(HD.ERRORS.InvalidSocksCommand,D);if(u.indexOf(D.command)===-1)throw new kD.SocksClientError(HD.ERRORS.InvalidSocksCommandForOperation,D);if(!G4(D.destination))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!q4(D.proxy))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsProxy,D);if(z4(D.proxy,D),D.timeout&&!H4(D.timeout))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsTimeout,D);if(D.existing_socket&&!(D.existing_socket instanceof FK.Duplex))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsExistingSocket,D)}U4.validateSocksClientOptions=CK;function $K(D){if(D.command!=="connect")throw new kD.SocksClientError(HD.ERRORS.InvalidSocksCommandChain,D);if(!G4(D.destination))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!(D.proxies&&Array.isArray(D.proxies)&&D.proxies.length>=2))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsProxiesLength,D);if(D.proxies.forEach((u)=>{if(!q4(u))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsProxy,D);z4(u,D)}),D.timeout&&!H4(D.timeout))throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsTimeout,D)}U4.validateSocksClientChainOptions=$K;function z4(D,u){if(D.custom_auth_method!==void 0){if(D.custom_auth_method<HD.SOCKS5_CUSTOM_AUTH_START||D.custom_auth_method>HD.SOCKS5_CUSTOM_AUTH_END)throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthRange,u);if(D.custom_auth_request_handler===void 0||typeof D.custom_auth_request_handler!=="function")throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_size===void 0)throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_handler===void 0||typeof D.custom_auth_response_handler!=="function")throw new kD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u)}}function G4(D){return D&&typeof D.host==="string"&&typeof D.port==="number"&&D.port>=0&&D.port<=65535}function q4(D){return D&&(typeof D.host==="string"||typeof D.ipaddress==="string")&&typeof D.port==="number"&&D.port>=0&&D.port<=65535&&(D.type===4||D.type===5)}function H4(D){return typeof D==="number"&&D>0}function EK(D){return new I1.Address4(D).toArray().reduce((F,$)=>(F<<8)+$,0)}U4.ipv4ToInt32=EK;function wK(D){let u=D>>>24&255,F=D>>>16&255,$=D>>>8&255,E=D&255;return[u,F,$,E].join(".")}U4.int32ToIpv4=wK;function BK(D){if(Q4.isIPv4(D)){let u=new I1.Address4(D);return Buffer.from(u.toArray())}else if(Q4.isIPv6(D)){let u=new I1.Address6(D);return Buffer.from(u.canonicalForm().split(":").map((F)=>F.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}U4.ipToBuffer=BK});var I4=b((T4)=>{Object.defineProperty(T4,"__esModule",{value:!0});T4.ReceiveBuffer=void 0;class L4{constructor(D=4096){this.buffer=Buffer.allocUnsafe(D),this.offset=0,this.originalSize=D}get length(){return this.offset}append(D){if(!Buffer.isBuffer(D))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+D.length>=this.buffer.length){let u=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+D.length)),u.copy(this.buffer)}return D.copy(this.buffer,this.offset),this.offset+=D.length}peek(D){if(D>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,D)}get(D){if(D>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let u=Buffer.allocUnsafe(D);return this.buffer.slice(0,D).copy(u),this.buffer.copyWithin(0,D,D+this.offset-D),this.offset-=D,u}}T4.ReceiveBuffer=L4});var x4=b((Lu)=>{var su=Lu&&Lu.__awaiter||function(D,u,F,$){function E(w){return w instanceof F?w:new F(function(C){C(w)})}return new(F||(F=Promise))(function(w,C){function Z(X){try{W($.next(X))}catch(q){C(q)}}function M(X){try{W($.throw(X))}catch(q){C(q)}}function W(X){X.done?w(X.value):E(X.value).then(Z,M)}W(($=$.apply(D,u||[])).next())})};Object.defineProperty(Lu,"__esModule",{value:!0});Lu.SocksClientError=Lu.SocksClient=void 0;var MK=import.meta.require("events"),au=import.meta.require("net"),vD=R9(),H=Q1(),rD=V4(),XK=I4(),S1=z1();Object.defineProperty(Lu,"SocksClientError",{enumerable:!0,get:function(){return S1.SocksClientError}});var x1=N1();class k8 extends MK.EventEmitter{constructor(D){super();this.options=Object.assign({},D),rD.validateSocksClientOptions(D),this.setState(H.SocksClientState.Created)}static createConnection(D,u){return new Promise((F,$)=>{try{rD.validateSocksClientOptions(D,["connect"])}catch(w){if(typeof u==="function")return u(w),F(w);else return $(w)}let E=new k8(D);E.connect(D.existing_socket),E.once("established",(w)=>{if(E.removeAllListeners(),typeof u==="function")u(null,w),F(w);else F(w)}),E.once("error",(w)=>{if(E.removeAllListeners(),typeof u==="function")u(w),F(w);else $(w)})})}static createConnectionChain(D,u){return new Promise((F,$)=>su(this,void 0,void 0,function*(){try{rD.validateSocksClientChainOptions(D)}catch(E){if(typeof u==="function")return u(E),F(E);else return $(E)}if(D.randomizeChain)S1.shuffleArray(D.proxies);try{let E;for(let w=0;w<D.proxies.length;w++){let C=D.proxies[w],Z=w===D.proxies.length-1?D.destination:{host:D.proxies[w+1].host||D.proxies[w+1].ipaddress,port:D.proxies[w+1].port},M=yield k8.createConnection({command:"connect",proxy:C,destination:Z,existing_socket:E});E=E||M.socket}if(typeof u==="function")u(null,{socket:E}),F({socket:E});else F({socket:E})}catch(E){if(typeof u==="function")u(E),F(E);else $(E)}}))}static createUDPFrame(D){let u=new vD.SmartBuffer;if(u.writeUInt16BE(0),u.writeUInt8(D.frameNumber||0),au.isIPv4(D.remoteHost.host))u.writeUInt8(H.Socks5HostType.IPv4),u.writeUInt32BE(rD.ipv4ToInt32(D.remoteHost.host));else if(au.isIPv6(D.remoteHost.host))u.writeUInt8(H.Socks5HostType.IPv6),u.writeBuffer(rD.ipToBuffer(D.remoteHost.host));else u.writeUInt8(H.Socks5HostType.Hostname),u.writeUInt8(Buffer.byteLength(D.remoteHost.host)),u.writeString(D.remoteHost.host);return u.writeUInt16BE(D.remoteHost.port),u.writeBuffer(D.data),u.toBuffer()}static parseUDPFrame(D){let u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F=u.readUInt8(),$=u.readUInt8(),E;if($===H.Socks5HostType.IPv4)E=rD.int32ToIpv4(u.readUInt32BE());else if($===H.Socks5HostType.IPv6)E=x1.Address6.fromByteArray(Array.from(u.readBuffer(16))).canonicalForm();else E=u.readString(u.readUInt8());let w=u.readUInt16BE();return{frameNumber:F,remoteHost:{host:E,port:w},data:u.readBuffer()}}setState(D){if(this.state!==H.SocksClientState.Error)this.state=D}connect(D){this.onDataReceived=(F)=>this.onDataReceivedHandler(F),this.onClose=()=>this.onCloseHandler(),this.onError=(F)=>this.onErrorHandler(F),this.onConnect=()=>this.onConnectHandler();let u=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||H.DEFAULT_TIMEOUT);if(u.unref&&typeof u.unref==="function")u.unref();if(D)this.socket=D;else this.socket=new au.Socket;if(this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(H.SocksClientState.Connecting),this.receiveBuffer=new XK.ReceiveBuffer,D)this.socket.emit("connect");else if(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null)this.socket.setNoDelay(!!this.options.set_tcp_nodelay);this.prependOnceListener("established",(F)=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let $=this.receiveBuffer.get(this.receiveBuffer.length);F.socket.emit("data",$)}F.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==H.SocksClientState.Established&&this.state!==H.SocksClientState.BoundWaitingForConnection)this.closeSocket(H.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){if(this.setState(H.SocksClientState.Connected),this.options.proxy.type===4)this.sendSocks4InitialHandshake();else this.sendSocks5InitialHandshake();this.setState(H.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(D){this.receiveBuffer.append(D),this.processData()}processData(){while(this.state!==H.SocksClientState.Established&&this.state!==H.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize)if(this.state===H.SocksClientState.SentInitialHandshake)if(this.options.proxy.type===4)this.handleSocks4FinalHandshakeResponse();else this.handleInitialSocks5HandshakeResponse();else if(this.state===H.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===H.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===H.SocksClientState.BoundWaitingForConnection)if(this.options.proxy.type===4)this.handleSocks4IncomingConnectionResponse();else this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(H.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(H.ERRORS.SocketClosed)}onErrorHandler(D){this.closeSocket(D.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(D){if(this.state!==H.SocksClientState.Error)this.setState(H.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new S1.SocksClientError(D,this.options))}sendSocks4InitialHandshake(){let D=this.options.proxy.userId||"",u=new vD.SmartBuffer;if(u.writeUInt8(4),u.writeUInt8(H.SocksCommand[this.options.command]),u.writeUInt16BE(this.options.destination.port),au.isIPv4(this.options.destination.host))u.writeBuffer(rD.ipToBuffer(this.options.destination.host)),u.writeStringNT(D);else u.writeUInt8(0),u.writeUInt8(0),u.writeUInt8(0),u.writeUInt8(1),u.writeStringNT(D),u.writeStringNT(this.options.destination.host);this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(u.toBuffer())}handleSocks4FinalHandshakeResponse(){let D=this.receiveBuffer.get(8);if(D[1]!==H.Socks4Response.Granted)this.closeSocket(`${H.ERRORS.Socks4ProxyRejectedConnection} - (${H.Socks4Response[D[1]]})`);else if(H.SocksCommand[this.options.command]===H.SocksCommand.bind){let u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F={port:u.readUInt16BE(),host:rD.int32ToIpv4(u.readUInt32BE())};if(F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress;this.setState(H.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:F,socket:this.socket})}else this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let D=this.receiveBuffer.get(8);if(D[1]!==H.Socks4Response.Granted)this.closeSocket(`${H.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${H.Socks4Response[D[1]]})`);else{let u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F={port:u.readUInt16BE(),host:rD.int32ToIpv4(u.readUInt32BE())};this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}sendSocks5InitialHandshake(){let D=new vD.SmartBuffer,u=[H.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password)u.push(H.Socks5Auth.UserPass);if(this.options.proxy.custom_auth_method!==void 0)u.push(this.options.proxy.custom_auth_method);D.writeUInt8(5),D.writeUInt8(u.length);for(let F of u)D.writeUInt8(F);this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(D.toBuffer()),this.setState(H.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let D=this.receiveBuffer.get(2);if(D[0]!==5)this.closeSocket(H.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);else if(D[1]===H.SOCKS5_NO_ACCEPTABLE_AUTH)this.closeSocket(H.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);else if(D[1]===H.Socks5Auth.NoAuth)this.socks5ChosenAuthType=H.Socks5Auth.NoAuth,this.sendSocks5CommandRequest();else if(D[1]===H.Socks5Auth.UserPass)this.socks5ChosenAuthType=H.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication();else if(D[1]===this.options.proxy.custom_auth_method)this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication();else this.closeSocket(H.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let D=this.options.proxy.userId||"",u=this.options.proxy.password||"",F=new vD.SmartBuffer;F.writeUInt8(1),F.writeUInt8(Buffer.byteLength(D)),F.writeString(D),F.writeUInt8(Buffer.byteLength(u)),F.writeString(u),this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(F.toBuffer()),this.setState(H.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return su(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(H.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(D){return su(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(D)})}handleSocks5AuthenticationNoAuthHandshakeResponse(D){return su(this,void 0,void 0,function*(){return D[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(D){return su(this,void 0,void 0,function*(){return D[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return su(this,void 0,void 0,function*(){this.setState(H.SocksClientState.ReceivedAuthenticationResponse);let D=!1;if(this.socks5ChosenAuthType===H.Socks5Auth.NoAuth)D=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===H.Socks5Auth.UserPass)D=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method)D=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size));if(!D)this.closeSocket(H.ERRORS.Socks5AuthenticationFailed);else this.sendSocks5CommandRequest()})}sendSocks5CommandRequest(){let D=new vD.SmartBuffer;if(D.writeUInt8(5),D.writeUInt8(H.SocksCommand[this.options.command]),D.writeUInt8(0),au.isIPv4(this.options.destination.host))D.writeUInt8(H.Socks5HostType.IPv4),D.writeBuffer(rD.ipToBuffer(this.options.destination.host));else if(au.isIPv6(this.options.destination.host))D.writeUInt8(H.Socks5HostType.IPv6),D.writeBuffer(rD.ipToBuffer(this.options.destination.host));else D.writeUInt8(H.Socks5HostType.Hostname),D.writeUInt8(this.options.destination.host.length),D.writeString(this.options.destination.host);D.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(D.toBuffer()),this.setState(H.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==H.Socks5Response.Granted)this.closeSocket(`${H.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${H.Socks5Response[D[1]]}`);else{let u=D[3],F,$;if(u===H.Socks5HostType.IPv4){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}if($=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:rD.int32ToIpv4($.readUInt32BE()),port:$.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===H.Socks5HostType.Hostname){let E=D[4],w=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(E);if(this.receiveBuffer.length<w){this.nextRequiredPacketBufferSize=w;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(w).slice(5)),F={host:$.readString(E),port:$.readUInt16BE()}}else if(u===H.Socks5HostType.IPv6){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:x1.Address6.fromByteArray(Array.from($.readBuffer(16))).canonicalForm(),port:$.readUInt16BE()}}if(this.setState(H.SocksClientState.ReceivedFinalResponse),H.SocksCommand[this.options.command]===H.SocksCommand.connect)this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket});else if(H.SocksCommand[this.options.command]===H.SocksCommand.bind)this.setState(H.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:F,socket:this.socket});else if(H.SocksCommand[this.options.command]===H.SocksCommand.associate)this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}handleSocks5IncomingConnectionResponse(){let D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==H.Socks5Response.Granted)this.closeSocket(`${H.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${H.Socks5Response[D[1]]}`);else{let u=D[3],F,$;if(u===H.Socks5HostType.IPv4){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}if($=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:rD.int32ToIpv4($.readUInt32BE()),port:$.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===H.Socks5HostType.Hostname){let E=D[4],w=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(E);if(this.receiveBuffer.length<w){this.nextRequiredPacketBufferSize=w;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(w).slice(5)),F={host:$.readString(E),port:$.readUInt16BE()}}else if(u===H.Socks5HostType.IPv6){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:x1.Address6.fromByteArray(Array.from($.readBuffer(16))).canonicalForm(),port:$.readUInt16BE()}}this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}}Lu.SocksClient=k8});var h1=b((Ru)=>{var WK=Ru&&Ru.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),AK=Ru&&Ru.__exportStar||function(D,u){for(var F in D)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(u,F))WK(u,D,F)};Object.defineProperty(Ru,"__esModule",{value:!0});AK(x4(),Ru)});import QK from"net";import x8 from"process";import{buddyOptions as jJ,stripAnsi as H0}from"@stacksjs/cli";import{access as oB,appendFile as vC,mkdir as cC}from"fs/promises";import{dirname as eB}from"path";import DY from"process";import{italic as mC,stripAnsi as uY}from"@stacksjs/cli";var BD={};c1(BD,{ui:()=>tB,team:()=>iB,storage:()=>pB,services:()=>lB,security:()=>rB,searchEngine:()=>dB,queue:()=>nB,ports:()=>fB,payment:()=>cB,overrides:()=>r2,notification:()=>vB,logging:()=>mB,localUrl:()=>ow,library:()=>PB,hashing:()=>_B,git:()=>bB,errors:()=>kB,email:()=>RB,docs:()=>jB,dns:()=>gB,determineAppEnv:()=>sB,defineUi:()=>VB,defineStorage:()=>OB,defineStacksConfig:()=>ew,defineSms:()=>UB,defineServices:()=>HB,defineSecurity:()=>qB,defineSearchEngine:()=>GB,defineQueue:()=>zB,definePayment:()=>QB,defineNotification:()=>AB,defineModel:()=>LB,defineLibrary:()=>WB,defineJob:()=>EB,defineHashing:()=>XB,defineGit:()=>MB,defineEvents:()=>TB,defineEmailConfig:()=>ZB,defineEmail:()=>KB,defineDns:()=>JB,defineDependencies:()=>YB,defineDatabase:()=>BB,defineCronJob:()=>wB,defineCli:()=>$B,defineChat:()=>CB,defineCdn:()=>FB,defineCache:()=>uB,defineApp:()=>DB,defaults:()=>r8,database:()=>yB,config:()=>t,cloud:()=>SB,cli:()=>hB,cache:()=>xB,app:()=>Su,analytics:()=>IB,ai:()=>NB});import{basename as TK,delimiter as NK,dirname as r1,extname as IK,isAbsolute as xK,join as SK,normalize as hK,parse as yK,relative as d$,resolve as f1,sep as gK,toNamespacedPath as jK}from"path";import n1 from"process";import{runCommandSync as bK}from"@stacksjs/cli";function d1(D){return I0(`database/${D||""}`)}function l$(D){return I0(`app/${D||""}`)}function l1(D){return l$(`Commands/${D||""}`)}function n8(D){return x0(`logs/${D||""}`)}function I0(D="",u){let F=n1.cwd();while(F.includes("storage"))F=f1(F,"..");let $=f1(F,D);if(u?.relative)return d$(n1.cwd(),$);return $}function x0(D){return I0(`storage/${D||""}`)}var i$={ai:{deploy:!1,models:["amazon.titan-embed-text-v1","amazon.titan-text-express-v1","amazon.titan-embed-image-v1","amazon.titan-image-generator-v1","anthropic.claude-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","meta.llama2-13b-chat-v1","meta.llama2-70b-chat-v1"]},analytics:{driver:void 0},app:{name:"Stacks",description:"A Stacks application.",env:"local",url:"stacks.localhost",debug:!0,key:"",timezone:"UTC",locale:"en",fallbackLocale:"en",cipher:"AES-256-CBC",docMode:!1,redirectUrls:[],maintenanceMode:!1},cli:{name:"My Custom CLI",command:"my-custom-cli",description:"Stacks is a full-stack framework for TypeScript.",source:l1(),deploy:!1},cache:{driver:"redis",prefix:"stx",ttl:3600,drivers:{redis:{connection:"default",host:"localhost",port:6379,username:"",password:""}}},cloud:{type:"serverless",driver:"aws",storage:{},environments:["production","staging","development"],firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0},cdn:{allowedMethods:"GET_HEAD",cachedMethods:"GET_HEAD",minTtl:0,defaultTtl:86400,maxTtl:31536000,compress:!0,priceClass:"PriceClass_All",originShieldRegion:"us-east-1",cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:2}},fileSystem:!1},database:{default:"sqlite",connections:{sqlite:{database:d1("stacks.sqlite"),prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},dns:{driver:"aws",a:[],aaaa:[],cname:[],mx:[],txt:[]},docs:{lang:"en-US",title:"Stacks",description:"Rapid application, cloud & library framework.",lastUpdated:!0,deploy:!1,themeConfig:{editLink:{pattern:"https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",text:"Edit this page on GitHub"},footer:{message:"Released under the MIT License.",copyright:"Copyright \xA9 2024-present Stacks.js, Inc."}}},email:{from:{name:"Stacks",address:"no-reply@stacksjs.org"},mailboxes:[],server:{scan:!0}},errors:{messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},git:{hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,time:1}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},ports:{frontend:3000,backend:3001,admin:3002,library:3003,desktop:3004,email:3005,docs:3006,inspect:3007,api:3008,systemTray:3009,database:3010},queue:{default:"sync",connections:{sync:{driver:"sync"},database:{driver:"database",table:"jobs",queue:"default",retry_after:90},redis:{driver:"redis",connection:"default",queue:"default",retry_after:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},storage:{driver:"s3"},team:{name:"Stacks",members:{"Chris Breuer":"chris@stacksjs.org"}},ui:{shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}},r8=i$;var p1={default:"meta.llama2-70b-chat-v1",models:["amazon.titan-text-express-v1","amazon.titan-text-lite-v1","meta.llama2-70b-chat-v1"],deploy:!0};var i1={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};import iw from"process";var t$=new Set([".","!","?"]),rK=new Set([...t$,":",'"',"\'","\u201D"]);var d8=[],l8=[],s1={},$0={},E0={};function a1(D){return typeof D==="string"?new RegExp(`^${D}\$`,"i"):D}function S0(D,u){if(D===u)return u;if(D===D.toLowerCase())return u.toLowerCase();if(D===D.toUpperCase())return u.toUpperCase();if(D[0]===D[0].toUpperCase())return u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();return u.toLowerCase()}function s$(D,...u){return D.replace(/\$(\d{1,2})/g,(F,$)=>u[Number($)]||"")}function a$(D,u){return D.replace(u[0],(...F)=>{let $=s$(u[1],...F);if(F[0]==="")return S0(D[F[F.length-2]-1],$);return S0(F[0],$)})}function o1(D,u,F){if(!D.length||s1[D])return u;for(let $=F.length-1;$>=0;$--){let E=F[$];if(E[0].test(u))return a$(u,E)}return u}function e1(D,u,F){return($)=>{let E=$.toLowerCase();if(u[E])return S0($,E);if(D[E])return S0($,D[E]);return o1(E,$,F)}}function D3(D,u,F){return($)=>{let E=$.toLowerCase();if(u[E])return!0;if(D[E])return!1;return o1(E,E,F)===E}}var ND=(D,u={})=>{let{count:F=2,inclusive:$=!1}=u;if(typeof D!=="string")throw new TypeError("Word must be a string");let E=F===1?ND.singular(D):ND.plural(D);return $?`${F} ${E}`:E};ND.plural=e1(E0,$0,d8);ND.isPlural=D3(E0,$0,d8);ND.singular=e1($0,E0,l8);ND.isSingular=D3($0,E0,l8);ND.addPluralRule=(D,u)=>{d8.push([a1(D),u])};ND.addSingularRule=(D,u)=>{l8.push([a1(D),u])};ND.addUncountableRule=(D)=>{if(typeof D==="string"){s1[D.toLowerCase()]=!0;return}ND.addPluralRule(D,"$0"),ND.addSingularRule(D,"$0")};ND.addIrregularRule=(D,u)=>{let F=u.toLowerCase(),$=D.toLowerCase();E0[$]=F,$0[F]=$};[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"],["canvas","canvases"]].forEach(([D,u])=>ND.addIrregularRule(D,u));[[/s?$/i,"s"],[/[^\x20-\x7F]$/,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(([D,u])=>ND.addPluralRule(D,u));[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|\W|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(([D,u])=>ND.addSingularRule(D,u));["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\u00E9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(ND.addUncountableRule);var sK=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),aK=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function u3(D){return typeof D==="string"}var V={required:"The {{ field }} field must be defined",string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",mobile:"The {{ field }} field must be a valid mobile phone number",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",regex:"The {{ field }} field format is invalid",ascii:"The {{ field }} field must only contain ASCII characters",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",hexCode:"The {{ field }} field must be a valid hex color code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number","number.in":"The selected {{ field }} is not in {{ values }}",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must be an integer",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}","date.afterOrSameAs":"The {{ field }} field must be a date after or same as {{ otherField }}","date.beforeField":"The {{ field }} field must be a date before {{ otherField }}","date.beforeOrSameAs":"The {{ field }} field must be a date before or same as {{ otherField }}","date.weekend":"The {{ field }} field is not a weekend","date.weekday":"The {{ field }} field is not a weekday"},F3={"":"data"};var F7=Object.defineProperty,h0=(D,u)=>{for(var F in u)F7(D,F,{get:u[F],enumerable:!0})};function p8(D,u,F,$,E){for(u=u.split?u.split("."):u,$=0;$<u.length;$++)D=D?D[u[$]]:E;return D===E?F:D}var DF=p(j0(),1),uF=p(B3(),1),FF=p(M3(),1),CF=p(X3(),1),$F=p(Q3(),1),EF=p(z3(),1),wF=p(G3(),1),BF=p(U3(),1),YF=p(g3(),1),JF=p(R3(),1),ZF=p(P3(),1),KF=p(m3(),1),MF=p(f3(),1),XF=p(d3(),1),WF=p(p3(),1),AF=p(O2(),1),QF=p(V2(),1),zF=p(V2(),1),GF=p(O2(),1),Z0=class{#D;#u;constructor(D,u){this.#D=D,this.#u=u||{}}#F(D,u){if(!D.includes("{{"))return D;return D.replace(/(\\)?{{(.*?)}}/g,(F,$,E)=>{let w=E.trim().split("."),C=u;while(w.length){if(C===null||typeof C!=="object")return;let Z=w.shift();C=Object.hasOwn(C,Z)?C[Z]:void 0}return C})}getMessage(D,u,F,$){let E=this.#u[F.name]||F.name,w=this.#D[`${F.getFieldPath()}.${u}`];if(w)return this.#F(w,{field:E,...$});let C=this.#D[`${F.wildCardPath}.${u}`];if(C)return this.#F(C,{field:E,...$});let Z=this.#D[u];if(Z)return this.#F(Z,{field:E,...$});return this.#F(D,{field:E,...$})}toJSON(){return{messages:this.#D,fields:this.#u}}},B8={};h0(B8,{E_VALIDATION_ERROR:()=>e3});var L2=class extends Error{constructor(D,u){super("Validation failure",u);this.messages=D;let F=this.constructor;Error.captureStackTrace(this,F)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},e3=L2,T2=class{hasErrors=!1;errors=[];report(D,u,F,$){let E={message:D,rule:u,field:F.getFieldPath()};if($)E.meta=$;if(F.isArrayMember)E.index=F.name;this.hasErrors=!0,this.errors.push(E)}createError(){return new e3(this.errors)}},j5=["1",1,"true",!0,"on"],R5=["0",0,"false",!1],R={exists(D){return D!==null&&D!==void 0},isMissing(D){return!this.exists(D)},isTrue(D){return j5.includes(D)},isFalse(D){return R5.includes(D)},isString(D){return typeof D==="string"},isObject(D){return!!(D&&typeof D==="object"&&!Array.isArray(D))},hasKeys(D,u){for(let F of u)if(F in D===!1)return!1;return!0},isArray(D){return Array.isArray(D)},isNumeric(D){return!Number.isNaN(Number(D))},asNumber(D){return D===null?Number.NaN:Number(D)},asBoolean(D){if(this.isTrue(D))return!0;if(this.isFalse(D))return!1;return null},isEmail:BF.default.default,isURL:FF.default.default,isAlpha:YF.default.default,isAlphaNumeric:XF.default.default,isIP:DF.default.default,isUUID:EF.default.default,isAscii:wF.default.default,isCreditCard:MF.default.default,isIBAN:$F.default.default,isJWT:uF.default.default,isLatLong:JF.default.default,isMobilePhone:QF.default.default,isPassportNumber:WF.default.default,isPostalCode:AF.default.default,isSlug:CF.default.default,isDecimal:ZF.default.default,mobileLocales:zF.locales,postalCountryCodes:GF.locales,passportCountryCodes:["AM","AR","AT","AU","AZ","BE","BG","BR","BY","CA","CH","CY","CZ","DE","DK","DZ","ES","FI","FR","GB","GR","HR","HU","IE","IN","ID","IR","IS","IT","JM","JP","KR","KZ","LI","LT","LU","LV","LY","MT","MZ","MY","MX","NL","NZ","PH","PK","PL","PT","RO","RU","SE","SL","SK","TH","TR","UA","US"],isHexColor:(D)=>{if(!D.startsWith("#"))return!1;return KF.default.default(D)},isActiveURL:async(D)=>{let{resolve4:u,resolve6:F}=await import("dns/promises");try{let{hostname:$}=new URL(D);if((await F($)).length)return!0;else return(await u($)).length>0}catch{return!1}},isDistinct:(D,u)=>{let F=new Set;if(!u){for(let E of D)if(R.exists(E))if(F.has(E))return!1;else F.add(E);return!0}let $=Array.isArray(u)?u:[u];for(let E of D)if(R.isObject(E)&&R.hasKeys(E,$)){let w=$.map((C)=>E[C]).join("_");if(F.has(w))return!1;else F.add(w)}return!0},getNestedValue(D,u){if(D.indexOf(".")>-1)return p8(u.data,D);return u.parent[D]}};var mu=class{static macro(D,u){this.prototype[D]=u}static getter(D,u,F=!1){Object.defineProperty(this.prototype,D,{get(){let $=u.call(this);if(F)Object.defineProperty(this,D,{configurable:!1,enumerable:!1,value:$,writable:!1});return $},configurable:!0,enumerable:!1})}};var k5=/[\p{Lu}]/u,b5=/[\p{Ll}]/u,qF=/^[\p{Lu}](?![\p{Lu}])/gu,OF=/([\p{Alpha}\p{N}_]|$)/u,N2=/[_.\- ]+/,_5=new RegExp("^"+N2.source),HF=new RegExp(N2.source+OF.source,"gu"),UF=new RegExp("\\d+"+OF.source,"gu"),P5=(D,u,F,$)=>{let E=!1,w=!1,C=!1,Z=!1;for(let M=0;M<D.length;M++){let W=D[M];if(Z=M>2?D[M-3]==="-":!0,E&&k5.test(W))D=D.slice(0,M)+"-"+D.slice(M),E=!1,C=w,w=!0,M++;else if(w&&C&&b5.test(W)&&(!Z||$))D=D.slice(0,M-1)+"-"+D.slice(M-1),C=w,w=!1,E=!0;else E=u(W)===W&&F(W)!==W,C=w,w=F(W)===W&&u(W)!==W}return D},m5=(D,u)=>{return qF.lastIndex=0,D.replaceAll(qF,(F)=>u(F))},v5=(D,u)=>{return HF.lastIndex=0,UF.lastIndex=0,D.replaceAll(UF,(F,$,E)=>["_","-"].includes(D.charAt(E+F.length))?F:u(F)).replaceAll(HF,(F,$)=>u($))};function OD(D,u){if(!(typeof D==="string"||Array.isArray(D)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(D))D=D.map((w)=>w.trim()).filter((w)=>w.length).join("-");else D=D.trim();if(D.length===0)return"";let F=u.locale===!1?(w)=>w.toLowerCase():(w)=>w.toLocaleLowerCase(u.locale),$=u.locale===!1?(w)=>w.toUpperCase():(w)=>w.toLocaleUpperCase(u.locale);if(D.length===1){if(N2.test(D))return"";return u.pascalCase?$(D):F(D)}if(D!==F(D))D=P5(D,F,$,u.preserveConsecutiveUppercase);if(D=D.replace(_5,""),D=u.preserveConsecutiveUppercase?m5(D,F):F(D),u.pascalCase)D=$(D.charAt(0))+D.slice(1);return v5(D,$)}var DC=p(S2(),1),e=p(S2(),1),uC=p(VF(),1),FC=p(LF(),1),CC=p(TF(),1);var b2=(D,u)=>u.some((F)=>F instanceof RegExp?F.test(D):F===D),c5=new Set(["https:","http:","file:"]),f5=(D)=>{try{let{protocol:u}=new URL(D);return u.endsWith(":")&&!u.includes(".")&&!c5.has(u)}catch{return!1}},n5=(D,{stripHash:u})=>{let F=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(D);if(!F)throw new Error(`Invalid URL: ${D}`);let{type:$,data:E,hash:w}=F.groups,C=$.split(";");w=u?"":w;let Z=!1;if(C[C.length-1]==="base64")C.pop(),Z=!0;let M=C.shift()?.toLowerCase()??"",X=[...C.map((q)=>{let[U,L=""]=q.split("=").map((Q)=>Q.trim());if(U==="charset"){if(L=L.toLowerCase(),L==="us-ascii")return""}return`${U}${L?`=${L}`:""}`}).filter(Boolean)];if(Z)X.push("base64");if(X.length>0||M&&M!=="text/plain")X.unshift(M);return`data:${X.join(";")},${Z?E.trim():E}${w?`#${w}`:""}`};function _2(D,u){if(u={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...u},typeof u.defaultProtocol==="string"&&!u.defaultProtocol.endsWith(":"))u.defaultProtocol=`${u.defaultProtocol}:`;if(D=D.trim(),/^data:/i.test(D))return n5(D,u);if(f5(D))return D;let F=D.startsWith("//");if(!(!F&&/^\.*\//.test(D)))D=D.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,u.defaultProtocol);let E=new URL(D);if(u.forceHttp&&u.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(u.forceHttp&&E.protocol==="https:")E.protocol="http:";if(u.forceHttps&&E.protocol==="http:")E.protocol="https:";if(u.stripAuthentication)E.username="",E.password="";if(u.stripHash)E.hash="";else if(u.stripTextFragment)E.hash=E.hash.replace(/#?:~:text.*?$/i,"");if(E.pathname){let C=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,Z=0,M="";for(;;){let X=C.exec(E.pathname);if(!X)break;let q=X[0],U=X.index,L=E.pathname.slice(Z,U);M+=L.replace(/\/{2,}/g,"/"),M+=q,Z=U+q.length}let W=E.pathname.slice(Z,E.pathname.length);M+=W.replace(/\/{2,}/g,"/"),E.pathname=M}if(E.pathname)try{E.pathname=decodeURI(E.pathname)}catch{}if(u.removeDirectoryIndex===!0)u.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(u.removeDirectoryIndex)&&u.removeDirectoryIndex.length>0){let C=E.pathname.split("/"),Z=C[C.length-1];if(b2(Z,u.removeDirectoryIndex))C=C.slice(0,-1),E.pathname=C.slice(1).join("/")+"/"}if(E.hostname){if(E.hostname=E.hostname.replace(/\.$/,""),u.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(E.hostname))E.hostname=E.hostname.replace(/^www\./,"")}if(Array.isArray(u.removeQueryParameters)){for(let C of[...E.searchParams.keys()])if(b2(C,u.removeQueryParameters))E.searchParams.delete(C)}if(!Array.isArray(u.keepQueryParameters)&&u.removeQueryParameters===!0)E.search="";if(Array.isArray(u.keepQueryParameters)&&u.keepQueryParameters.length>0){for(let C of[...E.searchParams.keys()])if(!b2(C,u.keepQueryParameters))E.searchParams.delete(C)}if(u.sortQueryParameters){E.searchParams.sort();try{E.search=decodeURIComponent(E.search)}catch{}}if(u.removeTrailingSlash)E.pathname=E.pathname.replace(/\/$/,"");if(u.removeExplicitPort&&E.port)E.port="";let w=D;if(D=E.toString(),!u.removeSingleSlash&&E.pathname==="/"&&!w.endsWith("/")&&E.hash==="")D=D.replace(/\/$/,"");if((u.removeTrailingSlash||E.pathname==="/")&&E.hash===""&&u.removeSingleSlash)D=D.replace(/\/$/,"");if(F&&!u.normalizeProtocol)D=D.replace(/^http:\/\//,"//");if(u.stripProtocol)D=D.replace(/^(?:https?:)?\/\//,"");return D}var ZC=p(NF(),1),KC=p(IF(),1);var $w=class D{#D="";newLine="\n";writeStatement(u){this.#D=`${this.#D}${this.newLine}${u}`}child(){return new D}toString(){return this.#D}flush(){this.#D=""}};function Ew({parseFnRefId:D,variableName:u,wildCardPath:F,isArrayMember:$,valueExpression:E,parentExpression:w,fieldNameExpression:C,parentValueExpression:Z}){let M=D?`refs['${D}'](${E}, {
|
|
41
|
+
`}}}).prompt()};var O9=C0(()=>{M1();U8();z8();q8();YD=`${F1}[`,C1={to(D,u){if(!u)return`${YD}${D+1}G`;return`${YD}${u+1};${D+1}H`},move(D,u){let F="";if(D<0)F+=`${YD}${-D}D`;else if(D>0)F+=`${YD}${D}C`;if(u<0)F+=`${YD}${-u}A`;else if(u>0)F+=`${YD}${u}B`;return F},up:(D=1)=>`${YD}${D}A`,down:(D=1)=>`${YD}${D}B`,forward:(D=1)=>`${YD}${D}C`,backward:(D=1)=>`${YD}${D}D`,nextLine:(D=1)=>`${YD}E`.repeat(D),prevLine:(D=1)=>`${YD}F`.repeat(D),left:`${YD}G`,hide:`${YD}?25l`,show:`${YD}?25h`,save:`${F1}7`,restore:`${F1}8`},PY={up:(D=1)=>`${YD}S`.repeat(D),down:(D=1)=>`${YD}T`.repeat(D)},mY={screen:`${YD}2J`,up:(D=1)=>`${YD}1J`.repeat(D),down:(D=1)=>`${YD}J`.repeat(D),line:`${YD}2K`,lineEnd:`${YD}K`,lineStart:`${YD}1K`,lines(D){let u="";for(let F=0;F<D;F++)u+=this.line+(F<D-1?C1.up():"");if(D)u+=C1.left;return u}},Fu={cursor:C1,scroll:PY,erase:mY,beep:_Y},B1={exports:{}},vY=bY,cY=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||vY.isatty(1)&&!0||("CI"in process.env));B1.exports=X9();B1.exports.createColors=X9;fY=B1.exports,e2=Z1(fY);$1={},rY={get exports(){return $1},set exports(D){$1=D}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function($){var E=$.charCodeAt(0),w=$.length==2?$.charCodeAt(1):0,C=E;return 55296<=E&&E<=56319&&56320<=w&&w<=57343&&(E&=1023,w&=1023,C=E<<10|w,C+=65536),C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510?"F":C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518?"H":4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141?"W":32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630?"Na":C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109?"A":"N"},u.characterLength=function($){var E=this.eastAsianWidth($);return E=="F"||E=="W"||E=="A"?2:1};function F($){return $.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function($){for(var E=F($),w=0,C=0;C<E.length;C++)w=w+this.characterLength(E[C]);return w},u.slice=function($,E,w){textLen=u.length($),E=E||0,w=w||1,E<0&&(E=textLen+E),w<0&&(w=textLen+w);for(var C="",Z=0,M=F($),W=0;W<M.length;W++){var X=M[W],q=u.length(X);if(Z>=E-(q==2?1:0))if(Z+q<=w)C+=X;else break;Z+=q}return C}})(rY);dY=$1;ED={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]}};Object.keys(ED.modifier);pY=Object.keys(ED.color),iY=Object.keys(ED.bgColor);[...pY];sY=tY(),V8=new Set(["\x1B","\x9B"]),J1=`${oY}8;;`;CJ=Symbol("clack:cancel");Z9=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),$J=new Set(["up","down","left","right","space","enter"]);z9=class z9 extends G0{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(D){super(D,!1),this.value=!!D.initialValue,this.on("value",()=>{this.value=this._value}),this.on("confirm",(u)=>{this.output.write(Fu.cursor.move(0,-1)),this.value=u,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};G9=class G9 extends G0{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:u})=>u===D.cursorAt),0),this.on("key",(u)=>{u==="a"&&this.toggleAll()}),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break;case"space":this.toggleValue();break}})}get _value(){return this.options[this.cursor].value}toggleAll(){let D=this.value.length===this.options.length;this.value=D?[]:this.options.map((u)=>u.value)}toggleValue(){let D=this.value.includes(this._value);this.value=D?this.value.filter((u)=>u!==this._value):[...this.value,this._value]}};q9=class q9 extends G0{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.cursor=this.options.findIndex(({value:u})=>u===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(u)=>{switch(u){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}};H9=class H9 extends G0{constructor(D){super(D),this.valueWithCursor="",this.on("finalize",()=>{this.value||(this.value=D.defaultValue),this.valueWithCursor=this.value}),this.on("value",()=>{if(this.cursor>=this.value.length)this.valueWithCursor=`${this.value}${e2.inverse(e2.hidden("_"))}`;else{let u=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor);this.valueWithCursor=`${u}${e2.inverse(F[0])}${F.slice(1)}`}})}get cursor(){return this._cursor}};EJ=K1(),wJ=zu("\u276F",">"),BJ=zu("\u25A0","x"),YJ=zu("\u25B2","x"),JJ=zu("\u2714","\u221A"),E1=zu("\u25CF",">"),w1=zu("\u25CB"," "),ZJ=zu("\u25FB","[\u2022]"),K9=zu("\u25FC","[+]"),KJ=zu("\u25FB","[ ]")});import Cu from"process";function GJ(D){for(let u of zJ){let F=u[1]||u[0];if(D[F])return{name:u[0].toLowerCase(),...u[2]}}if(D.SHELL&&D.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function H0(D){return D?D!=="false":!1}function OJ({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}function LJ(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(VJ,"")}function Z1(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function xJ(D,u){if(typeof D!=="string"||D.length===0)return 0;if(u={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...u},!u.countAnsiEscapeCodes)D=LJ(D);if(D.length===0)return 0;let F=u.ambiguousIsNarrow?1:2,$=0;for(let{segment:E}of new Intl.Segmenter().segment(D)){let w=E.codePointAt(0);if(w<=31||w>=127&&w<=159)continue;if(w>=768&&w<=879)continue;if(IJ().test(E)){$+=2;continue}switch(NJ.eastAsianWidth(E)){case"F":case"W":{$+=2;break}case"A":{$+=F;break}default:$+=1}}return $}function K1(){if(Cu.platform!=="win32")return Cu.env.TERM!=="linux";return Boolean(Cu.env.CI)||Boolean(Cu.env.WT_SESSION)||Boolean(Cu.env.TERMINUS_SUBLIME)||Cu.env.ConEmuTask==="{cmd::Cmder}"||Cu.env.TERM_PROGRAM==="Terminus-Sublime"||Cu.env.TERM_PROGRAM==="vscode"||Cu.env.TERM==="xterm-256color"||Cu.env.TERM==="alacritty"||Cu.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function L9(D){if(!Intl.Segmenter)return lu(D).length;return xJ(D)}function T8(D){return D.replace(/`([^`]+)`/gm,(u,F)=>z.cyan(F)).replace(/\s+_([^_]+)_\s+/gm,(u,F)=>` ${z.underline(F)} `)}function jJ(D="white"){return z[D]||z.white}function RJ(D="bgWhite"){return z[`bg${D[0].toUpperCase()}${D.slice(1)}`]||z.bgWhite}function I8(D={}){let u=kJ();if(process.env.CONSOLA_LEVEL)u=Number.parseInt(process.env.CONSOLA_LEVEL)??u;return sC({level:u,defaults:{level:u},stdout:process.stdout,stderr:process.stderr,prompt:(...$)=>Promise.resolve().then(() => (O9(),U9)).then((E)=>E.prompt(...$)),reporters:D.reporters||[D.fancy??!(N9||X1)?new x9:new G8],...D})}function kJ(){if(UJ)return AD.debug;if(X1)return AD.warn;return AD.info}var zJ,N8,q0,T9,qJ,N9,HJ,UJ,X1,VJ,I9,TJ,NJ,IJ=()=>{return/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g},SJ,hJ,yJ,Zu=(D,u)=>yJ?D:u,V9,x9,W1;var M1=C0(()=>{z8();q8();U8();zJ=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];N8=typeof process!=="undefined"?process:{},q0=N8.env||{},T9=GJ(q0),qJ=typeof process!=="undefined"&&process.env&&"development"||"";N8.platform;T9.name;N9=H0(q0.CI)||T9.ci!==!1,HJ=H0(N8.stdout&&N8.stdout.isTTY),UJ=H0(q0.DEBUG),X1=qJ==="test"||H0(q0.TEST);H0(q0.MINIMAL);VJ=OJ();I9={exports:{}};(function(D){var u={};D.exports=u,u.eastAsianWidth=function($){var E=$.charCodeAt(0),w=$.length==2?$.charCodeAt(1):0,C=E;if(55296<=E&&E<=56319&&(56320<=w&&w<=57343))E&=1023,w&=1023,C=E<<10|w,C+=65536;if(C==12288||65281<=C&&C<=65376||65504<=C&&C<=65510)return"F";if(C==8361||65377<=C&&C<=65470||65474<=C&&C<=65479||65482<=C&&C<=65487||65490<=C&&C<=65495||65498<=C&&C<=65500||65512<=C&&C<=65518)return"H";if(4352<=C&&C<=4447||4515<=C&&C<=4519||4602<=C&&C<=4607||9001<=C&&C<=9002||11904<=C&&C<=11929||11931<=C&&C<=12019||12032<=C&&C<=12245||12272<=C&&C<=12283||12289<=C&&C<=12350||12353<=C&&C<=12438||12441<=C&&C<=12543||12549<=C&&C<=12589||12593<=C&&C<=12686||12688<=C&&C<=12730||12736<=C&&C<=12771||12784<=C&&C<=12830||12832<=C&&C<=12871||12880<=C&&C<=13054||13056<=C&&C<=19903||19968<=C&&C<=42124||42128<=C&&C<=42182||43360<=C&&C<=43388||44032<=C&&C<=55203||55216<=C&&C<=55238||55243<=C&&C<=55291||63744<=C&&C<=64255||65040<=C&&C<=65049||65072<=C&&C<=65106||65108<=C&&C<=65126||65128<=C&&C<=65131||110592<=C&&C<=110593||127488<=C&&C<=127490||127504<=C&&C<=127546||127552<=C&&C<=127560||127568<=C&&C<=127569||131072<=C&&C<=194367||177984<=C&&C<=196605||196608<=C&&C<=262141)return"W";if(32<=C&&C<=126||162<=C&&C<=163||165<=C&&C<=166||C==172||C==175||10214<=C&&C<=10221||10629<=C&&C<=10630)return"Na";if(C==161||C==164||167<=C&&C<=168||C==170||173<=C&&C<=174||176<=C&&C<=180||182<=C&&C<=186||188<=C&&C<=191||C==198||C==208||215<=C&&C<=216||222<=C&&C<=225||C==230||232<=C&&C<=234||236<=C&&C<=237||C==240||242<=C&&C<=243||247<=C&&C<=250||C==252||C==254||C==257||C==273||C==275||C==283||294<=C&&C<=295||C==299||305<=C&&C<=307||C==312||319<=C&&C<=322||C==324||328<=C&&C<=331||C==333||338<=C&&C<=339||358<=C&&C<=359||C==363||C==462||C==464||C==466||C==468||C==470||C==472||C==474||C==476||C==593||C==609||C==708||C==711||713<=C&&C<=715||C==717||C==720||728<=C&&C<=731||C==733||C==735||768<=C&&C<=879||913<=C&&C<=929||931<=C&&C<=937||945<=C&&C<=961||963<=C&&C<=969||C==1025||1040<=C&&C<=1103||C==1105||C==8208||8211<=C&&C<=8214||8216<=C&&C<=8217||8220<=C&&C<=8221||8224<=C&&C<=8226||8228<=C&&C<=8231||C==8240||8242<=C&&C<=8243||C==8245||C==8251||C==8254||C==8308||C==8319||8321<=C&&C<=8324||C==8364||C==8451||C==8453||C==8457||C==8467||C==8470||8481<=C&&C<=8482||C==8486||C==8491||8531<=C&&C<=8532||8539<=C&&C<=8542||8544<=C&&C<=8555||8560<=C&&C<=8569||C==8585||8592<=C&&C<=8601||8632<=C&&C<=8633||C==8658||C==8660||C==8679||C==8704||8706<=C&&C<=8707||8711<=C&&C<=8712||C==8715||C==8719||C==8721||C==8725||C==8730||8733<=C&&C<=8736||C==8739||C==8741||8743<=C&&C<=8748||C==8750||8756<=C&&C<=8759||8764<=C&&C<=8765||C==8776||C==8780||C==8786||8800<=C&&C<=8801||8804<=C&&C<=8807||8810<=C&&C<=8811||8814<=C&&C<=8815||8834<=C&&C<=8835||8838<=C&&C<=8839||C==8853||C==8857||C==8869||C==8895||C==8978||9312<=C&&C<=9449||9451<=C&&C<=9547||9552<=C&&C<=9587||9600<=C&&C<=9615||9618<=C&&C<=9621||9632<=C&&C<=9633||9635<=C&&C<=9641||9650<=C&&C<=9651||9654<=C&&C<=9655||9660<=C&&C<=9661||9664<=C&&C<=9665||9670<=C&&C<=9672||C==9675||9678<=C&&C<=9681||9698<=C&&C<=9701||C==9711||9733<=C&&C<=9734||C==9737||9742<=C&&C<=9743||9748<=C&&C<=9749||C==9756||C==9758||C==9792||C==9794||9824<=C&&C<=9825||9827<=C&&C<=9829||9831<=C&&C<=9834||9836<=C&&C<=9837||C==9839||9886<=C&&C<=9887||9918<=C&&C<=9919||9924<=C&&C<=9933||9935<=C&&C<=9953||C==9955||9960<=C&&C<=9983||C==10045||C==10071||10102<=C&&C<=10111||11093<=C&&C<=11097||12872<=C&&C<=12879||57344<=C&&C<=63743||65024<=C&&C<=65039||C==65533||127232<=C&&C<=127242||127248<=C&&C<=127277||127280<=C&&C<=127337||127344<=C&&C<=127386||917760<=C&&C<=917999||983040<=C&&C<=1048573||1048576<=C&&C<=1114109)return"A";return"N"},u.characterLength=function($){var E=this.eastAsianWidth($);if(E=="F"||E=="W"||E=="A")return 2;else return 1};function F($){return $.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function($){var E=F($),w=0;for(var C=0;C<E.length;C++)w=w+this.characterLength(E[C]);return w},u.slice=function($,E,w){if(textLen=u.length($),E=E?E:0,w=w?w:1,E<0)E=textLen+E;if(w<0)w=textLen+w;var C="",Z=0,M=F($);for(var W=0;W<M.length;W++){var X=M[W],q=u.length(X);if(Z>=E-(q==2?1:0))if(Z+q<=w)C+=X;else break;Z+=q}return C}})(I9);TJ=I9.exports,NJ=Z1(TJ);SJ={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},hJ={0:"red",1:"yellow"},yJ=K1(),V9={error:Zu("\u2716","\xD7"),fatal:Zu("\u2716","\xD7"),ready:Zu("\u2714","\u221A"),warn:Zu("\u26A0","\u203C"),info:Zu("\u2139","i"),success:Zu("\u2714","\u221A"),debug:Zu("\u2699","D"),trace:Zu("\u2192","\u2192"),fail:Zu("\u2716","\xD7"),start:Zu("\u25D0","o"),log:""};x9=class x9 extends G8{formatStack(D){return"\n"+o2(D).map((u)=>" "+u.replace(/^at +/,(F)=>z.gray(F)).replace(/\((.+)\)/,(F,$)=>`(${z.cyan($)})`)).join("\n")}formatType(D,u,F){let $=SJ[D.type]||hJ[D.level]||"gray";if(u)return RJ($)(z.black(` ${D.type.toUpperCase()} `));let E=typeof V9[D.type]==="string"?V9[D.type]:D.icon||D.type;return E?jJ($)(E):""}formatLogObj(D,u){let[F,...$]=this.formatArgs(D.args,u).split("\n");if(D.type==="box")return F9(T8(F+($.length>0?"\n"+$.join("\n"):"")),{title:D.title?T8(D.title):void 0,style:D.style});let E=this.formatDate(D.date,u),w=E&&z.gray(E),C=D.badge??D.level<2,Z=this.formatType(D,C,u),M=D.tag?z.gray(D.tag):"",W,X=this.filterAndJoin([Z,T8(F)]),q=this.filterAndJoin(u.columns?[M,w]:[M]),L=(u.columns||0)-L9(X)-L9(q)-2;if(W=L>0&&(u.columns||0)>=80?X+" ".repeat(L)+q:(q?`${z.gray(`[${q}]`)} `:"")+X,W+=T8($.length>0?"\n"+$.join("\n"):""),D.type==="trace"){let U=new Error("Trace: "+D.message);W+=this.formatStack(U.stack||"")}return C?"\n"+W+"\n":W}};W1=I8()});var R9=b((j9)=>{Object.defineProperty(j9,"__esModule",{value:!0});var S9=import.meta.require("buffer"),yu={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};j9.ERRORS=yu;function _J(D){if(!S9.Buffer.isEncoding(D))throw new Error(yu.INVALID_ENCODING)}j9.checkEncoding=_J;function h9(D){return typeof D==="number"&&isFinite(D)&&cJ(D)}j9.isFiniteInteger=h9;function y9(D,u){if(typeof D==="number"){if(!h9(D)||D<0)throw new Error(u?yu.INVALID_OFFSET:yu.INVALID_LENGTH)}else throw new Error(u?yu.INVALID_OFFSET_NON_NUMBER:yu.INVALID_LENGTH_NON_NUMBER)}function PJ(D){y9(D,!1)}j9.checkLengthValue=PJ;function mJ(D){y9(D,!0)}j9.checkOffsetValue=mJ;function vJ(D,u){if(D<0||D>u.length)throw new Error(yu.INVALID_TARGET_OFFSET)}j9.checkTargetOffset=vJ;function cJ(D){return typeof D==="number"&&isFinite(D)&&Math.floor(D)===D}function fJ(D){if(typeof BigInt==="undefined")throw new Error("Platform does not support JS BigInt type.");if(typeof S9.Buffer.prototype[D]==="undefined")throw new Error(`Platform does not support Buffer.prototype.${D}.`)}j9.bigIntAndBufferInt64Check=fJ});var b9=b((g9)=>{Object.defineProperty(g9,"__esModule",{value:!0});var f=R9(),k9=4096,sJ="utf8";class Q1{constructor(D){if(this.length=0,this._encoding=sJ,this._writeOffset=0,this._readOffset=0,Q1.isSmartBufferOptions(D)){if(D.encoding)f.checkEncoding(D.encoding),this._encoding=D.encoding;if(D.size)if(f.isFiniteInteger(D.size)&&D.size>0)this._buff=Buffer.allocUnsafe(D.size);else throw new Error(f.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(D.buff)if(Buffer.isBuffer(D.buff))this._buff=D.buff,this.length=D.buff.length;else throw new Error(f.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(k9)}else{if(typeof D!=="undefined")throw new Error(f.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(k9)}}static fromSize(D,u){return new this({size:D,encoding:u})}static fromBuffer(D,u){return new this({buff:D,encoding:u})}static fromOptions(D){return new this(D)}static isSmartBufferOptions(D){let u=D;return u&&(u.encoding!==void 0||u.size!==void 0||u.buff!==void 0)}readInt8(D){return this._readNumberValue(Buffer.prototype.readInt8,1,D)}readInt16BE(D){return this._readNumberValue(Buffer.prototype.readInt16BE,2,D)}readInt16LE(D){return this._readNumberValue(Buffer.prototype.readInt16LE,2,D)}readInt32BE(D){return this._readNumberValue(Buffer.prototype.readInt32BE,4,D)}readInt32LE(D){return this._readNumberValue(Buffer.prototype.readInt32LE,4,D)}readBigInt64BE(D){return f.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,D)}readBigInt64LE(D){return f.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,D)}writeInt8(D,u){return this._writeNumberValue(Buffer.prototype.writeInt8,1,D,u),this}insertInt8(D,u){return this._insertNumberValue(Buffer.prototype.writeInt8,1,D,u)}writeInt16BE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,D,u)}insertInt16BE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,D,u)}writeInt16LE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,D,u)}insertInt16LE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,D,u)}writeInt32BE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,D,u)}insertInt32BE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,D,u)}writeInt32LE(D,u){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,D,u)}insertInt32LE(D,u){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,D,u)}writeBigInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}insertBigInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,D,u)}writeBigInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}insertBigInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,D,u)}readUInt8(D){return this._readNumberValue(Buffer.prototype.readUInt8,1,D)}readUInt16BE(D){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,D)}readUInt16LE(D){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,D)}readUInt32BE(D){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,D)}readUInt32LE(D){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,D)}readBigUInt64BE(D){return f.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,D)}readBigUInt64LE(D){return f.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,D)}writeUInt8(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,D,u)}insertUInt8(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,D,u)}writeUInt16BE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,D,u)}insertUInt16BE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,D,u)}writeUInt16LE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,D,u)}insertUInt16LE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,D,u)}writeUInt32BE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,D,u)}insertUInt32BE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,D,u)}writeUInt32LE(D,u){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,D,u)}insertUInt32LE(D,u){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,D,u)}writeBigUInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}insertBigUInt64BE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,D,u)}writeBigUInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}insertBigUInt64LE(D,u){return f.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,D,u)}readFloatBE(D){return this._readNumberValue(Buffer.prototype.readFloatBE,4,D)}readFloatLE(D){return this._readNumberValue(Buffer.prototype.readFloatLE,4,D)}writeFloatBE(D,u){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,D,u)}insertFloatBE(D,u){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,D,u)}writeFloatLE(D,u){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,D,u)}insertFloatLE(D,u){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,D,u)}readDoubleBE(D){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,D)}readDoubleLE(D){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,D)}writeDoubleBE(D,u){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,D,u)}insertDoubleBE(D,u){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,D,u)}writeDoubleLE(D,u){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,D,u)}insertDoubleLE(D,u){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,D,u)}readString(D,u){let F;if(typeof D==="number")f.checkLengthValue(D),F=Math.min(D,this.length-this._readOffset);else u=D,F=this.length-this._readOffset;if(typeof u!=="undefined")f.checkEncoding(u);let $=this._buff.slice(this._readOffset,this._readOffset+F).toString(u||this._encoding);return this._readOffset+=F,$}insertString(D,u,F){return f.checkOffsetValue(u),this._handleString(D,!0,u,F)}writeString(D,u,F){return this._handleString(D,!1,u,F)}readStringNT(D){if(typeof D!=="undefined")f.checkEncoding(D);let u=this.length;for(let $=this._readOffset;$<this.length;$++)if(this._buff[$]===0){u=$;break}let F=this._buff.slice(this._readOffset,u);return this._readOffset=u+1,F.toString(D||this._encoding)}insertStringNT(D,u,F){return f.checkOffsetValue(u),this.insertString(D,u,F),this.insertUInt8(0,u+D.length),this}writeStringNT(D,u,F){return this.writeString(D,u,F),this.writeUInt8(0,typeof u==="number"?u+D.length:this.writeOffset),this}readBuffer(D){if(typeof D!=="undefined")f.checkLengthValue(D);let u=typeof D==="number"?D:this.length,F=Math.min(this.length,this._readOffset+u),$=this._buff.slice(this._readOffset,F);return this._readOffset=F,$}insertBuffer(D,u){return f.checkOffsetValue(u),this._handleBuffer(D,!0,u)}writeBuffer(D,u){return this._handleBuffer(D,!1,u)}readBufferNT(){let D=this.length;for(let F=this._readOffset;F<this.length;F++)if(this._buff[F]===0){D=F;break}let u=this._buff.slice(this._readOffset,D);return this._readOffset=D+1,u}insertBufferNT(D,u){return f.checkOffsetValue(u),this.insertBuffer(D,u),this.insertUInt8(0,u+D.length),this}writeBufferNT(D,u){if(typeof u!=="undefined")f.checkOffsetValue(u);return this.writeBuffer(D,u),this.writeUInt8(0,typeof u==="number"?u+D.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(D){f.checkOffsetValue(D),f.checkTargetOffset(D,this),this._readOffset=D}get writeOffset(){return this._writeOffset}set writeOffset(D){f.checkOffsetValue(D),f.checkTargetOffset(D,this),this._writeOffset=D}get encoding(){return this._encoding}set encoding(D){f.checkEncoding(D),this._encoding=D}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(D){let u=typeof D==="string"?D:this._encoding;return f.checkEncoding(u),this._buff.toString(u,0,this.length)}destroy(){return this.clear(),this}_handleString(D,u,F,$){let E=this._writeOffset,w=this._encoding;if(typeof F==="number")E=F;else if(typeof F==="string")f.checkEncoding(F),w=F;if(typeof $==="string")f.checkEncoding($),w=$;let C=Buffer.byteLength(D,w);if(u)this.ensureInsertable(C,E);else this._ensureWriteable(C,E);if(this._buff.write(D,E,C,w),u)this._writeOffset+=C;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,E+C);else this._writeOffset+=C;return this}_handleBuffer(D,u,F){let $=typeof F==="number"?F:this._writeOffset;if(u)this.ensureInsertable(D.length,$);else this._ensureWriteable(D.length,$);if(D.copy(this._buff,$),u)this._writeOffset+=D.length;else if(typeof F==="number")this._writeOffset=Math.max(this._writeOffset,$+D.length);else this._writeOffset+=D.length;return this}ensureReadable(D,u){let F=this._readOffset;if(typeof u!=="undefined")f.checkOffsetValue(u),F=u;if(F<0||F+D>this.length)throw new Error(f.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(D,u){if(f.checkOffsetValue(u),this._ensureCapacity(this.length+D),u<this.length)this._buff.copy(this._buff,u+D,u,this._buff.length);if(u+D>this.length)this.length=u+D;else this.length+=D}_ensureWriteable(D,u){let F=typeof u==="number"?u:this._writeOffset;if(this._ensureCapacity(F+D),F+D>this.length)this.length=F+D}_ensureCapacity(D){let u=this._buff.length;if(D>u){let F=this._buff,$=u*3/2+1;if($<D)$=D;this._buff=Buffer.allocUnsafe($),F.copy(this._buff,0,0,u)}}_readNumberValue(D,u,F){this.ensureReadable(u,F);let $=D.call(this._buff,typeof F==="number"?F:this._readOffset);if(typeof F==="undefined")this._readOffset+=u;return $}_insertNumberValue(D,u,F,$){return f.checkOffsetValue($),this.ensureInsertable(u,$),D.call(this._buff,F,$),this._writeOffset+=u,this}_writeNumberValue(D,u,F,$){if(typeof $==="number"){if($<0)throw new Error(f.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);f.checkOffsetValue($)}let E=typeof $==="number"?$:this._writeOffset;if(this._ensureWriteable(u,E),D.call(this._buff,F,E),typeof $==="number")this._writeOffset=Math.max(this._writeOffset,E+u);else this._writeOffset+=u;return this}}g9.SmartBuffer=Q1});var A1=b((n9)=>{Object.defineProperty(n9,"__esModule",{value:!0});n9.SOCKS5_NO_ACCEPTABLE_AUTH=n9.SOCKS5_CUSTOM_AUTH_END=n9.SOCKS5_CUSTOM_AUTH_START=n9.SOCKS_INCOMING_PACKET_SIZES=n9.SocksClientState=n9.Socks5Response=n9.Socks5HostType=n9.Socks5Auth=n9.Socks4Response=n9.SocksCommand=n9.ERRORS=n9.DEFAULT_TIMEOUT=void 0;var oJ=30000;n9.DEFAULT_TIMEOUT=oJ;var eJ={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};n9.ERRORS=eJ;var DZ={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:(D)=>D+7,Socks4Response:8};n9.SOCKS_INCOMING_PACKET_SIZES=DZ;var _9;(function(D){D[D.connect=1]="connect",D[D.bind=2]="bind",D[D.associate=3]="associate"})(_9||(n9.SocksCommand=_9={}));var P9;(function(D){D[D.Granted=90]="Granted",D[D.Failed=91]="Failed",D[D.Rejected=92]="Rejected",D[D.RejectedIdent=93]="RejectedIdent"})(P9||(n9.Socks4Response=P9={}));var m9;(function(D){D[D.NoAuth=0]="NoAuth",D[D.GSSApi=1]="GSSApi",D[D.UserPass=2]="UserPass"})(m9||(n9.Socks5Auth=m9={}));var uZ=128;n9.SOCKS5_CUSTOM_AUTH_START=uZ;var FZ=254;n9.SOCKS5_CUSTOM_AUTH_END=FZ;var CZ=255;n9.SOCKS5_NO_ACCEPTABLE_AUTH=CZ;var v9;(function(D){D[D.Granted=0]="Granted",D[D.Failure=1]="Failure",D[D.NotAllowed=2]="NotAllowed",D[D.NetworkUnreachable=3]="NetworkUnreachable",D[D.HostUnreachable=4]="HostUnreachable",D[D.ConnectionRefused=5]="ConnectionRefused",D[D.TTLExpired=6]="TTLExpired",D[D.CommandNotSupported=7]="CommandNotSupported",D[D.AddressNotSupported=8]="AddressNotSupported"})(v9||(n9.Socks5Response=v9={}));var c9;(function(D){D[D.IPv4=1]="IPv4",D[D.Hostname=3]="Hostname",D[D.IPv6=4]="IPv6"})(c9||(n9.Socks5HostType=c9={}));var f9;(function(D){D[D.Created=0]="Created",D[D.Connecting=1]="Connecting",D[D.Connected=2]="Connected",D[D.SentInitialHandshake=3]="SentInitialHandshake",D[D.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",D[D.SentAuthentication=5]="SentAuthentication",D[D.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",D[D.SentFinalHandshake=7]="SentFinalHandshake",D[D.ReceivedFinalResponse=8]="ReceivedFinalResponse",D[D.BoundWaitingForConnection=9]="BoundWaitingForConnection",D[D.Established=10]="Established",D[D.Disconnected=11]="Disconnected",D[D.Error=99]="Error"})(f9||(n9.SocksClientState=f9={}))});var z1=b((l9)=>{Object.defineProperty(l9,"__esModule",{value:!0});l9.shuffleArray=l9.SocksClientError=void 0;class d9 extends Error{constructor(D,u){super(D);this.options=u}}l9.SocksClientError=d9;function QZ(D){for(let u=D.length-1;u>0;u--){let F=Math.floor(Math.random()*(u+1));[D[u],D[F]]=[D[F],D[u]]}}l9.shuffleArray=QZ});var G1=b((i9)=>{Object.defineProperty(i9,"__esModule",{value:!0});i9.isCorrect=i9.isInSubnet=void 0;function zZ(D){if(this.subnetMask<D.subnetMask)return!1;if(this.mask(D.subnetMask)===D.mask())return!0;return!1}i9.isInSubnet=zZ;function GZ(D){return function(){if(this.addressMinusSuffix!==this.correctForm())return!1;if(this.subnetMask===D&&!this.parsedSubnet)return!0;return this.parsedSubnet===String(this.subnetMask)}}i9.isCorrect=GZ});var q1=b((s9)=>{Object.defineProperty(s9,"__esModule",{value:!0});s9.RE_SUBNET_STRING=s9.RE_ADDRESS=s9.GROUPS=s9.BITS=void 0;s9.BITS=32;s9.GROUPS=4;s9.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g;s9.RE_SUBNET_STRING=/\/\d{1,2}$/});var S8=b((e9)=>{Object.defineProperty(e9,"__esModule",{value:!0});e9.AddressError=void 0;class o9 extends Error{constructor(D,u){super(D);if(this.name="AddressError",u!==null)this.parseMessage=u}}e9.AddressError=o9});var H1=b((h8,u4)=>{(function(){var D,u=244837814094590,F=(u&16777215)==15715070;function $(B,Y,J){if(B!=null)if(typeof B=="number")this.fromNumber(B,Y,J);else if(Y==null&&typeof B!="string")this.fromString(B,256);else this.fromString(B,Y)}function E(){return new $(null)}function w(B,Y,J,K,Q,G){while(--G>=0){var I=Y*this[B++]+J[K]+Q;Q=Math.floor(I/67108864),J[K++]=I&67108863}return Q}function C(B,Y,J,K,Q,G){var I=Y&32767,S=Y>>15;while(--G>=0){var o=this[B]&32767,QD=this[B++]>>15,lD=S*o+QD*I;o=I*o+((lD&32767)<<15)+J[K]+(Q&1073741823),Q=(o>>>30)+(lD>>>15)+S*QD+(Q>>>30),J[K++]=o&1073741823}return Q}function Z(B,Y,J,K,Q,G){var I=Y&16383,S=Y>>14;while(--G>=0){var o=this[B]&16383,QD=this[B++]>>14,lD=S*o+QD*I;o=I*o+((lD&16383)<<14)+J[K]+Q,Q=(o>>28)+(lD>>14)+S*QD,J[K++]=o&268435455}return Q}var M=typeof navigator!=="undefined";if(M&&F&&navigator.appName=="Microsoft Internet Explorer")$.prototype.am=C,D=30;else if(M&&F&&navigator.appName!="Netscape")$.prototype.am=w,D=26;else $.prototype.am=Z,D=28;$.prototype.DB=D,$.prototype.DM=(1<<D)-1,$.prototype.DV=1<<D;var W=52;$.prototype.FV=Math.pow(2,W),$.prototype.F1=W-D,$.prototype.F2=2*D-W;var X="0123456789abcdefghijklmnopqrstuvwxyz",q=new Array,L,U;L="0".charCodeAt(0);for(U=0;U<=9;++U)q[L++]=U;L="a".charCodeAt(0);for(U=10;U<36;++U)q[L++]=U;L="A".charCodeAt(0);for(U=10;U<36;++U)q[L++]=U;function A(B){return X.charAt(B)}function P(B,Y){var J=q[B.charCodeAt(Y)];return J==null?-1:J}function n(B){for(var Y=this.t-1;Y>=0;--Y)B[Y]=this[Y];B.t=this.t,B.s=this.s}function d(B){if(this.t=1,this.s=B<0?-1:0,B>0)this[0]=B;else if(B<-1)this[0]=B+this.DV;else this.t=0}function uD(B){var Y=E();return Y.fromInt(B),Y}function FD(B,Y){var J;if(Y==16)J=4;else if(Y==8)J=3;else if(Y==256)J=8;else if(Y==2)J=1;else if(Y==32)J=5;else if(Y==4)J=2;else{this.fromRadix(B,Y);return}this.t=0,this.s=0;var K=B.length,Q=!1,G=0;while(--K>=0){var I=J==8?B[K]&255:P(B,K);if(I<0){if(B.charAt(K)=="-")Q=!0;continue}if(Q=!1,G==0)this[this.t++]=I;else if(G+J>this.DB)this[this.t-1]|=(I&(1<<this.DB-G)-1)<<G,this[this.t++]=I>>this.DB-G;else this[this.t-1]|=I<<G;if(G+=J,G>=this.DB)G-=this.DB}if(J==8&&(B[0]&128)!=0){if(this.s=-1,G>0)this[this.t-1]|=(1<<this.DB-G)-1<<G}if(this.clamp(),Q)$.ZERO.subTo(this,this)}function xD(){var B=this.s&this.DM;while(this.t>0&&this[this.t-1]==B)--this.t}function dD(B){if(this.s<0)return"-"+this.negate().toString(B);var Y;if(B==16)Y=4;else if(B==8)Y=3;else if(B==2)Y=1;else if(B==32)Y=5;else if(B==4)Y=2;else return this.toRadix(B);var J=(1<<Y)-1,K,Q=!1,G="",I=this.t,S=this.DB-I*this.DB%Y;if(I-- >0){if(S<this.DB&&(K=this[I]>>S)>0)Q=!0,G=A(K);while(I>=0){if(S<Y)K=(this[I]&(1<<S)-1)<<Y-S,K|=this[--I]>>(S+=this.DB-Y);else if(K=this[I]>>(S-=Y)&J,S<=0)S+=this.DB,--I;if(K>0)Q=!0;if(Q)G+=A(K)}}return Q?G:"0"}function SD(){var B=E();return $.ZERO.subTo(this,B),B}function VD(){return this.s<0?this.negate():this}function i(B){var Y=this.s-B.s;if(Y!=0)return Y;var J=this.t;if(Y=J-B.t,Y!=0)return this.s<0?-Y:Y;while(--J>=0)if((Y=this[J]-B[J])!=0)return Y;return 0}function m(B){var Y=1,J;if((J=B>>>16)!=0)B=J,Y+=16;if((J=B>>8)!=0)B=J,Y+=8;if((J=B>>4)!=0)B=J,Y+=4;if((J=B>>2)!=0)B=J,Y+=2;if((J=B>>1)!=0)B=J,Y+=1;return Y}function UD(){if(this.t<=0)return 0;return this.DB*(this.t-1)+m(this[this.t-1]^this.s&this.DM)}function LD(B,Y){var J;for(J=this.t-1;J>=0;--J)Y[J+B]=this[J];for(J=B-1;J>=0;--J)Y[J]=0;Y.t=this.t+B,Y.s=this.s}function R(B,Y){for(var J=B;J<this.t;++J)Y[J-B]=this[J];Y.t=Math.max(this.t-B,0),Y.s=this.s}function T(B,Y){var J=B%this.DB,K=this.DB-J,Q=(1<<K)-1,G=Math.floor(B/this.DB),I=this.s<<J&this.DM,S;for(S=this.t-1;S>=0;--S)Y[S+G+1]=this[S]>>K|I,I=(this[S]&Q)<<J;for(S=G-1;S>=0;--S)Y[S]=0;Y[G]=I,Y.t=this.t+G+1,Y.s=this.s,Y.clamp()}function O(B,Y){Y.s=this.s;var J=Math.floor(B/this.DB);if(J>=this.t){Y.t=0;return}var K=B%this.DB,Q=this.DB-K,G=(1<<K)-1;Y[0]=this[J]>>K;for(var I=J+1;I<this.t;++I)Y[I-J-1]|=(this[I]&G)<<Q,Y[I-J]=this[I]>>K;if(K>0)Y[this.t-J-1]|=(this.s&G)<<Q;Y.t=this.t-J,Y.clamp()}function h(B,Y){var J=0,K=0,Q=Math.min(B.t,this.t);while(J<Q)K+=this[J]-B[J],Y[J++]=K&this.DM,K>>=this.DB;if(B.t<this.t){K-=B.s;while(J<this.t)K+=this[J],Y[J++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(J<B.t)K-=B[J],Y[J++]=K&this.DM,K>>=this.DB;K-=B.s}if(Y.s=K<0?-1:0,K<-1)Y[J++]=this.DV+K;else if(K>0)Y[J++]=K;Y.t=J,Y.clamp()}function N(B,Y){var J=this.abs(),K=B.abs(),Q=J.t;Y.t=Q+K.t;while(--Q>=0)Y[Q]=0;for(Q=0;Q<K.t;++Q)Y[Q+J.t]=J.am(0,K[Q],Y,Q,0,J.t);if(Y.s=0,Y.clamp(),this.s!=B.s)$.ZERO.subTo(Y,Y)}function g(B){var Y=this.abs(),J=B.t=2*Y.t;while(--J>=0)B[J]=0;for(J=0;J<Y.t-1;++J){var K=Y.am(J,Y[J],B,2*J,0,1);if((B[J+Y.t]+=Y.am(J+1,2*Y[J],B,2*J+1,K,Y.t-J-1))>=Y.DV)B[J+Y.t]-=Y.DV,B[J+Y.t+1]=1}if(B.t>0)B[B.t-1]+=Y.am(J,Y[J],B,2*J,0,1);B.s=0,B.clamp()}function _(B,Y,J){var K=B.abs();if(K.t<=0)return;var Q=this.abs();if(Q.t<K.t){if(Y!=null)Y.fromInt(0);if(J!=null)this.copyTo(J);return}if(J==null)J=E();var G=E(),I=this.s,S=B.s,o=this.DB-m(K[K.t-1]);if(o>0)K.lShiftTo(o,G),Q.lShiftTo(o,J);else K.copyTo(G),Q.copyTo(J);var QD=G.t,lD=G[QD-1];if(lD==0)return;var fD=lD*(1<<this.F1)+(QD>1?G[QD-2]>>this.F2:0),Wu=this.FV/fD,N0=(1<<this.F1)/fD,eD=1<<this.F2,Du=J.t,I0=Du-QD,qu=Y==null?E():Y;if(G.dlShiftTo(I0,qu),J.compareTo(qu)>=0)J[J.t++]=1,J.subTo(qu,J);$.ONE.dlShiftTo(QD,qu),qu.subTo(G,G);while(G.t<QD)G[G.t++]=0;while(--I0>=0){var c8=J[--Du]==lD?this.DM:Math.floor(J[Du]*Wu+(J[Du-1]+eD)*N0);if((J[Du]+=G.am(0,c8,J,I0,0,QD))<c8){G.dlShiftTo(I0,qu),J.subTo(qu,J);while(J[Du]<--c8)J.subTo(qu,J)}}if(Y!=null){if(J.drShiftTo(QD,Y),I!=S)$.ZERO.subTo(Y,Y)}if(J.t=QD,J.clamp(),o>0)J.rShiftTo(o,J);if(I<0)$.ZERO.subTo(J,J)}function v(B){var Y=E();if(this.abs().divRemTo(B,null,Y),this.s<0&&Y.compareTo($.ZERO)>0)B.subTo(Y,Y);return Y}function l(B){this.m=B}function a(B){if(B.s<0||B.compareTo(this.m)>=0)return B.mod(this.m);else return B}function JD(B){return B}function TD(B){B.divRemTo(this.m,null,B)}function Eu(B,Y,J){B.multiplyTo(Y,J),this.reduce(J)}function sD(B,Y){B.squareTo(Y),this.reduce(Y)}l.prototype.convert=a,l.prototype.revert=JD,l.prototype.reduce=TD,l.prototype.mulTo=Eu,l.prototype.sqrTo=sD;function Xu(){if(this.t<1)return 0;var B=this[0];if((B&1)==0)return 0;var Y=B&3;return Y=Y*(2-(B&15)*Y)&15,Y=Y*(2-(B&255)*Y)&255,Y=Y*(2-((B&65535)*Y&65535))&65535,Y=Y*(2-B*Y%this.DV)%this.DV,Y>0?this.DV-Y:-Y}function XD(B){this.m=B,this.mp=B.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<B.DB-15)-1,this.mt2=2*B.t}function KD(B){var Y=E();if(B.abs().dlShiftTo(this.m.t,Y),Y.divRemTo(this.m,null,Y),B.s<0&&Y.compareTo($.ZERO)>0)this.m.subTo(Y,Y);return Y}function bD(B){var Y=E();return B.copyTo(Y),this.reduce(Y),Y}function aD(B){while(B.t<=this.mt2)B[B.t++]=0;for(var Y=0;Y<this.m.t;++Y){var J=B[Y]&32767,K=J*this.mpl+((J*this.mph+(B[Y]>>15)*this.mpl&this.um)<<15)&B.DM;J=Y+this.m.t,B[J]+=this.m.am(0,K,B,Y,0,this.m.t);while(B[J]>=B.DV)B[J]-=B.DV,B[++J]++}if(B.clamp(),B.drShiftTo(this.m.t,B),B.compareTo(this.m)>=0)B.subTo(this.m,B)}function wu(B,Y){B.squareTo(Y),this.reduce(Y)}function gu(B,Y,J){B.multiplyTo(Y,J),this.reduce(J)}XD.prototype.convert=KD,XD.prototype.revert=bD,XD.prototype.reduce=aD,XD.prototype.mulTo=gu,XD.prototype.sqrTo=wu;function bu(){return(this.t>0?this[0]&1:this.s)==0}function ou(B,Y){if(B>4294967295||B<1)return $.ONE;var J=E(),K=E(),Q=Y.convert(this),G=m(B)-1;Q.copyTo(J);while(--G>=0)if(Y.sqrTo(J,K),(B&1<<G)>0)Y.mulTo(K,Q,J);else{var I=J;J=K,K=I}return Y.revert(J)}function eu(B,Y){var J;if(B<256||Y.isEven())J=new l(Y);else J=new XD(Y);return this.exp(B,J)}$.prototype.copyTo=n,$.prototype.fromInt=d,$.prototype.fromString=FD,$.prototype.clamp=xD,$.prototype.dlShiftTo=LD,$.prototype.drShiftTo=R,$.prototype.lShiftTo=T,$.prototype.rShiftTo=O,$.prototype.subTo=h,$.prototype.multiplyTo=N,$.prototype.squareTo=g,$.prototype.divRemTo=_,$.prototype.invDigit=Xu,$.prototype.isEven=bu,$.prototype.exp=ou,$.prototype.toString=dD,$.prototype.negate=SD,$.prototype.abs=VD,$.prototype.compareTo=i,$.prototype.bitLength=UD,$.prototype.mod=v,$.prototype.modPowInt=eu,$.ZERO=uD(0),$.ONE=uD(1);function D0(){var B=E();return this.copyTo(B),B}function u0(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function k1(){return this.t==0?this.s:this[0]<<24>>24}function b4(){return this.t==0?this.s:this[0]<<16>>16}function _4(B){return Math.floor(Math.LN2*this.DB/Math.log(B))}function P4(){if(this.s<0)return-1;else if(this.t<=0||this.t==1&&this[0]<=0)return 0;else return 1}function m4(B){if(B==null)B=10;if(this.signum()==0||B<2||B>36)return"0";var Y=this.chunkSize(B),J=Math.pow(B,Y),K=uD(J),Q=E(),G=E(),I="";this.divRemTo(K,Q,G);while(Q.signum()>0)I=(J+G.intValue()).toString(B).substr(1)+I,Q.divRemTo(K,Q,G);return G.intValue().toString(B)+I}function v4(B,Y){if(this.fromInt(0),Y==null)Y=10;var J=this.chunkSize(Y),K=Math.pow(Y,J),Q=!1,G=0,I=0;for(var S=0;S<B.length;++S){var o=P(B,S);if(o<0){if(B.charAt(S)=="-"&&this.signum()==0)Q=!0;continue}if(I=Y*I+o,++G>=J)this.dMultiply(K),this.dAddOffset(I,0),G=0,I=0}if(G>0)this.dMultiply(Math.pow(Y,G)),this.dAddOffset(I,0);if(Q)$.ZERO.subTo(this,this)}function c4(B,Y,J){if(typeof Y=="number")if(B<2)this.fromInt(1);else{if(this.fromNumber(B,J),!this.testBit(B-1))this.bitwiseTo($.ONE.shiftLeft(B-1),_8,this);if(this.isEven())this.dAddOffset(1,0);while(!this.isProbablePrime(Y))if(this.dAddOffset(2,0),this.bitLength()>B)this.subTo($.ONE.shiftLeft(B-1),this)}else{var K=new Array,Q=B&7;if(K.length=(B>>3)+1,Y.nextBytes(K),Q>0)K[0]&=(1<<Q)-1;else K[0]=0;this.fromString(K,256)}}function f4(){var B=this.t,Y=new Array;Y[0]=this.s;var J=this.DB-B*this.DB%8,K,Q=0;if(B-- >0){if(J<this.DB&&(K=this[B]>>J)!=(this.s&this.DM)>>J)Y[Q++]=K|this.s<<this.DB-J;while(B>=0){if(J<8)K=(this[B]&(1<<J)-1)<<8-J,K|=this[--B]>>(J+=this.DB-8);else if(K=this[B]>>(J-=8)&255,J<=0)J+=this.DB,--B;if((K&128)!=0)K|=-256;if(Q==0&&(this.s&128)!=(K&128))++Q;if(Q>0||K!=this.s)Y[Q++]=K}}return Y}function n4(B){return this.compareTo(B)==0}function r4(B){return this.compareTo(B)<0?this:B}function d4(B){return this.compareTo(B)>0?this:B}function l4(B,Y,J){var K,Q,G=Math.min(B.t,this.t);for(K=0;K<G;++K)J[K]=Y(this[K],B[K]);if(B.t<this.t){Q=B.s&this.DM;for(K=G;K<this.t;++K)J[K]=Y(this[K],Q);J.t=this.t}else{Q=this.s&this.DM;for(K=G;K<B.t;++K)J[K]=Y(Q,B[K]);J.t=B.t}J.s=Y(this.s,B.s),J.clamp()}function p4(B,Y){return B&Y}function i4(B){var Y=E();return this.bitwiseTo(B,p4,Y),Y}function _8(B,Y){return B|Y}function t4(B){var Y=E();return this.bitwiseTo(B,_8,Y),Y}function g1(B,Y){return B^Y}function s4(B){var Y=E();return this.bitwiseTo(B,g1,Y),Y}function b1(B,Y){return B&~Y}function a4(B){var Y=E();return this.bitwiseTo(B,b1,Y),Y}function o4(){var B=E();for(var Y=0;Y<this.t;++Y)B[Y]=this.DM&~this[Y];return B.t=this.t,B.s=~this.s,B}function e4(B){var Y=E();if(B<0)this.rShiftTo(-B,Y);else this.lShiftTo(B,Y);return Y}function D$(B){var Y=E();if(B<0)this.lShiftTo(-B,Y);else this.rShiftTo(B,Y);return Y}function u$(B){if(B==0)return-1;var Y=0;if((B&65535)==0)B>>=16,Y+=16;if((B&255)==0)B>>=8,Y+=8;if((B&15)==0)B>>=4,Y+=4;if((B&3)==0)B>>=2,Y+=2;if((B&1)==0)++Y;return Y}function F$(){for(var B=0;B<this.t;++B)if(this[B]!=0)return B*this.DB+u$(this[B]);if(this.s<0)return this.t*this.DB;return-1}function C$(B){var Y=0;while(B!=0)B&=B-1,++Y;return Y}function $$(){var B=0,Y=this.s&this.DM;for(var J=0;J<this.t;++J)B+=C$(this[J]^Y);return B}function E$(B){var Y=Math.floor(B/this.DB);if(Y>=this.t)return this.s!=0;return(this[Y]&1<<B%this.DB)!=0}function w$(B,Y){var J=$.ONE.shiftLeft(B);return this.bitwiseTo(J,Y,J),J}function B$(B){return this.changeBit(B,_8)}function Y$(B){return this.changeBit(B,b1)}function J$(B){return this.changeBit(B,g1)}function Z$(B,Y){var J=0,K=0,Q=Math.min(B.t,this.t);while(J<Q)K+=this[J]+B[J],Y[J++]=K&this.DM,K>>=this.DB;if(B.t<this.t){K+=B.s;while(J<this.t)K+=this[J],Y[J++]=K&this.DM,K>>=this.DB;K+=this.s}else{K+=this.s;while(J<B.t)K+=B[J],Y[J++]=K&this.DM,K>>=this.DB;K+=B.s}if(Y.s=K<0?-1:0,K>0)Y[J++]=K;else if(K<-1)Y[J++]=this.DV+K;Y.t=J,Y.clamp()}function K$(B){var Y=E();return this.addTo(B,Y),Y}function M$(B){var Y=E();return this.subTo(B,Y),Y}function X$(B){var Y=E();return this.multiplyTo(B,Y),Y}function W$(){var B=E();return this.squareTo(B),B}function Q$(B){var Y=E();return this.divRemTo(B,Y,null),Y}function A$(B){var Y=E();return this.divRemTo(B,null,Y),Y}function z$(B){var Y=E(),J=E();return this.divRemTo(B,Y,J),new Array(Y,J)}function G$(B){this[this.t]=this.am(0,B-1,this,0,0,this.t),++this.t,this.clamp()}function q$(B,Y){if(B==0)return;while(this.t<=Y)this[this.t++]=0;this[Y]+=B;while(this[Y]>=this.DV){if(this[Y]-=this.DV,++Y>=this.t)this[this.t++]=0;++this[Y]}}function F0(){}function _1(B){return B}function H$(B,Y,J){B.multiplyTo(Y,J)}function U$(B,Y){B.squareTo(Y)}F0.prototype.convert=_1,F0.prototype.revert=_1,F0.prototype.mulTo=H$,F0.prototype.sqrTo=U$;function O$(B){return this.exp(B,new F0)}function V$(B,Y,J){var K=Math.min(this.t+B.t,Y);J.s=0,J.t=K;while(K>0)J[--K]=0;var Q;for(Q=J.t-this.t;K<Q;++K)J[K+this.t]=this.am(0,B[K],J,K,0,this.t);for(Q=Math.min(B.t,Y);K<Q;++K)this.am(0,B[K],J,K,0,Y-K);J.clamp()}function L$(B,Y,J){--Y;var K=J.t=this.t+B.t-Y;J.s=0;while(--K>=0)J[K]=0;for(K=Math.max(Y-this.t,0);K<B.t;++K)J[this.t+K-Y]=this.am(Y-K,B[K],J,0,0,this.t+K-Y);J.clamp(),J.drShiftTo(1,J)}function Nu(B){this.r2=E(),this.q3=E(),$.ONE.dlShiftTo(2*B.t,this.r2),this.mu=this.r2.divide(B),this.m=B}function T$(B){if(B.s<0||B.t>2*this.m.t)return B.mod(this.m);else if(B.compareTo(this.m)<0)return B;else{var Y=E();return B.copyTo(Y),this.reduce(Y),Y}}function N$(B){return B}function I$(B){if(B.drShiftTo(this.m.t-1,this.r2),B.t>this.m.t+1)B.t=this.m.t+1,B.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(B.compareTo(this.r2)<0)B.dAddOffset(1,this.m.t+1);B.subTo(this.r2,B);while(B.compareTo(this.m)>=0)B.subTo(this.m,B)}function x$(B,Y){B.squareTo(Y),this.reduce(Y)}function S$(B,Y,J){B.multiplyTo(Y,J),this.reduce(J)}Nu.prototype.convert=T$,Nu.prototype.revert=N$,Nu.prototype.reduce=I$,Nu.prototype.mulTo=S$,Nu.prototype.sqrTo=x$;function h$(B,Y){var J=B.bitLength(),K,Q=uD(1),G;if(J<=0)return Q;else if(J<18)K=1;else if(J<48)K=3;else if(J<144)K=4;else if(J<768)K=5;else K=6;if(J<8)G=new l(Y);else if(Y.isEven())G=new Nu(Y);else G=new XD(Y);var I=new Array,S=3,o=K-1,QD=(1<<K)-1;if(I[1]=G.convert(this),K>1){var lD=E();G.sqrTo(I[1],lD);while(S<=QD)I[S]=E(),G.mulTo(lD,I[S-2],I[S]),S+=2}var fD=B.t-1,Wu,N0=!0,eD=E(),Du;J=m(B[fD])-1;while(fD>=0){if(J>=o)Wu=B[fD]>>J-o&QD;else if(Wu=(B[fD]&(1<<J+1)-1)<<o-J,fD>0)Wu|=B[fD-1]>>this.DB+J-o;S=K;while((Wu&1)==0)Wu>>=1,--S;if((J-=S)<0)J+=this.DB,--fD;if(N0)I[Wu].copyTo(Q),N0=!1;else{while(S>1)G.sqrTo(Q,eD),G.sqrTo(eD,Q),S-=2;if(S>0)G.sqrTo(Q,eD);else Du=Q,Q=eD,eD=Du;G.mulTo(eD,I[Wu],Q)}while(fD>=0&&(B[fD]&1<<J)==0)if(G.sqrTo(Q,eD),Du=Q,Q=eD,eD=Du,--J<0)J=this.DB-1,--fD}return G.revert(Q)}function y$(B){var Y=this.s<0?this.negate():this.clone(),J=B.s<0?B.negate():B.clone();if(Y.compareTo(J)<0){var K=Y;Y=J,J=K}var Q=Y.getLowestSetBit(),G=J.getLowestSetBit();if(G<0)return Y;if(Q<G)G=Q;if(G>0)Y.rShiftTo(G,Y),J.rShiftTo(G,J);while(Y.signum()>0){if((Q=Y.getLowestSetBit())>0)Y.rShiftTo(Q,Y);if((Q=J.getLowestSetBit())>0)J.rShiftTo(Q,J);if(Y.compareTo(J)>=0)Y.subTo(J,Y),Y.rShiftTo(1,Y);else J.subTo(Y,J),J.rShiftTo(1,J)}if(G>0)J.lShiftTo(G,J);return J}function j$(B){if(B<=0)return 0;var Y=this.DV%B,J=this.s<0?B-1:0;if(this.t>0)if(Y==0)J=this[0]%B;else for(var K=this.t-1;K>=0;--K)J=(Y*J+this[K])%B;return J}function R$(B){var Y=B.isEven();if(this.isEven()&&Y||B.signum()==0)return $.ZERO;var J=B.clone(),K=this.clone(),Q=uD(1),G=uD(0),I=uD(0),S=uD(1);while(J.signum()!=0){while(J.isEven()){if(J.rShiftTo(1,J),Y){if(!Q.isEven()||!G.isEven())Q.addTo(this,Q),G.subTo(B,G);Q.rShiftTo(1,Q)}else if(!G.isEven())G.subTo(B,G);G.rShiftTo(1,G)}while(K.isEven()){if(K.rShiftTo(1,K),Y){if(!I.isEven()||!S.isEven())I.addTo(this,I),S.subTo(B,S);I.rShiftTo(1,I)}else if(!S.isEven())S.subTo(B,S);S.rShiftTo(1,S)}if(J.compareTo(K)>=0){if(J.subTo(K,J),Y)Q.subTo(I,Q);G.subTo(S,G)}else{if(K.subTo(J,K),Y)I.subTo(Q,I);S.subTo(G,S)}}if(K.compareTo($.ONE)!=0)return $.ZERO;if(S.compareTo(B)>=0)return S.subtract(B);if(S.signum()<0)S.addTo(B,S);else return S;if(S.signum()<0)return S.add(B);else return S}var hD=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],k$=67108864/hD[hD.length-1];function g$(B){var Y,J=this.abs();if(J.t==1&&J[0]<=hD[hD.length-1]){for(Y=0;Y<hD.length;++Y)if(J[0]==hD[Y])return!0;return!1}if(J.isEven())return!1;Y=1;while(Y<hD.length){var K=hD[Y],Q=Y+1;while(Q<hD.length&&K<k$)K*=hD[Q++];K=J.modInt(K);while(Y<Q)if(K%hD[Y++]==0)return!1}return J.millerRabin(B)}function b$(B){var Y=this.subtract($.ONE),J=Y.getLowestSetBit();if(J<=0)return!1;var K=Y.shiftRight(J);if(B=B+1>>1,B>hD.length)B=hD.length;var Q=E();for(var G=0;G<B;++G){Q.fromInt(hD[Math.floor(Math.random()*hD.length)]);var I=Q.modPow(K,this);if(I.compareTo($.ONE)!=0&&I.compareTo(Y)!=0){var S=1;while(S++<J&&I.compareTo(Y)!=0)if(I=I.modPowInt(2,this),I.compareTo($.ONE)==0)return!1;if(I.compareTo(Y)!=0)return!1}}return!0}$.prototype.chunkSize=_4,$.prototype.toRadix=m4,$.prototype.fromRadix=v4,$.prototype.fromNumber=c4,$.prototype.bitwiseTo=l4,$.prototype.changeBit=w$,$.prototype.addTo=Z$,$.prototype.dMultiply=G$,$.prototype.dAddOffset=q$,$.prototype.multiplyLowerTo=V$,$.prototype.multiplyUpperTo=L$,$.prototype.modInt=j$,$.prototype.millerRabin=b$,$.prototype.clone=D0,$.prototype.intValue=u0,$.prototype.byteValue=k1,$.prototype.shortValue=b4,$.prototype.signum=P4,$.prototype.toByteArray=f4,$.prototype.equals=n4,$.prototype.min=r4,$.prototype.max=d4,$.prototype.and=i4,$.prototype.or=t4,$.prototype.xor=s4,$.prototype.andNot=a4,$.prototype.not=o4,$.prototype.shiftLeft=e4,$.prototype.shiftRight=D$,$.prototype.getLowestSetBit=F$,$.prototype.bitCount=$$,$.prototype.testBit=E$,$.prototype.setBit=B$,$.prototype.clearBit=Y$,$.prototype.flipBit=J$,$.prototype.add=K$,$.prototype.subtract=M$,$.prototype.multiply=X$,$.prototype.divide=Q$,$.prototype.remainder=A$,$.prototype.divideAndRemainder=z$,$.prototype.modPow=h$,$.prototype.modInverse=R$,$.prototype.pow=O$,$.prototype.gcd=y$,$.prototype.isProbablePrime=g$,$.prototype.square=W$,$.prototype.Barrett=Nu;var T0,cD,WD;function _$(B){if(cD[WD++]^=B&255,cD[WD++]^=B>>8&255,cD[WD++]^=B>>16&255,cD[WD++]^=B>>24&255,WD>=v8)WD-=v8}function P1(){_$(new Date().getTime())}if(cD==null){cD=new Array,WD=0;var oD;if(typeof window!=="undefined"&&window.crypto){if(window.crypto.getRandomValues){var m1=new Uint8Array(32);window.crypto.getRandomValues(m1);for(oD=0;oD<32;++oD)cD[WD++]=m1[oD]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var v1=window.crypto.random(32);for(oD=0;oD<v1.length;++oD)cD[WD++]=v1.charCodeAt(oD)&255}}while(WD<v8)oD=Math.floor(65536*Math.random()),cD[WD++]=oD>>>8,cD[WD++]=oD&255;WD=0,P1()}function P$(){if(T0==null){P1(),T0=f$(),T0.init(cD);for(WD=0;WD<cD.length;++WD)cD[WD]=0;WD=0}return T0.next()}function m$(B){var Y;for(Y=0;Y<B.length;++Y)B[Y]=P$()}function P8(){}P8.prototype.nextBytes=m$;function m8(){this.i=0,this.j=0,this.S=new Array}function v$(B){var Y,J,K;for(Y=0;Y<256;++Y)this.S[Y]=Y;J=0;for(Y=0;Y<256;++Y)J=J+this.S[Y]+B[Y%B.length]&255,K=this.S[Y],this.S[Y]=this.S[J],this.S[J]=K;this.i=0,this.j=0}function c$(){var B;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,B=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=B,this.S[B+this.S[this.i]&255]}m8.prototype.init=v$,m8.prototype.next=c$;function f$(){return new m8}var v8=256;if(typeof h8!=="undefined")h8=u4.exports={default:$,BigInteger:$,SecureRandom:P8};else this.jsbn={BigInteger:$,SecureRandom:P8}}).call(h8)});var V0=b((F4)=>{(function(){var D={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function u(C){return $(w(C),arguments)}function F(C,Z){return u.apply(null,[C].concat(Z||[]))}function $(C,Z){var M=1,W=C.length,X,q="",L,U,A,P,n,d,uD,FD;for(L=0;L<W;L++)if(typeof C[L]==="string")q+=C[L];else if(typeof C[L]==="object"){if(A=C[L],A.keys){X=Z[M];for(U=0;U<A.keys.length;U++){if(X==null)throw new Error(u('[sprintf] Cannot access property "%s" of undefined value "%s"',A.keys[U],A.keys[U-1]));X=X[A.keys[U]]}}else if(A.param_no)X=Z[A.param_no];else X=Z[M++];if(D.not_type.test(A.type)&&D.not_primitive.test(A.type)&&X instanceof Function)X=X();if(D.numeric_arg.test(A.type)&&(typeof X!=="number"&&isNaN(X)))throw new TypeError(u("[sprintf] expecting number but found %T",X));if(D.number.test(A.type))uD=X>=0;switch(A.type){case"b":X=parseInt(X,10).toString(2);break;case"c":X=String.fromCharCode(parseInt(X,10));break;case"d":case"i":X=parseInt(X,10);break;case"j":X=JSON.stringify(X,null,A.width?parseInt(A.width):0);break;case"e":X=A.precision?parseFloat(X).toExponential(A.precision):parseFloat(X).toExponential();break;case"f":X=A.precision?parseFloat(X).toFixed(A.precision):parseFloat(X);break;case"g":X=A.precision?String(Number(X.toPrecision(A.precision))):parseFloat(X);break;case"o":X=(parseInt(X,10)>>>0).toString(8);break;case"s":X=String(X),X=A.precision?X.substring(0,A.precision):X;break;case"t":X=String(!!X),X=A.precision?X.substring(0,A.precision):X;break;case"T":X=Object.prototype.toString.call(X).slice(8,-1).toLowerCase(),X=A.precision?X.substring(0,A.precision):X;break;case"u":X=parseInt(X,10)>>>0;break;case"v":X=X.valueOf(),X=A.precision?X.substring(0,A.precision):X;break;case"x":X=(parseInt(X,10)>>>0).toString(16);break;case"X":X=(parseInt(X,10)>>>0).toString(16).toUpperCase();break}if(D.json.test(A.type))q+=X;else{if(D.number.test(A.type)&&(!uD||A.sign))FD=uD?"+":"-",X=X.toString().replace(D.sign,"");else FD="";n=A.pad_char?A.pad_char==="0"?"0":A.pad_char.charAt(1):" ",d=A.width-(FD+X).length,P=A.width?d>0?n.repeat(d):"":"",q+=A.align?FD+X+P:n==="0"?FD+P+X:P+FD+X}}return q}var E=Object.create(null);function w(C){if(E[C])return E[C];var Z=C,M,W=[],X=0;while(Z){if((M=D.text.exec(Z))!==null)W.push(M[0]);else if((M=D.modulo.exec(Z))!==null)W.push("%");else if((M=D.placeholder.exec(Z))!==null){if(M[2]){X|=1;var q=[],L=M[2],U=[];if((U=D.key.exec(L))!==null){q.push(U[1]);while((L=L.substring(U[0].length))!=="")if((U=D.key_access.exec(L))!==null)q.push(U[1]);else if((U=D.index_access.exec(L))!==null)q.push(U[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key")}else throw new SyntaxError("[sprintf] failed to parse named argument key");M[2]=q}else X|=2;if(X===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");W.push({placeholder:M[0],param_no:M[1],keys:M[2],sign:M[3],pad_char:M[4],align:M[5],width:M[6],precision:M[7],type:M[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");Z=Z.substring(M[0].length)}return E[C]=W}if(typeof F4!=="undefined")F4.sprintf=u,F4.vsprintf=F;if(typeof window!=="undefined"){if(window.sprintf=u,window.vsprintf=F,typeof define==="function"&&define.amd)define(function(){return{sprintf:u,vsprintf:F}})}})()});var U1=b((Ku)=>{var VZ=Ku&&Ku.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),LZ=Ku&&Ku.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),E4=Ku&&Ku.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))VZ(u,D,F)}return LZ(u,D),u};Object.defineProperty(Ku,"__esModule",{value:!0});Ku.Address4=void 0;var C4=E4(G1()),$u=E4(q1()),$4=S8(),L0=H1(),iu=V0();class tD{constructor(D){this.groups=$u.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=C4.isCorrect($u.BITS),this.isInSubnet=C4.isInSubnet,this.address=D;let u=$u.RE_SUBNET_STRING.exec(D);if(u){if(this.parsedSubnet=u[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>$u.BITS)throw new $4.AddressError("Invalid subnet mask.");D=D.replace($u.RE_SUBNET_STRING,"")}this.addressMinusSuffix=D,this.parsedAddress=this.parse(D)}static isValid(D){try{return new tD(D),!0}catch(u){return!1}}parse(D){let u=D.split(".");if(!D.match($u.RE_ADDRESS))throw new $4.AddressError("Invalid IPv4 address.");return u}correctForm(){return this.parsedAddress.map((D)=>parseInt(D,10)).join(".")}static fromHex(D){let u=D.replace(/:/g,"").padStart(8,"0"),F=[],$;for($=0;$<8;$+=2){let E=u.slice($,$+2);F.push(parseInt(E,16))}return new tD(F.join("."))}static fromInteger(D){return tD.fromHex(D.toString(16))}static fromArpa(D){let F=D.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new tD(F)}toHex(){return this.parsedAddress.map((D)=>iu.sprintf("%02x",parseInt(D,10))).join(":")}toArray(){return this.parsedAddress.map((D)=>parseInt(D,10))}toGroup6(){let D=[],u;for(u=0;u<$u.GROUPS;u+=2){let F=iu.sprintf("%02x%02x",parseInt(this.parsedAddress[u],10),parseInt(this.parsedAddress[u+1],10));D.push(iu.sprintf("%x",parseInt(F,16)))}return D.join(":")}bigInteger(){return new L0.BigInteger(this.parsedAddress.map((D)=>iu.sprintf("%02x",parseInt(D,10))).join(""),16)}_startAddress(){return new L0.BigInteger(this.mask()+"0".repeat($u.BITS-this.subnetMask),2)}startAddress(){return tD.fromBigInteger(this._startAddress())}startAddressExclusive(){let D=new L0.BigInteger("1");return tD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new L0.BigInteger(this.mask()+"1".repeat($u.BITS-this.subnetMask),2)}endAddress(){return tD.fromBigInteger(this._endAddress())}endAddressExclusive(){let D=new L0.BigInteger("1");return tD.fromBigInteger(this._endAddress().subtract(D))}static fromBigInteger(D){return tD.fromInteger(parseInt(D.toString(),10))}mask(D){if(D===void 0)D=this.subnetMask;return this.getBitsBase2(0,D)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}reverseForm(D){if(!D)D={};let u=this.correctForm().split(".").reverse().join(".");if(D.omitSuffix)return u;return iu.sprintf("%s.in-addr.arpa.",u)}isMulticast(){return this.isInSubnet(new tD("224.0.0.0/4"))}binaryZeroPad(){return this.bigInteger().toString(2).padStart($u.BITS,"0")}groupForV6(){let D=this.parsedAddress;return this.address.replace($u.RE_ADDRESS,iu.sprintf('<span class="hover-group group-v4 group-6">%s</span>.<span class="hover-group group-v4 group-7">%s</span>',D.slice(0,2).join("."),D.slice(2,4).join(".")))}}Ku.Address4=tD});var O1=b((w4)=>{Object.defineProperty(w4,"__esModule",{value:!0});w4.RE_URL_WITH_PORT=w4.RE_URL=w4.RE_ZONE_STRING=w4.RE_SUBNET_STRING=w4.RE_BAD_ADDRESS=w4.RE_BAD_CHARACTERS=w4.TYPES=w4.SCOPES=w4.GROUPS=w4.BITS=void 0;w4.BITS=128;w4.GROUPS=8;w4.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"};w4.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"};w4.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi;w4.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi;w4.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/;w4.RE_ZONE_STRING=/%.*$/;w4.RE_URL=new RegExp(/^\[{0,1}([0-9a-f:]+)\]{0,1}/);w4.RE_URL_WITH_PORT=new RegExp(/\[([0-9a-f:]+)\]:([0-9]{1,5})/)});var V1=b((K4)=>{Object.defineProperty(K4,"__esModule",{value:!0});K4.simpleGroup=K4.spanLeadingZeroes=K4.spanAll=K4.spanAllZeroes=void 0;var Y4=V0();function J4(D){return D.replace(/(0+)/g,'<span class="zero">$1</span>')}K4.spanAllZeroes=J4;function kZ(D,u=0){return D.split("").map(($,E)=>Y4.sprintf('<span class="digit value-%s position-%d">%s</span>',$,E+u,J4($))).join("")}K4.spanAll=kZ;function Z4(D){return D.replace(/^(0+)/,'<span class="zero">$1</span>')}function gZ(D){return D.split(":").map((F)=>Z4(F)).join(":")}K4.spanLeadingZeroes=gZ;function bZ(D,u=0){return D.split(":").map(($,E)=>{if(/group-v4/.test($))return $;return Y4.sprintf('<span class="hover-group group-%d">%s</span>',E+u,Z4($))})}K4.simpleGroup=bZ});var X4=b((GD)=>{var vZ=GD&&GD.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),cZ=GD&&GD.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),fZ=GD&&GD.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))vZ(u,D,F)}return cZ(u,D),u};Object.defineProperty(GD,"__esModule",{value:!0});GD.possibleElisions=GD.simpleRegularExpression=GD.ADDRESS_BOUNDARY=GD.padGroup=GD.groupPossibilities=void 0;var nZ=fZ(O1()),tu=V0();function j8(D){return tu.sprintf("(%s)",D.join("|"))}GD.groupPossibilities=j8;function y8(D){if(D.length<4)return tu.sprintf("0{0,%d}%s",4-D.length,D);return D}GD.padGroup=y8;GD.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function rZ(D){let u=[];D.forEach(($,E)=>{if(parseInt($,16)===0)u.push(E)});let F=u.map(($)=>D.map((E,w)=>{if(w===$){let C=w===0||w===nZ.GROUPS-1?":":"";return j8([y8(E),C])}return y8(E)}).join(":"));return F.push(D.map(y8).join(":")),j8(F)}GD.simpleRegularExpression=rZ;function dZ(D,u,F){let $=u?"":":",E=F?"":":",w=[];if(!u&&!F)w.push("::");if(u&&F)w.push("");if(F&&!u||!F&&u)w.push(":");w.push(tu.sprintf("%s(:0{1,4}){1,%d}",$,D-1)),w.push(tu.sprintf("(0{1,4}:){1,%d}%s",D-1,E)),w.push(tu.sprintf("(0{1,4}:){%d}0{1,4}",D-1));for(let C=1;C<D-1;C++)for(let Z=1;Z<D-C;Z++)w.push(tu.sprintf("(0{1,4}:){%d}:(0{1,4}:){%d}0{1,4}",Z,D-Z-C-1));return j8(w)}GD.possibleElisions=dZ});var z4=b((Mu)=>{var lZ=Mu&&Mu.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),pZ=Mu&&Mu.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),k8=Mu&&Mu.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))lZ(u,D,F)}return pZ(u,D),u};Object.defineProperty(Mu,"__esModule",{value:!0});Mu.Address6=void 0;var W4=k8(G1()),L1=k8(q1()),s=k8(O1()),T1=k8(V1()),ju=U1(),Ru=X4(),Gu=S8(),RD=H1(),kD=V0();function R8(D){if(!D)throw new Error("Assertion failed.")}function iZ(D){let u=/(\d+)(\d{3})/;while(u.test(D))D=D.replace(u,"$1,$2");return D}function tZ(D){return D=D.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),D=D.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),D}function sZ(D,u){let F=[],$=[],E;for(E=0;E<D.length;E++)if(E<u[0])F.push(D[E]);else if(E>u[1])$.push(D[E]);return F.concat(["compact"]).concat($)}function Q4(D){return kD.sprintf("%04x",parseInt(D,16))}function A4(D){return D&255}class qD{constructor(D,u){if(this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=W4.isInSubnet,this.isCorrect=W4.isCorrect(s.BITS),u===void 0)this.groups=s.GROUPS;else this.groups=u;this.address=D;let F=s.RE_SUBNET_STRING.exec(D);if(F){if(this.parsedSubnet=F[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>s.BITS)throw new Gu.AddressError("Invalid subnet mask.");D=D.replace(s.RE_SUBNET_STRING,"")}else if(/\//.test(D))throw new Gu.AddressError("Invalid subnet mask.");let $=s.RE_ZONE_STRING.exec(D);if($)this.zone=$[0],D=D.replace(s.RE_ZONE_STRING,"");this.addressMinusSuffix=D,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(D){try{return new qD(D),!0}catch(u){return!1}}static fromBigInteger(D){let u=D.toString(16).padStart(32,"0"),F=[],$;for($=0;$<s.GROUPS;$++)F.push(u.slice($*4,($+1)*4));return new qD(F.join(":"))}static fromURL(D){let u,F=null,$;if(D.indexOf("[")!==-1&&D.indexOf("]:")!==-1){if($=s.RE_URL_WITH_PORT.exec(D),$===null)return{error:"failed to parse address with port",address:null,port:null};u=$[1],F=$[2]}else if(D.indexOf("/")!==-1){if(D=D.replace(/^[a-z0-9]+:\/\//,""),$=s.RE_URL.exec(D),$===null)return{error:"failed to parse address from URL",address:null,port:null};u=$[1]}else u=D;if(F){if(F=parseInt(F,10),F<0||F>65536)F=null}else F=null;return{address:new qD(u),port:F}}static fromAddress4(D){let u=new ju.Address4(D),F=s.BITS-(L1.BITS-u.subnetMask);return new qD(`::ffff:${u.correctForm()}/${F}`)}static fromArpa(D){let u=D.replace(/(\.ip6\.arpa)?\.$/,""),F=7;if(u.length!==63)throw new Gu.AddressError("Invalid 'ip6.arpa' form.");let $=u.split(".").reverse();for(let E=F;E>0;E--){let w=E*4;$.splice(w,0,":")}return u=$.join(""),new qD(u)}microsoftTranscription(){return kD.sprintf("%s.ipv6-literal.net",this.correctForm().replace(/:/g,"-"))}mask(D=this.subnetMask){return this.getBitsBase2(0,D)}possibleSubnets(D=128){let u=s.BITS-this.subnetMask,F=Math.abs(D-s.BITS),$=u-F;if($<0)return"0";return iZ(new RD.BigInteger("2",10).pow($).toString(10))}_startAddress(){return new RD.BigInteger(this.mask()+"0".repeat(s.BITS-this.subnetMask),2)}startAddress(){return qD.fromBigInteger(this._startAddress())}startAddressExclusive(){let D=new RD.BigInteger("1");return qD.fromBigInteger(this._startAddress().add(D))}_endAddress(){return new RD.BigInteger(this.mask()+"1".repeat(s.BITS-this.subnetMask),2)}endAddress(){return qD.fromBigInteger(this._endAddress())}endAddressExclusive(){let D=new RD.BigInteger("1");return qD.fromBigInteger(this._endAddress().subtract(D))}getScope(){let D=s.SCOPES[this.getBits(12,16).intValue()];if(this.getType()==="Global unicast"&&D!=="Link local")D="Global";return D||"Unknown"}getType(){for(let D of Object.keys(s.TYPES))if(this.isInSubnet(new qD(D)))return s.TYPES[D];return"Global unicast"}getBits(D,u){return new RD.BigInteger(this.getBitsBase2(D,u),2)}getBitsBase2(D,u){return this.binaryZeroPad().slice(D,u)}getBitsBase16(D,u){let F=u-D;if(F%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(D,u).toString(16).padStart(F/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,s.BITS)}reverseForm(D){if(!D)D={};let u=Math.floor(this.subnetMask/4),F=this.canonicalForm().replace(/:/g,"").split("").slice(0,u).reverse().join(".");if(u>0){if(D.omitSuffix)return F;return kD.sprintf("%s.ip6.arpa.",F)}if(D.omitSuffix)return"";return"ip6.arpa."}correctForm(){let D,u=[],F=0,$=[];for(D=0;D<this.parsedAddress.length;D++){let C=parseInt(this.parsedAddress[D],16);if(C===0)F++;if(C!==0&&F>0){if(F>1)$.push([D-F,D-1]);F=0}}if(F>1)$.push([this.parsedAddress.length-F,this.parsedAddress.length-1]);let E=$.map((C)=>C[1]-C[0]+1);if($.length>0){let C=E.indexOf(Math.max(...E));u=sZ(this.parsedAddress,$[C])}else u=this.parsedAddress;for(D=0;D<u.length;D++)if(u[D]!=="compact")u[D]=parseInt(u[D],16).toString(16);let w=u.join(":");return w=w.replace(/^compact$/,"::"),w=w.replace(/^compact|compact$/,":"),w=w.replace(/compact/,""),w}binaryZeroPad(){return this.bigInteger().toString(2).padStart(s.BITS,"0")}parse4in6(D){let u=D.split(":"),$=u.slice(-1)[0].match(L1.RE_ADDRESS);if($){this.parsedAddress4=$[0],this.address4=new ju.Address4(this.parsedAddress4);for(let E=0;E<this.address4.groups;E++)if(/^0[0-9]+/.test(this.address4.parsedAddress[E]))throw new Gu.AddressError("IPv4 addresses can't have leading zeroes.",D.replace(L1.RE_ADDRESS,this.address4.parsedAddress.map(tZ).join(".")));this.v4=!0,u[u.length-1]=this.address4.toGroup6(),D=u.join(":")}return D}parse(D){D=this.parse4in6(D);let u=D.match(s.RE_BAD_CHARACTERS);if(u)throw new Gu.AddressError(kD.sprintf("Bad character%s detected in address: %s",u.length>1?"s":"",u.join("")),D.replace(s.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let F=D.match(s.RE_BAD_ADDRESS);if(F)throw new Gu.AddressError(kD.sprintf("Address failed regex: %s",F.join("")),D.replace(s.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let $=[],E=D.split("::");if(E.length===2){let w=E[0].split(":"),C=E[1].split(":");if(w.length===1&&w[0]==="")w=[];if(C.length===1&&C[0]==="")C=[];let Z=this.groups-(w.length+C.length);if(!Z)throw new Gu.AddressError("Error parsing groups");this.elidedGroups=Z,this.elisionBegin=w.length,this.elisionEnd=w.length+this.elidedGroups,$=$.concat(w);for(let M=0;M<Z;M++)$.push("0");$=$.concat(C)}else if(E.length===1)$=D.split(":"),this.elidedGroups=0;else throw new Gu.AddressError("Too many :: groups found");if($=$.map((w)=>kD.sprintf("%x",parseInt(w,16))),$.length!==this.groups)throw new Gu.AddressError("Incorrect number of groups found");return $}canonicalForm(){return this.parsedAddress.map(Q4).join(":")}decimal(){return this.parsedAddress.map((D)=>kD.sprintf("%05d",parseInt(D,16))).join(":")}bigInteger(){return new RD.BigInteger(this.parsedAddress.map(Q4).join(""),16)}to4(){let D=this.binaryZeroPad().split("");return ju.Address4.fromHex(new RD.BigInteger(D.slice(96,128).join(""),2).toString(16))}to4in6(){let D=this.to4(),F=new qD(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),$="";if(!/:$/.test(F))$=":";return F+$+D.address}inspectTeredo(){let D=this.getBitsBase16(0,32),u=this.getBits(80,96).xor(new RD.BigInteger("ffff",16)).toString(),F=ju.Address4.fromHex(this.getBitsBase16(32,64)),$=ju.Address4.fromHex(this.getBits(96,128).xor(new RD.BigInteger("ffffffff",16)).toString(16)),E=this.getBits(64,80),w=this.getBitsBase2(64,80),C=E.testBit(15),Z=E.testBit(14),M=E.testBit(8),W=E.testBit(9),X=new RD.BigInteger(w.slice(2,6)+w.slice(8,16),2).toString(10);return{prefix:kD.sprintf("%s:%s",D.slice(0,4),D.slice(4,8)),server4:F.address,client4:$.address,flags:w,coneNat:C,microsoft:{reserved:Z,universalLocal:W,groupIndividual:M,nonce:X},udpPort:u}}inspect6to4(){let D=this.getBitsBase16(0,16),u=ju.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:kD.sprintf("%s",D.slice(0,4)),gateway:u.address}}to6to4(){if(!this.is4())return null;let D=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new qD(D)}toByteArray(){let D=this.bigInteger().toByteArray();if(D.length===17&&D[0]===0)return D.slice(1);return D}toUnsignedByteArray(){return this.toByteArray().map(A4)}static fromByteArray(D){return this.fromUnsignedByteArray(D.map(A4))}static fromUnsignedByteArray(D){let u=new RD.BigInteger("256",10),F=new RD.BigInteger("0",10),$=new RD.BigInteger("1",10);for(let E=D.length-1;E>=0;E--)F=F.add($.multiply(new RD.BigInteger(D[E].toString(10),10))),$=$.multiply(u);return qD.fromBigInteger(F)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){if(this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000")return!0;return!1}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new qD("2001::/32"))}is6to4(){return this.isInSubnet(new qD("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(D){if(D===void 0)D="";else D=kD.sprintf(":%s",D);return kD.sprintf("http://[%s]%s/",this.correctForm(),D)}link(D){if(!D)D={};if(D.className===void 0)D.className="";if(D.prefix===void 0)D.prefix="/#address=";if(D.v4===void 0)D.v4=!1;let u=this.correctForm;if(D.v4)u=this.to4in6;if(D.className)return kD.sprintf('<a href="%1$s%2$s" class="%3$s">%2$s</a>',D.prefix,u.call(this),D.className);return kD.sprintf('<a href="%1$s%2$s">%2$s</a>',D.prefix,u.call(this))}group(){if(this.elidedGroups===0)return T1.simpleGroup(this.address).join(":");R8(typeof this.elidedGroups==="number"),R8(typeof this.elisionBegin==="number");let D=[],[u,F]=this.address.split("::");if(u.length)D.push(...T1.simpleGroup(u));else D.push("");let $=["hover-group"];for(let E=this.elisionBegin;E<this.elisionBegin+this.elidedGroups;E++)$.push(kD.sprintf("group-%d",E));if(D.push(kD.sprintf('<span class="%s"></span>',$.join(" "))),F.length)D.push(...T1.simpleGroup(F,this.elisionEnd));else D.push("");if(this.is4())R8(this.address4 instanceof ju.Address4),D.pop(),D.push(this.address4.groupForV6());return D.join(":")}regularExpressionString(D=!1){let u=[],F=new qD(this.correctForm());if(F.elidedGroups===0)u.push(Ru.simpleRegularExpression(F.parsedAddress));else if(F.elidedGroups===s.GROUPS)u.push(Ru.possibleElisions(s.GROUPS));else{let $=F.address.split("::");if($[0].length)u.push(Ru.simpleRegularExpression($[0].split(":")));if(R8(typeof F.elidedGroups==="number"),u.push(Ru.possibleElisions(F.elidedGroups,$[0].length!==0,$[1].length!==0)),$[1].length)u.push(Ru.simpleRegularExpression($[1].split(":")));u=[u.join(":")]}if(!D)u=["(?=^|",Ru.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...u,")(?=[^\\w\\:]|",Ru.ADDRESS_BOUNDARY,"|$)"];return u.join("")}regularExpression(D=!1){return new RegExp(this.regularExpressionString(D),"i")}}Mu.Address6=qD});var N1=b((ID)=>{var aZ=ID&&ID.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),oZ=ID&&ID.__setModuleDefault||(Object.create?function(D,u){Object.defineProperty(D,"default",{enumerable:!0,value:u})}:function(D,u){D.default=u}),eZ=ID&&ID.__importStar||function(D){if(D&&D.__esModule)return D;var u={};if(D!=null){for(var F in D)if(F!=="default"&&Object.prototype.hasOwnProperty.call(D,F))aZ(u,D,F)}return oZ(u,D),u};Object.defineProperty(ID,"__esModule",{value:!0});ID.v6=ID.AddressError=ID.Address6=ID.Address4=void 0;var DK=U1();Object.defineProperty(ID,"Address4",{enumerable:!0,get:function(){return DK.Address4}});var uK=z4();Object.defineProperty(ID,"Address6",{enumerable:!0,get:function(){return uK.Address6}});var FK=S8();Object.defineProperty(ID,"AddressError",{enumerable:!0,get:function(){return FK.AddressError}});var CK=eZ(V1());ID.v6={helpers:CK}});var T4=b((V4)=>{Object.defineProperty(V4,"__esModule",{value:!0});V4.ipToBuffer=V4.int32ToIpv4=V4.ipv4ToInt32=V4.validateSocksClientChainOptions=V4.validateSocksClientOptions=void 0;var gD=z1(),HD=A1(),$K=import.meta.require("stream"),I1=N1(),G4=import.meta.require("net");function EK(D,u=["connect","bind","associate"]){if(!HD.SocksCommand[D.command])throw new gD.SocksClientError(HD.ERRORS.InvalidSocksCommand,D);if(u.indexOf(D.command)===-1)throw new gD.SocksClientError(HD.ERRORS.InvalidSocksCommandForOperation,D);if(!H4(D.destination))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!U4(D.proxy))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsProxy,D);if(q4(D.proxy,D),D.timeout&&!O4(D.timeout))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsTimeout,D);if(D.existing_socket&&!(D.existing_socket instanceof $K.Duplex))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsExistingSocket,D)}V4.validateSocksClientOptions=EK;function wK(D){if(D.command!=="connect")throw new gD.SocksClientError(HD.ERRORS.InvalidSocksCommandChain,D);if(!H4(D.destination))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsDestination,D);if(!(D.proxies&&Array.isArray(D.proxies)&&D.proxies.length>=2))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsProxiesLength,D);if(D.proxies.forEach((u)=>{if(!U4(u))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsProxy,D);q4(u,D)}),D.timeout&&!O4(D.timeout))throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsTimeout,D)}V4.validateSocksClientChainOptions=wK;function q4(D,u){if(D.custom_auth_method!==void 0){if(D.custom_auth_method<HD.SOCKS5_CUSTOM_AUTH_START||D.custom_auth_method>HD.SOCKS5_CUSTOM_AUTH_END)throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthRange,u);if(D.custom_auth_request_handler===void 0||typeof D.custom_auth_request_handler!=="function")throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_size===void 0)throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u);if(D.custom_auth_response_handler===void 0||typeof D.custom_auth_response_handler!=="function")throw new gD.SocksClientError(HD.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,u)}}function H4(D){return D&&typeof D.host==="string"&&typeof D.port==="number"&&D.port>=0&&D.port<=65535}function U4(D){return D&&(typeof D.host==="string"||typeof D.ipaddress==="string")&&typeof D.port==="number"&&D.port>=0&&D.port<=65535&&(D.type===4||D.type===5)}function O4(D){return typeof D==="number"&&D>0}function BK(D){return new I1.Address4(D).toArray().reduce((F,$)=>(F<<8)+$,0)}V4.ipv4ToInt32=BK;function YK(D){let u=D>>>24&255,F=D>>>16&255,$=D>>>8&255,E=D&255;return[u,F,$,E].join(".")}V4.int32ToIpv4=YK;function JK(D){if(G4.isIPv4(D)){let u=new I1.Address4(D);return Buffer.from(u.toArray())}else if(G4.isIPv6(D)){let u=new I1.Address6(D);return Buffer.from(u.canonicalForm().split(":").map((F)=>F.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}V4.ipToBuffer=JK});var S4=b((I4)=>{Object.defineProperty(I4,"__esModule",{value:!0});I4.ReceiveBuffer=void 0;class N4{constructor(D=4096){this.buffer=Buffer.allocUnsafe(D),this.offset=0,this.originalSize=D}get length(){return this.offset}append(D){if(!Buffer.isBuffer(D))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+D.length>=this.buffer.length){let u=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+D.length)),u.copy(this.buffer)}return D.copy(this.buffer,this.offset),this.offset+=D.length}peek(D){if(D>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,D)}get(D){if(D>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let u=Buffer.allocUnsafe(D);return this.buffer.slice(0,D).copy(u),this.buffer.copyWithin(0,D,D+this.offset-D),this.offset-=D,u}}I4.ReceiveBuffer=N4});var h4=b((Tu)=>{var su=Tu&&Tu.__awaiter||function(D,u,F,$){function E(w){return w instanceof F?w:new F(function(C){C(w)})}return new(F||(F=Promise))(function(w,C){function Z(X){try{W($.next(X))}catch(q){C(q)}}function M(X){try{W($.throw(X))}catch(q){C(q)}}function W(X){X.done?w(X.value):E(X.value).then(Z,M)}W(($=$.apply(D,u||[])).next())})};Object.defineProperty(Tu,"__esModule",{value:!0});Tu.SocksClientError=Tu.SocksClient=void 0;var WK=import.meta.require("events"),au=import.meta.require("net"),vD=b9(),H=A1(),rD=T4(),QK=S4(),S1=z1();Object.defineProperty(Tu,"SocksClientError",{enumerable:!0,get:function(){return S1.SocksClientError}});var x1=N1();class g8 extends WK.EventEmitter{constructor(D){super();this.options=Object.assign({},D),rD.validateSocksClientOptions(D),this.setState(H.SocksClientState.Created)}static createConnection(D,u){return new Promise((F,$)=>{try{rD.validateSocksClientOptions(D,["connect"])}catch(w){if(typeof u==="function")return u(w),F(w);else return $(w)}let E=new g8(D);E.connect(D.existing_socket),E.once("established",(w)=>{if(E.removeAllListeners(),typeof u==="function")u(null,w),F(w);else F(w)}),E.once("error",(w)=>{if(E.removeAllListeners(),typeof u==="function")u(w),F(w);else $(w)})})}static createConnectionChain(D,u){return new Promise((F,$)=>su(this,void 0,void 0,function*(){try{rD.validateSocksClientChainOptions(D)}catch(E){if(typeof u==="function")return u(E),F(E);else return $(E)}if(D.randomizeChain)S1.shuffleArray(D.proxies);try{let E;for(let w=0;w<D.proxies.length;w++){let C=D.proxies[w],Z=w===D.proxies.length-1?D.destination:{host:D.proxies[w+1].host||D.proxies[w+1].ipaddress,port:D.proxies[w+1].port},M=yield g8.createConnection({command:"connect",proxy:C,destination:Z,existing_socket:E});E=E||M.socket}if(typeof u==="function")u(null,{socket:E}),F({socket:E});else F({socket:E})}catch(E){if(typeof u==="function")u(E),F(E);else $(E)}}))}static createUDPFrame(D){let u=new vD.SmartBuffer;if(u.writeUInt16BE(0),u.writeUInt8(D.frameNumber||0),au.isIPv4(D.remoteHost.host))u.writeUInt8(H.Socks5HostType.IPv4),u.writeUInt32BE(rD.ipv4ToInt32(D.remoteHost.host));else if(au.isIPv6(D.remoteHost.host))u.writeUInt8(H.Socks5HostType.IPv6),u.writeBuffer(rD.ipToBuffer(D.remoteHost.host));else u.writeUInt8(H.Socks5HostType.Hostname),u.writeUInt8(Buffer.byteLength(D.remoteHost.host)),u.writeString(D.remoteHost.host);return u.writeUInt16BE(D.remoteHost.port),u.writeBuffer(D.data),u.toBuffer()}static parseUDPFrame(D){let u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F=u.readUInt8(),$=u.readUInt8(),E;if($===H.Socks5HostType.IPv4)E=rD.int32ToIpv4(u.readUInt32BE());else if($===H.Socks5HostType.IPv6)E=x1.Address6.fromByteArray(Array.from(u.readBuffer(16))).canonicalForm();else E=u.readString(u.readUInt8());let w=u.readUInt16BE();return{frameNumber:F,remoteHost:{host:E,port:w},data:u.readBuffer()}}setState(D){if(this.state!==H.SocksClientState.Error)this.state=D}connect(D){this.onDataReceived=(F)=>this.onDataReceivedHandler(F),this.onClose=()=>this.onCloseHandler(),this.onError=(F)=>this.onErrorHandler(F),this.onConnect=()=>this.onConnectHandler();let u=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||H.DEFAULT_TIMEOUT);if(u.unref&&typeof u.unref==="function")u.unref();if(D)this.socket=D;else this.socket=new au.Socket;if(this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(H.SocksClientState.Connecting),this.receiveBuffer=new QK.ReceiveBuffer,D)this.socket.emit("connect");else if(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null)this.socket.setNoDelay(!!this.options.set_tcp_nodelay);this.prependOnceListener("established",(F)=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let $=this.receiveBuffer.get(this.receiveBuffer.length);F.socket.emit("data",$)}F.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){if(this.state!==H.SocksClientState.Established&&this.state!==H.SocksClientState.BoundWaitingForConnection)this.closeSocket(H.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){if(this.setState(H.SocksClientState.Connected),this.options.proxy.type===4)this.sendSocks4InitialHandshake();else this.sendSocks5InitialHandshake();this.setState(H.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(D){this.receiveBuffer.append(D),this.processData()}processData(){while(this.state!==H.SocksClientState.Established&&this.state!==H.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize)if(this.state===H.SocksClientState.SentInitialHandshake)if(this.options.proxy.type===4)this.handleSocks4FinalHandshakeResponse();else this.handleInitialSocks5HandshakeResponse();else if(this.state===H.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===H.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===H.SocksClientState.BoundWaitingForConnection)if(this.options.proxy.type===4)this.handleSocks4IncomingConnectionResponse();else this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(H.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(H.ERRORS.SocketClosed)}onErrorHandler(D){this.closeSocket(D.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(D){if(this.state!==H.SocksClientState.Error)this.setState(H.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new S1.SocksClientError(D,this.options))}sendSocks4InitialHandshake(){let D=this.options.proxy.userId||"",u=new vD.SmartBuffer;if(u.writeUInt8(4),u.writeUInt8(H.SocksCommand[this.options.command]),u.writeUInt16BE(this.options.destination.port),au.isIPv4(this.options.destination.host))u.writeBuffer(rD.ipToBuffer(this.options.destination.host)),u.writeStringNT(D);else u.writeUInt8(0),u.writeUInt8(0),u.writeUInt8(0),u.writeUInt8(1),u.writeStringNT(D),u.writeStringNT(this.options.destination.host);this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(u.toBuffer())}handleSocks4FinalHandshakeResponse(){let D=this.receiveBuffer.get(8);if(D[1]!==H.Socks4Response.Granted)this.closeSocket(`${H.ERRORS.Socks4ProxyRejectedConnection} - (${H.Socks4Response[D[1]]})`);else if(H.SocksCommand[this.options.command]===H.SocksCommand.bind){let u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F={port:u.readUInt16BE(),host:rD.int32ToIpv4(u.readUInt32BE())};if(F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress;this.setState(H.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:F,socket:this.socket})}else this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let D=this.receiveBuffer.get(8);if(D[1]!==H.Socks4Response.Granted)this.closeSocket(`${H.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${H.Socks4Response[D[1]]})`);else{let u=vD.SmartBuffer.fromBuffer(D);u.readOffset=2;let F={port:u.readUInt16BE(),host:rD.int32ToIpv4(u.readUInt32BE())};this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}sendSocks5InitialHandshake(){let D=new vD.SmartBuffer,u=[H.Socks5Auth.NoAuth];if(this.options.proxy.userId||this.options.proxy.password)u.push(H.Socks5Auth.UserPass);if(this.options.proxy.custom_auth_method!==void 0)u.push(this.options.proxy.custom_auth_method);D.writeUInt8(5),D.writeUInt8(u.length);for(let F of u)D.writeUInt8(F);this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(D.toBuffer()),this.setState(H.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let D=this.receiveBuffer.get(2);if(D[0]!==5)this.closeSocket(H.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion);else if(D[1]===H.SOCKS5_NO_ACCEPTABLE_AUTH)this.closeSocket(H.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType);else if(D[1]===H.Socks5Auth.NoAuth)this.socks5ChosenAuthType=H.Socks5Auth.NoAuth,this.sendSocks5CommandRequest();else if(D[1]===H.Socks5Auth.UserPass)this.socks5ChosenAuthType=H.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication();else if(D[1]===this.options.proxy.custom_auth_method)this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication();else this.closeSocket(H.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let D=this.options.proxy.userId||"",u=this.options.proxy.password||"",F=new vD.SmartBuffer;F.writeUInt8(1),F.writeUInt8(Buffer.byteLength(D)),F.writeString(D),F.writeUInt8(Buffer.byteLength(u)),F.writeString(u),this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(F.toBuffer()),this.setState(H.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return su(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(H.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(D){return su(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(D)})}handleSocks5AuthenticationNoAuthHandshakeResponse(D){return su(this,void 0,void 0,function*(){return D[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(D){return su(this,void 0,void 0,function*(){return D[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return su(this,void 0,void 0,function*(){this.setState(H.SocksClientState.ReceivedAuthenticationResponse);let D=!1;if(this.socks5ChosenAuthType===H.Socks5Auth.NoAuth)D=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===H.Socks5Auth.UserPass)D=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2));else if(this.socks5ChosenAuthType===this.options.proxy.custom_auth_method)D=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size));if(!D)this.closeSocket(H.ERRORS.Socks5AuthenticationFailed);else this.sendSocks5CommandRequest()})}sendSocks5CommandRequest(){let D=new vD.SmartBuffer;if(D.writeUInt8(5),D.writeUInt8(H.SocksCommand[this.options.command]),D.writeUInt8(0),au.isIPv4(this.options.destination.host))D.writeUInt8(H.Socks5HostType.IPv4),D.writeBuffer(rD.ipToBuffer(this.options.destination.host));else if(au.isIPv6(this.options.destination.host))D.writeUInt8(H.Socks5HostType.IPv6),D.writeBuffer(rD.ipToBuffer(this.options.destination.host));else D.writeUInt8(H.Socks5HostType.Hostname),D.writeUInt8(this.options.destination.host.length),D.writeString(this.options.destination.host);D.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(D.toBuffer()),this.setState(H.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==H.Socks5Response.Granted)this.closeSocket(`${H.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${H.Socks5Response[D[1]]}`);else{let u=D[3],F,$;if(u===H.Socks5HostType.IPv4){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}if($=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:rD.int32ToIpv4($.readUInt32BE()),port:$.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===H.Socks5HostType.Hostname){let E=D[4],w=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(E);if(this.receiveBuffer.length<w){this.nextRequiredPacketBufferSize=w;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(w).slice(5)),F={host:$.readString(E),port:$.readUInt16BE()}}else if(u===H.Socks5HostType.IPv6){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:x1.Address6.fromByteArray(Array.from($.readBuffer(16))).canonicalForm(),port:$.readUInt16BE()}}if(this.setState(H.SocksClientState.ReceivedFinalResponse),H.SocksCommand[this.options.command]===H.SocksCommand.connect)this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket});else if(H.SocksCommand[this.options.command]===H.SocksCommand.bind)this.setState(H.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:F,socket:this.socket});else if(H.SocksCommand[this.options.command]===H.SocksCommand.associate)this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}handleSocks5IncomingConnectionResponse(){let D=this.receiveBuffer.peek(5);if(D[0]!==5||D[1]!==H.Socks5Response.Granted)this.closeSocket(`${H.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${H.Socks5Response[D[1]]}`);else{let u=D[3],F,$;if(u===H.Socks5HostType.IPv4){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}if($=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:rD.int32ToIpv4($.readUInt32BE()),port:$.readUInt16BE()},F.host==="0.0.0.0")F.host=this.options.proxy.ipaddress}else if(u===H.Socks5HostType.Hostname){let E=D[4],w=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(E);if(this.receiveBuffer.length<w){this.nextRequiredPacketBufferSize=w;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(w).slice(5)),F={host:$.readString(E),port:$.readUInt16BE()}}else if(u===H.Socks5HostType.IPv6){let E=H.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<E){this.nextRequiredPacketBufferSize=E;return}$=vD.SmartBuffer.fromBuffer(this.receiveBuffer.get(E).slice(4)),F={host:x1.Address6.fromByteArray(Array.from($.readBuffer(16))).canonicalForm(),port:$.readUInt16BE()}}this.setState(H.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:F,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}}Tu.SocksClient=g8});var h1=b((ku)=>{var AK=ku&&ku.__createBinding||(Object.create?function(D,u,F,$){if($===void 0)$=F;var E=Object.getOwnPropertyDescriptor(u,F);if(!E||("get"in E?!u.__esModule:E.writable||E.configurable))E={enumerable:!0,get:function(){return u[F]}};Object.defineProperty(D,$,E)}:function(D,u,F,$){if($===void 0)$=F;D[$]=u[F]}),zK=ku&&ku.__exportStar||function(D,u){for(var F in D)if(F!=="default"&&!Object.prototype.hasOwnProperty.call(u,F))AK(u,D,F)};Object.defineProperty(ku,"__esModule",{value:!0});zK(h4(),ku)});import GK from"net";import x8 from"process";import{buddyOptions as gJ,stripAnsi as U0}from"@stacksjs/cli";import{access as uY,appendFile as cC,mkdir as fC}from"fs/promises";import{dirname as FY}from"path";import CY from"process";import{italic as vC,stripAnsi as $Y}from"@stacksjs/cli";var BD={};c1(BD,{ui:()=>oB,team:()=>aB,storage:()=>sB,services:()=>tB,security:()=>lB,searchEngine:()=>iB,saas:()=>pB,queue:()=>dB,ports:()=>rB,payment:()=>nB,overrides:()=>r2,notification:()=>fB,logging:()=>cB,localUrl:()=>DB,library:()=>vB,hashing:()=>mB,git:()=>PB,errors:()=>_B,email:()=>bB,docs:()=>gB,dns:()=>kB,determineAppEnv:()=>eB,defineUi:()=>TB,defineStorage:()=>LB,defineStacksConfig:()=>uB,defineSms:()=>VB,defineServices:()=>OB,defineSecurity:()=>UB,defineSearchEngine:()=>HB,defineQueue:()=>qB,definePayment:()=>GB,defineNotification:()=>zB,defineModel:()=>NB,defineLibrary:()=>AB,defineJob:()=>BB,defineHashing:()=>QB,defineGit:()=>WB,defineEvents:()=>IB,defineEmailConfig:()=>MB,defineEmail:()=>XB,defineDns:()=>KB,defineDependencies:()=>ZB,defineDatabase:()=>JB,defineCronJob:()=>YB,defineCli:()=>wB,defineChat:()=>EB,defineCdn:()=>$B,defineCache:()=>CB,defineApp:()=>FB,defaults:()=>r8,database:()=>RB,config:()=>t,cloud:()=>yB,cli:()=>jB,cache:()=>hB,app:()=>hu,analytics:()=>SB,ai:()=>xB});import{basename as IK,delimiter as xK,dirname as r1,extname as SK,isAbsolute as hK,join as yK,normalize as jK,parse as RK,relative as p$,resolve as f1,sep as kK,toNamespacedPath as gK}from"path";import n1 from"process";import{runCommandSync as PK}from"@stacksjs/cli";function d1(D){return x0(`database/${D||""}`)}function i$(D){return x0(`app/${D||""}`)}function l1(D){return i$(`Commands/${D||""}`)}function n8(D){return S0(`logs/${D||""}`)}function x0(D="",u){let F=n1.cwd();while(F.includes("storage"))F=f1(F,"..");let $=f1(F,D);if(u?.relative)return p$(n1.cwd(),$);return $}function S0(D){return x0(`storage/${D||""}`)}var s$={ai:{deploy:!1,models:["amazon.titan-embed-text-v1","amazon.titan-text-express-v1","amazon.titan-embed-image-v1","amazon.titan-image-generator-v1","anthropic.claude-v1","anthropic.claude-v2","anthropic.claude-v2:1","anthropic.claude-instant-v1","meta.llama2-13b-chat-v1","meta.llama2-70b-chat-v1"]},analytics:{driver:void 0},app:{name:"Stacks",description:"A Stacks application.",env:"local",url:"stacks.localhost",debug:!0,key:"",timezone:"UTC",locale:"en",fallbackLocale:"en",cipher:"AES-256-CBC",docMode:!1,redirectUrls:[],maintenanceMode:!1},cli:{name:"My Custom CLI",command:"my-custom-cli",description:"Stacks is a full-stack framework for TypeScript.",source:l1(),deploy:!1},cache:{driver:"redis",prefix:"stx",ttl:3600,drivers:{redis:{connection:"default",host:"localhost",port:6379,username:"",password:""}}},cloud:{type:"serverless",driver:"aws",storage:{},environments:["production","staging","development"],firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0},cdn:{allowedMethods:"GET_HEAD",cachedMethods:"GET_HEAD",minTtl:0,defaultTtl:86400,maxTtl:31536000,compress:!0,priceClass:"PriceClass_All",originShieldRegion:"us-east-1",cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:2}},fileSystem:!1},database:{default:"sqlite",connections:{sqlite:{database:d1("stacks.sqlite"),prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"},dns:{driver:"aws",a:[],aaaa:[],cname:[],mx:[],txt:[]},docs:{lang:"en-US",title:"Stacks",description:"Rapid application, cloud & library framework.",lastUpdated:!0,deploy:!1,themeConfig:{editLink:{pattern:"https://github.com/stacksjs/stacks/edit/main/docs/docs/:path",text:"Edit this page on GitHub"},footer:{message:"Released under the MIT License.",copyright:"Copyright \xA9 2024-present Stacks.js, Inc."}}},email:{from:{name:"Stacks",address:"no-reply@stacksjs.org"},mailboxes:[],server:{scan:!0}},errors:{messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}},git:{hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]},hashing:{driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,time:1}},library:{name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}},logging:{logsPath:"storage/logs/stacks.log",deploymentsPath:"storage/logs/deployments.log"},notification:{default:"email"},payment:{driver:"stripe"},ports:{frontend:3000,backend:3001,admin:3002,library:3003,desktop:3004,email:3005,docs:3006,inspect:3007,api:3008,systemTray:3009,database:3010},queue:{default:"sync",connections:{sync:{driver:"sync"},database:{driver:"database",table:"jobs",queue:"default",retry_after:90},redis:{driver:"redis",connection:"default",queue:"default",retry_after:90},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}},saas:{plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]},searchEngine:{driver:"opensearch"},security:{firewall:{enabled:!0,countryCodes:[],ipAddresses:[],queryString:[],httpHeaders:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0}},services:{aws:{accountId:"",appId:"",apiKey:"",region:"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}},storage:{driver:"s3"},team:{name:"Stacks",members:{"Chris Breuer":"chris@stacksjs.org"}},ui:{shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}}}},r8=s$;var p1={default:"meta.llama2-70b-chat-v1",models:["amazon.titan-text-express-v1","amazon.titan-text-lite-v1","meta.llama2-70b-chat-v1"],deploy:!0};var i1={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};import sw from"process";var a$=new Set([".","!","?"]),lK=new Set([...a$,":",'"',"\'","\u201D"]);var d8=[],l8=[],s1={},$0={},E0={};function a1(D){return typeof D==="string"?new RegExp(`^${D}\$`,"i"):D}function h0(D,u){if(D===u)return u;if(D===D.toLowerCase())return u.toLowerCase();if(D===D.toUpperCase())return u.toUpperCase();if(D[0]===D[0].toUpperCase())return u.charAt(0).toUpperCase()+u.slice(1).toLowerCase();return u.toLowerCase()}function o$(D,...u){return D.replace(/\$(\d{1,2})/g,(F,$)=>u[Number($)]||"")}function e$(D,u){return D.replace(u[0],(...F)=>{let $=o$(u[1],...F);if(F[0]==="")return h0(D[F[F.length-2]-1],$);return h0(F[0],$)})}function o1(D,u,F){if(!D.length||s1[D])return u;for(let $=F.length-1;$>=0;$--){let E=F[$];if(E[0].test(u))return e$(u,E)}return u}function e1(D,u,F){return($)=>{let E=$.toLowerCase();if(u[E])return h0($,E);if(D[E])return h0($,D[E]);return o1(E,$,F)}}function D3(D,u,F){return($)=>{let E=$.toLowerCase();if(u[E])return!0;if(D[E])return!1;return o1(E,E,F)===E}}var ND=(D,u={})=>{let{count:F=2,inclusive:$=!1}=u;if(typeof D!=="string")throw new TypeError("Word must be a string");let E=F===1?ND.singular(D):ND.plural(D);return $?`${F} ${E}`:E};ND.plural=e1(E0,$0,d8);ND.isPlural=D3(E0,$0,d8);ND.singular=e1($0,E0,l8);ND.isSingular=D3($0,E0,l8);ND.addPluralRule=(D,u)=>{d8.push([a1(D),u])};ND.addSingularRule=(D,u)=>{l8.push([a1(D),u])};ND.addUncountableRule=(D)=>{if(typeof D==="string"){s1[D.toLowerCase()]=!0;return}ND.addPluralRule(D,"$0"),ND.addSingularRule(D,"$0")};ND.addIrregularRule=(D,u)=>{let F=u.toLowerCase(),$=D.toLowerCase();E0[$]=F,$0[F]=$};[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"],["canvas","canvases"]].forEach(([D,u])=>ND.addIrregularRule(D,u));[[/s?$/i,"s"],[/[^\x20-\x7F]$/,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(([D,u])=>ND.addPluralRule(D,u));[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|\W|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(([D,u])=>ND.addSingularRule(D,u));["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[e\u00E9]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(ND.addUncountableRule);var oK=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xA2":"cent","\xA3":"pound","\xA4":"currency","\xA5":"yen","\xA9":"(c)","\xAA":"a","\xAE":"(r)","\xBA":"o","\xC0":"A","\xC1":"A","\xC2":"A","\xC3":"A","\xC4":"A","\xC5":"A","\xC6":"AE","\xC7":"C","\xC8":"E","\xC9":"E","\xCA":"E","\xCB":"E","\xCC":"I","\xCD":"I","\xCE":"I","\xCF":"I","\xD0":"D","\xD1":"N","\xD2":"O","\xD3":"O","\xD4":"O","\xD5":"O","\xD6":"O","\xD8":"O","\xD9":"U","\xDA":"U","\xDB":"U","\xDC":"U","\xDD":"Y","\xDE":"TH","\xDF":"ss","\xE0":"a","\xE1":"a","\xE2":"a","\xE3":"a","\xE4":"a","\xE5":"a","\xE6":"ae","\xE7":"c","\xE8":"e","\xE9":"e","\xEA":"e","\xEB":"e","\xEC":"i","\xED":"i","\xEE":"i","\xEF":"i","\xF0":"d","\xF1":"n","\xF2":"o","\xF3":"o","\xF4":"o","\xF5":"o","\xF6":"o","\xF8":"o","\xF9":"u","\xFA":"u","\xFB":"u","\xFC":"u","\xFD":"y","\xFE":"th","\xFF":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010C":"C","\u010D":"c","\u010E":"D","\u010F":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011A":"E","\u011B":"e","\u011E":"G","\u011F":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012A":"i","\u012B":"i","\u012E":"I","\u012F":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013B":"L","\u013C":"l","\u013D":"L","\u013E":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u014C":"O","\u014D":"o","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015A":"S","\u015B":"s","\u015E":"S","\u015F":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016A":"u","\u016B":"u","\u016E":"U","\u016F":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017A":"z","\u017B":"Z","\u017C":"z","\u017D":"Z","\u017E":"z","\u018F":"E","\u0192":"f","\u01A0":"O","\u01A1":"o","\u01AF":"U","\u01B0":"u","\u01C8":"LJ","\u01C9":"lj","\u01CB":"NJ","\u01CC":"nj","\u0218":"S","\u0219":"s","\u021A":"T","\u021B":"t","\u0259":"e","\u02DA":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038A":"I","\u038C":"O","\u038E":"Y","\u038F":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039A":"K","\u039B":"L","\u039C":"M","\u039D":"N","\u039E":"3","\u039F":"O","\u03A0":"P","\u03A1":"R","\u03A3":"S","\u03A4":"T","\u03A5":"Y","\u03A6":"F","\u03A7":"X","\u03A8":"PS","\u03A9":"W","\u03AA":"I","\u03AB":"Y","\u03AC":"a","\u03AD":"e","\u03AE":"h","\u03AF":"i","\u03B0":"y","\u03B1":"a","\u03B2":"b","\u03B3":"g","\u03B4":"d","\u03B5":"e","\u03B6":"z","\u03B7":"h","\u03B8":"8","\u03B9":"i","\u03BA":"k","\u03BB":"l","\u03BC":"m","\u03BD":"n","\u03BE":"3","\u03BF":"o","\u03C0":"p","\u03C1":"r","\u03C2":"s","\u03C3":"s","\u03C4":"t","\u03C5":"y","\u03C6":"f","\u03C7":"x","\u03C8":"ps","\u03C9":"w","\u03CA":"i","\u03CB":"y","\u03CC":"o","\u03CD":"y","\u03CE":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040A":"NJ","\u040B":"C","\u040F":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041A":"K","\u041B":"L","\u041C":"M","\u041D":"N","\u041E":"O","\u041F":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042A":"U","\u042B":"Y","\u042C":"","\u042D":"E","\u042E":"Yu","\u042F":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043A":"k","\u043B":"l","\u043C":"m","\u043D":"n","\u043E":"o","\u043F":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044A":"u","\u044B":"y","\u044C":"","\u044D":"e","\u044E":"yu","\u044F":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045A":"nj","\u045B":"c","\u045D":"u","\u045F":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049A":"KH","\u049B":"kh","\u04A2":"NG","\u04A3":"ng","\u04AE":"UE","\u04AF":"ue","\u04B0":"U","\u04B1":"u","\u04BA":"H","\u04BB":"h","\u04D8":"AE","\u04D9":"ae","\u04E8":"OE","\u04E9":"oe","\u0531":"A","\u0532":"B","\u0533":"G","\u0534":"D","\u0535":"E","\u0536":"Z","\u0537":"E'","\u0538":"Y'","\u0539":"T'","\u053A":"JH","\u053B":"I","\u053C":"L","\u053D":"X","\u053E":"C'","\u053F":"K","\u0540":"H","\u0541":"D'","\u0542":"GH","\u0543":"TW","\u0544":"M","\u0545":"Y","\u0546":"N","\u0547":"SH","\u0549":"CH","\u054A":"P","\u054B":"J","\u054C":"R'","\u054D":"S","\u054E":"V","\u054F":"T","\u0550":"R","\u0551":"C","\u0553":"P'","\u0554":"Q'","\u0555":"O''","\u0556":"F","\u0587":"EV","\u0621":"a","\u0622":"aa","\u0623":"a","\u0624":"u","\u0625":"i","\u0626":"e","\u0627":"a","\u0628":"b","\u0629":"h","\u062A":"t","\u062B":"th","\u062C":"j","\u062D":"h","\u062E":"kh","\u062F":"d","\u0630":"th","\u0631":"r","\u0632":"z","\u0633":"s","\u0634":"sh","\u0635":"s","\u0636":"dh","\u0637":"t","\u0638":"z","\u0639":"a","\u063A":"gh","\u0641":"f","\u0642":"q","\u0643":"k","\u0644":"l","\u0645":"m","\u0646":"n","\u0647":"h","\u0648":"w","\u0649":"a","\u064A":"y","\u064B":"an","\u064C":"on","\u064D":"en","\u064E":"a","\u064F":"u","\u0650":"e","\u0652":"","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u067E":"p","\u0686":"ch","\u0698":"zh","\u06A9":"k","\u06AF":"g","\u06CC":"y","\u06F0":"0","\u06F1":"1","\u06F2":"2","\u06F3":"3","\u06F4":"4","\u06F5":"5","\u06F6":"6","\u06F7":"7","\u06F8":"8","\u06F9":"9","\u0E3F":"baht","\u10D0":"a","\u10D1":"b","\u10D2":"g","\u10D3":"d","\u10D4":"e","\u10D5":"v","\u10D6":"z","\u10D7":"t","\u10D8":"i","\u10D9":"k","\u10DA":"l","\u10DB":"m","\u10DC":"n","\u10DD":"o","\u10DE":"p","\u10DF":"zh","\u10E0":"r","\u10E1":"s","\u10E2":"t","\u10E3":"u","\u10E4":"f","\u10E5":"k","\u10E6":"gh","\u10E7":"q","\u10E8":"sh","\u10E9":"ch","\u10EA":"ts","\u10EB":"dz","\u10EC":"ts","\u10ED":"ch","\u10EE":"kh","\u10EF":"j","\u10F0":"h","\u1E62":"S","\u1E63":"s","\u1E80":"W","\u1E81":"w","\u1E82":"W","\u1E83":"w","\u1E84":"W","\u1E85":"w","\u1E9E":"SS","\u1EA0":"A","\u1EA1":"a","\u1EA2":"A","\u1EA3":"a","\u1EA4":"A","\u1EA5":"a","\u1EA6":"A","\u1EA7":"a","\u1EA8":"A","\u1EA9":"a","\u1EAA":"A","\u1EAB":"a","\u1EAC":"A","\u1EAD":"a","\u1EAE":"A","\u1EAF":"a","\u1EB0":"A","\u1EB1":"a","\u1EB2":"A","\u1EB3":"a","\u1EB4":"A","\u1EB5":"a","\u1EB6":"A","\u1EB7":"a","\u1EB8":"E","\u1EB9":"e","\u1EBA":"E","\u1EBB":"e","\u1EBC":"E","\u1EBD":"e","\u1EBE":"E","\u1EBF":"e","\u1EC0":"E","\u1EC1":"e","\u1EC2":"E","\u1EC3":"e","\u1EC4":"E","\u1EC5":"e","\u1EC6":"E","\u1EC7":"e","\u1EC8":"I","\u1EC9":"i","\u1ECA":"I","\u1ECB":"i","\u1ECC":"O","\u1ECD":"o","\u1ECE":"O","\u1ECF":"o","\u1ED0":"O","\u1ED1":"o","\u1ED2":"O","\u1ED3":"o","\u1ED4":"O","\u1ED5":"o","\u1ED6":"O","\u1ED7":"o","\u1ED8":"O","\u1ED9":"o","\u1EDA":"O","\u1EDB":"o","\u1EDC":"O","\u1EDD":"o","\u1EDE":"O","\u1EDF":"o","\u1EE0":"O","\u1EE1":"o","\u1EE2":"O","\u1EE3":"o","\u1EE4":"U","\u1EE5":"u","\u1EE6":"U","\u1EE7":"u","\u1EE8":"U","\u1EE9":"u","\u1EEA":"U","\u1EEB":"u","\u1EEC":"U","\u1EED":"u","\u1EEE":"U","\u1EEF":"u","\u1EF0":"U","\u1EF1":"u","\u1EF2":"Y","\u1EF3":"y","\u1EF4":"Y","\u1EF5":"y","\u1EF6":"Y","\u1EF7":"y","\u1EF8":"Y","\u1EF9":"y","\u2013":"-","\u2018":"'","\u2019":"'","\u201C":"\\"","\u201D":"\\"","\u201E":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20A0":"ecu","\u20A2":"cruzeiro","\u20A3":"french franc","\u20A4":"lira","\u20A5":"mill","\u20A6":"naira","\u20A7":"peseta","\u20A8":"rupee","\u20A9":"won","\u20AA":"new shequel","\u20AB":"dong","\u20AC":"euro","\u20AD":"kip","\u20AE":"tugrik","\u20AF":"drachma","\u20B0":"penny","\u20B1":"peso","\u20B2":"guarani","\u20B3":"austral","\u20B4":"hryvnia","\u20B5":"cedi","\u20B8":"kazakhstani tenge","\u20B9":"indian rupee","\u20BA":"turkish lira","\u20BD":"russian ruble","\u20BF":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221E":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\uFDFC":"rial","\uFEF5":"laa","\uFEF7":"laa","\uFEF9":"lai","\uFEFB":"la"}`),eK=JSON.parse('{"bg":{"\u0419":"Y","\u0426":"Ts","\u0429":"Sht","\u042A":"A","\u042C":"Y","\u0439":"y","\u0446":"ts","\u0449":"sht","\u044A":"a","\u044C":"y"},"de":{"\xC4":"AE","\xE4":"ae","\xD6":"OE","\xF6":"oe","\xDC":"UE","\xFC":"ue","\xDF":"ss","%":"prozent","&":"und","|":"oder","\u2211":"summe","\u221E":"unendlich","\u2665":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xA2":"centavos","\xA3":"libras","\xA4":"moneda","\u20A3":"francos","\u2211":"suma","\u221E":"infinito","\u2665":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xA2":"centime","\xA3":"livre","\xA4":"devise","\u20A3":"franc","\u2211":"somme","\u221E":"infini","\u2665":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xA2":"centavo","\u2211":"soma","\xA3":"libra","\u221E":"infinito","\u2665":"amor"},"uk":{"\u0418":"Y","\u0438":"y","\u0419":"Y","\u0439":"y","\u0426":"Ts","\u0446":"ts","\u0425":"Kh","\u0445":"kh","\u0429":"Shch","\u0449":"shch","\u0413":"H","\u0433":"h"},"vi":{"\u0110":"D","\u0111":"d"},"da":{"\xD8":"OE","\xF8":"oe","\xC5":"AA","\xE5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xF8rre end"},"nb":{"&":"og","\xC5":"AA","\xC6":"AE","\xD8":"OE","\xE5":"aa","\xE6":"ae","\xF8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xC5":"AA","\xC4":"AE","\xD6":"OE","\xE5":"aa","\xE4":"ae","\xF6":"oe"}}');function u3(D){return typeof D==="string"}var V={required:"The {{ field }} field must be defined",string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",mobile:"The {{ field }} field must be a valid mobile phone number",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",regex:"The {{ field }} field format is invalid",ascii:"The {{ field }} field must only contain ASCII characters",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",hexCode:"The {{ field }} field must be a valid hex color code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number","number.in":"The selected {{ field }} is not in {{ values }}",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must be an integer",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}","date.afterOrSameAs":"The {{ field }} field must be a date after or same as {{ otherField }}","date.beforeField":"The {{ field }} field must be a date before {{ otherField }}","date.beforeOrSameAs":"The {{ field }} field must be a date before or same as {{ otherField }}","date.weekend":"The {{ field }} field is not a weekend","date.weekday":"The {{ field }} field is not a weekday"},F3={"":"data"};var $7=Object.defineProperty,y0=(D,u)=>{for(var F in u)$7(D,F,{get:u[F],enumerable:!0})};function p8(D,u,F,$,E){for(u=u.split?u.split("."):u,$=0;$<u.length;$++)D=D?D[u[$]]:E;return D===E?F:D}var DF=p(k0(),1),uF=p(B3(),1),FF=p(M3(),1),CF=p(X3(),1),$F=p(A3(),1),EF=p(z3(),1),wF=p(G3(),1),BF=p(U3(),1),YF=p(j3(),1),JF=p(k3(),1),ZF=p(P3(),1),KF=p(m3(),1),MF=p(f3(),1),XF=p(d3(),1),WF=p(p3(),1),QF=p(O2(),1),AF=p(V2(),1),zF=p(V2(),1),GF=p(O2(),1),Z0=class{#D;#u;constructor(D,u){this.#D=D,this.#u=u||{}}#F(D,u){if(!D.includes("{{"))return D;return D.replace(/(\\)?{{(.*?)}}/g,(F,$,E)=>{let w=E.trim().split("."),C=u;while(w.length){if(C===null||typeof C!=="object")return;let Z=w.shift();C=Object.hasOwn(C,Z)?C[Z]:void 0}return C})}getMessage(D,u,F,$){let E=this.#u[F.name]||F.name,w=this.#D[`${F.getFieldPath()}.${u}`];if(w)return this.#F(w,{field:E,...$});let C=this.#D[`${F.wildCardPath}.${u}`];if(C)return this.#F(C,{field:E,...$});let Z=this.#D[u];if(Z)return this.#F(Z,{field:E,...$});return this.#F(D,{field:E,...$})}toJSON(){return{messages:this.#D,fields:this.#u}}},Y8={};y0(Y8,{E_VALIDATION_ERROR:()=>e3});var L2=class extends Error{constructor(D,u){super("Validation failure",u);this.messages=D;let F=this.constructor;Error.captureStackTrace(this,F)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},e3=L2,T2=class{hasErrors=!1;errors=[];report(D,u,F,$){let E={message:D,rule:u,field:F.getFieldPath()};if($)E.meta=$;if(F.isArrayMember)E.index=F.name;this.hasErrors=!0,this.errors.push(E)}createError(){return new e3(this.errors)}},g5=["1",1,"true",!0,"on"],b5=["0",0,"false",!1],k={exists(D){return D!==null&&D!==void 0},isMissing(D){return!this.exists(D)},isTrue(D){return g5.includes(D)},isFalse(D){return b5.includes(D)},isString(D){return typeof D==="string"},isObject(D){return!!(D&&typeof D==="object"&&!Array.isArray(D))},hasKeys(D,u){for(let F of u)if(F in D===!1)return!1;return!0},isArray(D){return Array.isArray(D)},isNumeric(D){return!Number.isNaN(Number(D))},asNumber(D){return D===null?Number.NaN:Number(D)},asBoolean(D){if(this.isTrue(D))return!0;if(this.isFalse(D))return!1;return null},isEmail:BF.default.default,isURL:FF.default.default,isAlpha:YF.default.default,isAlphaNumeric:XF.default.default,isIP:DF.default.default,isUUID:EF.default.default,isAscii:wF.default.default,isCreditCard:MF.default.default,isIBAN:$F.default.default,isJWT:uF.default.default,isLatLong:JF.default.default,isMobilePhone:AF.default.default,isPassportNumber:WF.default.default,isPostalCode:QF.default.default,isSlug:CF.default.default,isDecimal:ZF.default.default,mobileLocales:zF.locales,postalCountryCodes:GF.locales,passportCountryCodes:["AM","AR","AT","AU","AZ","BE","BG","BR","BY","CA","CH","CY","CZ","DE","DK","DZ","ES","FI","FR","GB","GR","HR","HU","IE","IN","ID","IR","IS","IT","JM","JP","KR","KZ","LI","LT","LU","LV","LY","MT","MZ","MY","MX","NL","NZ","PH","PK","PL","PT","RO","RU","SE","SL","SK","TH","TR","UA","US"],isHexColor:(D)=>{if(!D.startsWith("#"))return!1;return KF.default.default(D)},isActiveURL:async(D)=>{let{resolve4:u,resolve6:F}=await import("dns/promises");try{let{hostname:$}=new URL(D);if((await F($)).length)return!0;else return(await u($)).length>0}catch{return!1}},isDistinct:(D,u)=>{let F=new Set;if(!u){for(let E of D)if(k.exists(E))if(F.has(E))return!1;else F.add(E);return!0}let $=Array.isArray(u)?u:[u];for(let E of D)if(k.isObject(E)&&k.hasKeys(E,$)){let w=$.map((C)=>E[C]).join("_");if(F.has(w))return!1;else F.add(w)}return!0},getNestedValue(D,u){if(D.indexOf(".")>-1)return p8(u.data,D);return u.parent[D]}};var mu=class{static macro(D,u){this.prototype[D]=u}static getter(D,u,F=!1){Object.defineProperty(this.prototype,D,{get(){let $=u.call(this);if(F)Object.defineProperty(this,D,{configurable:!1,enumerable:!1,value:$,writable:!1});return $},configurable:!0,enumerable:!1})}};var _5=/[\p{Lu}]/u,P5=/[\p{Ll}]/u,qF=/^[\p{Lu}](?![\p{Lu}])/gu,OF=/([\p{Alpha}\p{N}_]|$)/u,N2=/[_.\- ]+/,m5=new RegExp("^"+N2.source),HF=new RegExp(N2.source+OF.source,"gu"),UF=new RegExp("\\d+"+OF.source,"gu"),v5=(D,u,F,$)=>{let E=!1,w=!1,C=!1,Z=!1;for(let M=0;M<D.length;M++){let W=D[M];if(Z=M>2?D[M-3]==="-":!0,E&&_5.test(W))D=D.slice(0,M)+"-"+D.slice(M),E=!1,C=w,w=!0,M++;else if(w&&C&&P5.test(W)&&(!Z||$))D=D.slice(0,M-1)+"-"+D.slice(M-1),C=w,w=!1,E=!0;else E=u(W)===W&&F(W)!==W,C=w,w=F(W)===W&&u(W)!==W}return D},c5=(D,u)=>{return qF.lastIndex=0,D.replaceAll(qF,(F)=>u(F))},f5=(D,u)=>{return HF.lastIndex=0,UF.lastIndex=0,D.replaceAll(UF,(F,$,E)=>["_","-"].includes(D.charAt(E+F.length))?F:u(F)).replaceAll(HF,(F,$)=>u($))};function OD(D,u){if(!(typeof D==="string"||Array.isArray(D)))throw new TypeError("Expected the input to be `string | string[]`");if(u={pascalCase:!1,preserveConsecutiveUppercase:!1,...u},Array.isArray(D))D=D.map((w)=>w.trim()).filter((w)=>w.length).join("-");else D=D.trim();if(D.length===0)return"";let F=u.locale===!1?(w)=>w.toLowerCase():(w)=>w.toLocaleLowerCase(u.locale),$=u.locale===!1?(w)=>w.toUpperCase():(w)=>w.toLocaleUpperCase(u.locale);if(D.length===1){if(N2.test(D))return"";return u.pascalCase?$(D):F(D)}if(D!==F(D))D=v5(D,F,$,u.preserveConsecutiveUppercase);if(D=D.replace(m5,""),D=u.preserveConsecutiveUppercase?c5(D,F):F(D),u.pascalCase)D=$(D.charAt(0))+D.slice(1);return f5(D,$)}var DC=p(S2(),1),e=p(S2(),1),uC=p(VF(),1),FC=p(LF(),1),CC=p(TF(),1);var b2=(D,u)=>u.some((F)=>F instanceof RegExp?F.test(D):F===D),n5=new Set(["https:","http:","file:"]),r5=(D)=>{try{let{protocol:u}=new URL(D);return u.endsWith(":")&&!u.includes(".")&&!n5.has(u)}catch{return!1}},d5=(D,{stripHash:u})=>{let F=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(D);if(!F)throw new Error(`Invalid URL: ${D}`);let{type:$,data:E,hash:w}=F.groups,C=$.split(";");w=u?"":w;let Z=!1;if(C[C.length-1]==="base64")C.pop(),Z=!0;let M=C.shift()?.toLowerCase()??"",X=[...C.map((q)=>{let[L,U=""]=q.split("=").map((A)=>A.trim());if(L==="charset"){if(U=U.toLowerCase(),U==="us-ascii")return""}return`${L}${U?`=${U}`:""}`}).filter(Boolean)];if(Z)X.push("base64");if(X.length>0||M&&M!=="text/plain")X.unshift(M);return`data:${X.join(";")},${Z?E.trim():E}${w?`#${w}`:""}`};function _2(D,u){if(u={defaultProtocol:"http",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,removeExplicitPort:!1,sortQueryParameters:!0,...u},typeof u.defaultProtocol==="string"&&!u.defaultProtocol.endsWith(":"))u.defaultProtocol=`${u.defaultProtocol}:`;if(D=D.trim(),/^data:/i.test(D))return d5(D,u);if(r5(D))return D;let F=D.startsWith("//");if(!(!F&&/^\.*\//.test(D)))D=D.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,u.defaultProtocol);let E=new URL(D);if(u.forceHttp&&u.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(u.forceHttp&&E.protocol==="https:")E.protocol="http:";if(u.forceHttps&&E.protocol==="http:")E.protocol="https:";if(u.stripAuthentication)E.username="",E.password="";if(u.stripHash)E.hash="";else if(u.stripTextFragment)E.hash=E.hash.replace(/#?:~:text.*?$/i,"");if(E.pathname){let C=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,Z=0,M="";for(;;){let X=C.exec(E.pathname);if(!X)break;let q=X[0],L=X.index,U=E.pathname.slice(Z,L);M+=U.replace(/\/{2,}/g,"/"),M+=q,Z=L+q.length}let W=E.pathname.slice(Z,E.pathname.length);M+=W.replace(/\/{2,}/g,"/"),E.pathname=M}if(E.pathname)try{E.pathname=decodeURI(E.pathname)}catch{}if(u.removeDirectoryIndex===!0)u.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(u.removeDirectoryIndex)&&u.removeDirectoryIndex.length>0){let C=E.pathname.split("/"),Z=C[C.length-1];if(b2(Z,u.removeDirectoryIndex))C=C.slice(0,-1),E.pathname=C.slice(1).join("/")+"/"}if(E.hostname){if(E.hostname=E.hostname.replace(/\.$/,""),u.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(E.hostname))E.hostname=E.hostname.replace(/^www\./,"")}if(Array.isArray(u.removeQueryParameters)){for(let C of[...E.searchParams.keys()])if(b2(C,u.removeQueryParameters))E.searchParams.delete(C)}if(!Array.isArray(u.keepQueryParameters)&&u.removeQueryParameters===!0)E.search="";if(Array.isArray(u.keepQueryParameters)&&u.keepQueryParameters.length>0){for(let C of[...E.searchParams.keys()])if(!b2(C,u.keepQueryParameters))E.searchParams.delete(C)}if(u.sortQueryParameters){E.searchParams.sort();try{E.search=decodeURIComponent(E.search)}catch{}}if(u.removeTrailingSlash)E.pathname=E.pathname.replace(/\/$/,"");if(u.removeExplicitPort&&E.port)E.port="";let w=D;if(D=E.toString(),!u.removeSingleSlash&&E.pathname==="/"&&!w.endsWith("/")&&E.hash==="")D=D.replace(/\/$/,"");if((u.removeTrailingSlash||E.pathname==="/")&&E.hash===""&&u.removeSingleSlash)D=D.replace(/\/$/,"");if(F&&!u.normalizeProtocol)D=D.replace(/^http:\/\//,"//");if(u.stripProtocol)D=D.replace(/^(?:https?:)?\/\//,"");return D}var ZC=p(NF(),1),KC=p(IF(),1);var ww=class D{#D="";newLine="\n";writeStatement(u){this.#D=`${this.#D}${this.newLine}${u}`}child(){return new D}toString(){return this.#D}flush(){this.#D=""}};function Bw({parseFnRefId:D,variableName:u,wildCardPath:F,isArrayMember:$,valueExpression:E,parentExpression:w,fieldNameExpression:C,parentValueExpression:Z}){let M=D?`refs['${D}'](${E}, {
|
|
42
42
|
data: root,
|
|
43
43
|
meta: meta,
|
|
44
44
|
parent: ${Z}
|
|
@@ -55,39 +55,39 @@ ${z.cyan(pu)}
|
|
|
55
55
|
isValid: true,
|
|
56
56
|
parent: ${Z},
|
|
57
57
|
isArrayMember: ${$},
|
|
58
|
-
});`}var vu=class{#D;#u;field;constructor(D,u,F,$){if(this.#u=$,this.#D=D,this.#u)this.field=this.#u;else u.variablesCounter++,this.field=u.createFieldFor(D,F)}defineField(D){if(!this.#u)D.writeStatement(
|
|
58
|
+
});`}var vu=class{#D;#u;field;constructor(D,u,F,$){if(this.#u=$,this.#D=D,this.#u)this.field=this.#u;else u.variablesCounter++,this.field=u.createFieldFor(D,F)}defineField(D){if(!this.#u)D.writeStatement(Bw({fieldNameExpression:this.field.fieldNameExpression,isArrayMember:this.field.isArrayMember,parentExpression:this.field.parentExpression,parentValueExpression:this.field.parentValueExpression,valueExpression:this.field.valueExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath,parseFnRefId:"parseFnId"in this.#D?this.#D.parseFnId:void 0}))}};function xF({variableName:D,guardedCodeSnippet:u}){return`if (ensureIsArray(${D})) {
|
|
59
59
|
${u}
|
|
60
|
-
}`}function
|
|
60
|
+
}`}function K8({variableName:D,bail:u,guardedCodeSnippet:F}){if(!u)return F;return`if (${D}.isValid) {
|
|
61
61
|
${F}
|
|
62
62
|
}`}function K0({allowNull:D,conditional:u,variableName:F,outputExpression:$,transformFnRefId:E}){if(!D)return"";return`${u||"if"}(${F}.value === null) {
|
|
63
63
|
${$} = ${E?`refs['${E}'](null, ${F});`:"null;"}
|
|
64
|
-
}`}function
|
|
64
|
+
}`}function Yw(D,u){let[F,$]=D;if(F&&$)return`if (${F} && ${$}) {
|
|
65
65
|
${u}
|
|
66
66
|
}`;if(F)return`if (${F}) {
|
|
67
67
|
${u}
|
|
68
68
|
}`;if($)return`if (${$}) {
|
|
69
69
|
${u}
|
|
70
|
-
}`;return u}function
|
|
71
|
-
${u} = ${D}_out;`}function X0({allowNull:D,isOptional:u,variableName:F}){if(u===!1)if(D===!1)return`ensureExists(${F});`;else return`ensureIsDefined(${F});`;return""}var
|
|
70
|
+
}`;return u}function Jw({isAsync:D,implicit:u,ruleFnId:F},$,E,w){let C=`refs['${F}']`,Z=`${C}.validator(${$}.value, ${C}.options, ${$});`,M=E?`${$}.isValid`:"",W=u||w?"":`${$}.isDefined`;return Yw([M,W],D?`await ${Z}`:`${Z}`)}function M0({bail:D,validations:u,variableName:F,dropMissingCheck:$}){return`${u.map((E)=>Jw(E,F,D,$)).join("\n")}`}function SF({variableName:D,outputExpression:u,outputValueExpression:F}){return`const ${D}_out = ${F};
|
|
71
|
+
${u} = ${D}_out;`}function X0({allowNull:D,isOptional:u,variableName:F}){if(u===!1)if(D===!1)return`ensureExists(${F});`;else return`ensureIsDefined(${F});`;return""}var Zw=class extends vu{#D;#u;#F;constructor(D,u,F,$,E){super(D,F,$,E);this.#D=D,this.#u=u,this.#F=F}#C(){let D=this.#u.child(),u={type:"tuple",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((F)=>{this.#F.compileNode(F,D,u)}),D.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(X0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));let D=K8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${SF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#D.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#C()}`}),u=xF({variableName:this.field.variableName,guardedCodeSnippet:`${M0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${K0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function Kw({variableName:D,loopCodeSnippet:u,startingIndex:F}){return F=F||0,`const ${D}_items_size = ${D}.value.length;
|
|
72
72
|
for (let ${D}_i = ${F}; ${D}_i < ${D}_items_size; ${D}_i++) {
|
|
73
73
|
${u}
|
|
74
|
-
}`}var
|
|
74
|
+
}`}var Mw=class extends vu{#D;#u;#F;constructor(D,u,F,$,E){super(D,F,$,E);this.#D=D,this.#u=u,this.#F=F}#C(){let D=this.#u.child();this.#F.compileNode(this.#D.each,D,{type:"array",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});let u=this.#u.child();return u.writeStatement(Kw({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:D.toString()})),D.flush(),u.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(X0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));let D=K8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${SF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#u.newLine}${this.#C()}`}),u=xF({variableName:this.field.variableName,guardedCodeSnippet:`${M0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${K0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function Xw({parseFnRefId:D,variableName:u}){if(D)return`${u}.value = refs['${D}'](${u}.value);`;return""}function hF({variableName:D,conditionalFnRefId:u}){return`else {
|
|
75
75
|
refs['${u}'](${D}.value, ${D});
|
|
76
76
|
}`}function yF({conditional:D,variableName:u,conditionalFnRefId:F,guardedCodeSnippet:$}){return`${D}(refs['${F}'](${u}.value, ${u})) {
|
|
77
77
|
${$}
|
|
78
|
-
}`}var
|
|
78
|
+
}`}var Ww=class extends vu{#D;#u;#F;#C;constructor(D,u,F,$,E){super(D,F,$,E);this.#u=D,this.#F=u,this.#C=$,this.#D=F}#$(){let D=this.#F.child();if(this.#u.conditions.forEach((u,F)=>{let $=this.#F.child();if("parseFnId"in u.schema)$.writeStatement(Xw({parseFnRefId:u.schema.parseFnId,variableName:this.field.variableName}));this.#D.compileNode(u.schema,$,this.#C,this.field),D.writeStatement(yF({conditional:F===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:u.conditionalFnRefId,guardedCodeSnippet:$.toString()})),$.flush()}),this.#u.elseConditionalFnRefId&&this.#u.conditions.length)D.writeStatement(hF({variableName:this.field.variableName,conditionalFnRefId:this.#u.elseConditionalFnRefId}));return D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(this.#$())}};function Qw({variableName:D,loopCodeSnippet:u}){return`const ${D}_keys = Object.keys(${D}.value);
|
|
79
79
|
const ${D}_keys_size = ${D}_keys.length;
|
|
80
80
|
for (let ${D}_key_i = 0; ${D}_key_i < ${D}_keys_size; ${D}_key_i++) {
|
|
81
81
|
const ${D}_i = ${D}_keys[${D}_key_i];
|
|
82
82
|
${u}
|
|
83
|
-
}`}function
|
|
83
|
+
}`}function jF({variableName:D,guardedCodeSnippet:u}){return`if (ensureIsObject(${D})) {
|
|
84
84
|
${u}
|
|
85
|
-
}`}function
|
|
86
|
-
${u} = ${D}_out;`}var
|
|
85
|
+
}`}function RF({variableName:D,outputExpression:u,outputValueExpression:F}){return`const ${D}_out = ${F};
|
|
86
|
+
${u} = ${D}_out;`}var Aw=class extends vu{#D;#u;#F;constructor(D,u,F,$,E){super(D,F,$,E);this.#D=D,this.#u=u,this.#F=F}#C(){let D=this.#u.child(),u=this.#u.child();return this.#F.compileNode(this.#D.each,u,{type:"record",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),D.writeStatement(Qw({variableName:this.field.variableName,loopCodeSnippet:u.toString()})),u.flush(),D.toString()}compile(){this.defineField(this.#u),this.#u.writeStatement(X0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));let D=K8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${RF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#C()}`}),u=jF({variableName:this.field.variableName,guardedCodeSnippet:`${M0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#u.newLine}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${K0({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}};function zw(D){return`[${D.map((u)=>`"${u}"`).join(", ")}]`}function Gw({variableName:D,fieldsToIgnore:u,allowUnknownProperties:F}){if(!F)return"";let $=zw(u);return`moveProperties(${D}.value, ${D}_out, ${$});`}var qw=class extends vu{#D;#u;#F;constructor(D,u,F,$,E){super(D,F,$,E);this.#D=D,this.#u=u,this.#F=F}#C(D){let u=D.properties.map(($)=>$.fieldName),F=D.groups.flatMap(($)=>this.#$($));return u.concat(F)}#$(D){return D.conditions.flatMap((u)=>{return this.#C(u.schema)})}#E(){let D=this.#u.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((F)=>this.#F.compileNode(F,D,u)),D.toString()}#w(){let D=this.#u.child(),u={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.groups.forEach((F)=>this.#B(F,D,u)),D.toString()}#B(D,u,F){if(D.conditions.forEach(($,E)=>{let w=u.child();$.schema.properties.forEach((C)=>{this.#F.compileNode(C,w,F)}),$.schema.groups.forEach((C)=>{this.#B(C,w,F)}),u.writeStatement(yF({variableName:this.field.variableName,conditional:E===0?"if":"else if",conditionalFnRefId:$.conditionalFnRefId,guardedCodeSnippet:w.toString()}))}),D.elseConditionalFnRefId&&D.conditions.length)u.writeStatement(hF({variableName:this.field.variableName,conditionalFnRefId:D.elseConditionalFnRefId}))}compile(){this.defineField(this.#u),this.#u.writeStatement(X0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));let D=K8({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${RF({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#u.newLine}${this.#E()}${this.#u.newLine}${this.#w()}${this.#u.newLine}${Gw({variableName:this.field.variableName,allowUnknownProperties:this.#D.allowUnknownProperties,fieldsToIgnore:this.#D.allowUnknownProperties?this.#C(this.#D):[]})}`}),u=jF({variableName:this.field.variableName,guardedCodeSnippet:`${M0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${D}`});this.#u.writeStatement(`${u}${this.#u.newLine}${K0({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}};function Hw(D){return{parentExpression:D.variableName,parentValueExpression:D.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${D.variableName}_item`,valueExpression:"root",outputExpression:D.outputExpression,isArrayMember:!1}}function Uw({variableName:D,outputExpression:u,transformFnRefId:F}){let $=F?`refs['${F}'](${D}.value, ${D})`:`${D}.value`;return`if (${D}.isDefined && ${D}.isValid) {
|
|
87
87
|
${u} = ${$};
|
|
88
|
-
}`}var
|
|
88
|
+
}`}var Ow=class extends vu{#D;#u;constructor(D,u,F,$,E){super(D,F,$,E);this.#D=D,this.#u=u}compile(){this.defineField(this.#u),this.#u.writeStatement(X0({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#u.writeStatement(M0({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1})),this.#u.writeStatement(`${Uw({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId})}${this.#u.newLine}${K0({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId,conditional:"else if"})}`)}};function Vw(D){let u=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!0}}function Lw(D,u){let F=u.wildCardPath!==""?`${u.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:u.variableName,parentValueExpression:`${u.variableName}.value`,fieldNameExpression:`${D.fieldName}`,fieldPathExpression:F,wildCardPath:F,variableName:`${u.variableName}_item_${D.fieldName}`,valueExpression:`${u.variableName}.value[${D.fieldName}]`,outputExpression:`${u.variableName}_out[${D.propertyName}]`,isArrayMember:!0}}function Tw(){return`if(errorReporter.hasErrors) {
|
|
89
89
|
throw errorReporter.createError();
|
|
90
|
-
}`}function
|
|
90
|
+
}`}function Nw(D,u,F){let $=F.wildCardPath!==""?`${F.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:F.variableName,parentValueExpression:`${F.variableName}.value`,fieldNameExpression:`'${D.fieldName}'`,fieldPathExpression:$,wildCardPath:$,variableName:`${D.propertyName}_${u}`,valueExpression:`${F.variableName}.value['${D.fieldName}']`,outputExpression:`${F.variableName}_out['${D.propertyName}']`,isArrayMember:!1}}function Iw(D){let u=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:u,wildCardPath:u,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!1}}function xw(D){return`function report(message, rule, field, args) {
|
|
91
91
|
field.isValid = false;
|
|
92
92
|
errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args);
|
|
93
93
|
};
|
|
@@ -156,6 +156,6 @@ function moveProperties(source, destination, ignoreKeys) {
|
|
|
156
156
|
destination[key] = copyProperties(value)
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
};`}function
|
|
159
|
+
};`}function Sw(D){return`const REQUIRED = '${D.required}';
|
|
160
160
|
const NOT_AN_OBJECT = '${D.object}';
|
|
161
|
-
const NOT_AN_ARRAY = '${D.array}';`}var xw=Object.getPrototypeOf(async function(){}).constructor,RF=class{variablesCounter=0;#D;#u;#F=new $w;constructor(D,u){this.#D=D,this.#u=u||{convertEmptyStringsToNull:!1}}#C(){this.#F.writeStatement(Iw({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#u.messages})),this.#F.writeStatement(Nw(this.#u)),this.#F.writeStatement("let out;")}#$(){this.#F.writeStatement(Vw()),this.#F.writeStatement("return out;")}#E(){this.compileNode(this.#D.schema,this.#F,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#w(){return new xw("root","meta","refs","messagesProvider","errorReporter",this.#F.toString())}createFieldFor(D,u){switch(u.type){case"array":return Uw(u);case"root":return Gw(u);case"object":return Lw(D,this.variablesCounter,u);case"tuple":return Ow(D,u);case"record":return Tw(u)}}compileNode(D,u,F,$){switch(D.type){case"literal":return new Hw(D,u,this,F,$).compile();case"array":return new Zw(D,u,this,F,$).compile();case"record":return new Ww(D,u,this,F,$).compile();case"object":return new zw(D,u,this,F,$).compile();case"tuple":return new Yw(D,u,this,F,$).compile();case"union":return new Mw(D,u,this,F,$).compile()}}compile(){this.#C(),this.#E(),this.#$();let D=this.#w();return this.variablesCounter=0,this.#F.flush(),D}};function kF(){let D=0,u={};return{toJSON(){return u},track(F){D++;let $=`ref://${D}`;return u[$]=F,$},trackValidation(F){return this.track(F)},trackParser(F){return this.track(F)},trackTransformer(F){return this.track(F)},trackConditional(F){return this.track(F)}}}function x(D,u){let F={validator:D,isAsync:u?.isAsync||D.constructor.name==="AsyncFunction",implicit:u?.implicit??!1};return function(...$){return{rule:F,options:$[0]}}}var o6={};h0(o6,{COTYPE:()=>yw,IS_OF_TYPE:()=>pD,ITYPE:()=>Sw,OTYPE:()=>hw,PARSE:()=>n,UNIQUE_NAME:()=>mD,VALIDATION:()=>Iu});var mD=Symbol.for("schema_name"),pD=Symbol.for("is_of_type"),n=Symbol.for("parse"),Sw=Symbol.for("opaque_input_type"),hw=Symbol.for("opaque_type"),yw=Symbol.for("camelcase_opaque_type"),Iu=Symbol.for("to_validation"),cu=x((D,u,F)=>{let $=u(F);if(!F.isDefined&&$)F.report(V.required,"required",F)},{implicit:!0}),M8=class extends mu{optional(D){return new jw(this,D)}nullable(){return new gw(this)}transform(D){return new Rw(D,this)}},gw=class D extends M8{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[n](u,F,$){let E=this.#D[n](u,F,$);return E.allowNull=!0,E}},jw=class D extends M8{#D;validations;constructor(u,F){super();this.#D=u,this.validations=F||[]}cloneValidations(){return this.validations.map((u)=>{return{options:u.options,rule:u.rule}})}compileValidations(u){return this.validations.map((F)=>{return{ruleFnId:u.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}use(u){return this.validations.push(Iu in u?u[Iu]():u),this}requiredWhen(u,F,$){if(typeof u==="function")return this.use(cu(u));let E;switch(F){case"=":E=(w)=>w===$;break;case"!=":E=(w)=>w!==$;break;case"in":E=(w)=>$.includes(w);break;case"notIn":E=(w)=>!$.includes(w);break;case">":E=(w)=>w>$;break;case"<":E=(w)=>w<$;break;case">=":E=(w)=>w>=$;break;case"<=":E=(w)=>w<=$}return this.use(cu((w)=>{let C=R.getNestedValue(u,w);return E(C)}))}requiredIfExists(u){let F=Array.isArray(u)?u:[u];return this.use(cu(($)=>{return F.every((E)=>R.exists(R.getNestedValue(E,$)))}))}requiredIfAnyExists(u){return this.use(cu((F)=>{return u.some(($)=>R.exists(R.getNestedValue($,F)))}))}requiredIfMissing(u){let F=Array.isArray(u)?u:[u];return this.use(cu(($)=>{return F.every((E)=>R.isMissing(R.getNestedValue(E,$)))}))}requiredIfAnyMissing(u){return this.use(cu((F)=>{return u.some(($)=>R.isMissing(R.getNestedValue($,F)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[n](u,F,$){let E=this.#D[n](u,F,$);return E.isOptional=!0,E.validations=E.validations.concat(this.compileValidations(F)),E}},Rw=class D extends M8{#D;#u;constructor(u,F){super();this.#u=u,this.#D=F}clone(){return new D(this.#u,this.#D.clone())}[n](u,F,$){let E=this.#D[n](u,F,$);return E.transformFnId=F.trackTransformer(this.#u),E}},Bu=class extends M8{options;validations;constructor(D,u){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...D},this.validations=u||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((u)=>{return{ruleFnId:D.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(Iu in D?D[Iu]():D),this}bail(D){return this.options.bail=D,this}[n](D,u,F){return{type:"literal",fieldName:D,propertyName:F.toCamelCase?OD(D):D,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?u.trackParser(this.options.parse):void 0,validations:this.compileValidations(u)}}},e6=class D extends Bu{constructor(u,F){super(u,F)}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},K8=x((D,u,F)=>{let $=typeof u.choices==="function"?u.choices(F):u.choices;if(!$.includes(D))F.report(V.enum,"enum",F,{choices:$})}),fu=class D extends Bu{static rules={enum:K8};#D;getChoices(){return this.#D}constructor(u,F,$){super(F,$||[K8({choices:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},xu=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];e.default.extend(CC.default);e.default.extend(uC.default);e.default.extend(FC.default);var kw=x((D,u,F)=>{if(typeof D!=="string"&&typeof D!=="number"){F.report(V.date,"date",F);return}let $=!1,E=u.formats||xu;if(Array.isArray(E))E=[...E],$=E.includes("x");else if(typeof E!=="string")E={...E},$=E.format==="x";let w=$?R.asNumber(D):D,C=$&&!Number.isNaN(w)?e.default(w):e.default(D,E,!0);if(!C.isValid()){F.report(V.date,"date",F);return}F.meta.$value=C,F.meta.$formats=E,F.mutate(C.toDate(),F)}),bF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||xu,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the equals rule`);if(!w.isSame(Z,$))F.report(V["date.equals"],"date.equals",F,{expectedValue:C,compare:$})}),_F=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||xu,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="tomorrow"?e.default().add(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the after rule`);if(!w.isAfter(Z,$))F.report(V["date.after"],"date.after",F,{expectedValue:C,compare:$})}),PF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||xu,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="tomorrow"?e.default().add(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the afterOrEqual rule`);if(!w.isSameOrAfter(Z,$))F.report(V["date.afterOrEqual"],"date.afterOrEqual",F,{expectedValue:C,compare:$})}),mF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||xu,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="yesterday"?e.default().subtract(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the before rule`);if(!w.isBefore(Z,$))F.report(V["date.before"],"date.before",F,{expectedValue:C,compare:$})}),vF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||xu,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="yesterday"?e.default().subtract(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the beforeOrEqual rule`);if(!w.isSameOrBefore(Z,$))F.report(V["date.beforeOrEqual"],"date.beforeOrEqual",F,{expectedValue:C,compare:$})}),cF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=R.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isSame(Z,$))F.report(V["date.sameAs"],"date.sameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),fF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=R.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(E.isSame(Z,$))F.report(V["date.notSameAs"],"date.notSameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),nF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=R.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isAfter(Z,$))F.report(V["date.afterField"],"date.afterField",F,{otherField:u.otherField,expectedValue:C,compare:$})}),rF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=R.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isSameOrAfter(Z,$))F.report(V["date.afterOrSameAs"],"date.afterOrSameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),dF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=R.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isBefore(Z,$))F.report(V["date.beforeField"],"date.beforeField",F,{otherField:u.otherField,expectedValue:C,compare:$})}),lF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=R.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isSameOrBefore(Z,$))F.report(V["date.beforeOrSameAs"],"date.beforeOrSameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),pF=x((D,u,F)=>{if(!F.meta.$value)return;let E=F.meta.$value.day();if(E!==0&&E!==6)F.report(V["date.weekend"],"date.weekend",F)}),iF=x((D,u,F)=>{if(!F.meta.$value)return;let E=F.meta.$value.day();if(E===0||E===6)F.report(V["date.weekday"],"date.weekday",F)}),c2=class D extends Bu{static rules={equals:bF,after:_F,afterOrEqual:PF,before:mF,beforeOrEqual:vF,sameAs:cF,notSameAs:fF,afterField:nF,afterOrSameAs:rF,beforeField:dF,beforeOrSameAs:lF,weekend:pF,weekday:iF};[mD]="vine.date";[pD]=(u)=>{if(typeof u!=="string")return!1;return DC.default(u,this.options.formats||xu,!0).isValid()};constructor(u,F){super(u,F||[kw(u||{})])}equals(u,F){return this.use(bF({expectedValue:u,...F}))}after(u,F){return this.use(_F({expectedValue:u,...F}))}afterOrEqual(u,F){return this.use(PF({expectedValue:u,...F}))}before(u,F){return this.use(mF({expectedValue:u,...F}))}beforeOrEqual(u,F){return this.use(vF({expectedValue:u,...F}))}sameAs(u,F){return this.use(cF({otherField:u,...F}))}notSameAs(u,F){return this.use(fF({otherField:u,...F}))}afterField(u,F){return this.use(nF({otherField:u,...F}))}afterOrSameAs(u,F){return this.use(rF({otherField:u,...F}))}beforeField(u,F){return this.use(dF({otherField:u,...F}))}beforeOrSameAs(u,F){return this.use(lF({otherField:u,...F}))}weekend(){return this.use(pF())}weekday(){return this.use(iF())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},$C=class D{#D;#u=(u,F)=>{F.report(V.union,"union",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}[n](u,F,$){return{type:"union",fieldName:u,propertyName:$.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map((E)=>E[n](u,F,$))}}},EC=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[n](D,u,F){return{conditionalFnRefId:u.trackConditional(this.#u),schema:this.#D[n](D,u,F)}}};function f2(D){return new $C(D)}f2.if=function D(u,F){return new EC(u,F)};f2.else=function D(u){return new EC(()=>!0,u)};var W0=class extends mu{optional(){return new _w(this)}nullable(){return new bw(this)}},bw=class D extends W0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[n](u,F,$){let E=this.#D[n](u,F,$);if(E.type!=="union")E.allowNull=!0;return E}},_w=class D extends W0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[n](u,F,$){let E=this.#D[n](u,F,$);if(E.type!=="union")E.isOptional=!0;return E}},A0=class extends W0{options;validations;constructor(D,u){super();this.options=D||{bail:!0,allowNull:!1,isOptional:!1},this.validations=u||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((u)=>{return{ruleFnId:D.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(Iu in D?D[Iu]():D),this}bail(D){return this.options.bail=D,this}},wC=class D extends A0{#D;#u=!1;[mD]="vine.array";[pD]=(u)=>{return Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}allowUnknownProperties(){return this.#u=!0,this}clone(){let u=new D(this.#D.map((F)=>F.clone()),this.cloneOptions(),this.cloneValidations());if(this.#u)u.allowUnknownProperties();return u}[n](u,F,$){return{type:"tuple",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#u,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F),properties:this.#D.map((E,w)=>E[n](String(w),F,$))}}},tF=x((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(V["array.minLength"],"array.minLength",F,u)}),sF=x((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(V["array.maxLength"],"array.maxLength",F,u)}),aF=x((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(V["array.fixedLength"],"array.fixedLength",F,u)}),oF=x((D,u,F)=>{if(!F.isValid)return;if(D.length<=0)F.report(V.notEmpty,"notEmpty",F)}),eF=x((D,u,F)=>{if(!F.isValid)return;if(!R.isDistinct(D,u.fields))F.report(V.distinct,"distinct",F,u)}),D6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.filter(($)=>R.exists($)&&$!==""),F)}),BC=class D extends A0{static rules={compact:D6,notEmpty:oF,distinct:eF,minLength:tF,maxLength:sF,fixedLength:aF};#D;[mD]="vine.array";[pD]=(u)=>{return Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}minLength(u){return this.use(tF({min:u}))}maxLength(u){return this.use(sF({max:u}))}fixedLength(u){return this.use(aF({size:u}))}notEmpty(){return this.use(oF())}distinct(u){return this.use(eF({fields:u}))}compact(){return this.use(D6())}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[n](u,F,$){return{type:"array",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[n]("*",F,$),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},Pw=class D extends W0{#D;[mD]="types.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[n](u,F,$){return $.toCamelCase=!0,this.#D[n](u,F,$)}},YC=class D extends A0{#D;#u=[];#F=!1;[mD]="vine.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}getProperties(){return Object.keys(this.#D).reduce((u,F)=>{return u[F]=this.#D[F].clone(),u},{})}allowUnknownProperties(){return this.#F=!0,this}merge(u){return this.#u.push(u),this}clone(){let u=new D(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#u.forEach((F)=>u.merge(F)),this.#F)u.allowUnknownProperties();return u}toCamelCase(){return new Pw(this)}[n](u,F,$){return{type:"object",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#F,validations:this.compileValidations(F),properties:Object.keys(this.#D).map((E)=>{return this.#D[E][n](E,F,$)}),groups:this.#u.map((E)=>{return E[n](F,$)})}}},u6=x((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length<u.min)F.report(V["record.minLength"],"record.minLength",F,u)}),F6=x((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length>u.max)F.report(V["record.maxLength"],"record.maxLength",F,u)}),C6=x((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length!==u.size)F.report(V["record.fixedLength"],"record.fixedLength",F,u)}),$6=x((D,u,F)=>{if(!F.isValid)return;u(Object.keys(D),F)}),JC=class D extends A0{static rules={maxLength:F6,minLength:u6,fixedLength:C6,validateKeys:$6};#D;[mD]="vine.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}minLength(u){return this.use(u6({min:u}))}maxLength(u){return this.use(F6({max:u}))}fixedLength(u){return this.use(C6({size:u}))}validateKeys(...u){return this.use($6(...u))}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[n](u,F,$){return{type:"record",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[n]("*",F,$),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},E6=x((D,u,F)=>{if(typeof D!=="string")F.report(V.string,"string",F)}),w6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isEmail(D,u))F.report(V.email,"email",F)}),B6=x((D,u,F)=>{if(!F.isValid)return;let $=u&&typeof u==="function"?u(F):u,E=$?.locale||"any";if(!R.isMobilePhone(D,E,$))F.report(V.mobile,"mobile",F)}),Y6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isIP(D,u?.version))F.report(V.ipAddress,"ipAddress",F)}),J6=x((D,u,F)=>{if(!F.isValid)return;if(!u.test(D))F.report(V.regex,"regex",F)}),Z6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isHexColor(D))F.report(V.hexCode,"hexCode",F)}),K6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isURL(D,u))F.report(V.url,"url",F)}),M6=x(async(D,u,F)=>{if(!F.isValid)return;if(!await R.isActiveURL(D))F.report(V.activeUrl,"activeUrl",F)}),X6=x((D,u,F)=>{if(!F.isValid)return;let $="a-zA-Z";if(u){if(u.allowSpaces)$+="\\s";if(u.allowDashes)$+="-";if(u.allowUnderscores)$+="_"}if(!new RegExp(`^[${$}]+\$`).test(D))F.report(V.alpha,"alpha",F)}),W6=x((D,u,F)=>{if(!F.isValid)return;let $="a-zA-Z0-9";if(u){if(u.allowSpaces)$+="\\s";if(u.allowDashes)$+="-";if(u.allowUnderscores)$+="_"}if(!new RegExp(`^[${$}]+\$`).test(D))F.report(V.alphaNumeric,"alphaNumeric",F)}),A6=x((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(V.minLength,"minLength",F,u)}),Q6=x((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(V.maxLength,"maxLength",F,u)}),z6=x((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(V.fixedLength,"fixedLength",F,u)}),G6=x((D,u,F)=>{if(!F.isValid)return;if(!D.endsWith(u.substring))F.report(V.endsWith,"endsWith",F,u)}),q6=x((D,u,F)=>{if(!F.isValid)return;if(!D.startsWith(u.substring))F.report(V.startsWith,"startsWith",F,u)}),H6=x((D,u,F)=>{if(!F.isValid)return;if(R.getNestedValue(u.otherField,F)!==D){F.report(V.sameAs,"sameAs",F,u);return}}),U6=x((D,u,F)=>{if(!F.isValid)return;if(R.getNestedValue(u.otherField,F)===D){F.report(V.notSameAs,"notSameAs",F,u);return}}),O6=x((D,u,F)=>{if(!F.isValid)return;let $=u?.confirmationField||`${F.name}_confirmation`;if(F.parent[$]!==D){F.report(V.confirmed,"confirmed",F,{otherField:$});return}}),V6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.trim(),F)}),L6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(KC.default.default(D,u),F)}),T6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleUpperCase(u),F)}),N6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleLowerCase(u),F)}),I6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(OD(D),F)}),x6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(ZC.default.default(D),F)}),S6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(_2(D,u),F)}),h6=x((D,u,F)=>{if(!F.isValid)return;if(!(typeof u.choices==="function"?u.choices(F):u.choices).includes(D)){F.report(V.in,"in",F,u);return}}),y6=x((D,u,F)=>{if(!F.isValid)return;if((typeof u.list==="function"?u.list(F):u.list).includes(D)){F.report(V.notIn,"notIn",F,u);return}}),g6=x((D,u,F)=>{if(!F.isValid)return;let $=u?typeof u==="function"?u(F)?.provider||[]:u.provider:[];if(!$.length){if(!R.isCreditCard(D))F.report(V.creditCard,"creditCard",F,{providersList:"credit"})}else if(!$.find((w)=>R.isCreditCard(D,{provider:w})))F.report(V.creditCard,"creditCard",F,{providers:$,providersList:$.join("/")})}),j6=x((D,u,F)=>{if(!F.isValid)return;let $=typeof u==="function"?u(F).countryCode:u.countryCode;if(!$.find((w)=>R.isPassportNumber(D,w)))F.report(V.passport,"passport",F,{countryCodes:$})}),R6=x((D,u,F)=>{if(!F.isValid)return;let $=u?typeof u==="function"?u(F)?.countryCode||[]:u.countryCode:[];if(!$.length){if(!R.isPostalCode(D,"any"))F.report(V.postalCode,"postalCode",F)}else if(!$.find((w)=>R.isPostalCode(D,w)))F.report(V.postalCode,"postalCode",F,{countryCodes:$})}),k6=x((D,u,F)=>{if(!F.isValid)return;if(!u||!u.version){if(!R.isUUID(D))F.report(V.uuid,"uuid",F)}else if(!u.version.find((E)=>R.isUUID(D,E)))F.report(V.uuid,"uuid",F,u)}),b6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isAscii(D))F.report(V.ascii,"ascii",F)}),_6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isIBAN(D))F.report(V.iban,"iban",F)}),P6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isJWT(D))F.report(V.jwt,"jwt",F)}),m6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isLatLong(D))F.report(V.coordinates,"coordinates",F)}),X8=class D extends Bu{static rules={in:h6,jwt:P6,url:K6,iban:_6,uuid:k6,trim:V6,email:w6,alpha:X6,ascii:b6,notIn:y6,regex:J6,escape:x6,sameAs:H6,mobile:B6,string:E6,hexCode:Z6,passport:j6,endsWith:G6,confirmed:O6,activeUrl:M6,minLength:A6,notSameAs:U6,maxLength:Q6,ipAddress:Y6,creditCard:g6,postalCode:R6,startsWith:q6,toUpperCase:T6,toLowerCase:N6,toCamelCase:I6,fixedLength:z6,coordinates:m6,normalizeUrl:S6,alphaNumeric:W6,normalizeEmail:L6};[mD]="vine.string";[pD]=(u)=>{return typeof u==="string"};constructor(u,F){super(u,F||[E6()])}url(...u){return this.use(K6(...u))}activeUrl(){return this.use(M6())}email(...u){return this.use(w6(...u))}mobile(...u){return this.use(B6(...u))}ipAddress(u){return this.use(Y6(u?{version:u}:void 0))}hexCode(){return this.use(Z6())}regex(u){return this.use(J6(u))}alpha(u){return this.use(X6(u))}alphaNumeric(u){return this.use(W6(u))}minLength(u){return this.use(A6({min:u}))}maxLength(u){return this.use(Q6({max:u}))}fixedLength(u){return this.use(z6({size:u}))}confirmed(u){return this.use(O6(u))}trim(){return this.use(V6())}normalizeEmail(u){return this.use(L6(u))}toUpperCase(){return this.use(T6())}toLowerCase(){return this.use(N6())}toCamelCase(){return this.use(I6())}escape(){return this.use(x6())}normalizeUrl(...u){return this.use(S6(...u))}startsWith(u){return this.use(q6({substring:u}))}endsWith(u){return this.use(G6({substring:u}))}sameAs(u){return this.use(H6({otherField:u}))}notSameAs(u){return this.use(U6({otherField:u}))}in(u){return this.use(h6({choices:u}))}notIn(u){return this.use(y6({list:u}))}creditCard(...u){return this.use(g6(...u))}passport(...u){return this.use(j6(...u))}postalCode(...u){return this.use(R6(...u))}uuid(...u){return this.use(k6(...u))}ascii(){return this.use(b6())}iban(){return this.use(_6())}jwt(){return this.use(P6())}coordinates(){return this.use(m6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},v6=x((D,u,F)=>{let $=u.strict?D:R.asNumber(D);if(typeof $!=="number"||Number.isNaN($)||$===Number.POSITIVE_INFINITY||$===Number.NEGATIVE_INFINITY){F.report(V.number,"number",F);return}F.mutate($,F)}),c6=x((D,u,F)=>{if(!F.isValid)return;if(D<u.min)F.report(V.min,"min",F,u)}),f6=x((D,u,F)=>{if(!F.isValid)return;if(D>u.max)F.report(V.max,"max",F,u)}),n6=x((D,u,F)=>{if(!F.isValid)return;if(D<u.min||D>u.max)F.report(V.range,"range",F,u)}),r6=x((D,u,F)=>{if(!F.isValid)return;if(D<0)F.report(V.positive,"positive",F)}),d6=x((D,u,F)=>{if(!F.isValid)return;if(D>=0)F.report(V.negative,"negative",F)}),l6=x((D,u,F)=>{if(!F.isValid)return;if(!R.isDecimal(String(D),{force_decimal:u.range[0]!==0,decimal_digits:u.range.join(",")}))F.report(V.decimal,"decimal",F,{digits:u.range.join("-")})}),p6=x((D,u,F)=>{if(!F.isValid)return;if(!Number.isInteger(D))F.report(V.withoutDecimals,"withoutDecimals",F)}),i6=x((D,u,F)=>{if(!F.isValid)return;if(!u.values.includes(D))F.report(V["number.in"],"in",F,u)}),nu=class D extends Bu{static rules={in:i6,max:f6,min:c6,range:n6,number:v6,decimal:l6,negative:d6,positive:r6,withoutDecimals:p6};[mD]="vine.number";[pD]=(u)=>{let F=R.asNumber(u);return!Number.isNaN(F)};constructor(u,F){super(u,F||[v6(u||{})])}min(u){return this.use(c6({min:u}))}max(u){return this.use(f6({max:u}))}range(u){return this.use(n6({min:u[0],max:u[1]}))}positive(){return this.use(r6())}negative(){return this.use(d6())}decimal(u){return this.use(l6({range:Array.isArray(u)?u:[u]}))}withoutDecimals(){return this.use(p6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}in(u){return this.use(i6({values:u}))}},t6=x((D,u,F)=>{let $=u.strict===!0?D:R.asBoolean(D);if(typeof $!=="boolean"){F.report(V.boolean,"boolean",F);return}F.mutate($,F)}),ru=class D extends Bu{static rules={boolean:t6};[mD]="vine.boolean";[pD]=(u)=>{return typeof(this.options.strict===!0?u:R.asBoolean(u))==="boolean"};constructor(u,F){super(u,F||[t6(u||{})])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},s6=x((D,u,F)=>{let $=D;if(typeof u.expectedValue==="boolean")$=R.asBoolean(D);else if(typeof u.expectedValue==="number")$=R.asNumber(D);if($!==u.expectedValue){F.report(V.literal,"literal",F,u);return}F.mutate($,F)}),MC=class D extends Bu{static rules={equals:s6};#D;constructor(u,F,$){super(F,$||[s6({expectedValue:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},mw=["on","1","yes","true",!0,1],a6=x((D,u,F)=>{if(!mw.includes(D))F.report(V.accepted,"accepted",F)}),XC=class D extends Bu{static rules={accepted:a6};constructor(u,F){super(u,F||[a6()])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},vw=class D{#D;#u=(u,F)=>{F.report(V.unionGroup,"unionGroup",F)};constructor(u){this.#D=u}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}otherwise(u){return this.#u=u,this}[n](u,F){return{type:"group",elseConditionalFnRefId:u.trackConditional(this.#u),conditions:this.#D.map(($)=>$[n](u,F))}}},WC=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[n](D,u){return{schema:{type:"sub_object",properties:Object.keys(this.#D).map((F)=>{return this.#D[F][n](F,D,u)}),groups:[]},conditionalFnRefId:D.trackConditional(this.#u)}}};function n2(D){return new vw(D)}n2.if=function D(u,F){return new WC(u,F)};n2.else=function D(u){return new WC(()=>!0,u)};var cw=class D extends Bu{static rules={enum:K8};#D;constructor(u,F,$){super(F,$||[K8({choices:Object.values(u)})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},fw=class D{#D;#u=(u,F)=>{F.report(V.unionOfTypes,"unionOfTypes",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}[n](u,F,$){return{type:"union",fieldName:u,propertyName:$.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map((E)=>{return{conditionalFnRefId:F.trackConditional((w,C)=>{return E[pD](w,C)}),schema:E[n](u,F,$)}})}}},nw=class extends mu{group=n2;union=f2;string(){return new X8}boolean(D){return new ru(D)}accepted(){return new XC}number(D){return new nu(D)}date(D){return new c2(D)}literal(D){return new MC(D)}object(D){return new YC(D)}array(D){return new BC(D)}tuple(D){return new wC(D)}record(D){return new JC(D)}enum(D){if(Array.isArray(D)||typeof D==="function")return new fu(D);return new cw(D)}any(){return new e6}unionOfTypes(D){let u=new Set;return D.forEach((F)=>{if(!F[pD]||!F[mD])throw new Error(`Cannot use "${F.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(u.has(F[mD]))throw new Error(`Cannot use duplicate schema "${F[mD]}". "vine.unionOfTypes" needs distinct schema types only`);u.add(F[mD])}),u.clear(),new fw(D)}},rw={required:V.required,array:V.array,object:V.object},v2=class{#D;messagesProvider;errorReporter;#u(D){let u=kF();return{compilerNode:{type:"root",schema:D[n]("",u,{toCamelCase:!1})},refs:u.toJSON()}}constructor(D,u){let{compilerNode:F,refs:$}=this.#u(D);this.#D={schema:F,refs:$};let E=u.metaDataValidator,w=new RF(F,{convertEmptyStringsToNull:u.convertEmptyStringsToNull,messages:rw}).compile();if(this.errorReporter=u.errorReporter,this.messagesProvider=u.messagesProvider,E)this.validate=(C,Z)=>{let M=Z??{},W=M.meta??{},X=M.errorReporter??this.errorReporter,q=M.messagesProvider??this.messagesProvider;return E(W),w(C,W,$,q,X())};else this.validate=(C,Z)=>{let M=Z??{},W=M.meta??{},X=M.errorReporter??this.errorReporter,q=M.messagesProvider??this.messagesProvider;return w(C,W,$,q,X())}}async tryValidate(D,...[u]){try{return[null,await this.validate(D,u)]}catch(F){if(F instanceof L2)return[F,null];throw F}}toJSON(){let{schema:D,refs:u}=this.#D;return{schema:structuredClone(D),refs:u}}},AC=class extends nw{messagesProvider=new Z0(V,F3);errorReporter=()=>new T2;convertEmptyStringsToNull=!1;helpers=R;createRule=x;compile(D){return new v2(D,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(D){return{compile:(u)=>{return new v2(u,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:D})}}}validate(D){return this.compile(D.schema).validate(D.data,D)}tryValidate(D){return this.compile(D.schema).tryValidate(D.data,D)}},dw=new AC,y=dw;var QC={APP_NAME:y.string(),APP_ENV:y.enum(["local","dev","stage","prod"]),APP_KEY:y.string(),APP_URL:y.string(),PORT:y.number(),PORT_BACKEND:y.number(),PORT_ADMIN:y.number(),PORT_LIBRARY:y.number(),PORT_DESKTOP:y.number(),PORT_EMAIL:y.number(),PORT_DOCS:y.number(),PORT_INSPECT:y.number(),PORT_API:y.number(),PORT_SYSTEM_TRAY:y.number(),APP_MAINTENANCE:y.boolean(),DEBUG:y.boolean(),API_PREFIX:y.string(),DOCS_PREFIX:y.string(),DB_CONNECTION:y.enum(["mysql","sqlite","postgres"]),DB_HOST:y.string(),DB_PORT:y.number(),DB_DATABASE:y.string(),DB_USERNAME:y.string(),DB_PASSWORD:y.string(),AWS_ACCOUNT_ID:y.string(),AWS_ACCESS_KEY_ID:y.string(),AWS_SECRET_ACCESS_KEY:y.string(),AWS_DEFAULT_REGION:y.string(),AWS_DEFAULT_PASSWORD:y.string(),MAIL_MAILER:y.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:y.string(),MAIL_PORT:y.number(),MAIL_USERNAME:y.string(),MAIL_PASSWORD:y.string(),MAIL_ENCRYPTION:y.string(),MAIL_FROM_NAME:y.string(),MAIL_FROM_ADDRESS:y.string(),SEARCH_ENGINE_DRIVER:y.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:y.string(),MEILISEARCH_KEY:y.string(),FRONTEND_APP_ENV:y.enum(["development","staging","production"]),FRONTEND_APP_URL:y.string()};var lw={APP_ENV:["local","dev","development","staging","prod","production"],DB_CONNECTION:["mysql","sqlite","postgres","dynamodb"],MAIL_MAILER:["smtp","mailgun","ses","postmark","sendmail","log"],SEARCH_ENGINE_DRIVER:["opensearch"],FRONTEND_APP_ENV:["development","staging","production"]},pw=Object.entries(QC).reduce((D,[u,F])=>{let $;switch(typeof F){case"string":$=y.string();break;case"number":$=y.number();break;case"boolean":$=y.boolean();break;default:if(Array.isArray(F)){$=y.enum(F);break}if(typeof F==="object"){let w=Symbol.for("schema_name"),C=F[w];if(C==="vine.string"){$=y.string();break}if(C==="vine.number"){$=y.number();break}if(C==="vine.boolean"){$=y.boolean();break}if(!C){$=y.enum(lw.APP_ENV);break}console.error("Unknown env value type",typeof F)}throw new Error(`Invalid env value for ${u}`)}let E=u;return D[E]=$,D},{}),kA=y.object(pw);var tw={get:(D,u)=>{let F=D[u];if(typeof F==="string"&&/^\d+$/.test(F)&&u!=="AWS_ACCOUNT_ID")return Number(F);if(typeof F==="string"&&/^true|false$/.test(F))return F==="true";if(F instanceof fu)return D[u];if(F instanceof ru)return!!D[u];if(F instanceof nu)return Number(D[u]);return F}};function sw(){return typeof Bun!=="undefined"?Bun.env:iw.env}var j=new Proxy(sw(),tw);var zC={name:j.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:j.APP_ENV??"local",url:j.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:j.DEBUG??!1,key:j.APP_KEY,maintenanceMode:j.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"};var GC={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:j.AWS_ACCESS_KEY_ID||"",secret:j.AWS_SECRET_ACCESS_KEY||"",region:j.AWS_DEFAULT_REGION||"us-east-1",table:"cache",endpoint:""},memcached:{persistent_id:"",sasl:["",""],options:{},servers:[{host:"127.0.0.1",port:11211,weight:100}]},redis:{connection:"cache",host:"127.0.0.1",port:6379,password:"",username:"stacks"}}};var qC={name:"My Custom CLI",command:"custom-cli",description:"This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",deploy:!0};var W8={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}};var HC={type:"serverless",driver:"aws",firewall:W8.firewall,environments:["production","staging","development"],storage:{},api:{prefix:j.API_PREFIX||"api",description:"My awesome Stacks API",deploy:!0,memorySize:512,prewarm:10,timeout:30},cdn:{compress:!0,allowedMethods:"ALL",cachedMethods:"GET_HEAD",originShieldRegion:"us-east-1",minTtl:0,defaultTtl:86400,maxTtl:31536000,cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:1}},fileSystem:!0};var UC={default:j.DB_CONNECTION||"sqlite",connections:{sqlite:{database:j.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:j.AWS_ACCESS_KEY_ID||"",secret:j.AWS_SECRET_ACCESS_KEY||"",region:j.AWS_DEFAULT_REGION||"us-east-1",prefix:j.DB_DATABASE||"stacks",endpoint:"http://localhost",port:j.DB_PORT||8000},mysql:{name:j.DB_DATABASE||"stacks",host:j.DB_HOST||"127.0.0.1",port:j.DB_PORT||3306,username:j.DB_USERNAME||"root",password:j.DB_PASSWORD||"",prefix:""},postgres:{name:j.DB_DATABASE||"stacks",host:j.DB_HOST||"127.0.0.1",port:j.DB_PORT||3306,username:j.DB_USERNAME||"",password:j.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"};var OC={a:[{name:j.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]};var VC={from:{name:j.MAIL_FROM_NAME||"Stacks",address:j.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:j.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}};var LC={messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}};var TC={hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]};var NC={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}};var IC={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",releaseable:!0,vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}};var xC={logsPath:x0("logs/stacks.log"),deploymentsPath:x0("logs/deployments.log")};var SC={default:"email"};var hC={driver:"stripe"};var yC={frontend:j.PORT??3000,backend:j.PORT_BACKEND??3001,admin:j.PORT_ADMIN??3002,library:j.PORT_LIBRARY??3003,desktop:j.PORT_DESKTOP??3004,email:j.PORT_EMAIL??3005,docs:j.PORT_DOCS??3006,inspect:j.PORT_INSPECT??3007,api:j.PORT_API??3008,systemTray:j.PORT_SYSTEM_TRAY??3009,database:3010};var gC={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}};var jC={driver:"opensearch"};var RC={aws:{accountId:j.AWS_ACCOUNT_ID||"",appId:j.AWS_ACCESS_KEY_ID||"",apiKey:j.AWS_SECRET_ACCESS_KEY||"",region:j.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}};var kC={driver:"s3"};var bC={name:"Stacks",members:{chris:"chris@stacksjs.org",blake:"blake@stacksjs.org",zoltan:"zoltan@stacksjs.org",freddy:"freddy@stacksjs.org",glenn:"glenn@stacksjs.org",dorell:"dorell@stacksjs.org",avery:"avery@stacksjs.org",adelino:"adelino@stacksjs.org"}};var _C={shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}},theme:{colors:{veryCool:"#0000ff",brand:{primary:"hsl(var(--hue, 217) 78% 51%)"}}}};var aw={ai:p1,analytics:i1,app:zC,cache:GC,cli:qC,cloud:HC,database:UC,dns:OC,email:VC,errors:LC,git:TC,hashing:NC,library:IC,logging:xC,notification:SC,queue:gC,payment:hC,ports:yC,searchEngine:jC,security:W8,services:RC,storage:kC,team:bC,ui:_C},r2=aw;async function PC(D){if(!D?.port)D={port:3000};return console.log("Creating local tunnel",D.port),"localTunnel"}async function Au(D){return await PC({port:D})}async function ow({domain:D=BD.app.url||"stacks",type:u="frontend",localhost:F=!1,https:$=void 0,network:E=void 0}={}){let w=D.replace(/\.[^.]+$/,".localhost");switch(u){case"frontend":if(E)return await Au(BD.ports?.frontend||3000);if(F)return`http://localhost:${BD.ports?.frontend}`;break;case"backend":if(E)return await Au(BD.ports?.backend||3001);if(F)return`http://localhost:${BD.ports?.backend}`;w=`api.${w}`;break;case"admin":if(E)return await Au(BD.ports?.admin||3002);if(F)return`http://localhost:${BD.ports?.admin}`;w=`admin.${w}`;break;case"library":if(E)return await Au(BD.ports?.library||3003);if(F)return`http://localhost:${BD.ports?.library}`;w=`libs.${w}`;break;case"email":if(E)return await Au(BD.ports?.email||3005);if(F)return`http://localhost:${BD.ports?.email}`;w=`email.${w}`;break;case"desktop":if(E)return await Au(BD.ports?.desktop||3004);if(F)return`http://localhost:${BD.ports?.desktop}`;w=`desktop.${w}`;break;case"docs":if(E)return await Au(BD.ports?.docs||3006);if(F)return`http://localhost:${BD.ports?.docs}`;w=`docs.${w}`;break;case"inspect":if(E)return await Au(BD.ports?.inspect||3007);if(F)return`http://localhost:${BD.ports?.inspect}`;w=`inspect.${w}`;break;default:if(F)return`http://localhost:${BD.ports?.frontend}`}if($)return`https://${w}`;return`http://${w}`}function ew(D){return D}function DB(D){return D}function uB(D){return D}function FB(D){return D}function CB(D){return D}function $B(D){return D}function EB(D){return D}function wB(D){return D}function BB(D){return D}function YB(D){return D}function JB(D){return D}function ZB(D){return D}function KB(D){return D}function MB(D){return D}function XB(D){return D}function WB(D){return D}function AB(D){return D}function QB(D){return D}function zB(D){return D}function GB(D){return D}function qB(D){return D}function HB(D){return D}function UB(D){return D}function OB(D){return D}function VB(D){return D}function LB(D){return D}function TB(D){return D}var t={...r8,...r2},NB=t.ai,IB=t.analytics,Su=t.app,xB=t.cache,SB=t.cloud,hB=t.cli,yB=t.database,gB=t.dns,jB=t.docs,RB=t.email,kB=t.errors,bB=t.git,_B=t.hashing,PB=t.library,mB=t.logging,vB=t.notification,cB=t.payment,fB=t.ports,nB=t.queue,rB=t.security,dB=t.searchEngine,lB=t.services,pB=t.storage,iB=t.team,tB=t.ui;function sB(){if(Su.env==="local")return"dev";if(Su.env==="development")return"dev";if(Su.env==="staging")return"stage";if(Su.env==="production")return"prod";if(!Su.env)throw new Error("Couldn\'t determine app environment");return Su.env}class d2{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(D,u){if(this.shouldExitProcess=u?.shouldExit!==!1,u?.silent!==!0)this.writeErrorToConsole(D);let F;if(u?.message)F=u.message;else if(D instanceof Error)F=D.message;else if(typeof D==="string")F=D;else F=JSON.stringify(D);let $=new Error(F);if(D instanceof Error)Object.assign($,D);return this.writeErrorToFile($).catch((E)=>console.error(E)),$}static handleError(D,u){return this.handle(D,u),D}static async writeErrorToFile(D){if(!(D instanceof Error)){console.error("Error is not an instance of Error:",D);return}let u=`[${new Date().toISOString()}] ${D.name}: ${D.message}\n`,F=n8("stacks.log")??n8("errors.log");try{await cC(r1(F),{recursive:!0}),await vC(F,u)}catch($){console.error("Failed to write to error file:",$)}}static writeErrorToConsole(D){console.error(D);let u=typeof D==="string"?D:D instanceof Error?D.message:JSON.stringify(D);if(u.includes("bunx --bun cdk destroy")||u===`Failed to execute command: ${mC("bunx --bun eslint . --fix")}`||u===`Failed to execute command: ${mC("bun storage/framework/core/actions/src/lint/fix.ts")}`){if(!this.isTestEnvironment)console.log("No need to worry. The edge function is currently being destroyed. Please run `buddy undeploy` shortly again, and continue doing so until it succeeds running."),console.log("Hoping to see you back soon!")}if(this.shouldExitProcess)DY.exit(1)}}function fC(D,u){let F;if(u3(D))F=D;else if(D instanceof Error)F=D.message;else if(u instanceof Error)F=u.message;else F=String(D);return Uu(`ERROR: ${uY(F)}`),d2.handle(D,u)}async function Uu(D,u){let F=`[${new Date().toISOString()}] ${D}\n`;try{let $=u?.logFile??BD.logging.logsPath??"storage/logs/stacks.log";try{await oB($)}catch{console.log("Creating log file directory...",$),await cC(eB($),{recursive:!0})}await vC($,F)}catch($){console.error("Failed to write to log file:",$)}}var FY={withStackTrace:!1},rC=(D,u,F=FY)=>{let $=u.isOk()?{type:"Ok",value:u.value}:{type:"Err",value:u.error},E=F.withStackTrace?new Error().stack:void 0;return{data:$,message:D,stack:E}};function du(D,u,F,$){function E(w){return w instanceof F?w:new F(function(C){C(w)})}return new(F||(F=Promise))(function(w,C){function Z(X){try{W($.next(X))}catch(q){C(q)}}function M(X){try{W($.throw(X))}catch(q){C(q)}}function W(X){X.done?w(X.value):E(X.value).then(Z,M)}W(($=$.apply(D,[])).next())})}function nC(D){var u=typeof Symbol==="function"&&Symbol.iterator,F=u&&D[u],$=0;if(F)return F.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&$>=D.length)D=void 0;return{value:D&&D[$++],done:!D}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function hu(D){return this instanceof hu?(this.v=D,this):new hu(D)}function CY(D,u,F){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $=F.apply(D,u||[]),E,w=[];return E={},C("next"),C("throw"),C("return"),E[Symbol.asyncIterator]=function(){return this},E;function C(U){if($[U])E[U]=function(L){return new Promise(function(Q,P){w.push([U,L,Q,P])>1||Z(U,L)})}}function Z(U,L){try{M($[U](L))}catch(Q){q(w[0][3],Q)}}function M(U){U.value instanceof hu?Promise.resolve(U.value.v).then(W,X):q(w[0][2],U)}function W(U){Z("next",U)}function X(U){Z("throw",U)}function q(U,L){if(U(L),w.shift(),w.length)Z(w[0][0],w[0][1])}}function $Y(D){var u,F;return u={},$("next"),$("throw",function(E){throw E}),$("return"),u[Symbol.iterator]=function(){return this},u;function $(E,w){u[E]=D[E]?function(C){return(F=!F)?{value:hu(D[E](C)),done:E==="return"}:w?w(C):C}:w}}function EY(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=D[Symbol.asyncIterator],F;return u?u.call(D):(D=typeof nC==="function"?nC(D):D[Symbol.iterator](),F={},$("next"),$("throw"),$("return"),F[Symbol.asyncIterator]=function(){return this},F);function $(w){F[w]=D[w]&&function(C){return new Promise(function(Z,M){C=D[w](C),E(Z,M,C.done,C.value)})}}function E(w,C,Z,M){Promise.resolve(M).then(function(W){w({value:W,done:Z})},C)}}class MD{constructor(D){this._promise=D}static fromSafePromise(D){let u=D.then((F)=>new uu(F));return new MD(u)}static fromPromise(D,u){let F=D.then(($)=>new uu($)).catch(($)=>new iD(u($)));return new MD(F)}static fromThrowable(D,u){return(...F)=>{return new MD((()=>du(this,void 0,void 0,function*(){try{return new uu(yield D(...F))}catch($){return new iD(u?u($):$)}}))())}}static combine(D){return YY(D)}static combineWithAllErrors(D){return JY(D)}map(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return new iD(u.error);return new uu(yield D(u.value))})))}andThrough(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return new iD(u.error);let F=yield D(u.value);if(F.isErr())return new iD(F.error);return new uu(u.value)})))}andTee(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return new iD(u.error);try{yield D(u.value)}catch(F){}return new uu(u.value)})))}mapErr(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isOk())return new uu(u.value);return new iD(yield D(u.error))})))}andThen(D){return new MD(this._promise.then((u)=>{if(u.isErr())return new iD(u.error);let F=D(u.value);return F instanceof MD?F._promise:F}))}orElse(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return D(u.error);return new uu(u.value)})))}match(D,u){return this._promise.then((F)=>F.match(D,u))}unwrapOr(D){return this._promise.then((u)=>u.unwrapOr(D))}safeUnwrap(){return CY(this,arguments,function*D(){return yield hu(yield hu(yield*$Y(EY(yield hu(this._promise.then((u)=>u.safeUnwrap()))))))})}then(D,u){return this._promise.then(D,u)}}var A8=(D)=>new MD(Promise.resolve(new iD(D))),wY=MD.fromPromise,BY=MD.fromSafePromise,Xz=MD.fromThrowable,dC=(D)=>{let u=Ou([]);for(let F of D)if(F.isErr()){u=Yu(F.error);break}else u.map(($)=>$.push(F.value));return u},YY=(D)=>MD.fromSafePromise(Promise.all(D)).andThen(dC),lC=(D)=>{let u=Ou([]);for(let F of D)if(F.isErr()&&u.isErr())u.error.push(F.error);else if(F.isErr()&&u.isOk())u=Yu([F.error]);else if(F.isOk()&&u.isOk())u.value.push(F.value);return u},JY=(D)=>MD.fromSafePromise(Promise.all(D)).andThen(lC),Q8;(function(D){function u(E,w){return(...C)=>{try{let Z=E(...C);return Ou(Z)}catch(Z){return Yu(w?w(Z):Z)}}}D.fromThrowable=u;function F(E){return dC(E)}D.combine=F;function $(E){return lC(E)}D.combineWithAllErrors=$})(Q8||(Q8={}));var Ou=(D)=>new uu(D);function Yu(D){return new iD(D)}class uu{constructor(D){this.value=D}isOk(){return!0}isErr(){return!this.isOk()}map(D){return Ou(D(this.value))}mapErr(D){return Ou(this.value)}andThen(D){return D(this.value)}andThrough(D){return D(this.value).map((u)=>this.value)}andTee(D){try{D(this.value)}catch(u){}return Ou(this.value)}orElse(D){return Ou(this.value)}asyncAndThen(D){return D(this.value)}asyncAndThrough(D){return D(this.value).map(()=>this.value)}asyncMap(D){return MD.fromSafePromise(D(this.value))}unwrapOr(D){return this.value}match(D,u){return D(this.value)}safeUnwrap(){let D=this.value;return function*(){return D}()}_unsafeUnwrap(D){return this.value}_unsafeUnwrapErr(D){throw rC("Called `_unsafeUnwrapErr` on an Ok",this,D)}}class iD{constructor(D){this.error=D}isOk(){return!1}isErr(){return!this.isOk()}map(D){return Yu(this.error)}mapErr(D){return Yu(D(this.error))}andThrough(D){return Yu(this.error)}andTee(D){return Yu(this.error)}andThen(D){return Yu(this.error)}orElse(D){return D(this.error)}asyncAndThen(D){return A8(this.error)}asyncAndThrough(D){return A8(this.error)}asyncMap(D){return A8(this.error)}unwrapOr(D){return D}match(D,u){return u(this.error)}safeUnwrap(){let D=this.error;return function*(){throw yield Yu(D),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(D){throw rC("Called `_unsafeUnwrap` on an Err",this,D)}_unsafeUnwrapErr(D){return this.error}}var ZY=Q8.fromThrowable;M1();z8();q8();U8();function RJ(){let D=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,u=jJ();if(D.test(u))return 4;return 3}var U0={...I8({level:RJ()}),warning:(D)=>console.warn(D),dump:(...D)=>console.log(...D),dd:(...D)=>{console.log(...D),x8.exit(1)},echo:(D)=>console.log(D)};var Wu={info:async(D,u)=>{if(u?.styled===!1)console.log(D);else U0.info(D);await Uu(`INFO: ${H0(D)}`)},success:async(D,u)=>{if(u?.styled===!1)console.log(D);else U0.success(D);await Uu(`SUCCESS: ${H0(D)}`)},warn:async(D,u)=>{if(u?.styled===!1)console.log(D);else U0.warn(D);await Uu(`WARN: ${H0(D)}`)},warning:async(D,u)=>{if(u?.styled===!1)console.log(D);else U0.warn(D);await Uu(`WARN: ${H0(D)}`)},error:async(D,u)=>{fC(D,u)},debug:async(...D)=>{let F=`DEBUG: ${D.map(($)=>typeof $==="object"?JSON.stringify($,null,2):$).join(" ")}`;if(x8.env.APP_ENV==="production"||x8.env.APP_ENV==="prod")return Uu(F);U0.debug(F),await Uu(H0(F))},dump:(...D)=>D.forEach((u)=>console.log(u)),dd:(...D)=>{D.forEach((u)=>console.log(u)),x8.exit(1)},echo:(...D)=>console.log(...D)};var j4=p(h1(),1);import zK from"node-fetch";var S4="https://www.iana.org/whois?q=",h4={"whois.denic.de":"-T dn,ace","whois.nic.fr":"-V Md5.2"},y1={"br.com":"whois.centralnic.net","cn.com":"whois.centralnic.net","de.com":"whois.centralnic.net","eu.com":"whois.centralnic.net","gb.com":"whois.centralnic.net","gb.net":"whois.centralnic.net","gr.com":"whois.centralnic.net","hu.com":"whois.centralnic.net","in.net":"whois.centralnic.net","no.com":"whois.centralnic.net","qc.com":"whois.centralnic.net","ru.com":"whois.centralnic.net","sa.com":"whois.centralnic.net","se.com":"whois.centralnic.net","se.net":"whois.centralnic.net","uk.com":"whois.centralnic.net","uk.net":"whois.centralnic.net","us.com":"whois.centralnic.net","uy.com":"whois.centralnic.net","za.com":"whois.centralnic.net","jpn.com":"whois.centralnic.ne","web.com":"whois.centralnic.ne",com:"whois.verisign-grs.com","za.net":"whois.za.net",net:"whois.verisign-grs.com","eu.org":"whois.eu.org","za.org":"whois.za.org",org:"whois.pir.org","llyw.cymru":"whois.nic.llyw.cymru","gov.scot":"whois.nic.gov.scot","gov.wales":"whois.nic.gov.wales",edu:"whois.educause.edu",gov:"whois.dotgov.gov",int:"whois.iana.org","e164.arpa":"whois.ripe.net",arpa:"whois.iana.org",aero:"whois.aero",asia:"whois.nic.asia",biz:"whois.nic.biz",cat:"whois.nic.cat",coop:"whois.nic.coop",info:"whois.afilias.net",jobs:"whois.nic.jobs",mobi:"whois.afilias.net",museum:"whois.nic.museum",name:"whois.nic.name",post:"whois.dotpostregistry.net",pro:"whois.nic.pro",tel:"whois.nic.tel",travel:"whois.nic.travel",xxx:"whois.nic.xxx",ac:"whois.nic.ac",ae:"whois.aeda.net.ae",af:"whois.nic.af",ag:"whois.nic.ag",ai:"whois.nic.ai",am:"whois.amnic.net",ar:"whois.nic.ar",as:"whois.nic.as","priv.at":"whois.nic.priv.at",at:"whois.nic.at",au:"whois.auda.org.au",aw:"whois.nic.aw",ax:"whois.ax",be:"whois.dns.be",bf:"whois.registre.bf",bg:"whois.register.bg",bh:"whois.nic.bh",bi:"whois1.nic.bi",bj:"whois.nic.bj",bm:"whois.afilias-srs.net",bn:"whois.bnnic.bn",bo:"whois.nic.bo",br:"whois.registro.br",by:"whois.cctld.by",bw:"whois.nic.net.bw",bz:"whois.afilias-grs.info","co.ca":"whois.co.ca",ca:"whois.cira.ca",cc:"ccwhois.verisign-grs.com",cd:"whois.nic.cd",ch:"whois.nic.ch",ci:"whois.nic.ci",cl:"whois.nic.cl",cm:"whois.netcom.cm","edu.cn":"whois.edu.cn",cn:"whois.cnnic.cn","uk.co":"whois.uk.co",co:"whois.nic.co",cr:"whois.nic.cr",cx:"whois.nic.cx",cz:"whois.nic.cz",de:"whois.denic.de",dk:"whois.dk-hostmaster.dk",dm:"whois.dmdomains.dm",do:"whois.nic.do",dz:"whois.nic.dz",ec:"whois.nic.ec",ee:"whois.tld.ee",eu:"whois.eu",fi:"whois.fi",fj:"www.whois.fj",fm:"whois.nic.fm",fo:"whois.nic.fo",fr:"whois.nic.fr",gd:"whois.nic.gd",ge:"whois.nic.ge",gf:"whois.mediaserv.net",gg:"whois.gg",gh:"whois.nic.gh",gi:"whois2.afilias-grs.net",gl:"whois.nic.gl",gp:"whois.nic.gp",gq:"whois.dominio.gq",gs:"whois.nic.gs",gy:"whois.registry.gy",hk:"whois.hkirc.hk",hm:"whois.registry.hm",hn:"whois.nic.hn",hr:"whois.dns.hr",ht:"whois.nic.ht",hu:"whois.nic.hu",id:"whois.id",ie:"whois.weare.ie",il:"whois.isoc.org.il",im:"whois.nic.im",in:"whois.registry.in",io:"whois.nic.io",iq:"whois.cmc.iq",ir:"whois.nic.ir",is:"whois.isnic.is",it:"whois.nic.it",je:"whois.je",jp:"whois.jprs.jp",ke:"whois.kenic.or.ke",kg:"whois.kg",ki:"whois.nic.ki",kn:"whois.nic.kn",kr:"whois.kr",kw:"whois.nic.kw",ky:"whois.kyregistry.ky",kz:"whois.nic.kz",la:"whois.nic.la",lb:"whois.lbdr.org.lb",lc:"whois2.afilias-grs.net",li:"whois.nic.li",lk:"whois.nic.lk",ls:"whois.nic.ls",lt:"whois.domreg.lt",lu:"whois.dns.lu",lv:"whois.nic.lv",ly:"whois.nic.ly",ma:"whois.registre.ma",md:"whois.nic.md",me:"whois.nic.me",mg:"whois.nic.mg",mk:"whois.marnet.mk",ml:"whois.dot.ml",mm:"whois.registry.gov.mm",mn:"whois.nic.mn",mq:"whois.mediaserv.net",mr:"whois.nic.mr",ms:"whois.nic.ms",mt:"whois.nic.org.mt",mu:"whois.nic.mu",mw:"whois.nic.mw",mx:"whois.mx",my:"whois.mynic.my",mz:"whois.nic.mz",na:"whois.na-nic.com.na",nc:"whois.nc",nf:"whois.nic.nf",ng:"whois.nic.net.ng",nl:"whois.domain-registry.nl",no:"whois.norid.no",nu:"whois.iis.nu",nz:"whois.irs.net.nz",om:"whois.registry.om",pe:"kero.yachay.pe",pf:"whois.registry.pf",pk:"whois.pknic.net.pk","co.pl":"whois.co.pl",pl:"whois.dns.pl",pm:"whois.nic.pm",pr:"whois.afilias-srs.net",ps:"whois.pnina.ps",pt:"whois.dns.pt",pw:"whois.nic.pw",qa:"whois.registry.qa",re:"whois.nic.re",ro:"whois.rotld.ro",rs:"whois.rnids.rs","ac.ru":"whois.free.net","edu.ru":"whois.informika.ru","com.ru":"whois.flexireg.net","msk.ru":"whois.flexireg.net","net.ru":"whois.nic.net.ru","nov.ru":"whois.flexireg.net","org.ru":"whois.nic.net.ru","pp.ru":"whois.nic.net.ru","spb.ru":"whois.flexireg.net",ru:"whois.tcinet.ru",rw:"whois.ricta.org.rw",sa:"whois.nic.net.sa",sb:"whois.nic.net.sb",sc:"whois2.afilias-grs.net",sd:"whois.sdnic.sd",se:"whois.iis.se",sg:"whois.sgnic.sg",sh:"whois.nic.sh",si:"whois.register.si",sk:"whois.sk-nic.sk",sl:"whois.nic.sl",sm:"whois.nic.sm",sn:"whois.nic.sn",so:"whois.nic.so",ss:"whois.nic.ss",st:"whois.nic.st","msk.su":"whois.flexireg.net","nov.su":"whois.flexireg.net","spb.su":"whois.flexireg.net",su:"whois.tcinet.ru",sx:"whois.sx",sy:"whois.tld.sy",tc:"whois.nic.tc",td:"whois.nic.td",tf:"whois.nic.tf",tg:"whois.nic.tg",th:"whois.thnic.co.th",tk:"whois.dot.tk",tl:"whois.nic.tl",tm:"whois.nic.tm",tn:"whois.ati.tn",to:"whois.tonic.to",tr:"whois.trabis.gov.tr",tv:"whois.nic.tv",tw:"whois.twnic.net.tw",tz:"whois.tznic.or.tz","biz.ua":"whois.biz.ua","co.ua":"whois.co.ua","pp.ua":"whois.pp.ua",ua:"whois.ua",ug:"whois.co.ug","ac.uk":"whois.nic.ac.uk","gov.uk":"whois.gov.uk",uk:"whois.nic.uk","fed.us":"whois.nic.gov",us:"whois.nic.us",uy:"whois.nic.org.uy",uz:"whois.cctld.uz",vc:"whois2.afilias-grs.net",ve:"whois.nic.ve",vg:"whois.nic.vg",vu:"whois.dnrs.vu",wf:"whois.nic.wf",ws:"whois.website.ws",yt:"whois.nic.yt","ac.za":"whois.ac.za","co.za":"whois.registry.net.za","gov.za":"whois.gov.za","net.za":"net-whois.registry.net.za","org.za":"org-whois.registry.net.za","web.za":"web-whois.registry.net.za",zm:"whois.zicta.zm","xn--2scrj9c":"whois.registry.in","xn--3e0b707e":"whois.kr","xn--3hcrj9c":"whois.registry.in","xn--45br5cyl":"whois.registry.in","xn--45brj9c":"whois.registry.in","xn--4dbrk0ce":"whois.isoc.org.il","xn--80ao21a":"whois.nic.kz","xn--90a3ac":"whois.rnids.rs","xn--90ae":"whois.imena.bg","xn--90ais":"whois.cctld.by","xn--clchc0ea0b2g2a9gcd":"whois.sgnic.sg","xn--d1alf":"whois.marnet.mk","xn--e1a4c":"whois.eu","xn--fiqs8s":"cwhois.cnnic.cn","xn--fiqz9s":"cwhois.cnnic.cn","xn--fpcrj9c3d":"whois.registry.in","xn--fzc2c9e2c":"whois.nic.lk","xn--gecrj9c":"whois.registry.in","xn--h2breg3eve":"whois.registry.in","xn--h2brj9c8c":"whois.registry.in","xn--h2brj9c":"whois.registry.in","xn--j1amh":"whois.dotukr.com","xn--j6w193g":"whois.hkirc.hk","xn--kprw13d":"whois.twnic.net.tw","xn--kpry57d":"whois.twnic.net.tw","xn--lgbbat1ad8j":"whois.nic.dz","xn--mgb9awbf":"whois.registry.om","xn--mgba3a4f16a":"whois.nic.ir","xn--mgbaam7a8h":"whois.aeda.net.ae","xn--mgbah1a3hjkrd":"whois.nic.mr","xn--mgbbh1a71e":"whois.registry.in","xn--mgbbh1a":"whois.registry.in","xn--mgberp4a5d4ar":"whois.nic.net.sa","xn--mgbgu82a":"whois.registry.in","xn--mgbtx2b":"whois.cmc.iq","xn--mgbx4cd0ab":"whois.mynic.my","xn--node":"whois.itdc.ge","xn--o3cw4h":"whois.thnic.co.th","xn--ogbpf8fl":"whois.tld.sy","xn--p1ai":"whois.tcinet.ru","xn--pgbs0dh":"whois.ati.tn","xn--q7ce6a":"whois.nic.la","xn--qxa6a":"whois.eu","xn--rvc1e0am3e":"whois.registry.in","xn--s9brj9c":"whois.registry.in","xn--wgbh1c":"whois.dotmasr.eg","xn--wgbl6a":"whois.registry.qa","xn--xkc2al3hye2a":"whois.nic.lk","xn--xkc2dl3a5ee0h":"whois.registry.in","xn--y9a3aq":"whois.amnic.net","xn--yfro4i67o":"whois.sgnic.sg","xn--ygbi2ammx":"whois.pnina.ps"};var y4;((F)=>{F[F.SOCKS4=0]="SOCKS4";F[F.SOCKS5=1]="SOCKS5"})(y4||={});function g1(D){if(Array.isArray(D))return D.slice();if(typeof D==="object"&&D!==null){let u={};for(let F in D)if(Object.prototype.hasOwnProperty.call(D,F))u[F]=g1(D[F]);return u}return D}var OK=p(h1(),1);async function GK(D){let u=S4+D;try{let F=await zK(u);if(F.ok){let E=(await F.text()).match(/whois:\s+(\S+)/);if(E?.[1])return E[1]}}catch(F){console.error("Error in getting WhoIs server data from IANA",F)}return""}function qK(D){if(D==="com")return"whois.verisign-grs.com";return y1[D]}function g4(D){let u=D.split(".");for(let F=u.length-1;F>0;F--){let $=u.slice(F).join(".");if(y1[$])return $}return u[u.length-1]}function HK(D){return h4[D]}class b8{static iterParse(D,u){let F="",$=null,E="";for(let w=0;w<D.length;w++){let C=D[w];if(C==="\n"||E===":"&&C===" "){if(F.trim()in u)$=F.trim();else if($!==null){let Z=F.trim();if(Z!==""){let M=u[$];if(Array.isArray(M))M.push(Z);else u[$]=Z;$=null}}F=""}else if(C!==":")F=F+C;if(E=C,F==="Record maintained by"||F===">>>")break}return u}static parseData(D,u){if(!u)u={"Domain Name":"","Creation Date":"","Updated Date":"","Registry Expiry Date":"","Domain Status":[],Registrar:""};return u=b8.iterParse(D,u),u}}async function UK(D,u,F,$,E,w){let C=new TextDecoder(E),Z=new TextEncoder;if(!w){let W=new QK.Socket;return new Promise((X,q)=>{try{W.connect({port:$,host:F},()=>{if(u!=="")W.write(Z.encode(`${u} ${D}\r\n`));else W.write(Z.encode(`${D}\r\n`))}),W.on("data",(U)=>{X(C.decode(U))}),W.on("error",(U)=>{q(U)})}catch(U){q(U)}})}let M={proxy:{host:w.ip,port:w.port,type:w.type===1?5:4},command:"connect",destination:{host:F,port:$}};if(w.username&&w.password)M.proxy.userId=w.username,M.proxy.password=w.password;return new Promise((W,X)=>{j4.SocksClient.createConnection(M,(q,U)=>{if(q)X(q);else{if(!U)X(new Error("No socket info received!"));if(u!=="")U?.socket.write(Z.encode(`${u} ${D}\r\n`));else U?.socket.write(Z.encode(`${D}\r\n`));U?.socket.on("data",(L)=>{W(C.decode(L))}),U?.socket.resume()}})})}async function j1(D,u=!1,F=null){let $,E=43,w="",C,Z="utf-8";if(!F)$=g4(D),C=null;else $=F.tld?F.tld:g4(D),Z=F.encoding?F.encoding:"utf-8",C=F.proxy?F.proxy:null,w=F.server?F.server:"",E=F.serverPort?F.serverPort:43;if(w===""){let X=qK($);if(!X){if(Wu.debug(`No WhoIs server found for TLD: ${$}! Attempting IANA WhoIs database for server!`),X=await GK($),!X)return Wu.debug("WhoIs server could not be found!"),{_raw:"",parsedData:null};Wu.debug(`WhoIs sever found for ${$}: ${w}`)}w=X}let W=HK(w)||"";try{Wu.debug(`Attempting WHOIS lookup for ${D} on server ${w}`);let X=await UK(D,W,w,E,Z,C);if(Wu.debug("Raw WHOIS data received:",X),!u){let U=b8.parseData(X,null);return{_raw:X,parsedData:U}}let q=null;if(F?.parseData)q=g1(F.parseData);try{let U=b8.parseData(X,q);return{_raw:X,parsedData:U}}catch(U){return console.error("Error in parsing WhoIs data!",U),{_raw:X,parsedData:null}}}catch(X){return Wu.debug(`Error in WHOIS lookup for ${D} on server ${w}`,X),{_raw:"",parsedData:null}}}function TG(D,u=null){return Wu.debug(`Lookup called for ${D}`),j1(D,!0,u)}async function NG(D,u=!1,F=1,$=!1,E=null){let w=[];if(u){if(F>D.length)F=D.length;for(let C=0;C<D.length;C+=F){let Z=D.slice(C,C+F);w=await Promise.all(Z.map(async(M)=>{return await j1(M,$,E)}))}}else for(let C=0;C<D.length;C++){let Z=await j1(D[C],$,E);w.push(Z)}return w}var export_SocksClient=OK.SocksClient;export{j1 as whois,UK as tcpWhois,TG as lookup,qK as getWhoIsServer,g4 as getTLD,HK as getParameters,GK as findWhoIsServer,NG as batchWhois,b8 as WhoIsParser,export_SocksClient as SocksClient,y1 as SERVERS,y4 as ProxyType,h4 as PARAMETERS,S4 as IANA_CHK_URL};
|
|
161
|
+
const NOT_AN_ARRAY = '${D.array}';`}var hw=Object.getPrototypeOf(async function(){}).constructor,kF=class{variablesCounter=0;#D;#u;#F=new ww;constructor(D,u){this.#D=D,this.#u=u||{convertEmptyStringsToNull:!1}}#C(){this.#F.writeStatement(Sw({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#u.messages})),this.#F.writeStatement(xw(this.#u)),this.#F.writeStatement("let out;")}#$(){this.#F.writeStatement(Tw()),this.#F.writeStatement("return out;")}#E(){this.compileNode(this.#D.schema,this.#F,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#w(){return new hw("root","meta","refs","messagesProvider","errorReporter",this.#F.toString())}createFieldFor(D,u){switch(u.type){case"array":return Vw(u);case"root":return Hw(u);case"object":return Nw(D,this.variablesCounter,u);case"tuple":return Lw(D,u);case"record":return Iw(u)}}compileNode(D,u,F,$){switch(D.type){case"literal":return new Ow(D,u,this,F,$).compile();case"array":return new Mw(D,u,this,F,$).compile();case"record":return new Aw(D,u,this,F,$).compile();case"object":return new qw(D,u,this,F,$).compile();case"tuple":return new Zw(D,u,this,F,$).compile();case"union":return new Ww(D,u,this,F,$).compile()}}compile(){this.#C(),this.#E(),this.#$();let D=this.#w();return this.variablesCounter=0,this.#F.flush(),D}};function gF(){let D=0,u={};return{toJSON(){return u},track(F){D++;let $=`ref://${D}`;return u[$]=F,$},trackValidation(F){return this.track(F)},trackParser(F){return this.track(F)},trackTransformer(F){return this.track(F)},trackConditional(F){return this.track(F)}}}function x(D,u){let F={validator:D,isAsync:u?.isAsync||D.constructor.name==="AsyncFunction",implicit:u?.implicit??!1};return function(...$){return{rule:F,options:$[0]}}}var o6={};y0(o6,{COTYPE:()=>Rw,IS_OF_TYPE:()=>pD,ITYPE:()=>yw,OTYPE:()=>jw,PARSE:()=>r,UNIQUE_NAME:()=>mD,VALIDATION:()=>xu});var mD=Symbol.for("schema_name"),pD=Symbol.for("is_of_type"),r=Symbol.for("parse"),yw=Symbol.for("opaque_input_type"),jw=Symbol.for("opaque_type"),Rw=Symbol.for("camelcase_opaque_type"),xu=Symbol.for("to_validation"),cu=x((D,u,F)=>{let $=u(F);if(!F.isDefined&&$)F.report(V.required,"required",F)},{implicit:!0}),X8=class extends mu{optional(D){return new gw(this,D)}nullable(){return new kw(this)}transform(D){return new bw(D,this)}},kw=class D extends X8{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,$){let E=this.#D[r](u,F,$);return E.allowNull=!0,E}},gw=class D extends X8{#D;validations;constructor(u,F){super();this.#D=u,this.validations=F||[]}cloneValidations(){return this.validations.map((u)=>{return{options:u.options,rule:u.rule}})}compileValidations(u){return this.validations.map((F)=>{return{ruleFnId:u.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}use(u){return this.validations.push(xu in u?u[xu]():u),this}requiredWhen(u,F,$){if(typeof u==="function")return this.use(cu(u));let E;switch(F){case"=":E=(w)=>w===$;break;case"!=":E=(w)=>w!==$;break;case"in":E=(w)=>$.includes(w);break;case"notIn":E=(w)=>!$.includes(w);break;case">":E=(w)=>w>$;break;case"<":E=(w)=>w<$;break;case">=":E=(w)=>w>=$;break;case"<=":E=(w)=>w<=$}return this.use(cu((w)=>{let C=k.getNestedValue(u,w);return E(C)}))}requiredIfExists(u){let F=Array.isArray(u)?u:[u];return this.use(cu(($)=>{return F.every((E)=>k.exists(k.getNestedValue(E,$)))}))}requiredIfAnyExists(u){return this.use(cu((F)=>{return u.some(($)=>k.exists(k.getNestedValue($,F)))}))}requiredIfMissing(u){let F=Array.isArray(u)?u:[u];return this.use(cu(($)=>{return F.every((E)=>k.isMissing(k.getNestedValue(E,$)))}))}requiredIfAnyMissing(u){return this.use(cu((F)=>{return u.some(($)=>k.isMissing(k.getNestedValue($,F)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[r](u,F,$){let E=this.#D[r](u,F,$);return E.isOptional=!0,E.validations=E.validations.concat(this.compileValidations(F)),E}},bw=class D extends X8{#D;#u;constructor(u,F){super();this.#u=u,this.#D=F}clone(){return new D(this.#u,this.#D.clone())}[r](u,F,$){let E=this.#D[r](u,F,$);return E.transformFnId=F.trackTransformer(this.#u),E}},Bu=class extends X8{options;validations;constructor(D,u){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...D},this.validations=u||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((u)=>{return{ruleFnId:D.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(xu in D?D[xu]():D),this}bail(D){return this.options.bail=D,this}[r](D,u,F){return{type:"literal",fieldName:D,propertyName:F.toCamelCase?OD(D):D,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?u.trackParser(this.options.parse):void 0,validations:this.compileValidations(u)}}},e6=class D extends Bu{constructor(u,F){super(u,F)}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},M8=x((D,u,F)=>{let $=typeof u.choices==="function"?u.choices(F):u.choices;if(!$.includes(D))F.report(V.enum,"enum",F,{choices:$})}),fu=class D extends Bu{static rules={enum:M8};#D;getChoices(){return this.#D}constructor(u,F,$){super(F,$||[M8({choices:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},Su=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];e.default.extend(CC.default);e.default.extend(uC.default);e.default.extend(FC.default);var _w=x((D,u,F)=>{if(typeof D!=="string"&&typeof D!=="number"){F.report(V.date,"date",F);return}let $=!1,E=u.formats||Su;if(Array.isArray(E))E=[...E],$=E.includes("x");else if(typeof E!=="string")E={...E},$=E.format==="x";let w=$?k.asNumber(D):D,C=$&&!Number.isNaN(w)?e.default(w):e.default(D,E,!0);if(!C.isValid()){F.report(V.date,"date",F);return}F.meta.$value=C,F.meta.$formats=E,F.mutate(C.toDate(),F)}),bF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||Su,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the equals rule`);if(!w.isSame(Z,$))F.report(V["date.equals"],"date.equals",F,{expectedValue:C,compare:$})}),_F=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||Su,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="tomorrow"?e.default().add(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the after rule`);if(!w.isAfter(Z,$))F.report(V["date.after"],"date.after",F,{expectedValue:C,compare:$})}),PF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||Su,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="tomorrow"?e.default().add(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the afterOrEqual rule`);if(!w.isSameOrAfter(Z,$))F.report(V["date.afterOrEqual"],"date.afterOrEqual",F,{expectedValue:C,compare:$})}),mF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||Su,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="yesterday"?e.default().subtract(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the before rule`);if(!w.isBefore(Z,$))F.report(V["date.before"],"date.before",F,{expectedValue:C,compare:$})}),vF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=u.format||Su,w=F.meta.$value,C=typeof u.expectedValue==="function"?u.expectedValue(F):u.expectedValue,Z=C==="today"?e.default():C==="yesterday"?e.default().subtract(1,"day"):e.default(C,E,!0);if(!Z.isValid())throw new Error(`Invalid datetime value "${C}" value provided to the beforeOrEqual rule`);if(!w.isSameOrBefore(Z,$))F.report(V["date.beforeOrEqual"],"date.beforeOrEqual",F,{expectedValue:C,compare:$})}),cF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=k.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isSame(Z,$))F.report(V["date.sameAs"],"date.sameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),fF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=k.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(E.isSame(Z,$))F.report(V["date.notSameAs"],"date.notSameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),nF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=k.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isAfter(Z,$))F.report(V["date.afterField"],"date.afterField",F,{otherField:u.otherField,expectedValue:C,compare:$})}),rF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=k.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isSameOrAfter(Z,$))F.report(V["date.afterOrSameAs"],"date.afterOrSameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),dF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=k.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isBefore(Z,$))F.report(V["date.beforeField"],"date.beforeField",F,{otherField:u.otherField,expectedValue:C,compare:$})}),lF=x((D,u,F)=>{if(!F.meta.$value)return;let $=u.compare||"day",E=F.meta.$value,w=u.format||F.meta.$formats,C=k.getNestedValue(u.otherField,F),Z=e.default(C,w,!0);if(!Z.isValid())return;if(!E.isSameOrBefore(Z,$))F.report(V["date.beforeOrSameAs"],"date.beforeOrSameAs",F,{otherField:u.otherField,expectedValue:C,compare:$})}),pF=x((D,u,F)=>{if(!F.meta.$value)return;let E=F.meta.$value.day();if(E!==0&&E!==6)F.report(V["date.weekend"],"date.weekend",F)}),iF=x((D,u,F)=>{if(!F.meta.$value)return;let E=F.meta.$value.day();if(E===0||E===6)F.report(V["date.weekday"],"date.weekday",F)}),c2=class D extends Bu{static rules={equals:bF,after:_F,afterOrEqual:PF,before:mF,beforeOrEqual:vF,sameAs:cF,notSameAs:fF,afterField:nF,afterOrSameAs:rF,beforeField:dF,beforeOrSameAs:lF,weekend:pF,weekday:iF};[mD]="vine.date";[pD]=(u)=>{if(typeof u!=="string")return!1;return DC.default(u,this.options.formats||Su,!0).isValid()};constructor(u,F){super(u,F||[_w(u||{})])}equals(u,F){return this.use(bF({expectedValue:u,...F}))}after(u,F){return this.use(_F({expectedValue:u,...F}))}afterOrEqual(u,F){return this.use(PF({expectedValue:u,...F}))}before(u,F){return this.use(mF({expectedValue:u,...F}))}beforeOrEqual(u,F){return this.use(vF({expectedValue:u,...F}))}sameAs(u,F){return this.use(cF({otherField:u,...F}))}notSameAs(u,F){return this.use(fF({otherField:u,...F}))}afterField(u,F){return this.use(nF({otherField:u,...F}))}afterOrSameAs(u,F){return this.use(rF({otherField:u,...F}))}beforeField(u,F){return this.use(dF({otherField:u,...F}))}beforeOrSameAs(u,F){return this.use(lF({otherField:u,...F}))}weekend(){return this.use(pF())}weekday(){return this.use(iF())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},$C=class D{#D;#u=(u,F)=>{F.report(V.union,"union",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}[r](u,F,$){return{type:"union",fieldName:u,propertyName:$.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map((E)=>E[r](u,F,$))}}},EC=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[r](D,u,F){return{conditionalFnRefId:u.trackConditional(this.#u),schema:this.#D[r](D,u,F)}}};function f2(D){return new $C(D)}f2.if=function D(u,F){return new EC(u,F)};f2.else=function D(u){return new EC(()=>!0,u)};var W0=class extends mu{optional(){return new mw(this)}nullable(){return new Pw(this)}},Pw=class D extends W0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,$){let E=this.#D[r](u,F,$);if(E.type!=="union")E.allowNull=!0;return E}},mw=class D extends W0{#D;constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,$){let E=this.#D[r](u,F,$);if(E.type!=="union")E.isOptional=!0;return E}},Q0=class extends W0{options;validations;constructor(D,u){super();this.options=D||{bail:!0,allowNull:!1,isOptional:!1},this.validations=u||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((u)=>{return{ruleFnId:D.track({validator:u.rule.validator,options:u.options}),implicit:u.rule.implicit,isAsync:u.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(xu in D?D[xu]():D),this}bail(D){return this.options.bail=D,this}},wC=class D extends Q0{#D;#u=!1;[mD]="vine.array";[pD]=(u)=>{return Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}allowUnknownProperties(){return this.#u=!0,this}clone(){let u=new D(this.#D.map((F)=>F.clone()),this.cloneOptions(),this.cloneValidations());if(this.#u)u.allowUnknownProperties();return u}[r](u,F,$){return{type:"tuple",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#u,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F),properties:this.#D.map((E,w)=>E[r](String(w),F,$))}}},tF=x((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(V["array.minLength"],"array.minLength",F,u)}),sF=x((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(V["array.maxLength"],"array.maxLength",F,u)}),aF=x((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(V["array.fixedLength"],"array.fixedLength",F,u)}),oF=x((D,u,F)=>{if(!F.isValid)return;if(D.length<=0)F.report(V.notEmpty,"notEmpty",F)}),eF=x((D,u,F)=>{if(!F.isValid)return;if(!k.isDistinct(D,u.fields))F.report(V.distinct,"distinct",F,u)}),D6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.filter(($)=>k.exists($)&&$!==""),F)}),BC=class D extends Q0{static rules={compact:D6,notEmpty:oF,distinct:eF,minLength:tF,maxLength:sF,fixedLength:aF};#D;[mD]="vine.array";[pD]=(u)=>{return Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}minLength(u){return this.use(tF({min:u}))}maxLength(u){return this.use(sF({max:u}))}fixedLength(u){return this.use(aF({size:u}))}notEmpty(){return this.use(oF())}distinct(u){return this.use(eF({fields:u}))}compact(){return this.use(D6())}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[r](u,F,$){return{type:"array",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[r]("*",F,$),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},vw=class D extends W0{#D;[mD]="types.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u){super();this.#D=u}clone(){return new D(this.#D.clone())}[r](u,F,$){return $.toCamelCase=!0,this.#D[r](u,F,$)}},YC=class D extends Q0{#D;#u=[];#F=!1;[mD]="vine.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}getProperties(){return Object.keys(this.#D).reduce((u,F)=>{return u[F]=this.#D[F].clone(),u},{})}allowUnknownProperties(){return this.#F=!0,this}merge(u){return this.#u.push(u),this}clone(){let u=new D(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#u.forEach((F)=>u.merge(F)),this.#F)u.allowUnknownProperties();return u}toCamelCase(){return new vw(this)}[r](u,F,$){return{type:"object",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#F,validations:this.compileValidations(F),properties:Object.keys(this.#D).map((E)=>{return this.#D[E][r](E,F,$)}),groups:this.#u.map((E)=>{return E[r](F,$)})}}},u6=x((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length<u.min)F.report(V["record.minLength"],"record.minLength",F,u)}),F6=x((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length>u.max)F.report(V["record.maxLength"],"record.maxLength",F,u)}),C6=x((D,u,F)=>{if(!F.isValid)return;if(Object.keys(D).length!==u.size)F.report(V["record.fixedLength"],"record.fixedLength",F,u)}),$6=x((D,u,F)=>{if(!F.isValid)return;u(Object.keys(D),F)}),JC=class D extends Q0{static rules={maxLength:F6,minLength:u6,fixedLength:C6,validateKeys:$6};#D;[mD]="vine.object";[pD]=(u)=>{return u!==null&&typeof u==="object"&&!Array.isArray(u)};constructor(u,F,$){super(F,$);this.#D=u}minLength(u){return this.use(u6({min:u}))}maxLength(u){return this.use(F6({max:u}))}fixedLength(u){return this.use(C6({size:u}))}validateKeys(...u){return this.use($6(...u))}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[r](u,F,$){return{type:"record",fieldName:u,propertyName:$.toCamelCase?OD(u):u,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[r]("*",F,$),parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},E6=x((D,u,F)=>{if(typeof D!=="string")F.report(V.string,"string",F)}),w6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isEmail(D,u))F.report(V.email,"email",F)}),B6=x((D,u,F)=>{if(!F.isValid)return;let $=u&&typeof u==="function"?u(F):u,E=$?.locale||"any";if(!k.isMobilePhone(D,E,$))F.report(V.mobile,"mobile",F)}),Y6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isIP(D,u?.version))F.report(V.ipAddress,"ipAddress",F)}),J6=x((D,u,F)=>{if(!F.isValid)return;if(!u.test(D))F.report(V.regex,"regex",F)}),Z6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isHexColor(D))F.report(V.hexCode,"hexCode",F)}),K6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isURL(D,u))F.report(V.url,"url",F)}),M6=x(async(D,u,F)=>{if(!F.isValid)return;if(!await k.isActiveURL(D))F.report(V.activeUrl,"activeUrl",F)}),X6=x((D,u,F)=>{if(!F.isValid)return;let $="a-zA-Z";if(u){if(u.allowSpaces)$+="\\s";if(u.allowDashes)$+="-";if(u.allowUnderscores)$+="_"}if(!new RegExp(`^[${$}]+\$`).test(D))F.report(V.alpha,"alpha",F)}),W6=x((D,u,F)=>{if(!F.isValid)return;let $="a-zA-Z0-9";if(u){if(u.allowSpaces)$+="\\s";if(u.allowDashes)$+="-";if(u.allowUnderscores)$+="_"}if(!new RegExp(`^[${$}]+\$`).test(D))F.report(V.alphaNumeric,"alphaNumeric",F)}),Q6=x((D,u,F)=>{if(!F.isValid)return;if(D.length<u.min)F.report(V.minLength,"minLength",F,u)}),A6=x((D,u,F)=>{if(!F.isValid)return;if(D.length>u.max)F.report(V.maxLength,"maxLength",F,u)}),z6=x((D,u,F)=>{if(!F.isValid)return;if(D.length!==u.size)F.report(V.fixedLength,"fixedLength",F,u)}),G6=x((D,u,F)=>{if(!F.isValid)return;if(!D.endsWith(u.substring))F.report(V.endsWith,"endsWith",F,u)}),q6=x((D,u,F)=>{if(!F.isValid)return;if(!D.startsWith(u.substring))F.report(V.startsWith,"startsWith",F,u)}),H6=x((D,u,F)=>{if(!F.isValid)return;if(k.getNestedValue(u.otherField,F)!==D){F.report(V.sameAs,"sameAs",F,u);return}}),U6=x((D,u,F)=>{if(!F.isValid)return;if(k.getNestedValue(u.otherField,F)===D){F.report(V.notSameAs,"notSameAs",F,u);return}}),O6=x((D,u,F)=>{if(!F.isValid)return;let $=u?.confirmationField||`${F.name}_confirmation`;if(F.parent[$]!==D){F.report(V.confirmed,"confirmed",F,{otherField:$});return}}),V6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.trim(),F)}),L6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(KC.default.default(D,u),F)}),T6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleUpperCase(u),F)}),N6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(D.toLocaleLowerCase(u),F)}),I6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(OD(D),F)}),x6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(ZC.default.default(D),F)}),S6=x((D,u,F)=>{if(!F.isValid)return;F.mutate(_2(D,u),F)}),h6=x((D,u,F)=>{if(!F.isValid)return;if(!(typeof u.choices==="function"?u.choices(F):u.choices).includes(D)){F.report(V.in,"in",F,u);return}}),y6=x((D,u,F)=>{if(!F.isValid)return;if((typeof u.list==="function"?u.list(F):u.list).includes(D)){F.report(V.notIn,"notIn",F,u);return}}),j6=x((D,u,F)=>{if(!F.isValid)return;let $=u?typeof u==="function"?u(F)?.provider||[]:u.provider:[];if(!$.length){if(!k.isCreditCard(D))F.report(V.creditCard,"creditCard",F,{providersList:"credit"})}else if(!$.find((w)=>k.isCreditCard(D,{provider:w})))F.report(V.creditCard,"creditCard",F,{providers:$,providersList:$.join("/")})}),R6=x((D,u,F)=>{if(!F.isValid)return;let $=typeof u==="function"?u(F).countryCode:u.countryCode;if(!$.find((w)=>k.isPassportNumber(D,w)))F.report(V.passport,"passport",F,{countryCodes:$})}),k6=x((D,u,F)=>{if(!F.isValid)return;let $=u?typeof u==="function"?u(F)?.countryCode||[]:u.countryCode:[];if(!$.length){if(!k.isPostalCode(D,"any"))F.report(V.postalCode,"postalCode",F)}else if(!$.find((w)=>k.isPostalCode(D,w)))F.report(V.postalCode,"postalCode",F,{countryCodes:$})}),g6=x((D,u,F)=>{if(!F.isValid)return;if(!u||!u.version){if(!k.isUUID(D))F.report(V.uuid,"uuid",F)}else if(!u.version.find((E)=>k.isUUID(D,E)))F.report(V.uuid,"uuid",F,u)}),b6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isAscii(D))F.report(V.ascii,"ascii",F)}),_6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isIBAN(D))F.report(V.iban,"iban",F)}),P6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isJWT(D))F.report(V.jwt,"jwt",F)}),m6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isLatLong(D))F.report(V.coordinates,"coordinates",F)}),W8=class D extends Bu{static rules={in:h6,jwt:P6,url:K6,iban:_6,uuid:g6,trim:V6,email:w6,alpha:X6,ascii:b6,notIn:y6,regex:J6,escape:x6,sameAs:H6,mobile:B6,string:E6,hexCode:Z6,passport:R6,endsWith:G6,confirmed:O6,activeUrl:M6,minLength:Q6,notSameAs:U6,maxLength:A6,ipAddress:Y6,creditCard:j6,postalCode:k6,startsWith:q6,toUpperCase:T6,toLowerCase:N6,toCamelCase:I6,fixedLength:z6,coordinates:m6,normalizeUrl:S6,alphaNumeric:W6,normalizeEmail:L6};[mD]="vine.string";[pD]=(u)=>{return typeof u==="string"};constructor(u,F){super(u,F||[E6()])}url(...u){return this.use(K6(...u))}activeUrl(){return this.use(M6())}email(...u){return this.use(w6(...u))}mobile(...u){return this.use(B6(...u))}ipAddress(u){return this.use(Y6(u?{version:u}:void 0))}hexCode(){return this.use(Z6())}regex(u){return this.use(J6(u))}alpha(u){return this.use(X6(u))}alphaNumeric(u){return this.use(W6(u))}minLength(u){return this.use(Q6({min:u}))}maxLength(u){return this.use(A6({max:u}))}fixedLength(u){return this.use(z6({size:u}))}confirmed(u){return this.use(O6(u))}trim(){return this.use(V6())}normalizeEmail(u){return this.use(L6(u))}toUpperCase(){return this.use(T6())}toLowerCase(){return this.use(N6())}toCamelCase(){return this.use(I6())}escape(){return this.use(x6())}normalizeUrl(...u){return this.use(S6(...u))}startsWith(u){return this.use(q6({substring:u}))}endsWith(u){return this.use(G6({substring:u}))}sameAs(u){return this.use(H6({otherField:u}))}notSameAs(u){return this.use(U6({otherField:u}))}in(u){return this.use(h6({choices:u}))}notIn(u){return this.use(y6({list:u}))}creditCard(...u){return this.use(j6(...u))}passport(...u){return this.use(R6(...u))}postalCode(...u){return this.use(k6(...u))}uuid(...u){return this.use(g6(...u))}ascii(){return this.use(b6())}iban(){return this.use(_6())}jwt(){return this.use(P6())}coordinates(){return this.use(m6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},v6=x((D,u,F)=>{let $=u.strict?D:k.asNumber(D);if(typeof $!=="number"||Number.isNaN($)||$===Number.POSITIVE_INFINITY||$===Number.NEGATIVE_INFINITY){F.report(V.number,"number",F);return}F.mutate($,F)}),c6=x((D,u,F)=>{if(!F.isValid)return;if(D<u.min)F.report(V.min,"min",F,u)}),f6=x((D,u,F)=>{if(!F.isValid)return;if(D>u.max)F.report(V.max,"max",F,u)}),n6=x((D,u,F)=>{if(!F.isValid)return;if(D<u.min||D>u.max)F.report(V.range,"range",F,u)}),r6=x((D,u,F)=>{if(!F.isValid)return;if(D<0)F.report(V.positive,"positive",F)}),d6=x((D,u,F)=>{if(!F.isValid)return;if(D>=0)F.report(V.negative,"negative",F)}),l6=x((D,u,F)=>{if(!F.isValid)return;if(!k.isDecimal(String(D),{force_decimal:u.range[0]!==0,decimal_digits:u.range.join(",")}))F.report(V.decimal,"decimal",F,{digits:u.range.join("-")})}),p6=x((D,u,F)=>{if(!F.isValid)return;if(!Number.isInteger(D))F.report(V.withoutDecimals,"withoutDecimals",F)}),i6=x((D,u,F)=>{if(!F.isValid)return;if(!u.values.includes(D))F.report(V["number.in"],"in",F,u)}),nu=class D extends Bu{static rules={in:i6,max:f6,min:c6,range:n6,number:v6,decimal:l6,negative:d6,positive:r6,withoutDecimals:p6};[mD]="vine.number";[pD]=(u)=>{let F=k.asNumber(u);return!Number.isNaN(F)};constructor(u,F){super(u,F||[v6(u||{})])}min(u){return this.use(c6({min:u}))}max(u){return this.use(f6({max:u}))}range(u){return this.use(n6({min:u[0],max:u[1]}))}positive(){return this.use(r6())}negative(){return this.use(d6())}decimal(u){return this.use(l6({range:Array.isArray(u)?u:[u]}))}withoutDecimals(){return this.use(p6())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}in(u){return this.use(i6({values:u}))}},t6=x((D,u,F)=>{let $=u.strict===!0?D:k.asBoolean(D);if(typeof $!=="boolean"){F.report(V.boolean,"boolean",F);return}F.mutate($,F)}),ru=class D extends Bu{static rules={boolean:t6};[mD]="vine.boolean";[pD]=(u)=>{return typeof(this.options.strict===!0?u:k.asBoolean(u))==="boolean"};constructor(u,F){super(u,F||[t6(u||{})])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},s6=x((D,u,F)=>{let $=D;if(typeof u.expectedValue==="boolean")$=k.asBoolean(D);else if(typeof u.expectedValue==="number")$=k.asNumber(D);if($!==u.expectedValue){F.report(V.literal,"literal",F,u);return}F.mutate($,F)}),MC=class D extends Bu{static rules={equals:s6};#D;constructor(u,F,$){super(F,$||[s6({expectedValue:u})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},cw=["on","1","yes","true",!0,1],a6=x((D,u,F)=>{if(!cw.includes(D))F.report(V.accepted,"accepted",F)}),XC=class D extends Bu{static rules={accepted:a6};constructor(u,F){super(u,F||[a6()])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},fw=class D{#D;#u=(u,F)=>{F.report(V.unionGroup,"unionGroup",F)};constructor(u){this.#D=u}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}otherwise(u){return this.#u=u,this}[r](u,F){return{type:"group",elseConditionalFnRefId:u.trackConditional(this.#u),conditions:this.#D.map(($)=>$[r](u,F))}}},WC=class{#D;#u;constructor(D,u){this.#D=u,this.#u=D}[r](D,u){return{schema:{type:"sub_object",properties:Object.keys(this.#D).map((F)=>{return this.#D[F][r](F,D,u)}),groups:[]},conditionalFnRefId:D.trackConditional(this.#u)}}};function n2(D){return new fw(D)}n2.if=function D(u,F){return new WC(u,F)};n2.else=function D(u){return new WC(()=>!0,u)};var nw=class D extends Bu{static rules={enum:M8};#D;constructor(u,F,$){super(F,$||[M8({choices:Object.values(u)})]);this.#D=u}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},rw=class D{#D;#u=(u,F)=>{F.report(V.unionOfTypes,"unionOfTypes",F)};constructor(u){this.#D=u}otherwise(u){return this.#u=u,this}clone(){let u=new D(this.#D);return u.otherwise(this.#u),u}[r](u,F,$){return{type:"union",fieldName:u,propertyName:$.toCamelCase?OD(u):u,elseConditionalFnRefId:F.trackConditional(this.#u),conditions:this.#D.map((E)=>{return{conditionalFnRefId:F.trackConditional((w,C)=>{return E[pD](w,C)}),schema:E[r](u,F,$)}})}}},dw=class extends mu{group=n2;union=f2;string(){return new W8}boolean(D){return new ru(D)}accepted(){return new XC}number(D){return new nu(D)}date(D){return new c2(D)}literal(D){return new MC(D)}object(D){return new YC(D)}array(D){return new BC(D)}tuple(D){return new wC(D)}record(D){return new JC(D)}enum(D){if(Array.isArray(D)||typeof D==="function")return new fu(D);return new nw(D)}any(){return new e6}unionOfTypes(D){let u=new Set;return D.forEach((F)=>{if(!F[pD]||!F[mD])throw new Error(`Cannot use "${F.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(u.has(F[mD]))throw new Error(`Cannot use duplicate schema "${F[mD]}". "vine.unionOfTypes" needs distinct schema types only`);u.add(F[mD])}),u.clear(),new rw(D)}},lw={required:V.required,array:V.array,object:V.object},v2=class{#D;messagesProvider;errorReporter;#u(D){let u=gF();return{compilerNode:{type:"root",schema:D[r]("",u,{toCamelCase:!1})},refs:u.toJSON()}}constructor(D,u){let{compilerNode:F,refs:$}=this.#u(D);this.#D={schema:F,refs:$};let E=u.metaDataValidator,w=new kF(F,{convertEmptyStringsToNull:u.convertEmptyStringsToNull,messages:lw}).compile();if(this.errorReporter=u.errorReporter,this.messagesProvider=u.messagesProvider,E)this.validate=(C,Z)=>{let M=Z??{},W=M.meta??{},X=M.errorReporter??this.errorReporter,q=M.messagesProvider??this.messagesProvider;return E(W),w(C,W,$,q,X())};else this.validate=(C,Z)=>{let M=Z??{},W=M.meta??{},X=M.errorReporter??this.errorReporter,q=M.messagesProvider??this.messagesProvider;return w(C,W,$,q,X())}}async tryValidate(D,...[u]){try{return[null,await this.validate(D,u)]}catch(F){if(F instanceof L2)return[F,null];throw F}}toJSON(){let{schema:D,refs:u}=this.#D;return{schema:structuredClone(D),refs:u}}},QC=class extends dw{messagesProvider=new Z0(V,F3);errorReporter=()=>new T2;convertEmptyStringsToNull=!1;helpers=k;createRule=x;compile(D){return new v2(D,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(D){return{compile:(u)=>{return new v2(u,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter,metaDataValidator:D})}}}validate(D){return this.compile(D.schema).validate(D.data,D)}tryValidate(D){return this.compile(D.schema).tryValidate(D.data,D)}},pw=new QC,y=pw;var AC={APP_NAME:y.string(),APP_ENV:y.enum(["local","dev","stage","prod"]),APP_KEY:y.string(),APP_URL:y.string(),PORT:y.number(),PORT_BACKEND:y.number(),PORT_ADMIN:y.number(),PORT_LIBRARY:y.number(),PORT_DESKTOP:y.number(),PORT_EMAIL:y.number(),PORT_DOCS:y.number(),PORT_INSPECT:y.number(),PORT_API:y.number(),PORT_SYSTEM_TRAY:y.number(),APP_MAINTENANCE:y.boolean(),DEBUG:y.boolean(),API_PREFIX:y.string(),DOCS_PREFIX:y.string(),DB_CONNECTION:y.enum(["mysql","sqlite","postgres"]),DB_HOST:y.string(),DB_PORT:y.number(),DB_DATABASE:y.string(),DB_USERNAME:y.string(),DB_PASSWORD:y.string(),AWS_ACCOUNT_ID:y.string(),AWS_ACCESS_KEY_ID:y.string(),AWS_SECRET_ACCESS_KEY:y.string(),AWS_DEFAULT_REGION:y.string(),AWS_DEFAULT_PASSWORD:y.string(),MAIL_MAILER:y.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:y.string(),MAIL_PORT:y.number(),MAIL_USERNAME:y.string(),MAIL_PASSWORD:y.string(),MAIL_ENCRYPTION:y.string(),MAIL_FROM_NAME:y.string(),MAIL_FROM_ADDRESS:y.string(),SEARCH_ENGINE_DRIVER:y.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:y.string(),MEILISEARCH_KEY:y.string(),FRONTEND_APP_ENV:y.enum(["development","staging","production"]),FRONTEND_APP_URL:y.string()};var iw={APP_ENV:["local","dev","development","staging","prod","production"],DB_CONNECTION:["mysql","sqlite","postgres","dynamodb"],MAIL_MAILER:["smtp","mailgun","ses","postmark","sendmail","log"],SEARCH_ENGINE_DRIVER:["opensearch"],FRONTEND_APP_ENV:["development","staging","production"]},tw=Object.entries(AC).reduce((D,[u,F])=>{let $;switch(typeof F){case"string":$=y.string();break;case"number":$=y.number();break;case"boolean":$=y.boolean();break;default:if(Array.isArray(F)){$=y.enum(F);break}if(typeof F==="object"){let w=Symbol.for("schema_name"),C=F[w];if(C==="vine.string"){$=y.string();break}if(C==="vine.number"){$=y.number();break}if(C==="vine.boolean"){$=y.boolean();break}if(!C){$=y.enum(iw.APP_ENV);break}console.error("Unknown env value type",typeof F)}throw new Error(`Invalid env value for ${u}`)}let E=u;return D[E]=$,D},{}),PQ=y.object(tw);var aw={get:(D,u)=>{let F=D[u];if(typeof F==="string"&&/^\d+$/.test(F)&&u!=="AWS_ACCOUNT_ID")return Number(F);if(typeof F==="string"&&/^true|false$/.test(F))return F==="true";if(F instanceof fu)return D[u];if(F instanceof ru)return!!D[u];if(F instanceof nu)return Number(D[u]);return F}};function ow(){return typeof Bun!=="undefined"?Bun.env:sw.env}var j=new Proxy(ow(),aw);var zC={name:j.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:j.APP_ENV??"local",url:j.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:j.DEBUG??!1,key:j.APP_KEY,maintenanceMode:j.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"};var GC={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:j.AWS_ACCESS_KEY_ID||"",secret:j.AWS_SECRET_ACCESS_KEY||"",region:j.AWS_DEFAULT_REGION||"us-east-1",table:"cache",endpoint:""},memcached:{persistent_id:"",sasl:["",""],options:{},servers:[{host:"127.0.0.1",port:11211,weight:100}]},redis:{connection:"cache",host:"127.0.0.1",port:6379,password:"",username:"stacks"}}};var qC={name:"My Custom CLI",command:"custom-cli",description:"This is an example command to illustrate how to create your own commands. Check out `../app/commands` for more.",deploy:!0};var Q8={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}};var HC={sites:{root:"stacksjs.org",path:"dist",modals:{domain:"modals.stacksjs.org",path:"dist"},stepper:{domain:"stepper.stacksjs.org",path:"dist"},notification:{domain:"notification.stacksjs.org",path:"dist"},docs:{domain:"docs.stacksjs.org",path:"dist"},tlsx:{domain:"tlsx.stacksjs.org",path:"dist"},dtsx:{domain:"dtsx.stacksjs.org",path:"dist"},spreadsheet:{domain:"spreadsheet.stacksjs.org",path:"dist"}},infrastructure:{type:"serverless",driver:"aws",firewall:Q8.firewall,environments:["production","staging","development"],storage:{},api:{prefix:j.API_PREFIX||"api",description:"My awesome Stacks API",deploy:!0,memorySize:512,prewarm:10,timeout:30},cdn:{compress:!0,allowedMethods:"ALL",cachedMethods:"GET_HEAD",originShieldRegion:"us-east-1",minTtl:0,defaultTtl:86400,maxTtl:31536000,cookieBehavior:"none",allowList:{cookies:[],headers:[],queryStrings:[]},realtimeLogs:{enabled:!0,samplingRate:1}},fileSystem:!0}};var UC={default:j.DB_CONNECTION||"sqlite",connections:{sqlite:{database:j.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:j.AWS_ACCESS_KEY_ID||"",secret:j.AWS_SECRET_ACCESS_KEY||"",region:j.AWS_DEFAULT_REGION||"us-east-1",prefix:j.DB_DATABASE||"stacks",endpoint:"http://localhost",port:j.DB_PORT||8000},mysql:{name:j.DB_DATABASE||"stacks",host:j.DB_HOST||"127.0.0.1",port:j.DB_PORT||3306,username:j.DB_USERNAME||"root",password:j.DB_PASSWORD||"",prefix:""},postgres:{name:j.DB_DATABASE||"stacks",host:j.DB_HOST||"127.0.0.1",port:j.DB_PORT||3306,username:j.DB_USERNAME||"",password:j.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"};var OC={a:[{name:j.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]};var VC={from:{name:j.MAIL_FROM_NAME||"Stacks",address:j.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:j.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}};var LC={messages:{string:"The {{ field }} field must be a string",email:"The {{ field }} field must be a valid email address",regex:"The {{ field }} field format is invalid",url:"The {{ field }} field must be a valid URL",activeUrl:"The {{ field }} field must be a valid URL",alpha:"The {{ field }} field must contain only letters",alphaNumeric:"The {{ field }} field must contain only letters and numbers",minLength:"The {{ field }} field must have at least {{ min }} characters",maxLength:"The {{ field }} field must not be greater than {{ max }} characters",fixedLength:"The {{ field }} field must be {{ size }} characters long",confirmed:"The {{ field }} field and {{ otherField }} field must be the same",endsWith:"The {{ field }} field must end with {{ substring }}",startsWith:"The {{ field }} field must start with {{ substring }}",sameAs:"The {{ field }} field and {{ otherField }} field must be the same",notSameAs:"The {{ field }} field and {{ otherField }} field must be different",in:"The selected {{ field }} is invalid",notIn:"The selected {{ field }} is invalid",ipAddress:"The {{ field }} field must be a valid IP address",uuid:"The {{ field }} field must be a valid UUID",ascii:"The {{ field }} field must only contain ASCII characters",creditCard:"The {{ field }} field must be a valid {{ providersList }} card number",hexCode:"The {{ field }} field must be a valid hex color code",iban:"The {{ field }} field must be a valid IBAN number",jwt:"The {{ field }} field must be a valid JWT token",coordinates:"The {{ field }} field must contain latitude and longitude coordinates",mobile:"The {{ field }} field must be a valid mobile phone number",passport:"The {{ field }} field must be a valid passport number",postalCode:"The {{ field }} field must be a valid postal code",boolean:"The value must be a boolean",number:"The {{ field }} field must be a number",min:"The {{ field }} field must be at least {{ min }}",max:"The {{ field }} field must not be greater than {{ max }}",range:"The {{ field }} field must be between {{ min }} and {{ max }}",positive:"The {{ field }} field must be positive",negative:"The {{ field }} field must be negative",decimal:"The {{ field }} field must have {{ digits }} decimal places",withoutDecimals:"The {{ field }} field must not have decimal places",date:"The {{ field }} field must be a datetime value","date.equals":"The {{ field }} field must be a date equal to {{ expectedValue }}","date.after":"The {{ field }} field must be a date after {{ expectedValue }}","date.before":"The {{ field }} field must be a date before {{ expectedValue }}","date.afterOrEqual":"The {{ field }} field must be a date after or equal to {{ expectedValue }}","date.beforeOrEqual":"The {{ field }} field must be a date before or equal to {{ expectedValue }}","date.sameAs":"The {{ field }} field and {{ otherField }} field must be the same","date.notSameAs":"The {{ field }} field and {{ otherField }} field must be different","date.afterField":"The {{ field }} field must be a date after {{ otherField }}",accepted:"The {{ field }} field must be accepted",enum:"The selected {{ field }} is invalid",literal:"The {{ field }} field must be {{ expectedValue }}",object:"The {{ field }} field must be an object",record:"The {{ field }} field must be an object","record.minLength":"The {{ field }} field must have at least {{ min }} items","record.maxLength":"The {{ field }} field must not have more than {{ max }} items","record.fixedLength":"The {{ field }} field must contain {{ size }} items",array:"The {{ field }} field must be an array","array.minLength":"The {{ field }} field must have at least {{ min }} items","array.maxLength":"The {{ field }} field must not have more than {{ max }} items","array.fixedLength":"The {{ field }} field must contain {{ size }} items",notEmpty:"The {{ field }} field must not be empty",distinct:"The {{ field }} field has duplicate values",tuple:"The {{ field }} field must be an array",union:"Invalid value provided for {{ field }} field",unionGroup:"Invalid value provided for {{ field }} field",unionOfTypes:"Invalid value provided for {{ field }} field"}};var TC={hooks:{"pre-commit":"lint-staged"},scopes:["","ci","deps","dx","release","docs","test","core","actions","arrays","auth","build","cache","cli","cloud","collections","config","database","datetime","docs","errors","git","lint","x-ray","modules","notifications","objects","path","realtime","router","buddy","security","server","storage","strings","tests","types","ui","utils"],messages:{type:"Select the type of change that you\u2019re committing:",scope:"Select the SCOPE of this change (optional):",customScope:"Select the SCOPE of this change:",subject:"Write a SHORT, IMPERATIVE tense description of the change:\n",body:'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',breaking:'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',footerPrefixesSelect:"Select the ISSUES type of the change list by this change (optional):",customFooterPrefixes:"Input ISSUES prefix:",footer:"List any ISSUES by this change. E.g.: #31, #34:\n",confirmCommit:"Are you sure you want to proceed with the commit above?"},types:[{value:"feat",name:"feat: \u2728 A new feature",emoji:":sparkles:"},{value:"fix",name:"fix: \uD83D\uDC1B A bug fix",emoji:":bug:"},{value:"docs",name:"docs: \uD83D\uDCDD Documentation only changes",emoji:":memo:"},{value:"style",name:"style: \uD83D\uDC84 Changes that do not affect the meaning of the code",emoji:":lipstick:"},{value:"refactor",name:"refactor: \u267B\uFE0F A code change that neither fixes a bug nor adds a feature",emoji:":recycle:"},{value:"perf",name:"perf: \u26A1\uFE0F A code change that improves performance",emoji:":zap:"},{value:"test",name:"test: \u2705 Adding missing tests or adjusting existing tests",emoji:":white_check_mark:"},{value:"build",name:"build: \uD83D\uDCE6\uFE0F Changes that affect the build system or external dependencies",emoji:":package:"},{value:"ci",name:"ci: \uD83C\uDFA1 Changes to our CI configuration files and scripts",emoji:":ferris_wheel:"},{value:"chore",name:"chore: \uD83D\uDD28 Other changes that don\u2019t modify src or test files",emoji:":hammer:"},{value:"revert",name:"revert: \u23EA\uFE0F Reverts a previous commit",emoji:":rewind:"}]};var NC={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}};var IC={name:"hello-world",owner:"@stacksjs",repository:"stacksjs/stacks",license:"MIT",author:"Chris Breuer",contributors:["Chris Breuer <chris@stacksjs.org>"],defaultLanguage:"en",releaseable:!0,vueComponents:{name:"hello-world-vue",description:"Your Vue component library description",keywords:["component","library","vue","vite","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},webComponents:{name:"hello-world-elements",description:"Your framework agnostic web component library description.",keywords:["custom-elements","web-components","library","framework-agnostic","typescript","javascript"],tags:[{name:["HelloWorld","AppHelloWorld"],description:"The Hello World custom element, built via this framework.",attributes:[{name:"greeting",description:"The greeting."}]}]},functions:{name:"hello-world-fx",description:"Your function library description.",keywords:["functions","composables","library","typescript","javascript"],shouldGenerateSourcemap:!1,files:["counter","dark"]}};var xC={logsPath:S0("logs/stacks.log"),deploymentsPath:S0("logs/deployments.log")};var SC={default:"email"};var hC={driver:"stripe",stripe:{publishableKey:j.STRIPE_PUBLISHABLE_KEY||"",secretKey:j.STRIPE_SECRET_KEY||""}};var yC={frontend:j.PORT??3000,backend:j.PORT_BACKEND??3001,admin:j.PORT_ADMIN??3002,library:j.PORT_LIBRARY??3003,desktop:j.PORT_DESKTOP??3004,email:j.PORT_EMAIL??3005,docs:j.PORT_DOCS??3006,inspect:j.PORT_INSPECT??3007,api:j.PORT_API??3008,systemTray:j.PORT_SYSTEM_TRAY??3009,database:3010};var jC={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}};var RC={plans:[{productName:"Stacks Hobby",description:"All the Stacks features.",pricing:[{key:"stacks_hobby_monthly",price:3900,interval:"month",currency:"usd"},{key:"stacks_hobby_yearly",price:37900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}},{productName:"Stacks Pro",description:"All the Stacks features, including being able to invite team members.",pricing:[{key:"stacks_pro_monthly",price:5900,interval:"month",currency:"usd"},{key:"stacks_pro_yearly",price:57900,interval:"year",currency:"usd"}],metadata:{createdBy:"admin",version:"1.0.0"}}],webhook:{endpoint:"/webhooks/stripe",secret:""},currencies:["usd"],coupons:[{code:"SUMMER2024",amountOff:500,duration:"once"}],products:[{name:"Stacks Pro",description:"All the Stacks features.",images:["url_to_image"]}]};var kC={driver:"opensearch"};var gC={aws:{accountId:j.AWS_ACCOUNT_ID||"",appId:j.AWS_ACCESS_KEY_ID||"",apiKey:j.AWS_SECRET_ACCESS_KEY||"",region:j.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}};var bC={driver:"s3"};var _C={name:"Stacks",members:{chris:"chris@stacksjs.org",blake:"blake@stacksjs.org",zoltan:"zoltan@stacksjs.org",freddy:"freddy@stacksjs.org",glenn:"glenn@stacksjs.org",dorell:"dorell@stacksjs.org",avery:"avery@stacksjs.org",adelino:"adelino@stacksjs.org"}};var PC={shortcuts:[["btn","inline-flex items-center px-4 py-2 ml-2 border border-transparent shadow-sm text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 cursor-pointer"]],safelist:"prose prose-sm m-auto text-left",trigger:":stx:",classPrefix:"stx-",reset:"tailwind",icons:["heroicons"],fonts:{email:{title:"Mona",text:"Hubot"},desktop:{title:"Mona",text:"Hubot"},mobile:{title:"Mona",text:"Hubot"},web:{title:"Mona",text:"Hubot"}},theme:{colors:{veryCool:"#0000ff",brand:{primary:"hsl(var(--hue, 217) 78% 51%)"}}}};var ew={ai:p1,analytics:i1,app:zC,cache:GC,cli:qC,cloud:HC,database:UC,dns:OC,email:VC,errors:LC,git:TC,hashing:NC,library:IC,logging:xC,notification:SC,queue:jC,payment:hC,ports:yC,saas:RC,searchEngine:kC,security:Q8,services:gC,storage:bC,team:_C,ui:PC},r2=ew;async function mC(D){if(!D?.port)D={port:3000};return console.log("Creating local tunnel",D.port),"localTunnel"}async function Au(D){return await mC({port:D})}async function DB({domain:D=BD.app.url||"stacks",type:u="frontend",localhost:F=!1,https:$=void 0,network:E=void 0}={}){let w=D.replace(/\.[^.]+$/,".localhost");switch(u){case"frontend":if(E)return await Au(BD.ports?.frontend||3000);if(F)return`http://localhost:${BD.ports?.frontend}`;break;case"backend":if(E)return await Au(BD.ports?.backend||3001);if(F)return`http://localhost:${BD.ports?.backend}`;w=`api.${w}`;break;case"admin":if(E)return await Au(BD.ports?.admin||3002);if(F)return`http://localhost:${BD.ports?.admin}`;w=`admin.${w}`;break;case"library":if(E)return await Au(BD.ports?.library||3003);if(F)return`http://localhost:${BD.ports?.library}`;w=`libs.${w}`;break;case"email":if(E)return await Au(BD.ports?.email||3005);if(F)return`http://localhost:${BD.ports?.email}`;w=`email.${w}`;break;case"desktop":if(E)return await Au(BD.ports?.desktop||3004);if(F)return`http://localhost:${BD.ports?.desktop}`;w=`desktop.${w}`;break;case"docs":if(E)return await Au(BD.ports?.docs||3006);if(F)return`http://localhost:${BD.ports?.docs}`;w=`docs.${w}`;break;case"inspect":if(E)return await Au(BD.ports?.inspect||3007);if(F)return`http://localhost:${BD.ports?.inspect}`;w=`inspect.${w}`;break;default:if(F)return`http://localhost:${BD.ports?.frontend}`}if($)return`https://${w}`;return`http://${w}`}function uB(D){return D}function FB(D){return D}function CB(D){return D}function $B(D){return D}function EB(D){return D}function wB(D){return D}function BB(D){return D}function YB(D){return D}function JB(D){return D}function ZB(D){return D}function KB(D){return D}function MB(D){return D}function XB(D){return D}function WB(D){return D}function QB(D){return D}function AB(D){return D}function zB(D){return D}function GB(D){return D}function qB(D){return D}function HB(D){return D}function UB(D){return D}function OB(D){return D}function VB(D){return D}function LB(D){return D}function TB(D){return D}function NB(D){return D}function IB(D){return D}var t={...r8,...r2},xB=t.ai,SB=t.analytics,hu=t.app,hB=t.cache,yB=t.cloud,jB=t.cli,RB=t.database,kB=t.dns,gB=t.docs,bB=t.email,_B=t.errors,PB=t.git,mB=t.hashing,vB=t.library,cB=t.logging,fB=t.notification,nB=t.payment,rB=t.ports,dB=t.queue,lB=t.security,pB=t.saas,iB=t.searchEngine,tB=t.services,sB=t.storage,aB=t.team,oB=t.ui;function eB(){if(hu.env==="local")return"dev";if(hu.env==="development")return"dev";if(hu.env==="staging")return"stage";if(hu.env==="production")return"prod";if(!hu.env)throw new Error("Couldn\'t determine app environment");return hu.env}class d2{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(D,u){if(this.shouldExitProcess=u?.shouldExit!==!1,u?.silent!==!0)this.writeErrorToConsole(D);let F;if(u?.message)F=u.message;else if(D instanceof Error)F=D.message;else if(typeof D==="string")F=D;else F=JSON.stringify(D);let $=new Error(F);if(D instanceof Error)Object.assign($,D);return this.writeErrorToFile($).catch((E)=>console.error(E)),$}static handleError(D,u){return this.handle(D,u),D}static async writeErrorToFile(D){if(!(D instanceof Error)){console.error("Error is not an instance of Error:",D);return}let u=`[${new Date().toISOString()}] ${D.name}: ${D.message}\n`,F=n8("stacks.log")??n8("errors.log");try{await fC(r1(F),{recursive:!0}),await cC(F,u)}catch($){console.error("Failed to write to error file:",$)}}static writeErrorToConsole(D){console.error(D);let u=typeof D==="string"?D:D instanceof Error?D.message:JSON.stringify(D);if(u.includes("bunx --bun cdk destroy")||u===`Failed to execute command: ${vC("bunx --bun eslint . --fix")}`||u===`Failed to execute command: ${vC("bun storage/framework/core/actions/src/lint/fix.ts")}`){if(!this.isTestEnvironment)console.log("No need to worry. The edge function is currently being destroyed. Please run `buddy undeploy` shortly again, and continue doing so until it succeeds running."),console.log("Hoping to see you back soon!")}if(this.shouldExitProcess)CY.exit(1)}}function nC(D,u){let F;if(u3(D))F=D;else if(D instanceof Error)F=D.message;else if(u instanceof Error)F=u.message;else F=String(D);return Ou(`ERROR: ${$Y(F)}`),d2.handle(D,u)}async function Ou(D,u){let F=`[${new Date().toISOString()}] ${D}\n`;try{let $=u?.logFile??BD.logging.logsPath??"storage/logs/stacks.log";try{await uY($)}catch{console.log("Creating log file directory...",$),await fC(FY($),{recursive:!0})}await cC($,F)}catch($){console.error("Failed to write to log file:",$)}}var EY={withStackTrace:!1},lC=(D,u,F=EY)=>{let $=u.isOk()?{type:"Ok",value:u.value}:{type:"Err",value:u.error},E=F.withStackTrace?new Error().stack:void 0;return{data:$,message:D,stack:E}};function du(D,u,F,$){function E(w){return w instanceof F?w:new F(function(C){C(w)})}return new(F||(F=Promise))(function(w,C){function Z(X){try{W($.next(X))}catch(q){C(q)}}function M(X){try{W($.throw(X))}catch(q){C(q)}}function W(X){X.done?w(X.value):E(X.value).then(Z,M)}W(($=$.apply(D,u||[])).next())})}function rC(D){var u=typeof Symbol==="function"&&Symbol.iterator,F=u&&D[u],$=0;if(F)return F.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&$>=D.length)D=void 0;return{value:D&&D[$++],done:!D}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yu(D){return this instanceof Yu?(this.v=D,this):new Yu(D)}function dC(D,u,F){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $=F.apply(D,u||[]),E,w=[];return E=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),Z("next"),Z("throw"),Z("return",C),E[Symbol.asyncIterator]=function(){return this},E;function C(U){return function(A){return Promise.resolve(A).then(U,q)}}function Z(U,A){if($[U]){if(E[U]=function(P){return new Promise(function(n,d){w.push([U,P,n,d])>1||M(U,P)})},A)E[U]=A(E[U])}}function M(U,A){try{W($[U](A))}catch(P){L(w[0][3],P)}}function W(U){U.value instanceof Yu?Promise.resolve(U.value.v).then(X,q):L(w[0][2],U)}function X(U){M("next",U)}function q(U){M("throw",U)}function L(U,A){if(U(A),w.shift(),w.length)M(w[0][0],w[0][1])}}function wY(D){var u,F;return u={},$("next"),$("throw",function(E){throw E}),$("return"),u[Symbol.iterator]=function(){return this},u;function $(E,w){u[E]=D[E]?function(C){return(F=!F)?{value:Yu(D[E](C)),done:!1}:w?w(C):C}:w}}function BY(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var u=D[Symbol.asyncIterator],F;return u?u.call(D):(D=typeof rC==="function"?rC(D):D[Symbol.iterator](),F={},$("next"),$("throw"),$("return"),F[Symbol.asyncIterator]=function(){return this},F);function $(w){F[w]=D[w]&&function(C){return new Promise(function(Z,M){C=D[w](C),E(Z,M,C.done,C.value)})}}function E(w,C,Z,M){Promise.resolve(M).then(function(W){w({value:W,done:Z})},C)}}class MD{constructor(D){this._promise=D}static fromSafePromise(D){let u=D.then((F)=>new uu(F));return new MD(u)}static fromPromise(D,u){let F=D.then(($)=>new uu($)).catch(($)=>new iD(u($)));return new MD(F)}static fromThrowable(D,u){return(...F)=>{return new MD((()=>du(this,void 0,void 0,function*(){try{return new uu(yield D(...F))}catch($){return new iD(u?u($):$)}}))())}}static combine(D){return ZY(D)}static combineWithAllErrors(D){return KY(D)}map(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return new iD(u.error);return new uu(yield D(u.value))})))}andThrough(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return new iD(u.error);let F=yield D(u.value);if(F.isErr())return new iD(F.error);return new uu(u.value)})))}andTee(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return new iD(u.error);try{yield D(u.value)}catch(F){}return new uu(u.value)})))}mapErr(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isOk())return new uu(u.value);return new iD(yield D(u.error))})))}andThen(D){return new MD(this._promise.then((u)=>{if(u.isErr())return new iD(u.error);let F=D(u.value);return F instanceof MD?F._promise:F}))}orElse(D){return new MD(this._promise.then((u)=>du(this,void 0,void 0,function*(){if(u.isErr())return D(u.error);return new uu(u.value)})))}match(D,u){return this._promise.then((F)=>F.match(D,u))}unwrapOr(D){return this._promise.then((u)=>u.unwrapOr(D))}safeUnwrap(){return dC(this,arguments,function*D(){return yield Yu(yield Yu(yield*wY(BY(yield Yu(this._promise.then((u)=>u.safeUnwrap()))))))})}then(D,u){return this._promise.then(D,u)}[Symbol.asyncIterator](){return dC(this,arguments,function*D(){let u=yield Yu(this._promise);if(u.isErr())yield yield Yu(A0(u.error));return yield Yu(u.value)})}}var A0=(D)=>new MD(Promise.resolve(new iD(D))),YY=MD.fromPromise,JY=MD.fromSafePromise,qz=MD.fromThrowable,pC=(D)=>{let u=Vu([]);for(let F of D)if(F.isErr()){u=Ju(F.error);break}else u.map(($)=>$.push(F.value));return u},ZY=(D)=>MD.fromSafePromise(Promise.all(D)).andThen(pC),iC=(D)=>{let u=Vu([]);for(let F of D)if(F.isErr()&&u.isErr())u.error.push(F.error);else if(F.isErr()&&u.isOk())u=Ju([F.error]);else if(F.isOk()&&u.isOk())u.value.push(F.value);return u},KY=(D)=>MD.fromSafePromise(Promise.all(D)).andThen(iC),A8;(function(D){function u(E,w){return(...C)=>{try{let Z=E(...C);return Vu(Z)}catch(Z){return Ju(w?w(Z):Z)}}}D.fromThrowable=u;function F(E){return pC(E)}D.combine=F;function $(E){return iC(E)}D.combineWithAllErrors=$})(A8||(A8={}));var Vu=(D)=>new uu(D);function Ju(D){return new iD(D)}class uu{constructor(D){this.value=D}isOk(){return!0}isErr(){return!this.isOk()}map(D){return Vu(D(this.value))}mapErr(D){return Vu(this.value)}andThen(D){return D(this.value)}andThrough(D){return D(this.value).map((u)=>this.value)}andTee(D){try{D(this.value)}catch(u){}return Vu(this.value)}orElse(D){return Vu(this.value)}asyncAndThen(D){return D(this.value)}asyncAndThrough(D){return D(this.value).map(()=>this.value)}asyncMap(D){return MD.fromSafePromise(D(this.value))}unwrapOr(D){return this.value}match(D,u){return D(this.value)}safeUnwrap(){let D=this.value;return function*(){return D}()}_unsafeUnwrap(D){return this.value}_unsafeUnwrapErr(D){throw lC("Called `_unsafeUnwrapErr` on an Ok",this,D)}*[Symbol.iterator](){return this.value}}class iD{constructor(D){this.error=D}isOk(){return!1}isErr(){return!this.isOk()}map(D){return Ju(this.error)}mapErr(D){return Ju(D(this.error))}andThrough(D){return Ju(this.error)}andTee(D){return Ju(this.error)}andThen(D){return Ju(this.error)}orElse(D){return D(this.error)}asyncAndThen(D){return A0(this.error)}asyncAndThrough(D){return A0(this.error)}asyncMap(D){return A0(this.error)}unwrapOr(D){return D}match(D,u){return u(this.error)}safeUnwrap(){let D=this.error;return function*(){throw yield Ju(D),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(D){throw lC("Called `_unsafeUnwrap` on an Err",this,D)}_unsafeUnwrapErr(D){return this.error}*[Symbol.iterator](){let D=this;return yield D,D}}var MY=A8.fromThrowable;M1();z8();q8();U8();function bJ(){let D=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,u=gJ();if(D.test(u))return 4;return 3}var O0={...I8({level:bJ()}),warning:(D)=>console.warn(D),dump:(...D)=>console.log(...D),dd:(...D)=>{console.log(...D),x8.exit(1)},echo:(D)=>console.log(D)};var Qu={info:async(D,u)=>{if(u?.styled===!1)console.log(D);else O0.info(D);await Ou(`INFO: ${U0(D)}`)},success:async(D,u)=>{if(u?.styled===!1)console.log(D);else O0.success(D);await Ou(`SUCCESS: ${U0(D)}`)},warn:async(D,u)=>{if(u?.styled===!1)console.log(D);else O0.warn(D);await Ou(`WARN: ${U0(D)}`)},warning:async(D,u)=>{if(u?.styled===!1)console.log(D);else O0.warn(D);await Ou(`WARN: ${U0(D)}`)},error:async(D,u)=>{nC(D,u)},debug:async(...D)=>{let F=`DEBUG: ${D.map(($)=>typeof $==="object"?JSON.stringify($,null,2):$).join(" ")}`;if(x8.env.APP_ENV==="production"||x8.env.APP_ENV==="prod")return Ou(F);O0.debug(F),await Ou(U0(F))},dump:(...D)=>D.forEach((u)=>console.log(u)),dd:(...D)=>{D.forEach((u)=>console.log(u)),x8.exit(1)},echo:(...D)=>console.log(...D)};var g4=p(h1(),1);import qK from"node-fetch";var y4="https://www.iana.org/whois?q=",j4={"whois.denic.de":"-T dn,ace","whois.nic.fr":"-V Md5.2"},y1={"br.com":"whois.centralnic.net","cn.com":"whois.centralnic.net","de.com":"whois.centralnic.net","eu.com":"whois.centralnic.net","gb.com":"whois.centralnic.net","gb.net":"whois.centralnic.net","gr.com":"whois.centralnic.net","hu.com":"whois.centralnic.net","in.net":"whois.centralnic.net","no.com":"whois.centralnic.net","qc.com":"whois.centralnic.net","ru.com":"whois.centralnic.net","sa.com":"whois.centralnic.net","se.com":"whois.centralnic.net","se.net":"whois.centralnic.net","uk.com":"whois.centralnic.net","uk.net":"whois.centralnic.net","us.com":"whois.centralnic.net","uy.com":"whois.centralnic.net","za.com":"whois.centralnic.net","jpn.com":"whois.centralnic.ne","web.com":"whois.centralnic.ne",com:"whois.verisign-grs.com","za.net":"whois.za.net",net:"whois.verisign-grs.com","eu.org":"whois.eu.org","za.org":"whois.za.org",org:"whois.pir.org","llyw.cymru":"whois.nic.llyw.cymru","gov.scot":"whois.nic.gov.scot","gov.wales":"whois.nic.gov.wales",edu:"whois.educause.edu",gov:"whois.dotgov.gov",int:"whois.iana.org","e164.arpa":"whois.ripe.net",arpa:"whois.iana.org",aero:"whois.aero",asia:"whois.nic.asia",biz:"whois.nic.biz",cat:"whois.nic.cat",coop:"whois.nic.coop",info:"whois.afilias.net",jobs:"whois.nic.jobs",mobi:"whois.afilias.net",museum:"whois.nic.museum",name:"whois.nic.name",post:"whois.dotpostregistry.net",pro:"whois.nic.pro",tel:"whois.nic.tel",travel:"whois.nic.travel",xxx:"whois.nic.xxx",ac:"whois.nic.ac",ae:"whois.aeda.net.ae",af:"whois.nic.af",ag:"whois.nic.ag",ai:"whois.nic.ai",am:"whois.amnic.net",ar:"whois.nic.ar",as:"whois.nic.as","priv.at":"whois.nic.priv.at",at:"whois.nic.at",au:"whois.auda.org.au",aw:"whois.nic.aw",ax:"whois.ax",be:"whois.dns.be",bf:"whois.registre.bf",bg:"whois.register.bg",bh:"whois.nic.bh",bi:"whois1.nic.bi",bj:"whois.nic.bj",bm:"whois.afilias-srs.net",bn:"whois.bnnic.bn",bo:"whois.nic.bo",br:"whois.registro.br",by:"whois.cctld.by",bw:"whois.nic.net.bw",bz:"whois.afilias-grs.info","co.ca":"whois.co.ca",ca:"whois.cira.ca",cc:"ccwhois.verisign-grs.com",cd:"whois.nic.cd",ch:"whois.nic.ch",ci:"whois.nic.ci",cl:"whois.nic.cl",cm:"whois.netcom.cm","edu.cn":"whois.edu.cn",cn:"whois.cnnic.cn","uk.co":"whois.uk.co",co:"whois.nic.co",cr:"whois.nic.cr",cx:"whois.nic.cx",cz:"whois.nic.cz",de:"whois.denic.de",dk:"whois.dk-hostmaster.dk",dm:"whois.dmdomains.dm",do:"whois.nic.do",dz:"whois.nic.dz",ec:"whois.nic.ec",ee:"whois.tld.ee",eu:"whois.eu",fi:"whois.fi",fj:"www.whois.fj",fm:"whois.nic.fm",fo:"whois.nic.fo",fr:"whois.nic.fr",gd:"whois.nic.gd",ge:"whois.nic.ge",gf:"whois.mediaserv.net",gg:"whois.gg",gh:"whois.nic.gh",gi:"whois2.afilias-grs.net",gl:"whois.nic.gl",gp:"whois.nic.gp",gq:"whois.dominio.gq",gs:"whois.nic.gs",gy:"whois.registry.gy",hk:"whois.hkirc.hk",hm:"whois.registry.hm",hn:"whois.nic.hn",hr:"whois.dns.hr",ht:"whois.nic.ht",hu:"whois.nic.hu",id:"whois.id",ie:"whois.weare.ie",il:"whois.isoc.org.il",im:"whois.nic.im",in:"whois.registry.in",io:"whois.nic.io",iq:"whois.cmc.iq",ir:"whois.nic.ir",is:"whois.isnic.is",it:"whois.nic.it",je:"whois.je",jp:"whois.jprs.jp",ke:"whois.kenic.or.ke",kg:"whois.kg",ki:"whois.nic.ki",kn:"whois.nic.kn",kr:"whois.kr",kw:"whois.nic.kw",ky:"whois.kyregistry.ky",kz:"whois.nic.kz",la:"whois.nic.la",lb:"whois.lbdr.org.lb",lc:"whois2.afilias-grs.net",li:"whois.nic.li",lk:"whois.nic.lk",ls:"whois.nic.ls",lt:"whois.domreg.lt",lu:"whois.dns.lu",lv:"whois.nic.lv",ly:"whois.nic.ly",ma:"whois.registre.ma",md:"whois.nic.md",me:"whois.nic.me",mg:"whois.nic.mg",mk:"whois.marnet.mk",ml:"whois.dot.ml",mm:"whois.registry.gov.mm",mn:"whois.nic.mn",mq:"whois.mediaserv.net",mr:"whois.nic.mr",ms:"whois.nic.ms",mt:"whois.nic.org.mt",mu:"whois.nic.mu",mw:"whois.nic.mw",mx:"whois.mx",my:"whois.mynic.my",mz:"whois.nic.mz",na:"whois.na-nic.com.na",nc:"whois.nc",nf:"whois.nic.nf",ng:"whois.nic.net.ng",nl:"whois.domain-registry.nl",no:"whois.norid.no",nu:"whois.iis.nu",nz:"whois.irs.net.nz",om:"whois.registry.om",pe:"kero.yachay.pe",pf:"whois.registry.pf",pk:"whois.pknic.net.pk","co.pl":"whois.co.pl",pl:"whois.dns.pl",pm:"whois.nic.pm",pr:"whois.afilias-srs.net",ps:"whois.pnina.ps",pt:"whois.dns.pt",pw:"whois.nic.pw",qa:"whois.registry.qa",re:"whois.nic.re",ro:"whois.rotld.ro",rs:"whois.rnids.rs","ac.ru":"whois.free.net","edu.ru":"whois.informika.ru","com.ru":"whois.flexireg.net","msk.ru":"whois.flexireg.net","net.ru":"whois.nic.net.ru","nov.ru":"whois.flexireg.net","org.ru":"whois.nic.net.ru","pp.ru":"whois.nic.net.ru","spb.ru":"whois.flexireg.net",ru:"whois.tcinet.ru",rw:"whois.ricta.org.rw",sa:"whois.nic.net.sa",sb:"whois.nic.net.sb",sc:"whois2.afilias-grs.net",sd:"whois.sdnic.sd",se:"whois.iis.se",sg:"whois.sgnic.sg",sh:"whois.nic.sh",si:"whois.register.si",sk:"whois.sk-nic.sk",sl:"whois.nic.sl",sm:"whois.nic.sm",sn:"whois.nic.sn",so:"whois.nic.so",ss:"whois.nic.ss",st:"whois.nic.st","msk.su":"whois.flexireg.net","nov.su":"whois.flexireg.net","spb.su":"whois.flexireg.net",su:"whois.tcinet.ru",sx:"whois.sx",sy:"whois.tld.sy",tc:"whois.nic.tc",td:"whois.nic.td",tf:"whois.nic.tf",tg:"whois.nic.tg",th:"whois.thnic.co.th",tk:"whois.dot.tk",tl:"whois.nic.tl",tm:"whois.nic.tm",tn:"whois.ati.tn",to:"whois.tonic.to",tr:"whois.trabis.gov.tr",tv:"whois.nic.tv",tw:"whois.twnic.net.tw",tz:"whois.tznic.or.tz","biz.ua":"whois.biz.ua","co.ua":"whois.co.ua","pp.ua":"whois.pp.ua",ua:"whois.ua",ug:"whois.co.ug","ac.uk":"whois.nic.ac.uk","gov.uk":"whois.gov.uk",uk:"whois.nic.uk","fed.us":"whois.nic.gov",us:"whois.nic.us",uy:"whois.nic.org.uy",uz:"whois.cctld.uz",vc:"whois2.afilias-grs.net",ve:"whois.nic.ve",vg:"whois.nic.vg",vu:"whois.dnrs.vu",wf:"whois.nic.wf",ws:"whois.website.ws",yt:"whois.nic.yt","ac.za":"whois.ac.za","co.za":"whois.registry.net.za","gov.za":"whois.gov.za","net.za":"net-whois.registry.net.za","org.za":"org-whois.registry.net.za","web.za":"web-whois.registry.net.za",zm:"whois.zicta.zm","xn--2scrj9c":"whois.registry.in","xn--3e0b707e":"whois.kr","xn--3hcrj9c":"whois.registry.in","xn--45br5cyl":"whois.registry.in","xn--45brj9c":"whois.registry.in","xn--4dbrk0ce":"whois.isoc.org.il","xn--80ao21a":"whois.nic.kz","xn--90a3ac":"whois.rnids.rs","xn--90ae":"whois.imena.bg","xn--90ais":"whois.cctld.by","xn--clchc0ea0b2g2a9gcd":"whois.sgnic.sg","xn--d1alf":"whois.marnet.mk","xn--e1a4c":"whois.eu","xn--fiqs8s":"cwhois.cnnic.cn","xn--fiqz9s":"cwhois.cnnic.cn","xn--fpcrj9c3d":"whois.registry.in","xn--fzc2c9e2c":"whois.nic.lk","xn--gecrj9c":"whois.registry.in","xn--h2breg3eve":"whois.registry.in","xn--h2brj9c8c":"whois.registry.in","xn--h2brj9c":"whois.registry.in","xn--j1amh":"whois.dotukr.com","xn--j6w193g":"whois.hkirc.hk","xn--kprw13d":"whois.twnic.net.tw","xn--kpry57d":"whois.twnic.net.tw","xn--lgbbat1ad8j":"whois.nic.dz","xn--mgb9awbf":"whois.registry.om","xn--mgba3a4f16a":"whois.nic.ir","xn--mgbaam7a8h":"whois.aeda.net.ae","xn--mgbah1a3hjkrd":"whois.nic.mr","xn--mgbbh1a71e":"whois.registry.in","xn--mgbbh1a":"whois.registry.in","xn--mgberp4a5d4ar":"whois.nic.net.sa","xn--mgbgu82a":"whois.registry.in","xn--mgbtx2b":"whois.cmc.iq","xn--mgbx4cd0ab":"whois.mynic.my","xn--node":"whois.itdc.ge","xn--o3cw4h":"whois.thnic.co.th","xn--ogbpf8fl":"whois.tld.sy","xn--p1ai":"whois.tcinet.ru","xn--pgbs0dh":"whois.ati.tn","xn--q7ce6a":"whois.nic.la","xn--qxa6a":"whois.eu","xn--rvc1e0am3e":"whois.registry.in","xn--s9brj9c":"whois.registry.in","xn--wgbh1c":"whois.dotmasr.eg","xn--wgbl6a":"whois.registry.qa","xn--xkc2al3hye2a":"whois.nic.lk","xn--xkc2dl3a5ee0h":"whois.registry.in","xn--y9a3aq":"whois.amnic.net","xn--yfro4i67o":"whois.sgnic.sg","xn--ygbi2ammx":"whois.pnina.ps"};var R4;((F)=>{F[F.SOCKS4=0]="SOCKS4";F[F.SOCKS5=1]="SOCKS5"})(R4||={});function j1(D){if(Array.isArray(D))return D.slice();if(typeof D==="object"&&D!==null){let u={};for(let F in D)if(Object.prototype.hasOwnProperty.call(D,F))u[F]=j1(D[F]);return u}return D}var LK=p(h1(),1);async function HK(D){let u=y4+D;try{let F=await qK(u);if(F.ok){let E=(await F.text()).match(/whois:\s+(\S+)/);if(E?.[1])return E[1]}}catch(F){console.error("Error in getting WhoIs server data from IANA",F)}return""}function UK(D){if(D==="com")return"whois.verisign-grs.com";return y1[D]}function k4(D){let u=D.split(".");for(let F=u.length-1;F>0;F--){let $=u.slice(F).join(".");if(y1[$])return $}return u[u.length-1]}function OK(D){return j4[D]}class b8{static iterParse(D,u){let F="",$=null,E="";for(let w=0;w<D.length;w++){let C=D[w];if(C==="\n"||E===":"&&C===" "){if(F.trim()in u)$=F.trim();else if($!==null){let Z=F.trim();if(Z!==""){let M=u[$];if(Array.isArray(M))M.push(Z);else u[$]=Z;$=null}}F=""}else if(C!==":")F=F+C;if(E=C,F==="Record maintained by"||F===">>>")break}return u}static parseData(D,u){if(!u)u={"Domain Name":"","Creation Date":"","Updated Date":"","Registry Expiry Date":"","Domain Status":[],Registrar:""};return u=b8.iterParse(D,u),u}}async function VK(D,u,F,$,E,w){let C=new TextDecoder(E),Z=new TextEncoder;if(!w){let W=new GK.Socket;return new Promise((X,q)=>{try{W.connect({port:$,host:F},()=>{if(u!=="")W.write(Z.encode(`${u} ${D}\r\n`));else W.write(Z.encode(`${D}\r\n`))}),W.on("data",(L)=>{X(C.decode(L))}),W.on("error",(L)=>{q(L)})}catch(L){q(L)}})}let M={proxy:{host:w.ip,port:w.port,type:w.type===1?5:4},command:"connect",destination:{host:F,port:$}};if(w.username&&w.password)M.proxy.userId=w.username,M.proxy.password=w.password;return new Promise((W,X)=>{g4.SocksClient.createConnection(M,(q,L)=>{if(q)X(q);else{if(!L)X(new Error("No socket info received!"));if(u!=="")L?.socket.write(Z.encode(`${u} ${D}\r\n`));else L?.socket.write(Z.encode(`${D}\r\n`));L?.socket.on("data",(U)=>{W(C.decode(U))}),L?.socket.resume()}})})}async function R1(D,u=!1,F=null){let $,E=43,w="",C,Z="utf-8";if(!F)$=k4(D),C=null;else $=F.tld?F.tld:k4(D),Z=F.encoding?F.encoding:"utf-8",C=F.proxy?F.proxy:null,w=F.server?F.server:"",E=F.serverPort?F.serverPort:43;if(w===""){let X=UK($);if(!X){if(Qu.debug(`No WhoIs server found for TLD: ${$}! Attempting IANA WhoIs database for server!`),X=await HK($),!X)return Qu.debug("WhoIs server could not be found!"),{_raw:"",parsedData:null};Qu.debug(`WhoIs sever found for ${$}: ${w}`)}w=X}let W=OK(w)||"";try{Qu.debug(`Attempting WHOIS lookup for ${D} on server ${w}`);let X=await VK(D,W,w,E,Z,C);if(Qu.debug("Raw WHOIS data received:",X),!u){let L=b8.parseData(X,null);return{_raw:X,parsedData:L}}let q=null;if(F?.parseData)q=j1(F.parseData);try{let L=b8.parseData(X,q);return{_raw:X,parsedData:L}}catch(L){return console.error("Error in parsing WhoIs data!",L),{_raw:X,parsedData:null}}}catch(X){return Qu.debug(`Error in WHOIS lookup for ${D} on server ${w}`,X),{_raw:"",parsedData:null}}}function yG(D,u=null){return Qu.debug(`Lookup called for ${D}`),R1(D,!0,u)}async function jG(D,u=!1,F=1,$=!1,E=null){let w=[];if(u){if(F>D.length)F=D.length;for(let C=0;C<D.length;C+=F){let Z=D.slice(C,C+F);w=await Promise.all(Z.map(async(M)=>{return await R1(M,$,E)}))}}else for(let C=0;C<D.length;C++){let Z=await R1(D[C],$,E);w.push(Z)}return w}var export_SocksClient=LK.SocksClient;export{R1 as whois,VK as tcpWhois,yG as lookup,UK as getWhoIsServer,k4 as getTLD,OK as getParameters,HK as findWhoIsServer,jG as batchWhois,b8 as WhoIsParser,export_SocksClient as SocksClient,y1 as SERVERS,R4 as ProxyType,j4 as PARAMETERS,y4 as IANA_CHK_URL};
|