@stacksjs/ai 0.65.0 → 0.66.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/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  // @bun
2
- var zg=Object.create;var{getPrototypeOf:Tg,defineProperty:l7,getOwnPropertyNames:Kg}=Object;var Sg=Object.prototype.hasOwnProperty;var Q=(D,F,E)=>{E=D!=null?zg(Tg(D)):{};const w=F||!D||!D.__esModule?l7(E,"default",{value:D,enumerable:!0}):E;for(let $ of Kg(D))if(!Sg.call(w,$))l7(w,$,{get:()=>D[$],enumerable:!0});return w};var X=(D,F)=>()=>(F||D((F={exports:{}}).exports,F),F.exports);var r0=(D,F)=>{for(var E in F)l7(D,E,{get:F[E],enumerable:!0,configurable:!0,set:(w)=>F[E]=()=>w})};var M=(D,F)=>()=>(D&&(F=D(D=0)),F);var O2=(D)=>{let F=D.httpHandler;return{setHttpHandler(E){F=E},httpHandler(){return F},updateHttpClientConfig(E,w){F.updateHttpClientConfig(E,w)},httpHandlerConfigs(){return F.httpHandlerConfigs()}}},j2=(D)=>{return{httpHandler:D.httpHandler()}};var FA=()=>{};var W0=X((C7D,AA)=>{var{defineProperty:NE,getOwnPropertyDescriptor:Qg,getOwnPropertyNames:Hg}=Object,Lg=Object.prototype.hasOwnProperty,qE=(D,F)=>NE(D,"name",{value:F,configurable:!0}),Rg=(D,F)=>{for(var E in F)NE(D,E,{get:F[E],enumerable:!0})},Vg=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Hg(F))if(!Lg.call(D,$)&&$!==E)NE(D,$,{get:()=>F[$],enumerable:!(w=Qg(F,$))||w.enumerable})}return D},Ng=(D)=>Vg(NE({},"__esModule",{value:!0}),D),EA={};Rg(EA,{AlgorithmId:()=>CA,EndpointURLScheme:()=>fA,FieldPosition:()=>BA,HttpApiKeyAuthLocation:()=>$A,HttpAuthLocation:()=>wA,IniSectionType:()=>hA,RequestHandlerProtocol:()=>UA,SMITHY_CONTEXT_KEY:()=>yg,getDefaultClientConfiguration:()=>jg,resolveDefaultRuntimeConfig:()=>Pg});AA.exports=Ng(EA);var wA=((D)=>{return D.HEADER="header",D.QUERY="query",D})(wA||{}),$A=((D)=>{return D.HEADER="header",D.QUERY="query",D})($A||{}),fA=((D)=>{return D.HTTP="http",D.HTTPS="https",D})(fA||{}),CA=((D)=>{return D.MD5="md5",D.CRC32="crc32",D.CRC32C="crc32c",D.SHA1="sha1",D.SHA256="sha256",D})(CA||{}),qg=qE((D)=>{const F=[];if(D.sha256!==void 0)F.push({algorithmId:()=>"sha256",checksumConstructor:()=>D.sha256});if(D.md5!=null)F.push({algorithmId:()=>"md5",checksumConstructor:()=>D.md5});return{_checksumAlgorithms:F,addChecksumAlgorithm(E){this._checksumAlgorithms.push(E)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Og=qE((D)=>{const F={};return D.checksumAlgorithms().forEach((E)=>{F[E.algorithmId()]=E.checksumConstructor()}),F},"resolveChecksumRuntimeConfig"),jg=qE((D)=>{return{...qg(D)}},"getDefaultClientConfiguration"),Pg=qE((D)=>{return{...Og(D)}},"resolveDefaultRuntimeConfig"),BA=((D)=>{return D[D.HEADER=0]="HEADER",D[D.TRAILER=1]="TRAILER",D})(BA||{}),yg="__smithy_context",hA=((D)=>{return D.PROFILE="profile",D.SSO_SESSION="sso-session",D.SERVICES="services",D})(hA||{}),UA=((D)=>{return D.HTTP_0_9="http/0.9",D.HTTP_1_0="http/1.0",D.TDS_8_0="tds/8.0",D})(UA||{})});var kg;var IA=M(()=>{kg=Q(W0(),1)});var GA=()=>{};function bg(D){return Object.keys(D).reduce((F,E)=>{const w=D[E];return{...F,[E]:Array.isArray(w)?[...w]:w}},{})}class gD{constructor(D){this.method=D.method||"GET",this.hostname=D.hostname||"localhost",this.port=D.port,this.query=D.query||{},this.headers=D.headers||{},this.body=D.body,this.protocol=D.protocol?D.protocol.slice(-1)!==":"?`${D.protocol}:`:D.protocol:"https:",this.path=D.path?D.path.charAt(0)!=="/"?`/${D.path}`:D.path:"/",this.username=D.username,this.password=D.password,this.fragment=D.fragment}static clone(D){const F=new gD({...D,headers:{...D.headers}});if(F.query)F.query=bg(F.query);return F}static isInstance(D){if(!D)return!1;const F=D;return"method"in F&&"protocol"in F&&"hostname"in F&&"path"in F&&typeof F.query==="object"&&typeof F.headers==="object"}clone(){return gD.clone(this)}}class E8{constructor(D){this.statusCode=D.statusCode,this.reason=D.reason,this.headers=D.headers||{},this.body=D.body}static isInstance(D){if(!D)return!1;const F=D;return typeof F.statusCode==="number"&&typeof F.headers==="object"}}var MA=()=>{};var dD=M(()=>{FA();IA();GA();MA()});function P2(D){return D}var xg=(D)=>(F)=>async(E)=>{if(!gD.isInstance(E.request))return F(E);const{request:w}=E,{handlerProtocol:$=""}=D.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let C=w.hostname;if(w.port!=null)C+=`:${w.port}`;w.headers.host=C}return F(E)},cg,y2=(D)=>({applyToStack:(F)=>{F.add(xg(D),cg)}});var z6=M(()=>{dD();cg={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var gg=()=>(D,F)=>async(E)=>{try{const w=await D(E),{clientName:$,commandName:C,logger:f,dynamoDbDocumentClientOptions:B={}}=F,{overrideInputFilterSensitiveLog:h,overrideOutputFilterSensitiveLog:U}=B,I=h??F.inputFilterSensitiveLog,A=U??F.outputFilterSensitiveLog,{$metadata:Y,...G}=w.output;return f?.info?.({clientName:$,commandName:C,input:I(E.input),output:A(G),metadata:Y}),w}catch(w){const{clientName:$,commandName:C,logger:f,dynamoDbDocumentClientOptions:B={}}=F,{overrideInputFilterSensitiveLog:h}=B,U=h??F.inputFilterSensitiveLog;throw f?.error?.({clientName:$,commandName:C,input:U(E.input),error:w,metadata:w.$metadata}),w}},rg,k2=(D)=>({applyToStack:(F)=>{F.add(gg(),rg)}});var YA=M(()=>{rg={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var T6=M(()=>{YA()});var ZA="X-Amzn-Trace-Id",_g="AWS_LAMBDA_FUNCTION_NAME",sg="_X_AMZN_TRACE_ID",ug=(D)=>(F)=>async(E)=>{const{request:w}=E;if(!gD.isInstance(w)||D.runtime!=="node"||w.headers.hasOwnProperty(ZA))return F(E);const $=process.env[_g],C=process.env[sg],f=(B)=>typeof B==="string"&&B.length>0;if(f($)&&f(C))w.headers[ZA]=C;return F({...E,request:w})},dg,b2=(D)=>({applyToStack:(F)=>{F.add(ug(D),dg)}});var K6=M(()=>{dD();dg={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var kF=X((N7D,zA)=>{var{defineProperty:OE,getOwnPropertyDescriptor:vg,getOwnPropertyNames:mg}=Object,ng=Object.prototype.hasOwnProperty,WA=(D,F)=>OE(D,"name",{value:F,configurable:!0}),lg=(D,F)=>{for(var E in F)OE(D,E,{get:F[E],enumerable:!0})},ig=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of mg(F))if(!ng.call(D,$)&&$!==E)OE(D,$,{get:()=>F[$],enumerable:!(w=vg(F,$))||w.enumerable})}return D},pg=(D)=>ig(OE({},"__esModule",{value:!0}),D),JA={};lg(JA,{getSmithyContext:()=>ag,normalizeProvider:()=>og});zA.exports=pg(JA);var XA=W0(),ag=WA((D)=>D[XA.SMITHY_CONTEXT_KEY]||(D[XA.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),og=WA((D)=>{if(typeof D==="function")return D;const F=Promise.resolve(D);return()=>F},"normalizeProvider")});var i7=X((q7D,HA)=>{var{defineProperty:jE,getOwnPropertyDescriptor:tg,getOwnPropertyNames:eg}=Object,Dr=Object.prototype.hasOwnProperty,d8=(D,F)=>jE(D,"name",{value:F,configurable:!0}),Fr=(D,F)=>{for(var E in F)jE(D,E,{get:F[E],enumerable:!0})},Er=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of eg(F))if(!Dr.call(D,$)&&$!==E)jE(D,$,{get:()=>F[$],enumerable:!(w=tg(F,$))||w.enumerable})}return D},wr=(D)=>Er(jE({},"__esModule",{value:!0}),D),TA={};Fr(TA,{CredentialsProviderError:()=>$r,ProviderError:()=>PE,TokenProviderError:()=>fr,chain:()=>Cr,fromStatic:()=>Br,memoize:()=>hr});HA.exports=wr(TA);var KA=class D extends Error{constructor(F,E=!0){var w;let $,C=!0;if(typeof E==="boolean")$=void 0,C=E;else if(E!=null&&typeof E==="object")$=E.logger,C=E.tryNextLink??!0;super(F);this.name="ProviderError",this.tryNextLink=C,Object.setPrototypeOf(this,D.prototype),(w=$==null?void 0:$.debug)==null||w.call($,`@smithy/property-provider ${C?"->":"(!)"} ${F}`)}static from(F,E=!0){return Object.assign(new this(F.message,E),F)}};d8(KA,"ProviderError");var PE=KA,SA=class D extends PE{constructor(F,E=!0){super(F,E);this.name="CredentialsProviderError",Object.setPrototypeOf(this,D.prototype)}};d8(SA,"CredentialsProviderError");var $r=SA,QA=class D extends PE{constructor(F,E=!0){super(F,E);this.name="TokenProviderError",Object.setPrototypeOf(this,D.prototype)}};d8(QA,"TokenProviderError");var fr=QA,Cr=d8((...D)=>async()=>{if(D.length===0)throw new PE("No providers in chain");let F;for(let E of D)try{return await E()}catch(w){if(F=w,w==null?void 0:w.tryNextLink)continue;throw w}throw F},"chain"),Br=d8((D)=>()=>Promise.resolve(D),"fromStatic"),hr=d8((D,F,E)=>{let w,$,C,f=!1;const B=d8(async()=>{if(!$)$=D();try{w=await $,C=!0,f=!1}finally{$=void 0}return w},"coalesceProvider");if(F===void 0)return async(h)=>{if(!C||(h==null?void 0:h.forceRefresh))w=await B();return w};return async(h)=>{if(!C||(h==null?void 0:h.forceRefresh))w=await B();if(f)return w;if(E&&!E(w))return f=!0,w;if(F(w))return await B(),w;return w}},"memoize")});var S6=X((LA)=>{Object.defineProperty(LA,"__esModule",{value:!0});LA.getHomeDir=void 0;var Ur=import.meta.require("os"),Ar=import.meta.require("path"),p7={},Ir=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},Gr=()=>{const{HOME:D,USERPROFILE:F,HOMEPATH:E,HOMEDRIVE:w=`C:${Ar.sep}`}=process.env;if(D)return D;if(F)return F;if(E)return`${w}${E}`;const $=Ir();if(!p7[$])p7[$]=Ur.homedir();return p7[$]};LA.getHomeDir=Gr});var a7=X((VA)=>{Object.defineProperty(VA,"__esModule",{value:!0});VA.getSSOTokenFilepath=void 0;var Mr=import.meta.require("crypto"),Yr=import.meta.require("path"),Zr=S6(),Xr=(D)=>{const E=Mr.createHash("sha1").update(D).digest("hex");return Yr.join(Zr.getHomeDir(),".aws","sso","cache",`${E}.json`)};VA.getSSOTokenFilepath=Xr});var jA=X((qA)=>{Object.defineProperty(qA,"__esModule",{value:!0});qA.getSSOTokenFromFile=void 0;var Wr=import.meta.require("fs"),Jr=a7(),{readFile:zr}=Wr.promises,Tr=async(D)=>{const F=Jr.getSSOTokenFilepath(D),E=await zr(F,"utf8");return JSON.parse(E)};qA.getSSOTokenFromFile=Tr});var t7=X((PA)=>{Object.defineProperty(PA,"__esModule",{value:!0});PA.slurpFile=void 0;var Kr=import.meta.require("fs"),{readFile:Sr}=Kr.promises,o7={},Qr=(D,F)=>{if(!o7[D]||(F===null||F===void 0?void 0:F.ignoreCache))o7[D]=Sr(D,"utf8");return o7[D]};PA.slurpFile=Qr});var Ef=X((k7D,xF)=>{var{defineProperty:bE,getOwnPropertyDescriptor:Hr,getOwnPropertyNames:Lr}=Object,Rr=Object.prototype.hasOwnProperty,_0=(D,F)=>bE(D,"name",{value:F,configurable:!0}),Vr=(D,F)=>{for(var E in F)bE(D,E,{get:F[E],enumerable:!0})},e7=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Lr(F))if(!Rr.call(D,$)&&$!==E)bE(D,$,{get:()=>F[$],enumerable:!(w=Hr(F,$))||w.enumerable})}return D},Ff=(D,F,E)=>(e7(D,F,"default"),E&&e7(E,F,"default")),Nr=(D)=>e7(bE({},"__esModule",{value:!0}),D),bF={};Vr(bF,{CONFIG_PREFIX_SEPARATOR:()=>v8,DEFAULT_PROFILE:()=>cA,ENV_PROFILE:()=>xA,getProfileName:()=>qr,loadSharedConfigFiles:()=>rA,loadSsoSessionData:()=>ur,parseKnownFiles:()=>vr});xF.exports=Nr(bF);Ff(bF,S6(),xF.exports);var xA="AWS_PROFILE",cA="default",qr=_0((D)=>D.profile||process.env[xA]||cA,"getProfileName");Ff(bF,a7(),xF.exports);Ff(bF,jA(),xF.exports);var yE=W0(),Or=_0((D)=>Object.entries(D).filter(([F])=>{const E=F.indexOf(v8);if(E===-1)return!1;return Object.values(yE.IniSectionType).includes(F.substring(0,E))}).reduce((F,[E,w])=>{const $=E.indexOf(v8),C=E.substring(0,$)===yE.IniSectionType.PROFILE?E.substring($+1):E;return F[C]=w,F},{...D.default&&{default:D.default}}),"getConfigData"),kE=import.meta.require("path"),jr=S6(),Pr="AWS_CONFIG_FILE",gA=_0(()=>process.env[Pr]||kE.join(jr.getHomeDir(),".aws","config"),"getConfigFilepath"),yr=S6(),kr="AWS_SHARED_CREDENTIALS_FILE",br=_0(()=>process.env[kr]||kE.join(yr.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),xr=S6(),cr=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,gr=["__proto__","profile __proto__"],Df=_0((D)=>{const F={};let E,w;for(let $ of D.split(/\r?\n/)){const C=$.split(/(^|\s)[;#]/)[0].trim();if(C[0]==="["&&C[C.length-1]==="]"){E=void 0,w=void 0;const B=C.substring(1,C.length-1),h=cr.exec(B);if(h){const[,U,,I]=h;if(Object.values(yE.IniSectionType).includes(U))E=[U,I].join(v8)}else E=B;if(gr.includes(B))throw new Error(`Found invalid profile name "${B}"`)}else if(E){const B=C.indexOf("=");if(![0,-1].includes(B)){const[h,U]=[C.substring(0,B).trim(),C.substring(B+1).trim()];if(U==="")w=h;else{if(w&&$.trimStart()===$)w=void 0;F[E]=F[E]||{};const I=w?[w,h].join(v8):h;F[E][I]=U}}}}return F},"parseIni"),kA=t7(),bA=_0(()=>({}),"swallowError"),v8=".",rA=_0(async(D={})=>{const{filepath:F=br(),configFilepath:E=gA()}=D,w=xr.getHomeDir();let C=F;if(F.startsWith("~/"))C=kE.join(w,F.slice(2));let f=E;if(E.startsWith("~/"))f=kE.join(w,E.slice(2));const B=await Promise.all([kA.slurpFile(f,{ignoreCache:D.ignoreCache}).then(Df).then(Or).catch(bA),kA.slurpFile(C,{ignoreCache:D.ignoreCache}).then(Df).catch(bA)]);return{configFile:B[0],credentialsFile:B[1]}},"loadSharedConfigFiles"),rr=_0((D)=>Object.entries(D).filter(([F])=>F.startsWith(yE.IniSectionType.SSO_SESSION+v8)).reduce((F,[E,w])=>({...F,[E.substring(E.indexOf(v8)+1)]:w}),{}),"getSsoSessionData"),_r=t7(),sr=_0(()=>({}),"swallowError"),ur=_0(async(D={})=>_r.slurpFile(D.configFilepath??gA()).then(Df).then(rr).catch(sr),"loadSsoSessionData"),dr=_0((...D)=>{const F={};for(let E of D)for(let[w,$]of Object.entries(E))if(F[w]!==void 0)Object.assign(F[w],$);else F[w]=$;return F},"mergeConfigFiles"),vr=_0(async(D)=>{const F=await rA(D);return dr(F.configFile,F.credentialsFile)},"parseKnownFiles")});var dA=X((b7D,uA)=>{function wf(D){try{const F=new Set(Array.from(D.match(/([A-Z_]){3,}/g)??[]));return F.delete("CONFIG"),F.delete("CONFIG_PREFIX_SEPARATOR"),F.delete("ENV"),[...F].join(", ")}catch(F){return D}}var{defineProperty:xE,getOwnPropertyDescriptor:mr,getOwnPropertyNames:nr}=Object,lr=Object.prototype.hasOwnProperty,Q6=(D,F)=>xE(D,"name",{value:F,configurable:!0}),ir=(D,F)=>{for(var E in F)xE(D,E,{get:F[E],enumerable:!0})},pr=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of nr(F))if(!lr.call(D,$)&&$!==E)xE(D,$,{get:()=>F[$],enumerable:!(w=mr(F,$))||w.enumerable})}return D},ar=(D)=>pr(xE({},"__esModule",{value:!0}),D),sA={};ir(sA,{loadConfig:()=>F_});uA.exports=ar(sA);var cF=i7();Q6(wf,"getSelectorName");var or=Q6((D,F)=>async()=>{try{const E=D(process.env);if(E===void 0)throw new Error;return E}catch(E){throw new cF.CredentialsProviderError(E.message||`Not found in ENV: ${wf(D.toString())}`,{logger:F})}},"fromEnv"),_A=Ef(),tr=Q6((D,{preferredFile:F="config",...E}={})=>async()=>{const w=_A.getProfileName(E),{configFile:$,credentialsFile:C}=await _A.loadSharedConfigFiles(E),f=C[w]||{},B=$[w]||{},h=F==="config"?{...f,...B}:{...B,...f};try{const I=D(h,F==="config"?$:C);if(I===void 0)throw new Error;return I}catch(U){throw new cF.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${wf(D.toString())}`,{logger:E.logger})}},"fromSharedConfigFiles"),er=Q6((D)=>typeof D==="function","isFunction"),D_=Q6((D)=>er(D)?async()=>await D():cF.fromStatic(D),"fromStatic"),F_=Q6(({environmentVariableSelector:D,configFileSelector:F,default:E},w={})=>cF.memoize(cF.chain(or(D),tr(F,w),D_(E))),"loadConfig")});var pA=X((lA)=>{Object.defineProperty(lA,"__esModule",{value:!0});lA.getEndpointUrlConfig=void 0;var vA=Ef(),mA="AWS_ENDPOINT_URL",nA="endpoint_url",E_=(D)=>({environmentVariableSelector:(F)=>{const E=D.split(" ").map((C)=>C.toUpperCase()),w=F[[mA,...E].join("_")];if(w)return w;const $=F[mA];if($)return $;return},configFileSelector:(F,E)=>{if(E&&F.services){const $=E[["services",F.services].join(vA.CONFIG_PREFIX_SEPARATOR)];if($){const C=D.split(" ").map((B)=>B.toLowerCase()),f=$[[C.join("_"),nA].join(vA.CONFIG_PREFIX_SEPARATOR)];if(f)return f}}const w=F[nA];if(w)return w;return},default:void 0});lA.getEndpointUrlConfig=E_});var $f=X((aA)=>{Object.defineProperty(aA,"__esModule",{value:!0});aA.getEndpointFromConfig=void 0;var w_=dA(),$_=pA(),f_=async(D)=>w_.loadConfig($_.getEndpointUrlConfig(D!==null&&D!==void 0?D:""))();aA.getEndpointFromConfig=f_});var FI=X((g7D,DI)=>{function eA(D){const F={};if(D=D.replace(/^\?/,""),D)for(let E of D.split("&")){let[w,$=null]=E.split("=");if(w=decodeURIComponent(w),$)$=decodeURIComponent($);if(!(w in F))F[w]=$;else if(Array.isArray(F[w]))F[w].push($);else F[w]=[F[w],$]}return F}var{defineProperty:cE,getOwnPropertyDescriptor:C_,getOwnPropertyNames:B_}=Object,h_=Object.prototype.hasOwnProperty,U_=(D,F)=>cE(D,"name",{value:F,configurable:!0}),A_=(D,F)=>{for(var E in F)cE(D,E,{get:F[E],enumerable:!0})},I_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of B_(F))if(!h_.call(D,$)&&$!==E)cE(D,$,{get:()=>F[$],enumerable:!(w=C_(F,$))||w.enumerable})}return D},G_=(D)=>I_(cE({},"__esModule",{value:!0}),D),tA={};A_(tA,{parseQueryString:()=>eA});DI.exports=G_(tA);U_(eA,"parseQueryString")});var fI=X((r7D,$I)=>{var{defineProperty:gE,getOwnPropertyDescriptor:M_,getOwnPropertyNames:Y_}=Object,Z_=Object.prototype.hasOwnProperty,X_=(D,F)=>gE(D,"name",{value:F,configurable:!0}),W_=(D,F)=>{for(var E in F)gE(D,E,{get:F[E],enumerable:!0})},J_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Y_(F))if(!Z_.call(D,$)&&$!==E)gE(D,$,{get:()=>F[$],enumerable:!(w=M_(F,$))||w.enumerable})}return D},z_=(D)=>J_(gE({},"__esModule",{value:!0}),D),EI={};W_(EI,{parseUrl:()=>wI});$I.exports=z_(EI);var T_=FI(),wI=X_((D)=>{if(typeof D==="string")return wI(new URL(D));const{hostname:F,pathname:E,port:w,protocol:$,search:C}=D;let f;if(C)f=T_.parseQueryString(C);return{hostname:F,port:w?parseInt(w):void 0,protocol:$,path:E,query:f}},"parseUrl")});var YD=X((_7D,GI)=>{function II(D,F,E){return{applyToStack:(w)=>{w.add(BI(D,E),UI),w.add(hI(D,F),AI)}}}var{defineProperty:rE,getOwnPropertyDescriptor:K_,getOwnPropertyNames:S_}=Object,Q_=Object.prototype.hasOwnProperty,ff=(D,F)=>rE(D,"name",{value:F,configurable:!0}),H_=(D,F)=>{for(var E in F)rE(D,E,{get:F[E],enumerable:!0})},L_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of S_(F))if(!Q_.call(D,$)&&$!==E)rE(D,$,{get:()=>F[$],enumerable:!(w=K_(F,$))||w.enumerable})}return D},R_=(D)=>L_(rE({},"__esModule",{value:!0}),D),CI={};H_(CI,{deserializerMiddleware:()=>BI,deserializerMiddlewareOption:()=>UI,getSerdePlugin:()=>II,serializerMiddleware:()=>hI,serializerMiddlewareOption:()=>AI});GI.exports=R_(CI);var BI=ff((D,F)=>(E)=>async(w)=>{const{response:$}=await E(w);try{const C=await F($,D);return{response:$,output:C}}catch(C){if(Object.defineProperty(C,"$response",{value:$}),!("$metadata"in C)){if(C.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof C.$responseBodyText!=="undefined"){if(C.$response)C.$response.body=C.$responseBodyText}}throw C}},"deserializerMiddleware"),hI=ff((D,F)=>(E,w)=>async($)=>{var C;const f=((C=w.endpointV2)==null?void 0:C.url)&&D.urlParser?async()=>D.urlParser(w.endpointV2.url):D.endpoint;if(!f)throw new Error("No valid endpoint provider available.");const B=await F($.input,{...D,endpoint:f});return E({...$,request:B})},"serializerMiddleware"),UI={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},AI={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};ff(II,"getSerdePlugin")});var TI=X((s7D,zI)=>{var{defineProperty:sE,getOwnPropertyDescriptor:V_,getOwnPropertyNames:N_}=Object,q_=Object.prototype.hasOwnProperty,h2=(D,F)=>sE(D,"name",{value:F,configurable:!0}),O_=(D,F)=>{for(var E in F)sE(D,E,{get:F[E],enumerable:!0})},j_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of N_(F))if(!q_.call(D,$)&&$!==E)sE(D,$,{get:()=>F[$],enumerable:!(w=V_(F,$))||w.enumerable})}return D},P_=(D)=>j_(sE({},"__esModule",{value:!0}),D),YI={};O_(YI,{endpointMiddleware:()=>WI,endpointMiddlewareOptions:()=>JI,getEndpointFromInstructions:()=>ZI,getEndpointPlugin:()=>u_,resolveEndpointConfig:()=>v_,resolveParams:()=>XI,toEndpointV1:()=>Cf});zI.exports=P_(YI);var y_=h2(async(D)=>{const F=(D==null?void 0:D.Bucket)||"";if(typeof D.Bucket==="string")D.Bucket=F.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(g_(F)){if(D.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!c_(F)||F.indexOf(".")!==-1&&!String(D.Endpoint).startsWith("http:")||F.toLowerCase()!==F||F.length<3)D.ForcePathStyle=!0;if(D.DisableMultiRegionAccessPoints)D.disableMultiRegionAccessPoints=!0,D.DisableMRAP=!0;return D},"resolveParamsForS3"),k_=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,b_=/(\d+\.){3}\d+/,x_=/\.\./,c_=h2((D)=>k_.test(D)&&!b_.test(D)&&!x_.test(D),"isDnsCompatibleBucketName"),g_=h2((D)=>{const[F,E,w,,,$]=D.split(":"),C=F==="arn"&&D.split(":").length>=6,f=Boolean(C&&E&&w&&$);if(C&&!f)throw new Error(`Invalid ARN: ${D} was an invalid ARN.`);return f},"isArnBucketName"),r_=h2((D,F,E)=>{const w=h2(async()=>{const $=E[D]??E[F];if(typeof $==="function")return $();return $},"configProvider");if(D==="credentialScope"||F==="CredentialScope")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return($==null?void 0:$.credentialScope)??($==null?void 0:$.CredentialScope)};if(D==="accountId"||F==="AccountId")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return($==null?void 0:$.accountId)??($==null?void 0:$.AccountId)};if(D==="endpoint"||F==="endpoint")return async()=>{const $=await w();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:C,hostname:f,port:B,path:h}=$;return`${C}//${f}${B?":"+B:""}${h}`}}return $};return w},"createConfigValueProvider"),__=$f(),MI=fI(),Cf=h2((D)=>{if(typeof D==="object"){if("url"in D)return MI.parseUrl(D.url);return D}return MI.parseUrl(D)},"toEndpointV1"),ZI=h2(async(D,F,E,w)=>{if(!E.endpoint){let f;if(E.serviceConfiguredEndpoint)f=await E.serviceConfiguredEndpoint();else f=await __.getEndpointFromConfig(E.serviceId);if(f)E.endpoint=()=>Promise.resolve(Cf(f))}const $=await XI(D,F,E);if(typeof E.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return E.endpointProvider($,w)},"getEndpointFromInstructions"),XI=h2(async(D,F,E)=>{var w;const $={},C=((w=F==null?void 0:F.getEndpointParameterInstructions)==null?void 0:w.call(F))||{};for(let[f,B]of Object.entries(C))switch(B.type){case"staticContextParams":$[f]=B.value;break;case"contextParams":$[f]=D[B.name];break;case"clientContextParams":case"builtInParams":$[f]=await r_(B.name,f,E)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(B))}if(Object.keys(C).length===0)Object.assign($,E);if(String(E.serviceId).toLowerCase()==="s3")await y_($);return $},"resolveParams"),_E=kF(),WI=h2(({config:D,instructions:F})=>{return(E,w)=>async($)=>{var C,f,B;const h=await ZI($.input,{getEndpointParameterInstructions(){return F}},{...D},w);w.endpointV2=h,w.authSchemes=(C=h.properties)==null?void 0:C.authSchemes;const U=(f=w.authSchemes)==null?void 0:f[0];if(U){w.signing_region=U.signingRegion,w.signing_service=U.signingName;const I=_E.getSmithyContext(w),A=(B=I==null?void 0:I.selectedHttpAuthScheme)==null?void 0:B.httpAuthOption;if(A)A.signingProperties=Object.assign(A.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return E({...$})}},"endpointMiddleware"),s_=YD(),JI={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:s_.serializerMiddlewareOption.name},u_=h2((D,F)=>({applyToStack:(E)=>{E.addRelativeTo(WI({config:D,instructions:F}),JI)}}),"getEndpointPlugin"),d_=$f(),v_=h2((D)=>{const F=D.tls??!0,{endpoint:E}=D,w=E!=null?async()=>Cf(await _E.normalizeProvider(E)()):void 0,C={...D,endpoint:w,tls:F,isCustomEndpoint:!!E,useDualstackEndpoint:_E.normalizeProvider(D.useDualstackEndpoint??!1),useFipsEndpoint:_E.normalizeProvider(D.useFipsEndpoint??!1)};let f=void 0;return C.serviceConfiguredEndpoint=async()=>{if(D.serviceId&&!f)f=d_.getEndpointFromConfig(D.serviceId);return f},C},"resolveEndpointConfig")});var H1=X((u7D,qI)=>{function RI(D){return Object.keys(D).reduce((F,E)=>{const w=D[E];return{...F,[E]:Array.isArray(w)?[...w]:w}},{})}function NI(D){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(D)}var{defineProperty:uE,getOwnPropertyDescriptor:m_,getOwnPropertyNames:n_}=Object,l_=Object.prototype.hasOwnProperty,w8=(D,F)=>uE(D,"name",{value:F,configurable:!0}),i_=(D,F)=>{for(var E in F)uE(D,E,{get:F[E],enumerable:!0})},p_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of n_(F))if(!l_.call(D,$)&&$!==E)uE(D,$,{get:()=>F[$],enumerable:!(w=m_(F,$))||w.enumerable})}return D},a_=(D)=>p_(uE({},"__esModule",{value:!0}),D),KI={};i_(KI,{Field:()=>e_,Fields:()=>Ds,HttpRequest:()=>Fs,HttpResponse:()=>Es,IHttpRequest:()=>SI.HttpRequest,getHttpHandlerExtensionConfiguration:()=>o_,isValidHostname:()=>NI,resolveHttpHandlerRuntimeConfig:()=>t_});qI.exports=a_(KI);var o_=w8((D)=>{let F=D.httpHandler;return{setHttpHandler(E){F=E},httpHandler(){return F},updateHttpClientConfig(E,w){F.updateHttpClientConfig(E,w)},httpHandlerConfigs(){return F.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),t_=w8((D)=>{return{httpHandler:D.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),SI=W0(),QI=class D{constructor({name:F,kind:E=SI.FieldPosition.HEADER,values:w=[]}){this.name=F,this.kind=E,this.values=w}add(F){this.values.push(F)}set(F){this.values=F}remove(F){this.values=this.values.filter((E)=>E!==F)}toString(){return this.values.map((F)=>F.includes(",")||F.includes(" ")?`"${F}"`:F).join(", ")}get(){return this.values}};w8(QI,"Field");var e_=QI,HI=class D{constructor({fields:F=[],encoding:E="utf-8"}){this.entries={},F.forEach(this.setField.bind(this)),this.encoding=E}setField(F){this.entries[F.name.toLowerCase()]=F}getField(F){return this.entries[F.toLowerCase()]}removeField(F){delete this.entries[F.toLowerCase()]}getByType(F){return Object.values(this.entries).filter((E)=>E.kind===F)}};w8(HI,"Fields");var Ds=HI,LI=class D{constructor(F){this.method=F.method||"GET",this.hostname=F.hostname||"localhost",this.port=F.port,this.query=F.query||{},this.headers=F.headers||{},this.body=F.body,this.protocol=F.protocol?F.protocol.slice(-1)!==":"?`${F.protocol}:`:F.protocol:"https:",this.path=F.path?F.path.charAt(0)!=="/"?`/${F.path}`:F.path:"/",this.username=F.username,this.password=F.password,this.fragment=F.fragment}static clone(F){const E=new D({...F,headers:{...F.headers}});if(E.query)E.query=RI(E.query);return E}static isInstance(F){if(!F)return!1;const E=F;return"method"in E&&"protocol"in E&&"hostname"in E&&"path"in E&&typeof E.query==="object"&&typeof E.headers==="object"}clone(){return D.clone(this)}};w8(LI,"HttpRequest");var Fs=LI;w8(RI,"cloneQuery");var VI=class D{constructor(F){this.statusCode=F.statusCode,this.reason=F.reason,this.headers=F.headers||{},this.body=F.body}static isInstance(F){if(!F)return!1;const E=F;return typeof E.statusCode==="number"&&typeof E.headers==="object"}};w8(VI,"HttpResponse");var Es=VI;w8(NI,"isValidHostname")});var Bf=X((OI)=>{function $s(D){return D&&D.__esModule?D:{default:D}}function fs(){if(dE>vE.length-16)ws.default.randomFillSync(vE),dE=0;return vE.slice(dE,dE+=16)}Object.defineProperty(OI,"__esModule",{value:!0});OI.default=fs;var ws=$s(import.meta.require("crypto")),vE=new Uint8Array(256),dE=vE.length});var yI=X((jI)=>{Object.defineProperty(jI,"__esModule",{value:!0});jI.default=void 0;var Bs=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;jI.default=Bs});var gF=X((kI)=>{function Us(D){return D&&D.__esModule?D:{default:D}}function As(D){return typeof D==="string"&&hs.default.test(D)}Object.defineProperty(kI,"__esModule",{value:!0});kI.default=void 0;var hs=Us(yI()),Is=As;kI.default=Is});var rF=X((cI)=>{function Ms(D){return D&&D.__esModule?D:{default:D}}function xI(D,F=0){return pD[D[F+0]]+pD[D[F+1]]+pD[D[F+2]]+pD[D[F+3]]+"-"+pD[D[F+4]]+pD[D[F+5]]+"-"+pD[D[F+6]]+pD[D[F+7]]+"-"+pD[D[F+8]]+pD[D[F+9]]+"-"+pD[D[F+10]]+pD[D[F+11]]+pD[D[F+12]]+pD[D[F+13]]+pD[D[F+14]]+pD[D[F+15]]}function Ys(D,F=0){const E=xI(D,F);if(!Gs.default(E))throw TypeError("Stringified UUID is invalid");return E}Object.defineProperty(cI,"__esModule",{value:!0});cI.default=void 0;cI.unsafeStringify=xI;var Gs=Ms(gF()),pD=[];for(let D=0;D<256;++D)pD.push((D+256).toString(16).slice(1));var Zs=Ys;cI.default=Zs});var uI=X((_I)=>{function zs(D){return D&&D.__esModule?D:{default:D}}function Ts(D,F,E){let w=F&&E||0;const $=F||new Array(16);D=D||{};let C=D.node||rI,f=D.clockseq!==void 0?D.clockseq:hf;if(C==null||f==null){const Y=D.random||(D.rng||Ws.default)();if(C==null)C=rI=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(f==null)f=hf=(Y[6]<<8|Y[7])&16383}let B=D.msecs!==void 0?D.msecs:Date.now(),h=D.nsecs!==void 0?D.nsecs:Af+1;const U=B-Uf+(h-Af)/1e4;if(U<0&&D.clockseq===void 0)f=f+1&16383;if((U<0||B>Uf)&&D.nsecs===void 0)h=0;if(h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Uf=B,Af=h,hf=f,B+=12219292800000;const I=((B&268435455)*1e4+h)%4294967296;$[w++]=I>>>24&255,$[w++]=I>>>16&255,$[w++]=I>>>8&255,$[w++]=I&255;const A=B/4294967296*1e4&268435455;$[w++]=A>>>8&255,$[w++]=A&255,$[w++]=A>>>24&15|16,$[w++]=A>>>16&255,$[w++]=f>>>8|128,$[w++]=f&255;for(let Y=0;Y<6;++Y)$[w+Y]=C[Y];return F||Js.unsafeStringify($)}Object.defineProperty(_I,"__esModule",{value:!0});_I.default=void 0;var Ws=zs(Bf()),Js=rF(),rI,hf,Uf=0,Af=0,Ks=Ts;_I.default=Ks});var If=X((dI)=>{function Qs(D){return D&&D.__esModule?D:{default:D}}function Hs(D){if(!Ss.default(D))throw TypeError("Invalid UUID");let F;const E=new Uint8Array(16);return E[0]=(F=parseInt(D.slice(0,8),16))>>>24,E[1]=F>>>16&255,E[2]=F>>>8&255,E[3]=F&255,E[4]=(F=parseInt(D.slice(9,13),16))>>>8,E[5]=F&255,E[6]=(F=parseInt(D.slice(14,18),16))>>>8,E[7]=F&255,E[8]=(F=parseInt(D.slice(19,23),16))>>>8,E[9]=F&255,E[10]=(F=parseInt(D.slice(24,36),16))/1099511627776&255,E[11]=F/4294967296&255,E[12]=F>>>24&255,E[13]=F>>>16&255,E[14]=F>>>8&255,E[15]=F&255,E}Object.defineProperty(dI,"__esModule",{value:!0});dI.default=void 0;var Ss=Qs(gF()),Ls=Hs;dI.default=Ls});var Gf=X((lI)=>{function Ns(D){return D&&D.__esModule?D:{default:D}}function qs(D){D=unescape(encodeURIComponent(D));const F=[];for(let E=0;E<D.length;++E)F.push(D.charCodeAt(E));return F}function Os(D,F,E){function w($,C,f,B){var h;if(typeof $==="string")$=qs($);if(typeof C==="string")C=Vs.default(C);if(((h=C)===null||h===void 0?void 0:h.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let U=new Uint8Array(16+$.length);if(U.set(C),U.set($,C.length),U=E(U),U[6]=U[6]&15|F,U[8]=U[8]&63|128,f){B=B||0;for(let I=0;I<16;++I)f[B+I]=U[I];return f}return Rs.unsafeStringify(U)}try{w.name=D}catch($){}return w.DNS=mI,w.URL=nI,w}Object.defineProperty(lI,"__esModule",{value:!0});lI.URL=lI.DNS=void 0;lI.default=Os;var Rs=rF(),Vs=Ns(If()),mI="6ba7b810-9dad-11d1-80b4-00c04fd430c8";lI.DNS=mI;var nI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";lI.URL=nI});var oI=X((pI)=>{function ks(D){return D&&D.__esModule?D:{default:D}}function bs(D){if(Array.isArray(D))D=Buffer.from(D);else if(typeof D==="string")D=Buffer.from(D,"utf8");return ys.default.createHash("md5").update(D).digest()}Object.defineProperty(pI,"__esModule",{value:!0});pI.default=void 0;var ys=ks(import.meta.require("crypto")),xs=bs;pI.default=xs});var FG=X((eI)=>{function tI(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(eI,"__esModule",{value:!0});eI.default=void 0;var cs=tI(Gf()),gs=tI(oI()),rs=cs.default("v3",48,gs.default),_s=rs;eI.default=_s});var $G=X((EG)=>{function us(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(EG,"__esModule",{value:!0});EG.default=void 0;var ss=us(import.meta.require("crypto")),ds={randomUUID:ss.default.randomUUID};EG.default=ds});var UG=X((BG)=>{function CG(D){return D&&D.__esModule?D:{default:D}}function ns(D,F,E){if(fG.default.randomUUID&&!F&&!D)return fG.default.randomUUID();D=D||{};const w=D.random||(D.rng||vs.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,F){E=E||0;for(let $=0;$<16;++$)F[E+$]=w[$];return F}return ms.unsafeStringify(w)}Object.defineProperty(BG,"__esModule",{value:!0});BG.default=void 0;var fG=CG($G()),vs=CG(Bf()),ms=rF(),ls=ns;BG.default=ls});var GG=X((AG)=>{function ps(D){return D&&D.__esModule?D:{default:D}}function as(D){if(Array.isArray(D))D=Buffer.from(D);else if(typeof D==="string")D=Buffer.from(D,"utf8");return is.default.createHash("sha1").update(D).digest()}Object.defineProperty(AG,"__esModule",{value:!0});AG.default=void 0;var is=ps(import.meta.require("crypto")),os=as;AG.default=os});var XG=X((YG)=>{function MG(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(YG,"__esModule",{value:!0});YG.default=void 0;var ts=MG(Gf()),es=MG(GG()),Du=ts.default("v5",80,es.default),Fu=Du;YG.default=Fu});var zG=X((WG)=>{Object.defineProperty(WG,"__esModule",{value:!0});WG.default=void 0;var Eu="00000000-0000-0000-0000-000000000000";WG.default=Eu});var SG=X((TG)=>{function $u(D){return D&&D.__esModule?D:{default:D}}function fu(D){if(!wu.default(D))throw TypeError("Invalid UUID");return parseInt(D.slice(14,15),16)}Object.defineProperty(TG,"__esModule",{value:!0});TG.default=void 0;var wu=$u(gF()),Cu=fu;TG.default=Cu});var Mf=X((U2)=>{function L1(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(U2,"__esModule",{value:!0});Object.defineProperty(U2,"NIL",{enumerable:!0,get:function(){return Iu.default}});Object.defineProperty(U2,"parse",{enumerable:!0,get:function(){return Zu.default}});Object.defineProperty(U2,"stringify",{enumerable:!0,get:function(){return Yu.default}});Object.defineProperty(U2,"v1",{enumerable:!0,get:function(){return Bu.default}});Object.defineProperty(U2,"v3",{enumerable:!0,get:function(){return hu.default}});Object.defineProperty(U2,"v4",{enumerable:!0,get:function(){return Uu.default}});Object.defineProperty(U2,"v5",{enumerable:!0,get:function(){return Au.default}});Object.defineProperty(U2,"validate",{enumerable:!0,get:function(){return Mu.default}});Object.defineProperty(U2,"version",{enumerable:!0,get:function(){return Gu.default}});var Bu=L1(uI()),hu=L1(FG()),Uu=L1(UG()),Au=L1(XG()),Iu=L1(zG()),Gu=L1(SG()),Mu=L1(gF()),Yu=L1(rF()),Zu=L1(If())});var Yf=X((ffD,RG)=>{var{defineProperty:mE,getOwnPropertyDescriptor:Xu,getOwnPropertyNames:Wu}=Object,Ju=Object.prototype.hasOwnProperty,H6=(D,F)=>mE(D,"name",{value:F,configurable:!0}),zu=(D,F)=>{for(var E in F)mE(D,E,{get:F[E],enumerable:!0})},Tu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Wu(F))if(!Ju.call(D,$)&&$!==E)mE(D,$,{get:()=>F[$],enumerable:!(w=Xu(F,$))||w.enumerable})}return D},Ku=(D)=>Tu(mE({},"__esModule",{value:!0}),D),QG={};zu(QG,{isClockSkewCorrectedError:()=>HG,isClockSkewError:()=>Nu,isRetryableByTrait:()=>Vu,isServerError:()=>Ou,isThrottlingError:()=>qu,isTransientError:()=>LG});RG.exports=Ku(QG);var Su=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Qu=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Hu=["TimeoutError","RequestTimeout","RequestTimeoutException"],Lu=[500,502,503,504],Ru=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Vu=H6((D)=>D.$retryable!==void 0,"isRetryableByTrait"),Nu=H6((D)=>Su.includes(D.name),"isClockSkewError"),HG=H6((D)=>{var F;return(F=D.$metadata)==null?void 0:F.clockSkewCorrected},"isClockSkewCorrectedError"),qu=H6((D)=>{var F,E;return((F=D.$metadata)==null?void 0:F.httpStatusCode)===429||Qu.includes(D.name)||((E=D.$retryable)==null?void 0:E.throttling)==!0},"isThrottlingError"),LG=H6((D)=>{var F;return HG(D)||Hu.includes(D.name)||Ru.includes((D==null?void 0:D.code)||"")||Lu.includes(((F=D.$metadata)==null?void 0:F.httpStatusCode)||0)},"isTransientError"),Ou=H6((D)=>{var F;if(((F=D.$metadata)==null?void 0:F.httpStatusCode)!==void 0){const E=D.$metadata.httpStatusCode;if(500<=E&&E<=599&&!LG(D))return!0;return!1}return!1},"isServerError")});var _G=X((CfD,rG)=>{var{defineProperty:nE,getOwnPropertyDescriptor:ju,getOwnPropertyNames:Pu}=Object,yu=Object.prototype.hasOwnProperty,A2=(D,F)=>nE(D,"name",{value:F,configurable:!0}),ku=(D,F)=>{for(var E in F)nE(D,E,{get:F[E],enumerable:!0})},bu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Pu(F))if(!yu.call(D,$)&&$!==E)nE(D,$,{get:()=>F[$],enumerable:!(w=ju(F,$))||w.enumerable})}return D},xu=(D)=>bu(nE({},"__esModule",{value:!0}),D),NG={};ku(NG,{AdaptiveRetryStrategy:()=>uu,ConfiguredRetryStrategy:()=>du,DEFAULT_MAX_ATTEMPTS:()=>Zf,DEFAULT_RETRY_DELAY_BASE:()=>_F,DEFAULT_RETRY_MODE:()=>cu,DefaultRateLimiter:()=>jG,INITIAL_RETRY_TOKENS:()=>Xf,INVOCATION_ID_HEADER:()=>ru,MAXIMUM_RETRY_DELAY:()=>Wf,NO_RETRY_INCREMENT:()=>bG,REQUEST_HEADER:()=>_u,RETRY_COST:()=>yG,RETRY_MODES:()=>qG,StandardRetryStrategy:()=>Jf,THROTTLING_RETRY_DELAY_BASE:()=>PG,TIMEOUT_RETRY_COST:()=>kG});rG.exports=xu(NG);var qG=((D)=>{return D.STANDARD="standard",D.ADAPTIVE="adaptive",D})(qG||{}),Zf=3,cu="standard",gu=Yf(),OG=class D{constructor(F){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(F==null?void 0:F.beta)??0.7,this.minCapacity=(F==null?void 0:F.minCapacity)??1,this.minFillRate=(F==null?void 0:F.minFillRate)??0.5,this.scaleConstant=(F==null?void 0:F.scaleConstant)??0.4,this.smooth=(F==null?void 0:F.smooth)??0.8;const E=this.getCurrentTimeInSeconds();this.lastThrottleTime=E,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(F){if(!this.enabled)return;if(this.refillTokenBucket(),F>this.currentCapacity){const E=(F-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,E))}this.currentCapacity=this.currentCapacity-F}refillTokenBucket(){const F=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=F;return}const E=(F-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+E),this.lastTimestamp=F}updateClientSendingRate(F){let E;if(this.updateMeasuredRate(),gu.isThrottlingError(F)){const $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),E=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),E=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(E,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(F){return this.getPrecise(F*this.beta)}cubicSuccess(F){return this.getPrecise(this.scaleConstant*Math.pow(F-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(F){this.refillTokenBucket(),this.fillRate=Math.max(F,this.minFillRate),this.maxCapacity=Math.max(F,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const F=this.getCurrentTimeInSeconds(),E=Math.floor(F*2)/2;if(this.requestCount++,E>this.lastTxRateBucket){const w=this.requestCount/(E-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=E}}getPrecise(F){return parseFloat(F.toFixed(8))}};A2(OG,"DefaultRateLimiter");var jG=OG,_F=100,Wf=20000,PG=500,Xf=500,yG=5,kG=10,bG=1,ru="amz-sdk-invocation-id",_u="amz-sdk-request",su=A2(()=>{let D=_F;return{computeNextBackoffDelay:A2((w)=>{return Math.floor(Math.min(Wf,Math.random()*2**w*D))},"computeNextBackoffDelay"),setDelayBase:A2((w)=>{D=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),VG=A2(({retryDelay:D,retryCount:F,retryCost:E})=>{return{getRetryCount:A2(()=>F,"getRetryCount"),getRetryDelay:A2(()=>Math.min(Wf,D),"getRetryDelay"),getRetryCost:A2(()=>E,"getRetryCost")}},"createDefaultRetryToken"),xG=class D{constructor(F){this.maxAttempts=F,this.mode="standard",this.capacity=Xf,this.retryBackoffStrategy=su(),this.maxAttemptsProvider=typeof F==="function"?F:async()=>F}async acquireInitialRetryToken(F){return VG({retryDelay:_F,retryCount:0})}async refreshRetryTokenForRetry(F,E){const w=await this.getMaxAttempts();if(this.shouldRetry(F,E,w)){const $=E.errorType;this.retryBackoffStrategy.setDelayBase($==="THROTTLING"?PG:_F);const C=this.retryBackoffStrategy.computeNextBackoffDelay(F.getRetryCount()),f=E.retryAfterHint?Math.max(E.retryAfterHint.getTime()-Date.now()||0,C):C,B=this.getCapacityCost($);return this.capacity-=B,VG({retryDelay:f,retryCount:F.getRetryCount()+1,retryCost:B})}throw new Error("No retry token available")}recordSuccess(F){this.capacity=Math.max(Xf,this.capacity+(F.getRetryCost()??bG))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(F){return console.warn(`Max attempts provider could not resolve. Using default of ${Zf}`),Zf}}shouldRetry(F,E,w){return F.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(E.errorType)&&this.isRetryableError(E.errorType)}getCapacityCost(F){return F==="TRANSIENT"?kG:yG}isRetryableError(F){return F==="THROTTLING"||F==="TRANSIENT"}};A2(xG,"StandardRetryStrategy");var Jf=xG,cG=class D{constructor(F,E){this.maxAttemptsProvider=F,this.mode="adaptive";const{rateLimiter:w}=E??{};this.rateLimiter=w??new jG,this.standardRetryStrategy=new Jf(F)}async acquireInitialRetryToken(F){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(F)}async refreshRetryTokenForRetry(F,E){return this.rateLimiter.updateClientSendingRate(E),this.standardRetryStrategy.refreshRetryTokenForRetry(F,E)}recordSuccess(F){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(F)}};A2(cG,"AdaptiveRetryStrategy");var uu=cG,gG=class D extends Jf{constructor(F,E=_F){super(typeof F==="function"?F:async()=>F);if(typeof E==="number")this.computeNextBackoffDelay=()=>E;else this.computeNextBackoffDelay=E}async refreshRetryTokenForRetry(F,E){const w=await super.refreshRetryTokenForRetry(F,E);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};A2(gG,"ConfiguredRetryStrategy");var du=gG});var mG=X((BfD,vG)=>{var{defineProperty:lE,getOwnPropertyDescriptor:vu,getOwnPropertyNames:mu}=Object,nu=Object.prototype.hasOwnProperty,s0=(D,F)=>lE(D,"name",{value:F,configurable:!0}),lu=(D,F)=>{for(var E in F)lE(D,E,{get:F[E],enumerable:!0})},iu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of mu(F))if(!nu.call(D,$)&&$!==E)lE(D,$,{get:()=>F[$],enumerable:!(w=vu(F,$))||w.enumerable})}return D},pu=(D)=>iu(lE({},"__esModule",{value:!0}),D),dG={};lu(dG,{constructStack:()=>zf});vG.exports=pu(dG);var m8=s0((D,F)=>{const E=[];if(D)E.push(D);if(F)for(let w of F)E.push(w);return E},"getAllAliases"),$8=s0((D,F)=>{return`${D||"anonymous"}${F&&F.length>0?` (a.k.a. ${F.join(",")})`:""}`},"getMiddlewareNameWithAliases"),zf=s0(()=>{let D=[],F=[],E=!1;const w=new Set,$=s0((A)=>A.sort((Y,G)=>sG[G.step]-sG[Y.step]||uG[G.priority||"normal"]-uG[Y.priority||"normal"]),"sort"),C=s0((A)=>{let Y=!1;const G=s0((Z)=>{const z=m8(Z.name,Z.aliases);if(z.includes(A)){Y=!0;for(let W of z)w.delete(W);return!1}return!0},"filterCb");return D=D.filter(G),F=F.filter(G),Y},"removeByName"),f=s0((A)=>{let Y=!1;const G=s0((Z)=>{if(Z.middleware===A){Y=!0;for(let z of m8(Z.name,Z.aliases))w.delete(z);return!1}return!0},"filterCb");return D=D.filter(G),F=F.filter(G),Y},"removeByReference"),B=s0((A)=>{var Y;return D.forEach((G)=>{A.add(G.middleware,{...G})}),F.forEach((G)=>{A.addRelativeTo(G.middleware,{...G})}),(Y=A.identifyOnResolve)==null||Y.call(A,I.identifyOnResolve()),A},"cloneTo"),h=s0((A)=>{const Y=[];return A.before.forEach((G)=>{if(G.before.length===0&&G.after.length===0)Y.push(G);else Y.push(...h(G))}),Y.push(A),A.after.reverse().forEach((G)=>{if(G.before.length===0&&G.after.length===0)Y.push(G);else Y.push(...h(G))}),Y},"expandRelativeMiddlewareList"),U=s0((A=!1)=>{const Y=[],G=[],Z={};return D.forEach((W)=>{const J={...W,before:[],after:[]};for(let K of m8(J.name,J.aliases))Z[K]=J;Y.push(J)}),F.forEach((W)=>{const J={...W,before:[],after:[]};for(let K of m8(J.name,J.aliases))Z[K]=J;G.push(J)}),G.forEach((W)=>{if(W.toMiddleware){const J=Z[W.toMiddleware];if(J===void 0){if(A)return;throw new Error(`${W.toMiddleware} is not found when adding ${$8(W.name,W.aliases)} middleware ${W.relation} ${W.toMiddleware}`)}if(W.relation==="after")J.after.push(W);if(W.relation==="before")J.before.push(W)}}),$(Y).map(h).reduce((W,J)=>{return W.push(...J),W},[])},"getMiddlewareList"),I={add:(A,Y={})=>{const{name:G,override:Z,aliases:z}=Y,W={step:"initialize",priority:"normal",middleware:A,...Y},J=m8(G,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${$8(G,z)}'`);for(let K of J){const L=D.findIndex((m)=>{var DD;return m.name===K||((DD=m.aliases)==null?void 0:DD.some((wD)=>wD===K))});if(L===-1)continue;const V=D[L];if(V.step!==W.step||W.priority!==V.priority)throw new Error(`"${$8(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${$8(G,z)}" middleware with ${W.priority} priority in ${W.step} step.`);D.splice(L,1)}}for(let K of J)w.add(K)}D.push(W)},addRelativeTo:(A,Y)=>{const{name:G,override:Z,aliases:z}=Y,W={middleware:A,...Y},J=m8(G,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${$8(G,z)}'`);for(let K of J){const L=F.findIndex((m)=>{var DD;return m.name===K||((DD=m.aliases)==null?void 0:DD.some((wD)=>wD===K))});if(L===-1)continue;const V=F[L];if(V.toMiddleware!==W.toMiddleware||V.relation!==W.relation)throw new Error(`"${$8(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${$8(G,z)}" middleware ${W.relation} "${W.toMiddleware}" middleware.`);F.splice(L,1)}}for(let K of J)w.add(K)}F.push(W)},clone:()=>B(zf()),use:(A)=>{A.applyToStack(I)},remove:(A)=>{if(typeof A==="string")return C(A);else return f(A)},removeByTag:(A)=>{let Y=!1;const G=s0((Z)=>{const{tags:z,name:W,aliases:J}=Z;if(z&&z.includes(A)){const K=m8(W,J);for(let L of K)w.delete(L);return Y=!0,!1}return!0},"filterCb");return D=D.filter(G),F=F.filter(G),Y},concat:(A)=>{var Y;const G=B(zf());return G.use(A),G.identifyOnResolve(E||G.identifyOnResolve()||(((Y=A.identifyOnResolve)==null?void 0:Y.call(A))??!1)),G},applyToStack:B,identify:()=>{return U(!0).map((A)=>{const Y=A.step??A.relation+" "+A.toMiddleware;return $8(A.name,A.aliases)+" - "+Y})},identifyOnResolve(A){if(typeof A==="boolean")E=A;return E},resolve:(A,Y)=>{for(let G of U().map((Z)=>Z.middleware).reverse())A=G(A,Y);if(E)console.log(I.identify());return A}};return I},"constructStack"),sG={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},uG={high:3,normal:2,low:1}});var Tf=X((hfD,lG)=>{var{defineProperty:iE,getOwnPropertyDescriptor:au,getOwnPropertyNames:ou}=Object,tu=Object.prototype.hasOwnProperty,eu=(D,F)=>iE(D,"name",{value:F,configurable:!0}),Dd=(D,F)=>{for(var E in F)iE(D,E,{get:F[E],enumerable:!0})},Fd=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of ou(F))if(!tu.call(D,$)&&$!==E)iE(D,$,{get:()=>F[$],enumerable:!(w=au(F,$))||w.enumerable})}return D},Ed=(D)=>Fd(iE({},"__esModule",{value:!0}),D),nG={};Dd(nG,{isArrayBuffer:()=>wd});lG.exports=Ed(nG);var wd=eu((D)=>typeof ArrayBuffer==="function"&&D instanceof ArrayBuffer||Object.prototype.toString.call(D)==="[object ArrayBuffer]","isArrayBuffer")});var sF=X((UfD,aG)=>{var{defineProperty:pE,getOwnPropertyDescriptor:$d,getOwnPropertyNames:fd}=Object,Cd=Object.prototype.hasOwnProperty,iG=(D,F)=>pE(D,"name",{value:F,configurable:!0}),Bd=(D,F)=>{for(var E in F)pE(D,E,{get:F[E],enumerable:!0})},hd=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of fd(F))if(!Cd.call(D,$)&&$!==E)pE(D,$,{get:()=>F[$],enumerable:!(w=$d(F,$))||w.enumerable})}return D},Ud=(D)=>hd(pE({},"__esModule",{value:!0}),D),pG={};Bd(pG,{fromArrayBuffer:()=>Id,fromString:()=>Gd});aG.exports=Ud(pG);var Ad=Tf(),Kf=import.meta.require("buffer"),Id=iG((D,F=0,E=D.byteLength-F)=>{if(!Ad.isArrayBuffer(D))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof D} (${D})`);return Kf.Buffer.from(D,F,E)},"fromArrayBuffer"),Gd=iG((D,F)=>{if(typeof D!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof D} (${D})`);return F?Kf.Buffer.from(D,F):Kf.Buffer.from(D)},"fromString")});var eG=X((oG)=>{Object.defineProperty(oG,"__esModule",{value:!0});oG.fromBase64=void 0;var Md=sF(),Yd=/^[A-Za-z0-9+/]*={0,2}$/,Zd=(D)=>{if(D.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Yd.exec(D))throw new TypeError("Invalid base64 string.");const F=Md.fromString(D,"base64");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength)};oG.fromBase64=Zd});var f8=X((IfD,wM)=>{var{defineProperty:aE,getOwnPropertyDescriptor:Xd,getOwnPropertyNames:Wd}=Object,Jd=Object.prototype.hasOwnProperty,Sf=(D,F)=>aE(D,"name",{value:F,configurable:!0}),zd=(D,F)=>{for(var E in F)aE(D,E,{get:F[E],enumerable:!0})},Td=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Wd(F))if(!Jd.call(D,$)&&$!==E)aE(D,$,{get:()=>F[$],enumerable:!(w=Xd(F,$))||w.enumerable})}return D},Kd=(D)=>Td(aE({},"__esModule",{value:!0}),D),DM={};zd(DM,{fromUtf8:()=>EM,toUint8Array:()=>Sd,toUtf8:()=>Qd});wM.exports=Kd(DM);var FM=sF(),EM=Sf((D)=>{const F=FM.fromString(D,"utf8");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Sd=Sf((D)=>{if(typeof D==="string")return EM(D);if(ArrayBuffer.isView(D))return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(D)},"toUint8Array"),Qd=Sf((D)=>{if(typeof D==="string")return D;if(typeof D!=="object"||typeof D.byteOffset!=="number"||typeof D.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return FM.fromArrayBuffer(D.buffer,D.byteOffset,D.byteLength).toString("utf8")},"toUtf8")});var CM=X(($M)=>{Object.defineProperty($M,"__esModule",{value:!0});$M.toBase64=void 0;var Hd=sF(),Ld=f8(),Rd=(D)=>{let F;if(typeof D==="string")F=Ld.fromUtf8(D);else F=D;if(typeof F!=="object"||typeof F.byteOffset!=="number"||typeof F.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Hd.fromArrayBuffer(F.buffer,F.byteOffset,F.byteLength).toString("base64")};$M.toBase64=Rd});var tE=X((MfD,oE)=>{var{defineProperty:BM,getOwnPropertyDescriptor:Vd,getOwnPropertyNames:Nd}=Object,qd=Object.prototype.hasOwnProperty,Qf=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Nd(F))if(!qd.call(D,$)&&$!==E)BM(D,$,{get:()=>F[$],enumerable:!(w=Vd(F,$))||w.enumerable})}return D},hM=(D,F,E)=>(Qf(D,F,"default"),E&&Qf(E,F,"default")),Od=(D)=>Qf(BM({},"__esModule",{value:!0}),D),Hf={};oE.exports=Od(Hf);hM(Hf,eG(),oE.exports);hM(Hf,CM(),oE.exports)});var IM=X((UM)=>{Object.defineProperty(UM,"__esModule",{value:!0});UM.getAwsChunkedEncodingStream=void 0;var jd=import.meta.require("stream"),Pd=(D,F)=>{const{base64Encoder:E,bodyLengthChecker:w,checksumAlgorithmFn:$,checksumLocationName:C,streamHasher:f}=F,B=E!==void 0&&$!==void 0&&C!==void 0&&f!==void 0,h=B?f($,D):void 0,U=new jd.Readable({read:()=>{}});return D.on("data",(I)=>{const A=w(I)||0;U.push(`${A.toString(16)}\r\n`),U.push(I),U.push("\r\n")}),D.on("end",async()=>{if(U.push("0\r\n"),B){const I=E(await h);U.push(`${C}:${I}\r\n`),U.push("\r\n")}U.push(null)}),U};UM.getAwsChunkedEncodingStream=Pd});var Rf=X((ZfD,YM)=>{var{defineProperty:eE,getOwnPropertyDescriptor:yd,getOwnPropertyNames:kd}=Object,bd=Object.prototype.hasOwnProperty,Lf=(D,F)=>eE(D,"name",{value:F,configurable:!0}),xd=(D,F)=>{for(var E in F)eE(D,E,{get:F[E],enumerable:!0})},cd=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of kd(F))if(!bd.call(D,$)&&$!==E)eE(D,$,{get:()=>F[$],enumerable:!(w=yd(F,$))||w.enumerable})}return D},gd=(D)=>cd(eE({},"__esModule",{value:!0}),D),GM={};xd(GM,{escapeUri:()=>MM,escapeUriPath:()=>_d});YM.exports=gd(GM);var MM=Lf((D)=>encodeURIComponent(D).replace(/[!'()*]/g,rd),"escapeUri"),rd=Lf((D)=>`%${D.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),_d=Lf((D)=>D.split("/").map(MM).join("/"),"escapeUriPath")});var Nf=X((XfD,WM)=>{function XM(D){const F=[];for(let E of Object.keys(D).sort()){const w=D[E];if(E=Vf.escapeUri(E),Array.isArray(w))for(let $=0,C=w.length;$<C;$++)F.push(`${E}=${Vf.escapeUri(w[$])}`);else{let $=E;if(w||typeof w==="string")$+=`=${Vf.escapeUri(w)}`;F.push($)}}return F.join("&")}var{defineProperty:Dw,getOwnPropertyDescriptor:sd,getOwnPropertyNames:ud}=Object,dd=Object.prototype.hasOwnProperty,vd=(D,F)=>Dw(D,"name",{value:F,configurable:!0}),md=(D,F)=>{for(var E in F)Dw(D,E,{get:F[E],enumerable:!0})},nd=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of ud(F))if(!dd.call(D,$)&&$!==E)Dw(D,$,{get:()=>F[$],enumerable:!(w=sd(F,$))||w.enumerable})}return D},ld=(D)=>nd(Dw({},"__esModule",{value:!0}),D),ZM={};md(ZM,{buildQueryString:()=>XM});WM.exports=ld(ZM);var Vf=Rf();vd(XM,"buildQueryString")});var xM=X((WfD,bM)=>{async function jf(D,F,E=TM){const w=F.headers??{},$=w.Expect||w.expect;let C=-1,f=!1;if($==="100-continue")await Promise.race([new Promise((B)=>{C=Number(setTimeout(B,Math.max(TM,E)))}),new Promise((B)=>{D.on("continue",()=>{clearTimeout(C),B()}),D.on("error",()=>{f=!0,clearTimeout(C),B()})})]);if(!f)NM(D,F.body)}function NM(D,F){if(F instanceof VM.Readable){F.pipe(D);return}if(F){if(Buffer.isBuffer(F)||typeof F==="string"){D.end(F);return}const E=F;if(typeof E==="object"&&E.buffer&&typeof E.byteOffset==="number"&&typeof E.byteLength==="number"){D.end(Buffer.from(E.buffer,E.byteOffset,E.byteLength));return}D.end(Buffer.from(F));return}D.end()}async function kM(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}var{create:id,defineProperty:uF,getOwnPropertyDescriptor:pd,getOwnPropertyNames:ad,getPrototypeOf:od}=Object,td=Object.prototype.hasOwnProperty,AD=(D,F)=>uF(D,"name",{value:F,configurable:!0}),ed=(D,F)=>{for(var E in F)uF(D,E,{get:F[E],enumerable:!0})},SM=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of ad(F))if(!td.call(D,$)&&$!==E)uF(D,$,{get:()=>F[$],enumerable:!(w=pd(F,$))||w.enumerable})}return D},Dv=(D,F,E)=>(E=D!=null?id(od(D)):{},SM(F||!D||!D.__esModule?uF(E,"default",{value:D,enumerable:!0}):E,D)),Fv=(D)=>SM(uF({},"__esModule",{value:!0}),D),QM={};ed(QM,{DEFAULT_REQUEST_TIMEOUT:()=>Bv,NodeHttp2Handler:()=>Gv,NodeHttpHandler:()=>hv,streamCollector:()=>Yv});bM.exports=Fv(QM);var HM=H1(),LM=Nf(),qf=import.meta.require("http"),Of=import.meta.require("https"),Ev=["ECONNRESET","EPIPE","ETIMEDOUT"],RM=AD((D)=>{const F={};for(let E of Object.keys(D)){const w=D[E];F[E]=Array.isArray(w)?w.join(","):w}return F},"getTransformedHeaders"),JM=1000,wv=AD((D,F,E=0)=>{if(!E)return-1;const w=AD(($)=>{const C=setTimeout(()=>{D.destroy(),F(Object.assign(new Error(`Socket timed out without establishing a connection within ${E} ms`),{name:"TimeoutError"}))},E-$),f=AD((B)=>{if(B==null?void 0:B.connecting)B.on("connect",()=>{clearTimeout(C)});else clearTimeout(C)},"doWithSocket");if(D.socket)f(D.socket);else D.on("socket",f)},"registerTimeout");if(E<2000)return w(0),0;return setTimeout(w.bind(null,JM),JM)},"setConnectionTimeout"),$v=3000,fv=AD((D,{keepAlive:F,keepAliveMsecs:E},w=$v)=>{if(F!==!0)return-1;const $=AD(()=>{if(D.socket)D.socket.setKeepAlive(F,E||0);else D.on("socket",(C)=>{C.setKeepAlive(F,E||0)})},"registerListener");if(w===0)return $(),0;return setTimeout($,w)},"setSocketKeepAlive"),zM=3000,Cv=AD((D,F,E=0)=>{const w=AD(($)=>{D.setTimeout(E-$,()=>{D.destroy(),F(Object.assign(new Error(`Connection timed out after ${E} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<E&&E<6000)return w(0),0;return setTimeout(w.bind(null,E===0?0:zM),zM)},"setSocketTimeout"),VM=import.meta.require("stream"),TM=1000;AD(jf,"writeRequestBody");AD(NM,"writeBody");var Bv=0,qM=class D{constructor(F){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((E,w)=>{if(typeof F==="function")F().then(($)=>{E(this.resolveDefaultConfig($))}).catch(w);else E(this.resolveDefaultConfig(F))})}static create(F){if(typeof(F==null?void 0:F.handle)==="function")return F;return new D(F)}static checkSocketUsage(F,E,w=console){var $,C,f;const{sockets:B,requests:h,maxSockets:U}=F;if(typeof U!=="number"||U===1/0)return E;const I=15000;if(Date.now()-I<E)return E;if(B&&h)for(let A in B){const Y=(($=B[A])==null?void 0:$.length)??0,G=((C=h[A])==null?void 0:C.length)??0;if(Y>=U&&G>=2*U)return(f=w==null?void 0:w.warn)==null||f.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${G} additional requests are enqueued.
2
+ var Fg=Object.create;var{getPrototypeOf:Eg,defineProperty:i7,getOwnPropertyNames:wg}=Object;var $g=Object.prototype.hasOwnProperty;var L=(D,F,E)=>{E=D!=null?Fg(Eg(D)):{};const w=F||!D||!D.__esModule?i7(E,"default",{value:D,enumerable:!0}):E;for(let $ of wg(D))if(!$g.call(w,$))i7(w,$,{get:()=>D[$],enumerable:!0});return w};var W=(D,F)=>()=>(F||D((F={exports:{}}).exports,F),F.exports);var _0=(D,F)=>{for(var E in F)i7(D,E,{get:F[E],enumerable:!0,configurable:!0,set:(w)=>F[E]=()=>w})};var G=(D,F)=>()=>(D&&(F=D(D=0)),F);var j2=(D)=>{let F=D.httpHandler;return{setHttpHandler(E){F=E},httpHandler(){return F},updateHttpClientConfig(E,w){F.updateHttpClientConfig(E,w)},httpHandlerConfigs(){return F.httpHandlerConfigs()}}},P2=(D)=>{return{httpHandler:D.httpHandler()}};var EA=()=>{};var J0=W((d4D,IA)=>{var{defineProperty:jE,getOwnPropertyDescriptor:fg,getOwnPropertyNames:Cg}=Object,Bg=Object.prototype.hasOwnProperty,PE=(D,F)=>jE(D,"name",{value:F,configurable:!0}),hg=(D,F)=>{for(var E in F)jE(D,E,{get:F[E],enumerable:!0})},Ug=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Cg(F))if(!Bg.call(D,$)&&$!==E)jE(D,$,{get:()=>F[$],enumerable:!(w=fg(F,$))||w.enumerable})}return D},Ag=(D)=>Ug(jE({},"__esModule",{value:!0}),D),wA={};hg(wA,{AlgorithmId:()=>BA,EndpointURLScheme:()=>CA,FieldPosition:()=>hA,HttpApiKeyAuthLocation:()=>fA,HttpAuthLocation:()=>$A,IniSectionType:()=>UA,RequestHandlerProtocol:()=>AA,SMITHY_CONTEXT_KEY:()=>Zg,getDefaultClientConfiguration:()=>Gg,resolveDefaultRuntimeConfig:()=>Yg});IA.exports=Ag(wA);var $A=((D)=>{return D.HEADER="header",D.QUERY="query",D})($A||{}),fA=((D)=>{return D.HEADER="header",D.QUERY="query",D})(fA||{}),CA=((D)=>{return D.HTTP="http",D.HTTPS="https",D})(CA||{}),BA=((D)=>{return D.MD5="md5",D.CRC32="crc32",D.CRC32C="crc32c",D.SHA1="sha1",D.SHA256="sha256",D})(BA||{}),Ig=PE((D)=>{const F=[];if(D.sha256!==void 0)F.push({algorithmId:()=>"sha256",checksumConstructor:()=>D.sha256});if(D.md5!=null)F.push({algorithmId:()=>"md5",checksumConstructor:()=>D.md5});return{_checksumAlgorithms:F,addChecksumAlgorithm(E){this._checksumAlgorithms.push(E)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Mg=PE((D)=>{const F={};return D.checksumAlgorithms().forEach((E)=>{F[E.algorithmId()]=E.checksumConstructor()}),F},"resolveChecksumRuntimeConfig"),Gg=PE((D)=>{return{...Ig(D)}},"getDefaultClientConfiguration"),Yg=PE((D)=>{return{...Mg(D)}},"resolveDefaultRuntimeConfig"),hA=((D)=>{return D[D.HEADER=0]="HEADER",D[D.TRAILER=1]="TRAILER",D})(hA||{}),Zg="__smithy_context",UA=((D)=>{return D.PROFILE="profile",D.SSO_SESSION="sso-session",D.SERVICES="services",D})(UA||{}),AA=((D)=>{return D.HTTP_0_9="http/0.9",D.HTTP_1_0="http/1.0",D.TDS_8_0="tds/8.0",D})(AA||{})});var Wg;var MA=G(()=>{Wg=L(J0(),1)});var GA=()=>{};function Xg(D){return Object.keys(D).reduce((F,E)=>{const w=D[E];return{...F,[E]:Array.isArray(w)?[...w]:w}},{})}class rD{constructor(D){this.method=D.method||"GET",this.hostname=D.hostname||"localhost",this.port=D.port,this.query=D.query||{},this.headers=D.headers||{},this.body=D.body,this.protocol=D.protocol?D.protocol.slice(-1)!==":"?`${D.protocol}:`:D.protocol:"https:",this.path=D.path?D.path.charAt(0)!=="/"?`/${D.path}`:D.path:"/",this.username=D.username,this.password=D.password,this.fragment=D.fragment}static clone(D){const F=new rD({...D,headers:{...D.headers}});if(F.query)F.query=Xg(F.query);return F}static isInstance(D){if(!D)return!1;const F=D;return"method"in F&&"protocol"in F&&"hostname"in F&&"path"in F&&typeof F.query==="object"&&typeof F.headers==="object"}clone(){return rD.clone(this)}}class E8{constructor(D){this.statusCode=D.statusCode,this.reason=D.reason,this.headers=D.headers||{},this.body=D.body}static isInstance(D){if(!D)return!1;const F=D;return typeof F.statusCode==="number"&&typeof F.headers==="object"}}var YA=()=>{};var vD=G(()=>{EA();MA();GA();YA()});function y2(D){return D}var Jg=(D)=>(F)=>async(E)=>{if(!rD.isInstance(E.request))return F(E);const{request:w}=E,{handlerProtocol:$=""}=D.requestHandler.metadata||{};if($.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let C=w.hostname;if(w.port!=null)C+=`:${w.port}`;w.headers.host=C}return F(E)},zg,k2=(D)=>({applyToStack:(F)=>{F.add(Jg(D),zg)}});var z6=G(()=>{vD();zg={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var Tg=()=>(D,F)=>async(E)=>{try{const w=await D(E),{clientName:$,commandName:C,logger:f,dynamoDbDocumentClientOptions:B={}}=F,{overrideInputFilterSensitiveLog:h,overrideOutputFilterSensitiveLog:U}=B,I=h??F.inputFilterSensitiveLog,A=U??F.outputFilterSensitiveLog,{$metadata:Y,...M}=w.output;return f?.info?.({clientName:$,commandName:C,input:I(E.input),output:A(M),metadata:Y}),w}catch(w){const{clientName:$,commandName:C,logger:f,dynamoDbDocumentClientOptions:B={}}=F,{overrideInputFilterSensitiveLog:h}=B,U=h??F.inputFilterSensitiveLog;throw f?.error?.({clientName:$,commandName:C,input:U(E.input),error:w,metadata:w.$metadata}),w}},Kg,b2=(D)=>({applyToStack:(F)=>{F.add(Tg(),Kg)}});var ZA=G(()=>{Kg={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var T6=G(()=>{ZA()});var WA="X-Amzn-Trace-Id",Sg="AWS_LAMBDA_FUNCTION_NAME",Qg="_X_AMZN_TRACE_ID",Hg=(D)=>(F)=>async(E)=>{const{request:w}=E;if(!rD.isInstance(w)||D.runtime!=="node"||w.headers.hasOwnProperty(WA))return F(E);const $=process.env[Sg],C=process.env[Qg],f=(B)=>typeof B==="string"&&B.length>0;if(f($)&&f(C))w.headers[WA]=C;return F({...E,request:w})},Lg,x2=(D)=>({applyToStack:(F)=>{F.add(Hg(D),Lg)}});var K6=G(()=>{vD();Lg={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var xF=W((I7D,TA)=>{var{defineProperty:yE,getOwnPropertyDescriptor:Rg,getOwnPropertyNames:Vg}=Object,Ng=Object.prototype.hasOwnProperty,JA=(D,F)=>yE(D,"name",{value:F,configurable:!0}),qg=(D,F)=>{for(var E in F)yE(D,E,{get:F[E],enumerable:!0})},Og=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Vg(F))if(!Ng.call(D,$)&&$!==E)yE(D,$,{get:()=>F[$],enumerable:!(w=Rg(F,$))||w.enumerable})}return D},jg=(D)=>Og(yE({},"__esModule",{value:!0}),D),zA={};qg(zA,{getSmithyContext:()=>Pg,normalizeProvider:()=>yg});TA.exports=jg(zA);var XA=J0(),Pg=JA((D)=>D[XA.SMITHY_CONTEXT_KEY]||(D[XA.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),yg=JA((D)=>{if(typeof D==="function")return D;const F=Promise.resolve(D);return()=>F},"normalizeProvider")});var p7=W((M7D,LA)=>{var{defineProperty:kE,getOwnPropertyDescriptor:kg,getOwnPropertyNames:bg}=Object,xg=Object.prototype.hasOwnProperty,v8=(D,F)=>kE(D,"name",{value:F,configurable:!0}),cg=(D,F)=>{for(var E in F)kE(D,E,{get:F[E],enumerable:!0})},gg=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of bg(F))if(!xg.call(D,$)&&$!==E)kE(D,$,{get:()=>F[$],enumerable:!(w=kg(F,$))||w.enumerable})}return D},rg=(D)=>gg(kE({},"__esModule",{value:!0}),D),KA={};cg(KA,{CredentialsProviderError:()=>_g,ProviderError:()=>bE,TokenProviderError:()=>sg,chain:()=>ug,fromStatic:()=>dg,memoize:()=>vg});LA.exports=rg(KA);var SA=class D extends Error{constructor(F,E=!0){var w;let $,C=!0;if(typeof E==="boolean")$=void 0,C=E;else if(E!=null&&typeof E==="object")$=E.logger,C=E.tryNextLink??!0;super(F);this.name="ProviderError",this.tryNextLink=C,Object.setPrototypeOf(this,D.prototype),(w=$==null?void 0:$.debug)==null||w.call($,`@smithy/property-provider ${C?"->":"(!)"} ${F}`)}static from(F,E=!0){return Object.assign(new this(F.message,E),F)}};v8(SA,"ProviderError");var bE=SA,QA=class D extends bE{constructor(F,E=!0){super(F,E);this.name="CredentialsProviderError",Object.setPrototypeOf(this,D.prototype)}};v8(QA,"CredentialsProviderError");var _g=QA,HA=class D extends bE{constructor(F,E=!0){super(F,E);this.name="TokenProviderError",Object.setPrototypeOf(this,D.prototype)}};v8(HA,"TokenProviderError");var sg=HA,ug=v8((...D)=>async()=>{if(D.length===0)throw new bE("No providers in chain");let F;for(let E of D)try{return await E()}catch(w){if(F=w,w==null?void 0:w.tryNextLink)continue;throw w}throw F},"chain"),dg=v8((D)=>()=>Promise.resolve(D),"fromStatic"),vg=v8((D,F,E)=>{let w,$,C,f=!1;const B=v8(async()=>{if(!$)$=D();try{w=await $,C=!0,f=!1}finally{$=void 0}return w},"coalesceProvider");if(F===void 0)return async(h)=>{if(!C||(h==null?void 0:h.forceRefresh))w=await B();return w};return async(h)=>{if(!C||(h==null?void 0:h.forceRefresh))w=await B();if(f)return w;if(E&&!E(w))return f=!0,w;if(F(w))return await B(),w;return w}},"memoize")});var S6=W((RA)=>{Object.defineProperty(RA,"__esModule",{value:!0});RA.getHomeDir=void 0;var mg=import.meta.require("os"),ng=import.meta.require("path"),a7={},lg=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},ig=()=>{const{HOME:D,USERPROFILE:F,HOMEPATH:E,HOMEDRIVE:w=`C:${ng.sep}`}=process.env;if(D)return D;if(F)return F;if(E)return`${w}${E}`;const $=lg();if(!a7[$])a7[$]=mg.homedir();return a7[$]};RA.getHomeDir=ig});var o7=W((NA)=>{Object.defineProperty(NA,"__esModule",{value:!0});NA.getSSOTokenFilepath=void 0;var pg=import.meta.require("crypto"),ag=import.meta.require("path"),og=S6(),tg=(D)=>{const E=pg.createHash("sha1").update(D).digest("hex");return ag.join(og.getHomeDir(),".aws","sso","cache",`${E}.json`)};NA.getSSOTokenFilepath=tg});var PA=W((OA)=>{Object.defineProperty(OA,"__esModule",{value:!0});OA.getSSOTokenFromFile=void 0;var eg=import.meta.require("fs"),Dr=o7(),{readFile:Fr}=eg.promises,Er=async(D)=>{const F=Dr.getSSOTokenFilepath(D),E=await Fr(F,"utf8");return JSON.parse(E)};OA.getSSOTokenFromFile=Er});var e7=W((yA)=>{Object.defineProperty(yA,"__esModule",{value:!0});yA.slurpFile=void 0;var wr=import.meta.require("fs"),{readFile:$r}=wr.promises,t7={},fr=(D,F)=>{if(!t7[D]||(F===null||F===void 0?void 0:F.ignoreCache))t7[D]=$r(D,"utf8");return t7[D]};yA.slurpFile=fr});var wf=W((X7D,gF)=>{var{defineProperty:gE,getOwnPropertyDescriptor:Cr,getOwnPropertyNames:Br}=Object,hr=Object.prototype.hasOwnProperty,s0=(D,F)=>gE(D,"name",{value:F,configurable:!0}),Ur=(D,F)=>{for(var E in F)gE(D,E,{get:F[E],enumerable:!0})},Df=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Br(F))if(!hr.call(D,$)&&$!==E)gE(D,$,{get:()=>F[$],enumerable:!(w=Cr(F,$))||w.enumerable})}return D},Ef=(D,F,E)=>(Df(D,F,"default"),E&&Df(E,F,"default")),Ar=(D)=>Df(gE({},"__esModule",{value:!0}),D),cF={};Ur(cF,{CONFIG_PREFIX_SEPARATOR:()=>m8,DEFAULT_PROFILE:()=>gA,ENV_PROFILE:()=>cA,getProfileName:()=>Ir,loadSharedConfigFiles:()=>_A,loadSsoSessionData:()=>Hr,parseKnownFiles:()=>Rr});gF.exports=Ar(cF);Ef(cF,S6(),gF.exports);var cA="AWS_PROFILE",gA="default",Ir=s0((D)=>D.profile||process.env[cA]||gA,"getProfileName");Ef(cF,o7(),gF.exports);Ef(cF,PA(),gF.exports);var xE=J0(),Mr=s0((D)=>Object.entries(D).filter(([F])=>{const E=F.indexOf(m8);if(E===-1)return!1;return Object.values(xE.IniSectionType).includes(F.substring(0,E))}).reduce((F,[E,w])=>{const $=E.indexOf(m8),C=E.substring(0,$)===xE.IniSectionType.PROFILE?E.substring($+1):E;return F[C]=w,F},{...D.default&&{default:D.default}}),"getConfigData"),cE=import.meta.require("path"),Gr=S6(),Yr="AWS_CONFIG_FILE",rA=s0(()=>process.env[Yr]||cE.join(Gr.getHomeDir(),".aws","config"),"getConfigFilepath"),Zr=S6(),Wr="AWS_SHARED_CREDENTIALS_FILE",Xr=s0(()=>process.env[Wr]||cE.join(Zr.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),Jr=S6(),zr=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Tr=["__proto__","profile __proto__"],Ff=s0((D)=>{const F={};let E,w;for(let $ of D.split(/\r?\n/)){const C=$.split(/(^|\s)[;#]/)[0].trim();if(C[0]==="["&&C[C.length-1]==="]"){E=void 0,w=void 0;const B=C.substring(1,C.length-1),h=zr.exec(B);if(h){const[,U,,I]=h;if(Object.values(xE.IniSectionType).includes(U))E=[U,I].join(m8)}else E=B;if(Tr.includes(B))throw new Error(`Found invalid profile name "${B}"`)}else if(E){const B=C.indexOf("=");if(![0,-1].includes(B)){const[h,U]=[C.substring(0,B).trim(),C.substring(B+1).trim()];if(U==="")w=h;else{if(w&&$.trimStart()===$)w=void 0;F[E]=F[E]||{};const I=w?[w,h].join(m8):h;F[E][I]=U}}}}return F},"parseIni"),bA=e7(),xA=s0(()=>({}),"swallowError"),m8=".",_A=s0(async(D={})=>{const{filepath:F=Xr(),configFilepath:E=rA()}=D,w=Jr.getHomeDir();let C=F;if(F.startsWith("~/"))C=cE.join(w,F.slice(2));let f=E;if(E.startsWith("~/"))f=cE.join(w,E.slice(2));const B=await Promise.all([bA.slurpFile(f,{ignoreCache:D.ignoreCache}).then(Ff).then(Mr).catch(xA),bA.slurpFile(C,{ignoreCache:D.ignoreCache}).then(Ff).catch(xA)]);return{configFile:B[0],credentialsFile:B[1]}},"loadSharedConfigFiles"),Kr=s0((D)=>Object.entries(D).filter(([F])=>F.startsWith(xE.IniSectionType.SSO_SESSION+m8)).reduce((F,[E,w])=>({...F,[E.substring(E.indexOf(m8)+1)]:w}),{}),"getSsoSessionData"),Sr=e7(),Qr=s0(()=>({}),"swallowError"),Hr=s0(async(D={})=>Sr.slurpFile(D.configFilepath??rA()).then(Ff).then(Kr).catch(Qr),"loadSsoSessionData"),Lr=s0((...D)=>{const F={};for(let E of D)for(let[w,$]of Object.entries(E))if(F[w]!==void 0)Object.assign(F[w],$);else F[w]=$;return F},"mergeConfigFiles"),Rr=s0(async(D)=>{const F=await _A(D);return Lr(F.configFile,F.credentialsFile)},"parseKnownFiles")});var vA=W((J7D,dA)=>{function $f(D){try{const F=new Set(Array.from(D.match(/([A-Z_]){3,}/g)??[]));return F.delete("CONFIG"),F.delete("CONFIG_PREFIX_SEPARATOR"),F.delete("ENV"),[...F].join(", ")}catch(F){return D}}var{defineProperty:rE,getOwnPropertyDescriptor:Vr,getOwnPropertyNames:Nr}=Object,qr=Object.prototype.hasOwnProperty,Q6=(D,F)=>rE(D,"name",{value:F,configurable:!0}),Or=(D,F)=>{for(var E in F)rE(D,E,{get:F[E],enumerable:!0})},jr=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Nr(F))if(!qr.call(D,$)&&$!==E)rE(D,$,{get:()=>F[$],enumerable:!(w=Vr(F,$))||w.enumerable})}return D},Pr=(D)=>jr(rE({},"__esModule",{value:!0}),D),uA={};Or(uA,{loadConfig:()=>cr});dA.exports=Pr(uA);var rF=p7();Q6($f,"getSelectorName");var yr=Q6((D,F)=>async()=>{try{const E=D(process.env);if(E===void 0)throw new Error;return E}catch(E){throw new rF.CredentialsProviderError(E.message||`Not found in ENV: ${$f(D.toString())}`,{logger:F})}},"fromEnv"),sA=wf(),kr=Q6((D,{preferredFile:F="config",...E}={})=>async()=>{const w=sA.getProfileName(E),{configFile:$,credentialsFile:C}=await sA.loadSharedConfigFiles(E),f=C[w]||{},B=$[w]||{},h=F==="config"?{...f,...B}:{...B,...f};try{const I=D(h,F==="config"?$:C);if(I===void 0)throw new Error;return I}catch(U){throw new rF.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${$f(D.toString())}`,{logger:E.logger})}},"fromSharedConfigFiles"),br=Q6((D)=>typeof D==="function","isFunction"),xr=Q6((D)=>br(D)?async()=>await D():rF.fromStatic(D),"fromStatic"),cr=Q6(({environmentVariableSelector:D,configFileSelector:F,default:E},w={})=>rF.memoize(rF.chain(yr(D),kr(F,w),xr(E))),"loadConfig")});var aA=W((iA)=>{Object.defineProperty(iA,"__esModule",{value:!0});iA.getEndpointUrlConfig=void 0;var mA=wf(),nA="AWS_ENDPOINT_URL",lA="endpoint_url",gr=(D)=>({environmentVariableSelector:(F)=>{const E=D.split(" ").map((C)=>C.toUpperCase()),w=F[[nA,...E].join("_")];if(w)return w;const $=F[nA];if($)return $;return},configFileSelector:(F,E)=>{if(E&&F.services){const $=E[["services",F.services].join(mA.CONFIG_PREFIX_SEPARATOR)];if($){const C=D.split(" ").map((B)=>B.toLowerCase()),f=$[[C.join("_"),lA].join(mA.CONFIG_PREFIX_SEPARATOR)];if(f)return f}}const w=F[lA];if(w)return w;return},default:void 0});iA.getEndpointUrlConfig=gr});var ff=W((oA)=>{Object.defineProperty(oA,"__esModule",{value:!0});oA.getEndpointFromConfig=void 0;var rr=vA(),_r=aA(),sr=async(D)=>rr.loadConfig(_r.getEndpointUrlConfig(D!==null&&D!==void 0?D:""))();oA.getEndpointFromConfig=sr});var EI=W((K7D,FI)=>{function DI(D){const F={};if(D=D.replace(/^\?/,""),D)for(let E of D.split("&")){let[w,$=null]=E.split("=");if(w=decodeURIComponent(w),$)$=decodeURIComponent($);if(!(w in F))F[w]=$;else if(Array.isArray(F[w]))F[w].push($);else F[w]=[F[w],$]}return F}var{defineProperty:_E,getOwnPropertyDescriptor:ur,getOwnPropertyNames:dr}=Object,vr=Object.prototype.hasOwnProperty,mr=(D,F)=>_E(D,"name",{value:F,configurable:!0}),nr=(D,F)=>{for(var E in F)_E(D,E,{get:F[E],enumerable:!0})},lr=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of dr(F))if(!vr.call(D,$)&&$!==E)_E(D,$,{get:()=>F[$],enumerable:!(w=ur(F,$))||w.enumerable})}return D},ir=(D)=>lr(_E({},"__esModule",{value:!0}),D),eA={};nr(eA,{parseQueryString:()=>DI});FI.exports=ir(eA);mr(DI,"parseQueryString")});var CI=W((S7D,fI)=>{var{defineProperty:sE,getOwnPropertyDescriptor:pr,getOwnPropertyNames:ar}=Object,or=Object.prototype.hasOwnProperty,tr=(D,F)=>sE(D,"name",{value:F,configurable:!0}),er=(D,F)=>{for(var E in F)sE(D,E,{get:F[E],enumerable:!0})},D_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of ar(F))if(!or.call(D,$)&&$!==E)sE(D,$,{get:()=>F[$],enumerable:!(w=pr(F,$))||w.enumerable})}return D},F_=(D)=>D_(sE({},"__esModule",{value:!0}),D),wI={};er(wI,{parseUrl:()=>$I});fI.exports=F_(wI);var E_=EI(),$I=tr((D)=>{if(typeof D==="string")return $I(new URL(D));const{hostname:F,pathname:E,port:w,protocol:$,search:C}=D;let f;if(C)f=E_.parseQueryString(C);return{hostname:F,port:w?parseInt(w):void 0,protocol:$,path:E,query:f}},"parseUrl")});var Bf=W((Q7D,GI)=>{function MI(D,F,E){return{applyToStack:(w)=>{w.add(hI(D,E),AI),w.add(UI(D,F),II)}}}var{defineProperty:uE,getOwnPropertyDescriptor:w_,getOwnPropertyNames:$_}=Object,f_=Object.prototype.hasOwnProperty,Cf=(D,F)=>uE(D,"name",{value:F,configurable:!0}),C_=(D,F)=>{for(var E in F)uE(D,E,{get:F[E],enumerable:!0})},B_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of $_(F))if(!f_.call(D,$)&&$!==E)uE(D,$,{get:()=>F[$],enumerable:!(w=w_(F,$))||w.enumerable})}return D},h_=(D)=>B_(uE({},"__esModule",{value:!0}),D),BI={};C_(BI,{deserializerMiddleware:()=>hI,deserializerMiddlewareOption:()=>AI,getSerdePlugin:()=>MI,serializerMiddleware:()=>UI,serializerMiddlewareOption:()=>II});GI.exports=h_(BI);var hI=Cf((D,F)=>(E)=>async(w)=>{const{response:$}=await E(w);try{const C=await F($,D);return{response:$,output:C}}catch(C){if(Object.defineProperty(C,"$response",{value:$}),!("$metadata"in C)){if(C.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof C.$responseBodyText!=="undefined"){if(C.$response)C.$response.body=C.$responseBodyText}}throw C}},"deserializerMiddleware"),UI=Cf((D,F)=>(E,w)=>async($)=>{var C;const f=((C=w.endpointV2)==null?void 0:C.url)&&D.urlParser?async()=>D.urlParser(w.endpointV2.url):D.endpoint;if(!f)throw new Error("No valid endpoint provider available.");const B=await F($.input,{...D,endpoint:f});return E({...$,request:B})},"serializerMiddleware"),AI={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},II={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};Cf(MI,"getSerdePlugin")});var KI=W((H7D,TI)=>{var{defineProperty:vE,getOwnPropertyDescriptor:U_,getOwnPropertyNames:A_}=Object,I_=Object.prototype.hasOwnProperty,U2=(D,F)=>vE(D,"name",{value:F,configurable:!0}),M_=(D,F)=>{for(var E in F)vE(D,E,{get:F[E],enumerable:!0})},G_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of A_(F))if(!I_.call(D,$)&&$!==E)vE(D,$,{get:()=>F[$],enumerable:!(w=U_(F,$))||w.enumerable})}return D},Y_=(D)=>G_(vE({},"__esModule",{value:!0}),D),ZI={};M_(ZI,{endpointMiddleware:()=>JI,endpointMiddlewareOptions:()=>zI,getEndpointFromInstructions:()=>WI,getEndpointPlugin:()=>H_,resolveEndpointConfig:()=>R_,resolveParams:()=>XI,toEndpointV1:()=>hf});TI.exports=Y_(ZI);var Z_=U2(async(D)=>{const F=(D==null?void 0:D.Bucket)||"";if(typeof D.Bucket==="string")D.Bucket=F.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(T_(F)){if(D.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!z_(F)||F.indexOf(".")!==-1&&!String(D.Endpoint).startsWith("http:")||F.toLowerCase()!==F||F.length<3)D.ForcePathStyle=!0;if(D.DisableMultiRegionAccessPoints)D.disableMultiRegionAccessPoints=!0,D.DisableMRAP=!0;return D},"resolveParamsForS3"),W_=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,X_=/(\d+\.){3}\d+/,J_=/\.\./,z_=U2((D)=>W_.test(D)&&!X_.test(D)&&!J_.test(D),"isDnsCompatibleBucketName"),T_=U2((D)=>{const[F,E,w,,,$]=D.split(":"),C=F==="arn"&&D.split(":").length>=6,f=Boolean(C&&E&&w&&$);if(C&&!f)throw new Error(`Invalid ARN: ${D} was an invalid ARN.`);return f},"isArnBucketName"),K_=U2((D,F,E)=>{const w=U2(async()=>{const $=E[D]??E[F];if(typeof $==="function")return $();return $},"configProvider");if(D==="credentialScope"||F==="CredentialScope")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return($==null?void 0:$.credentialScope)??($==null?void 0:$.CredentialScope)};if(D==="accountId"||F==="AccountId")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return($==null?void 0:$.accountId)??($==null?void 0:$.AccountId)};if(D==="endpoint"||F==="endpoint")return async()=>{const $=await w();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:C,hostname:f,port:B,path:h}=$;return`${C}//${f}${B?":"+B:""}${h}`}}return $};return w},"createConfigValueProvider"),S_=ff(),YI=CI(),hf=U2((D)=>{if(typeof D==="object"){if("url"in D)return YI.parseUrl(D.url);return D}return YI.parseUrl(D)},"toEndpointV1"),WI=U2(async(D,F,E,w)=>{if(!E.endpoint){let f;if(E.serviceConfiguredEndpoint)f=await E.serviceConfiguredEndpoint();else f=await S_.getEndpointFromConfig(E.serviceId);if(f)E.endpoint=()=>Promise.resolve(hf(f))}const $=await XI(D,F,E);if(typeof E.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return E.endpointProvider($,w)},"getEndpointFromInstructions"),XI=U2(async(D,F,E)=>{var w;const $={},C=((w=F==null?void 0:F.getEndpointParameterInstructions)==null?void 0:w.call(F))||{};for(let[f,B]of Object.entries(C))switch(B.type){case"staticContextParams":$[f]=B.value;break;case"contextParams":$[f]=D[B.name];break;case"clientContextParams":case"builtInParams":$[f]=await K_(B.name,f,E)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(B))}if(Object.keys(C).length===0)Object.assign($,E);if(String(E.serviceId).toLowerCase()==="s3")await Z_($);return $},"resolveParams"),dE=xF(),JI=U2(({config:D,instructions:F})=>{return(E,w)=>async($)=>{var C,f,B;const h=await WI($.input,{getEndpointParameterInstructions(){return F}},{...D},w);w.endpointV2=h,w.authSchemes=(C=h.properties)==null?void 0:C.authSchemes;const U=(f=w.authSchemes)==null?void 0:f[0];if(U){w.signing_region=U.signingRegion,w.signing_service=U.signingName;const I=dE.getSmithyContext(w),A=(B=I==null?void 0:I.selectedHttpAuthScheme)==null?void 0:B.httpAuthOption;if(A)A.signingProperties=Object.assign(A.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return E({...$})}},"endpointMiddleware"),Q_=Bf(),zI={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Q_.serializerMiddlewareOption.name},H_=U2((D,F)=>({applyToStack:(E)=>{E.addRelativeTo(JI({config:D,instructions:F}),zI)}}),"getEndpointPlugin"),L_=ff(),R_=U2((D)=>{const F=D.tls??!0,{endpoint:E}=D,w=E!=null?async()=>hf(await dE.normalizeProvider(E)()):void 0,C={...D,endpoint:w,tls:F,isCustomEndpoint:!!E,useDualstackEndpoint:dE.normalizeProvider(D.useDualstackEndpoint??!1),useFipsEndpoint:dE.normalizeProvider(D.useFipsEndpoint??!1)};let f=void 0;return C.serviceConfiguredEndpoint=async()=>{if(D.serviceId&&!f)f=L_.getEndpointFromConfig(D.serviceId);return f},C},"resolveEndpointConfig")});var H1=W((L7D,OI)=>{function VI(D){return Object.keys(D).reduce((F,E)=>{const w=D[E];return{...F,[E]:Array.isArray(w)?[...w]:w}},{})}function qI(D){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(D)}var{defineProperty:mE,getOwnPropertyDescriptor:V_,getOwnPropertyNames:N_}=Object,q_=Object.prototype.hasOwnProperty,w8=(D,F)=>mE(D,"name",{value:F,configurable:!0}),O_=(D,F)=>{for(var E in F)mE(D,E,{get:F[E],enumerable:!0})},j_=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of N_(F))if(!q_.call(D,$)&&$!==E)mE(D,$,{get:()=>F[$],enumerable:!(w=V_(F,$))||w.enumerable})}return D},P_=(D)=>j_(mE({},"__esModule",{value:!0}),D),SI={};O_(SI,{Field:()=>b_,Fields:()=>x_,HttpRequest:()=>c_,HttpResponse:()=>g_,IHttpRequest:()=>QI.HttpRequest,getHttpHandlerExtensionConfiguration:()=>y_,isValidHostname:()=>qI,resolveHttpHandlerRuntimeConfig:()=>k_});OI.exports=P_(SI);var y_=w8((D)=>{let F=D.httpHandler;return{setHttpHandler(E){F=E},httpHandler(){return F},updateHttpClientConfig(E,w){F.updateHttpClientConfig(E,w)},httpHandlerConfigs(){return F.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),k_=w8((D)=>{return{httpHandler:D.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),QI=J0(),HI=class D{constructor({name:F,kind:E=QI.FieldPosition.HEADER,values:w=[]}){this.name=F,this.kind=E,this.values=w}add(F){this.values.push(F)}set(F){this.values=F}remove(F){this.values=this.values.filter((E)=>E!==F)}toString(){return this.values.map((F)=>F.includes(",")||F.includes(" ")?`"${F}"`:F).join(", ")}get(){return this.values}};w8(HI,"Field");var b_=HI,LI=class D{constructor({fields:F=[],encoding:E="utf-8"}){this.entries={},F.forEach(this.setField.bind(this)),this.encoding=E}setField(F){this.entries[F.name.toLowerCase()]=F}getField(F){return this.entries[F.toLowerCase()]}removeField(F){delete this.entries[F.toLowerCase()]}getByType(F){return Object.values(this.entries).filter((E)=>E.kind===F)}};w8(LI,"Fields");var x_=LI,RI=class D{constructor(F){this.method=F.method||"GET",this.hostname=F.hostname||"localhost",this.port=F.port,this.query=F.query||{},this.headers=F.headers||{},this.body=F.body,this.protocol=F.protocol?F.protocol.slice(-1)!==":"?`${F.protocol}:`:F.protocol:"https:",this.path=F.path?F.path.charAt(0)!=="/"?`/${F.path}`:F.path:"/",this.username=F.username,this.password=F.password,this.fragment=F.fragment}static clone(F){const E=new D({...F,headers:{...F.headers}});if(E.query)E.query=VI(E.query);return E}static isInstance(F){if(!F)return!1;const E=F;return"method"in E&&"protocol"in E&&"hostname"in E&&"path"in E&&typeof E.query==="object"&&typeof E.headers==="object"}clone(){return D.clone(this)}};w8(RI,"HttpRequest");var c_=RI;w8(VI,"cloneQuery");var NI=class D{constructor(F){this.statusCode=F.statusCode,this.reason=F.reason,this.headers=F.headers||{},this.body=F.body}static isInstance(F){if(!F)return!1;const E=F;return typeof E.statusCode==="number"&&typeof E.headers==="object"}};w8(NI,"HttpResponse");var g_=NI;w8(qI,"isValidHostname")});var Uf=W((jI)=>{function __(D){return D&&D.__esModule?D:{default:D}}function s_(){if(nE>lE.length-16)r_.default.randomFillSync(lE),nE=0;return lE.slice(nE,nE+=16)}Object.defineProperty(jI,"__esModule",{value:!0});jI.default=s_;var r_=__(import.meta.require("crypto")),lE=new Uint8Array(256),nE=lE.length});var kI=W((PI)=>{Object.defineProperty(PI,"__esModule",{value:!0});PI.default=void 0;var d_=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;PI.default=d_});var _F=W((bI)=>{function m_(D){return D&&D.__esModule?D:{default:D}}function n_(D){return typeof D==="string"&&v_.default.test(D)}Object.defineProperty(bI,"__esModule",{value:!0});bI.default=void 0;var v_=m_(kI()),l_=n_;bI.default=l_});var sF=W((gI)=>{function p_(D){return D&&D.__esModule?D:{default:D}}function cI(D,F=0){return aD[D[F+0]]+aD[D[F+1]]+aD[D[F+2]]+aD[D[F+3]]+"-"+aD[D[F+4]]+aD[D[F+5]]+"-"+aD[D[F+6]]+aD[D[F+7]]+"-"+aD[D[F+8]]+aD[D[F+9]]+"-"+aD[D[F+10]]+aD[D[F+11]]+aD[D[F+12]]+aD[D[F+13]]+aD[D[F+14]]+aD[D[F+15]]}function a_(D,F=0){const E=cI(D,F);if(!i_.default(E))throw TypeError("Stringified UUID is invalid");return E}Object.defineProperty(gI,"__esModule",{value:!0});gI.default=void 0;gI.unsafeStringify=cI;var i_=p_(_F()),aD=[];for(let D=0;D<256;++D)aD.push((D+256).toString(16).slice(1));var o_=a_;gI.default=o_});var dI=W((sI)=>{function Fs(D){return D&&D.__esModule?D:{default:D}}function Es(D,F,E){let w=F&&E||0;const $=F||new Array(16);D=D||{};let C=D.node||_I,f=D.clockseq!==void 0?D.clockseq:Af;if(C==null||f==null){const Y=D.random||(D.rng||e_.default)();if(C==null)C=_I=[Y[0]|1,Y[1],Y[2],Y[3],Y[4],Y[5]];if(f==null)f=Af=(Y[6]<<8|Y[7])&16383}let B=D.msecs!==void 0?D.msecs:Date.now(),h=D.nsecs!==void 0?D.nsecs:Mf+1;const U=B-If+(h-Mf)/1e4;if(U<0&&D.clockseq===void 0)f=f+1&16383;if((U<0||B>If)&&D.nsecs===void 0)h=0;if(h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");If=B,Mf=h,Af=f,B+=12219292800000;const I=((B&268435455)*1e4+h)%4294967296;$[w++]=I>>>24&255,$[w++]=I>>>16&255,$[w++]=I>>>8&255,$[w++]=I&255;const A=B/4294967296*1e4&268435455;$[w++]=A>>>8&255,$[w++]=A&255,$[w++]=A>>>24&15|16,$[w++]=A>>>16&255,$[w++]=f>>>8|128,$[w++]=f&255;for(let Y=0;Y<6;++Y)$[w+Y]=C[Y];return F||Ds.unsafeStringify($)}Object.defineProperty(sI,"__esModule",{value:!0});sI.default=void 0;var e_=Fs(Uf()),Ds=sF(),_I,Af,If=0,Mf=0,ws=Es;sI.default=ws});var Gf=W((vI)=>{function fs(D){return D&&D.__esModule?D:{default:D}}function Cs(D){if(!$s.default(D))throw TypeError("Invalid UUID");let F;const E=new Uint8Array(16);return E[0]=(F=parseInt(D.slice(0,8),16))>>>24,E[1]=F>>>16&255,E[2]=F>>>8&255,E[3]=F&255,E[4]=(F=parseInt(D.slice(9,13),16))>>>8,E[5]=F&255,E[6]=(F=parseInt(D.slice(14,18),16))>>>8,E[7]=F&255,E[8]=(F=parseInt(D.slice(19,23),16))>>>8,E[9]=F&255,E[10]=(F=parseInt(D.slice(24,36),16))/1099511627776&255,E[11]=F/4294967296&255,E[12]=F>>>24&255,E[13]=F>>>16&255,E[14]=F>>>8&255,E[15]=F&255,E}Object.defineProperty(vI,"__esModule",{value:!0});vI.default=void 0;var $s=fs(_F()),Bs=Cs;vI.default=Bs});var Yf=W((iI)=>{function As(D){return D&&D.__esModule?D:{default:D}}function Is(D){D=unescape(encodeURIComponent(D));const F=[];for(let E=0;E<D.length;++E)F.push(D.charCodeAt(E));return F}function Ms(D,F,E){function w($,C,f,B){var h;if(typeof $==="string")$=Is($);if(typeof C==="string")C=Us.default(C);if(((h=C)===null||h===void 0?void 0:h.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let U=new Uint8Array(16+$.length);if(U.set(C),U.set($,C.length),U=E(U),U[6]=U[6]&15|F,U[8]=U[8]&63|128,f){B=B||0;for(let I=0;I<16;++I)f[B+I]=U[I];return f}return hs.unsafeStringify(U)}try{w.name=D}catch($){}return w.DNS=nI,w.URL=lI,w}Object.defineProperty(iI,"__esModule",{value:!0});iI.URL=iI.DNS=void 0;iI.default=Ms;var hs=sF(),Us=As(Gf()),nI="6ba7b810-9dad-11d1-80b4-00c04fd430c8";iI.DNS=nI;var lI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";iI.URL=lI});var tI=W((aI)=>{function Ws(D){return D&&D.__esModule?D:{default:D}}function Xs(D){if(Array.isArray(D))D=Buffer.from(D);else if(typeof D==="string")D=Buffer.from(D,"utf8");return Zs.default.createHash("md5").update(D).digest()}Object.defineProperty(aI,"__esModule",{value:!0});aI.default=void 0;var Zs=Ws(import.meta.require("crypto")),Js=Xs;aI.default=Js});var EM=W((DM)=>{function eI(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(DM,"__esModule",{value:!0});DM.default=void 0;var zs=eI(Yf()),Ts=eI(tI()),Ks=zs.default("v3",48,Ts.default),Ss=Ks;DM.default=Ss});var fM=W((wM)=>{function Hs(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(wM,"__esModule",{value:!0});wM.default=void 0;var Qs=Hs(import.meta.require("crypto")),Ls={randomUUID:Qs.default.randomUUID};wM.default=Ls});var AM=W((hM)=>{function BM(D){return D&&D.__esModule?D:{default:D}}function Ns(D,F,E){if(CM.default.randomUUID&&!F&&!D)return CM.default.randomUUID();D=D||{};const w=D.random||(D.rng||Rs.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,F){E=E||0;for(let $=0;$<16;++$)F[E+$]=w[$];return F}return Vs.unsafeStringify(w)}Object.defineProperty(hM,"__esModule",{value:!0});hM.default=void 0;var CM=BM(fM()),Rs=BM(Uf()),Vs=sF(),qs=Ns;hM.default=qs});var GM=W((IM)=>{function js(D){return D&&D.__esModule?D:{default:D}}function Ps(D){if(Array.isArray(D))D=Buffer.from(D);else if(typeof D==="string")D=Buffer.from(D,"utf8");return Os.default.createHash("sha1").update(D).digest()}Object.defineProperty(IM,"__esModule",{value:!0});IM.default=void 0;var Os=js(import.meta.require("crypto")),ys=Ps;IM.default=ys});var XM=W((ZM)=>{function YM(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(ZM,"__esModule",{value:!0});ZM.default=void 0;var ks=YM(Yf()),bs=YM(GM()),xs=ks.default("v5",80,bs.default),cs=xs;ZM.default=cs});var TM=W((JM)=>{Object.defineProperty(JM,"__esModule",{value:!0});JM.default=void 0;var gs="00000000-0000-0000-0000-000000000000";JM.default=gs});var QM=W((KM)=>{function _s(D){return D&&D.__esModule?D:{default:D}}function ss(D){if(!rs.default(D))throw TypeError("Invalid UUID");return parseInt(D.slice(14,15),16)}Object.defineProperty(KM,"__esModule",{value:!0});KM.default=void 0;var rs=_s(_F()),us=ss;KM.default=us});var Zf=W((A2)=>{function L1(D){return D&&D.__esModule?D:{default:D}}Object.defineProperty(A2,"__esModule",{value:!0});Object.defineProperty(A2,"NIL",{enumerable:!0,get:function(){return ls.default}});Object.defineProperty(A2,"parse",{enumerable:!0,get:function(){return os.default}});Object.defineProperty(A2,"stringify",{enumerable:!0,get:function(){return as.default}});Object.defineProperty(A2,"v1",{enumerable:!0,get:function(){return ds.default}});Object.defineProperty(A2,"v3",{enumerable:!0,get:function(){return vs.default}});Object.defineProperty(A2,"v4",{enumerable:!0,get:function(){return ms.default}});Object.defineProperty(A2,"v5",{enumerable:!0,get:function(){return ns.default}});Object.defineProperty(A2,"validate",{enumerable:!0,get:function(){return ps.default}});Object.defineProperty(A2,"version",{enumerable:!0,get:function(){return is.default}});var ds=L1(dI()),vs=L1(EM()),ms=L1(AM()),ns=L1(XM()),ls=L1(TM()),is=L1(QM()),ps=L1(_F()),as=L1(sF()),os=L1(Gf())});var Wf=W((u7D,VM)=>{var{defineProperty:iE,getOwnPropertyDescriptor:ts,getOwnPropertyNames:es}=Object,Du=Object.prototype.hasOwnProperty,H6=(D,F)=>iE(D,"name",{value:F,configurable:!0}),Fu=(D,F)=>{for(var E in F)iE(D,E,{get:F[E],enumerable:!0})},Eu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of es(F))if(!Du.call(D,$)&&$!==E)iE(D,$,{get:()=>F[$],enumerable:!(w=ts(F,$))||w.enumerable})}return D},wu=(D)=>Eu(iE({},"__esModule",{value:!0}),D),HM={};Fu(HM,{isClockSkewCorrectedError:()=>LM,isClockSkewError:()=>Au,isRetryableByTrait:()=>Uu,isServerError:()=>Mu,isThrottlingError:()=>Iu,isTransientError:()=>RM});VM.exports=wu(HM);var $u=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],fu=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Cu=["TimeoutError","RequestTimeout","RequestTimeoutException"],Bu=[500,502,503,504],hu=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Uu=H6((D)=>D.$retryable!==void 0,"isRetryableByTrait"),Au=H6((D)=>$u.includes(D.name),"isClockSkewError"),LM=H6((D)=>{var F;return(F=D.$metadata)==null?void 0:F.clockSkewCorrected},"isClockSkewCorrectedError"),Iu=H6((D)=>{var F,E;return((F=D.$metadata)==null?void 0:F.httpStatusCode)===429||fu.includes(D.name)||((E=D.$retryable)==null?void 0:E.throttling)==!0},"isThrottlingError"),RM=H6((D)=>{var F;return LM(D)||Cu.includes(D.name)||hu.includes((D==null?void 0:D.code)||"")||Bu.includes(((F=D.$metadata)==null?void 0:F.httpStatusCode)||0)},"isTransientError"),Mu=H6((D)=>{var F;if(((F=D.$metadata)==null?void 0:F.httpStatusCode)!==void 0){const E=D.$metadata.httpStatusCode;if(500<=E&&E<=599&&!RM(D))return!0;return!1}return!1},"isServerError")});var sM=W((d7D,_M)=>{var{defineProperty:pE,getOwnPropertyDescriptor:Gu,getOwnPropertyNames:Yu}=Object,Zu=Object.prototype.hasOwnProperty,I2=(D,F)=>pE(D,"name",{value:F,configurable:!0}),Wu=(D,F)=>{for(var E in F)pE(D,E,{get:F[E],enumerable:!0})},Xu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Yu(F))if(!Zu.call(D,$)&&$!==E)pE(D,$,{get:()=>F[$],enumerable:!(w=Gu(F,$))||w.enumerable})}return D},Ju=(D)=>Xu(pE({},"__esModule",{value:!0}),D),qM={};Wu(qM,{AdaptiveRetryStrategy:()=>Hu,ConfiguredRetryStrategy:()=>Lu,DEFAULT_MAX_ATTEMPTS:()=>Xf,DEFAULT_RETRY_DELAY_BASE:()=>uF,DEFAULT_RETRY_MODE:()=>zu,DefaultRateLimiter:()=>PM,INITIAL_RETRY_TOKENS:()=>Jf,INVOCATION_ID_HEADER:()=>Ku,MAXIMUM_RETRY_DELAY:()=>zf,NO_RETRY_INCREMENT:()=>xM,REQUEST_HEADER:()=>Su,RETRY_COST:()=>kM,RETRY_MODES:()=>OM,StandardRetryStrategy:()=>Tf,THROTTLING_RETRY_DELAY_BASE:()=>yM,TIMEOUT_RETRY_COST:()=>bM});_M.exports=Ju(qM);var OM=((D)=>{return D.STANDARD="standard",D.ADAPTIVE="adaptive",D})(OM||{}),Xf=3,zu="standard",Tu=Wf(),jM=class D{constructor(F){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(F==null?void 0:F.beta)??0.7,this.minCapacity=(F==null?void 0:F.minCapacity)??1,this.minFillRate=(F==null?void 0:F.minFillRate)??0.5,this.scaleConstant=(F==null?void 0:F.scaleConstant)??0.4,this.smooth=(F==null?void 0:F.smooth)??0.8;const E=this.getCurrentTimeInSeconds();this.lastThrottleTime=E,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(F){if(!this.enabled)return;if(this.refillTokenBucket(),F>this.currentCapacity){const E=(F-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,E))}this.currentCapacity=this.currentCapacity-F}refillTokenBucket(){const F=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=F;return}const E=(F-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+E),this.lastTimestamp=F}updateClientSendingRate(F){let E;if(this.updateMeasuredRate(),Tu.isThrottlingError(F)){const $=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=$,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),E=this.cubicThrottle($),this.enableTokenBucket()}else this.calculateTimeWindow(),E=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(E,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(F){return this.getPrecise(F*this.beta)}cubicSuccess(F){return this.getPrecise(this.scaleConstant*Math.pow(F-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(F){this.refillTokenBucket(),this.fillRate=Math.max(F,this.minFillRate),this.maxCapacity=Math.max(F,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const F=this.getCurrentTimeInSeconds(),E=Math.floor(F*2)/2;if(this.requestCount++,E>this.lastTxRateBucket){const w=this.requestCount/(E-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=E}}getPrecise(F){return parseFloat(F.toFixed(8))}};I2(jM,"DefaultRateLimiter");var PM=jM,uF=100,zf=20000,yM=500,Jf=500,kM=5,bM=10,xM=1,Ku="amz-sdk-invocation-id",Su="amz-sdk-request",Qu=I2(()=>{let D=uF;return{computeNextBackoffDelay:I2((w)=>{return Math.floor(Math.min(zf,Math.random()*2**w*D))},"computeNextBackoffDelay"),setDelayBase:I2((w)=>{D=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),NM=I2(({retryDelay:D,retryCount:F,retryCost:E})=>{return{getRetryCount:I2(()=>F,"getRetryCount"),getRetryDelay:I2(()=>Math.min(zf,D),"getRetryDelay"),getRetryCost:I2(()=>E,"getRetryCost")}},"createDefaultRetryToken"),cM=class D{constructor(F){this.maxAttempts=F,this.mode="standard",this.capacity=Jf,this.retryBackoffStrategy=Qu(),this.maxAttemptsProvider=typeof F==="function"?F:async()=>F}async acquireInitialRetryToken(F){return NM({retryDelay:uF,retryCount:0})}async refreshRetryTokenForRetry(F,E){const w=await this.getMaxAttempts();if(this.shouldRetry(F,E,w)){const $=E.errorType;this.retryBackoffStrategy.setDelayBase($==="THROTTLING"?yM:uF);const C=this.retryBackoffStrategy.computeNextBackoffDelay(F.getRetryCount()),f=E.retryAfterHint?Math.max(E.retryAfterHint.getTime()-Date.now()||0,C):C,B=this.getCapacityCost($);return this.capacity-=B,NM({retryDelay:f,retryCount:F.getRetryCount()+1,retryCost:B})}throw new Error("No retry token available")}recordSuccess(F){this.capacity=Math.max(Jf,this.capacity+(F.getRetryCost()??xM))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(F){return console.warn(`Max attempts provider could not resolve. Using default of ${Xf}`),Xf}}shouldRetry(F,E,w){return F.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(E.errorType)&&this.isRetryableError(E.errorType)}getCapacityCost(F){return F==="TRANSIENT"?bM:kM}isRetryableError(F){return F==="THROTTLING"||F==="TRANSIENT"}};I2(cM,"StandardRetryStrategy");var Tf=cM,gM=class D{constructor(F,E){this.maxAttemptsProvider=F,this.mode="adaptive";const{rateLimiter:w}=E??{};this.rateLimiter=w??new PM,this.standardRetryStrategy=new Tf(F)}async acquireInitialRetryToken(F){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(F)}async refreshRetryTokenForRetry(F,E){return this.rateLimiter.updateClientSendingRate(E),this.standardRetryStrategy.refreshRetryTokenForRetry(F,E)}recordSuccess(F){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(F)}};I2(gM,"AdaptiveRetryStrategy");var Hu=gM,rM=class D extends Tf{constructor(F,E=uF){super(typeof F==="function"?F:async()=>F);if(typeof E==="number")this.computeNextBackoffDelay=()=>E;else this.computeNextBackoffDelay=E}async refreshRetryTokenForRetry(F,E){const w=await super.refreshRetryTokenForRetry(F,E);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};I2(rM,"ConfiguredRetryStrategy");var Lu=rM});var nM=W((v7D,mM)=>{var{defineProperty:aE,getOwnPropertyDescriptor:Ru,getOwnPropertyNames:Vu}=Object,Nu=Object.prototype.hasOwnProperty,u0=(D,F)=>aE(D,"name",{value:F,configurable:!0}),qu=(D,F)=>{for(var E in F)aE(D,E,{get:F[E],enumerable:!0})},Ou=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Vu(F))if(!Nu.call(D,$)&&$!==E)aE(D,$,{get:()=>F[$],enumerable:!(w=Ru(F,$))||w.enumerable})}return D},ju=(D)=>Ou(aE({},"__esModule",{value:!0}),D),vM={};qu(vM,{constructStack:()=>Kf});mM.exports=ju(vM);var n8=u0((D,F)=>{const E=[];if(D)E.push(D);if(F)for(let w of F)E.push(w);return E},"getAllAliases"),$8=u0((D,F)=>{return`${D||"anonymous"}${F&&F.length>0?` (a.k.a. ${F.join(",")})`:""}`},"getMiddlewareNameWithAliases"),Kf=u0(()=>{let D=[],F=[],E=!1;const w=new Set,$=u0((A)=>A.sort((Y,M)=>uM[M.step]-uM[Y.step]||dM[M.priority||"normal"]-dM[Y.priority||"normal"]),"sort"),C=u0((A)=>{let Y=!1;const M=u0((Z)=>{const z=n8(Z.name,Z.aliases);if(z.includes(A)){Y=!0;for(let X of z)w.delete(X);return!1}return!0},"filterCb");return D=D.filter(M),F=F.filter(M),Y},"removeByName"),f=u0((A)=>{let Y=!1;const M=u0((Z)=>{if(Z.middleware===A){Y=!0;for(let z of n8(Z.name,Z.aliases))w.delete(z);return!1}return!0},"filterCb");return D=D.filter(M),F=F.filter(M),Y},"removeByReference"),B=u0((A)=>{var Y;return D.forEach((M)=>{A.add(M.middleware,{...M})}),F.forEach((M)=>{A.addRelativeTo(M.middleware,{...M})}),(Y=A.identifyOnResolve)==null||Y.call(A,I.identifyOnResolve()),A},"cloneTo"),h=u0((A)=>{const Y=[];return A.before.forEach((M)=>{if(M.before.length===0&&M.after.length===0)Y.push(M);else Y.push(...h(M))}),Y.push(A),A.after.reverse().forEach((M)=>{if(M.before.length===0&&M.after.length===0)Y.push(M);else Y.push(...h(M))}),Y},"expandRelativeMiddlewareList"),U=u0((A=!1)=>{const Y=[],M=[],Z={};return D.forEach((X)=>{const J={...X,before:[],after:[]};for(let K of n8(J.name,J.aliases))Z[K]=J;Y.push(J)}),F.forEach((X)=>{const J={...X,before:[],after:[]};for(let K of n8(J.name,J.aliases))Z[K]=J;M.push(J)}),M.forEach((X)=>{if(X.toMiddleware){const J=Z[X.toMiddleware];if(J===void 0){if(A)return;throw new Error(`${X.toMiddleware} is not found when adding ${$8(X.name,X.aliases)} middleware ${X.relation} ${X.toMiddleware}`)}if(X.relation==="after")J.after.push(X);if(X.relation==="before")J.before.push(X)}}),$(Y).map(h).reduce((X,J)=>{return X.push(...J),X},[])},"getMiddlewareList"),I={add:(A,Y={})=>{const{name:M,override:Z,aliases:z}=Y,X={step:"initialize",priority:"normal",middleware:A,...Y},J=n8(M,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${$8(M,z)}'`);for(let K of J){const H=D.findIndex((m)=>{var FD;return m.name===K||((FD=m.aliases)==null?void 0:FD.some(($D)=>$D===K))});if(H===-1)continue;const V=D[H];if(V.step!==X.step||X.priority!==V.priority)throw new Error(`"${$8(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${$8(M,z)}" middleware with ${X.priority} priority in ${X.step} step.`);D.splice(H,1)}}for(let K of J)w.add(K)}D.push(X)},addRelativeTo:(A,Y)=>{const{name:M,override:Z,aliases:z}=Y,X={middleware:A,...Y},J=n8(M,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${$8(M,z)}'`);for(let K of J){const H=F.findIndex((m)=>{var FD;return m.name===K||((FD=m.aliases)==null?void 0:FD.some(($D)=>$D===K))});if(H===-1)continue;const V=F[H];if(V.toMiddleware!==X.toMiddleware||V.relation!==X.relation)throw new Error(`"${$8(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${$8(M,z)}" middleware ${X.relation} "${X.toMiddleware}" middleware.`);F.splice(H,1)}}for(let K of J)w.add(K)}F.push(X)},clone:()=>B(Kf()),use:(A)=>{A.applyToStack(I)},remove:(A)=>{if(typeof A==="string")return C(A);else return f(A)},removeByTag:(A)=>{let Y=!1;const M=u0((Z)=>{const{tags:z,name:X,aliases:J}=Z;if(z&&z.includes(A)){const K=n8(X,J);for(let H of K)w.delete(H);return Y=!0,!1}return!0},"filterCb");return D=D.filter(M),F=F.filter(M),Y},concat:(A)=>{var Y;const M=B(Kf());return M.use(A),M.identifyOnResolve(E||M.identifyOnResolve()||(((Y=A.identifyOnResolve)==null?void 0:Y.call(A))??!1)),M},applyToStack:B,identify:()=>{return U(!0).map((A)=>{const Y=A.step??A.relation+" "+A.toMiddleware;return $8(A.name,A.aliases)+" - "+Y})},identifyOnResolve(A){if(typeof A==="boolean")E=A;return E},resolve:(A,Y)=>{for(let M of U().map((Z)=>Z.middleware).reverse())A=M(A,Y);if(E)console.log(I.identify());return A}};return I},"constructStack"),uM={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},dM={high:3,normal:2,low:1}});var Sf=W((m7D,iM)=>{var{defineProperty:oE,getOwnPropertyDescriptor:Pu,getOwnPropertyNames:yu}=Object,ku=Object.prototype.hasOwnProperty,bu=(D,F)=>oE(D,"name",{value:F,configurable:!0}),xu=(D,F)=>{for(var E in F)oE(D,E,{get:F[E],enumerable:!0})},cu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of yu(F))if(!ku.call(D,$)&&$!==E)oE(D,$,{get:()=>F[$],enumerable:!(w=Pu(F,$))||w.enumerable})}return D},gu=(D)=>cu(oE({},"__esModule",{value:!0}),D),lM={};xu(lM,{isArrayBuffer:()=>ru});iM.exports=gu(lM);var ru=bu((D)=>typeof ArrayBuffer==="function"&&D instanceof ArrayBuffer||Object.prototype.toString.call(D)==="[object ArrayBuffer]","isArrayBuffer")});var dF=W((n7D,oM)=>{var{defineProperty:tE,getOwnPropertyDescriptor:_u,getOwnPropertyNames:su}=Object,uu=Object.prototype.hasOwnProperty,pM=(D,F)=>tE(D,"name",{value:F,configurable:!0}),du=(D,F)=>{for(var E in F)tE(D,E,{get:F[E],enumerable:!0})},vu=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of su(F))if(!uu.call(D,$)&&$!==E)tE(D,$,{get:()=>F[$],enumerable:!(w=_u(F,$))||w.enumerable})}return D},mu=(D)=>vu(tE({},"__esModule",{value:!0}),D),aM={};du(aM,{fromArrayBuffer:()=>lu,fromString:()=>iu});oM.exports=mu(aM);var nu=Sf(),Qf=import.meta.require("buffer"),lu=pM((D,F=0,E=D.byteLength-F)=>{if(!nu.isArrayBuffer(D))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof D} (${D})`);return Qf.Buffer.from(D,F,E)},"fromArrayBuffer"),iu=pM((D,F)=>{if(typeof D!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof D} (${D})`);return F?Qf.Buffer.from(D,F):Qf.Buffer.from(D)},"fromString")});var DG=W((tM)=>{Object.defineProperty(tM,"__esModule",{value:!0});tM.fromBase64=void 0;var pu=dF(),au=/^[A-Za-z0-9+/]*={0,2}$/,ou=(D)=>{if(D.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!au.exec(D))throw new TypeError("Invalid base64 string.");const F=pu.fromString(D,"base64");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength)};tM.fromBase64=ou});var f8=W((i7D,$G)=>{var{defineProperty:eE,getOwnPropertyDescriptor:tu,getOwnPropertyNames:eu}=Object,Dd=Object.prototype.hasOwnProperty,Hf=(D,F)=>eE(D,"name",{value:F,configurable:!0}),Fd=(D,F)=>{for(var E in F)eE(D,E,{get:F[E],enumerable:!0})},Ed=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of eu(F))if(!Dd.call(D,$)&&$!==E)eE(D,$,{get:()=>F[$],enumerable:!(w=tu(F,$))||w.enumerable})}return D},wd=(D)=>Ed(eE({},"__esModule",{value:!0}),D),FG={};Fd(FG,{fromUtf8:()=>wG,toUint8Array:()=>$d,toUtf8:()=>fd});$G.exports=wd(FG);var EG=dF(),wG=Hf((D)=>{const F=EG.fromString(D,"utf8");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),$d=Hf((D)=>{if(typeof D==="string")return wG(D);if(ArrayBuffer.isView(D))return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(D)},"toUint8Array"),fd=Hf((D)=>{if(typeof D==="string")return D;if(typeof D!=="object"||typeof D.byteOffset!=="number"||typeof D.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return EG.fromArrayBuffer(D.buffer,D.byteOffset,D.byteLength).toString("utf8")},"toUtf8")});var BG=W((fG)=>{Object.defineProperty(fG,"__esModule",{value:!0});fG.toBase64=void 0;var Cd=dF(),Bd=f8(),hd=(D)=>{let F;if(typeof D==="string")F=Bd.fromUtf8(D);else F=D;if(typeof F!=="object"||typeof F.byteOffset!=="number"||typeof F.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Cd.fromArrayBuffer(F.buffer,F.byteOffset,F.byteLength).toString("base64")};fG.toBase64=hd});var Fw=W((a7D,Dw)=>{var{defineProperty:hG,getOwnPropertyDescriptor:Ud,getOwnPropertyNames:Ad}=Object,Id=Object.prototype.hasOwnProperty,Lf=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Ad(F))if(!Id.call(D,$)&&$!==E)hG(D,$,{get:()=>F[$],enumerable:!(w=Ud(F,$))||w.enumerable})}return D},UG=(D,F,E)=>(Lf(D,F,"default"),E&&Lf(E,F,"default")),Md=(D)=>Lf(hG({},"__esModule",{value:!0}),D),Rf={};Dw.exports=Md(Rf);UG(Rf,DG(),Dw.exports);UG(Rf,BG(),Dw.exports)});var MG=W((AG)=>{Object.defineProperty(AG,"__esModule",{value:!0});AG.getAwsChunkedEncodingStream=void 0;var Gd=import.meta.require("stream"),Yd=(D,F)=>{const{base64Encoder:E,bodyLengthChecker:w,checksumAlgorithmFn:$,checksumLocationName:C,streamHasher:f}=F,B=E!==void 0&&$!==void 0&&C!==void 0&&f!==void 0,h=B?f($,D):void 0,U=new Gd.Readable({read:()=>{}});return D.on("data",(I)=>{const A=w(I)||0;U.push(`${A.toString(16)}\r\n`),U.push(I),U.push("\r\n")}),D.on("end",async()=>{if(U.push("0\r\n"),B){const I=E(await h);U.push(`${C}:${I}\r\n`),U.push("\r\n")}U.push(null)}),U};AG.getAwsChunkedEncodingStream=Yd});var Nf=W((t7D,ZG)=>{var{defineProperty:Ew,getOwnPropertyDescriptor:Zd,getOwnPropertyNames:Wd}=Object,Xd=Object.prototype.hasOwnProperty,Vf=(D,F)=>Ew(D,"name",{value:F,configurable:!0}),Jd=(D,F)=>{for(var E in F)Ew(D,E,{get:F[E],enumerable:!0})},zd=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Wd(F))if(!Xd.call(D,$)&&$!==E)Ew(D,$,{get:()=>F[$],enumerable:!(w=Zd(F,$))||w.enumerable})}return D},Td=(D)=>zd(Ew({},"__esModule",{value:!0}),D),GG={};Jd(GG,{escapeUri:()=>YG,escapeUriPath:()=>Sd});ZG.exports=Td(GG);var YG=Vf((D)=>encodeURIComponent(D).replace(/[!'()*]/g,Kd),"escapeUri"),Kd=Vf((D)=>`%${D.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Sd=Vf((D)=>D.split("/").map(YG).join("/"),"escapeUriPath")});var Of=W((e7D,JG)=>{function XG(D){const F=[];for(let E of Object.keys(D).sort()){const w=D[E];if(E=qf.escapeUri(E),Array.isArray(w))for(let $=0,C=w.length;$<C;$++)F.push(`${E}=${qf.escapeUri(w[$])}`);else{let $=E;if(w||typeof w==="string")$+=`=${qf.escapeUri(w)}`;F.push($)}}return F.join("&")}var{defineProperty:ww,getOwnPropertyDescriptor:Qd,getOwnPropertyNames:Hd}=Object,Ld=Object.prototype.hasOwnProperty,Rd=(D,F)=>ww(D,"name",{value:F,configurable:!0}),Vd=(D,F)=>{for(var E in F)ww(D,E,{get:F[E],enumerable:!0})},Nd=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Hd(F))if(!Ld.call(D,$)&&$!==E)ww(D,$,{get:()=>F[$],enumerable:!(w=Qd(F,$))||w.enumerable})}return D},qd=(D)=>Nd(ww({},"__esModule",{value:!0}),D),WG={};Vd(WG,{buildQueryString:()=>XG});JG.exports=qd(WG);var qf=Nf();Rd(XG,"buildQueryString")});var cG=W((DfD,xG)=>{async function yf(D,F,E=KG){const w=F.headers??{},$=w.Expect||w.expect;let C=-1,f=!1;if($==="100-continue")await Promise.race([new Promise((B)=>{C=Number(setTimeout(B,Math.max(KG,E)))}),new Promise((B)=>{D.on("continue",()=>{clearTimeout(C),B()}),D.on("error",()=>{f=!0,clearTimeout(C),B()})})]);if(!f)qG(D,F.body)}function qG(D,F){if(F instanceof NG.Readable){F.pipe(D);return}if(F){if(Buffer.isBuffer(F)||typeof F==="string"){D.end(F);return}const E=F;if(typeof E==="object"&&E.buffer&&typeof E.byteOffset==="number"&&typeof E.byteLength==="number"){D.end(Buffer.from(E.buffer,E.byteOffset,E.byteLength));return}D.end(Buffer.from(F));return}D.end()}async function bG(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}var{create:Od,defineProperty:vF,getOwnPropertyDescriptor:jd,getOwnPropertyNames:Pd,getPrototypeOf:yd}=Object,kd=Object.prototype.hasOwnProperty,ID=(D,F)=>vF(D,"name",{value:F,configurable:!0}),bd=(D,F)=>{for(var E in F)vF(D,E,{get:F[E],enumerable:!0})},QG=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Pd(F))if(!kd.call(D,$)&&$!==E)vF(D,$,{get:()=>F[$],enumerable:!(w=jd(F,$))||w.enumerable})}return D},xd=(D,F,E)=>(E=D!=null?Od(yd(D)):{},QG(F||!D||!D.__esModule?vF(E,"default",{value:D,enumerable:!0}):E,D)),cd=(D)=>QG(vF({},"__esModule",{value:!0}),D),HG={};bd(HG,{DEFAULT_REQUEST_TIMEOUT:()=>dd,NodeHttp2Handler:()=>id,NodeHttpHandler:()=>vd,streamCollector:()=>ad});xG.exports=cd(HG);var LG=H1(),RG=Of(),jf=import.meta.require("http"),Pf=import.meta.require("https"),gd=["ECONNRESET","EPIPE","ETIMEDOUT"],VG=ID((D)=>{const F={};for(let E of Object.keys(D)){const w=D[E];F[E]=Array.isArray(w)?w.join(","):w}return F},"getTransformedHeaders"),zG=1000,rd=ID((D,F,E=0)=>{if(!E)return-1;const w=ID(($)=>{const C=setTimeout(()=>{D.destroy(),F(Object.assign(new Error(`Socket timed out without establishing a connection within ${E} ms`),{name:"TimeoutError"}))},E-$),f=ID((B)=>{if(B==null?void 0:B.connecting)B.on("connect",()=>{clearTimeout(C)});else clearTimeout(C)},"doWithSocket");if(D.socket)f(D.socket);else D.on("socket",f)},"registerTimeout");if(E<2000)return w(0),0;return setTimeout(w.bind(null,zG),zG)},"setConnectionTimeout"),_d=3000,sd=ID((D,{keepAlive:F,keepAliveMsecs:E},w=_d)=>{if(F!==!0)return-1;const $=ID(()=>{if(D.socket)D.socket.setKeepAlive(F,E||0);else D.on("socket",(C)=>{C.setKeepAlive(F,E||0)})},"registerListener");if(w===0)return $(),0;return setTimeout($,w)},"setSocketKeepAlive"),TG=3000,ud=ID((D,F,E=0)=>{const w=ID(($)=>{D.setTimeout(E-$,()=>{D.destroy(),F(Object.assign(new Error(`Connection timed out after ${E} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<E&&E<6000)return w(0),0;return setTimeout(w.bind(null,E===0?0:TG),TG)},"setSocketTimeout"),NG=import.meta.require("stream"),KG=1000;ID(yf,"writeRequestBody");ID(qG,"writeBody");var dd=0,OG=class D{constructor(F){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((E,w)=>{if(typeof F==="function")F().then(($)=>{E(this.resolveDefaultConfig($))}).catch(w);else E(this.resolveDefaultConfig(F))})}static create(F){if(typeof(F==null?void 0:F.handle)==="function")return F;return new D(F)}static checkSocketUsage(F,E,w=console){var $,C,f;const{sockets:B,requests:h,maxSockets:U}=F;if(typeof U!=="number"||U===1/0)return E;const I=15000;if(Date.now()-I<E)return E;if(B&&h)for(let A in B){const Y=(($=B[A])==null?void 0:$.length)??0,M=((C=h[A])==null?void 0:C.length)??0;if(Y>=U&&M>=2*U)return(f=w==null?void 0:w.warn)==null||f.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${Y} and ${M} additional requests are enqueued.
3
3
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
4
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return E}resolveDefaultConfig(F){const{requestTimeout:E,connectionTimeout:w,socketTimeout:$,httpAgent:C,httpsAgent:f}=F||{};return{connectionTimeout:w,requestTimeout:E??$,httpAgent:(()=>{if(C instanceof qf.Agent||typeof(C==null?void 0:C.destroy)==="function")return C;return new qf.Agent({keepAlive:!0,maxSockets:50,...C})})(),httpsAgent:(()=>{if(f instanceof Of.Agent||typeof(f==null?void 0:f.destroy)==="function")return f;return new Of.Agent({keepAlive:!0,maxSockets:50,...f})})(),logger:console}}destroy(){var F,E,w,$;(E=(F=this.config)==null?void 0:F.httpAgent)==null||E.destroy(),($=(w=this.config)==null?void 0:w.httpsAgent)==null||$.destroy()}async handle(F,{abortSignal:E}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,$)=>{let C=void 0;const f=[],B=AD(async(L)=>{await C,f.forEach(clearTimeout),w(L)},"resolve"),h=AD(async(L)=>{await C,f.forEach(clearTimeout),$(L)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(E==null?void 0:E.aborted){const L=new Error("Request aborted");L.name="AbortError",h(L);return}const U=F.protocol==="https:",I=U?this.config.httpsAgent:this.config.httpAgent;f.push(setTimeout(()=>{this.socketWarningTimestamp=D.checkSocketUsage(I,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const A=LM.buildQueryString(F.query||{});let Y=void 0;if(F.username!=null||F.password!=null){const L=F.username??"",V=F.password??"";Y=`${L}:${V}`}let G=F.path;if(A)G+=`?${A}`;if(F.fragment)G+=`#${F.fragment}`;let Z=F.hostname??"";if(Z[0]==="["&&Z.endsWith("]"))Z=F.hostname.slice(1,-1);else Z=F.hostname;const z={headers:F.headers,host:Z,method:F.method,path:G,port:F.port,agent:I,auth:Y},J=(U?Of.request:qf.request)(z,(L)=>{const V=new HM.HttpResponse({statusCode:L.statusCode||-1,reason:L.statusMessage,headers:RM(L.headers),body:L});B({response:V})});if(J.on("error",(L)=>{if(Ev.includes(L.code))h(Object.assign(L,{name:"TimeoutError"}));else h(L)}),E){const L=AD(()=>{J.destroy();const V=new Error("Request aborted");V.name="AbortError",h(V)},"onAbort");if(typeof E.addEventListener==="function"){const V=E;V.addEventListener("abort",L,{once:!0}),J.once("close",()=>V.removeEventListener("abort",L))}else E.onabort=L}f.push(wv(J,h,this.config.connectionTimeout)),f.push(Cv(J,h,this.config.requestTimeout));const K=z.agent;if(typeof K==="object"&&"keepAlive"in K)f.push(fv(J,{keepAlive:K.keepAlive,keepAliveMsecs:K.keepAliveMsecs}));C=jf(J,F,this.config.requestTimeout).catch((L)=>{return f.forEach(clearTimeout),$(L)})})}updateHttpClientConfig(F,E){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[F]:E}})}httpHandlerConfigs(){return this.config??{}}};AD(qM,"NodeHttpHandler");var hv=qM,KM=import.meta.require("http2"),Uv=Dv(import.meta.require("http2")),OM=class D{constructor(F){this.sessions=[],this.sessions=F??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(F){this.sessions.push(F)}contains(F){return this.sessions.includes(F)}remove(F){this.sessions=this.sessions.filter((E)=>E!==F)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(F){for(let E of this.sessions)if(E===F){if(!E.destroyed)E.destroy()}}};AD(OM,"NodeHttp2ConnectionPool");var Av=OM,jM=class D{constructor(F){if(this.sessionCache=new Map,this.config=F,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(F,E){const w=this.getUrlString(F),$=this.sessionCache.get(w);if($){const h=$.poll();if(h&&!this.config.disableConcurrency)return h}const C=Uv.default.connect(w);if(this.config.maxConcurrency)C.settings({maxConcurrentStreams:this.config.maxConcurrency},(h)=>{if(h)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+F.destination.toString())});C.unref();const f=AD(()=>{C.destroy(),this.deleteSession(w,C)},"destroySessionCb");if(C.on("goaway",f),C.on("error",f),C.on("frameError",f),C.on("close",()=>this.deleteSession(w,C)),E.requestTimeout)C.setTimeout(E.requestTimeout,f);const B=this.sessionCache.get(w)||new Av;return B.offerLast(C),this.sessionCache.set(w,B),C}deleteSession(F,E){const w=this.sessionCache.get(F);if(!w)return;if(!w.contains(E))return;w.remove(E),this.sessionCache.set(F,w)}release(F,E){var w;const $=this.getUrlString(F);(w=this.sessionCache.get($))==null||w.offerLast(E)}destroy(){for(let[F,E]of this.sessionCache){for(let w of E){if(!w.destroyed)w.destroy();E.remove(w)}this.sessionCache.delete(F)}}setMaxConcurrentStreams(F){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=F}setDisableConcurrentStreams(F){this.config.disableConcurrency=F}getUrlString(F){return F.destination.toString()}};AD(jM,"NodeHttp2ConnectionManager");var Iv=jM,PM=class D{constructor(F){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Iv({}),this.configProvider=new Promise((E,w)=>{if(typeof F==="function")F().then(($)=>{E($||{})}).catch(w);else E(F||{})})}static create(F){if(typeof(F==null?void 0:F.handle)==="function")return F;return new D(F)}destroy(){this.connectionManager.destroy()}async handle(F,{abortSignal:E}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:$}=this.config;return new Promise((C,f)=>{var B;let h=!1,U=void 0;const I=AD(async(b)=>{await U,C(b)},"resolve"),A=AD(async(b)=>{await U,f(b)},"reject");if(E==null?void 0:E.aborted){h=!0;const b=new Error("Request aborted");b.name="AbortError",A(b);return}const{hostname:Y,method:G,port:Z,protocol:z,query:W}=F;let J="";if(F.username!=null||F.password!=null){const b=F.username??"",hD=F.password??"";J=`${b}:${hD}@`}const K=`${z}//${J}${Y}${Z?`:${Z}`:""}`,L={destination:new URL(K)},V=this.connectionManager.lease(L,{requestTimeout:(B=this.config)==null?void 0:B.sessionTimeout,disableConcurrentStreams:$||!1}),m=AD((b)=>{if($)this.destroySession(V);h=!0,A(b)},"rejectWithDestroy"),DD=LM.buildQueryString(W||{});let wD=F.path;if(DD)wD+=`?${DD}`;if(F.fragment)wD+=`#${F.fragment}`;const t=V.request({...F.headers,[KM.constants.HTTP2_HEADER_PATH]:wD,[KM.constants.HTTP2_HEADER_METHOD]:G});if(V.ref(),t.on("response",(b)=>{const hD=new HM.HttpResponse({statusCode:b[":status"]||-1,headers:RM(b),body:t});if(h=!0,I({response:hD}),$)V.close(),this.connectionManager.deleteSession(K,V)}),w)t.setTimeout(w,()=>{t.close();const b=new Error(`Stream timed out because of no activity for ${w} ms`);b.name="TimeoutError",m(b)});if(E){const b=AD(()=>{t.close();const hD=new Error("Request aborted");hD.name="AbortError",m(hD)},"onAbort");if(typeof E.addEventListener==="function"){const hD=E;hD.addEventListener("abort",b,{once:!0}),t.once("close",()=>hD.removeEventListener("abort",b))}else E.onabort=b}t.on("frameError",(b,hD,tD)=>{m(new Error(`Frame type id ${b} in stream id ${tD} has failed with code ${hD}.`))}),t.on("error",m),t.on("aborted",()=>{m(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${t.rstCode}.`))}),t.on("close",()=>{if(V.unref(),$)V.destroy();if(!h)m(new Error("Unexpected error: http2 request did not get a response"))}),U=jf(t,F,w)})}updateHttpClientConfig(F,E){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[F]:E}})}httpHandlerConfigs(){return this.config??{}}destroySession(F){if(!F.destroyed)F.destroy()}};AD(PM,"NodeHttp2Handler");var Gv=PM,yM=class D extends VM.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(F,E,w){this.bufferedBytes.push(F),w()}};AD(yM,"Collector");var Mv=yM,Yv=AD((D)=>{if(Zv(D))return kM(D);return new Promise((F,E)=>{const w=new Mv;D.pipe(w),D.on("error",($)=>{w.end(),E($)}),w.on("error",E),w.on("finish",function(){const $=new Uint8Array(Buffer.concat(this.bufferedBytes));F($)})})},"streamCollector"),Zv=AD((D)=>typeof ReadableStream==="function"&&D instanceof ReadableStream,"isReadableStreamInstance");AD(kM,"collectReadableStream")});var mM=X((JfD,vM)=>{function rM(D=0){return new Promise((F,E)=>{if(D)setTimeout(()=>{const w=new Error(`Request did not complete within ${D} ms`);w.name="TimeoutError",E(w)},D)})}async function sM(D){const F=await dM(D),E=Hv.fromBase64(F);return new Uint8Array(E)}async function uM(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}function dM(D){return new Promise((F,E)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return E(new Error("Reader aborted too early"));const $=w.result??"",C=$.indexOf(","),f=C>-1?C+1:$.length;F($.substring(f))},w.onabort=()=>E(new Error("Read aborted")),w.onerror=()=>E(w.error),w.readAsDataURL(D)})}var{defineProperty:Ew,getOwnPropertyDescriptor:Xv,getOwnPropertyNames:Wv}=Object,Jv=Object.prototype.hasOwnProperty,R1=(D,F)=>Ew(D,"name",{value:F,configurable:!0}),zv=(D,F)=>{for(var E in F)Ew(D,E,{get:F[E],enumerable:!0})},Tv=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Wv(F))if(!Jv.call(D,$)&&$!==E)Ew(D,$,{get:()=>F[$],enumerable:!(w=Xv(F,$))||w.enumerable})}return D},Kv=(D)=>Tv(Ew({},"__esModule",{value:!0}),D),gM={};zv(gM,{FetchHttpHandler:()=>Qv,keepAliveSupport:()=>Fw,streamCollector:()=>Lv});vM.exports=Kv(gM);var cM=H1(),Sv=Nf();R1(rM,"requestTimeout");var Fw={supported:void 0},_M=class D{static create(F){if(typeof(F==null?void 0:F.handle)==="function")return F;return new D(F)}constructor(F){if(typeof F==="function")this.configProvider=F().then((E)=>E||{});else this.config=F??{},this.configProvider=Promise.resolve(this.config);if(Fw.supported===void 0)Fw.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(F,{abortSignal:E}={}){var w;if(!this.config)this.config=await this.configProvider;const $=this.config.requestTimeout,C=this.config.keepAlive===!0,f=this.config.credentials;if(E==null?void 0:E.aborted){const K=new Error("Request aborted");return K.name="AbortError",Promise.reject(K)}let B=F.path;const h=Sv.buildQueryString(F.query||{});if(h)B+=`?${h}`;if(F.fragment)B+=`#${F.fragment}`;let U="";if(F.username!=null||F.password!=null){const K=F.username??"",L=F.password??"";U=`${K}:${L}@`}const{port:I,method:A}=F,Y=`${F.protocol}//${U}${F.hostname}${I?`:${I}`:""}${B}`,G=A==="GET"||A==="HEAD"?void 0:F.body,Z={body:G,headers:new Headers(F.headers),method:A,credentials:f};if((w=this.config)==null?void 0:w.cache)Z.cache=this.config.cache;if(G)Z.duplex="half";if(typeof AbortController!=="undefined")Z.signal=E;if(Fw.supported)Z.keepalive=C;if(typeof this.config.requestInit==="function")Object.assign(Z,this.config.requestInit(F));let z=R1(()=>{},"removeSignalEventListener");const W=new Request(Y,Z),J=[fetch(W).then((K)=>{const L=K.headers,V={};for(let DD of L.entries())V[DD[0]]=DD[1];if(K.body==null)return K.blob().then((DD)=>({response:new cM.HttpResponse({headers:V,reason:K.statusText,statusCode:K.status,body:DD})}));return{response:new cM.HttpResponse({headers:V,reason:K.statusText,statusCode:K.status,body:K.body})}}),rM($)];if(E)J.push(new Promise((K,L)=>{const V=R1(()=>{const m=new Error("Request aborted");m.name="AbortError",L(m)},"onAbort");if(typeof E.addEventListener==="function"){const m=E;m.addEventListener("abort",V,{once:!0}),z=R1(()=>m.removeEventListener("abort",V),"removeSignalEventListener")}else E.onabort=V}));return Promise.race(J).finally(z)}updateHttpClientConfig(F,E){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[F]=E,w})}httpHandlerConfigs(){return this.config??{}}};R1(_M,"FetchHttpHandler");var Qv=_M,Hv=tE(),Lv=R1((D)=>{if(typeof Blob==="function"&&D instanceof Blob)return sM(D);return uM(D)},"streamCollector");R1(sM,"collectBlob");R1(uM,"collectStream");R1(dM,"readToBase64")});var yf=X((zfD,oM)=>{function pM(D){if(D.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const F=new Uint8Array(D.length/2);for(let E=0;E<D.length;E+=2){const w=D.slice(E,E+2).toLowerCase();if(w in Pf)F[E/2]=Pf[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return F}function aM(D){let F="";for(let E=0;E<D.byteLength;E++)F+=iM[D[E]];return F}var{defineProperty:ww,getOwnPropertyDescriptor:Rv,getOwnPropertyNames:Vv}=Object,Nv=Object.prototype.hasOwnProperty,nM=(D,F)=>ww(D,"name",{value:F,configurable:!0}),qv=(D,F)=>{for(var E in F)ww(D,E,{get:F[E],enumerable:!0})},Ov=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Vv(F))if(!Nv.call(D,$)&&$!==E)ww(D,$,{get:()=>F[$],enumerable:!(w=Rv(F,$))||w.enumerable})}return D},jv=(D)=>Ov(ww({},"__esModule",{value:!0}),D),lM={};qv(lM,{fromHex:()=>pM,toHex:()=>aM});oM.exports=jv(lM);var iM={},Pf={};for(let D=0;D<256;D++){let F=D.toString(16).toLowerCase();if(F.length===1)F=`0${F}`;iM[D]=F,Pf[F]=D}nM(pM,"fromHex");nM(aM,"toHex")});var dF=X((tM)=>{Object.defineProperty(tM,"__esModule",{value:!0});tM.isReadableStream=void 0;var Pv=(D)=>{var F;return typeof ReadableStream==="function"&&(((F=D===null||D===void 0?void 0:D.constructor)===null||F===void 0?void 0:F.name)===ReadableStream.name||D instanceof ReadableStream)};tM.isReadableStream=Pv});var fY=X((wY)=>{Object.defineProperty(wY,"__esModule",{value:!0});wY.sdkStreamMixin=void 0;var yv=mM(),kv=tE(),bv=yf(),xv=f8(),DY=dF(),FY="The stream has already been transformed.",cv=(D)=>{var F,E;if(!EY(D)&&!DY.isReadableStream(D)){const f=((E=(F=D===null||D===void 0?void 0:D.__proto__)===null||F===void 0?void 0:F.constructor)===null||E===void 0?void 0:E.name)||D;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${f}`)}let w=!1;const $=async()=>{if(w)throw new Error(FY);return w=!0,await yv.streamCollector(D)},C=(f)=>{if(typeof f.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return f.stream()};return Object.assign(D,{transformToByteArray:$,transformToString:async(f)=>{const B=await $();if(f==="base64")return kv.toBase64(B);else if(f==="hex")return bv.toHex(B);else if(f===void 0||f==="utf8"||f==="utf-8")return xv.toUtf8(B);else if(typeof TextDecoder==="function")return new TextDecoder(f).decode(B);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(FY);if(w=!0,EY(D))return C(D);else if(DY.isReadableStream(D))return D;else throw new Error(`Cannot transform payload to web stream, got ${D}`)}})};wY.sdkStreamMixin=cv;var EY=(D)=>typeof Blob==="function"&&D instanceof Blob});var UY=X((BY)=>{Object.defineProperty(BY,"__esModule",{value:!0});BY.sdkStreamMixin=void 0;var gv=xM(),rv=sF(),kf=import.meta.require("stream"),_v=import.meta.require("util"),sv=fY(),CY="The stream has already been transformed.",uv=(D)=>{var F,E;if(!(D instanceof kf.Readable))try{return sv.sdkStreamMixin(D)}catch(C){const f=((E=(F=D===null||D===void 0?void 0:D.__proto__)===null||F===void 0?void 0:F.constructor)===null||E===void 0?void 0:E.name)||D;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${f}`)}let w=!1;const $=async()=>{if(w)throw new Error(CY);return w=!0,await gv.streamCollector(D)};return Object.assign(D,{transformToByteArray:$,transformToString:async(C)=>{const f=await $();if(C===void 0||Buffer.isEncoding(C))return rv.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString(C);else return new _v.TextDecoder(C).decode(f)},transformToWebStream:()=>{if(w)throw new Error(CY);if(D.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof kf.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,kf.Readable.toWeb(D)}})};BY.sdkStreamMixin=uv});var GY=X((AY)=>{async function dv(D){if(typeof D.stream==="function")D=D.stream();return D.tee()}Object.defineProperty(AY,"__esModule",{value:!0});AY.splitStream=void 0;AY.splitStream=dv});var XY=X((YY)=>{async function nv(D){if(mv.isReadableStream(D))return vv.splitStream(D);const F=new MY.PassThrough,E=new MY.PassThrough;return D.pipe(F),D.pipe(E),[F,E]}Object.defineProperty(YY,"__esModule",{value:!0});YY.splitStream=void 0;var MY=import.meta.require("stream"),vv=GY(),mv=dF();YY.splitStream=nv});var zY=X((WY)=>{async function lv(D,F){var E;let w=0;const $=[],C=D.getReader();let f=!1;while(!f){const{done:U,value:I}=await C.read();if(I)$.push(I),w+=(E=I===null||I===void 0?void 0:I.byteLength)!==null&&E!==void 0?E:0;if(w>=F)break;f=U}C.releaseLock();const B=new Uint8Array(Math.min(F,w));let h=0;for(let U of $){if(U.byteLength>B.byteLength-h){B.set(U.subarray(0,B.byteLength-h),h);break}else B.set(U,h);h+=U.length}return B}Object.defineProperty(WY,"__esModule",{value:!0});WY.headStream=void 0;WY.headStream=lv});var QY=X((KY)=>{Object.defineProperty(KY,"__esModule",{value:!0});KY.headStream=void 0;var iv=import.meta.require("stream"),pv=zY(),av=dF(),ov=(D,F)=>{if(av.isReadableStream(D))return pv.headStream(D,F);return new Promise((E,w)=>{const $=new TY;$.limit=F,D.pipe($),D.on("error",(C)=>{$.end(),w(C)}),$.on("error",w),$.on("finish",function(){const C=new Uint8Array(Buffer.concat(this.buffers));E(C)})})};KY.headStream=ov;class TY extends iv.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(D,F,E){var w;if(this.buffers.push(D),this.bytesBuffered+=(w=D.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const $=this.bytesBuffered-this.limit,C=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=C.subarray(0,C.byteLength-$),this.emit("finish")}E()}}});var qY=X((VfD,l8)=>{function RY(D,F="utf-8"){if(F==="base64")return HY.toBase64(D);return LY.toUtf8(D)}function VY(D,F){if(F==="base64")return xf.mutate(HY.fromBase64(D));return xf.mutate(LY.fromUtf8(D))}var{defineProperty:$w,getOwnPropertyDescriptor:tv,getOwnPropertyNames:ev}=Object,Dm=Object.prototype.hasOwnProperty,cf=(D,F)=>$w(D,"name",{value:F,configurable:!0}),Fm=(D,F)=>{for(var E in F)$w(D,E,{get:F[E],enumerable:!0})},bf=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of ev(F))if(!Dm.call(D,$)&&$!==E)$w(D,$,{get:()=>F[$],enumerable:!(w=tv(F,$))||w.enumerable})}return D},vF=(D,F,E)=>(bf(D,F,"default"),E&&bf(E,F,"default")),Em=(D)=>bf($w({},"__esModule",{value:!0}),D),n8={};Fm(n8,{Uint8ArrayBlobAdapter:()=>xf});l8.exports=Em(n8);var HY=tE(),LY=f8();cf(RY,"transformToString");cf(VY,"transformFromString");var NY=class D extends Uint8Array{static fromString(F,E="utf-8"){switch(typeof F){case"string":return VY(F,E);default:throw new Error(`Unsupported conversion from ${typeof F} to Uint8ArrayBlobAdapter.`)}}static mutate(F){return Object.setPrototypeOf(F,D.prototype),F}transformToString(F="utf-8"){return RY(this,F)}};cf(NY,"Uint8ArrayBlobAdapter");var xf=NY;vF(n8,IM(),l8.exports);vF(n8,UY(),l8.exports);vF(n8,XY(),l8.exports);vF(n8,QY(),l8.exports);vF(n8,dF(),l8.exports)});var N6=X((NfD,eY)=>{function uY(D){const F=D.getUTCFullYear(),E=D.getUTCMonth(),w=D.getUTCDay(),$=D.getUTCDate(),C=D.getUTCHours(),f=D.getUTCMinutes(),B=D.getUTCSeconds(),h=$<10?`0${$}`:`${$}`,U=C<10?`0${C}`:`${C}`,I=f<10?`0${f}`:`${f}`,A=B<10?`0${B}`:`${B}`;return`${qm[w]}, ${h} ${pf[E]} ${F} ${U}:${I}:${A} GMT`}function Bw(D){return encodeURIComponent(D).replace(/[!'()*]/g,function(F){return"%"+F.charCodeAt(0).toString(16).toUpperCase()})}function af(D,F,E){let w,$,C;if(typeof F==="undefined"&&typeof E==="undefined")w={},C=D;else if(w=D,typeof F==="function")return $=F,C=E,An(w,$,C);else C=F;for(let f of Object.keys(C)){if(!Array.isArray(C[f])){w[f]=C[f];continue}aY(w,null,C,f)}return w}function oY(D){if(D.includes(",")||D.includes('"'))D=`"${D.replace(/"/g,'\\"')}"`;return D}function tY(D,F,E){if(E<=0||!Number.isInteger(E))throw new Error("Invalid number of delimiters ("+E+") for splitEvery.");const w=D.split(F);if(E===1)return w;const $=[];let C="";for(let f=0;f<w.length;f++){if(C==="")C=w[f];else C+=F+w[f];if((f+1)%E===0)$.push(C),C=""}if(C!=="")$.push(C);return $}var{defineProperty:hw,getOwnPropertyDescriptor:wm,getOwnPropertyNames:$m}=Object,fm=Object.prototype.hasOwnProperty,R=(D,F)=>hw(D,"name",{value:F,configurable:!0}),Cm=(D,F)=>{for(var E in F)hw(D,E,{get:F[E],enumerable:!0})},Bm=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of $m(F))if(!fm.call(D,$)&&$!==E)hw(D,$,{get:()=>F[$],enumerable:!(w=wm(F,$))||w.enumerable})}return D},hm=(D)=>Bm(hw({},"__esModule",{value:!0}),D),jY={};Cm(jY,{Client:()=>Um,Command:()=>bY,LazyJsonString:()=>Cn,NoOpLogger:()=>Bn,SENSITIVE_STRING:()=>Gm,ServiceException:()=>lm,StringWrapper:()=>pF,_json:()=>vf,collectBody:()=>Am,convertMap:()=>hn,createAggregatedClient:()=>Mm,dateToUtcString:()=>uY,decorateServiceException:()=>vY,emitWarningIfUnsupportedVersion:()=>om,expectBoolean:()=>Zm,expectByte:()=>df,expectFloat32:()=>fw,expectInt:()=>Wm,expectInt32:()=>sf,expectLong:()=>lF,expectNonNull:()=>zm,expectNumber:()=>nF,expectObject:()=>cY,expectShort:()=>uf,expectString:()=>Tm,expectUnion:()=>Km,extendedEncodeURIComponent:()=>Bw,getArrayIfSingleItem:()=>$n,getDefaultClientConfiguration:()=>En,getDefaultExtensionConfiguration:()=>nY,getValueFromTextNode:()=>lY,handleFloat:()=>Hm,isSerializableHeaderValue:()=>fn,limitedParseDouble:()=>lf,limitedParseFloat:()=>Lm,limitedParseFloat32:()=>Rm,loadConfigsForDefaultMode:()=>am,logger:()=>iF,map:()=>af,parseBoolean:()=>Ym,parseEpochTimestamp:()=>gm,parseRfc3339DateTime:()=>jm,parseRfc3339DateTimeWithOffset:()=>ym,parseRfc7231DateTime:()=>cm,quoteHeader:()=>oY,resolveDefaultRuntimeConfig:()=>wn,resolvedPath:()=>Mn,serializeDateTime:()=>Zn,serializeFloat:()=>Yn,splitEvery:()=>tY,splitHeader:()=>Xn,strictParseByte:()=>sY,strictParseDouble:()=>nf,strictParseFloat:()=>Sm,strictParseFloat32:()=>gY,strictParseInt:()=>Vm,strictParseInt32:()=>Nm,strictParseLong:()=>_Y,strictParseShort:()=>L6,take:()=>Un,throwDefaultError:()=>mY,withBaseException:()=>im});eY.exports=hm(jY);var PY=mG(),yY=class D{constructor(F){this.config=F,this.middlewareStack=PY.constructStack()}send(F,E,w){const $=typeof E!=="function"?E:void 0,C=typeof E==="function"?E:w,f=$===void 0&&this.config.cacheMiddleware===!0;let B;if(f){if(!this.handlers)this.handlers=new WeakMap;const h=this.handlers;if(h.has(F.constructor))B=h.get(F.constructor);else B=F.resolveMiddleware(this.middlewareStack,this.config,$),h.set(F.constructor,B)}else delete this.handlers,B=F.resolveMiddleware(this.middlewareStack,this.config,$);if(C)B(F).then((h)=>C(null,h.output),(h)=>C(h)).catch(()=>{});else return B(F).then((h)=>h.output)}destroy(){var F,E,w;(w=(E=(F=this.config)==null?void 0:F.requestHandler)==null?void 0:E.destroy)==null||w.call(E),delete this.handlers}};R(yY,"Client");var Um=yY,gf=qY(),Am=R(async(D=new Uint8Array,F)=>{if(D instanceof Uint8Array)return gf.Uint8ArrayBlobAdapter.mutate(D);if(!D)return gf.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const E=F.streamCollector(D);return gf.Uint8ArrayBlobAdapter.mutate(await E)},"collectBody"),_f=W0(),kY=class D{constructor(){this.middlewareStack=PY.constructStack()}static classBuilder(){return new Im}resolveMiddlewareWithContext(F,E,w,{middlewareFn:$,clientName:C,commandName:f,inputFilterSensitiveLog:B,outputFilterSensitiveLog:h,smithyContext:U,additionalContext:I,CommandCtor:A}){for(let W of $.bind(this)(A,F,E,w))this.middlewareStack.use(W);const Y=F.concat(this.middlewareStack),{logger:G}=E,Z={logger:G,clientName:C,commandName:f,inputFilterSensitiveLog:B,outputFilterSensitiveLog:h,[_f.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...I},{requestHandler:z}=E;return Y.resolve((W)=>z.handle(W.request,w||{}),Z)}};R(kY,"Command");var bY=kY,xY=class D{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(F)=>F,this._outputFilterSensitiveLog=(F)=>F,this._serializer=null,this._deserializer=null}init(F){this._init=F}ep(F){return this._ep=F,this}m(F){return this._middlewareFn=F,this}s(F,E,w={}){return this._smithyContext={service:F,operation:E,...w},this}c(F={}){return this._additionalContext=F,this}n(F,E){return this._clientName=F,this._commandName=E,this}f(F=(w)=>w,E=(w)=>w){return this._inputFilterSensitiveLog=F,this._outputFilterSensitiveLog=E,this}ser(F){return this._serializer=F,this}de(F){return this._deserializer=F,this}build(){var F;const E=this;let w;return w=(F=class extends bY{constructor(...[$]){super();this.serialize=E._serializer,this.deserialize=E._deserializer,this.input=$??{},E._init(this)}static getEndpointParameterInstructions(){return E._ep}resolveMiddleware($,C,f){return this.resolveMiddlewareWithContext($,C,f,{CommandCtor:w,middlewareFn:E._middlewareFn,clientName:E._clientName,commandName:E._commandName,inputFilterSensitiveLog:E._inputFilterSensitiveLog,outputFilterSensitiveLog:E._outputFilterSensitiveLog,smithyContext:E._smithyContext,additionalContext:E._additionalContext})}},R(F,"CommandRef"),F)}};R(xY,"ClassBuilder");var Im=xY,Gm="***SensitiveInformation***",Mm=R((D,F)=>{for(let E of Object.keys(D)){const w=D[E],$=R(async function(f,B,h){const U=new w(f);if(typeof B==="function")this.send(U,B);else if(typeof h==="function"){if(typeof B!=="object")throw new Error(`Expected http options but got ${typeof B}`);this.send(U,B||{},h)}else return this.send(U,B)},"methodImpl"),C=(E[0].toLowerCase()+E.slice(1)).replace(/Command$/,"");F.prototype[C]=$}},"createAggregatedClient"),Ym=R((D)=>{switch(D){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${D}"`)}},"parseBoolean"),Zm=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="number"){if(D===0||D===1)iF.warn(Cw(`Expected boolean, got ${typeof D}: ${D}`));if(D===0)return!1;if(D===1)return!0}if(typeof D==="string"){const F=D.toLowerCase();if(F==="false"||F==="true")iF.warn(Cw(`Expected boolean, got ${typeof D}: ${D}`));if(F==="false")return!1;if(F==="true")return!0}if(typeof D==="boolean")return D;throw new TypeError(`Expected boolean, got ${typeof D}: ${D}`)},"expectBoolean"),nF=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="string"){const F=parseFloat(D);if(!Number.isNaN(F)){if(String(F)!==String(D))iF.warn(Cw(`Expected number but observed string: ${D}`));return F}}if(typeof D==="number")return D;throw new TypeError(`Expected number, got ${typeof D}: ${D}`)},"expectNumber"),Xm=Math.ceil(340282346638528860000000000000000000000),fw=R((D)=>{const F=nF(D);if(F!==void 0&&!Number.isNaN(F)&&F!==1/0&&F!==-1/0){if(Math.abs(F)>Xm)throw new TypeError(`Expected 32-bit float, got ${D}`)}return F},"expectFloat32"),lF=R((D)=>{if(D===null||D===void 0)return;if(Number.isInteger(D)&&!Number.isNaN(D))return D;throw new TypeError(`Expected integer, got ${typeof D}: ${D}`)},"expectLong"),Wm=lF,sf=R((D)=>mf(D,32),"expectInt32"),uf=R((D)=>mf(D,16),"expectShort"),df=R((D)=>mf(D,8),"expectByte"),mf=R((D,F)=>{const E=lF(D);if(E!==void 0&&Jm(E,F)!==E)throw new TypeError(`Expected ${F}-bit integer, got ${D}`);return E},"expectSizedInt"),Jm=R((D,F)=>{switch(F){case 32:return Int32Array.of(D)[0];case 16:return Int16Array.of(D)[0];case 8:return Int8Array.of(D)[0]}},"castInt"),zm=R((D,F)=>{if(D===null||D===void 0){if(F)throw new TypeError(`Expected a non-null value for ${F}`);throw new TypeError("Expected a non-null value")}return D},"expectNonNull"),cY=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="object"&&!Array.isArray(D))return D;const F=Array.isArray(D)?"array":typeof D;throw new TypeError(`Expected object, got ${F}: ${D}`)},"expectObject"),Tm=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="string")return D;if(["boolean","number","bigint"].includes(typeof D))return iF.warn(Cw(`Expected string, got ${typeof D}: ${D}`)),String(D);throw new TypeError(`Expected string, got ${typeof D}: ${D}`)},"expectString"),Km=R((D)=>{if(D===null||D===void 0)return;const F=cY(D),E=Object.entries(F).filter(([,w])=>w!=null).map(([w])=>w);if(E.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(E.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${E} were not null.`);return F},"expectUnion"),nf=R((D)=>{if(typeof D=="string")return nF(V6(D));return nF(D)},"strictParseDouble"),Sm=nf,gY=R((D)=>{if(typeof D=="string")return fw(V6(D));return fw(D)},"strictParseFloat32"),Qm=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,V6=R((D)=>{const F=D.match(Qm);if(F===null||F[0].length!==D.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(D)},"parseNumber"),lf=R((D)=>{if(typeof D=="string")return rY(D);return nF(D)},"limitedParseDouble"),Hm=lf,Lm=lf,Rm=R((D)=>{if(typeof D=="string")return rY(D);return fw(D)},"limitedParseFloat32"),rY=R((D)=>{switch(D){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${D}`)}},"parseFloatString"),_Y=R((D)=>{if(typeof D==="string")return lF(V6(D));return lF(D)},"strictParseLong"),Vm=_Y,Nm=R((D)=>{if(typeof D==="string")return sf(V6(D));return sf(D)},"strictParseInt32"),L6=R((D)=>{if(typeof D==="string")return uf(V6(D));return uf(D)},"strictParseShort"),sY=R((D)=>{if(typeof D==="string")return df(V6(D));return df(D)},"strictParseByte"),Cw=R((D)=>{return String(new TypeError(D).stack||D).split("\n").slice(0,5).filter((F)=>!F.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),iF={warn:console.warn},qm=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],pf=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];R(uY,"dateToUtcString");var Om=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),jm=R((D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=Om.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U]=F,I=L6(R6(w)),A=x2($,"month",1,12),Y=x2(C,"day",1,31);return mF(I,A,Y,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U})},"parseRfc3339DateTime"),Pm=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ym=R((D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=Pm.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U,I]=F,A=L6(R6(w)),Y=x2($,"month",1,12),G=x2(C,"day",1,31),Z=mF(A,Y,G,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U});if(I.toUpperCase()!="Z")Z.setTime(Z.getTime()-nm(I));return Z},"parseRfc3339DateTimeWithOffset"),km=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),bm=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),xm=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),cm=R((D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let F=km.exec(D);if(F){const[E,w,$,C,f,B,h,U]=F;return mF(L6(R6(C)),rf($),x2(w,"day",1,31),{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U})}if(F=bm.exec(D),F){const[E,w,$,C,f,B,h,U]=F;return sm(mF(rm(C),rf($),x2(w,"day",1,31),{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U}))}if(F=xm.exec(D),F){const[E,w,$,C,f,B,h,U]=F;return mF(L6(R6(U)),rf(w),x2($.trimLeft(),"day",1,31),{hours:C,minutes:f,seconds:B,fractionalMilliseconds:h})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),gm=R((D)=>{if(D===null||D===void 0)return;let F;if(typeof D==="number")F=D;else if(typeof D==="string")F=nf(D);else if(typeof D==="object"&&D.tag===1)F=D.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(F)||F===1/0||F===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(F*1000))},"parseEpochTimestamp"),mF=R((D,F,E,w)=>{const $=F-1;return dm(D,$,E),new Date(Date.UTC(D,$,E,x2(w.hours,"hour",0,23),x2(w.minutes,"minute",0,59),x2(w.seconds,"seconds",0,60),mm(w.fractionalMilliseconds)))},"buildDate"),rm=R((D)=>{const F=new Date().getUTCFullYear(),E=Math.floor(F/100)*100+L6(R6(D));if(E<F)return E+100;return E},"parseTwoDigitYear"),_m=1576800000000,sm=R((D)=>{if(D.getTime()-new Date().getTime()>_m)return new Date(Date.UTC(D.getUTCFullYear()-100,D.getUTCMonth(),D.getUTCDate(),D.getUTCHours(),D.getUTCMinutes(),D.getUTCSeconds(),D.getUTCMilliseconds()));return D},"adjustRfc850Year"),rf=R((D)=>{const F=pf.indexOf(D);if(F<0)throw new TypeError(`Invalid month: ${D}`);return F+1},"parseMonthByShortName"),um=[31,28,31,30,31,30,31,31,30,31,30,31],dm=R((D,F,E)=>{let w=um[F];if(F===1&&vm(D))w=29;if(E>w)throw new TypeError(`Invalid day for ${pf[F]} in ${D}: ${E}`)},"validateDayOfMonth"),vm=R((D)=>{return D%4===0&&(D%100!==0||D%400===0)},"isLeapYear"),x2=R((D,F,E,w)=>{const $=sY(R6(D));if($<E||$>w)throw new TypeError(`${F} must be between ${E} and ${w}, inclusive`);return $},"parseDateValue"),mm=R((D)=>{if(D===null||D===void 0)return 0;return gY("0."+D)*1000},"parseMilliseconds"),nm=R((D)=>{const F=D[0];let E=1;if(F=="+")E=1;else if(F=="-")E=-1;else throw new TypeError(`Offset direction, ${F}, must be "+" or "-"`);const w=Number(D.substring(1,3)),$=Number(D.substring(4,6));return E*(w*60+$)*60*1000},"parseOffsetToMilliseconds"),R6=R((D)=>{let F=0;while(F<D.length-1&&D.charAt(F)==="0")F++;if(F===0)return D;return D.slice(F)},"stripLeadingZeroes"),dY=class D extends Error{constructor(F){super(F.message);Object.setPrototypeOf(this,D.prototype),this.name=F.name,this.$fault=F.$fault,this.$metadata=F.$metadata}};R(dY,"ServiceException");var lm=dY,vY=R((D,F={})=>{Object.entries(F).filter(([,w])=>w!==void 0).forEach(([w,$])=>{if(D[w]==null||D[w]==="")D[w]=$});const E=D.message||D.Message||"UnknownError";return D.message=E,delete D.Message,D},"decorateServiceException"),mY=R(({output:D,parsedBody:F,exceptionCtor:E,errorCode:w})=>{const $=pm(D),C=$.httpStatusCode?$.httpStatusCode+"":void 0,f=new E({name:(F==null?void 0:F.code)||(F==null?void 0:F.Code)||w||C||"UnknownError",$fault:"client",$metadata:$});throw vY(f,F)},"throwDefaultError"),im=R((D)=>{return({output:F,parsedBody:E,errorCode:w})=>{mY({output:F,parsedBody:E,exceptionCtor:D,errorCode:w})}},"withBaseException"),pm=R((D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),"deserializeMetadata"),am=R((D)=>{switch(D){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),OY=!1,om=R((D)=>{if(D&&!OY&&parseInt(D.substring(1,D.indexOf(".")))<16)OY=!0},"emitWarningIfUnsupportedVersion");R(Bw,"extendedEncodeURIComponent");var tm=R((D)=>{const F=[];for(let E in _f.AlgorithmId){const w=_f.AlgorithmId[E];if(D[w]===void 0)continue;F.push({algorithmId:()=>w,checksumConstructor:()=>D[w]})}return{_checksumAlgorithms:F,addChecksumAlgorithm(E){this._checksumAlgorithms.push(E)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),em=R((D)=>{const F={};return D.checksumAlgorithms().forEach((E)=>{F[E.algorithmId()]=E.checksumConstructor()}),F},"resolveChecksumRuntimeConfig"),Dn=R((D)=>{let F=D.retryStrategy;return{setRetryStrategy(E){F=E},retryStrategy(){return F}}},"getRetryConfiguration"),Fn=R((D)=>{const F={};return F.retryStrategy=D.retryStrategy(),F},"resolveRetryRuntimeConfig"),nY=R((D)=>{return{...tm(D),...Dn(D)}},"getDefaultExtensionConfiguration"),En=nY,wn=R((D)=>{return{...em(D),...Fn(D)}},"resolveDefaultRuntimeConfig"),$n=R((D)=>Array.isArray(D)?D:[D],"getArrayIfSingleItem"),lY=R((D)=>{for(let E in D)if(D.hasOwnProperty(E)&&D[E]["#text"]!==void 0)D[E]=D[E]["#text"];else if(typeof D[E]==="object"&&D[E]!==null)D[E]=lY(D[E]);return D},"getValueFromTextNode"),fn=R((D)=>{return D!=null},"isSerializableHeaderValue"),pF=R(function(){const D=Object.getPrototypeOf(this).constructor,E=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(E,D.prototype),E},"StringWrapper");pF.prototype=Object.create(String.prototype,{constructor:{value:pF,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(pF,String);var iY=class D extends pF{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(F){if(F instanceof D)return F;else if(F instanceof String||typeof F==="string")return new D(F);return new D(JSON.stringify(F))}};R(iY,"LazyJsonString");var Cn=iY,pY=class D{trace(){}debug(){}info(){}warn(){}error(){}};R(pY,"NoOpLogger");var Bn=pY;R(af,"map");var hn=R((D)=>{const F={};for(let[E,w]of Object.entries(D||{}))F[E]=[,w];return F},"convertMap"),Un=R((D,F)=>{const E={};for(let w in F)aY(E,D,F,w);return E},"take"),An=R((D,F,E)=>{return af(D,Object.entries(E).reduce((w,[$,C])=>{if(Array.isArray(C))w[$]=C;else if(typeof C==="function")w[$]=[F,C()];else w[$]=[F,C];return w},{}))},"mapWithFilter"),aY=R((D,F,E,w)=>{if(F!==null){let f=E[w];if(typeof f==="function")f=[,f];const[B=In,h=Gn,U=w]=f;if(typeof B==="function"&&B(F[U])||typeof B!=="function"&&!!B)D[w]=h(F[U]);return}let[$,C]=E[w];if(typeof C==="function"){let f;const B=$===void 0&&(f=C())!=null,h=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(B)D[w]=f;else if(h)D[w]=C()}else{const f=$===void 0&&C!=null,B=typeof $==="function"&&!!$(C)||typeof $!=="function"&&!!$;if(f||B)D[w]=C}},"applyInstruction"),In=R((D)=>D!=null,"nonNullish"),Gn=R((D)=>D,"pass");R(oY,"quoteHeader");var Mn=R((D,F,E,w,$,C)=>{if(F!=null&&F[E]!==void 0){const f=w();if(f.length<=0)throw new Error("Empty value provided for input HTTP label: "+E+".");D=D.replace($,C?f.split("/").map((B)=>Bw(B)).join("/"):Bw(f))}else throw new Error("No value provided for input HTTP label: "+E+".");return D},"resolvedPath"),Yn=R((D)=>{if(D!==D)return"NaN";switch(D){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return D}},"serializeFloat"),Zn=R((D)=>D.toISOString().replace(".000Z","Z"),"serializeDateTime"),vf=R((D)=>{if(D==null)return{};if(Array.isArray(D))return D.filter((F)=>F!=null).map(vf);if(typeof D==="object"){const F={};for(let E of Object.keys(D)){if(D[E]==null)continue;F[E]=vf(D[E])}return F}return D},"_json");R(tY,"splitEvery");var Xn=R((D)=>{const F=D.length,E=[];let w=!1,$=void 0,C=0;for(let f=0;f<F;++f){const B=D[f];switch(B){case'"':if($!=="\\")w=!w;break;case",":if(!w)E.push(D.slice(C,f)),C=f+1;break;default:}$=B}return E.push(D.slice(C)),E.map((f)=>{f=f.trim();const B=f.length;if(B<2)return f;if(f[0]==='"'&&f[B-1]==='"')f=f.slice(1,B-1);return f.replace(/\\"/g,'"')})},"splitHeader")});var EZ=X((DZ)=>{Object.defineProperty(DZ,"__esModule",{value:!0});DZ.isStreamingPayload=void 0;var Wn=import.meta.require("stream"),Jn=(D)=>(D===null||D===void 0?void 0:D.body)instanceof Wn.Readable||typeof ReadableStream!=="undefined"&&(D===null||D===void 0?void 0:D.body)instanceof ReadableStream;DZ.isStreamingPayload=Jn});var TZ=X((jfD,zZ)=>{var{defineProperty:Uw,getOwnPropertyDescriptor:zn,getOwnPropertyNames:Tn}=Object,Kn=Object.prototype.hasOwnProperty,bD=(D,F)=>Uw(D,"name",{value:F,configurable:!0}),Sn=(D,F)=>{for(var E in F)Uw(D,E,{get:F[E],enumerable:!0})},Qn=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Tn(F))if(!Kn.call(D,$)&&$!==E)Uw(D,$,{get:()=>F[$],enumerable:!(w=zn(F,$))||w.enumerable})}return D},Hn=(D)=>Qn(Uw({},"__esModule",{value:!0}),D),$Z={};Sn($Z,{AdaptiveRetryStrategy:()=>Vn,CONFIG_MAX_ATTEMPTS:()=>tf,CONFIG_RETRY_MODE:()=>MZ,ENV_MAX_ATTEMPTS:()=>of,ENV_RETRY_MODE:()=>GZ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Nn,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>On,StandardRetryStrategy:()=>AZ,defaultDelayDecider:()=>CZ,defaultRetryDecider:()=>BZ,getOmitRetryHeadersPlugin:()=>jn,getRetryAfterHint:()=>JZ,getRetryPlugin:()=>cn,omitRetryHeadersMiddleware:()=>YZ,omitRetryHeadersMiddlewareOptions:()=>ZZ,resolveRetryConfig:()=>qn,retryMiddleware:()=>XZ,retryMiddlewareOptions:()=>WZ});zZ.exports=Hn($Z);var q6=H1(),fZ=Mf(),HD=_G(),Ln=bD((D,F)=>{const E=D,w=(F==null?void 0:F.noRetryIncrement)??HD.NO_RETRY_INCREMENT,$=(F==null?void 0:F.retryCost)??HD.RETRY_COST,C=(F==null?void 0:F.timeoutRetryCost)??HD.TIMEOUT_RETRY_COST;let f=D;const B=bD((A)=>A.name==="TimeoutError"?C:$,"getCapacityAmount"),h=bD((A)=>B(A)<=f,"hasRetryTokens");return Object.freeze({hasRetryTokens:h,retrieveRetryTokens:bD((A)=>{if(!h(A))throw new Error("No retry token available");const Y=B(A);return f-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:bD((A)=>{f+=A??w,f=Math.min(f,E)},"releaseRetryTokens")})},"getDefaultRetryQuota"),CZ=bD((D,F)=>Math.floor(Math.min(HD.MAXIMUM_RETRY_DELAY,Math.random()*2**F*D)),"defaultDelayDecider"),C8=Yf(),BZ=bD((D)=>{if(!D)return!1;return C8.isRetryableByTrait(D)||C8.isClockSkewError(D)||C8.isThrottlingError(D)||C8.isTransientError(D)},"defaultRetryDecider"),hZ=bD((D)=>{if(D instanceof Error)return D;if(D instanceof Object)return Object.assign(new Error,D);if(typeof D==="string")return new Error(D);return new Error(`AWS SDK error wrapper for ${D}`)},"asSdkError"),UZ=class D{constructor(F,E){this.maxAttemptsProvider=F,this.mode=HD.RETRY_MODES.STANDARD,this.retryDecider=(E==null?void 0:E.retryDecider)??BZ,this.delayDecider=(E==null?void 0:E.delayDecider)??CZ,this.retryQuota=(E==null?void 0:E.retryQuota)??Ln(HD.INITIAL_RETRY_TOKENS)}shouldRetry(F,E,w){return E<w&&this.retryDecider(F)&&this.retryQuota.hasRetryTokens(F)}async getMaxAttempts(){let F;try{F=await this.maxAttemptsProvider()}catch(E){F=HD.DEFAULT_MAX_ATTEMPTS}return F}async retry(F,E,w){let $,C=0,f=0;const B=await this.getMaxAttempts(),{request:h}=E;if(q6.HttpRequest.isInstance(h))h.headers[HD.INVOCATION_ID_HEADER]=fZ.v4();while(!0)try{if(q6.HttpRequest.isInstance(h))h.headers[HD.REQUEST_HEADER]=`attempt=${C+1}; max=${B}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:I}=await F(E);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens($),I.$metadata.attempts=C+1,I.$metadata.totalRetryDelay=f,{response:U,output:I}}catch(U){const I=hZ(U);if(C++,this.shouldRetry(I,C,B)){$=this.retryQuota.retrieveRetryTokens(I);const A=this.delayDecider(C8.isThrottlingError(I)?HD.THROTTLING_RETRY_DELAY_BASE:HD.DEFAULT_RETRY_DELAY_BASE,C),Y=Rn(I.$response),G=Math.max(Y||0,A);f+=G,await new Promise((Z)=>setTimeout(Z,G));continue}if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=C,I.$metadata.totalRetryDelay=f,I}}};bD(UZ,"StandardRetryStrategy");var AZ=UZ,Rn=bD((D)=>{if(!q6.HttpResponse.isInstance(D))return;const F=Object.keys(D.headers).find((C)=>C.toLowerCase()==="retry-after");if(!F)return;const E=D.headers[F],w=Number(E);if(!Number.isNaN(w))return w*1000;return new Date(E).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),IZ=class D extends AZ{constructor(F,E){const{rateLimiter:w,...$}=E??{};super(F,$);this.rateLimiter=w??new HD.DefaultRateLimiter,this.mode=HD.RETRY_MODES.ADAPTIVE}async retry(F,E){return super.retry(F,E,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};bD(IZ,"AdaptiveRetryStrategy");var Vn=IZ,wZ=kF(),of="AWS_MAX_ATTEMPTS",tf="max_attempts",Nn={environmentVariableSelector:(D)=>{const F=D[of];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Environment variable ${of} mast be a number, got "${F}"`);return E},configFileSelector:(D)=>{const F=D[tf];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Shared config file entry ${tf} mast be a number, got "${F}"`);return E},default:HD.DEFAULT_MAX_ATTEMPTS},qn=bD((D)=>{const{retryStrategy:F}=D,E=wZ.normalizeProvider(D.maxAttempts??HD.DEFAULT_MAX_ATTEMPTS);return{...D,maxAttempts:E,retryStrategy:async()=>{if(F)return F;if(await wZ.normalizeProvider(D.retryMode)()===HD.RETRY_MODES.ADAPTIVE)return new HD.AdaptiveRetryStrategy(E);return new HD.StandardRetryStrategy(E)}}},"resolveRetryConfig"),GZ="AWS_RETRY_MODE",MZ="retry_mode",On={environmentVariableSelector:(D)=>D[GZ],configFileSelector:(D)=>D[MZ],default:HD.DEFAULT_RETRY_MODE},YZ=bD(()=>(D)=>async(F)=>{const{request:E}=F;if(q6.HttpRequest.isInstance(E))delete E.headers[HD.INVOCATION_ID_HEADER],delete E.headers[HD.REQUEST_HEADER];return D(F)},"omitRetryHeadersMiddleware"),ZZ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},jn=bD((D)=>({applyToStack:(F)=>{F.addRelativeTo(YZ(),ZZ)}}),"getOmitRetryHeadersPlugin"),Pn=N6(),yn=EZ(),XZ=bD((D)=>(F,E)=>async(w)=>{var $;let C=await D.retryStrategy();const f=await D.maxAttempts();if(kn(C)){C=C;let B=await C.acquireInitialRetryToken(E.partition_id),h=new Error,U=0,I=0;const{request:A}=w,Y=q6.HttpRequest.isInstance(A);if(Y)A.headers[HD.INVOCATION_ID_HEADER]=fZ.v4();while(!0)try{if(Y)A.headers[HD.REQUEST_HEADER]=`attempt=${U+1}; max=${f}`;const{response:G,output:Z}=await F(w);return C.recordSuccess(B),Z.$metadata.attempts=U+1,Z.$metadata.totalRetryDelay=I,{response:G,output:Z}}catch(G){const Z=bn(G);if(h=hZ(G),Y&&yn.isStreamingPayload(A))throw($=E.logger instanceof Pn.NoOpLogger?console:E.logger)==null||$.warn("An error was encountered in a non-retryable streaming request."),h;try{B=await C.refreshRetryTokenForRetry(B,Z)}catch(W){if(!h.$metadata)h.$metadata={};throw h.$metadata.attempts=U+1,h.$metadata.totalRetryDelay=I,h}U=B.getRetryCount();const z=B.getRetryDelay();I+=z,await new Promise((W)=>setTimeout(W,z))}}else{if(C=C,C==null?void 0:C.mode)E.userAgent=[...E.userAgent||[],["cfg/retry-mode",C.mode]];return C.retry(F,w)}},"retryMiddleware"),kn=bD((D)=>typeof D.acquireInitialRetryToken!=="undefined"&&typeof D.refreshRetryTokenForRetry!=="undefined"&&typeof D.recordSuccess!=="undefined","isRetryStrategyV2"),bn=bD((D)=>{const F={error:D,errorType:xn(D)},E=JZ(D.$response);if(E)F.retryAfterHint=E;return F},"getRetryErrorInfo"),xn=bD((D)=>{if(C8.isThrottlingError(D))return"THROTTLING";if(C8.isTransientError(D))return"TRANSIENT";if(C8.isServerError(D))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),WZ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},cn=bD((D)=>({applyToStack:(F)=>{F.add(XZ(D),WZ)}}),"getRetryPlugin"),JZ=bD((D)=>{if(!q6.HttpResponse.isInstance(D))return;const F=Object.keys(D.headers).find((C)=>C.toLowerCase()==="retry-after");if(!F)return;const E=D.headers[F],w=Number(E);if(!Number.isNaN(w))return new Date(w*1000);return new Date(E)},"getRetryAfterHint")});var rD=X((PfD,rZ)=>{function QZ(D){const F=new Map;for(let E of D)F.set(E.schemeId,E);return F}function bZ(D,F){return new cZ(D,F)}function gZ(D,F,E,w,$){return JD(async function*C(f,B,...h){let U=f.startingToken||void 0,I=!0,A;while(I){if(B[E]=U,$)B[$]=B[$]??f.pageSize;if(f.client instanceof D)A=await hl(F,f.client,B,...h);else throw new Error(`Invalid client, expected instance of ${D.name}`);yield A;const Y=U;U=Ul(A,w),I=!!(U&&(!f.stopOnSameToken||U!==Y))}return},"paginateOperation")}var{defineProperty:Iw,getOwnPropertyDescriptor:gn,getOwnPropertyNames:rn}=Object,_n=Object.prototype.hasOwnProperty,JD=(D,F)=>Iw(D,"name",{value:F,configurable:!0}),sn=(D,F)=>{for(var E in F)Iw(D,E,{get:F[E],enumerable:!0})},un=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of rn(F))if(!_n.call(D,$)&&$!==E)Iw(D,$,{get:()=>F[$],enumerable:!(w=gn(F,$))||w.enumerable})}return D},dn=(D)=>un(Iw({},"__esModule",{value:!0}),D),KZ={};sn(KZ,{DefaultIdentityProviderConfig:()=>en,EXPIRATION_MS:()=>yZ,HttpApiKeyAuthSigner:()=>Dl,HttpBearerAuthSigner:()=>Fl,NoAuthSigner:()=>El,RequestBuilder:()=>cZ,createIsIdentityExpiredFunction:()=>PZ,createPaginator:()=>gZ,doesIdentityRequireRefresh:()=>kZ,getHttpAuthSchemeEndpointRuleSetPlugin:()=>mn,getHttpAuthSchemePlugin:()=>ln,getHttpSigningPlugin:()=>tn,getSmithyContext:()=>fl,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>HZ,httpAuthSchemeMiddleware:()=>ef,httpAuthSchemeMiddlewareOptions:()=>LZ,httpSigningMiddleware:()=>RZ,httpSigningMiddlewareOptions:()=>VZ,isIdentityExpired:()=>wl,memoizeIdentityProvider:()=>$l,normalizeProvider:()=>Cl,requestBuilder:()=>bZ});rZ.exports=dn(KZ);var SZ=kF();JD(QZ,"convertHttpAuthSchemesToMap");var ef=JD((D,F)=>(E,w)=>async($)=>{var C;const f=D.httpAuthSchemeProvider(await F.httpAuthSchemeParametersProvider(D,w,$.input)),B=QZ(D.httpAuthSchemes),h=SZ.getSmithyContext(w),U=[];for(let I of f){const A=B.get(I.schemeId);if(!A){U.push(`HttpAuthScheme \`${I.schemeId}\` was not enabled for this service.`);continue}const Y=A.identityProvider(await F.identityProviderConfigProvider(D));if(!Y){U.push(`HttpAuthScheme \`${I.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:G={},signingProperties:Z={}}=((C=I.propertiesExtractor)==null?void 0:C.call(I,D,w))||{};I.identityProperties=Object.assign(I.identityProperties||{},G),I.signingProperties=Object.assign(I.signingProperties||{},Z),h.selectedHttpAuthScheme={httpAuthOption:I,identity:await Y(I.identityProperties),signer:A.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(U.join("\n"));return E($)},"httpAuthSchemeMiddleware"),vn=TI(),HZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:vn.endpointMiddlewareOptions.name},mn=JD((D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E})=>({applyToStack:(w)=>{w.addRelativeTo(ef(D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E}),HZ)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),nn=YD(),LZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:nn.serializerMiddlewareOption.name},ln=JD((D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E})=>({applyToStack:(w)=>{w.addRelativeTo(ef(D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E}),LZ)}}),"getHttpAuthSchemePlugin"),Gw=H1(),pn=JD((D)=>(F)=>{throw F},"defaultErrorHandler"),an=JD((D,F)=>{},"defaultSuccessHandler"),RZ=JD((D)=>(F,E)=>async(w)=>{if(!Gw.HttpRequest.isInstance(w.request))return F(w);const C=SZ.getSmithyContext(E).selectedHttpAuthScheme;if(!C)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:f={}},identity:B,signer:h}=C,U=await F({...w,request:await h.sign(w.request,B,f)}).catch((h.errorHandler||pn)(f));return(h.successHandler||an)(U.response,f),U},"httpSigningMiddleware"),on=TZ(),VZ={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:on.retryMiddlewareOptions.name},tn=JD((D)=>({applyToStack:(F)=>{F.addRelativeTo(RZ(D),VZ)}}),"getHttpSigningPlugin"),NZ=class D{constructor(F){this.authSchemes=new Map;for(let[E,w]of Object.entries(F))if(w!==void 0)this.authSchemes.set(E,w)}getIdentityProvider(F){return this.authSchemes.get(F)}};JD(NZ,"DefaultIdentityProviderConfig");var en=NZ,Aw=W0(),qZ=class D{async sign(F,E,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!E.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const $=Gw.HttpRequest.clone(F);if(w.in===Aw.HttpApiKeyAuthLocation.QUERY)$.query[w.name]=E.apiKey;else if(w.in===Aw.HttpApiKeyAuthLocation.HEADER)$.headers[w.name]=w.scheme?`${w.scheme} ${E.apiKey}`:E.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return $}};JD(qZ,"HttpApiKeyAuthSigner");var Dl=qZ,OZ=class D{async sign(F,E,w){const $=Gw.HttpRequest.clone(F);if(!E.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return $.headers.Authorization=`Bearer ${E.token}`,$}};JD(OZ,"HttpBearerAuthSigner");var Fl=OZ,jZ=class D{async sign(F,E,w){return F}};JD(jZ,"NoAuthSigner");var El=jZ,PZ=JD((D)=>(F)=>kZ(F)&&F.expiration.getTime()-Date.now()<D,"createIsIdentityExpiredFunction"),yZ=300000,wl=PZ(yZ),kZ=JD((D)=>D.expiration!==void 0,"doesIdentityRequireRefresh"),$l=JD((D,F,E)=>{if(D===void 0)return;const w=typeof D!=="function"?async()=>Promise.resolve(D):D;let $,C,f,B=!1;const h=JD(async(U)=>{if(!C)C=w(U);try{$=await C,f=!0,B=!1}finally{C=void 0}return $},"coalesceProvider");if(F===void 0)return async(U)=>{if(!f||(U==null?void 0:U.forceRefresh))$=await h(U);return $};return async(U)=>{if(!f||(U==null?void 0:U.forceRefresh))$=await h(U);if(B)return $;if(!E($))return B=!0,$;if(F($))return await h(U),$;return $}},"memoizeIdentityProvider"),fl=JD((D)=>D[Aw.SMITHY_CONTEXT_KEY]||(D[Aw.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Cl=JD((D)=>{if(typeof D==="function")return D;const F=Promise.resolve(D);return()=>F},"normalizeProvider"),Bl=N6();JD(bZ,"requestBuilder");var xZ=class D{constructor(F,E){this.input=F,this.context=E,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:F,protocol:E="https",port:w,path:$}=await this.context.endpoint();this.path=$;for(let C of this.resolvePathStack)C(this.path);return new Gw.HttpRequest({protocol:E,hostname:this.hostname||F,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(F){return this.hostname=F,this}bp(F){return this.resolvePathStack.push((E)=>{this.path=`${(E==null?void 0:E.endsWith("/"))?E.slice(0,-1):E||""}`+F}),this}p(F,E,w,$){return this.resolvePathStack.push((C)=>{this.path=Bl.resolvedPath(C,this.input,F,E,w,$)}),this}h(F){return this.headers=F,this}q(F){return this.query=F,this}b(F){return this.body=F,this}m(F){return this.method=F,this}};JD(xZ,"RequestBuilder");var cZ=xZ,hl=JD(async(D,F,E,...w)=>{return await F.send(new D(E),...w)},"makePagedClientRequest");JD(gZ,"createPaginator");var Ul=JD((D,F)=>{let E=D;const w=F.split(".");for(let $ of w){if(!E||typeof E!=="object")return;E=E[$]}return E},"get")});function Al(D){if(D===void 0)return!0;return typeof D==="string"&&D.length<=50}function c2(D){const F=_Z.normalizeProvider(D.userAgentAppId??D9);return{...D,customUserAgent:typeof D.customUserAgent==="string"?[[D.customUserAgent]]:D.customUserAgent,userAgentAppId:async()=>{const E=await F();if(!Al(E)){const w=D.logger?.constructor?.name==="NoOpLogger"||!D.logger?console:D.logger;if(typeof E!=="string")w?.warn("userAgentAppId must be a string or undefined.");else if(E.length>50)w?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return E}}}var _Z,D9=void 0;var sZ=M(()=>{_Z=Q(rD(),1)});class I2{constructor({size:D,params:F}){if(this.data=new Map,this.parameters=[],this.capacity=D??50,F)this.parameters=F}get(D,F){const E=this.hash(D);if(E===!1)return F();if(!this.data.has(E)){if(this.data.size>this.capacity+10){const w=this.data.keys();let $=0;while(!0){const{value:C,done:f}=w.next();if(this.data.delete(C),f||++$>10)break}}this.data.set(E,F())}return this.data.get(E)}size(){return this.data.size}hash(D){let F="";const{parameters:E}=this;if(E.length===0)return!1;for(let w of E){const $=String(D[w]??"");if($.includes("|;"))return!1;F+=$+"|;"}return F}}var Il,aF=(D)=>Il.test(D)||D.startsWith("[")&&D.endsWith("]");var F9=M(()=>{Il=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var Gl,oF=(D,F=!1)=>{if(!F)return Gl.test(D);const E=D.split(".");for(let w of E)if(!oF(w))return!1;return!0};var E9=M(()=>{Gl=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var f0;var Mw=M(()=>{f0={}});var V1="endpoints";function u0(D){if(typeof D!=="object"||D==null)return D;if("ref"in D)return`\$${u0(D.ref)}`;if("fn"in D)return`${D.fn}(${(D.argv||[]).map(u0).join(", ")})`;return JSON.stringify(D,null,2)}var tF=()=>{};var ZD;var uZ=M(()=>{ZD=class ZD extends Error{constructor(D){super(D);this.name="EndpointError"}}});var dZ=()=>{};var vZ=()=>{};var mZ=()=>{};var nZ=()=>{};var lZ=()=>{};var iZ=()=>{};var d0=M(()=>{uZ();dZ();vZ();mZ();nZ();lZ();iZ()});var pZ=(D,F)=>D===F;var aZ=(D)=>{const F=D.split("."),E=[];for(let w of F){const $=w.indexOf("[");if($!==-1){if(w.indexOf("]")!==w.length-1)throw new ZD(`Path: '${D}' does not end with ']'`);const C=w.slice($+1,-1);if(Number.isNaN(parseInt(C)))throw new ZD(`Invalid array index: '${C}' in path: '${D}'`);if($!==0)E.push(w.slice(0,$));E.push(C)}else E.push(w)}return E};var oZ=M(()=>{d0()});var Yw=(D,F)=>aZ(F).reduce((E,w)=>{if(typeof E!=="object")throw new ZD(`Index '${w}' in '${F}' not found in '${JSON.stringify(D)}'`);else if(Array.isArray(E))return E[parseInt(w)];return E[w]},D);var tZ=M(()=>{d0();oZ()});var eZ=(D)=>D!=null;var DX=(D)=>!D;var Zw,w9,FX=(D)=>{const F=(()=>{try{if(D instanceof URL)return D;if(typeof D==="object"&&"hostname"in D){const{hostname:Y,port:G,protocol:Z="",path:z="",query:W={}}=D,J=new URL(`${Z}//${Y}${G?`:${G}`:""}${z}`);return J.search=Object.entries(W).map(([K,L])=>`${K}=${L}`).join("&"),J}return new URL(D)}catch(Y){return null}})();if(!F)return console.error(`Unable to parse ${JSON.stringify(D)} as a whatwg URL.`),null;const E=F.href,{host:w,hostname:$,pathname:C,protocol:f,search:B}=F;if(B)return null;const h=f.slice(0,-1);if(!Object.values(Zw.EndpointURLScheme).includes(h))return null;const U=aF($),I=E.includes(`${w}:${w9[h]}`)||typeof D==="string"&&D.includes(`${w}:${w9[h]}`),A=`${w}${I?`:${w9[h]}`:""}`;return{scheme:h,authority:A,path:C,normalizedPath:C.endsWith("/")?C:`${C}/`,isIp:U}};var EX=M(()=>{Zw=Q(W0(),1);F9();w9={[Zw.EndpointURLScheme.HTTP]:80,[Zw.EndpointURLScheme.HTTPS]:443}});var wX=(D,F)=>D===F;var $X=(D,F,E,w)=>{if(F>=E||D.length<E)return null;if(!w)return D.substring(F,E);return D.substring(D.length-E,D.length-F)};var fX=(D)=>encodeURIComponent(D).replace(/[!*'()]/g,(F)=>`%${F.charCodeAt(0).toString(16).toUpperCase()}`);var $9=M(()=>{tZ();E9();EX()});var CX;var BX=M(()=>{$9();CX={booleanEquals:pZ,getAttr:Yw,isSet:eZ,isValidHostLabel:oF,not:DX,parseURL:FX,stringEquals:wX,substring:$X,uriEncode:fX}});var Xw=(D,F)=>{const E=[],w={...F.endpointParams,...F.referenceRecord};let $=0;while($<D.length){const C=D.indexOf("{",$);if(C===-1){E.push(D.slice($));break}E.push(D.slice($,C));const f=D.indexOf("}",C);if(f===-1){E.push(D.slice(C));break}if(D[C+1]==="{"&&D[f+1]==="}")E.push(D.slice(C+1,f)),$=f+2;const B=D.substring(C+1,f);if(B.includes("#")){const[h,U]=B.split("#");E.push(Yw(w[h],U))}else E.push(w[B]);$=f+1}return E.join("")};var f9=M(()=>{$9()});var hX=({ref:D},F)=>{return{...F.endpointParams,...F.referenceRecord}[D]};var B8=(D,F,E)=>{if(typeof D==="string")return Xw(D,E);else if(D.fn)return Ww(D,E);else if(D.ref)return hX(D,E);throw new ZD(`'${F}': ${String(D)} is not a string, function or reference.`)};var eF=M(()=>{d0();C9();f9()});var Ww=({fn:D,argv:F},E)=>{const w=F.map((C)=>["boolean","number"].includes(typeof C)?C:B8(C,"arg",E)),$=D.split(".");if($[0]in f0&&$[1]!=null)return f0[$[0]][$[1]](...w);return CX[D](...w)};var C9=M(()=>{Mw();BX();eF()});var UX=({assign:D,...F},E)=>{if(D&&D in E.referenceRecord)throw new ZD(`'${D}' is already defined in Reference Record.`);const w=Ww(F,E);return E.logger?.debug?.(`${V1} evaluateCondition: ${u0(F)} = ${u0(w)}`),{result:w===""?!0:!!w,...D!=null&&{toAssign:{name:D,value:w}}}};var AX=M(()=>{tF();d0();C9()});var O6=(D=[],F)=>{const E={};for(let w of D){const{result:$,toAssign:C}=UX(w,{...F,referenceRecord:{...F.referenceRecord,...E}});if(!$)return{result:$};if(C)E[C.name]=C.value,F.logger?.debug?.(`${V1} assign: ${C.name} := ${u0(C.value)}`)}return{result:!0,referenceRecord:E}};var Jw=M(()=>{tF();AX()});var IX=(D,F)=>Object.entries(D).reduce((E,[w,$])=>({...E,[w]:$.map((C)=>{const f=B8(C,"Header value entry",F);if(typeof f!=="string")throw new ZD(`Header '${w}' value '${f}' is not a string`);return f})}),{});var GX=M(()=>{d0();eF()});var B9=(D,F)=>{if(Array.isArray(D))return D.map((E)=>B9(E,F));switch(typeof D){case"string":return Xw(D,F);case"object":if(D===null)throw new ZD(`Unexpected endpoint property: ${D}`);return zw(D,F);case"boolean":return D;default:throw new ZD(`Unexpected endpoint property type: ${typeof D}`)}};var MX=M(()=>{d0();f9();h9()});var zw=(D,F)=>Object.entries(D).reduce((E,[w,$])=>({...E,[w]:B9($,F)}),{});var h9=M(()=>{MX()});var YX=(D,F)=>{const E=B8(D,"Endpoint URL",F);if(typeof E==="string")try{return new URL(E)}catch(w){throw console.error(`Failed to construct URL with ${E}`,w),w}throw new ZD(`Endpoint URL must be a string, got ${typeof E}`)};var ZX=M(()=>{d0();eF()});var XX=(D,F)=>{const{conditions:E,endpoint:w}=D,{result:$,referenceRecord:C}=O6(E,F);if(!$)return;const f={...F,referenceRecord:{...F.referenceRecord,...C}},{url:B,properties:h,headers:U}=w;return F.logger?.debug?.(`${V1} Resolving endpoint from template: ${u0(w)}`),{...U!=null&&{headers:IX(U,f)},...h!=null&&{properties:zw(h,f)},url:YX(B,f)}};var WX=M(()=>{tF();Jw();GX();h9();ZX()});var JX=(D,F)=>{const{conditions:E,error:w}=D,{result:$,referenceRecord:C}=O6(E,F);if(!$)return;throw new ZD(B8(w,"Error",{...F,referenceRecord:{...F.referenceRecord,...C}}))};var zX=M(()=>{d0();Jw();eF()});var TX=(D,F)=>{const{conditions:E,rules:w}=D,{result:$,referenceRecord:C}=O6(E,F);if(!$)return;return Tw(w,{...F,referenceRecord:{...F.referenceRecord,...C}})};var KX=M(()=>{Jw();U9()});var Tw=(D,F)=>{for(let E of D)if(E.type==="endpoint"){const w=XX(E,F);if(w)return w}else if(E.type==="error")JX(E,F);else if(E.type==="tree"){const w=TX(E,F);if(w)return w}else throw new ZD(`Unknown endpoint rule: ${E}`);throw new ZD("Rules evaluation failed")};var U9=M(()=>{d0();WX();zX();KX()});var SX=M(()=>{Mw();U9()});var G2=(D,F)=>{const{endpointParams:E,logger:w}=F,{parameters:$,rules:C}=D;F.logger?.debug?.(`${V1} Initial EndpointParams: ${u0(E)}`);const f=Object.entries($).filter(([,U])=>U.default!=null).map(([U,I])=>[U,I.default]);if(f.length>0)for(let[U,I]of f)E[U]=E[U]??I;const B=Object.entries($).filter(([,U])=>U.required).map(([U])=>U);for(let U of B)if(E[U]==null)throw new ZD(`Missing required parameter: '${U}'`);const h=Tw(C,{endpointParams:E,logger:w,referenceRecord:{}});return F.logger?.debug?.(`${V1} Resolved endpoint: ${u0(h)}`),h};var QX=M(()=>{tF();d0();SX()});var M2=M(()=>{F9();E9();Mw();QX();d0()});var A9=M(()=>{M2()});var I9=(D,F=!1)=>{if(F){for(let E of D.split("."))if(!I9(E))return!1;return!0}if(!oF(D))return!1;if(D.length<3||D.length>63)return!1;if(D!==D.toLowerCase())return!1;if(aF(D))return!1;return!0};var HX=M(()=>{M2();A9()});var LX=(D)=>{const F=D.split(":");if(F.length<6)return null;const[E,w,$,C,f,...B]=F;if(E!=="arn"||w===""||$===""||B.join(":")==="")return null;const h=B.map((U)=>U.split("/")).flat();return{partition:w,service:$,region:C,accountId:f,resourceId:h}};var VX;var RX=M(()=>{VX={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"}});var Yl,Zl="",NX=(D)=>{const{partitions:F}=Yl;for(let w of F){const{regions:$,outputs:C}=w;for(let[f,B]of Object.entries($))if(f===D)return{...C,...B}}for(let w of F){const{regionRegex:$,outputs:C}=w;if(new RegExp($).test(D))return{...C}}const E=F.find((w)=>w.id==="aws");if(!E)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...E.outputs}},qX=()=>Zl;var G9=M(()=>{RX();Yl=VX});var Y2;var OX=M(()=>{M2();HX();G9();Y2={isVirtualHostableS3Bucket:I9,parseArn:LX,partition:NX};f0.aws=Y2});var jX=M(()=>{M2()});var PX=M(()=>{M2()});var yX=()=>{};var kX=()=>{};var bX=()=>{};var xX=()=>{};var cX=()=>{};var gX=M(()=>{PX();yX();kX();bX();xX();cX()});var i8=M(()=>{OX();G9();A9();jX();gX()});var Y9=X((UCD,Qw)=>{var rX,_X,sX,uX,dX,vX,mX,nX,lX,iX,pX,aX,oX,Kw,M9,tX,eX,DW,j6,FW,EW,wW,$W,fW,CW,BW,hW,UW,Sw,AW,IW;(function(D){var F=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(w){D(E(F,E(w)))});else if(typeof Qw==="object"&&typeof UCD==="object")D(E(F,E(UCD)));else D(E(F));function E(w,$){if(w!==F)if(typeof Object.create==="function")Object.defineProperty(w,"__esModule",{value:!0});else w.__esModule=!0;return function(C,f){return w[C]=$?$(C,f):f}}})(function(D){var F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,C){$.__proto__=C}||function($,C){for(var f in C)if(Object.prototype.hasOwnProperty.call(C,f))$[f]=C[f]};rX=function($,C){if(typeof C!=="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");F($,C);function f(){this.constructor=$}$.prototype=C===null?Object.create(C):(f.prototype=C.prototype,new f)},_X=Object.assign||function($){for(var C,f=1,B=arguments.length;f<B;f++){C=arguments[f];for(var h in C)if(Object.prototype.hasOwnProperty.call(C,h))$[h]=C[h]}return $},sX=function($,C){var f={};for(var B in $)if(Object.prototype.hasOwnProperty.call($,B)&&C.indexOf(B)<0)f[B]=$[B];if($!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var h=0,B=Object.getOwnPropertySymbols($);h<B.length;h++)if(C.indexOf(B[h])<0&&Object.prototype.propertyIsEnumerable.call($,B[h]))f[B[h]]=$[B[h]]}return f},uX=function($,C,f,B){var h=arguments.length,U=h<3?C:B===null?B=Object.getOwnPropertyDescriptor(C,f):B,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate($,C,f,B);else for(var A=$.length-1;A>=0;A--)if(I=$[A])U=(h<3?I(U):h>3?I(C,f,U):I(C,f))||U;return h>3&&U&&Object.defineProperty(C,f,U),U},dX=function($,C){return function(f,B){C(f,B,$)}},vX=function($,C,f,B,h,U){function I(m){if(m!==void 0&&typeof m!=="function")throw new TypeError("Function expected");return m}var A=B.kind,Y=A==="getter"?"get":A==="setter"?"set":"value",G=!C&&$?B.static?$:$.prototype:null,Z=C||(G?Object.getOwnPropertyDescriptor(G,B.name):{}),z,W=!1;for(var J=f.length-1;J>=0;J--){var K={};for(var L in B)K[L]=L==="access"?{}:B[L];for(var L in B.access)K.access[L]=B.access[L];K.addInitializer=function(m){if(W)throw new TypeError("Cannot add initializers after decoration has completed");U.push(I(m||null))};var V=f[J](A==="accessor"?{get:Z.get,set:Z.set}:Z[Y],K);if(A==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw new TypeError("Object expected");if(z=I(V.get))Z.get=z;if(z=I(V.set))Z.set=z;if(z=I(V.init))h.unshift(z)}else if(z=I(V))if(A==="field")h.unshift(z);else Z[Y]=z}if(G)Object.defineProperty(G,B.name,Z);W=!0},mX=function($,C,f){var B=arguments.length>2;for(var h=0;h<C.length;h++)f=B?C[h].call($,f):C[h].call($);return B?f:void 0},nX=function($){return typeof $==="symbol"?$:"".concat($)},lX=function($,C,f){if(typeof C==="symbol")C=C.description?"[".concat(C.description,"]"):"";return Object.defineProperty($,"name",{configurable:!0,value:f?"".concat(f," ",C):C})},iX=function($,C){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata($,C)},pX=function($,C,f,B){function h(U){return U instanceof f?U:new f(function(I){I(U)})}return new(f||(f=Promise))(function(U,I){function A(Z){try{G(B.next(Z))}catch(z){I(z)}}function Y(Z){try{G(B.throw(Z))}catch(z){I(z)}}function G(Z){Z.done?U(Z.value):h(Z.value).then(A,Y)}G((B=B.apply($,C||[])).next())})},aX=function($,C){var f={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},B,h,U,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=A(0),I.throw=A(1),I.return=A(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function A(G){return function(Z){return Y([G,Z])}}function Y(G){if(B)throw new TypeError("Generator is already executing.");while(I&&(I=0,G[0]&&(f=0)),f)try{if(B=1,h&&(U=G[0]&2?h.return:G[0]?h.throw||((U=h.return)&&U.call(h),0):h.next)&&!(U=U.call(h,G[1])).done)return U;if(h=0,U)G=[G[0]&2,U.value];switch(G[0]){case 0:case 1:U=G;break;case 4:return f.label++,{value:G[1],done:!1};case 5:f.label++,h=G[1],G=[0];continue;case 7:G=f.ops.pop(),f.trys.pop();continue;default:if((U=f.trys,!(U=U.length>0&&U[U.length-1]))&&(G[0]===6||G[0]===2)){f=0;continue}if(G[0]===3&&(!U||G[1]>U[0]&&G[1]<U[3])){f.label=G[1];break}if(G[0]===6&&f.label<U[1]){f.label=U[1],U=G;break}if(U&&f.label<U[2]){f.label=U[2],f.ops.push(G);break}if(U[2])f.ops.pop();f.trys.pop();continue}G=C.call($,f)}catch(Z){G=[6,Z],h=0}finally{B=U=0}if(G[0]&5)throw G[1];return{value:G[0]?G[1]:void 0,done:!0}}},oX=function($,C){for(var f in $)if(f!=="default"&&!Object.prototype.hasOwnProperty.call(C,f))Sw(C,$,f)},Sw=Object.create?function($,C,f,B){if(B===void 0)B=f;var h=Object.getOwnPropertyDescriptor(C,f);if(!h||("get"in h?!C.__esModule:h.writable||h.configurable))h={enumerable:!0,get:function(){return C[f]}};Object.defineProperty($,B,h)}:function($,C,f,B){if(B===void 0)B=f;$[B]=C[f]},Kw=function($){var C=typeof Symbol==="function"&&Symbol.iterator,f=C&&$[C],B=0;if(f)return f.call($);if($&&typeof $.length==="number")return{next:function(){if($&&B>=$.length)$=void 0;return{value:$&&$[B++],done:!$}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},M9=function($,C){var f=typeof Symbol==="function"&&$[Symbol.iterator];if(!f)return $;var B=f.call($),h,U=[],I;try{while((C===void 0||C-- >0)&&!(h=B.next()).done)U.push(h.value)}catch(A){I={error:A}}finally{try{if(h&&!h.done&&(f=B.return))f.call(B)}finally{if(I)throw I.error}}return U},tX=function(){for(var $=[],C=0;C<arguments.length;C++)$=$.concat(M9(arguments[C]));return $},eX=function(){for(var $=0,C=0,f=arguments.length;C<f;C++)$+=arguments[C].length;for(var B=Array($),h=0,C=0;C<f;C++)for(var U=arguments[C],I=0,A=U.length;I<A;I++,h++)B[h]=U[I];return B},DW=function($,C,f){if(f||arguments.length===2){for(var B=0,h=C.length,U;B<h;B++)if(U||!(B in C)){if(!U)U=Array.prototype.slice.call(C,0,B);U[B]=C[B]}}return $.concat(U||Array.prototype.slice.call(C))},j6=function($){return this instanceof j6?(this.v=$,this):new j6($)},FW=function($,C,f){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B=f.apply($,C||[]),h,U=[];return h=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),A("next"),A("throw"),A("return",I),h[Symbol.asyncIterator]=function(){return this},h;function I(J){return function(K){return Promise.resolve(K).then(J,z)}}function A(J,K){if(B[J]){if(h[J]=function(L){return new Promise(function(V,m){U.push([J,L,V,m])>1||Y(J,L)})},K)h[J]=K(h[J])}}function Y(J,K){try{G(B[J](K))}catch(L){W(U[0][3],L)}}function G(J){J.value instanceof j6?Promise.resolve(J.value.v).then(Z,z):W(U[0][2],J)}function Z(J){Y("next",J)}function z(J){Y("throw",J)}function W(J,K){if(J(K),U.shift(),U.length)Y(U[0][0],U[0][1])}},EW=function($){var C,f;return C={},B("next"),B("throw",function(h){throw h}),B("return"),C[Symbol.iterator]=function(){return this},C;function B(h,U){C[h]=$[h]?function(I){return(f=!f)?{value:j6($[h](I)),done:!1}:U?U(I):I}:U}},wW=function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C=$[Symbol.asyncIterator],f;return C?C.call($):($=typeof Kw==="function"?Kw($):$[Symbol.iterator](),f={},B("next"),B("throw"),B("return"),f[Symbol.asyncIterator]=function(){return this},f);function B(U){f[U]=$[U]&&function(I){return new Promise(function(A,Y){I=$[U](I),h(A,Y,I.done,I.value)})}}function h(U,I,A,Y){Promise.resolve(Y).then(function(G){U({value:G,done:A})},I)}},$W=function($,C){if(Object.defineProperty)Object.defineProperty($,"raw",{value:C});else $.raw=C;return $};var E=Object.create?function($,C){Object.defineProperty($,"default",{enumerable:!0,value:C})}:function($,C){$.default=C};fW=function($){if($&&$.__esModule)return $;var C={};if($!=null){for(var f in $)if(f!=="default"&&Object.prototype.hasOwnProperty.call($,f))Sw(C,$,f)}return E(C,$),C},CW=function($){return $&&$.__esModule?$:{default:$}},BW=function($,C,f,B){if(f==="a"&&!B)throw new TypeError("Private accessor was defined without a getter");if(typeof C==="function"?$!==C||!B:!C.has($))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?B:f==="a"?B.call($):B?B.value:C.get($)},hW=function($,C,f,B,h){if(B==="m")throw new TypeError("Private method is not writable");if(B==="a"&&!h)throw new TypeError("Private accessor was defined without a setter");if(typeof C==="function"?$!==C||!h:!C.has($))throw new TypeError("Cannot write private member to an object whose class did not declare it");return B==="a"?h.call($,f):h?h.value=f:C.set($,f),f},UW=function($,C){if(C===null||typeof C!=="object"&&typeof C!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof $==="function"?C===$:$.has(C)},AW=function($,C,f){if(C!==null&&C!==void 0){if(typeof C!=="object"&&typeof C!=="function")throw new TypeError("Object expected.");var B,h;if(f){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");B=C[Symbol.asyncDispose]}if(B===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(B=C[Symbol.dispose],f)h=B}if(typeof B!=="function")throw new TypeError("Object not disposable.");if(h)B=function(){try{h.call(this)}catch(U){return Promise.reject(U)}};$.stack.push({value:C,dispose:B,async:f})}else if(f)$.stack.push({async:!0});return C};var w=typeof SuppressedError==="function"?SuppressedError:function($,C,f){var B=new Error(f);return B.name="SuppressedError",B.error=$,B.suppressed=C,B};IW=function($){function C(U){$.error=$.hasError?new w(U,$.error,"An error was suppressed during disposal."):U,$.hasError=!0}var f,B=0;function h(){while(f=$.stack.pop())try{if(!f.async&&B===1)return B=0,$.stack.push(f),Promise.resolve().then(h);if(f.dispose){var U=f.dispose.call(f.value);if(f.async)return B|=2,Promise.resolve(U).then(h,function(I){return C(I),h()})}else B|=1}catch(I){C(I)}if(B===1)return $.hasError?Promise.reject($.error):Promise.resolve();if($.hasError)throw $.error}return h()},D("__extends",rX),D("__assign",_X),D("__rest",sX),D("__decorate",uX),D("__param",dX),D("__esDecorate",vX),D("__runInitializers",mX),D("__propKey",nX),D("__setFunctionName",lX),D("__metadata",iX),D("__awaiter",pX),D("__generator",aX),D("__exportStar",oX),D("__createBinding",Sw),D("__values",Kw),D("__read",M9),D("__spread",tX),D("__spreadArrays",eX),D("__spreadArray",DW),D("__await",j6),D("__asyncGenerator",FW),D("__asyncDelegator",EW),D("__asyncValues",wW),D("__makeTemplateObject",$W),D("__importStar",fW),D("__importDefault",CW),D("__classPrivateFieldGet",BW),D("__classPrivateFieldSet",hW),D("__classPrivateFieldIn",UW),D("__addDisposableResource",AW),D("__disposeResources",IW)})});var C0=X((ACD,XW)=>{function YW(D,F,E){if(!D.$source)D.$source={};return D.$source[F]=E,D}function ZW(D,F,E){if(!D.__aws_sdk_context)D.__aws_sdk_context={features:{}};else if(!D.__aws_sdk_context.features)D.__aws_sdk_context.features={};D.__aws_sdk_context.features[F]=E}var{defineProperty:Hw,getOwnPropertyDescriptor:Xl,getOwnPropertyNames:Wl}=Object,Jl=Object.prototype.hasOwnProperty,Z9=(D,F)=>Hw(D,"name",{value:F,configurable:!0}),zl=(D,F)=>{for(var E in F)Hw(D,E,{get:F[E],enumerable:!0})},Tl=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Wl(F))if(!Jl.call(D,$)&&$!==E)Hw(D,$,{get:()=>F[$],enumerable:!(w=Xl(F,$))||w.enumerable})}return D},Kl=(D)=>Tl(Hw({},"__esModule",{value:!0}),D),MW={};zl(MW,{emitWarningIfUnsupportedVersion:()=>Sl,setCredentialFeature:()=>YW,setFeature:()=>ZW});XW.exports=Kl(MW);var GW=!1,Sl=Z9((D)=>{if(D&&!GW&&parseInt(D.substring(1,D.indexOf(".")))<18)GW=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
4
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return E}resolveDefaultConfig(F){const{requestTimeout:E,connectionTimeout:w,socketTimeout:$,httpAgent:C,httpsAgent:f}=F||{};return{connectionTimeout:w,requestTimeout:E??$,httpAgent:(()=>{if(C instanceof jf.Agent||typeof(C==null?void 0:C.destroy)==="function")return C;return new jf.Agent({keepAlive:!0,maxSockets:50,...C})})(),httpsAgent:(()=>{if(f instanceof Pf.Agent||typeof(f==null?void 0:f.destroy)==="function")return f;return new Pf.Agent({keepAlive:!0,maxSockets:50,...f})})(),logger:console}}destroy(){var F,E,w,$;(E=(F=this.config)==null?void 0:F.httpAgent)==null||E.destroy(),($=(w=this.config)==null?void 0:w.httpsAgent)==null||$.destroy()}async handle(F,{abortSignal:E}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,$)=>{let C=void 0;const f=[],B=ID(async(H)=>{await C,f.forEach(clearTimeout),w(H)},"resolve"),h=ID(async(H)=>{await C,f.forEach(clearTimeout),$(H)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(E==null?void 0:E.aborted){const H=new Error("Request aborted");H.name="AbortError",h(H);return}const U=F.protocol==="https:",I=U?this.config.httpsAgent:this.config.httpAgent;f.push(setTimeout(()=>{this.socketWarningTimestamp=D.checkSocketUsage(I,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const A=RG.buildQueryString(F.query||{});let Y=void 0;if(F.username!=null||F.password!=null){const H=F.username??"",V=F.password??"";Y=`${H}:${V}`}let M=F.path;if(A)M+=`?${A}`;if(F.fragment)M+=`#${F.fragment}`;let Z=F.hostname??"";if(Z[0]==="["&&Z.endsWith("]"))Z=F.hostname.slice(1,-1);else Z=F.hostname;const z={headers:F.headers,host:Z,method:F.method,path:M,port:F.port,agent:I,auth:Y},J=(U?Pf.request:jf.request)(z,(H)=>{const V=new LG.HttpResponse({statusCode:H.statusCode||-1,reason:H.statusMessage,headers:VG(H.headers),body:H});B({response:V})});if(J.on("error",(H)=>{if(gd.includes(H.code))h(Object.assign(H,{name:"TimeoutError"}));else h(H)}),E){const H=ID(()=>{J.destroy();const V=new Error("Request aborted");V.name="AbortError",h(V)},"onAbort");if(typeof E.addEventListener==="function"){const V=E;V.addEventListener("abort",H,{once:!0}),J.once("close",()=>V.removeEventListener("abort",H))}else E.onabort=H}f.push(rd(J,h,this.config.connectionTimeout)),f.push(ud(J,h,this.config.requestTimeout));const K=z.agent;if(typeof K==="object"&&"keepAlive"in K)f.push(sd(J,{keepAlive:K.keepAlive,keepAliveMsecs:K.keepAliveMsecs}));C=yf(J,F,this.config.requestTimeout).catch((H)=>{return f.forEach(clearTimeout),$(H)})})}updateHttpClientConfig(F,E){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[F]:E}})}httpHandlerConfigs(){return this.config??{}}};ID(OG,"NodeHttpHandler");var vd=OG,SG=import.meta.require("http2"),md=xd(import.meta.require("http2")),jG=class D{constructor(F){this.sessions=[],this.sessions=F??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(F){this.sessions.push(F)}contains(F){return this.sessions.includes(F)}remove(F){this.sessions=this.sessions.filter((E)=>E!==F)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(F){for(let E of this.sessions)if(E===F){if(!E.destroyed)E.destroy()}}};ID(jG,"NodeHttp2ConnectionPool");var nd=jG,PG=class D{constructor(F){if(this.sessionCache=new Map,this.config=F,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(F,E){const w=this.getUrlString(F),$=this.sessionCache.get(w);if($){const h=$.poll();if(h&&!this.config.disableConcurrency)return h}const C=md.default.connect(w);if(this.config.maxConcurrency)C.settings({maxConcurrentStreams:this.config.maxConcurrency},(h)=>{if(h)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+F.destination.toString())});C.unref();const f=ID(()=>{C.destroy(),this.deleteSession(w,C)},"destroySessionCb");if(C.on("goaway",f),C.on("error",f),C.on("frameError",f),C.on("close",()=>this.deleteSession(w,C)),E.requestTimeout)C.setTimeout(E.requestTimeout,f);const B=this.sessionCache.get(w)||new nd;return B.offerLast(C),this.sessionCache.set(w,B),C}deleteSession(F,E){const w=this.sessionCache.get(F);if(!w)return;if(!w.contains(E))return;w.remove(E),this.sessionCache.set(F,w)}release(F,E){var w;const $=this.getUrlString(F);(w=this.sessionCache.get($))==null||w.offerLast(E)}destroy(){for(let[F,E]of this.sessionCache){for(let w of E){if(!w.destroyed)w.destroy();E.remove(w)}this.sessionCache.delete(F)}}setMaxConcurrentStreams(F){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=F}setDisableConcurrentStreams(F){this.config.disableConcurrency=F}getUrlString(F){return F.destination.toString()}};ID(PG,"NodeHttp2ConnectionManager");var ld=PG,yG=class D{constructor(F){this.metadata={handlerProtocol:"h2"},this.connectionManager=new ld({}),this.configProvider=new Promise((E,w)=>{if(typeof F==="function")F().then(($)=>{E($||{})}).catch(w);else E(F||{})})}static create(F){if(typeof(F==null?void 0:F.handle)==="function")return F;return new D(F)}destroy(){this.connectionManager.destroy()}async handle(F,{abortSignal:E}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:$}=this.config;return new Promise((C,f)=>{var B;let h=!1,U=void 0;const I=ID(async(b)=>{await U,C(b)},"resolve"),A=ID(async(b)=>{await U,f(b)},"reject");if(E==null?void 0:E.aborted){h=!0;const b=new Error("Request aborted");b.name="AbortError",A(b);return}const{hostname:Y,method:M,port:Z,protocol:z,query:X}=F;let J="";if(F.username!=null||F.password!=null){const b=F.username??"",UD=F.password??"";J=`${b}:${UD}@`}const K=`${z}//${J}${Y}${Z?`:${Z}`:""}`,H={destination:new URL(K)},V=this.connectionManager.lease(H,{requestTimeout:(B=this.config)==null?void 0:B.sessionTimeout,disableConcurrentStreams:$||!1}),m=ID((b)=>{if($)this.destroySession(V);h=!0,A(b)},"rejectWithDestroy"),FD=RG.buildQueryString(X||{});let $D=F.path;if(FD)$D+=`?${FD}`;if(F.fragment)$D+=`#${F.fragment}`;const e=V.request({...F.headers,[SG.constants.HTTP2_HEADER_PATH]:$D,[SG.constants.HTTP2_HEADER_METHOD]:M});if(V.ref(),e.on("response",(b)=>{const UD=new LG.HttpResponse({statusCode:b[":status"]||-1,headers:VG(b),body:e});if(h=!0,I({response:UD}),$)V.close(),this.connectionManager.deleteSession(K,V)}),w)e.setTimeout(w,()=>{e.close();const b=new Error(`Stream timed out because of no activity for ${w} ms`);b.name="TimeoutError",m(b)});if(E){const b=ID(()=>{e.close();const UD=new Error("Request aborted");UD.name="AbortError",m(UD)},"onAbort");if(typeof E.addEventListener==="function"){const UD=E;UD.addEventListener("abort",b,{once:!0}),e.once("close",()=>UD.removeEventListener("abort",b))}else E.onabort=b}e.on("frameError",(b,UD,eD)=>{m(new Error(`Frame type id ${b} in stream id ${eD} has failed with code ${UD}.`))}),e.on("error",m),e.on("aborted",()=>{m(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${e.rstCode}.`))}),e.on("close",()=>{if(V.unref(),$)V.destroy();if(!h)m(new Error("Unexpected error: http2 request did not get a response"))}),U=yf(e,F,w)})}updateHttpClientConfig(F,E){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[F]:E}})}httpHandlerConfigs(){return this.config??{}}destroySession(F){if(!F.destroyed)F.destroy()}};ID(yG,"NodeHttp2Handler");var id=yG,kG=class D extends NG.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(F,E,w){this.bufferedBytes.push(F),w()}};ID(kG,"Collector");var pd=kG,ad=ID((D)=>{if(od(D))return bG(D);return new Promise((F,E)=>{const w=new pd;D.pipe(w),D.on("error",($)=>{w.end(),E($)}),w.on("error",E),w.on("finish",function(){const $=new Uint8Array(Buffer.concat(this.bufferedBytes));F($)})})},"streamCollector"),od=ID((D)=>typeof ReadableStream==="function"&&D instanceof ReadableStream,"isReadableStreamInstance");ID(bG,"collectReadableStream")});var nG=W((FfD,mG)=>{function _G(D=0){return new Promise((F,E)=>{if(D)setTimeout(()=>{const w=new Error(`Request did not complete within ${D} ms`);w.name="TimeoutError",E(w)},D)})}async function uG(D){const F=await vG(D),E=Cv.fromBase64(F);return new Uint8Array(E)}async function dG(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}function vG(D){return new Promise((F,E)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return E(new Error("Reader aborted too early"));const $=w.result??"",C=$.indexOf(","),f=C>-1?C+1:$.length;F($.substring(f))},w.onabort=()=>E(new Error("Read aborted")),w.onerror=()=>E(w.error),w.readAsDataURL(D)})}var{defineProperty:fw,getOwnPropertyDescriptor:td,getOwnPropertyNames:ed}=Object,Dv=Object.prototype.hasOwnProperty,R1=(D,F)=>fw(D,"name",{value:F,configurable:!0}),Fv=(D,F)=>{for(var E in F)fw(D,E,{get:F[E],enumerable:!0})},Ev=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of ed(F))if(!Dv.call(D,$)&&$!==E)fw(D,$,{get:()=>F[$],enumerable:!(w=td(F,$))||w.enumerable})}return D},wv=(D)=>Ev(fw({},"__esModule",{value:!0}),D),rG={};Fv(rG,{FetchHttpHandler:()=>fv,keepAliveSupport:()=>$w,streamCollector:()=>Bv});mG.exports=wv(rG);var gG=H1(),$v=Of();R1(_G,"requestTimeout");var $w={supported:void 0},sG=class D{static create(F){if(typeof(F==null?void 0:F.handle)==="function")return F;return new D(F)}constructor(F){if(typeof F==="function")this.configProvider=F().then((E)=>E||{});else this.config=F??{},this.configProvider=Promise.resolve(this.config);if($w.supported===void 0)$w.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(F,{abortSignal:E}={}){var w;if(!this.config)this.config=await this.configProvider;const $=this.config.requestTimeout,C=this.config.keepAlive===!0,f=this.config.credentials;if(E==null?void 0:E.aborted){const K=new Error("Request aborted");return K.name="AbortError",Promise.reject(K)}let B=F.path;const h=$v.buildQueryString(F.query||{});if(h)B+=`?${h}`;if(F.fragment)B+=`#${F.fragment}`;let U="";if(F.username!=null||F.password!=null){const K=F.username??"",H=F.password??"";U=`${K}:${H}@`}const{port:I,method:A}=F,Y=`${F.protocol}//${U}${F.hostname}${I?`:${I}`:""}${B}`,M=A==="GET"||A==="HEAD"?void 0:F.body,Z={body:M,headers:new Headers(F.headers),method:A,credentials:f};if((w=this.config)==null?void 0:w.cache)Z.cache=this.config.cache;if(M)Z.duplex="half";if(typeof AbortController!=="undefined")Z.signal=E;if($w.supported)Z.keepalive=C;if(typeof this.config.requestInit==="function")Object.assign(Z,this.config.requestInit(F));let z=R1(()=>{},"removeSignalEventListener");const X=new Request(Y,Z),J=[fetch(X).then((K)=>{const H=K.headers,V={};for(let FD of H.entries())V[FD[0]]=FD[1];if(K.body==null)return K.blob().then((FD)=>({response:new gG.HttpResponse({headers:V,reason:K.statusText,statusCode:K.status,body:FD})}));return{response:new gG.HttpResponse({headers:V,reason:K.statusText,statusCode:K.status,body:K.body})}}),_G($)];if(E)J.push(new Promise((K,H)=>{const V=R1(()=>{const m=new Error("Request aborted");m.name="AbortError",H(m)},"onAbort");if(typeof E.addEventListener==="function"){const m=E;m.addEventListener("abort",V,{once:!0}),z=R1(()=>m.removeEventListener("abort",V),"removeSignalEventListener")}else E.onabort=V}));return Promise.race(J).finally(z)}updateHttpClientConfig(F,E){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[F]=E,w})}httpHandlerConfigs(){return this.config??{}}};R1(sG,"FetchHttpHandler");var fv=sG,Cv=Fw(),Bv=R1((D)=>{if(typeof Blob==="function"&&D instanceof Blob)return uG(D);return dG(D)},"streamCollector");R1(uG,"collectBlob");R1(dG,"collectStream");R1(vG,"readToBase64")});var L6=W((EfD,tG)=>{function aG(D){if(D.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const F=new Uint8Array(D.length/2);for(let E=0;E<D.length;E+=2){const w=D.slice(E,E+2).toLowerCase();if(w in kf)F[E/2]=kf[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return F}function oG(D){let F="";for(let E=0;E<D.byteLength;E++)F+=pG[D[E]];return F}var{defineProperty:Cw,getOwnPropertyDescriptor:hv,getOwnPropertyNames:Uv}=Object,Av=Object.prototype.hasOwnProperty,lG=(D,F)=>Cw(D,"name",{value:F,configurable:!0}),Iv=(D,F)=>{for(var E in F)Cw(D,E,{get:F[E],enumerable:!0})},Mv=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Uv(F))if(!Av.call(D,$)&&$!==E)Cw(D,$,{get:()=>F[$],enumerable:!(w=hv(F,$))||w.enumerable})}return D},Gv=(D)=>Mv(Cw({},"__esModule",{value:!0}),D),iG={};Iv(iG,{fromHex:()=>aG,toHex:()=>oG});tG.exports=Gv(iG);var pG={},kf={};for(let D=0;D<256;D++){let F=D.toString(16).toLowerCase();if(F.length===1)F=`0${F}`;pG[D]=F,kf[F]=D}lG(aG,"fromHex");lG(oG,"toHex")});var mF=W((eG)=>{Object.defineProperty(eG,"__esModule",{value:!0});eG.isReadableStream=void 0;var Yv=(D)=>{var F;return typeof ReadableStream==="function"&&(((F=D===null||D===void 0?void 0:D.constructor)===null||F===void 0?void 0:F.name)===ReadableStream.name||D instanceof ReadableStream)};eG.isReadableStream=Yv});var CY=W(($Y)=>{Object.defineProperty($Y,"__esModule",{value:!0});$Y.sdkStreamMixin=void 0;var Zv=nG(),Wv=Fw(),Xv=L6(),Jv=f8(),FY=mF(),EY="The stream has already been transformed.",zv=(D)=>{var F,E;if(!wY(D)&&!FY.isReadableStream(D)){const f=((E=(F=D===null||D===void 0?void 0:D.__proto__)===null||F===void 0?void 0:F.constructor)===null||E===void 0?void 0:E.name)||D;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${f}`)}let w=!1;const $=async()=>{if(w)throw new Error(EY);return w=!0,await Zv.streamCollector(D)},C=(f)=>{if(typeof f.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return f.stream()};return Object.assign(D,{transformToByteArray:$,transformToString:async(f)=>{const B=await $();if(f==="base64")return Wv.toBase64(B);else if(f==="hex")return Xv.toHex(B);else if(f===void 0||f==="utf8"||f==="utf-8")return Jv.toUtf8(B);else if(typeof TextDecoder==="function")return new TextDecoder(f).decode(B);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(EY);if(w=!0,wY(D))return C(D);else if(FY.isReadableStream(D))return D;else throw new Error(`Cannot transform payload to web stream, got ${D}`)}})};$Y.sdkStreamMixin=zv;var wY=(D)=>typeof Blob==="function"&&D instanceof Blob});var AY=W((hY)=>{Object.defineProperty(hY,"__esModule",{value:!0});hY.sdkStreamMixin=void 0;var Tv=cG(),Kv=dF(),bf=import.meta.require("stream"),Sv=import.meta.require("util"),Qv=CY(),BY="The stream has already been transformed.",Hv=(D)=>{var F,E;if(!(D instanceof bf.Readable))try{return Qv.sdkStreamMixin(D)}catch(C){const f=((E=(F=D===null||D===void 0?void 0:D.__proto__)===null||F===void 0?void 0:F.constructor)===null||E===void 0?void 0:E.name)||D;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${f}`)}let w=!1;const $=async()=>{if(w)throw new Error(BY);return w=!0,await Tv.streamCollector(D)};return Object.assign(D,{transformToByteArray:$,transformToString:async(C)=>{const f=await $();if(C===void 0||Buffer.isEncoding(C))return Kv.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString(C);else return new Sv.TextDecoder(C).decode(f)},transformToWebStream:()=>{if(w)throw new Error(BY);if(D.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof bf.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,bf.Readable.toWeb(D)}})};hY.sdkStreamMixin=Hv});var GY=W((IY)=>{async function Lv(D){if(typeof D.stream==="function")D=D.stream();return D.tee()}Object.defineProperty(IY,"__esModule",{value:!0});IY.splitStream=void 0;IY.splitStream=Lv});var XY=W((ZY)=>{async function Nv(D){if(Vv.isReadableStream(D))return Rv.splitStream(D);const F=new YY.PassThrough,E=new YY.PassThrough;return D.pipe(F),D.pipe(E),[F,E]}Object.defineProperty(ZY,"__esModule",{value:!0});ZY.splitStream=void 0;var YY=import.meta.require("stream"),Rv=GY(),Vv=mF();ZY.splitStream=Nv});var TY=W((JY)=>{async function qv(D,F){var E;let w=0;const $=[],C=D.getReader();let f=!1;while(!f){const{done:U,value:I}=await C.read();if(I)$.push(I),w+=(E=I===null||I===void 0?void 0:I.byteLength)!==null&&E!==void 0?E:0;if(w>=F)break;f=U}C.releaseLock();const B=new Uint8Array(Math.min(F,w));let h=0;for(let U of $){if(U.byteLength>B.byteLength-h){B.set(U.subarray(0,B.byteLength-h),h);break}else B.set(U,h);h+=U.length}return B}Object.defineProperty(JY,"__esModule",{value:!0});JY.headStream=void 0;JY.headStream=qv});var HY=W((SY)=>{Object.defineProperty(SY,"__esModule",{value:!0});SY.headStream=void 0;var Ov=import.meta.require("stream"),jv=TY(),Pv=mF(),yv=(D,F)=>{if(Pv.isReadableStream(D))return jv.headStream(D,F);return new Promise((E,w)=>{const $=new KY;$.limit=F,D.pipe($),D.on("error",(C)=>{$.end(),w(C)}),$.on("error",w),$.on("finish",function(){const C=new Uint8Array(Buffer.concat(this.buffers));E(C)})})};SY.headStream=yv;class KY extends Ov.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(D,F,E){var w;if(this.buffers.push(D),this.bytesBuffered+=(w=D.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const $=this.bytesBuffered-this.limit,C=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=C.subarray(0,C.byteLength-$),this.emit("finish")}E()}}});var OY=W((AfD,i8)=>{function VY(D,F="utf-8"){if(F==="base64")return LY.toBase64(D);return RY.toUtf8(D)}function NY(D,F){if(F==="base64")return cf.mutate(LY.fromBase64(D));return cf.mutate(RY.fromUtf8(D))}var{defineProperty:Bw,getOwnPropertyDescriptor:kv,getOwnPropertyNames:bv}=Object,xv=Object.prototype.hasOwnProperty,gf=(D,F)=>Bw(D,"name",{value:F,configurable:!0}),cv=(D,F)=>{for(var E in F)Bw(D,E,{get:F[E],enumerable:!0})},xf=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of bv(F))if(!xv.call(D,$)&&$!==E)Bw(D,$,{get:()=>F[$],enumerable:!(w=kv(F,$))||w.enumerable})}return D},nF=(D,F,E)=>(xf(D,F,"default"),E&&xf(E,F,"default")),gv=(D)=>xf(Bw({},"__esModule",{value:!0}),D),l8={};cv(l8,{Uint8ArrayBlobAdapter:()=>cf});i8.exports=gv(l8);var LY=Fw(),RY=f8();gf(VY,"transformToString");gf(NY,"transformFromString");var qY=class D extends Uint8Array{static fromString(F,E="utf-8"){switch(typeof F){case"string":return NY(F,E);default:throw new Error(`Unsupported conversion from ${typeof F} to Uint8ArrayBlobAdapter.`)}}static mutate(F){return Object.setPrototypeOf(F,D.prototype),F}transformToString(F="utf-8"){return VY(this,F)}};gf(qY,"Uint8ArrayBlobAdapter");var cf=qY;nF(l8,MG(),i8.exports);nF(l8,AY(),i8.exports);nF(l8,XY(),i8.exports);nF(l8,HY(),i8.exports);nF(l8,mF(),i8.exports)});var q6=W((IfD,DZ)=>{function dY(D){const F=D.getUTCFullYear(),E=D.getUTCMonth(),w=D.getUTCDay(),$=D.getUTCDate(),C=D.getUTCHours(),f=D.getUTCMinutes(),B=D.getUTCSeconds(),h=$<10?`0${$}`:`${$}`,U=C<10?`0${C}`:`${C}`,I=f<10?`0${f}`:`${f}`,A=B<10?`0${B}`:`${B}`;return`${Im[w]}, ${h} ${af[E]} ${F} ${U}:${I}:${A} GMT`}function Aw(D){return encodeURIComponent(D).replace(/[!'()*]/g,function(F){return"%"+F.charCodeAt(0).toString(16).toUpperCase()})}function of(D,F,E){let w,$,C;if(typeof F==="undefined"&&typeof E==="undefined")w={},C=D;else if(w=D,typeof F==="function")return $=F,C=E,nm(w,$,C);else C=F;for(let f of Object.keys(C)){if(!Array.isArray(C[f])){w[f]=C[f];continue}oY(w,null,C,f)}return w}function tY(D){if(D.includes(",")||D.includes('"'))D=`"${D.replace(/"/g,'\\"')}"`;return D}function eY(D,F,E){if(E<=0||!Number.isInteger(E))throw new Error("Invalid number of delimiters ("+E+") for splitEvery.");const w=D.split(F);if(E===1)return w;const $=[];let C="";for(let f=0;f<w.length;f++){if(C==="")C=w[f];else C+=F+w[f];if((f+1)%E===0)$.push(C),C=""}if(C!=="")$.push(C);return $}var{defineProperty:Iw,getOwnPropertyDescriptor:rv,getOwnPropertyNames:_v}=Object,sv=Object.prototype.hasOwnProperty,R=(D,F)=>Iw(D,"name",{value:F,configurable:!0}),uv=(D,F)=>{for(var E in F)Iw(D,E,{get:F[E],enumerable:!0})},dv=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of _v(F))if(!sv.call(D,$)&&$!==E)Iw(D,$,{get:()=>F[$],enumerable:!(w=rv(F,$))||w.enumerable})}return D},vv=(D)=>dv(Iw({},"__esModule",{value:!0}),D),PY={};uv(PY,{Client:()=>mv,Command:()=>xY,LazyJsonString:()=>um,NoOpLogger:()=>dm,SENSITIVE_STRING:()=>iv,ServiceException:()=>qm,StringWrapper:()=>oF,_json:()=>mf,collectBody:()=>nv,convertMap:()=>vm,createAggregatedClient:()=>pv,dateToUtcString:()=>dY,decorateServiceException:()=>mY,emitWarningIfUnsupportedVersion:()=>ym,expectBoolean:()=>ov,expectByte:()=>vf,expectFloat32:()=>hw,expectInt:()=>ev,expectInt32:()=>uf,expectLong:()=>pF,expectNonNull:()=>Fm,expectNumber:()=>iF,expectObject:()=>gY,expectShort:()=>df,expectString:()=>Em,expectUnion:()=>wm,extendedEncodeURIComponent:()=>Aw,getArrayIfSingleItem:()=>_m,getDefaultClientConfiguration:()=>gm,getDefaultExtensionConfiguration:()=>lY,getValueFromTextNode:()=>iY,handleFloat:()=>Cm,isSerializableHeaderValue:()=>sm,limitedParseDouble:()=>pf,limitedParseFloat:()=>Bm,limitedParseFloat32:()=>hm,loadConfigsForDefaultMode:()=>Pm,logger:()=>aF,map:()=>of,parseBoolean:()=>av,parseEpochTimestamp:()=>Tm,parseRfc3339DateTime:()=>Gm,parseRfc3339DateTimeWithOffset:()=>Zm,parseRfc7231DateTime:()=>zm,quoteHeader:()=>tY,resolveDefaultRuntimeConfig:()=>rm,resolvedPath:()=>pm,serializeDateTime:()=>om,serializeFloat:()=>am,splitEvery:()=>eY,splitHeader:()=>tm,strictParseByte:()=>uY,strictParseDouble:()=>lf,strictParseFloat:()=>$m,strictParseFloat32:()=>rY,strictParseInt:()=>Um,strictParseInt32:()=>Am,strictParseLong:()=>sY,strictParseShort:()=>R6,take:()=>mm,throwDefaultError:()=>nY,withBaseException:()=>Om});DZ.exports=vv(PY);var yY=nM(),kY=class D{constructor(F){this.config=F,this.middlewareStack=yY.constructStack()}send(F,E,w){const $=typeof E!=="function"?E:void 0,C=typeof E==="function"?E:w,f=$===void 0&&this.config.cacheMiddleware===!0;let B;if(f){if(!this.handlers)this.handlers=new WeakMap;const h=this.handlers;if(h.has(F.constructor))B=h.get(F.constructor);else B=F.resolveMiddleware(this.middlewareStack,this.config,$),h.set(F.constructor,B)}else delete this.handlers,B=F.resolveMiddleware(this.middlewareStack,this.config,$);if(C)B(F).then((h)=>C(null,h.output),(h)=>C(h)).catch(()=>{});else return B(F).then((h)=>h.output)}destroy(){var F,E,w;(w=(E=(F=this.config)==null?void 0:F.requestHandler)==null?void 0:E.destroy)==null||w.call(E),delete this.handlers}};R(kY,"Client");var mv=kY,rf=OY(),nv=R(async(D=new Uint8Array,F)=>{if(D instanceof Uint8Array)return rf.Uint8ArrayBlobAdapter.mutate(D);if(!D)return rf.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const E=F.streamCollector(D);return rf.Uint8ArrayBlobAdapter.mutate(await E)},"collectBody"),sf=J0(),bY=class D{constructor(){this.middlewareStack=yY.constructStack()}static classBuilder(){return new lv}resolveMiddlewareWithContext(F,E,w,{middlewareFn:$,clientName:C,commandName:f,inputFilterSensitiveLog:B,outputFilterSensitiveLog:h,smithyContext:U,additionalContext:I,CommandCtor:A}){for(let X of $.bind(this)(A,F,E,w))this.middlewareStack.use(X);const Y=F.concat(this.middlewareStack),{logger:M}=E,Z={logger:M,clientName:C,commandName:f,inputFilterSensitiveLog:B,outputFilterSensitiveLog:h,[sf.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...I},{requestHandler:z}=E;return Y.resolve((X)=>z.handle(X.request,w||{}),Z)}};R(bY,"Command");var xY=bY,cY=class D{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(F)=>F,this._outputFilterSensitiveLog=(F)=>F,this._serializer=null,this._deserializer=null}init(F){this._init=F}ep(F){return this._ep=F,this}m(F){return this._middlewareFn=F,this}s(F,E,w={}){return this._smithyContext={service:F,operation:E,...w},this}c(F={}){return this._additionalContext=F,this}n(F,E){return this._clientName=F,this._commandName=E,this}f(F=(w)=>w,E=(w)=>w){return this._inputFilterSensitiveLog=F,this._outputFilterSensitiveLog=E,this}ser(F){return this._serializer=F,this}de(F){return this._deserializer=F,this}build(){var F;const E=this;let w;return w=(F=class extends xY{constructor(...[$]){super();this.serialize=E._serializer,this.deserialize=E._deserializer,this.input=$??{},E._init(this)}static getEndpointParameterInstructions(){return E._ep}resolveMiddleware($,C,f){return this.resolveMiddlewareWithContext($,C,f,{CommandCtor:w,middlewareFn:E._middlewareFn,clientName:E._clientName,commandName:E._commandName,inputFilterSensitiveLog:E._inputFilterSensitiveLog,outputFilterSensitiveLog:E._outputFilterSensitiveLog,smithyContext:E._smithyContext,additionalContext:E._additionalContext})}},R(F,"CommandRef"),F)}};R(cY,"ClassBuilder");var lv=cY,iv="***SensitiveInformation***",pv=R((D,F)=>{for(let E of Object.keys(D)){const w=D[E],$=R(async function(f,B,h){const U=new w(f);if(typeof B==="function")this.send(U,B);else if(typeof h==="function"){if(typeof B!=="object")throw new Error(`Expected http options but got ${typeof B}`);this.send(U,B||{},h)}else return this.send(U,B)},"methodImpl"),C=(E[0].toLowerCase()+E.slice(1)).replace(/Command$/,"");F.prototype[C]=$}},"createAggregatedClient"),av=R((D)=>{switch(D){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${D}"`)}},"parseBoolean"),ov=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="number"){if(D===0||D===1)aF.warn(Uw(`Expected boolean, got ${typeof D}: ${D}`));if(D===0)return!1;if(D===1)return!0}if(typeof D==="string"){const F=D.toLowerCase();if(F==="false"||F==="true")aF.warn(Uw(`Expected boolean, got ${typeof D}: ${D}`));if(F==="false")return!1;if(F==="true")return!0}if(typeof D==="boolean")return D;throw new TypeError(`Expected boolean, got ${typeof D}: ${D}`)},"expectBoolean"),iF=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="string"){const F=parseFloat(D);if(!Number.isNaN(F)){if(String(F)!==String(D))aF.warn(Uw(`Expected number but observed string: ${D}`));return F}}if(typeof D==="number")return D;throw new TypeError(`Expected number, got ${typeof D}: ${D}`)},"expectNumber"),tv=Math.ceil(340282346638528860000000000000000000000),hw=R((D)=>{const F=iF(D);if(F!==void 0&&!Number.isNaN(F)&&F!==1/0&&F!==-1/0){if(Math.abs(F)>tv)throw new TypeError(`Expected 32-bit float, got ${D}`)}return F},"expectFloat32"),pF=R((D)=>{if(D===null||D===void 0)return;if(Number.isInteger(D)&&!Number.isNaN(D))return D;throw new TypeError(`Expected integer, got ${typeof D}: ${D}`)},"expectLong"),ev=pF,uf=R((D)=>nf(D,32),"expectInt32"),df=R((D)=>nf(D,16),"expectShort"),vf=R((D)=>nf(D,8),"expectByte"),nf=R((D,F)=>{const E=pF(D);if(E!==void 0&&Dm(E,F)!==E)throw new TypeError(`Expected ${F}-bit integer, got ${D}`);return E},"expectSizedInt"),Dm=R((D,F)=>{switch(F){case 32:return Int32Array.of(D)[0];case 16:return Int16Array.of(D)[0];case 8:return Int8Array.of(D)[0]}},"castInt"),Fm=R((D,F)=>{if(D===null||D===void 0){if(F)throw new TypeError(`Expected a non-null value for ${F}`);throw new TypeError("Expected a non-null value")}return D},"expectNonNull"),gY=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="object"&&!Array.isArray(D))return D;const F=Array.isArray(D)?"array":typeof D;throw new TypeError(`Expected object, got ${F}: ${D}`)},"expectObject"),Em=R((D)=>{if(D===null||D===void 0)return;if(typeof D==="string")return D;if(["boolean","number","bigint"].includes(typeof D))return aF.warn(Uw(`Expected string, got ${typeof D}: ${D}`)),String(D);throw new TypeError(`Expected string, got ${typeof D}: ${D}`)},"expectString"),wm=R((D)=>{if(D===null||D===void 0)return;const F=gY(D),E=Object.entries(F).filter(([,w])=>w!=null).map(([w])=>w);if(E.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(E.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${E} were not null.`);return F},"expectUnion"),lf=R((D)=>{if(typeof D=="string")return iF(N6(D));return iF(D)},"strictParseDouble"),$m=lf,rY=R((D)=>{if(typeof D=="string")return hw(N6(D));return hw(D)},"strictParseFloat32"),fm=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,N6=R((D)=>{const F=D.match(fm);if(F===null||F[0].length!==D.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(D)},"parseNumber"),pf=R((D)=>{if(typeof D=="string")return _Y(D);return iF(D)},"limitedParseDouble"),Cm=pf,Bm=pf,hm=R((D)=>{if(typeof D=="string")return _Y(D);return hw(D)},"limitedParseFloat32"),_Y=R((D)=>{switch(D){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${D}`)}},"parseFloatString"),sY=R((D)=>{if(typeof D==="string")return pF(N6(D));return pF(D)},"strictParseLong"),Um=sY,Am=R((D)=>{if(typeof D==="string")return uf(N6(D));return uf(D)},"strictParseInt32"),R6=R((D)=>{if(typeof D==="string")return df(N6(D));return df(D)},"strictParseShort"),uY=R((D)=>{if(typeof D==="string")return vf(N6(D));return vf(D)},"strictParseByte"),Uw=R((D)=>{return String(new TypeError(D).stack||D).split("\n").slice(0,5).filter((F)=>!F.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),aF={warn:console.warn},Im=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],af=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];R(dY,"dateToUtcString");var Mm=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Gm=R((D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=Mm.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U]=F,I=R6(V6(w)),A=c2($,"month",1,12),Y=c2(C,"day",1,31);return lF(I,A,Y,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U})},"parseRfc3339DateTime"),Ym=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Zm=R((D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=Ym.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U,I]=F,A=R6(V6(w)),Y=c2($,"month",1,12),M=c2(C,"day",1,31),Z=lF(A,Y,M,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U});if(I.toUpperCase()!="Z")Z.setTime(Z.getTime()-Nm(I));return Z},"parseRfc3339DateTimeWithOffset"),Wm=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Xm=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Jm=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),zm=R((D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let F=Wm.exec(D);if(F){const[E,w,$,C,f,B,h,U]=F;return lF(R6(V6(C)),_f($),c2(w,"day",1,31),{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U})}if(F=Xm.exec(D),F){const[E,w,$,C,f,B,h,U]=F;return Qm(lF(Km(C),_f($),c2(w,"day",1,31),{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U}))}if(F=Jm.exec(D),F){const[E,w,$,C,f,B,h,U]=F;return lF(R6(V6(U)),_f(w),c2($.trimLeft(),"day",1,31),{hours:C,minutes:f,seconds:B,fractionalMilliseconds:h})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),Tm=R((D)=>{if(D===null||D===void 0)return;let F;if(typeof D==="number")F=D;else if(typeof D==="string")F=lf(D);else if(typeof D==="object"&&D.tag===1)F=D.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(F)||F===1/0||F===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(F*1000))},"parseEpochTimestamp"),lF=R((D,F,E,w)=>{const $=F-1;return Lm(D,$,E),new Date(Date.UTC(D,$,E,c2(w.hours,"hour",0,23),c2(w.minutes,"minute",0,59),c2(w.seconds,"seconds",0,60),Vm(w.fractionalMilliseconds)))},"buildDate"),Km=R((D)=>{const F=new Date().getUTCFullYear(),E=Math.floor(F/100)*100+R6(V6(D));if(E<F)return E+100;return E},"parseTwoDigitYear"),Sm=1576800000000,Qm=R((D)=>{if(D.getTime()-new Date().getTime()>Sm)return new Date(Date.UTC(D.getUTCFullYear()-100,D.getUTCMonth(),D.getUTCDate(),D.getUTCHours(),D.getUTCMinutes(),D.getUTCSeconds(),D.getUTCMilliseconds()));return D},"adjustRfc850Year"),_f=R((D)=>{const F=af.indexOf(D);if(F<0)throw new TypeError(`Invalid month: ${D}`);return F+1},"parseMonthByShortName"),Hm=[31,28,31,30,31,30,31,31,30,31,30,31],Lm=R((D,F,E)=>{let w=Hm[F];if(F===1&&Rm(D))w=29;if(E>w)throw new TypeError(`Invalid day for ${af[F]} in ${D}: ${E}`)},"validateDayOfMonth"),Rm=R((D)=>{return D%4===0&&(D%100!==0||D%400===0)},"isLeapYear"),c2=R((D,F,E,w)=>{const $=uY(V6(D));if($<E||$>w)throw new TypeError(`${F} must be between ${E} and ${w}, inclusive`);return $},"parseDateValue"),Vm=R((D)=>{if(D===null||D===void 0)return 0;return rY("0."+D)*1000},"parseMilliseconds"),Nm=R((D)=>{const F=D[0];let E=1;if(F=="+")E=1;else if(F=="-")E=-1;else throw new TypeError(`Offset direction, ${F}, must be "+" or "-"`);const w=Number(D.substring(1,3)),$=Number(D.substring(4,6));return E*(w*60+$)*60*1000},"parseOffsetToMilliseconds"),V6=R((D)=>{let F=0;while(F<D.length-1&&D.charAt(F)==="0")F++;if(F===0)return D;return D.slice(F)},"stripLeadingZeroes"),vY=class D extends Error{constructor(F){super(F.message);Object.setPrototypeOf(this,D.prototype),this.name=F.name,this.$fault=F.$fault,this.$metadata=F.$metadata}};R(vY,"ServiceException");var qm=vY,mY=R((D,F={})=>{Object.entries(F).filter(([,w])=>w!==void 0).forEach(([w,$])=>{if(D[w]==null||D[w]==="")D[w]=$});const E=D.message||D.Message||"UnknownError";return D.message=E,delete D.Message,D},"decorateServiceException"),nY=R(({output:D,parsedBody:F,exceptionCtor:E,errorCode:w})=>{const $=jm(D),C=$.httpStatusCode?$.httpStatusCode+"":void 0,f=new E({name:(F==null?void 0:F.code)||(F==null?void 0:F.Code)||w||C||"UnknownError",$fault:"client",$metadata:$});throw mY(f,F)},"throwDefaultError"),Om=R((D)=>{return({output:F,parsedBody:E,errorCode:w})=>{nY({output:F,parsedBody:E,exceptionCtor:D,errorCode:w})}},"withBaseException"),jm=R((D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),"deserializeMetadata"),Pm=R((D)=>{switch(D){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),jY=!1,ym=R((D)=>{if(D&&!jY&&parseInt(D.substring(1,D.indexOf(".")))<16)jY=!0},"emitWarningIfUnsupportedVersion");R(Aw,"extendedEncodeURIComponent");var km=R((D)=>{const F=[];for(let E in sf.AlgorithmId){const w=sf.AlgorithmId[E];if(D[w]===void 0)continue;F.push({algorithmId:()=>w,checksumConstructor:()=>D[w]})}return{_checksumAlgorithms:F,addChecksumAlgorithm(E){this._checksumAlgorithms.push(E)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),bm=R((D)=>{const F={};return D.checksumAlgorithms().forEach((E)=>{F[E.algorithmId()]=E.checksumConstructor()}),F},"resolveChecksumRuntimeConfig"),xm=R((D)=>{let F=D.retryStrategy;return{setRetryStrategy(E){F=E},retryStrategy(){return F}}},"getRetryConfiguration"),cm=R((D)=>{const F={};return F.retryStrategy=D.retryStrategy(),F},"resolveRetryRuntimeConfig"),lY=R((D)=>{return{...km(D),...xm(D)}},"getDefaultExtensionConfiguration"),gm=lY,rm=R((D)=>{return{...bm(D),...cm(D)}},"resolveDefaultRuntimeConfig"),_m=R((D)=>Array.isArray(D)?D:[D],"getArrayIfSingleItem"),iY=R((D)=>{for(let E in D)if(D.hasOwnProperty(E)&&D[E]["#text"]!==void 0)D[E]=D[E]["#text"];else if(typeof D[E]==="object"&&D[E]!==null)D[E]=iY(D[E]);return D},"getValueFromTextNode"),sm=R((D)=>{return D!=null},"isSerializableHeaderValue"),oF=R(function(){const D=Object.getPrototypeOf(this).constructor,E=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(E,D.prototype),E},"StringWrapper");oF.prototype=Object.create(String.prototype,{constructor:{value:oF,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(oF,String);var pY=class D extends oF{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(F){if(F instanceof D)return F;else if(F instanceof String||typeof F==="string")return new D(F);return new D(JSON.stringify(F))}};R(pY,"LazyJsonString");var um=pY,aY=class D{trace(){}debug(){}info(){}warn(){}error(){}};R(aY,"NoOpLogger");var dm=aY;R(of,"map");var vm=R((D)=>{const F={};for(let[E,w]of Object.entries(D||{}))F[E]=[,w];return F},"convertMap"),mm=R((D,F)=>{const E={};for(let w in F)oY(E,D,F,w);return E},"take"),nm=R((D,F,E)=>{return of(D,Object.entries(E).reduce((w,[$,C])=>{if(Array.isArray(C))w[$]=C;else if(typeof C==="function")w[$]=[F,C()];else w[$]=[F,C];return w},{}))},"mapWithFilter"),oY=R((D,F,E,w)=>{if(F!==null){let f=E[w];if(typeof f==="function")f=[,f];const[B=lm,h=im,U=w]=f;if(typeof B==="function"&&B(F[U])||typeof B!=="function"&&!!B)D[w]=h(F[U]);return}let[$,C]=E[w];if(typeof C==="function"){let f;const B=$===void 0&&(f=C())!=null,h=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(B)D[w]=f;else if(h)D[w]=C()}else{const f=$===void 0&&C!=null,B=typeof $==="function"&&!!$(C)||typeof $!=="function"&&!!$;if(f||B)D[w]=C}},"applyInstruction"),lm=R((D)=>D!=null,"nonNullish"),im=R((D)=>D,"pass");R(tY,"quoteHeader");var pm=R((D,F,E,w,$,C)=>{if(F!=null&&F[E]!==void 0){const f=w();if(f.length<=0)throw new Error("Empty value provided for input HTTP label: "+E+".");D=D.replace($,C?f.split("/").map((B)=>Aw(B)).join("/"):Aw(f))}else throw new Error("No value provided for input HTTP label: "+E+".");return D},"resolvedPath"),am=R((D)=>{if(D!==D)return"NaN";switch(D){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return D}},"serializeFloat"),om=R((D)=>D.toISOString().replace(".000Z","Z"),"serializeDateTime"),mf=R((D)=>{if(D==null)return{};if(Array.isArray(D))return D.filter((F)=>F!=null).map(mf);if(typeof D==="object"){const F={};for(let E of Object.keys(D)){if(D[E]==null)continue;F[E]=mf(D[E])}return F}return D},"_json");R(eY,"splitEvery");var tm=R((D)=>{const F=D.length,E=[];let w=!1,$=void 0,C=0;for(let f=0;f<F;++f){const B=D[f];switch(B){case'"':if($!=="\\")w=!w;break;case",":if(!w)E.push(D.slice(C,f)),C=f+1;break;default:}$=B}return E.push(D.slice(C)),E.map((f)=>{f=f.trim();const B=f.length;if(B<2)return f;if(f[0]==='"'&&f[B-1]==='"')f=f.slice(1,B-1);return f.replace(/\\"/g,'"')})},"splitHeader")});var wZ=W((FZ)=>{Object.defineProperty(FZ,"__esModule",{value:!0});FZ.isStreamingPayload=void 0;var em=import.meta.require("stream"),Dn=(D)=>(D===null||D===void 0?void 0:D.body)instanceof em.Readable||typeof ReadableStream!=="undefined"&&(D===null||D===void 0?void 0:D.body)instanceof ReadableStream;FZ.isStreamingPayload=Dn});var KZ=W((YfD,TZ)=>{var{defineProperty:Mw,getOwnPropertyDescriptor:Fn,getOwnPropertyNames:En}=Object,wn=Object.prototype.hasOwnProperty,xD=(D,F)=>Mw(D,"name",{value:F,configurable:!0}),$n=(D,F)=>{for(var E in F)Mw(D,E,{get:F[E],enumerable:!0})},fn=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of En(F))if(!wn.call(D,$)&&$!==E)Mw(D,$,{get:()=>F[$],enumerable:!(w=Fn(F,$))||w.enumerable})}return D},Cn=(D)=>fn(Mw({},"__esModule",{value:!0}),D),fZ={};$n(fZ,{AdaptiveRetryStrategy:()=>Un,CONFIG_MAX_ATTEMPTS:()=>ef,CONFIG_RETRY_MODE:()=>YZ,ENV_MAX_ATTEMPTS:()=>tf,ENV_RETRY_MODE:()=>GZ,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>An,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>Mn,StandardRetryStrategy:()=>IZ,defaultDelayDecider:()=>BZ,defaultRetryDecider:()=>hZ,getOmitRetryHeadersPlugin:()=>Gn,getRetryAfterHint:()=>zZ,getRetryPlugin:()=>zn,omitRetryHeadersMiddleware:()=>ZZ,omitRetryHeadersMiddlewareOptions:()=>WZ,resolveRetryConfig:()=>In,retryMiddleware:()=>XZ,retryMiddlewareOptions:()=>JZ});TZ.exports=Cn(fZ);var O6=H1(),CZ=Zf(),HD=sM(),Bn=xD((D,F)=>{const E=D,w=(F==null?void 0:F.noRetryIncrement)??HD.NO_RETRY_INCREMENT,$=(F==null?void 0:F.retryCost)??HD.RETRY_COST,C=(F==null?void 0:F.timeoutRetryCost)??HD.TIMEOUT_RETRY_COST;let f=D;const B=xD((A)=>A.name==="TimeoutError"?C:$,"getCapacityAmount"),h=xD((A)=>B(A)<=f,"hasRetryTokens");return Object.freeze({hasRetryTokens:h,retrieveRetryTokens:xD((A)=>{if(!h(A))throw new Error("No retry token available");const Y=B(A);return f-=Y,Y},"retrieveRetryTokens"),releaseRetryTokens:xD((A)=>{f+=A??w,f=Math.min(f,E)},"releaseRetryTokens")})},"getDefaultRetryQuota"),BZ=xD((D,F)=>Math.floor(Math.min(HD.MAXIMUM_RETRY_DELAY,Math.random()*2**F*D)),"defaultDelayDecider"),C8=Wf(),hZ=xD((D)=>{if(!D)return!1;return C8.isRetryableByTrait(D)||C8.isClockSkewError(D)||C8.isThrottlingError(D)||C8.isTransientError(D)},"defaultRetryDecider"),UZ=xD((D)=>{if(D instanceof Error)return D;if(D instanceof Object)return Object.assign(new Error,D);if(typeof D==="string")return new Error(D);return new Error(`AWS SDK error wrapper for ${D}`)},"asSdkError"),AZ=class D{constructor(F,E){this.maxAttemptsProvider=F,this.mode=HD.RETRY_MODES.STANDARD,this.retryDecider=(E==null?void 0:E.retryDecider)??hZ,this.delayDecider=(E==null?void 0:E.delayDecider)??BZ,this.retryQuota=(E==null?void 0:E.retryQuota)??Bn(HD.INITIAL_RETRY_TOKENS)}shouldRetry(F,E,w){return E<w&&this.retryDecider(F)&&this.retryQuota.hasRetryTokens(F)}async getMaxAttempts(){let F;try{F=await this.maxAttemptsProvider()}catch(E){F=HD.DEFAULT_MAX_ATTEMPTS}return F}async retry(F,E,w){let $,C=0,f=0;const B=await this.getMaxAttempts(),{request:h}=E;if(O6.HttpRequest.isInstance(h))h.headers[HD.INVOCATION_ID_HEADER]=CZ.v4();while(!0)try{if(O6.HttpRequest.isInstance(h))h.headers[HD.REQUEST_HEADER]=`attempt=${C+1}; max=${B}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:I}=await F(E);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens($),I.$metadata.attempts=C+1,I.$metadata.totalRetryDelay=f,{response:U,output:I}}catch(U){const I=UZ(U);if(C++,this.shouldRetry(I,C,B)){$=this.retryQuota.retrieveRetryTokens(I);const A=this.delayDecider(C8.isThrottlingError(I)?HD.THROTTLING_RETRY_DELAY_BASE:HD.DEFAULT_RETRY_DELAY_BASE,C),Y=hn(I.$response),M=Math.max(Y||0,A);f+=M,await new Promise((Z)=>setTimeout(Z,M));continue}if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=C,I.$metadata.totalRetryDelay=f,I}}};xD(AZ,"StandardRetryStrategy");var IZ=AZ,hn=xD((D)=>{if(!O6.HttpResponse.isInstance(D))return;const F=Object.keys(D.headers).find((C)=>C.toLowerCase()==="retry-after");if(!F)return;const E=D.headers[F],w=Number(E);if(!Number.isNaN(w))return w*1000;return new Date(E).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),MZ=class D extends IZ{constructor(F,E){const{rateLimiter:w,...$}=E??{};super(F,$);this.rateLimiter=w??new HD.DefaultRateLimiter,this.mode=HD.RETRY_MODES.ADAPTIVE}async retry(F,E){return super.retry(F,E,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};xD(MZ,"AdaptiveRetryStrategy");var Un=MZ,$Z=xF(),tf="AWS_MAX_ATTEMPTS",ef="max_attempts",An={environmentVariableSelector:(D)=>{const F=D[tf];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Environment variable ${tf} mast be a number, got "${F}"`);return E},configFileSelector:(D)=>{const F=D[ef];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Shared config file entry ${ef} mast be a number, got "${F}"`);return E},default:HD.DEFAULT_MAX_ATTEMPTS},In=xD((D)=>{const{retryStrategy:F}=D,E=$Z.normalizeProvider(D.maxAttempts??HD.DEFAULT_MAX_ATTEMPTS);return{...D,maxAttempts:E,retryStrategy:async()=>{if(F)return F;if(await $Z.normalizeProvider(D.retryMode)()===HD.RETRY_MODES.ADAPTIVE)return new HD.AdaptiveRetryStrategy(E);return new HD.StandardRetryStrategy(E)}}},"resolveRetryConfig"),GZ="AWS_RETRY_MODE",YZ="retry_mode",Mn={environmentVariableSelector:(D)=>D[GZ],configFileSelector:(D)=>D[YZ],default:HD.DEFAULT_RETRY_MODE},ZZ=xD(()=>(D)=>async(F)=>{const{request:E}=F;if(O6.HttpRequest.isInstance(E))delete E.headers[HD.INVOCATION_ID_HEADER],delete E.headers[HD.REQUEST_HEADER];return D(F)},"omitRetryHeadersMiddleware"),WZ={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Gn=xD((D)=>({applyToStack:(F)=>{F.addRelativeTo(ZZ(),WZ)}}),"getOmitRetryHeadersPlugin"),Yn=q6(),Zn=wZ(),XZ=xD((D)=>(F,E)=>async(w)=>{var $;let C=await D.retryStrategy();const f=await D.maxAttempts();if(Wn(C)){C=C;let B=await C.acquireInitialRetryToken(E.partition_id),h=new Error,U=0,I=0;const{request:A}=w,Y=O6.HttpRequest.isInstance(A);if(Y)A.headers[HD.INVOCATION_ID_HEADER]=CZ.v4();while(!0)try{if(Y)A.headers[HD.REQUEST_HEADER]=`attempt=${U+1}; max=${f}`;const{response:M,output:Z}=await F(w);return C.recordSuccess(B),Z.$metadata.attempts=U+1,Z.$metadata.totalRetryDelay=I,{response:M,output:Z}}catch(M){const Z=Xn(M);if(h=UZ(M),Y&&Zn.isStreamingPayload(A))throw($=E.logger instanceof Yn.NoOpLogger?console:E.logger)==null||$.warn("An error was encountered in a non-retryable streaming request."),h;try{B=await C.refreshRetryTokenForRetry(B,Z)}catch(X){if(!h.$metadata)h.$metadata={};throw h.$metadata.attempts=U+1,h.$metadata.totalRetryDelay=I,h}U=B.getRetryCount();const z=B.getRetryDelay();I+=z,await new Promise((X)=>setTimeout(X,z))}}else{if(C=C,C==null?void 0:C.mode)E.userAgent=[...E.userAgent||[],["cfg/retry-mode",C.mode]];return C.retry(F,w)}},"retryMiddleware"),Wn=xD((D)=>typeof D.acquireInitialRetryToken!=="undefined"&&typeof D.refreshRetryTokenForRetry!=="undefined"&&typeof D.recordSuccess!=="undefined","isRetryStrategyV2"),Xn=xD((D)=>{const F={error:D,errorType:Jn(D)},E=zZ(D.$response);if(E)F.retryAfterHint=E;return F},"getRetryErrorInfo"),Jn=xD((D)=>{if(C8.isThrottlingError(D))return"THROTTLING";if(C8.isTransientError(D))return"TRANSIENT";if(C8.isServerError(D))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),JZ={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},zn=xD((D)=>({applyToStack:(F)=>{F.add(XZ(D),JZ)}}),"getRetryPlugin"),zZ=xD((D)=>{if(!O6.HttpResponse.isInstance(D))return;const F=Object.keys(D.headers).find((C)=>C.toLowerCase()==="retry-after");if(!F)return;const E=D.headers[F],w=Number(E);if(!Number.isNaN(w))return new Date(w*1000);return new Date(E)},"getRetryAfterHint")});var _D=W((ZfD,_Z)=>{function HZ(D){const F=new Map;for(let E of D)F.set(E.schemeId,E);return F}function xZ(D,F){return new gZ(D,F)}function rZ(D,F,E,w,$){return JD(async function*C(f,B,...h){let U=f.startingToken||void 0,I=!0,A;while(I){if(B[E]=U,$)B[$]=B[$]??f.pageSize;if(f.client instanceof D)A=await dn(F,f.client,B,...h);else throw new Error(`Invalid client, expected instance of ${D.name}`);yield A;const Y=U;U=vn(A,w),I=!!(U&&(!f.stopOnSameToken||U!==Y))}return},"paginateOperation")}var{defineProperty:Yw,getOwnPropertyDescriptor:Tn,getOwnPropertyNames:Kn}=Object,Sn=Object.prototype.hasOwnProperty,JD=(D,F)=>Yw(D,"name",{value:F,configurable:!0}),Qn=(D,F)=>{for(var E in F)Yw(D,E,{get:F[E],enumerable:!0})},Hn=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Kn(F))if(!Sn.call(D,$)&&$!==E)Yw(D,$,{get:()=>F[$],enumerable:!(w=Tn(F,$))||w.enumerable})}return D},Ln=(D)=>Hn(Yw({},"__esModule",{value:!0}),D),SZ={};Qn(SZ,{DefaultIdentityProviderConfig:()=>kn,EXPIRATION_MS:()=>kZ,HttpApiKeyAuthSigner:()=>bn,HttpBearerAuthSigner:()=>xn,NoAuthSigner:()=>cn,RequestBuilder:()=>gZ,createIsIdentityExpiredFunction:()=>yZ,createPaginator:()=>rZ,doesIdentityRequireRefresh:()=>bZ,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Vn,getHttpAuthSchemePlugin:()=>qn,getHttpSigningPlugin:()=>yn,getSmithyContext:()=>_n,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>LZ,httpAuthSchemeMiddleware:()=>D9,httpAuthSchemeMiddlewareOptions:()=>RZ,httpSigningMiddleware:()=>VZ,httpSigningMiddlewareOptions:()=>NZ,isIdentityExpired:()=>gn,memoizeIdentityProvider:()=>rn,normalizeProvider:()=>sn,requestBuilder:()=>xZ});_Z.exports=Ln(SZ);var QZ=xF();JD(HZ,"convertHttpAuthSchemesToMap");var D9=JD((D,F)=>(E,w)=>async($)=>{var C;const f=D.httpAuthSchemeProvider(await F.httpAuthSchemeParametersProvider(D,w,$.input)),B=HZ(D.httpAuthSchemes),h=QZ.getSmithyContext(w),U=[];for(let I of f){const A=B.get(I.schemeId);if(!A){U.push(`HttpAuthScheme \`${I.schemeId}\` was not enabled for this service.`);continue}const Y=A.identityProvider(await F.identityProviderConfigProvider(D));if(!Y){U.push(`HttpAuthScheme \`${I.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:M={},signingProperties:Z={}}=((C=I.propertiesExtractor)==null?void 0:C.call(I,D,w))||{};I.identityProperties=Object.assign(I.identityProperties||{},M),I.signingProperties=Object.assign(I.signingProperties||{},Z),h.selectedHttpAuthScheme={httpAuthOption:I,identity:await Y(I.identityProperties),signer:A.signer};break}if(!h.selectedHttpAuthScheme)throw new Error(U.join("\n"));return E($)},"httpAuthSchemeMiddleware"),Rn=KI(),LZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Rn.endpointMiddlewareOptions.name},Vn=JD((D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E})=>({applyToStack:(w)=>{w.addRelativeTo(D9(D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E}),LZ)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Nn=Bf(),RZ={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Nn.serializerMiddlewareOption.name},qn=JD((D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E})=>({applyToStack:(w)=>{w.addRelativeTo(D9(D,{httpAuthSchemeParametersProvider:F,identityProviderConfigProvider:E}),RZ)}}),"getHttpAuthSchemePlugin"),Zw=H1(),On=JD((D)=>(F)=>{throw F},"defaultErrorHandler"),jn=JD((D,F)=>{},"defaultSuccessHandler"),VZ=JD((D)=>(F,E)=>async(w)=>{if(!Zw.HttpRequest.isInstance(w.request))return F(w);const C=QZ.getSmithyContext(E).selectedHttpAuthScheme;if(!C)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:f={}},identity:B,signer:h}=C,U=await F({...w,request:await h.sign(w.request,B,f)}).catch((h.errorHandler||On)(f));return(h.successHandler||jn)(U.response,f),U},"httpSigningMiddleware"),Pn=KZ(),NZ={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Pn.retryMiddlewareOptions.name},yn=JD((D)=>({applyToStack:(F)=>{F.addRelativeTo(VZ(D),NZ)}}),"getHttpSigningPlugin"),qZ=class D{constructor(F){this.authSchemes=new Map;for(let[E,w]of Object.entries(F))if(w!==void 0)this.authSchemes.set(E,w)}getIdentityProvider(F){return this.authSchemes.get(F)}};JD(qZ,"DefaultIdentityProviderConfig");var kn=qZ,Gw=J0(),OZ=class D{async sign(F,E,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!E.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const $=Zw.HttpRequest.clone(F);if(w.in===Gw.HttpApiKeyAuthLocation.QUERY)$.query[w.name]=E.apiKey;else if(w.in===Gw.HttpApiKeyAuthLocation.HEADER)$.headers[w.name]=w.scheme?`${w.scheme} ${E.apiKey}`:E.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return $}};JD(OZ,"HttpApiKeyAuthSigner");var bn=OZ,jZ=class D{async sign(F,E,w){const $=Zw.HttpRequest.clone(F);if(!E.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return $.headers.Authorization=`Bearer ${E.token}`,$}};JD(jZ,"HttpBearerAuthSigner");var xn=jZ,PZ=class D{async sign(F,E,w){return F}};JD(PZ,"NoAuthSigner");var cn=PZ,yZ=JD((D)=>(F)=>bZ(F)&&F.expiration.getTime()-Date.now()<D,"createIsIdentityExpiredFunction"),kZ=300000,gn=yZ(kZ),bZ=JD((D)=>D.expiration!==void 0,"doesIdentityRequireRefresh"),rn=JD((D,F,E)=>{if(D===void 0)return;const w=typeof D!=="function"?async()=>Promise.resolve(D):D;let $,C,f,B=!1;const h=JD(async(U)=>{if(!C)C=w(U);try{$=await C,f=!0,B=!1}finally{C=void 0}return $},"coalesceProvider");if(F===void 0)return async(U)=>{if(!f||(U==null?void 0:U.forceRefresh))$=await h(U);return $};return async(U)=>{if(!f||(U==null?void 0:U.forceRefresh))$=await h(U);if(B)return $;if(!E($))return B=!0,$;if(F($))return await h(U),$;return $}},"memoizeIdentityProvider"),_n=JD((D)=>D[Gw.SMITHY_CONTEXT_KEY]||(D[Gw.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),sn=JD((D)=>{if(typeof D==="function")return D;const F=Promise.resolve(D);return()=>F},"normalizeProvider"),un=q6();JD(xZ,"requestBuilder");var cZ=class D{constructor(F,E){this.input=F,this.context=E,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:F,protocol:E="https",port:w,path:$}=await this.context.endpoint();this.path=$;for(let C of this.resolvePathStack)C(this.path);return new Zw.HttpRequest({protocol:E,hostname:this.hostname||F,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(F){return this.hostname=F,this}bp(F){return this.resolvePathStack.push((E)=>{this.path=`${(E==null?void 0:E.endsWith("/"))?E.slice(0,-1):E||""}`+F}),this}p(F,E,w,$){return this.resolvePathStack.push((C)=>{this.path=un.resolvedPath(C,this.input,F,E,w,$)}),this}h(F){return this.headers=F,this}q(F){return this.query=F,this}b(F){return this.body=F,this}m(F){return this.method=F,this}};JD(cZ,"RequestBuilder");var gZ=cZ,dn=JD(async(D,F,E,...w)=>{return await F.send(new D(E),...w)},"makePagedClientRequest");JD(rZ,"createPaginator");var vn=JD((D,F)=>{let E=D;const w=F.split(".");for(let $ of w){if(!E||typeof E!=="object")return;E=E[$]}return E},"get")});function mn(D){if(D===void 0)return!0;return typeof D==="string"&&D.length<=50}function g2(D){const F=sZ.normalizeProvider(D.userAgentAppId??F9);return{...D,customUserAgent:typeof D.customUserAgent==="string"?[[D.customUserAgent]]:D.customUserAgent,userAgentAppId:async()=>{const E=await F();if(!mn(E)){const w=D.logger?.constructor?.name==="NoOpLogger"||!D.logger?console:D.logger;if(typeof E!=="string")w?.warn("userAgentAppId must be a string or undefined.");else if(E.length>50)w?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return E}}}var sZ,F9=void 0;var uZ=G(()=>{sZ=L(_D(),1)});class M2{constructor({size:D,params:F}){if(this.data=new Map,this.parameters=[],this.capacity=D??50,F)this.parameters=F}get(D,F){const E=this.hash(D);if(E===!1)return F();if(!this.data.has(E)){if(this.data.size>this.capacity+10){const w=this.data.keys();let $=0;while(!0){const{value:C,done:f}=w.next();if(this.data.delete(C),f||++$>10)break}}this.data.set(E,F())}return this.data.get(E)}size(){return this.data.size}hash(D){let F="";const{parameters:E}=this;if(E.length===0)return!1;for(let w of E){const $=String(D[w]??"");if($.includes("|;"))return!1;F+=$+"|;"}return F}}var nn,tF=(D)=>nn.test(D)||D.startsWith("[")&&D.endsWith("]");var E9=G(()=>{nn=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var ln,eF=(D,F=!1)=>{if(!F)return ln.test(D);const E=D.split(".");for(let w of E)if(!eF(w))return!1;return!0};var w9=G(()=>{ln=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var C0;var Ww=G(()=>{C0={}});var V1="endpoints";function d0(D){if(typeof D!=="object"||D==null)return D;if("ref"in D)return`\$${d0(D.ref)}`;if("fn"in D)return`${D.fn}(${(D.argv||[]).map(d0).join(", ")})`;return JSON.stringify(D,null,2)}var D3=()=>{};var ZD;var dZ=G(()=>{ZD=class ZD extends Error{constructor(D){super(D);this.name="EndpointError"}}});var vZ=()=>{};var mZ=()=>{};var nZ=()=>{};var lZ=()=>{};var iZ=()=>{};var pZ=()=>{};var v0=G(()=>{dZ();vZ();mZ();nZ();lZ();iZ();pZ()});var aZ=(D,F)=>D===F;var oZ=(D)=>{const F=D.split("."),E=[];for(let w of F){const $=w.indexOf("[");if($!==-1){if(w.indexOf("]")!==w.length-1)throw new ZD(`Path: '${D}' does not end with ']'`);const C=w.slice($+1,-1);if(Number.isNaN(parseInt(C)))throw new ZD(`Invalid array index: '${C}' in path: '${D}'`);if($!==0)E.push(w.slice(0,$));E.push(C)}else E.push(w)}return E};var tZ=G(()=>{v0()});var Xw=(D,F)=>oZ(F).reduce((E,w)=>{if(typeof E!=="object")throw new ZD(`Index '${w}' in '${F}' not found in '${JSON.stringify(D)}'`);else if(Array.isArray(E))return E[parseInt(w)];return E[w]},D);var eZ=G(()=>{v0();tZ()});var DW=(D)=>D!=null;var FW=(D)=>!D;var Jw,$9,EW=(D)=>{const F=(()=>{try{if(D instanceof URL)return D;if(typeof D==="object"&&"hostname"in D){const{hostname:Y,port:M,protocol:Z="",path:z="",query:X={}}=D,J=new URL(`${Z}//${Y}${M?`:${M}`:""}${z}`);return J.search=Object.entries(X).map(([K,H])=>`${K}=${H}`).join("&"),J}return new URL(D)}catch(Y){return null}})();if(!F)return console.error(`Unable to parse ${JSON.stringify(D)} as a whatwg URL.`),null;const E=F.href,{host:w,hostname:$,pathname:C,protocol:f,search:B}=F;if(B)return null;const h=f.slice(0,-1);if(!Object.values(Jw.EndpointURLScheme).includes(h))return null;const U=tF($),I=E.includes(`${w}:${$9[h]}`)||typeof D==="string"&&D.includes(`${w}:${$9[h]}`),A=`${w}${I?`:${$9[h]}`:""}`;return{scheme:h,authority:A,path:C,normalizedPath:C.endsWith("/")?C:`${C}/`,isIp:U}};var wW=G(()=>{Jw=L(J0(),1);E9();$9={[Jw.EndpointURLScheme.HTTP]:80,[Jw.EndpointURLScheme.HTTPS]:443}});var $W=(D,F)=>D===F;var fW=(D,F,E,w)=>{if(F>=E||D.length<E)return null;if(!w)return D.substring(F,E);return D.substring(D.length-E,D.length-F)};var CW=(D)=>encodeURIComponent(D).replace(/[!*'()]/g,(F)=>`%${F.charCodeAt(0).toString(16).toUpperCase()}`);var f9=G(()=>{eZ();w9();wW()});var BW;var hW=G(()=>{f9();BW={booleanEquals:aZ,getAttr:Xw,isSet:DW,isValidHostLabel:eF,not:FW,parseURL:EW,stringEquals:$W,substring:fW,uriEncode:CW}});var zw=(D,F)=>{const E=[],w={...F.endpointParams,...F.referenceRecord};let $=0;while($<D.length){const C=D.indexOf("{",$);if(C===-1){E.push(D.slice($));break}E.push(D.slice($,C));const f=D.indexOf("}",C);if(f===-1){E.push(D.slice(C));break}if(D[C+1]==="{"&&D[f+1]==="}")E.push(D.slice(C+1,f)),$=f+2;const B=D.substring(C+1,f);if(B.includes("#")){const[h,U]=B.split("#");E.push(Xw(w[h],U))}else E.push(w[B]);$=f+1}return E.join("")};var C9=G(()=>{f9()});var UW=({ref:D},F)=>{return{...F.endpointParams,...F.referenceRecord}[D]};var B8=(D,F,E)=>{if(typeof D==="string")return zw(D,E);else if(D.fn)return Tw(D,E);else if(D.ref)return UW(D,E);throw new ZD(`'${F}': ${String(D)} is not a string, function or reference.`)};var F3=G(()=>{v0();B9();C9()});var Tw=({fn:D,argv:F},E)=>{const w=F.map((C)=>["boolean","number"].includes(typeof C)?C:B8(C,"arg",E)),$=D.split(".");if($[0]in C0&&$[1]!=null)return C0[$[0]][$[1]](...w);return BW[D](...w)};var B9=G(()=>{Ww();hW();F3()});var AW=({assign:D,...F},E)=>{if(D&&D in E.referenceRecord)throw new ZD(`'${D}' is already defined in Reference Record.`);const w=Tw(F,E);return E.logger?.debug?.(`${V1} evaluateCondition: ${d0(F)} = ${d0(w)}`),{result:w===""?!0:!!w,...D!=null&&{toAssign:{name:D,value:w}}}};var IW=G(()=>{D3();v0();B9()});var j6=(D=[],F)=>{const E={};for(let w of D){const{result:$,toAssign:C}=AW(w,{...F,referenceRecord:{...F.referenceRecord,...E}});if(!$)return{result:$};if(C)E[C.name]=C.value,F.logger?.debug?.(`${V1} assign: ${C.name} := ${d0(C.value)}`)}return{result:!0,referenceRecord:E}};var Kw=G(()=>{D3();IW()});var MW=(D,F)=>Object.entries(D).reduce((E,[w,$])=>({...E,[w]:$.map((C)=>{const f=B8(C,"Header value entry",F);if(typeof f!=="string")throw new ZD(`Header '${w}' value '${f}' is not a string`);return f})}),{});var GW=G(()=>{v0();F3()});var h9=(D,F)=>{if(Array.isArray(D))return D.map((E)=>h9(E,F));switch(typeof D){case"string":return zw(D,F);case"object":if(D===null)throw new ZD(`Unexpected endpoint property: ${D}`);return Sw(D,F);case"boolean":return D;default:throw new ZD(`Unexpected endpoint property type: ${typeof D}`)}};var YW=G(()=>{v0();C9();U9()});var Sw=(D,F)=>Object.entries(D).reduce((E,[w,$])=>({...E,[w]:h9($,F)}),{});var U9=G(()=>{YW()});var ZW=(D,F)=>{const E=B8(D,"Endpoint URL",F);if(typeof E==="string")try{return new URL(E)}catch(w){throw console.error(`Failed to construct URL with ${E}`,w),w}throw new ZD(`Endpoint URL must be a string, got ${typeof E}`)};var WW=G(()=>{v0();F3()});var XW=(D,F)=>{const{conditions:E,endpoint:w}=D,{result:$,referenceRecord:C}=j6(E,F);if(!$)return;const f={...F,referenceRecord:{...F.referenceRecord,...C}},{url:B,properties:h,headers:U}=w;return F.logger?.debug?.(`${V1} Resolving endpoint from template: ${d0(w)}`),{...U!=null&&{headers:MW(U,f)},...h!=null&&{properties:Sw(h,f)},url:ZW(B,f)}};var JW=G(()=>{D3();Kw();GW();U9();WW()});var zW=(D,F)=>{const{conditions:E,error:w}=D,{result:$,referenceRecord:C}=j6(E,F);if(!$)return;throw new ZD(B8(w,"Error",{...F,referenceRecord:{...F.referenceRecord,...C}}))};var TW=G(()=>{v0();Kw();F3()});var KW=(D,F)=>{const{conditions:E,rules:w}=D,{result:$,referenceRecord:C}=j6(E,F);if(!$)return;return Qw(w,{...F,referenceRecord:{...F.referenceRecord,...C}})};var SW=G(()=>{Kw();A9()});var Qw=(D,F)=>{for(let E of D)if(E.type==="endpoint"){const w=XW(E,F);if(w)return w}else if(E.type==="error")zW(E,F);else if(E.type==="tree"){const w=KW(E,F);if(w)return w}else throw new ZD(`Unknown endpoint rule: ${E}`);throw new ZD("Rules evaluation failed")};var A9=G(()=>{v0();JW();TW();SW()});var QW=G(()=>{Ww();A9()});var G2=(D,F)=>{const{endpointParams:E,logger:w}=F,{parameters:$,rules:C}=D;F.logger?.debug?.(`${V1} Initial EndpointParams: ${d0(E)}`);const f=Object.entries($).filter(([,U])=>U.default!=null).map(([U,I])=>[U,I.default]);if(f.length>0)for(let[U,I]of f)E[U]=E[U]??I;const B=Object.entries($).filter(([,U])=>U.required).map(([U])=>U);for(let U of B)if(E[U]==null)throw new ZD(`Missing required parameter: '${U}'`);const h=Qw(C,{endpointParams:E,logger:w,referenceRecord:{}});return F.logger?.debug?.(`${V1} Resolved endpoint: ${d0(h)}`),h};var HW=G(()=>{D3();v0();QW()});var Y2=G(()=>{E9();w9();Ww();HW();v0()});var I9=G(()=>{Y2()});var M9=(D,F=!1)=>{if(F){for(let E of D.split("."))if(!M9(E))return!1;return!0}if(!eF(D))return!1;if(D.length<3||D.length>63)return!1;if(D!==D.toLowerCase())return!1;if(tF(D))return!1;return!0};var LW=G(()=>{Y2();I9()});var RW=(D)=>{const F=D.split(":");if(F.length<6)return null;const[E,w,$,C,f,...B]=F;if(E!=="arn"||w===""||$===""||B.join(":")==="")return null;const h=B.map((U)=>U.split("/")).flat();return{partition:w,service:$,region:C,accountId:f,resourceId:h}};var NW;var VW=G(()=>{NW={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"}});var an,on="",qW=(D)=>{const{partitions:F}=an;for(let w of F){const{regions:$,outputs:C}=w;for(let[f,B]of Object.entries($))if(f===D)return{...C,...B}}for(let w of F){const{regionRegex:$,outputs:C}=w;if(new RegExp($).test(D))return{...C}}const E=F.find((w)=>w.id==="aws");if(!E)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...E.outputs}},OW=()=>on;var G9=G(()=>{VW();an=NW});var Z2;var jW=G(()=>{Y2();LW();G9();Z2={isVirtualHostableS3Bucket:M9,parseArn:RW,partition:qW};C0.aws=Z2});var PW=G(()=>{Y2()});var yW=G(()=>{Y2()});var kW=()=>{};var bW=()=>{};var xW=()=>{};var cW=()=>{};var gW=()=>{};var rW=G(()=>{yW();kW();bW();xW();cW();gW()});var p8=G(()=>{jW();G9();I9();PW();rW()});var Z9=W((n5D,Rw)=>{var _W,sW,uW,dW,vW,mW,nW,lW,iW,pW,aW,oW,tW,Hw,Y9,eW,DX,FX,P6,EX,wX,$X,fX,CX,BX,hX,UX,AX,Lw,IX,MX;(function(D){var F=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(w){D(E(F,E(w)))});else if(typeof Rw==="object"&&typeof n5D==="object")D(E(F,E(n5D)));else D(E(F));function E(w,$){if(w!==F)if(typeof Object.create==="function")Object.defineProperty(w,"__esModule",{value:!0});else w.__esModule=!0;return function(C,f){return w[C]=$?$(C,f):f}}})(function(D){var F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,C){$.__proto__=C}||function($,C){for(var f in C)if(Object.prototype.hasOwnProperty.call(C,f))$[f]=C[f]};_W=function($,C){if(typeof C!=="function"&&C!==null)throw new TypeError("Class extends value "+String(C)+" is not a constructor or null");F($,C);function f(){this.constructor=$}$.prototype=C===null?Object.create(C):(f.prototype=C.prototype,new f)},sW=Object.assign||function($){for(var C,f=1,B=arguments.length;f<B;f++){C=arguments[f];for(var h in C)if(Object.prototype.hasOwnProperty.call(C,h))$[h]=C[h]}return $},uW=function($,C){var f={};for(var B in $)if(Object.prototype.hasOwnProperty.call($,B)&&C.indexOf(B)<0)f[B]=$[B];if($!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var h=0,B=Object.getOwnPropertySymbols($);h<B.length;h++)if(C.indexOf(B[h])<0&&Object.prototype.propertyIsEnumerable.call($,B[h]))f[B[h]]=$[B[h]]}return f},dW=function($,C,f,B){var h=arguments.length,U=h<3?C:B===null?B=Object.getOwnPropertyDescriptor(C,f):B,I;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate($,C,f,B);else for(var A=$.length-1;A>=0;A--)if(I=$[A])U=(h<3?I(U):h>3?I(C,f,U):I(C,f))||U;return h>3&&U&&Object.defineProperty(C,f,U),U},vW=function($,C){return function(f,B){C(f,B,$)}},mW=function($,C,f,B,h,U){function I(m){if(m!==void 0&&typeof m!=="function")throw new TypeError("Function expected");return m}var A=B.kind,Y=A==="getter"?"get":A==="setter"?"set":"value",M=!C&&$?B.static?$:$.prototype:null,Z=C||(M?Object.getOwnPropertyDescriptor(M,B.name):{}),z,X=!1;for(var J=f.length-1;J>=0;J--){var K={};for(var H in B)K[H]=H==="access"?{}:B[H];for(var H in B.access)K.access[H]=B.access[H];K.addInitializer=function(m){if(X)throw new TypeError("Cannot add initializers after decoration has completed");U.push(I(m||null))};var V=f[J](A==="accessor"?{get:Z.get,set:Z.set}:Z[Y],K);if(A==="accessor"){if(V===void 0)continue;if(V===null||typeof V!=="object")throw new TypeError("Object expected");if(z=I(V.get))Z.get=z;if(z=I(V.set))Z.set=z;if(z=I(V.init))h.unshift(z)}else if(z=I(V))if(A==="field")h.unshift(z);else Z[Y]=z}if(M)Object.defineProperty(M,B.name,Z);X=!0},nW=function($,C,f){var B=arguments.length>2;for(var h=0;h<C.length;h++)f=B?C[h].call($,f):C[h].call($);return B?f:void 0},lW=function($){return typeof $==="symbol"?$:"".concat($)},iW=function($,C,f){if(typeof C==="symbol")C=C.description?"[".concat(C.description,"]"):"";return Object.defineProperty($,"name",{configurable:!0,value:f?"".concat(f," ",C):C})},pW=function($,C){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata($,C)},aW=function($,C,f,B){function h(U){return U instanceof f?U:new f(function(I){I(U)})}return new(f||(f=Promise))(function(U,I){function A(Z){try{M(B.next(Z))}catch(z){I(z)}}function Y(Z){try{M(B.throw(Z))}catch(z){I(z)}}function M(Z){Z.done?U(Z.value):h(Z.value).then(A,Y)}M((B=B.apply($,C||[])).next())})},oW=function($,C){var f={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},B,h,U,I=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return I.next=A(0),I.throw=A(1),I.return=A(2),typeof Symbol==="function"&&(I[Symbol.iterator]=function(){return this}),I;function A(M){return function(Z){return Y([M,Z])}}function Y(M){if(B)throw new TypeError("Generator is already executing.");while(I&&(I=0,M[0]&&(f=0)),f)try{if(B=1,h&&(U=M[0]&2?h.return:M[0]?h.throw||((U=h.return)&&U.call(h),0):h.next)&&!(U=U.call(h,M[1])).done)return U;if(h=0,U)M=[M[0]&2,U.value];switch(M[0]){case 0:case 1:U=M;break;case 4:return f.label++,{value:M[1],done:!1};case 5:f.label++,h=M[1],M=[0];continue;case 7:M=f.ops.pop(),f.trys.pop();continue;default:if((U=f.trys,!(U=U.length>0&&U[U.length-1]))&&(M[0]===6||M[0]===2)){f=0;continue}if(M[0]===3&&(!U||M[1]>U[0]&&M[1]<U[3])){f.label=M[1];break}if(M[0]===6&&f.label<U[1]){f.label=U[1],U=M;break}if(U&&f.label<U[2]){f.label=U[2],f.ops.push(M);break}if(U[2])f.ops.pop();f.trys.pop();continue}M=C.call($,f)}catch(Z){M=[6,Z],h=0}finally{B=U=0}if(M[0]&5)throw M[1];return{value:M[0]?M[1]:void 0,done:!0}}},tW=function($,C){for(var f in $)if(f!=="default"&&!Object.prototype.hasOwnProperty.call(C,f))Lw(C,$,f)},Lw=Object.create?function($,C,f,B){if(B===void 0)B=f;var h=Object.getOwnPropertyDescriptor(C,f);if(!h||("get"in h?!C.__esModule:h.writable||h.configurable))h={enumerable:!0,get:function(){return C[f]}};Object.defineProperty($,B,h)}:function($,C,f,B){if(B===void 0)B=f;$[B]=C[f]},Hw=function($){var C=typeof Symbol==="function"&&Symbol.iterator,f=C&&$[C],B=0;if(f)return f.call($);if($&&typeof $.length==="number")return{next:function(){if($&&B>=$.length)$=void 0;return{value:$&&$[B++],done:!$}}};throw new TypeError(C?"Object is not iterable.":"Symbol.iterator is not defined.")},Y9=function($,C){var f=typeof Symbol==="function"&&$[Symbol.iterator];if(!f)return $;var B=f.call($),h,U=[],I;try{while((C===void 0||C-- >0)&&!(h=B.next()).done)U.push(h.value)}catch(A){I={error:A}}finally{try{if(h&&!h.done&&(f=B.return))f.call(B)}finally{if(I)throw I.error}}return U},eW=function(){for(var $=[],C=0;C<arguments.length;C++)$=$.concat(Y9(arguments[C]));return $},DX=function(){for(var $=0,C=0,f=arguments.length;C<f;C++)$+=arguments[C].length;for(var B=Array($),h=0,C=0;C<f;C++)for(var U=arguments[C],I=0,A=U.length;I<A;I++,h++)B[h]=U[I];return B},FX=function($,C,f){if(f||arguments.length===2){for(var B=0,h=C.length,U;B<h;B++)if(U||!(B in C)){if(!U)U=Array.prototype.slice.call(C,0,B);U[B]=C[B]}}return $.concat(U||Array.prototype.slice.call(C))},P6=function($){return this instanceof P6?(this.v=$,this):new P6($)},EX=function($,C,f){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B=f.apply($,C||[]),h,U=[];return h=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),A("next"),A("throw"),A("return",I),h[Symbol.asyncIterator]=function(){return this},h;function I(J){return function(K){return Promise.resolve(K).then(J,z)}}function A(J,K){if(B[J]){if(h[J]=function(H){return new Promise(function(V,m){U.push([J,H,V,m])>1||Y(J,H)})},K)h[J]=K(h[J])}}function Y(J,K){try{M(B[J](K))}catch(H){X(U[0][3],H)}}function M(J){J.value instanceof P6?Promise.resolve(J.value.v).then(Z,z):X(U[0][2],J)}function Z(J){Y("next",J)}function z(J){Y("throw",J)}function X(J,K){if(J(K),U.shift(),U.length)Y(U[0][0],U[0][1])}},wX=function($){var C,f;return C={},B("next"),B("throw",function(h){throw h}),B("return"),C[Symbol.iterator]=function(){return this},C;function B(h,U){C[h]=$[h]?function(I){return(f=!f)?{value:P6($[h](I)),done:!1}:U?U(I):I}:U}},$X=function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var C=$[Symbol.asyncIterator],f;return C?C.call($):($=typeof Hw==="function"?Hw($):$[Symbol.iterator](),f={},B("next"),B("throw"),B("return"),f[Symbol.asyncIterator]=function(){return this},f);function B(U){f[U]=$[U]&&function(I){return new Promise(function(A,Y){I=$[U](I),h(A,Y,I.done,I.value)})}}function h(U,I,A,Y){Promise.resolve(Y).then(function(M){U({value:M,done:A})},I)}},fX=function($,C){if(Object.defineProperty)Object.defineProperty($,"raw",{value:C});else $.raw=C;return $};var E=Object.create?function($,C){Object.defineProperty($,"default",{enumerable:!0,value:C})}:function($,C){$.default=C};CX=function($){if($&&$.__esModule)return $;var C={};if($!=null){for(var f in $)if(f!=="default"&&Object.prototype.hasOwnProperty.call($,f))Lw(C,$,f)}return E(C,$),C},BX=function($){return $&&$.__esModule?$:{default:$}},hX=function($,C,f,B){if(f==="a"&&!B)throw new TypeError("Private accessor was defined without a getter");if(typeof C==="function"?$!==C||!B:!C.has($))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?B:f==="a"?B.call($):B?B.value:C.get($)},UX=function($,C,f,B,h){if(B==="m")throw new TypeError("Private method is not writable");if(B==="a"&&!h)throw new TypeError("Private accessor was defined without a setter");if(typeof C==="function"?$!==C||!h:!C.has($))throw new TypeError("Cannot write private member to an object whose class did not declare it");return B==="a"?h.call($,f):h?h.value=f:C.set($,f),f},AX=function($,C){if(C===null||typeof C!=="object"&&typeof C!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof $==="function"?C===$:$.has(C)},IX=function($,C,f){if(C!==null&&C!==void 0){if(typeof C!=="object"&&typeof C!=="function")throw new TypeError("Object expected.");var B,h;if(f){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");B=C[Symbol.asyncDispose]}if(B===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(B=C[Symbol.dispose],f)h=B}if(typeof B!=="function")throw new TypeError("Object not disposable.");if(h)B=function(){try{h.call(this)}catch(U){return Promise.reject(U)}};$.stack.push({value:C,dispose:B,async:f})}else if(f)$.stack.push({async:!0});return C};var w=typeof SuppressedError==="function"?SuppressedError:function($,C,f){var B=new Error(f);return B.name="SuppressedError",B.error=$,B.suppressed=C,B};MX=function($){function C(U){$.error=$.hasError?new w(U,$.error,"An error was suppressed during disposal."):U,$.hasError=!0}var f,B=0;function h(){while(f=$.stack.pop())try{if(!f.async&&B===1)return B=0,$.stack.push(f),Promise.resolve().then(h);if(f.dispose){var U=f.dispose.call(f.value);if(f.async)return B|=2,Promise.resolve(U).then(h,function(I){return C(I),h()})}else B|=1}catch(I){C(I)}if(B===1)return $.hasError?Promise.reject($.error):Promise.resolve();if($.hasError)throw $.error}return h()},D("__extends",_W),D("__assign",sW),D("__rest",uW),D("__decorate",dW),D("__param",vW),D("__esDecorate",mW),D("__runInitializers",nW),D("__propKey",lW),D("__setFunctionName",iW),D("__metadata",pW),D("__awaiter",aW),D("__generator",oW),D("__exportStar",tW),D("__createBinding",Lw),D("__values",Hw),D("__read",Y9),D("__spread",eW),D("__spreadArrays",DX),D("__spreadArray",FX),D("__await",P6),D("__asyncGenerator",EX),D("__asyncDelegator",wX),D("__asyncValues",$X),D("__makeTemplateObject",fX),D("__importStar",CX),D("__importDefault",BX),D("__classPrivateFieldGet",hX),D("__classPrivateFieldSet",UX),D("__classPrivateFieldIn",AX),D("__addDisposableResource",IX),D("__disposeResources",MX)})});var B0=W((l5D,XX)=>{function ZX(D,F,E){if(!D.$source)D.$source={};return D.$source[F]=E,D}function WX(D,F,E){if(!D.__aws_sdk_context)D.__aws_sdk_context={features:{}};else if(!D.__aws_sdk_context.features)D.__aws_sdk_context.features={};D.__aws_sdk_context.features[F]=E}var{defineProperty:Vw,getOwnPropertyDescriptor:tn,getOwnPropertyNames:en}=Object,Dl=Object.prototype.hasOwnProperty,W9=(D,F)=>Vw(D,"name",{value:F,configurable:!0}),Fl=(D,F)=>{for(var E in F)Vw(D,E,{get:F[E],enumerable:!0})},El=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of en(F))if(!Dl.call(D,$)&&$!==E)Vw(D,$,{get:()=>F[$],enumerable:!(w=tn(F,$))||w.enumerable})}return D},wl=(D)=>El(Vw({},"__esModule",{value:!0}),D),YX={};Fl(YX,{emitWarningIfUnsupportedVersion:()=>$l,setCredentialFeature:()=>ZX,setFeature:()=>WX});XX.exports=wl(YX);var GX=!1,$l=W9((D)=>{if(D&&!GX&&parseInt(D.substring(1,D.indexOf(".")))<18)GX=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
5
5
  no longer support Node.js 16.x on January 6, 2025.
6
6
 
7
7
  To continue receiving updates to AWS services, bug fixes, and security
8
8
  updates please upgrade to a supported Node.js LTS version.
9
9
 
10
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");Z9(YW,"setCredentialFeature");Z9(ZW,"setFeature")});var xW=X((ICD,bW)=>{function T9(D){for(let F=0;F<8;F++)D[F]^=255;for(let F=7;F>-1;F--)if(D[F]++,D[F]!==0)break}var{defineProperty:Ow,getOwnPropertyDescriptor:Ql,getOwnPropertyNames:Hl}=Object,Ll=Object.prototype.hasOwnProperty,vD=(D,F)=>Ow(D,"name",{value:F,configurable:!0}),Rl=(D,F)=>{for(var E in F)Ow(D,E,{get:F[E],enumerable:!0})},Vl=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Hl(F))if(!Ll.call(D,$)&&$!==E)Ow(D,$,{get:()=>F[$],enumerable:!(w=Ql(F,$))||w.enumerable})}return D},Nl=(D)=>Vl(Ow({},"__esModule",{value:!0}),D),KW={};Rl(KW,{SignatureV4:()=>Di,clearCredentialCache:()=>ml,createScope:()=>Vw,getCanonicalHeaders:()=>z9,getCanonicalQuery:()=>qW,getPayloadHash:()=>qw,getSigningKey:()=>NW,moveHeadersToQuery:()=>yW,prepareRequest:()=>K9});bW.exports=Nl(KW);var WW=kF(),X9=f8(),ql="X-Amz-Algorithm",Ol="X-Amz-Credential",SW="X-Amz-Date",jl="X-Amz-SignedHeaders",Pl="X-Amz-Expires",QW="X-Amz-Signature",HW="X-Amz-Security-Token",LW="authorization",RW=SW.toLowerCase(),yl="date",kl=[LW,RW,yl],bl=QW.toLowerCase(),J9="x-amz-content-sha256",xl=HW.toLowerCase(),cl={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},gl=/^proxy-/,rl=/^sec-/,W9="AWS4-HMAC-SHA256",_l="AWS4-HMAC-SHA256-PAYLOAD",sl="UNSIGNED-PAYLOAD",ul=50,VW="aws4_request",dl=604800,h8=yf(),vl=f8(),P6={},Rw=[],Vw=vD((D,F,E)=>`${D}/${F}/${E}/${VW}`,"createScope"),NW=vD(async(D,F,E,w,$)=>{const C=await JW(D,F.secretAccessKey,F.accessKeyId),f=`${E}:${w}:${$}:${h8.toHex(C)}:${F.sessionToken}`;if(f in P6)return P6[f];Rw.push(f);while(Rw.length>ul)delete P6[Rw.shift()];let B=`AWS4${F.secretAccessKey}`;for(let h of[E,w,$,VW])B=await JW(D,B,h);return P6[f]=B},"getSigningKey"),ml=vD(()=>{Rw.length=0,Object.keys(P6).forEach((D)=>{delete P6[D]})},"clearCredentialCache"),JW=vD((D,F,E)=>{const w=new D(F);return w.update(vl.toUint8Array(E)),w.digest()},"hmac"),z9=vD(({headers:D},F,E)=>{const w={};for(let $ of Object.keys(D).sort()){if(D[$]==null)continue;const C=$.toLowerCase();if(C in cl||(F==null?void 0:F.has(C))||gl.test(C)||rl.test(C)){if(!E||E&&!E.has(C))continue}w[C]=D[$].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),Nw=Rf(),qW=vD(({query:D={}})=>{const F=[],E={};for(let w of Object.keys(D)){if(w.toLowerCase()===bl)continue;const $=Nw.escapeUri(w);F.push($);const C=D[w];if(typeof C==="string")E[$]=`${$}=${Nw.escapeUri(C)}`;else if(Array.isArray(C))E[$]=C.slice(0).reduce((f,B)=>f.concat([`${$}=${Nw.escapeUri(B)}`]),[]).sort().join("&")}return F.sort().map((w)=>E[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),nl=Tf(),ll=f8(),qw=vD(async({headers:D,body:F},E)=>{for(let w of Object.keys(D))if(w.toLowerCase()===J9)return D[w];if(F==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof F==="string"||ArrayBuffer.isView(F)||nl.isArrayBuffer(F)){const w=new E;return w.update(ll.toUint8Array(F)),h8.toHex(await w.digest())}return sl},"getPayloadHash"),zW=f8(),OW=class D{format(F){const E=[];for(let C of Object.keys(F)){const f=zW.fromUtf8(C);E.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(F[C]))}const w=new Uint8Array(E.reduce((C,f)=>C+f.byteLength,0));let $=0;for(let C of E)w.set(C,$),$+=C.byteLength;return w}formatHeaderValue(F){switch(F.type){case"boolean":return Uint8Array.from([F.value?0:1]);case"byte":return Uint8Array.from([2,F.value]);case"short":const E=new DataView(new ArrayBuffer(3));return E.setUint8(0,3),E.setInt16(1,F.value,!1),new Uint8Array(E.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,F.value,!1),new Uint8Array(w.buffer);case"long":const $=new Uint8Array(9);return $[0]=5,$.set(F.value.bytes,1),$;case"binary":const C=new DataView(new ArrayBuffer(3+F.value.byteLength));C.setUint8(0,6),C.setUint16(1,F.value.byteLength,!1);const f=new Uint8Array(C.buffer);return f.set(F.value,3),f;case"string":const B=zW.fromUtf8(F.value),h=new DataView(new ArrayBuffer(3+B.byteLength));h.setUint8(0,7),h.setUint16(1,B.byteLength,!1);const U=new Uint8Array(h.buffer);return U.set(B,3),U;case"timestamp":const I=new Uint8Array(9);return I[0]=8,I.set(al.fromNumber(F.value.valueOf()).bytes,1),I;case"uuid":if(!pl.test(F.value))throw new Error(`Invalid UUID received: ${F.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(h8.fromHex(F.value.replace(/\-/g,"")),1),A}}};vD(OW,"HeaderFormatter");var il=OW,pl=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,jW=class D{constructor(F){if(this.bytes=F,F.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(F){if(F>9223372036854776000||F<-9223372036854776000)throw new Error(`${F} is too large (or, if negative, too small) to represent as an Int64`);const E=new Uint8Array(8);for(let w=7,$=Math.abs(Math.round(F));w>-1&&$>0;w--,$/=256)E[w]=$;if(F<0)T9(E);return new D(E)}valueOf(){const F=this.bytes.slice(0),E=F[0]&128;if(E)T9(F);return parseInt(h8.toHex(F),16)*(E?-1:1)}toString(){return String(this.valueOf())}};vD(jW,"Int64");var al=jW;vD(T9,"negate");var ol=vD((D,F)=>{D=D.toLowerCase();for(let E of Object.keys(F))if(D===E.toLowerCase())return!0;return!1},"hasHeader"),PW=H1(),yW=vD((D,F={})=>{var E,w;const{headers:$,query:C={}}=PW.HttpRequest.clone(D);for(let f of Object.keys($)){const B=f.toLowerCase();if(B.slice(0,6)==="x-amz-"&&!((E=F.unhoistableHeaders)==null?void 0:E.has(B))||((w=F.hoistableHeaders)==null?void 0:w.has(B)))C[f]=$[f],delete $[f]}return{...D,headers:$,query:C}},"moveHeadersToQuery"),K9=vD((D)=>{D=PW.HttpRequest.clone(D);for(let F of Object.keys(D.headers))if(kl.indexOf(F.toLowerCase())>-1)delete D.headers[F];return D},"prepareRequest"),tl=vD((D)=>el(D).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),el=vD((D)=>{if(typeof D==="number")return new Date(D*1000);if(typeof D==="string"){if(Number(D))return new Date(Number(D)*1000);return new Date(D)}return D},"toDate"),kW=class D{constructor({applyChecksum:F,credentials:E,region:w,service:$,sha256:C,uriEscapePath:f=!0}){this.headerFormatter=new il,this.service=$,this.sha256=C,this.uriEscapePath=f,this.applyChecksum=typeof F==="boolean"?F:!0,this.regionProvider=WW.normalizeProvider(w),this.credentialProvider=WW.normalizeProvider(E)}async presign(F,E={}){const{signingDate:w=new Date,expiresIn:$=3600,unsignableHeaders:C,unhoistableHeaders:f,signableHeaders:B,hoistableHeaders:h,signingRegion:U,signingService:I}=E,A=await this.credentialProvider();this.validateResolvedCredentials(A);const Y=U??await this.regionProvider(),{longDate:G,shortDate:Z}=Lw(w);if($>dl)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const z=Vw(Z,Y,I??this.service),W=yW(K9(F),{unhoistableHeaders:f,hoistableHeaders:h});if(A.sessionToken)W.query[HW]=A.sessionToken;W.query[ql]=W9,W.query[Ol]=`${A.accessKeyId}/${z}`,W.query[SW]=G,W.query[Pl]=$.toString(10);const J=z9(W,C,B);return W.query[jl]=TW(J),W.query[QW]=await this.getSignature(G,z,this.getSigningKey(A,Y,Z,I),this.createCanonicalRequest(W,J,await qw(F,this.sha256))),W}async sign(F,E){if(typeof F==="string")return this.signString(F,E);else if(F.headers&&F.payload)return this.signEvent(F,E);else if(F.message)return this.signMessage(F,E);else return this.signRequest(F,E)}async signEvent({headers:F,payload:E},{signingDate:w=new Date,priorSignature:$,signingRegion:C,signingService:f}){const B=C??await this.regionProvider(),{shortDate:h,longDate:U}=Lw(w),I=Vw(h,B,f??this.service),A=await qw({headers:{},body:E},this.sha256),Y=new this.sha256;Y.update(F);const G=h8.toHex(await Y.digest()),Z=[_l,U,I,$,G,A].join("\n");return this.signString(Z,{signingDate:w,signingRegion:B,signingService:f})}async signMessage(F,{signingDate:E=new Date,signingRegion:w,signingService:$}){return this.signEvent({headers:this.headerFormatter.format(F.message.headers),payload:F.message.body},{signingDate:E,signingRegion:w,signingService:$,priorSignature:F.priorSignature}).then((f)=>{return{message:F.message,signature:f}})}async signString(F,{signingDate:E=new Date,signingRegion:w,signingService:$}={}){const C=await this.credentialProvider();this.validateResolvedCredentials(C);const f=w??await this.regionProvider(),{shortDate:B}=Lw(E),h=new this.sha256(await this.getSigningKey(C,f,B,$));return h.update(X9.toUint8Array(F)),h8.toHex(await h.digest())}async signRequest(F,{signingDate:E=new Date,signableHeaders:w,unsignableHeaders:$,signingRegion:C,signingService:f}={}){const B=await this.credentialProvider();this.validateResolvedCredentials(B);const h=C??await this.regionProvider(),U=K9(F),{longDate:I,shortDate:A}=Lw(E),Y=Vw(A,h,f??this.service);if(U.headers[RW]=I,B.sessionToken)U.headers[xl]=B.sessionToken;const G=await qw(U,this.sha256);if(!ol(J9,U.headers)&&this.applyChecksum)U.headers[J9]=G;const Z=z9(U,$,w),z=await this.getSignature(I,Y,this.getSigningKey(B,h,A,f),this.createCanonicalRequest(U,Z,G));return U.headers[LW]=`${W9} Credential=${B.accessKeyId}/${Y}, SignedHeaders=${TW(Z)}, Signature=${z}`,U}createCanonicalRequest(F,E,w){const $=Object.keys(E).sort();return`${F.method}
10
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");W9(ZX,"setCredentialFeature");W9(WX,"setFeature")});var cX=W((i5D,xX)=>{function K9(D){for(let F=0;F<8;F++)D[F]^=255;for(let F=7;F>-1;F--)if(D[F]++,D[F]!==0)break}var{defineProperty:yw,getOwnPropertyDescriptor:fl,getOwnPropertyNames:Cl}=Object,Bl=Object.prototype.hasOwnProperty,mD=(D,F)=>yw(D,"name",{value:F,configurable:!0}),hl=(D,F)=>{for(var E in F)yw(D,E,{get:F[E],enumerable:!0})},Ul=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Cl(F))if(!Bl.call(D,$)&&$!==E)yw(D,$,{get:()=>F[$],enumerable:!(w=fl(F,$))||w.enumerable})}return D},Al=(D)=>Ul(yw({},"__esModule",{value:!0}),D),SX={};hl(SX,{SignatureV4:()=>xl,clearCredentialCache:()=>Vl,createScope:()=>Ow,getCanonicalHeaders:()=>T9,getCanonicalQuery:()=>OX,getPayloadHash:()=>Pw,getSigningKey:()=>qX,moveHeadersToQuery:()=>kX,prepareRequest:()=>S9});xX.exports=Al(SX);var JX=xF(),X9=f8(),Il="X-Amz-Algorithm",Ml="X-Amz-Credential",QX="X-Amz-Date",Gl="X-Amz-SignedHeaders",Yl="X-Amz-Expires",HX="X-Amz-Signature",LX="X-Amz-Security-Token",RX="authorization",VX=QX.toLowerCase(),Zl="date",Wl=[RX,VX,Zl],Xl=HX.toLowerCase(),z9="x-amz-content-sha256",Jl=LX.toLowerCase(),zl={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Tl=/^proxy-/,Kl=/^sec-/,J9="AWS4-HMAC-SHA256",Sl="AWS4-HMAC-SHA256-PAYLOAD",Ql="UNSIGNED-PAYLOAD",Hl=50,NX="aws4_request",Ll=604800,h8=L6(),Rl=f8(),y6={},qw=[],Ow=mD((D,F,E)=>`${D}/${F}/${E}/${NX}`,"createScope"),qX=mD(async(D,F,E,w,$)=>{const C=await zX(D,F.secretAccessKey,F.accessKeyId),f=`${E}:${w}:${$}:${h8.toHex(C)}:${F.sessionToken}`;if(f in y6)return y6[f];qw.push(f);while(qw.length>Hl)delete y6[qw.shift()];let B=`AWS4${F.secretAccessKey}`;for(let h of[E,w,$,NX])B=await zX(D,B,h);return y6[f]=B},"getSigningKey"),Vl=mD(()=>{qw.length=0,Object.keys(y6).forEach((D)=>{delete y6[D]})},"clearCredentialCache"),zX=mD((D,F,E)=>{const w=new D(F);return w.update(Rl.toUint8Array(E)),w.digest()},"hmac"),T9=mD(({headers:D},F,E)=>{const w={};for(let $ of Object.keys(D).sort()){if(D[$]==null)continue;const C=$.toLowerCase();if(C in zl||(F==null?void 0:F.has(C))||Tl.test(C)||Kl.test(C)){if(!E||E&&!E.has(C))continue}w[C]=D[$].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),jw=Nf(),OX=mD(({query:D={}})=>{const F=[],E={};for(let w of Object.keys(D)){if(w.toLowerCase()===Xl)continue;const $=jw.escapeUri(w);F.push($);const C=D[w];if(typeof C==="string")E[$]=`${$}=${jw.escapeUri(C)}`;else if(Array.isArray(C))E[$]=C.slice(0).reduce((f,B)=>f.concat([`${$}=${jw.escapeUri(B)}`]),[]).sort().join("&")}return F.sort().map((w)=>E[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),Nl=Sf(),ql=f8(),Pw=mD(async({headers:D,body:F},E)=>{for(let w of Object.keys(D))if(w.toLowerCase()===z9)return D[w];if(F==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof F==="string"||ArrayBuffer.isView(F)||Nl.isArrayBuffer(F)){const w=new E;return w.update(ql.toUint8Array(F)),h8.toHex(await w.digest())}return Ql},"getPayloadHash"),TX=f8(),jX=class D{format(F){const E=[];for(let C of Object.keys(F)){const f=TX.fromUtf8(C);E.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(F[C]))}const w=new Uint8Array(E.reduce((C,f)=>C+f.byteLength,0));let $=0;for(let C of E)w.set(C,$),$+=C.byteLength;return w}formatHeaderValue(F){switch(F.type){case"boolean":return Uint8Array.from([F.value?0:1]);case"byte":return Uint8Array.from([2,F.value]);case"short":const E=new DataView(new ArrayBuffer(3));return E.setUint8(0,3),E.setInt16(1,F.value,!1),new Uint8Array(E.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,F.value,!1),new Uint8Array(w.buffer);case"long":const $=new Uint8Array(9);return $[0]=5,$.set(F.value.bytes,1),$;case"binary":const C=new DataView(new ArrayBuffer(3+F.value.byteLength));C.setUint8(0,6),C.setUint16(1,F.value.byteLength,!1);const f=new Uint8Array(C.buffer);return f.set(F.value,3),f;case"string":const B=TX.fromUtf8(F.value),h=new DataView(new ArrayBuffer(3+B.byteLength));h.setUint8(0,7),h.setUint16(1,B.byteLength,!1);const U=new Uint8Array(h.buffer);return U.set(B,3),U;case"timestamp":const I=new Uint8Array(9);return I[0]=8,I.set(Pl.fromNumber(F.value.valueOf()).bytes,1),I;case"uuid":if(!jl.test(F.value))throw new Error(`Invalid UUID received: ${F.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(h8.fromHex(F.value.replace(/\-/g,"")),1),A}}};mD(jX,"HeaderFormatter");var Ol=jX,jl=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,PX=class D{constructor(F){if(this.bytes=F,F.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(F){if(F>9223372036854776000||F<-9223372036854776000)throw new Error(`${F} is too large (or, if negative, too small) to represent as an Int64`);const E=new Uint8Array(8);for(let w=7,$=Math.abs(Math.round(F));w>-1&&$>0;w--,$/=256)E[w]=$;if(F<0)K9(E);return new D(E)}valueOf(){const F=this.bytes.slice(0),E=F[0]&128;if(E)K9(F);return parseInt(h8.toHex(F),16)*(E?-1:1)}toString(){return String(this.valueOf())}};mD(PX,"Int64");var Pl=PX;mD(K9,"negate");var yl=mD((D,F)=>{D=D.toLowerCase();for(let E of Object.keys(F))if(D===E.toLowerCase())return!0;return!1},"hasHeader"),yX=H1(),kX=mD((D,F={})=>{var E,w;const{headers:$,query:C={}}=yX.HttpRequest.clone(D);for(let f of Object.keys($)){const B=f.toLowerCase();if(B.slice(0,6)==="x-amz-"&&!((E=F.unhoistableHeaders)==null?void 0:E.has(B))||((w=F.hoistableHeaders)==null?void 0:w.has(B)))C[f]=$[f],delete $[f]}return{...D,headers:$,query:C}},"moveHeadersToQuery"),S9=mD((D)=>{D=yX.HttpRequest.clone(D);for(let F of Object.keys(D.headers))if(Wl.indexOf(F.toLowerCase())>-1)delete D.headers[F];return D},"prepareRequest"),kl=mD((D)=>bl(D).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),bl=mD((D)=>{if(typeof D==="number")return new Date(D*1000);if(typeof D==="string"){if(Number(D))return new Date(Number(D)*1000);return new Date(D)}return D},"toDate"),bX=class D{constructor({applyChecksum:F,credentials:E,region:w,service:$,sha256:C,uriEscapePath:f=!0}){this.headerFormatter=new Ol,this.service=$,this.sha256=C,this.uriEscapePath=f,this.applyChecksum=typeof F==="boolean"?F:!0,this.regionProvider=JX.normalizeProvider(w),this.credentialProvider=JX.normalizeProvider(E)}async presign(F,E={}){const{signingDate:w=new Date,expiresIn:$=3600,unsignableHeaders:C,unhoistableHeaders:f,signableHeaders:B,hoistableHeaders:h,signingRegion:U,signingService:I}=E,A=await this.credentialProvider();this.validateResolvedCredentials(A);const Y=U??await this.regionProvider(),{longDate:M,shortDate:Z}=Nw(w);if($>Ll)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const z=Ow(Z,Y,I??this.service),X=kX(S9(F),{unhoistableHeaders:f,hoistableHeaders:h});if(A.sessionToken)X.query[LX]=A.sessionToken;X.query[Il]=J9,X.query[Ml]=`${A.accessKeyId}/${z}`,X.query[QX]=M,X.query[Yl]=$.toString(10);const J=T9(X,C,B);return X.query[Gl]=KX(J),X.query[HX]=await this.getSignature(M,z,this.getSigningKey(A,Y,Z,I),this.createCanonicalRequest(X,J,await Pw(F,this.sha256))),X}async sign(F,E){if(typeof F==="string")return this.signString(F,E);else if(F.headers&&F.payload)return this.signEvent(F,E);else if(F.message)return this.signMessage(F,E);else return this.signRequest(F,E)}async signEvent({headers:F,payload:E},{signingDate:w=new Date,priorSignature:$,signingRegion:C,signingService:f}){const B=C??await this.regionProvider(),{shortDate:h,longDate:U}=Nw(w),I=Ow(h,B,f??this.service),A=await Pw({headers:{},body:E},this.sha256),Y=new this.sha256;Y.update(F);const M=h8.toHex(await Y.digest()),Z=[Sl,U,I,$,M,A].join("\n");return this.signString(Z,{signingDate:w,signingRegion:B,signingService:f})}async signMessage(F,{signingDate:E=new Date,signingRegion:w,signingService:$}){return this.signEvent({headers:this.headerFormatter.format(F.message.headers),payload:F.message.body},{signingDate:E,signingRegion:w,signingService:$,priorSignature:F.priorSignature}).then((f)=>{return{message:F.message,signature:f}})}async signString(F,{signingDate:E=new Date,signingRegion:w,signingService:$}={}){const C=await this.credentialProvider();this.validateResolvedCredentials(C);const f=w??await this.regionProvider(),{shortDate:B}=Nw(E),h=new this.sha256(await this.getSigningKey(C,f,B,$));return h.update(X9.toUint8Array(F)),h8.toHex(await h.digest())}async signRequest(F,{signingDate:E=new Date,signableHeaders:w,unsignableHeaders:$,signingRegion:C,signingService:f}={}){const B=await this.credentialProvider();this.validateResolvedCredentials(B);const h=C??await this.regionProvider(),U=S9(F),{longDate:I,shortDate:A}=Nw(E),Y=Ow(A,h,f??this.service);if(U.headers[VX]=I,B.sessionToken)U.headers[Jl]=B.sessionToken;const M=await Pw(U,this.sha256);if(!yl(z9,U.headers)&&this.applyChecksum)U.headers[z9]=M;const Z=T9(U,$,w),z=await this.getSignature(I,Y,this.getSigningKey(B,h,A,f),this.createCanonicalRequest(U,Z,M));return U.headers[RX]=`${J9} Credential=${B.accessKeyId}/${Y}, SignedHeaders=${KX(Z)}, Signature=${z}`,U}createCanonicalRequest(F,E,w){const $=Object.keys(E).sort();return`${F.method}
11
11
  ${this.getCanonicalPath(F)}
12
- ${qW(F)}
12
+ ${OX(F)}
13
13
  ${$.map((C)=>`${C}:${E[C]}`).join("\n")}
14
14
 
15
15
  ${$.join(";")}
16
- ${w}`}async createStringToSign(F,E,w){const $=new this.sha256;$.update(X9.toUint8Array(w));const C=await $.digest();return`${W9}
16
+ ${w}`}async createStringToSign(F,E,w){const $=new this.sha256;$.update(X9.toUint8Array(w));const C=await $.digest();return`${J9}
17
17
  ${F}
18
18
  ${E}
19
- ${h8.toHex(C)}`}getCanonicalPath({path:F}){if(this.uriEscapePath){const E=[];for(let C of F.split("/")){if((C==null?void 0:C.length)===0)continue;if(C===".")continue;if(C==="..")E.pop();else E.push(C)}const w=`${(F==null?void 0:F.startsWith("/"))?"/":""}${E.join("/")}${E.length>0&&(F==null?void 0:F.endsWith("/"))?"/":""}`;return Nw.escapeUri(w).replace(/%2F/g,"/")}return F}async getSignature(F,E,w,$){const C=await this.createStringToSign(F,E,$),f=new this.sha256(await w);return f.update(X9.toUint8Array(C)),h8.toHex(await f.digest())}getSigningKey(F,E,w,$){return NW(this.sha256,F,w,E,$||this.service)}validateResolvedCredentials(F){if(typeof F!=="object"||typeof F.accessKeyId!=="string"||typeof F.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};vD(kW,"SignatureV4");var Di=kW,Lw=vD((D)=>{const F=tl(D).replace(/[\-:]/g,"");return{longDate:F,shortDate:F.slice(0,8)}},"formatDate"),TW=vD((D)=>Object.keys(D).sort().join(";"),"getCanonicalHeaderList")});var nW=X((GCD,mW)=>{var{defineProperty:jw,getOwnPropertyDescriptor:Fi,getOwnPropertyNames:Ei}=Object,wi=Object.prototype.hasOwnProperty,N0=(D,F)=>jw(D,"name",{value:F,configurable:!0}),$i=(D,F)=>{for(var E in F)jw(D,E,{get:F[E],enumerable:!0})},fi=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Ei(F))if(!wi.call(D,$)&&$!==E)jw(D,$,{get:()=>F[$],enumerable:!(w=Fi(F,$))||w.enumerable})}return D},Ci=(D)=>fi(jw({},"__esModule",{value:!0}),D),sW={};$i(sW,{AWSSDKSigV4Signer:()=>Ai,AwsSdkSigV4ASigner:()=>Gi,AwsSdkSigV4Signer:()=>H9,NODE_SIGV4A_CONFIG_OPTIONS:()=>Zi,resolveAWSSDKSigV4Config:()=>Wi,resolveAwsSdkSigV4AConfig:()=>Yi,resolveAwsSdkSigV4Config:()=>vW,validateSigningProperties:()=>Q9});mW.exports=Ci(sW);var Bi=H1(),hi=H1(),cW=N0((D)=>{var F,E;return hi.HttpResponse.isInstance(D)?((F=D.headers)==null?void 0:F.date)??((E=D.headers)==null?void 0:E.Date):void 0},"getDateHeader"),S9=N0((D)=>new Date(Date.now()+D),"getSkewCorrectedDate"),Ui=N0((D,F)=>Math.abs(S9(F).getTime()-D)>=300000,"isClockSkewed"),gW=N0((D,F)=>{const E=Date.parse(D);if(Ui(E,F))return E-Date.now();return F},"getUpdatedSystemClockOffset"),D3=N0((D,F)=>{if(!F)throw new Error(`Property \`${D}\` is not resolved for AWS SDK SigV4Auth`);return F},"throwSigningPropertyError"),Q9=N0(async(D)=>{var F,E,w;const $=D3("context",D.context),C=D3("config",D.config),f=(w=(E=(F=$.endpointV2)==null?void 0:F.properties)==null?void 0:E.authSchemes)==null?void 0:w[0],h=await D3("signer",C.signer)(f),U=D==null?void 0:D.signingRegion,I=D==null?void 0:D.signingRegionSet,A=D==null?void 0:D.signingName;return{config:C,signer:h,signingRegion:U,signingRegionSet:I,signingName:A}},"validateSigningProperties"),uW=class D{async sign(F,E,w){var $;if(!Bi.HttpRequest.isInstance(F))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const C=await Q9(w),{config:f,signer:B}=C;let{signingRegion:h,signingName:U}=C;const I=w.context;if((($=I==null?void 0:I.authSchemes)==null?void 0:$.length)??0>1){const[Y,G]=I.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(G==null?void 0:G.name)==="sigv4")h=(G==null?void 0:G.signingRegion)??h,U=(G==null?void 0:G.signingName)??U}return await B.sign(F,{signingDate:S9(f.systemClockOffset),signingRegion:h,signingService:U})}errorHandler(F){return(E)=>{const w=E.ServerTime??cW(E.$response);if(w){const $=D3("config",F.config),C=$.systemClockOffset;if($.systemClockOffset=gW(w,$.systemClockOffset),$.systemClockOffset!==C&&E.$metadata)E.$metadata.clockSkewCorrected=!0}throw E}}successHandler(F,E){const w=cW(F);if(w){const $=D3("config",E.config);$.systemClockOffset=gW(w,$.systemClockOffset)}}};N0(uW,"AwsSdkSigV4Signer");var H9=uW,Ai=H9,Ii=H1(),dW=class D extends H9{async sign(F,E,w){var $;if(!Ii.HttpRequest.isInstance(F))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:C,signer:f,signingRegion:B,signingRegionSet:h,signingName:U}=await Q9(w),A=(await(($=C.sigv4aSigningRegionSet)==null?void 0:$.call(C))??h??[B]).join(",");return await f.sign(F,{signingDate:S9(C.systemClockOffset),signingRegion:A,signingService:U})}};N0(dW,"AwsSdkSigV4ASigner");var Gi=dW,Mi=rD(),rW=i7(),Yi=N0((D)=>{return D.sigv4aSigningRegionSet=Mi.normalizeProvider(D.sigv4aSigningRegionSet),D},"resolveAwsSdkSigV4AConfig"),Zi={environmentVariableSelector(D){if(D.AWS_SIGV4A_SIGNING_REGION_SET)return D.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((F)=>F.trim());throw new rW.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(D){if(D.sigv4a_signing_region_set)return(D.sigv4a_signing_region_set??"").split(",").map((F)=>F.trim());throw new rW.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Xi=C0(),p8=rD(),_W=xW(),vW=N0((D)=>{let F=!1,E;if(D.credentials)F=!0,E=p8.memoizeIdentityProvider(D.credentials,p8.isIdentityExpired,p8.doesIdentityRequireRefresh);if(!E)if(D.credentialDefaultProvider)E=p8.normalizeProvider(D.credentialDefaultProvider(Object.assign({},D,{parentClientConfig:D})));else E=N0(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:$=D.systemClockOffset||0,sha256:C}=D;let f;if(D.signer)f=p8.normalizeProvider(D.signer);else if(D.regionInfoProvider)f=N0(()=>p8.normalizeProvider(D.region)().then(async(B)=>[await D.regionInfoProvider(B,{useFipsEndpoint:await D.useFipsEndpoint(),useDualstackEndpoint:await D.useDualstackEndpoint()})||{},B]).then(([B,h])=>{const{signingRegion:U,signingService:I}=B;D.signingRegion=D.signingRegion||U||h,D.signingName=D.signingName||I||D.serviceId;const A={...D,credentials:E,region:D.signingRegion,service:D.signingName,sha256:C,uriEscapePath:w};return new(D.signerConstructor||_W.SignatureV4)(A)}),"signer");else f=N0(async(B)=>{B=Object.assign({},{name:"sigv4",signingName:D.signingName||D.defaultSigningName,signingRegion:await p8.normalizeProvider(D.region)(),properties:{}},B);const{signingRegion:h,signingName:U}=B;D.signingRegion=D.signingRegion||h,D.signingName=D.signingName||U||D.serviceId;const I={...D,credentials:E,region:D.signingRegion,service:D.signingName,sha256:C,uriEscapePath:w};return new(D.signerConstructor||_W.SignatureV4)(I)},"signer");return{...D,systemClockOffset:$,signingEscapePath:w,credentials:F?async()=>E().then((B)=>Xi.setCredentialFeature(B,"CREDENTIALS_CODE","e")):E,signer:f}},"resolveAwsSdkSigV4Config"),Wi=vW});var Pw=X((Si)=>{var Ji=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",lW="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Ji+"]*",zi=new RegExp("^"+lW+"$"),Ti=function(D,F){const E=[];let w=F.exec(D);while(w){const $=[];$.startIndex=F.lastIndex-w[0].length;const C=w.length;for(let f=0;f<C;f++)$.push(w[f]);E.push($),w=F.exec(D)}return E},Ki=function(D){const F=zi.exec(D);return!(F===null||typeof F==="undefined")};Si.isExist=function(D){return typeof D!=="undefined"};Si.isEmptyObject=function(D){return Object.keys(D).length===0};Si.merge=function(D,F,E){if(F){const w=Object.keys(F),$=w.length;for(let C=0;C<$;C++)if(E==="strict")D[w[C]]=[F[w[C]]];else D[w[C]]=F[w[C]]}};Si.getValue=function(D){if(Si.isExist(D))return D;else return""};Si.isName=Ki;Si.getAllMatches=Ti;Si.nameRegexp=lW});var R9=X((gi)=>{function pW(D){return D===" "||D==="\t"||D==="\n"||D==="\r"}function aW(D,F){const E=F;for(;F<D.length;F++)if(D[F]=="?"||D[F]==" "){const w=D.substr(E,F-E);if(F>5&&w==="xml")return yD("InvalidXml","XML declaration allowed only at the start of the document.",B0(D,F));else if(D[F]=="?"&&D[F+1]==">"){F++;break}else continue}return F}function oW(D,F){if(D.length>F+5&&D[F+1]==="-"&&D[F+2]==="-"){for(F+=3;F<D.length;F++)if(D[F]==="-"&&D[F+1]==="-"&&D[F+2]===">"){F+=2;break}}else if(D.length>F+8&&D[F+1]==="D"&&D[F+2]==="O"&&D[F+3]==="C"&&D[F+4]==="T"&&D[F+5]==="Y"&&D[F+6]==="P"&&D[F+7]==="E"){let E=1;for(F+=8;F<D.length;F++)if(D[F]==="<")E++;else if(D[F]===">"){if(E--,E===0)break}}else if(D.length>F+9&&D[F+1]==="["&&D[F+2]==="C"&&D[F+3]==="D"&&D[F+4]==="A"&&D[F+5]==="T"&&D[F+6]==="A"&&D[F+7]==="["){for(F+=8;F<D.length;F++)if(D[F]==="]"&&D[F+1]==="]"&&D[F+2]===">"){F+=2;break}}return F}function Pi(D,F){let E="",w="",$=!1;for(;F<D.length;F++){if(D[F]===Oi||D[F]===ji)if(w==="")w=D[F];else if(w!==D[F]);else w="";else if(D[F]===">"){if(w===""){$=!0;break}}E+=D[F]}if(w!=="")return!1;return{value:E,index:F,tagClosed:$}}function tW(D,F){const E=L9.getAllMatches(D,yi),w={};for(let $=0;$<E.length;$++){if(E[$][1].length===0)return yD("InvalidAttr","Attribute '"+E[$][2]+"' has no space in starting.",F3(E[$]));else if(E[$][3]!==void 0&&E[$][4]===void 0)return yD("InvalidAttr","Attribute '"+E[$][2]+"' is without value.",F3(E[$]));else if(E[$][3]===void 0&&!F.allowBooleanAttributes)return yD("InvalidAttr","boolean attribute '"+E[$][2]+"' is not allowed.",F3(E[$]));const C=E[$][2];if(!xi(C))return yD("InvalidAttr","Attribute '"+C+"' is an invalid name.",F3(E[$]));if(!w.hasOwnProperty(C))w[C]=1;else return yD("InvalidAttr","Attribute '"+C+"' is repeated.",F3(E[$]))}return!0}function ki(D,F){let E=/\d/;if(D[F]==="x")F++,E=/[\da-fA-F]/;for(;F<D.length;F++){if(D[F]===";")return F;if(!D[F].match(E))break}return-1}function bi(D,F){if(F++,D[F]===";")return-1;if(D[F]==="#")return F++,ki(D,F);let E=0;for(;F<D.length;F++,E++){if(D[F].match(/\w/)&&E<20)continue;if(D[F]===";")break;return-1}return F}function yD(D,F,E){return{err:{code:D,msg:F,line:E.line||E,col:E.col}}}function xi(D){return L9.isName(D)}function ci(D){return L9.isName(D)}function B0(D,F){const E=D.substring(0,F).split(/\r?\n/);return{line:E.length,col:E[E.length-1].length+1}}function F3(D){return D.startIndex+D[1].length}var L9=Pw(),qi={allowBooleanAttributes:!1,unpairedTags:[]};gi.validate=function(D,F){F=Object.assign({},qi,F);const E=[];let w=!1,$=!1;if(D[0]==="\uFEFF")D=D.substr(1);for(let C=0;C<D.length;C++)if(D[C]==="<"&&D[C+1]==="?"){if(C+=2,C=aW(D,C),C.err)return C}else if(D[C]==="<"){let f=C;if(C++,D[C]==="!"){C=oW(D,C);continue}else{let B=!1;if(D[C]==="/")B=!0,C++;let h="";for(;C<D.length&&D[C]!==">"&&D[C]!==" "&&D[C]!=="\t"&&D[C]!=="\n"&&D[C]!=="\r";C++)h+=D[C];if(h=h.trim(),h[h.length-1]==="/")h=h.substring(0,h.length-1),C--;if(!ci(h)){let A;if(h.trim().length===0)A="Invalid space after '<'.";else A="Tag '"+h+"' is an invalid name.";return yD("InvalidTag",A,B0(D,C))}const U=Pi(D,C);if(U===!1)return yD("InvalidAttr","Attributes for '"+h+"' have open quote.",B0(D,C));let I=U.value;if(C=U.index,I[I.length-1]==="/"){const A=C-I.length;I=I.substring(0,I.length-1);const Y=tW(I,F);if(Y===!0)w=!0;else return yD(Y.err.code,Y.err.msg,B0(D,A+Y.err.line))}else if(B)if(!U.tagClosed)return yD("InvalidTag","Closing tag '"+h+"' doesn't have proper closing.",B0(D,C));else if(I.trim().length>0)return yD("InvalidTag","Closing tag '"+h+"' can't have attributes or invalid starting.",B0(D,f));else if(E.length===0)return yD("InvalidTag","Closing tag '"+h+"' has not been opened.",B0(D,f));else{const A=E.pop();if(h!==A.tagName){let Y=B0(D,A.tagStartPos);return yD("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+h+"'.",B0(D,f))}if(E.length==0)$=!0}else{const A=tW(I,F);if(A!==!0)return yD(A.err.code,A.err.msg,B0(D,C-I.length+A.err.line));if($===!0)return yD("InvalidXml","Multiple possible root nodes found.",B0(D,C));else if(F.unpairedTags.indexOf(h)!==-1);else E.push({tagName:h,tagStartPos:f});w=!0}for(C++;C<D.length;C++)if(D[C]==="<")if(D[C+1]==="!"){C++,C=oW(D,C);continue}else if(D[C+1]==="?"){if(C=aW(D,++C),C.err)return C}else break;else if(D[C]==="&"){const A=bi(D,C);if(A==-1)return yD("InvalidChar","char '&' is not expected.",B0(D,C));C=A}else if($===!0&&!pW(D[C]))return yD("InvalidXml","Extra text at the end",B0(D,C));if(D[C]==="<")C--}}else{if(pW(D[C]))continue;return yD("InvalidChar","char '"+D[C]+"' is not expected.",B0(D,C))}if(!w)return yD("InvalidXml","Start tag expected.",1);else if(E.length==1)return yD("InvalidTag","Unclosed tag '"+E[0].tagName+"'.",B0(D,E[0].tagStartPos));else if(E.length>0)return yD("InvalidXml","Invalid '"+JSON.stringify(E.map((C)=>C.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var Oi='"',ji="'",yi=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var DJ=X((si)=>{var eW={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(D,F){return F},attributeValueProcessor:function(D,F){return F},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(D,F,E){return D}},_i=function(D){return Object.assign({},eW,D)};si.buildOptions=_i;si.defaultOptions=eW});var wJ=X((XCD,EJ)=>{class FJ{constructor(D){this.tagname=D,this.child=[],this[":@"]={}}add(D,F){if(D==="__proto__")D="#__proto__";this.child.push({[D]:F})}addChild(D){if(D.tagname==="__proto__")D.tagname="#__proto__";if(D[":@"]&&Object.keys(D[":@"]).length>0)this.child.push({[D.tagname]:D.child,[":@"]:D[":@"]});else this.child.push({[D.tagname]:D.child})}}EJ.exports=FJ});var fJ=X((WCD,$J)=>{function mi(D,F){const E={};if(D[F+3]==="O"&&D[F+4]==="C"&&D[F+5]==="T"&&D[F+6]==="Y"&&D[F+7]==="P"&&D[F+8]==="E"){F=F+9;let w=1,$=!1,C=!1,f="";for(;F<D.length;F++)if(D[F]==="<"&&!C){if($&&ii(D,F)){if(F+=7,[entityName,val,F]=ni(D,F+1),val.indexOf("&")===-1)E[ti(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&pi(D,F))F+=8;else if($&&ai(D,F))F+=8;else if($&&oi(D,F))F+=9;else if(li)C=!0;else throw new Error("Invalid DOCTYPE");w++,f=""}else if(D[F]===">"){if(C){if(D[F-1]==="-"&&D[F-2]==="-")C=!1,w--}else w--;if(w===0)break}else if(D[F]==="[")$=!0;else f+=D[F];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:E,i:F}}function ni(D,F){let E="";for(;F<D.length&&(D[F]!=="'"&&D[F]!=='"');F++)E+=D[F];if(E=E.trim(),E.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=D[F++];let $="";for(;F<D.length&&D[F]!==w;F++)$+=D[F];return[E,$,F]}function li(D,F){if(D[F+1]==="!"&&D[F+2]==="-"&&D[F+3]==="-")return!0;return!1}function ii(D,F){if(D[F+1]==="!"&&D[F+2]==="E"&&D[F+3]==="N"&&D[F+4]==="T"&&D[F+5]==="I"&&D[F+6]==="T"&&D[F+7]==="Y")return!0;return!1}function pi(D,F){if(D[F+1]==="!"&&D[F+2]==="E"&&D[F+3]==="L"&&D[F+4]==="E"&&D[F+5]==="M"&&D[F+6]==="E"&&D[F+7]==="N"&&D[F+8]==="T")return!0;return!1}function ai(D,F){if(D[F+1]==="!"&&D[F+2]==="A"&&D[F+3]==="T"&&D[F+4]==="T"&&D[F+5]==="L"&&D[F+6]==="I"&&D[F+7]==="S"&&D[F+8]==="T")return!0;return!1}function oi(D,F){if(D[F+1]==="!"&&D[F+2]==="N"&&D[F+3]==="O"&&D[F+4]==="T"&&D[F+5]==="A"&&D[F+6]==="T"&&D[F+7]==="I"&&D[F+8]==="O"&&D[F+9]==="N")return!0;return!1}function ti(D){if(vi.isName(D))return D;else throw new Error(`Invalid entity name ${D}`)}var vi=Pw();$J.exports=mi});var BJ=X((JCD,CJ)=>{function Ep(D,F={}){if(F=Object.assign({},Fp,F),!D||typeof D!=="string")return D;let E=D.trim();if(F.skipLike!==void 0&&F.skipLike.test(E))return D;else if(F.hex&&ei.test(E))return Number.parseInt(E,16);else{const w=Dp.exec(E);if(w){const $=w[1],C=w[2];let f=wp(w[3]);const B=w[4]||w[6];if(!F.leadingZeros&&C.length>0&&$&&E[2]!==".")return D;else if(!F.leadingZeros&&C.length>0&&!$&&E[1]!==".")return D;else{const h=Number(E),U=""+h;if(U.search(/[eE]/)!==-1)if(F.eNotation)return h;else return D;else if(B)if(F.eNotation)return h;else return D;else if(E.indexOf(".")!==-1)if(U==="0"&&f==="")return h;else if(U===f)return h;else if($&&U==="-"+f)return h;else return D;if(C)if(f===U)return h;else if($+f===U)return h;else return D;if(E===U)return h;else if(E===$+U)return h;return D}}else return D}}function wp(D){if(D&&D.indexOf(".")!==-1){if(D=D.replace(/0+$/,""),D===".")D="0";else if(D[0]===".")D="0"+D;else if(D[D.length-1]===".")D=D.substr(0,D.length-1);return D}return D}var ei=/^[-+]?0x[a-fA-F0-9]+$/,Dp=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var Fp={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};CJ.exports=Ep});var IJ=X((zCD,AJ)=>{function Cp(D){const F=Object.keys(D);for(let E=0;E<F.length;E++){const w=F[E];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:D[w]}}}function Bp(D,F,E,w,$,C,f){if(D!==void 0){if(this.options.trimValues&&!w)D=D.trim();if(D.length>0){if(!f)D=this.replaceEntitiesValue(D);const B=this.options.tagValueProcessor(F,D,E,$,C);if(B===null||B===void 0)return D;else if(typeof B!==typeof D||B!==D)return B;else if(this.options.trimValues)return N9(D,this.options.parseTagValue,this.options.numberParseOptions);else if(D.trim()===D)return N9(D,this.options.parseTagValue,this.options.numberParseOptions);else return D}}}function hp(D){if(this.options.removeNSPrefix){const F=D.split(":"),E=D.charAt(0)==="/"?"/":"";if(F[0]==="xmlns")return"";if(F.length===2)D=E+F[1]}return D}function Ap(D,F,E){if(!this.options.ignoreAttributes&&typeof D==="string"){const w=hJ.getAllMatches(D,Up),$=w.length,C={};for(let f=0;f<$;f++){const B=this.resolveNameSpace(w[f][1]);let h=w[f][4],U=this.options.attributeNamePrefix+B;if(B.length){if(this.options.transformAttributeName)U=this.options.transformAttributeName(U);if(U==="__proto__")U="#__proto__";if(h!==void 0){if(this.options.trimValues)h=h.trim();h=this.replaceEntitiesValue(h);const I=this.options.attributeValueProcessor(B,h,F);if(I===null||I===void 0)C[U]=h;else if(typeof I!==typeof h||I!==h)C[U]=I;else C[U]=N9(h,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)C[U]=!0}}if(!Object.keys(C).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=C,f}return C}}function Gp(D,F,E){const w=this.options.updateTag(F.tagname,E,F[":@"]);if(w===!1);else if(typeof w==="string")F.tagname=w,D.addChild(F);else D.addChild(F)}function Yp(D,F,E,w){if(D){if(w===void 0)w=Object.keys(F.child).length===0;if(D=this.parseTextData(D,F.tagname,E,!1,F[":@"]?Object.keys(F[":@"]).length!==0:!1,w),D!==void 0&&D!=="")F.add(this.options.textNodeName,D);D=""}return D}function Zp(D,F,E){const w="*."+E;for(let $ in D){const C=D[$];if(w===C||F===C)return!0}return!1}function Xp(D,F,E=">"){let w,$="";for(let C=F;C<D.length;C++){let f=D[C];if(w){if(f===w)w=""}else if(f==='"'||f==="'")w=f;else if(f===E[0])if(E[1]){if(D[C+1]===E[1])return{data:$,index:C}}else return{data:$,index:C};else if(f==="\t")f=" ";$+=f}}function a8(D,F,E,w){const $=D.indexOf(F,E);if($===-1)throw new Error(w);else return $+F.length-1}function V9(D,F,E,w=">"){const $=Xp(D,F+1,w);if(!$)return;let C=$.data;const f=$.index,B=C.search(/\s/);let h=C,U=!0;if(B!==-1)h=C.substring(0,B),C=C.substring(B+1).trimStart();const I=h;if(E){const A=h.indexOf(":");if(A!==-1)h=h.substr(A+1),U=h!==$.data.substr(A+1)}return{tagName:h,tagExp:C,closeIndex:f,attrExpPresent:U,rawTagName:I}}function Wp(D,F,E){const w=E;let $=1;for(;E<D.length;E++)if(D[E]==="<")if(D[E+1]==="/"){const C=a8(D,">",E,`${F} is not closed`);if(D.substring(E+2,C).trim()===F){if($--,$===0)return{tagContent:D.substring(w,E),i:C}}E=C}else if(D[E+1]==="?")E=a8(D,"?>",E+1,"StopNode is not closed.");else if(D.substr(E+1,3)==="!--")E=a8(D,"-->",E+3,"StopNode is not closed.");else if(D.substr(E+1,2)==="![")E=a8(D,"]]>",E,"StopNode is not closed.")-2;else{const C=V9(D,E,">");if(C){if((C&&C.tagName)===F&&C.tagExp[C.tagExp.length-1]!=="/")$++;E=C.closeIndex}}}function N9(D,F,E){if(F&&typeof D==="string"){const w=D.trim();if(w==="true")return!0;else if(w==="false")return!1;else return fp(D,E)}else if(hJ.isExist(D))return D;else return""}var hJ=Pw(),E3=wJ(),$p=fJ(),fp=BJ();class UJ{constructor(D){this.options=D,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(F,E)=>String.fromCharCode(Number.parseInt(E,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(F,E)=>String.fromCharCode(Number.parseInt(E,16))}},this.addExternalEntities=Cp,this.parseXml=Ip,this.parseTextData=Bp,this.resolveNameSpace=hp,this.buildAttributesMap=Ap,this.isItStopNode=Zp,this.replaceEntitiesValue=Mp,this.readStopNodeData=Wp,this.saveTextToParentTag=Yp,this.addChild=Gp}}var Up=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),Ip=function(D){D=D.replace(/\r\n?/g,"\n");const F=new E3("!xml");let E=F,w="",$="";for(let C=0;C<D.length;C++)if(D[C]==="<")if(D[C+1]==="/"){const B=a8(D,">",C,"Closing Tag is not closed.");let h=D.substring(C+2,B).trim();if(this.options.removeNSPrefix){const A=h.indexOf(":");if(A!==-1)h=h.substr(A+1)}if(this.options.transformTagName)h=this.options.transformTagName(h);if(E)w=this.saveTextToParentTag(w,E,$);const U=$.substring($.lastIndexOf(".")+1);if(h&&this.options.unpairedTags.indexOf(h)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${h}>`);let I=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)I=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=$.lastIndexOf(".");$=$.substring(0,I),E=this.tagsNodeStack.pop(),w="",C=B}else if(D[C+1]==="?"){let B=V9(D,C,!1,"?>");if(!B)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,E,$),this.options.ignoreDeclaration&&B.tagName==="?xml"||this.options.ignorePiTags);else{const h=new E3(B.tagName);if(h.add(this.options.textNodeName,""),B.tagName!==B.tagExp&&B.attrExpPresent)h[":@"]=this.buildAttributesMap(B.tagExp,$,B.tagName);this.addChild(E,h,$)}C=B.closeIndex+1}else if(D.substr(C+1,3)==="!--"){const B=a8(D,"-->",C+4,"Comment is not closed.");if(this.options.commentPropName){const h=D.substring(C+4,B-2);w=this.saveTextToParentTag(w,E,$),E.add(this.options.commentPropName,[{[this.options.textNodeName]:h}])}C=B}else if(D.substr(C+1,2)==="!D"){const B=$p(D,C);this.docTypeEntities=B.entities,C=B.i}else if(D.substr(C+1,2)==="!["){const B=a8(D,"]]>",C,"CDATA is not closed.")-2,h=D.substring(C+9,B);w=this.saveTextToParentTag(w,E,$);let U=this.parseTextData(h,E.tagname,$,!0,!1,!0,!0);if(U==null)U="";if(this.options.cdataPropName)E.add(this.options.cdataPropName,[{[this.options.textNodeName]:h}]);else E.add(this.options.textNodeName,U);C=B+2}else{let B=V9(D,C,this.options.removeNSPrefix),h=B.tagName;const U=B.rawTagName;let{tagExp:I,attrExpPresent:A,closeIndex:Y}=B;if(this.options.transformTagName)h=this.options.transformTagName(h);if(E&&w){if(E.tagname!=="!xml")w=this.saveTextToParentTag(w,E,$,!1)}const G=E;if(G&&this.options.unpairedTags.indexOf(G.tagname)!==-1)E=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(h!==F.tagname)$+=$?"."+h:h;if(this.isItStopNode(this.options.stopNodes,$,h)){let Z="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(h[h.length-1]==="/")h=h.substr(0,h.length-1),$=$.substr(0,$.length-1),I=h;else I=I.substr(0,I.length-1);C=B.closeIndex}else if(this.options.unpairedTags.indexOf(h)!==-1)C=B.closeIndex;else{const W=this.readStopNodeData(D,U,Y+1);if(!W)throw new Error(`Unexpected end of ${U}`);C=W.i,Z=W.tagContent}const z=new E3(h);if(h!==I&&A)z[":@"]=this.buildAttributesMap(I,$,h);if(Z)Z=this.parseTextData(Z,h,$,!0,A,!0,!0);$=$.substr(0,$.lastIndexOf(".")),z.add(this.options.textNodeName,Z),this.addChild(E,z,$)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(h[h.length-1]==="/")h=h.substr(0,h.length-1),$=$.substr(0,$.length-1),I=h;else I=I.substr(0,I.length-1);if(this.options.transformTagName)h=this.options.transformTagName(h);const Z=new E3(h);if(h!==I&&A)Z[":@"]=this.buildAttributesMap(I,$,h);this.addChild(E,Z,$),$=$.substr(0,$.lastIndexOf("."))}else{const Z=new E3(h);if(this.tagsNodeStack.push(E),h!==I&&A)Z[":@"]=this.buildAttributesMap(I,$,h);this.addChild(E,Z,$),E=Z}w="",C=Y}}else w+=D[C];return F.child},Mp=function(D){if(this.options.processEntities){for(let F in this.docTypeEntities){const E=this.docTypeEntities[F];D=D.replace(E.regx,E.val)}for(let F in this.lastEntities){const E=this.lastEntities[F];D=D.replace(E.regex,E.val)}if(this.options.htmlEntities)for(let F in this.htmlEntities){const E=this.htmlEntities[F];D=D.replace(E.regex,E.val)}D=D.replace(this.ampEntity.regex,this.ampEntity.val)}return D};AJ.exports=UJ});var MJ=X((Sp)=>{function Jp(D,F){return GJ(D,F)}function GJ(D,F,E){let w;const $={};for(let C=0;C<D.length;C++){const f=D[C],B=zp(f);let h="";if(E===void 0)h=B;else h=E+"."+B;if(B===F.textNodeName)if(w===void 0)w=f[B];else w+=""+f[B];else if(B===void 0)continue;else if(f[B]){let U=GJ(f[B],F,h);const I=Kp(U,F);if(f[":@"])Tp(U,f[":@"],h,F);else if(Object.keys(U).length===1&&U[F.textNodeName]!==void 0&&!F.alwaysCreateTextNode)U=U[F.textNodeName];else if(Object.keys(U).length===0)if(F.alwaysCreateTextNode)U[F.textNodeName]="";else U="";if($[B]!==void 0&&$.hasOwnProperty(B)){if(!Array.isArray($[B]))$[B]=[$[B]];$[B].push(U)}else if(F.isArray(B,h,I))$[B]=[U];else $[B]=U}}if(typeof w==="string"){if(w.length>0)$[F.textNodeName]=w}else if(w!==void 0)$[F.textNodeName]=w;return $}function zp(D){const F=Object.keys(D);for(let E=0;E<F.length;E++){const w=F[E];if(w!==":@")return w}}function Tp(D,F,E,w){if(F){const $=Object.keys(F),C=$.length;for(let f=0;f<C;f++){const B=$[f];if(w.isArray(B,E+"."+B,!0,!0))D[B]=[F[B]];else D[B]=F[B]}}}function Kp(D,F){const{textNodeName:E}=F,w=Object.keys(D).length;if(w===0)return!0;if(w===1&&(D[E]||typeof D[E]==="boolean"||D[E]===0))return!0;return!1}Sp.prettify=Jp});var XJ=X((KCD,ZJ)=>{var{buildOptions:Hp}=DJ(),Lp=IJ(),{prettify:Rp}=MJ(),Vp=R9();class YJ{constructor(D){this.externalEntities={},this.options=Hp(D)}parse(D,F){if(typeof D==="string");else if(D.toString)D=D.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(F){if(F===!0)F={};const $=Vp.validate(D,F);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}const E=new Lp(this.options);E.addExternalEntities(this.externalEntities);const w=E.parseXml(D);if(this.options.preserveOrder||w===void 0)return w;else return Rp(w,this.options)}addEntity(D,F){if(F.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(D.indexOf("&")!==-1||D.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(F==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[D]=F}}ZJ.exports=YJ});var KJ=X((SCD,TJ)=>{function Np(D,F){let E="";if(F.format&&F.indentBy.length>0)E="\n";return JJ(D,F,"",E)}function JJ(D,F,E,w){let $="",C=!1;for(let f=0;f<D.length;f++){const B=D[f],h=qp(B);if(h===void 0)continue;let U="";if(E.length===0)U=h;else U=`${E}.${h}`;if(h===F.textNodeName){let Z=B[h];if(!Op(U,F))Z=F.tagValueProcessor(h,Z),Z=zJ(Z,F);if(C)$+=w;$+=Z,C=!1;continue}else if(h===F.cdataPropName){if(C)$+=w;$+=`<![CDATA[${B[h][0][F.textNodeName]}]]>`,C=!1;continue}else if(h===F.commentPropName){$+=w+`<!--${B[h][0][F.textNodeName]}-->`,C=!0;continue}else if(h[0]==="?"){const Z=WJ(B[":@"],F),z=h==="?xml"?"":w;let W=B[h][0][F.textNodeName];W=W.length!==0?" "+W:"",$+=z+`<${h}${W}${Z}?>`,C=!0;continue}let I=w;if(I!=="")I+=F.indentBy;const A=WJ(B[":@"],F),Y=w+`<${h}${A}`,G=JJ(B[h],F,U,I);if(F.unpairedTags.indexOf(h)!==-1)if(F.suppressUnpairedNode)$+=Y+">";else $+=Y+"/>";else if((!G||G.length===0)&&F.suppressEmptyNode)$+=Y+"/>";else if(G&&G.endsWith(">"))$+=Y+`>${G}${w}</${h}>`;else{if($+=Y+">",G&&w!==""&&(G.includes("/>")||G.includes("</")))$+=w+F.indentBy+G+w;else $+=G;$+=`</${h}>`}C=!0}return $}function qp(D){const F=Object.keys(D);for(let E=0;E<F.length;E++){const w=F[E];if(!D.hasOwnProperty(w))continue;if(w!==":@")return w}}function WJ(D,F){let E="";if(D&&!F.ignoreAttributes)for(let w in D){if(!D.hasOwnProperty(w))continue;let $=F.attributeValueProcessor(w,D[w]);if($=zJ($,F),$===!0&&F.suppressBooleanAttributes)E+=` ${w.substr(F.attributeNamePrefix.length)}`;else E+=` ${w.substr(F.attributeNamePrefix.length)}="${$}"`}return E}function Op(D,F){D=D.substr(0,D.length-F.textNodeName.length-1);let E=D.substr(D.lastIndexOf(".")+1);for(let w in F.stopNodes)if(F.stopNodes[w]===D||F.stopNodes[w]==="*."+E)return!0;return!1}function zJ(D,F){if(D&&D.length>0&&F.processEntities)for(let E=0;E<F.entities.length;E++){const w=F.entities[E];D=D.replace(w.regex,w.val)}return D}TJ.exports=Np});var QJ=X((QCD,SJ)=>{function U8(D){if(this.options=Object.assign({},Pp,D),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=bp;if(this.processTextOrObjNode=yp,this.options.format)this.indentate=kp,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function yp(D,F,E){const w=this.j2x(D,E+1);if(D[this.options.textNodeName]!==void 0&&Object.keys(D).length===1)return this.buildTextValNode(D[this.options.textNodeName],F,w.attrStr,E);else return this.buildObjectNode(w.val,F,w.attrStr,E)}function kp(D){return this.options.indentBy.repeat(D)}function bp(D){if(D.startsWith(this.options.attributeNamePrefix)&&D!==this.options.textNodeName)return D.substr(this.attrPrefixLen);else return!1}var jp=KJ(),Pp={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(D,F){return F},attributeValueProcessor:function(D,F){return F},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};U8.prototype.build=function(D){if(this.options.preserveOrder)return jp(D,this.options);else{if(Array.isArray(D)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)D={[this.options.arrayNodeName]:D};return this.j2x(D,0).val}};U8.prototype.j2x=function(D,F){let E="",w="";for(let $ in D){if(!Object.prototype.hasOwnProperty.call(D,$))continue;if(typeof D[$]==="undefined"){if(this.isAttribute($))w+=""}else if(D[$]===null)if(this.isAttribute($))w+="";else if($[0]==="?")w+=this.indentate(F)+"<"+$+"?"+this.tagEndChar;else w+=this.indentate(F)+"<"+$+"/"+this.tagEndChar;else if(D[$]instanceof Date)w+=this.buildTextValNode(D[$],$,"",F);else if(typeof D[$]!=="object"){const C=this.isAttribute($);if(C)E+=this.buildAttrPairStr(C,""+D[$]);else if($===this.options.textNodeName){let f=this.options.tagValueProcessor($,""+D[$]);w+=this.replaceEntitiesValue(f)}else w+=this.buildTextValNode(D[$],$,"",F)}else if(Array.isArray(D[$])){const C=D[$].length;let f="",B="";for(let h=0;h<C;h++){const U=D[$][h];if(typeof U==="undefined");else if(U===null)if($[0]==="?")w+=this.indentate(F)+"<"+$+"?"+this.tagEndChar;else w+=this.indentate(F)+"<"+$+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const I=this.j2x(U,F+1);if(f+=I.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))B+=I.attrStr}else f+=this.processTextOrObjNode(U,$,F);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor($,U);I=this.replaceEntitiesValue(I),f+=I}else f+=this.buildTextValNode(U,$,"",F)}if(this.options.oneListGroup)f=this.buildObjectNode(f,$,B,F);w+=f}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){const C=Object.keys(D[$]),f=C.length;for(let B=0;B<f;B++)E+=this.buildAttrPairStr(C[B],""+D[$][C[B]])}else w+=this.processTextOrObjNode(D[$],$,F)}return{attrStr:E,val:w}};U8.prototype.buildAttrPairStr=function(D,F){if(F=this.options.attributeValueProcessor(D,""+F),F=this.replaceEntitiesValue(F),this.options.suppressBooleanAttributes&&F==="true")return" "+D;else return" "+D+'="'+F+'"'};U8.prototype.buildObjectNode=function(D,F,E,w){if(D==="")if(F[0]==="?")return this.indentate(w)+"<"+F+E+"?"+this.tagEndChar;else return this.indentate(w)+"<"+F+E+this.closeTag(F)+this.tagEndChar;else{let $="</"+F+this.tagEndChar,C="";if(F[0]==="?")C="?",$="";if((E||E==="")&&D.indexOf("<")===-1)return this.indentate(w)+"<"+F+E+C+">"+D+$;else if(this.options.commentPropName!==!1&&F===this.options.commentPropName&&C.length===0)return this.indentate(w)+`<!--${D}-->`+this.newLine;else return this.indentate(w)+"<"+F+E+C+this.tagEndChar+D+this.indentate(w)+$}};U8.prototype.closeTag=function(D){let F="";if(this.options.unpairedTags.indexOf(D)!==-1){if(!this.options.suppressUnpairedNode)F="/"}else if(this.options.suppressEmptyNode)F="/";else F=`></${D}`;return F};U8.prototype.buildTextValNode=function(D,F,E,w){if(this.options.cdataPropName!==!1&&F===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${D}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&F===this.options.commentPropName)return this.indentate(w)+`<!--${D}-->`+this.newLine;else if(F[0]==="?")return this.indentate(w)+"<"+F+E+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(F,D);if($=this.replaceEntitiesValue($),$==="")return this.indentate(w)+"<"+F+E+this.closeTag(F)+this.tagEndChar;else return this.indentate(w)+"<"+F+E+">"+$+"</"+F+this.tagEndChar}};U8.prototype.replaceEntitiesValue=function(D){if(D&&D.length>0&&this.options.processEntities)for(let F=0;F<this.options.entities.length;F++){const E=this.options.entities[F];D=D.replace(E.regex,E.val)}return D};SJ.exports=U8});var LJ=X((HCD,HJ)=>{var xp=R9(),cp=XJ(),gp=QJ();HJ.exports={XMLParser:cp,XMLValidator:xp,XMLBuilder:gp}});var jJ=X((LCD,OJ)=>{var{defineProperty:yw,getOwnPropertyDescriptor:rp,getOwnPropertyNames:_p}=Object,sp=Object.prototype.hasOwnProperty,q0=(D,F)=>yw(D,"name",{value:F,configurable:!0}),up=(D,F)=>{for(var E in F)yw(D,E,{get:F[E],enumerable:!0})},dp=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of _p(F))if(!sp.call(D,$)&&$!==E)yw(D,$,{get:()=>F[$],enumerable:!(w=rp(F,$))||w.enumerable})}return D},vp=(D)=>dp(yw({},"__esModule",{value:!0}),D),RJ={};up(RJ,{_toBool:()=>np,_toNum:()=>lp,_toStr:()=>mp,awsExpectUnion:()=>pp,loadRestJsonErrorCode:()=>tp,loadRestXmlErrorCode:()=>Ea,parseJsonBody:()=>NJ,parseJsonErrorBody:()=>op,parseXmlBody:()=>qJ,parseXmlErrorBody:()=>Fa});OJ.exports=vp(RJ);var mp=q0((D)=>{if(D==null)return D;if(typeof D==="number"||typeof D==="bigint"){const F=new Error(`Received number ${D} where a string was expected.`);return F.name="Warning",console.warn(F),String(D)}if(typeof D==="boolean"){const F=new Error(`Received boolean ${D} where a string was expected.`);return F.name="Warning",console.warn(F),String(D)}return D},"_toStr"),np=q0((D)=>{if(D==null)return D;if(typeof D==="string"){const F=D.toLowerCase();if(D!==""&&F!=="false"&&F!=="true"){const E=new Error(`Received string "${D}" where a boolean was expected.`);E.name="Warning",console.warn(E)}return D!==""&&F!=="false"}return D},"_toBool"),lp=q0((D)=>{if(D==null)return D;if(typeof D==="string"){const F=Number(D);if(F.toString()!==D){const E=new Error(`Received string "${D}" where a number was expected.`);return E.name="Warning",console.warn(E),D}return F}return D},"_toNum"),ip=N6(),pp=q0((D)=>{if(D==null)return;if(typeof D==="object"&&"__type"in D)delete D.__type;return ip.expectUnion(D)},"awsExpectUnion"),ap=N6(),VJ=q0((D,F)=>ap.collectBody(D,F).then((E)=>F.utf8Encoder(E)),"collectBodyString"),NJ=q0((D,F)=>VJ(D,F).then((E)=>{if(E.length)try{return JSON.parse(E)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:E});throw w}return{}}),"parseJsonBody"),op=q0(async(D,F)=>{const E=await NJ(D,F);return E.message=E.message??E.Message,E},"parseJsonErrorBody"),tp=q0((D,F)=>{const E=q0((C,f)=>Object.keys(C).find((B)=>B.toLowerCase()===f.toLowerCase()),"findKey"),w=q0((C)=>{let f=C;if(typeof f==="number")f=f.toString();if(f.indexOf(",")>=0)f=f.split(",")[0];if(f.indexOf(":")>=0)f=f.split(":")[0];if(f.indexOf("#")>=0)f=f.split("#")[1];return f},"sanitizeErrorCode"),$=E(D.headers,"x-amzn-errortype");if($!==void 0)return w(D.headers[$]);if(F.code!==void 0)return w(F.code);if(F.__type!==void 0)return w(F.__type)},"loadRestJsonErrorCode"),ep=N6(),Da=LJ(),qJ=q0((D,F)=>VJ(D,F).then((E)=>{if(E.length){const w=new Da.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(h,U)=>U.trim()===""&&U.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let $;try{$=w.parse(E,!0)}catch(h){if(h&&typeof h==="object")Object.defineProperty(h,"$responseBodyText",{value:E});throw h}const C="#text",f=Object.keys($)[0],B=$[f];if(B[C])B[f]=B[C],delete B[C];return ep.getValueFromTextNode(B)}return{}}),"parseXmlBody"),Fa=q0(async(D,F)=>{const E=await qJ(D,F);if(E.Error)E.Error.message=E.Error.message??E.Error.Message;return E},"parseXmlErrorBody"),Ea=q0((D,F)=>{var E;if(((E=F==null?void 0:F.Error)==null?void 0:E.Code)!==void 0)return F.Error.Code;if((F==null?void 0:F.Code)!==void 0)return F.Code;if(D.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var jD=X((w3)=>{Object.defineProperty(w3,"__esModule",{value:!0});var q9=Y9();q9.__exportStar(C0(),w3);q9.__exportStar(nW(),w3);q9.__exportStar(jJ(),w3)});async function PJ(D,F,E){const w=E.request;if(typeof F.accountIdEndpointMode==="function")switch(await F.accountIdEndpointMode?.()){case"disabled":y6.setFeature(D,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":y6.setFeature(D,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":y6.setFeature(D,"ACCOUNT_ID_MODE_REQUIRED","R");break}const $=D.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){const C=$;if(C.accountId)y6.setFeature(D,"RESOLVED_ACCOUNT_ID","T");for(let[f,B]of Object.entries(C.$source??{}))y6.setFeature(D,f,B)}}var y6;var yJ=M(()=>{y6=Q(jD(),1)});var O9="user-agent",kw="x-amz-user-agent",j9=" ",bw="/",kJ,bJ,P9="-";var xJ=M(()=>{kJ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,bJ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function cJ(D){let F="";for(let E in D){const w=D[E];if(F.length+w.length+1<=1024){if(F.length)F+=","+w;else F+=w;continue}break}return F}var wa=(D)=>(F,E)=>async(w)=>{const{request:$}=w;if(!gD.isInstance($))return F(w);const{headers:C}=$,f=E?.userAgent?.map(xw)||[],B=(await D.defaultUserAgentProvider()).map(xw);await PJ(E,D,w);const h=E;B.push(`m/${cJ(Object.assign({},E.__smithy_context?.features,h.__aws_sdk_context?.features))}`);const U=D?.customUserAgent?.map(xw)||[],I=await D.userAgentAppId();if(I)B.push(xw([`app/${I}`]));const A=qX(),Y=(A?[A]:[]).concat([...B,...f,...U]).join(j9),G=[...B.filter((Z)=>Z.startsWith("aws-sdk-")),...U].join(j9);if(D.runtime!=="browser"){if(G)C[kw]=C[kw]?`${C[O9]} ${G}`:G;C[O9]=Y}else C[kw]=Y;return F({...w,request:$})},xw=(D)=>{const F=D[0].split(bw).map((f)=>f.replace(kJ,P9)).join(bw),E=D[1]?.replace(bJ,P9),w=F.indexOf(bw),$=F.substring(0,w);let C=F.substring(w+1);if($==="api")C=C.toLowerCase();return[$,C,E].filter((f)=>f&&f.length>0).reduce((f,B,h)=>{switch(h){case 0:return B;case 1:return`${f}/${B}`;default:return`${f}#${B}`}},"")},$a,g2=(D)=>({applyToStack:(F)=>{F.add(wa(D),$a)}});var gJ=M(()=>{i8();dD();yJ();xJ();$a={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var o8=M(()=>{sZ();gJ()});var k6=(D,F,E)=>{if(!(F in D))return;if(D[F]==="true")return!0;if(D[F]==="false")return!1;throw new Error(`Cannot load ${E} "${F}". Expected "true" or "false", got ${D[F]}.`)};var A8;var rJ=M(()=>{(function(D){D.ENV="env",D.CONFIG="shared config entry"})(A8||(A8={}))});var y9=M(()=>{rJ()});var fa="AWS_USE_DUALSTACK_ENDPOINT",Ca="use_dualstack_endpoint",r2;var _J=M(()=>{y9();r2={environmentVariableSelector:(D)=>k6(D,fa,A8.ENV),configFileSelector:(D)=>k6(D,Ca,A8.CONFIG),default:!1}});var Ba="AWS_USE_FIPS_ENDPOINT",ha="use_fips_endpoint",_2;var sJ=M(()=>{y9();_2={environmentVariableSelector:(D)=>k6(D,Ba,A8.ENV),configFileSelector:(D)=>k6(D,ha,A8.CONFIG),default:!1}});var k9,v0=(D)=>D[k9.SMITHY_CONTEXT_KEY]||(D[k9.SMITHY_CONTEXT_KEY]={});var uJ=M(()=>{k9=Q(W0(),1)});var _D=(D)=>{if(typeof D==="function")return D;const F=Promise.resolve(D);return()=>F};var Z2=M(()=>{uJ()});var dJ=M(()=>{Z2()});var vJ=M(()=>{Z2()});var mJ=M(()=>{_J();sJ();dJ();vJ()});var m0,s2;var nJ=M(()=>{m0={environmentVariableSelector:(D)=>D.AWS_REGION,configFileSelector:(D)=>D.region,default:()=>{throw new Error("Region is missing")}},s2={preferredFile:"credentials"}});var cw=(D)=>typeof D==="string"&&(D.startsWith("fips-")||D.endsWith("-fips"));var b9=(D)=>cw(D)?["fips-aws-global","aws-fips"].includes(D)?"us-east-1":D.replace(/fips-(dkr-|prod-)?|-fips/,""):D;var lJ=()=>{};var u2=(D)=>{const{region:F,useFipsEndpoint:E}=D;if(!F)throw new Error("Region is missing");return{...D,region:async()=>{if(typeof F==="string")return b9(F);const w=await F();return b9(w)},useFipsEndpoint:async()=>{const w=typeof F==="string"?F:await F();if(cw(w))return!0;return typeof E!=="function"?Promise.resolve(!!E):E()}}};var iJ=M(()=>{lJ()});var pJ=M(()=>{nJ();iJ()});var aJ=()=>{};var oJ=()=>{};var tJ=()=>{};var eJ=M(()=>{aJ();oJ();tJ()});var n0=M(()=>{mJ();pJ();eJ()});function Ua(D){return(F)=>async(E)=>{const w=E.request;if(gD.isInstance(w)){const{body:$,headers:C}=w;if($&&Object.keys(C).map((f)=>f.toLowerCase()).indexOf(Fz)===-1)try{const f=D($);w.headers={...w.headers,[Fz]:String(f)}}catch(f){}}return F({...E,request:w})}}var Fz="content-length",Aa,d2=(D)=>({applyToStack:(F)=>{F.add(Ua(D.bodyLengthChecker),Aa)}});var b6=M(()=>{dD();Aa={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var Ez=async(D)=>{const F=D?.Bucket||"";if(typeof D.Bucket==="string")D.Bucket=F.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Za(F)){if(D.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!Ya(F)||F.indexOf(".")!==-1&&!String(D.Endpoint).startsWith("http:")||F.toLowerCase()!==F||F.length<3)D.ForcePathStyle=!0;if(D.DisableMultiRegionAccessPoints)D.disableMultiRegionAccessPoints=!0,D.DisableMRAP=!0;return D},Ia,Ga,Ma,Ya=(D)=>Ia.test(D)&&!Ga.test(D)&&!Ma.test(D),Za=(D)=>{const[F,E,w,,,$]=D.split(":"),C=F==="arn"&&D.split(":").length>=6,f=Boolean(C&&E&&w&&$);if(C&&!f)throw new Error(`Invalid ARN: ${D} was an invalid ARN.`);return f};var wz=M(()=>{Ia=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ga=/(\d+\.){3}\d+/,Ma=/\.\./});var $z=M(()=>{wz()});var fz=(D,F,E)=>{const w=async()=>{const $=E[D]??E[F];if(typeof $==="function")return $();return $};if(D==="credentialScope"||F==="CredentialScope")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return $?.credentialScope??$?.CredentialScope};if(D==="accountId"||F==="AccountId")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return $?.accountId??$?.AccountId};if(D==="endpoint"||F==="endpoint")return async()=>{const $=await w();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:C,hostname:f,port:B,path:h}=$;return`${C}//${f}${B?":"+B:""}${h}`}}return $};return w};var l0;var $3=M(()=>{l0=class l0 extends Error{constructor(D,F=!0){let E,w=!0;if(typeof F==="boolean")E=void 0,w=F;else if(F!=null&&typeof F==="object")E=F.logger,w=F.tryNextLink??!0;super(D);this.name="ProviderError",this.tryNextLink=w,Object.setPrototypeOf(this,l0.prototype),E?.debug?.(`@smithy/property-provider ${w?"->":"(!)"} ${D}`)}static from(D,F=!0){return Object.assign(new this(D.message,F),D)}}});var x;var Cz=M(()=>{$3();x=class x extends l0{constructor(D,F=!0){super(D,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,x.prototype)}}});var J0;var Bz=M(()=>{$3();J0=class J0 extends l0{constructor(D,F=!0){super(D,F);this.name="TokenProviderError",Object.setPrototypeOf(this,J0.prototype)}}});var N1=(...D)=>async()=>{if(D.length===0)throw new l0("No providers in chain");let F;for(let E of D)try{return await E()}catch(w){if(F=w,w?.tryNextLink)continue;throw w}throw F};var hz=M(()=>{$3()});var Uz=(D)=>()=>Promise.resolve(D);var t8=(D,F,E)=>{let w,$,C,f=!1;const B=async()=>{if(!$)$=D();try{w=await $,C=!0,f=!1}finally{$=void 0}return w};if(F===void 0)return async(h)=>{if(!C||h?.forceRefresh)w=await B();return w};return async(h)=>{if(!C||h?.forceRefresh)w=await B();if(f)return w;if(E&&!E(w))return f=!0,w;if(F(w))return await B(),w;return w}};var $D=M(()=>{Cz();$3();Bz();hz()});function gw(D){try{const F=new Set(Array.from(D.match(/([A-Z_]){3,}/g)??[]));return F.delete("CONFIG"),F.delete("CONFIG_PREFIX_SEPARATOR"),F.delete("ENV"),[...F].join(", ")}catch(F){return D}}var Az=(D,F)=>async()=>{try{const E=D(process.env);if(E===void 0)throw new Error;return E}catch(E){throw new x(E.message||`Not found in ENV: ${gw(D.toString())}`,{logger:F})}};var Iz=M(()=>{$D()});import{homedir as Xa}from"os";import{sep as Wa}from"path";var x9,Ja=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},I8=()=>{const{HOME:D,USERPROFILE:F,HOMEPATH:E,HOMEDRIVE:w=`C:${Wa}`}=process.env;if(D)return D;if(F)return F;if(E)return`${w}${E}`;const $=Ja();if(!x9[$])x9[$]=Xa();return x9[$]};var x6=M(()=>{x9={}});var Gz="AWS_PROFILE",i0=(D)=>D.profile||process.env.AWS_PROFILE||"default";import{createHash as za}from"crypto";import{join as Ta}from"path";var rw=(D)=>{const E=za("sha1").update(D).digest("hex");return Ta(I8(),".aws","sso","cache",`${E}.json`)};var c9=M(()=>{x6()});import{promises as Ka}from"fs";var Sa,_w=async(D)=>{const F=rw(D),E=await Sa(F,"utf8");return JSON.parse(E)};var Mz=M(()=>{c9();({readFile:Sa}=Ka)});var g9,Yz=(D)=>Object.entries(D).filter(([F])=>{const E=F.indexOf(p0);if(E===-1)return!1;return Object.values(g9.IniSectionType).includes(F.substring(0,E))}).reduce((F,[E,w])=>{const $=E.indexOf(p0),C=E.substring(0,$)===g9.IniSectionType.PROFILE?E.substring($+1):E;return F[C]=w,F},{...D.default&&{default:D.default}});var Zz=M(()=>{g9=Q(W0(),1);c6()});import{join as Qa}from"path";var Ha="AWS_CONFIG_FILE",sw=()=>process.env[Ha]||Qa(I8(),".aws","config");var r9=M(()=>{x6()});import{join as La}from"path";var Ra="AWS_SHARED_CREDENTIALS_FILE",Xz=()=>process.env[Ra]||La(I8(),".aws","credentials");var Wz=M(()=>{x6()});var Jz,Va,Na,f3=(D)=>{const F={};let E,w;for(let $ of D.split(/\r?\n/)){const C=$.split(/(^|\s)[;#]/)[0].trim();if(C[0]==="["&&C[C.length-1]==="]"){E=void 0,w=void 0;const B=C.substring(1,C.length-1),h=Va.exec(B);if(h){const[,U,,I]=h;if(Object.values(Jz.IniSectionType).includes(U))E=[U,I].join(p0)}else E=B;if(Na.includes(B))throw new Error(`Found invalid profile name "${B}"`)}else if(E){const B=C.indexOf("=");if(![0,-1].includes(B)){const[h,U]=[C.substring(0,B).trim(),C.substring(B+1).trim()];if(U==="")w=h;else{if(w&&$.trimStart()===$)w=void 0;F[E]=F[E]||{};const I=w?[w,h].join(p0):h;F[E][I]=U}}}}return F};var _9=M(()=>{Jz=Q(W0(),1);c6();Va=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Na=["__proto__","profile __proto__"]});import{promises as qa}from"fs";var Oa,s9,C3=(D,F)=>{if(!s9[D]||F?.ignoreCache)s9[D]=Oa(D,"utf8");return s9[D]};var u9=M(()=>{({readFile:Oa}=qa),s9={}});import{join as zz}from"path";var Tz=()=>({}),p0=".",uw=async(D={})=>{const{filepath:F=Xz(),configFilepath:E=sw()}=D,w=I8();let C=F;if(F.startsWith("~/"))C=zz(w,F.slice(2));let f=E;if(E.startsWith("~/"))f=zz(w,E.slice(2));const B=await Promise.all([C3(f,{ignoreCache:D.ignoreCache}).then(f3).then(Yz).catch(Tz),C3(C,{ignoreCache:D.ignoreCache}).then(f3).catch(Tz)]);return{configFile:B[0],credentialsFile:B[1]}};var c6=M(()=>{Zz();r9();Wz();x6();_9();u9()});var Kz,Sz=(D)=>Object.entries(D).filter(([F])=>F.startsWith(Kz.IniSectionType.SSO_SESSION+p0)).reduce((F,[E,w])=>({...F,[E.substring(E.indexOf(p0)+1)]:w}),{});var Qz=M(()=>{Kz=Q(W0(),1);c6()});var ja=()=>({}),dw=async(D={})=>C3(D.configFilepath??sw()).then(f3).then(Sz).catch(ja);var Hz=M(()=>{r9();Qz();_9();u9()});var Lz=(...D)=>{const F={};for(let E of D)for(let[w,$]of Object.entries(E))if(F[w]!==void 0)Object.assign(F[w],$);else F[w]=$;return F};var G8=async(D)=>{const F=await uw(D);return Lz(F.configFile,F.credentialsFile)};var Rz=M(()=>{c6()});var Vz=()=>{};var X2=M(()=>{x6();c9();Mz();c6();Hz();Rz();Vz()});var Nz=(D,{preferredFile:F="config",...E}={})=>async()=>{const w=i0(E),{configFile:$,credentialsFile:C}=await uw(E),f=C[w]||{},B=$[w]||{},h=F==="config"?{...f,...B}:{...B,...f};try{const I=D(h,F==="config"?$:C);if(I===void 0)throw new Error;return I}catch(U){throw new x(U.message||`Not found in config files w/ profile [${w}]: ${gw(D.toString())}`,{logger:E.logger})}};var qz=M(()=>{$D();X2()});var Pa=(D)=>typeof D==="function",Oz=(D)=>Pa(D)?async()=>await D():Uz(D);var jz=M(()=>{$D()});var i=({environmentVariableSelector:D,configFileSelector:F,default:E},w={})=>t8(N1(Az(D),Nz(F,w),Oz(E)));var Pz=M(()=>{$D();Iz();qz();jz()});var v2=M(()=>{Pz()});var yz="AWS_ENDPOINT_URL",kz="endpoint_url",bz=(D)=>({environmentVariableSelector:(F)=>{const E=D.split(" ").map((C)=>C.toUpperCase()),w=F[[yz,...E].join("_")];if(w)return w;const $=F[yz];if($)return $;return},configFileSelector:(F,E)=>{if(E&&F.services){const $=E[["services",F.services].join(p0)];if($){const C=D.split(" ").map((B)=>B.toLowerCase()),f=$[[C.join("_"),kz].join(p0)];if(f)return f}}const w=F[kz];if(w)return w;return},default:void 0});var xz=M(()=>{X2()});var vw=async(D)=>i(bz(D??""))();var d9=M(()=>{v2();xz()});function cz(D){const F={};if(D=D.replace(/^\?/,""),D)for(let E of D.split("&")){let[w,$=null]=E.split("=");if(w=decodeURIComponent(w),$)$=decodeURIComponent($);if(!(w in F))F[w]=$;else if(Array.isArray(F[w]))F[w].push($);else F[w]=[F[w],$]}return F}var eD=(D)=>{if(typeof D==="string")return eD(new URL(D));const{hostname:F,pathname:E,port:w,protocol:$,search:C}=D;let f;if(C)f=cz(C);return{hostname:F,port:w?parseInt(w):void 0,protocol:$,path:E,query:f}};var M8=()=>{};var mw=(D)=>{if(typeof D==="object"){if("url"in D)return eD(D.url);return D}return eD(D)};var nw=M(()=>{M8()});var gz=async(D,F,E,w)=>{if(!E.endpoint){let f;if(E.serviceConfiguredEndpoint)f=await E.serviceConfiguredEndpoint();else f=await vw(E.serviceId);if(f)E.endpoint=()=>Promise.resolve(mw(f))}const $=await ya(D,F,E);if(typeof E.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return E.endpointProvider($,w)},ya=async(D,F,E)=>{const w={},$=F?.getEndpointParameterInstructions?.()||{};for(let[C,f]of Object.entries($))switch(f.type){case"staticContextParams":w[C]=f.value;break;case"contextParams":w[C]=D[f.name];break;case"clientContextParams":case"builtInParams":w[C]=await fz(f.name,C,E)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(f))}if(Object.keys($).length===0)Object.assign(w,E);if(String(E.serviceId).toLowerCase()==="s3")await Ez(w);return w};var v9=M(()=>{$z();d9();nw()});var rz=M(()=>{v9();nw()});var _z=({config:D,instructions:F})=>{return(E,w)=>async($)=>{const C=await gz($.input,{getEndpointParameterInstructions(){return F}},{...D},w);w.endpointV2=C,w.authSchemes=C.properties?.authSchemes;const f=w.authSchemes?.[0];if(f){w.signing_region=f.signingRegion,w.signing_service=f.signingName;const h=v0(w)?.selectedHttpAuthScheme?.httpAuthOption;if(h)h.signingProperties=Object.assign(h.signingProperties||{},{signing_region:f.signingRegion,signingRegion:f.signingRegion,signing_service:f.signingName,signingName:f.signingName,signingRegionSet:f.signingRegionSet},f.properties)}return E({...$})}};var m9=M(()=>{Z2();v9()});var sz,ka,p=(D,F)=>({applyToStack:(E)=>{E.addRelativeTo(_z({config:D,instructions:F}),ka)}});var uz=M(()=>{sz=Q(YD(),1);m9();ka={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:sz.serializerMiddlewareOption.name}});var m2=(D)=>{const F=D.tls??!0,{endpoint:E}=D,w=E!=null?async()=>mw(await _D(E)()):void 0,C={...D,endpoint:w,tls:F,isCustomEndpoint:!!E,useDualstackEndpoint:_D(D.useDualstackEndpoint??!1),useFipsEndpoint:_D(D.useFipsEndpoint??!1)};let f=void 0;return C.serviceConfiguredEndpoint=async()=>{if(D.serviceId&&!f)f=vw(D.serviceId);return f},C};var dz=M(()=>{Z2();d9();nw()});var vz=()=>{};var UD=M(()=>{rz();m9();uz();dz();vz()});var a0,e8=3,o0;var lw=M(()=>{(function(D){D.STANDARD="standard",D.ADAPTIVE="adaptive"})(a0||(a0={}));o0=a0.STANDARD});var mz,nz,lz,iz;var pz=M(()=>{mz=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],nz=["TimeoutError","RequestTimeout","RequestTimeoutException"],lz=[500,502,503,504],iz=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var ba=(D)=>D.$metadata?.clockSkewCorrected,g6=(D)=>D.$metadata?.httpStatusCode===429||mz.includes(D.name)||D.$retryable?.throttling==!0,iw=(D)=>ba(D)||nz.includes(D.name)||iz.includes(D?.code||"")||lz.includes(D.$metadata?.httpStatusCode||0),az=(D)=>{if(D.$metadata?.httpStatusCode!==void 0){const F=D.$metadata.httpStatusCode;if(500<=F&&F<=599&&!iw(D))return!0;return!1}return!1};var B3=M(()=>{pz()});class pw{constructor(D){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=D?.beta??0.7,this.minCapacity=D?.minCapacity??1,this.minFillRate=D?.minFillRate??0.5,this.scaleConstant=D?.scaleConstant??0.4,this.smooth=D?.smooth??0.8;const F=this.getCurrentTimeInSeconds();this.lastThrottleTime=F,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(D){if(!this.enabled)return;if(this.refillTokenBucket(),D>this.currentCapacity){const F=(D-this.currentCapacity)/this.fillRate*1000;await new Promise((E)=>setTimeout(E,F))}this.currentCapacity=this.currentCapacity-D}refillTokenBucket(){const D=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=D;return}const F=(D-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+F),this.lastTimestamp=D}updateClientSendingRate(D){let F;if(this.updateMeasuredRate(),g6(D)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),F=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),F=this.cubicSuccess(this.getCurrentTimeInSeconds());const E=Math.min(F,2*this.measuredTxRate);this.updateTokenBucketRate(E)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(D){return this.getPrecise(D*this.beta)}cubicSuccess(D){return this.getPrecise(this.scaleConstant*Math.pow(D-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(D){this.refillTokenBucket(),this.fillRate=Math.max(D,this.minFillRate),this.maxCapacity=Math.max(D,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const D=this.getCurrentTimeInSeconds(),F=Math.floor(D*2)/2;if(this.requestCount++,F>this.lastTxRateBucket){const E=this.requestCount/(F-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=F}}getPrecise(D){return parseFloat(D.toFixed(8))}}var n9=M(()=>{B3()});var D6=100,h3=20000,l9=500,aw=500,i9=5,p9=10,a9=1,ow="amz-sdk-invocation-id",tw="amz-sdk-request";var oz=()=>{let D=D6;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(h3,Math.random()*2**w*D))},setDelayBase:(w)=>{D=w}}};var tz=()=>{};var o9=({retryDelay:D,retryCount:F,retryCost:E})=>{return{getRetryCount:()=>F,getRetryDelay:()=>Math.min(h3,D),getRetryCost:()=>E}};var ez=()=>{};class r6{constructor(D){this.maxAttempts=D,this.mode=a0.STANDARD,this.capacity=aw,this.retryBackoffStrategy=oz(),this.maxAttemptsProvider=typeof D==="function"?D:async()=>D}async acquireInitialRetryToken(D){return o9({retryDelay:D6,retryCount:0})}async refreshRetryTokenForRetry(D,F){const E=await this.getMaxAttempts();if(this.shouldRetry(D,F,E)){const w=F.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?l9:D6);const $=this.retryBackoffStrategy.computeNextBackoffDelay(D.getRetryCount()),C=F.retryAfterHint?Math.max(F.retryAfterHint.getTime()-Date.now()||0,$):$,f=this.getCapacityCost(w);return this.capacity-=f,o9({retryDelay:C,retryCount:D.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(D){this.capacity=Math.max(aw,this.capacity+(D.getRetryCost()??a9))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(D){return console.warn(`Max attempts provider could not resolve. Using default of ${e8}`),e8}}shouldRetry(D,F,E){return D.getRetryCount()+1<E&&this.capacity>=this.getCapacityCost(F.errorType)&&this.isRetryableError(F.errorType)}getCapacityCost(D){return D==="TRANSIENT"?p9:i9}isRetryableError(D){return D==="THROTTLING"||D==="TRANSIENT"}}var ew=M(()=>{lw();tz();ez()});class t9{constructor(D,F){this.maxAttemptsProvider=D,this.mode=a0.ADAPTIVE;const{rateLimiter:E}=F??{};this.rateLimiter=E??new pw,this.standardRetryStrategy=new r6(D)}async acquireInitialRetryToken(D){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(D)}async refreshRetryTokenForRetry(D,F){return this.rateLimiter.updateClientSendingRate(F),this.standardRetryStrategy.refreshRetryTokenForRetry(D,F)}recordSuccess(D){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(D)}}var DT=M(()=>{lw();n9();ew()});var FT=M(()=>{ew()});var ET=()=>{};var O0=M(()=>{DT();FT();n9();ew();lw();ET()});var n2,_AD,sAD,D$,uAD,dAD,vAD,mAD,nAD,lAD;var e9=M(()=>{n2=Q(Mf(),1),_AD=n2.default.v1,sAD=n2.default.v3,D$=n2.default.v4,uAD=n2.default.v5,dAD=n2.default.NIL,vAD=n2.default.version,mAD=n2.default.validate,nAD=n2.default.stringify,lAD=n2.default.parse});var wT=M(()=>{O0()});var D5=M(()=>{O0()});var F5=M(()=>{B3()});var E5=(D)=>{if(D instanceof Error)return D;if(D instanceof Object)return Object.assign(new Error,D);if(typeof D==="string")return new Error(D);return new Error(`AWS SDK error wrapper for ${D}`)};var w5=M(()=>{dD();B3();O0();wT();D5();F5()});var $T=M(()=>{O0();w5()});var fT="AWS_MAX_ATTEMPTS",CT="max_attempts",l2,i2=(D)=>{const{retryStrategy:F}=D,E=_D(D.maxAttempts??e8);return{...D,maxAttempts:E,retryStrategy:async()=>{if(F)return F;if(await _D(D.retryMode)()===a0.ADAPTIVE)return new t9(E);return new r6(E)}}},xa="AWS_RETRY_MODE",ca="retry_mode",p2;var BT=M(()=>{Z2();O0();l2={environmentVariableSelector:(D)=>{const F=D[fT];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Environment variable ${fT} mast be a number, got "${F}"`);return E},configFileSelector:(D)=>{const F=D[CT];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Shared config file entry ${CT} mast be a number, got "${F}"`);return E},default:e8},p2={environmentVariableSelector:(D)=>D[xa],configFileSelector:(D)=>D[ca],default:o0}});var hT=M(()=>{dD();O0()});var F6=(D,F)=>{const E=[];if(D)E.push(D);if(F)for(let w of F)E.push(w);return E},Y8=(D,F)=>{return`${D||"anonymous"}${F&&F.length>0?` (a.k.a. ${F.join(",")})`:""}`},_6=()=>{let D=[],F=[],E=!1;const w=new Set,$=(A)=>A.sort((Y,G)=>UT[G.step]-UT[Y.step]||AT[G.priority||"normal"]-AT[Y.priority||"normal"]),C=(A)=>{let Y=!1;const G=(Z)=>{const z=F6(Z.name,Z.aliases);if(z.includes(A)){Y=!0;for(let W of z)w.delete(W);return!1}return!0};return D=D.filter(G),F=F.filter(G),Y},f=(A)=>{let Y=!1;const G=(Z)=>{if(Z.middleware===A){Y=!0;for(let z of F6(Z.name,Z.aliases))w.delete(z);return!1}return!0};return D=D.filter(G),F=F.filter(G),Y},B=(A)=>{return D.forEach((Y)=>{A.add(Y.middleware,{...Y})}),F.forEach((Y)=>{A.addRelativeTo(Y.middleware,{...Y})}),A.identifyOnResolve?.(I.identifyOnResolve()),A},h=(A)=>{const Y=[];return A.before.forEach((G)=>{if(G.before.length===0&&G.after.length===0)Y.push(G);else Y.push(...h(G))}),Y.push(A),A.after.reverse().forEach((G)=>{if(G.before.length===0&&G.after.length===0)Y.push(G);else Y.push(...h(G))}),Y},U=(A=!1)=>{const Y=[],G=[],Z={};return D.forEach((W)=>{const J={...W,before:[],after:[]};for(let K of F6(J.name,J.aliases))Z[K]=J;Y.push(J)}),F.forEach((W)=>{const J={...W,before:[],after:[]};for(let K of F6(J.name,J.aliases))Z[K]=J;G.push(J)}),G.forEach((W)=>{if(W.toMiddleware){const J=Z[W.toMiddleware];if(J===void 0){if(A)return;throw new Error(`${W.toMiddleware} is not found when adding ${Y8(W.name,W.aliases)} middleware ${W.relation} ${W.toMiddleware}`)}if(W.relation==="after")J.after.push(W);if(W.relation==="before")J.before.push(W)}}),$(Y).map(h).reduce((W,J)=>{return W.push(...J),W},[])},I={add:(A,Y={})=>{const{name:G,override:Z,aliases:z}=Y,W={step:"initialize",priority:"normal",middleware:A,...Y},J=F6(G,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${Y8(G,z)}'`);for(let K of J){const L=D.findIndex((m)=>m.name===K||m.aliases?.some((DD)=>DD===K));if(L===-1)continue;const V=D[L];if(V.step!==W.step||W.priority!==V.priority)throw new Error(`"${Y8(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${Y8(G,z)}" middleware with ${W.priority} priority in ${W.step} step.`);D.splice(L,1)}}for(let K of J)w.add(K)}D.push(W)},addRelativeTo:(A,Y)=>{const{name:G,override:Z,aliases:z}=Y,W={middleware:A,...Y},J=F6(G,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${Y8(G,z)}'`);for(let K of J){const L=F.findIndex((m)=>m.name===K||m.aliases?.some((DD)=>DD===K));if(L===-1)continue;const V=F[L];if(V.toMiddleware!==W.toMiddleware||V.relation!==W.relation)throw new Error(`"${Y8(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${Y8(G,z)}" middleware ${W.relation} "${W.toMiddleware}" middleware.`);F.splice(L,1)}}for(let K of J)w.add(K)}F.push(W)},clone:()=>B(_6()),use:(A)=>{A.applyToStack(I)},remove:(A)=>{if(typeof A==="string")return C(A);else return f(A)},removeByTag:(A)=>{let Y=!1;const G=(Z)=>{const{tags:z,name:W,aliases:J}=Z;if(z&&z.includes(A)){const K=F6(W,J);for(let L of K)w.delete(L);return Y=!0,!1}return!0};return D=D.filter(G),F=F.filter(G),Y},concat:(A)=>{const Y=B(_6());return Y.use(A),Y.identifyOnResolve(E||Y.identifyOnResolve()||(A.identifyOnResolve?.()??!1)),Y},applyToStack:B,identify:()=>{return U(!0).map((A)=>{const Y=A.step??A.relation+" "+A.toMiddleware;return Y8(A.name,A.aliases)+" - "+Y})},identifyOnResolve(A){if(typeof A==="boolean")E=A;return E},resolve:(A,Y)=>{for(let G of U().map((Z)=>Z.middleware).reverse())A=G(A,Y);if(E)console.log(I.identify());return A}};return I},UT,AT;var IT=M(()=>{UT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},AT={high:3,normal:2,low:1}});var $5=M(()=>{IT()});class j0{constructor(D){this.config=D,this.middlewareStack=_6()}send(D,F,E){const w=typeof F!=="function"?F:void 0,$=typeof F==="function"?F:E,C=w===void 0&&this.config.cacheMiddleware===!0;let f;if(C){if(!this.handlers)this.handlers=new WeakMap;const B=this.handlers;if(B.has(D.constructor))f=B.get(D.constructor);else f=D.resolveMiddleware(this.middlewareStack,this.config,w),B.set(D.constructor,f)}else delete this.handlers,f=D.resolveMiddleware(this.middlewareStack,this.config,w);if($)f(D).then((B)=>$(null,B.output),(B)=>$(B)).catch(()=>{});else return f(D).then((B)=>B.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var GT=M(()=>{$5()});var MT=(D)=>typeof ArrayBuffer==="function"&&D instanceof ArrayBuffer||Object.prototype.toString.call(D)==="[object ArrayBuffer]";import{Buffer as f5}from"buffer";var q1=(D,F=0,E=D.byteLength-F)=>{if(!MT(D))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof D} (${D})`);return f5.from(D,F,E)},s6=(D,F)=>{if(typeof D!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof D} (${D})`);return F?f5.from(D,F):f5.from(D)};var E6=()=>{};var ga,z0=(D)=>{if(D.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ga.exec(D))throw new TypeError("Invalid base64 string.");const F=s6(D,"base64");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength)};var YT=M(()=>{E6();ga=/^[A-Za-z0-9+/]*={0,2}$/});var D0=(D)=>{const F=s6(D,"utf8");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var C5=M(()=>{E6()});var ZT=(D)=>{if(typeof D==="string")return D0(D);if(ArrayBuffer.isView(D))return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(D)};var XT=M(()=>{C5()});var T0=(D)=>{if(typeof D==="string")return D;if(typeof D!=="object"||typeof D.byteOffset!=="number"||typeof D.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return q1(D.buffer,D.byteOffset,D.byteLength).toString("utf8")};var WT=M(()=>{E6()});var a2=M(()=>{C5();XT();WT()});var K0=(D)=>{let F;if(typeof D==="string")F=D0(D);else F=D;if(typeof F!=="object"||typeof F.byteOffset!=="number"||typeof F.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return q1(F.buffer,F.byteOffset,F.byteLength).toString("base64")};var JT=M(()=>{E6();a2()});var O1=M(()=>{YT();JT()});function zT(D,F="utf-8"){if(F==="base64")return K0(D);return T0(D)}function TT(D,F){if(F==="base64")return j1.mutate(z0(D));return j1.mutate(D0(D))}var KT=M(()=>{O1();a2();B5()});var j1;var B5=M(()=>{KT();j1=class j1 extends Uint8Array{static fromString(D,F="utf-8"){switch(typeof D){case"string":return TT(D,F);default:throw new Error(`Unsupported conversion from ${typeof D} to Uint8ArrayBlobAdapter.`)}}static mutate(D){return Object.setPrototypeOf(D,j1.prototype),D}transformToString(D="utf-8"){return zT(this,D)}}});var ST=()=>{};var U3=(D)=>encodeURIComponent(D).replace(/[!'()*]/g,ra),ra=(D)=>`%${D.charCodeAt(0).toString(16).toUpperCase()}`;var QT=()=>{};var HT=M(()=>{QT()});function F$(D){const F=[];for(let E of Object.keys(D).sort()){const w=D[E];if(E=U3(E),Array.isArray(w))for(let $=0,C=w.length;$<C;$++)F.push(`${E}=${U3(w[$])}`);else{let $=E;if(w||typeof w==="string")$+=`=${U3(w)}`;F.push($)}}return F.join("&")}var E$=M(()=>{HT()});var LT;var RT=M(()=>{LT=["ECONNRESET","EPIPE","ETIMEDOUT"]});var h5=(D)=>{const F={};for(let E of Object.keys(D)){const w=D[E];F[E]=Array.isArray(w)?w.join(","):w}return F};var U5=()=>{};var VT=(D,F,E=0)=>{if(!E)return-1;const w=($)=>{const C=setTimeout(()=>{D.destroy(),F(Object.assign(new Error(`Socket timed out without establishing a connection within ${E} ms`),{name:"TimeoutError"}))},E-$),f=(B)=>{if(B?.connecting)B.on("connect",()=>{clearTimeout(C)});else clearTimeout(C)};if(D.socket)f(D.socket);else D.on("socket",f)};if(E<2000)return w(0),0;return setTimeout(w.bind(null,1000),1000)};var NT=(D,{keepAlive:F,keepAliveMsecs:E},w=3000)=>{if(F!==!0)return-1;const $=()=>{if(D.socket)D.socket.setKeepAlive(F,E||0);else D.on("socket",(C)=>{C.setKeepAlive(F,E||0)})};if(w===0)return $(),0;return setTimeout($,w)};var qT=(D,F,E=0)=>{const w=($)=>{D.setTimeout(E-$,()=>{D.destroy(),F(Object.assign(new Error(`Connection timed out after ${E} ms`),{name:"TimeoutError"}))})};if(0<E&&E<6000)return w(0),0;return setTimeout(w.bind(null,E===0?0:3000),3000)};import{Readable as _a}from"stream";async function A5(D,F,E=OT){const w=F.headers??{},$=w.Expect||w.expect;let C=-1,f=!1;if($==="100-continue")await Promise.race([new Promise((B)=>{C=Number(setTimeout(B,Math.max(OT,E)))}),new Promise((B)=>{D.on("continue",()=>{clearTimeout(C),B()}),D.on("error",()=>{f=!0,clearTimeout(C),B()})})]);if(!f)sa(D,F.body)}function sa(D,F){if(F instanceof _a){F.pipe(D);return}if(F){if(Buffer.isBuffer(F)||typeof F==="string"){D.end(F);return}const E=F;if(typeof E==="object"&&E.buffer&&typeof E.byteOffset==="number"&&typeof E.byteLength==="number"){D.end(Buffer.from(E.buffer,E.byteOffset,E.byteLength));return}D.end(Buffer.from(F));return}D.end()}var OT=1000;var I5=()=>{};import{Agent as jT,request as ua}from"http";import{Agent as PT,request as da}from"https";class h0{static create(D){if(typeof D?.handle==="function")return D;return new h0(D)}static checkSocketUsage(D,F,E=console){const{sockets:w,requests:$,maxSockets:C}=D;if(typeof C!=="number"||C===1/0)return F;const f=15000;if(Date.now()-f<F)return F;if(w&&$)for(let B in w){const h=w[B]?.length??0,U=$[B]?.length??0;if(h>=C&&U>=2*C)return E?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${h} and ${U} additional requests are enqueued.
19
+ ${h8.toHex(C)}`}getCanonicalPath({path:F}){if(this.uriEscapePath){const E=[];for(let C of F.split("/")){if((C==null?void 0:C.length)===0)continue;if(C===".")continue;if(C==="..")E.pop();else E.push(C)}const w=`${(F==null?void 0:F.startsWith("/"))?"/":""}${E.join("/")}${E.length>0&&(F==null?void 0:F.endsWith("/"))?"/":""}`;return jw.escapeUri(w).replace(/%2F/g,"/")}return F}async getSignature(F,E,w,$){const C=await this.createStringToSign(F,E,$),f=new this.sha256(await w);return f.update(X9.toUint8Array(C)),h8.toHex(await f.digest())}getSigningKey(F,E,w,$){return qX(this.sha256,F,w,E,$||this.service)}validateResolvedCredentials(F){if(typeof F!=="object"||typeof F.accessKeyId!=="string"||typeof F.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};mD(bX,"SignatureV4");var xl=bX,Nw=mD((D)=>{const F=kl(D).replace(/[\-:]/g,"");return{longDate:F,shortDate:F.slice(0,8)}},"formatDate"),KX=mD((D)=>Object.keys(D).sort().join(";"),"getCanonicalHeaderList")});var lX=W((p5D,nX)=>{var{defineProperty:kw,getOwnPropertyDescriptor:cl,getOwnPropertyNames:gl}=Object,rl=Object.prototype.hasOwnProperty,q0=(D,F)=>kw(D,"name",{value:F,configurable:!0}),_l=(D,F)=>{for(var E in F)kw(D,E,{get:F[E],enumerable:!0})},sl=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of gl(F))if(!rl.call(D,$)&&$!==E)kw(D,$,{get:()=>F[$],enumerable:!(w=cl(F,$))||w.enumerable})}return D},ul=(D)=>sl(kw({},"__esModule",{value:!0}),D),uX={};_l(uX,{AWSSDKSigV4Signer:()=>nl,AwsSdkSigV4ASigner:()=>il,AwsSdkSigV4Signer:()=>L9,NODE_SIGV4A_CONFIG_OPTIONS:()=>ol,resolveAWSSDKSigV4Config:()=>el,resolveAwsSdkSigV4AConfig:()=>al,resolveAwsSdkSigV4Config:()=>mX,validateSigningProperties:()=>H9});nX.exports=ul(uX);var dl=H1(),vl=H1(),gX=q0((D)=>{var F,E;return vl.HttpResponse.isInstance(D)?((F=D.headers)==null?void 0:F.date)??((E=D.headers)==null?void 0:E.Date):void 0},"getDateHeader"),Q9=q0((D)=>new Date(Date.now()+D),"getSkewCorrectedDate"),ml=q0((D,F)=>Math.abs(Q9(F).getTime()-D)>=300000,"isClockSkewed"),rX=q0((D,F)=>{const E=Date.parse(D);if(ml(E,F))return E-Date.now();return F},"getUpdatedSystemClockOffset"),E3=q0((D,F)=>{if(!F)throw new Error(`Property \`${D}\` is not resolved for AWS SDK SigV4Auth`);return F},"throwSigningPropertyError"),H9=q0(async(D)=>{var F,E,w;const $=E3("context",D.context),C=E3("config",D.config),f=(w=(E=(F=$.endpointV2)==null?void 0:F.properties)==null?void 0:E.authSchemes)==null?void 0:w[0],h=await E3("signer",C.signer)(f),U=D==null?void 0:D.signingRegion,I=D==null?void 0:D.signingRegionSet,A=D==null?void 0:D.signingName;return{config:C,signer:h,signingRegion:U,signingRegionSet:I,signingName:A}},"validateSigningProperties"),dX=class D{async sign(F,E,w){var $;if(!dl.HttpRequest.isInstance(F))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const C=await H9(w),{config:f,signer:B}=C;let{signingRegion:h,signingName:U}=C;const I=w.context;if((($=I==null?void 0:I.authSchemes)==null?void 0:$.length)??0>1){const[Y,M]=I.authSchemes;if((Y==null?void 0:Y.name)==="sigv4a"&&(M==null?void 0:M.name)==="sigv4")h=(M==null?void 0:M.signingRegion)??h,U=(M==null?void 0:M.signingName)??U}return await B.sign(F,{signingDate:Q9(f.systemClockOffset),signingRegion:h,signingService:U})}errorHandler(F){return(E)=>{const w=E.ServerTime??gX(E.$response);if(w){const $=E3("config",F.config),C=$.systemClockOffset;if($.systemClockOffset=rX(w,$.systemClockOffset),$.systemClockOffset!==C&&E.$metadata)E.$metadata.clockSkewCorrected=!0}throw E}}successHandler(F,E){const w=gX(F);if(w){const $=E3("config",E.config);$.systemClockOffset=rX(w,$.systemClockOffset)}}};q0(dX,"AwsSdkSigV4Signer");var L9=dX,nl=L9,ll=H1(),vX=class D extends L9{async sign(F,E,w){var $;if(!ll.HttpRequest.isInstance(F))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:C,signer:f,signingRegion:B,signingRegionSet:h,signingName:U}=await H9(w),A=(await(($=C.sigv4aSigningRegionSet)==null?void 0:$.call(C))??h??[B]).join(",");return await f.sign(F,{signingDate:Q9(C.systemClockOffset),signingRegion:A,signingService:U})}};q0(vX,"AwsSdkSigV4ASigner");var il=vX,pl=_D(),_X=p7(),al=q0((D)=>{return D.sigv4aSigningRegionSet=pl.normalizeProvider(D.sigv4aSigningRegionSet),D},"resolveAwsSdkSigV4AConfig"),ol={environmentVariableSelector(D){if(D.AWS_SIGV4A_SIGNING_REGION_SET)return D.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((F)=>F.trim());throw new _X.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(D){if(D.sigv4a_signing_region_set)return(D.sigv4a_signing_region_set??"").split(",").map((F)=>F.trim());throw new _X.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},tl=B0(),a8=_D(),sX=cX(),mX=q0((D)=>{let F=!1,E;if(D.credentials)F=!0,E=a8.memoizeIdentityProvider(D.credentials,a8.isIdentityExpired,a8.doesIdentityRequireRefresh);if(!E)if(D.credentialDefaultProvider)E=a8.normalizeProvider(D.credentialDefaultProvider(Object.assign({},D,{parentClientConfig:D})));else E=q0(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:$=D.systemClockOffset||0,sha256:C}=D;let f;if(D.signer)f=a8.normalizeProvider(D.signer);else if(D.regionInfoProvider)f=q0(()=>a8.normalizeProvider(D.region)().then(async(B)=>[await D.regionInfoProvider(B,{useFipsEndpoint:await D.useFipsEndpoint(),useDualstackEndpoint:await D.useDualstackEndpoint()})||{},B]).then(([B,h])=>{const{signingRegion:U,signingService:I}=B;D.signingRegion=D.signingRegion||U||h,D.signingName=D.signingName||I||D.serviceId;const A={...D,credentials:E,region:D.signingRegion,service:D.signingName,sha256:C,uriEscapePath:w};return new(D.signerConstructor||sX.SignatureV4)(A)}),"signer");else f=q0(async(B)=>{B=Object.assign({},{name:"sigv4",signingName:D.signingName||D.defaultSigningName,signingRegion:await a8.normalizeProvider(D.region)(),properties:{}},B);const{signingRegion:h,signingName:U}=B;D.signingRegion=D.signingRegion||h,D.signingName=D.signingName||U||D.serviceId;const I={...D,credentials:E,region:D.signingRegion,service:D.signingName,sha256:C,uriEscapePath:w};return new(D.signerConstructor||sX.SignatureV4)(I)},"signer");return{...D,systemClockOffset:$,signingEscapePath:w,credentials:F?async()=>E().then((B)=>tl.setCredentialFeature(B,"CREDENTIALS_CODE","e")):E,signer:f}},"resolveAwsSdkSigV4Config"),el=mX});var bw=W(($i)=>{var Di=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",iX="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Di+"]*",Fi=new RegExp("^"+iX+"$"),Ei=function(D,F){const E=[];let w=F.exec(D);while(w){const $=[];$.startIndex=F.lastIndex-w[0].length;const C=w.length;for(let f=0;f<C;f++)$.push(w[f]);E.push($),w=F.exec(D)}return E},wi=function(D){const F=Fi.exec(D);return!(F===null||typeof F==="undefined")};$i.isExist=function(D){return typeof D!=="undefined"};$i.isEmptyObject=function(D){return Object.keys(D).length===0};$i.merge=function(D,F,E){if(F){const w=Object.keys(F),$=w.length;for(let C=0;C<$;C++)if(E==="strict")D[w[C]]=[F[w[C]]];else D[w[C]]=F[w[C]]}};$i.getValue=function(D){if($i.isExist(D))return D;else return""};$i.isName=wi;$i.getAllMatches=Ei;$i.nameRegexp=iX});var V9=W((Ti)=>{function aX(D){return D===" "||D==="\t"||D==="\n"||D==="\r"}function oX(D,F){const E=F;for(;F<D.length;F++)if(D[F]=="?"||D[F]==" "){const w=D.substr(E,F-E);if(F>5&&w==="xml")return kD("InvalidXml","XML declaration allowed only at the start of the document.",h0(D,F));else if(D[F]=="?"&&D[F+1]==">"){F++;break}else continue}return F}function tX(D,F){if(D.length>F+5&&D[F+1]==="-"&&D[F+2]==="-"){for(F+=3;F<D.length;F++)if(D[F]==="-"&&D[F+1]==="-"&&D[F+2]===">"){F+=2;break}}else if(D.length>F+8&&D[F+1]==="D"&&D[F+2]==="O"&&D[F+3]==="C"&&D[F+4]==="T"&&D[F+5]==="Y"&&D[F+6]==="P"&&D[F+7]==="E"){let E=1;for(F+=8;F<D.length;F++)if(D[F]==="<")E++;else if(D[F]===">"){if(E--,E===0)break}}else if(D.length>F+9&&D[F+1]==="["&&D[F+2]==="C"&&D[F+3]==="D"&&D[F+4]==="A"&&D[F+5]==="T"&&D[F+6]==="A"&&D[F+7]==="["){for(F+=8;F<D.length;F++)if(D[F]==="]"&&D[F+1]==="]"&&D[F+2]===">"){F+=2;break}}return F}function Yi(D,F){let E="",w="",$=!1;for(;F<D.length;F++){if(D[F]===Mi||D[F]===Gi)if(w==="")w=D[F];else if(w!==D[F]);else w="";else if(D[F]===">"){if(w===""){$=!0;break}}E+=D[F]}if(w!=="")return!1;return{value:E,index:F,tagClosed:$}}function eX(D,F){const E=R9.getAllMatches(D,Zi),w={};for(let $=0;$<E.length;$++){if(E[$][1].length===0)return kD("InvalidAttr","Attribute '"+E[$][2]+"' has no space in starting.",w3(E[$]));else if(E[$][3]!==void 0&&E[$][4]===void 0)return kD("InvalidAttr","Attribute '"+E[$][2]+"' is without value.",w3(E[$]));else if(E[$][3]===void 0&&!F.allowBooleanAttributes)return kD("InvalidAttr","boolean attribute '"+E[$][2]+"' is not allowed.",w3(E[$]));const C=E[$][2];if(!Ji(C))return kD("InvalidAttr","Attribute '"+C+"' is an invalid name.",w3(E[$]));if(!w.hasOwnProperty(C))w[C]=1;else return kD("InvalidAttr","Attribute '"+C+"' is repeated.",w3(E[$]))}return!0}function Wi(D,F){let E=/\d/;if(D[F]==="x")F++,E=/[\da-fA-F]/;for(;F<D.length;F++){if(D[F]===";")return F;if(!D[F].match(E))break}return-1}function Xi(D,F){if(F++,D[F]===";")return-1;if(D[F]==="#")return F++,Wi(D,F);let E=0;for(;F<D.length;F++,E++){if(D[F].match(/\w/)&&E<20)continue;if(D[F]===";")break;return-1}return F}function kD(D,F,E){return{err:{code:D,msg:F,line:E.line||E,col:E.col}}}function Ji(D){return R9.isName(D)}function zi(D){return R9.isName(D)}function h0(D,F){const E=D.substring(0,F).split(/\r?\n/);return{line:E.length,col:E[E.length-1].length+1}}function w3(D){return D.startIndex+D[1].length}var R9=bw(),Ii={allowBooleanAttributes:!1,unpairedTags:[]};Ti.validate=function(D,F){F=Object.assign({},Ii,F);const E=[];let w=!1,$=!1;if(D[0]==="\uFEFF")D=D.substr(1);for(let C=0;C<D.length;C++)if(D[C]==="<"&&D[C+1]==="?"){if(C+=2,C=oX(D,C),C.err)return C}else if(D[C]==="<"){let f=C;if(C++,D[C]==="!"){C=tX(D,C);continue}else{let B=!1;if(D[C]==="/")B=!0,C++;let h="";for(;C<D.length&&D[C]!==">"&&D[C]!==" "&&D[C]!=="\t"&&D[C]!=="\n"&&D[C]!=="\r";C++)h+=D[C];if(h=h.trim(),h[h.length-1]==="/")h=h.substring(0,h.length-1),C--;if(!zi(h)){let A;if(h.trim().length===0)A="Invalid space after '<'.";else A="Tag '"+h+"' is an invalid name.";return kD("InvalidTag",A,h0(D,C))}const U=Yi(D,C);if(U===!1)return kD("InvalidAttr","Attributes for '"+h+"' have open quote.",h0(D,C));let I=U.value;if(C=U.index,I[I.length-1]==="/"){const A=C-I.length;I=I.substring(0,I.length-1);const Y=eX(I,F);if(Y===!0)w=!0;else return kD(Y.err.code,Y.err.msg,h0(D,A+Y.err.line))}else if(B)if(!U.tagClosed)return kD("InvalidTag","Closing tag '"+h+"' doesn't have proper closing.",h0(D,C));else if(I.trim().length>0)return kD("InvalidTag","Closing tag '"+h+"' can't have attributes or invalid starting.",h0(D,f));else if(E.length===0)return kD("InvalidTag","Closing tag '"+h+"' has not been opened.",h0(D,f));else{const A=E.pop();if(h!==A.tagName){let Y=h0(D,A.tagStartPos);return kD("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+h+"'.",h0(D,f))}if(E.length==0)$=!0}else{const A=eX(I,F);if(A!==!0)return kD(A.err.code,A.err.msg,h0(D,C-I.length+A.err.line));if($===!0)return kD("InvalidXml","Multiple possible root nodes found.",h0(D,C));else if(F.unpairedTags.indexOf(h)!==-1);else E.push({tagName:h,tagStartPos:f});w=!0}for(C++;C<D.length;C++)if(D[C]==="<")if(D[C+1]==="!"){C++,C=tX(D,C);continue}else if(D[C+1]==="?"){if(C=oX(D,++C),C.err)return C}else break;else if(D[C]==="&"){const A=Xi(D,C);if(A==-1)return kD("InvalidChar","char '&' is not expected.",h0(D,C));C=A}else if($===!0&&!aX(D[C]))return kD("InvalidXml","Extra text at the end",h0(D,C));if(D[C]==="<")C--}}else{if(aX(D[C]))continue;return kD("InvalidChar","char '"+D[C]+"' is not expected.",h0(D,C))}if(!w)return kD("InvalidXml","Start tag expected.",1);else if(E.length==1)return kD("InvalidTag","Unclosed tag '"+E[0].tagName+"'.",h0(D,E[0].tagStartPos));else if(E.length>0)return kD("InvalidXml","Invalid '"+JSON.stringify(E.map((C)=>C.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var Mi='"',Gi="'",Zi=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var FJ=W((Qi)=>{var DJ={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(D,F){return F},attributeValueProcessor:function(D,F){return F},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(D,F,E){return D}},Si=function(D){return Object.assign({},DJ,D)};Qi.buildOptions=Si;Qi.defaultOptions=DJ});var $J=W((e5D,wJ)=>{class EJ{constructor(D){this.tagname=D,this.child=[],this[":@"]={}}add(D,F){if(D==="__proto__")D="#__proto__";this.child.push({[D]:F})}addChild(D){if(D.tagname==="__proto__")D.tagname="#__proto__";if(D[":@"]&&Object.keys(D[":@"]).length>0)this.child.push({[D.tagname]:D.child,[":@"]:D[":@"]});else this.child.push({[D.tagname]:D.child})}}wJ.exports=EJ});var CJ=W((DCD,fJ)=>{function Vi(D,F){const E={};if(D[F+3]==="O"&&D[F+4]==="C"&&D[F+5]==="T"&&D[F+6]==="Y"&&D[F+7]==="P"&&D[F+8]==="E"){F=F+9;let w=1,$=!1,C=!1,f="";for(;F<D.length;F++)if(D[F]==="<"&&!C){if($&&Oi(D,F)){if(F+=7,[entityName,val,F]=Ni(D,F+1),val.indexOf("&")===-1)E[ki(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if($&&ji(D,F))F+=8;else if($&&Pi(D,F))F+=8;else if($&&yi(D,F))F+=9;else if(qi)C=!0;else throw new Error("Invalid DOCTYPE");w++,f=""}else if(D[F]===">"){if(C){if(D[F-1]==="-"&&D[F-2]==="-")C=!1,w--}else w--;if(w===0)break}else if(D[F]==="[")$=!0;else f+=D[F];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:E,i:F}}function Ni(D,F){let E="";for(;F<D.length&&(D[F]!=="'"&&D[F]!=='"');F++)E+=D[F];if(E=E.trim(),E.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=D[F++];let $="";for(;F<D.length&&D[F]!==w;F++)$+=D[F];return[E,$,F]}function qi(D,F){if(D[F+1]==="!"&&D[F+2]==="-"&&D[F+3]==="-")return!0;return!1}function Oi(D,F){if(D[F+1]==="!"&&D[F+2]==="E"&&D[F+3]==="N"&&D[F+4]==="T"&&D[F+5]==="I"&&D[F+6]==="T"&&D[F+7]==="Y")return!0;return!1}function ji(D,F){if(D[F+1]==="!"&&D[F+2]==="E"&&D[F+3]==="L"&&D[F+4]==="E"&&D[F+5]==="M"&&D[F+6]==="E"&&D[F+7]==="N"&&D[F+8]==="T")return!0;return!1}function Pi(D,F){if(D[F+1]==="!"&&D[F+2]==="A"&&D[F+3]==="T"&&D[F+4]==="T"&&D[F+5]==="L"&&D[F+6]==="I"&&D[F+7]==="S"&&D[F+8]==="T")return!0;return!1}function yi(D,F){if(D[F+1]==="!"&&D[F+2]==="N"&&D[F+3]==="O"&&D[F+4]==="T"&&D[F+5]==="A"&&D[F+6]==="T"&&D[F+7]==="I"&&D[F+8]==="O"&&D[F+9]==="N")return!0;return!1}function ki(D){if(Ri.isName(D))return D;else throw new Error(`Invalid entity name ${D}`)}var Ri=bw();fJ.exports=Vi});var hJ=W((FCD,BJ)=>{function gi(D,F={}){if(F=Object.assign({},ci,F),!D||typeof D!=="string")return D;let E=D.trim();if(F.skipLike!==void 0&&F.skipLike.test(E))return D;else if(F.hex&&bi.test(E))return Number.parseInt(E,16);else{const w=xi.exec(E);if(w){const $=w[1],C=w[2];let f=ri(w[3]);const B=w[4]||w[6];if(!F.leadingZeros&&C.length>0&&$&&E[2]!==".")return D;else if(!F.leadingZeros&&C.length>0&&!$&&E[1]!==".")return D;else{const h=Number(E),U=""+h;if(U.search(/[eE]/)!==-1)if(F.eNotation)return h;else return D;else if(B)if(F.eNotation)return h;else return D;else if(E.indexOf(".")!==-1)if(U==="0"&&f==="")return h;else if(U===f)return h;else if($&&U==="-"+f)return h;else return D;if(C)if(f===U)return h;else if($+f===U)return h;else return D;if(E===U)return h;else if(E===$+U)return h;return D}}else return D}}function ri(D){if(D&&D.indexOf(".")!==-1){if(D=D.replace(/0+$/,""),D===".")D="0";else if(D[0]===".")D="0"+D;else if(D[D.length-1]===".")D=D.substr(0,D.length-1);return D}return D}var bi=/^[-+]?0x[a-fA-F0-9]+$/,xi=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var ci={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};BJ.exports=gi});var MJ=W((ECD,IJ)=>{function ui(D){const F=Object.keys(D);for(let E=0;E<F.length;E++){const w=F[E];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:D[w]}}}function di(D,F,E,w,$,C,f){if(D!==void 0){if(this.options.trimValues&&!w)D=D.trim();if(D.length>0){if(!f)D=this.replaceEntitiesValue(D);const B=this.options.tagValueProcessor(F,D,E,$,C);if(B===null||B===void 0)return D;else if(typeof B!==typeof D||B!==D)return B;else if(this.options.trimValues)return q9(D,this.options.parseTagValue,this.options.numberParseOptions);else if(D.trim()===D)return q9(D,this.options.parseTagValue,this.options.numberParseOptions);else return D}}}function vi(D){if(this.options.removeNSPrefix){const F=D.split(":"),E=D.charAt(0)==="/"?"/":"";if(F[0]==="xmlns")return"";if(F.length===2)D=E+F[1]}return D}function ni(D,F,E){if(!this.options.ignoreAttributes&&typeof D==="string"){const w=UJ.getAllMatches(D,mi),$=w.length,C={};for(let f=0;f<$;f++){const B=this.resolveNameSpace(w[f][1]);let h=w[f][4],U=this.options.attributeNamePrefix+B;if(B.length){if(this.options.transformAttributeName)U=this.options.transformAttributeName(U);if(U==="__proto__")U="#__proto__";if(h!==void 0){if(this.options.trimValues)h=h.trim();h=this.replaceEntitiesValue(h);const I=this.options.attributeValueProcessor(B,h,F);if(I===null||I===void 0)C[U]=h;else if(typeof I!==typeof h||I!==h)C[U]=I;else C[U]=q9(h,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)C[U]=!0}}if(!Object.keys(C).length)return;if(this.options.attributesGroupName){const f={};return f[this.options.attributesGroupName]=C,f}return C}}function ii(D,F,E){const w=this.options.updateTag(F.tagname,E,F[":@"]);if(w===!1);else if(typeof w==="string")F.tagname=w,D.addChild(F);else D.addChild(F)}function ai(D,F,E,w){if(D){if(w===void 0)w=Object.keys(F.child).length===0;if(D=this.parseTextData(D,F.tagname,E,!1,F[":@"]?Object.keys(F[":@"]).length!==0:!1,w),D!==void 0&&D!=="")F.add(this.options.textNodeName,D);D=""}return D}function oi(D,F,E){const w="*."+E;for(let $ in D){const C=D[$];if(w===C||F===C)return!0}return!1}function ti(D,F,E=">"){let w,$="";for(let C=F;C<D.length;C++){let f=D[C];if(w){if(f===w)w=""}else if(f==='"'||f==="'")w=f;else if(f===E[0])if(E[1]){if(D[C+1]===E[1])return{data:$,index:C}}else return{data:$,index:C};else if(f==="\t")f=" ";$+=f}}function o8(D,F,E,w){const $=D.indexOf(F,E);if($===-1)throw new Error(w);else return $+F.length-1}function N9(D,F,E,w=">"){const $=ti(D,F+1,w);if(!$)return;let C=$.data;const f=$.index,B=C.search(/\s/);let h=C,U=!0;if(B!==-1)h=C.substring(0,B),C=C.substring(B+1).trimStart();const I=h;if(E){const A=h.indexOf(":");if(A!==-1)h=h.substr(A+1),U=h!==$.data.substr(A+1)}return{tagName:h,tagExp:C,closeIndex:f,attrExpPresent:U,rawTagName:I}}function ei(D,F,E){const w=E;let $=1;for(;E<D.length;E++)if(D[E]==="<")if(D[E+1]==="/"){const C=o8(D,">",E,`${F} is not closed`);if(D.substring(E+2,C).trim()===F){if($--,$===0)return{tagContent:D.substring(w,E),i:C}}E=C}else if(D[E+1]==="?")E=o8(D,"?>",E+1,"StopNode is not closed.");else if(D.substr(E+1,3)==="!--")E=o8(D,"-->",E+3,"StopNode is not closed.");else if(D.substr(E+1,2)==="![")E=o8(D,"]]>",E,"StopNode is not closed.")-2;else{const C=N9(D,E,">");if(C){if((C&&C.tagName)===F&&C.tagExp[C.tagExp.length-1]!=="/")$++;E=C.closeIndex}}}function q9(D,F,E){if(F&&typeof D==="string"){const w=D.trim();if(w==="true")return!0;else if(w==="false")return!1;else return si(D,E)}else if(UJ.isExist(D))return D;else return""}var UJ=bw(),$3=$J(),_i=CJ(),si=hJ();class AJ{constructor(D){this.options=D,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(F,E)=>String.fromCharCode(Number.parseInt(E,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(F,E)=>String.fromCharCode(Number.parseInt(E,16))}},this.addExternalEntities=ui,this.parseXml=li,this.parseTextData=di,this.resolveNameSpace=vi,this.buildAttributesMap=ni,this.isItStopNode=oi,this.replaceEntitiesValue=pi,this.readStopNodeData=ei,this.saveTextToParentTag=ai,this.addChild=ii}}var mi=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),li=function(D){D=D.replace(/\r\n?/g,"\n");const F=new $3("!xml");let E=F,w="",$="";for(let C=0;C<D.length;C++)if(D[C]==="<")if(D[C+1]==="/"){const B=o8(D,">",C,"Closing Tag is not closed.");let h=D.substring(C+2,B).trim();if(this.options.removeNSPrefix){const A=h.indexOf(":");if(A!==-1)h=h.substr(A+1)}if(this.options.transformTagName)h=this.options.transformTagName(h);if(E)w=this.saveTextToParentTag(w,E,$);const U=$.substring($.lastIndexOf(".")+1);if(h&&this.options.unpairedTags.indexOf(h)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${h}>`);let I=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)I=$.lastIndexOf(".",$.lastIndexOf(".")-1),this.tagsNodeStack.pop();else I=$.lastIndexOf(".");$=$.substring(0,I),E=this.tagsNodeStack.pop(),w="",C=B}else if(D[C+1]==="?"){let B=N9(D,C,!1,"?>");if(!B)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,E,$),this.options.ignoreDeclaration&&B.tagName==="?xml"||this.options.ignorePiTags);else{const h=new $3(B.tagName);if(h.add(this.options.textNodeName,""),B.tagName!==B.tagExp&&B.attrExpPresent)h[":@"]=this.buildAttributesMap(B.tagExp,$,B.tagName);this.addChild(E,h,$)}C=B.closeIndex+1}else if(D.substr(C+1,3)==="!--"){const B=o8(D,"-->",C+4,"Comment is not closed.");if(this.options.commentPropName){const h=D.substring(C+4,B-2);w=this.saveTextToParentTag(w,E,$),E.add(this.options.commentPropName,[{[this.options.textNodeName]:h}])}C=B}else if(D.substr(C+1,2)==="!D"){const B=_i(D,C);this.docTypeEntities=B.entities,C=B.i}else if(D.substr(C+1,2)==="!["){const B=o8(D,"]]>",C,"CDATA is not closed.")-2,h=D.substring(C+9,B);w=this.saveTextToParentTag(w,E,$);let U=this.parseTextData(h,E.tagname,$,!0,!1,!0,!0);if(U==null)U="";if(this.options.cdataPropName)E.add(this.options.cdataPropName,[{[this.options.textNodeName]:h}]);else E.add(this.options.textNodeName,U);C=B+2}else{let B=N9(D,C,this.options.removeNSPrefix),h=B.tagName;const U=B.rawTagName;let{tagExp:I,attrExpPresent:A,closeIndex:Y}=B;if(this.options.transformTagName)h=this.options.transformTagName(h);if(E&&w){if(E.tagname!=="!xml")w=this.saveTextToParentTag(w,E,$,!1)}const M=E;if(M&&this.options.unpairedTags.indexOf(M.tagname)!==-1)E=this.tagsNodeStack.pop(),$=$.substring(0,$.lastIndexOf("."));if(h!==F.tagname)$+=$?"."+h:h;if(this.isItStopNode(this.options.stopNodes,$,h)){let Z="";if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(h[h.length-1]==="/")h=h.substr(0,h.length-1),$=$.substr(0,$.length-1),I=h;else I=I.substr(0,I.length-1);C=B.closeIndex}else if(this.options.unpairedTags.indexOf(h)!==-1)C=B.closeIndex;else{const X=this.readStopNodeData(D,U,Y+1);if(!X)throw new Error(`Unexpected end of ${U}`);C=X.i,Z=X.tagContent}const z=new $3(h);if(h!==I&&A)z[":@"]=this.buildAttributesMap(I,$,h);if(Z)Z=this.parseTextData(Z,h,$,!0,A,!0,!0);$=$.substr(0,$.lastIndexOf(".")),z.add(this.options.textNodeName,Z),this.addChild(E,z,$)}else{if(I.length>0&&I.lastIndexOf("/")===I.length-1){if(h[h.length-1]==="/")h=h.substr(0,h.length-1),$=$.substr(0,$.length-1),I=h;else I=I.substr(0,I.length-1);if(this.options.transformTagName)h=this.options.transformTagName(h);const Z=new $3(h);if(h!==I&&A)Z[":@"]=this.buildAttributesMap(I,$,h);this.addChild(E,Z,$),$=$.substr(0,$.lastIndexOf("."))}else{const Z=new $3(h);if(this.tagsNodeStack.push(E),h!==I&&A)Z[":@"]=this.buildAttributesMap(I,$,h);this.addChild(E,Z,$),E=Z}w="",C=Y}}else w+=D[C];return F.child},pi=function(D){if(this.options.processEntities){for(let F in this.docTypeEntities){const E=this.docTypeEntities[F];D=D.replace(E.regx,E.val)}for(let F in this.lastEntities){const E=this.lastEntities[F];D=D.replace(E.regex,E.val)}if(this.options.htmlEntities)for(let F in this.htmlEntities){const E=this.htmlEntities[F];D=D.replace(E.regex,E.val)}D=D.replace(this.ampEntity.regex,this.ampEntity.val)}return D};IJ.exports=AJ});var YJ=W(($p)=>{function Dp(D,F){return GJ(D,F)}function GJ(D,F,E){let w;const $={};for(let C=0;C<D.length;C++){const f=D[C],B=Fp(f);let h="";if(E===void 0)h=B;else h=E+"."+B;if(B===F.textNodeName)if(w===void 0)w=f[B];else w+=""+f[B];else if(B===void 0)continue;else if(f[B]){let U=GJ(f[B],F,h);const I=wp(U,F);if(f[":@"])Ep(U,f[":@"],h,F);else if(Object.keys(U).length===1&&U[F.textNodeName]!==void 0&&!F.alwaysCreateTextNode)U=U[F.textNodeName];else if(Object.keys(U).length===0)if(F.alwaysCreateTextNode)U[F.textNodeName]="";else U="";if($[B]!==void 0&&$.hasOwnProperty(B)){if(!Array.isArray($[B]))$[B]=[$[B]];$[B].push(U)}else if(F.isArray(B,h,I))$[B]=[U];else $[B]=U}}if(typeof w==="string"){if(w.length>0)$[F.textNodeName]=w}else if(w!==void 0)$[F.textNodeName]=w;return $}function Fp(D){const F=Object.keys(D);for(let E=0;E<F.length;E++){const w=F[E];if(w!==":@")return w}}function Ep(D,F,E,w){if(F){const $=Object.keys(F),C=$.length;for(let f=0;f<C;f++){const B=$[f];if(w.isArray(B,E+"."+B,!0,!0))D[B]=[F[B]];else D[B]=F[B]}}}function wp(D,F){const{textNodeName:E}=F,w=Object.keys(D).length;if(w===0)return!0;if(w===1&&(D[E]||typeof D[E]==="boolean"||D[E]===0))return!0;return!1}$p.prettify=Dp});var XJ=W(($CD,WJ)=>{var{buildOptions:Cp}=FJ(),Bp=MJ(),{prettify:hp}=YJ(),Up=V9();class ZJ{constructor(D){this.externalEntities={},this.options=Cp(D)}parse(D,F){if(typeof D==="string");else if(D.toString)D=D.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(F){if(F===!0)F={};const $=Up.validate(D,F);if($!==!0)throw Error(`${$.err.msg}:${$.err.line}:${$.err.col}`)}const E=new Bp(this.options);E.addExternalEntities(this.externalEntities);const w=E.parseXml(D);if(this.options.preserveOrder||w===void 0)return w;else return hp(w,this.options)}addEntity(D,F){if(F.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(D.indexOf("&")!==-1||D.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(F==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[D]=F}}WJ.exports=ZJ});var SJ=W((fCD,KJ)=>{function Ap(D,F){let E="";if(F.format&&F.indentBy.length>0)E="\n";return zJ(D,F,"",E)}function zJ(D,F,E,w){let $="",C=!1;for(let f=0;f<D.length;f++){const B=D[f],h=Ip(B);if(h===void 0)continue;let U="";if(E.length===0)U=h;else U=`${E}.${h}`;if(h===F.textNodeName){let Z=B[h];if(!Mp(U,F))Z=F.tagValueProcessor(h,Z),Z=TJ(Z,F);if(C)$+=w;$+=Z,C=!1;continue}else if(h===F.cdataPropName){if(C)$+=w;$+=`<![CDATA[${B[h][0][F.textNodeName]}]]>`,C=!1;continue}else if(h===F.commentPropName){$+=w+`<!--${B[h][0][F.textNodeName]}-->`,C=!0;continue}else if(h[0]==="?"){const Z=JJ(B[":@"],F),z=h==="?xml"?"":w;let X=B[h][0][F.textNodeName];X=X.length!==0?" "+X:"",$+=z+`<${h}${X}${Z}?>`,C=!0;continue}let I=w;if(I!=="")I+=F.indentBy;const A=JJ(B[":@"],F),Y=w+`<${h}${A}`,M=zJ(B[h],F,U,I);if(F.unpairedTags.indexOf(h)!==-1)if(F.suppressUnpairedNode)$+=Y+">";else $+=Y+"/>";else if((!M||M.length===0)&&F.suppressEmptyNode)$+=Y+"/>";else if(M&&M.endsWith(">"))$+=Y+`>${M}${w}</${h}>`;else{if($+=Y+">",M&&w!==""&&(M.includes("/>")||M.includes("</")))$+=w+F.indentBy+M+w;else $+=M;$+=`</${h}>`}C=!0}return $}function Ip(D){const F=Object.keys(D);for(let E=0;E<F.length;E++){const w=F[E];if(!D.hasOwnProperty(w))continue;if(w!==":@")return w}}function JJ(D,F){let E="";if(D&&!F.ignoreAttributes)for(let w in D){if(!D.hasOwnProperty(w))continue;let $=F.attributeValueProcessor(w,D[w]);if($=TJ($,F),$===!0&&F.suppressBooleanAttributes)E+=` ${w.substr(F.attributeNamePrefix.length)}`;else E+=` ${w.substr(F.attributeNamePrefix.length)}="${$}"`}return E}function Mp(D,F){D=D.substr(0,D.length-F.textNodeName.length-1);let E=D.substr(D.lastIndexOf(".")+1);for(let w in F.stopNodes)if(F.stopNodes[w]===D||F.stopNodes[w]==="*."+E)return!0;return!1}function TJ(D,F){if(D&&D.length>0&&F.processEntities)for(let E=0;E<F.entities.length;E++){const w=F.entities[E];D=D.replace(w.regex,w.val)}return D}KJ.exports=Ap});var HJ=W((CCD,QJ)=>{function U8(D){if(this.options=Object.assign({},Yp,D),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Xp;if(this.processTextOrObjNode=Zp,this.options.format)this.indentate=Wp,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function Zp(D,F,E){const w=this.j2x(D,E+1);if(D[this.options.textNodeName]!==void 0&&Object.keys(D).length===1)return this.buildTextValNode(D[this.options.textNodeName],F,w.attrStr,E);else return this.buildObjectNode(w.val,F,w.attrStr,E)}function Wp(D){return this.options.indentBy.repeat(D)}function Xp(D){if(D.startsWith(this.options.attributeNamePrefix)&&D!==this.options.textNodeName)return D.substr(this.attrPrefixLen);else return!1}var Gp=SJ(),Yp={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(D,F){return F},attributeValueProcessor:function(D,F){return F},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};U8.prototype.build=function(D){if(this.options.preserveOrder)return Gp(D,this.options);else{if(Array.isArray(D)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)D={[this.options.arrayNodeName]:D};return this.j2x(D,0).val}};U8.prototype.j2x=function(D,F){let E="",w="";for(let $ in D){if(!Object.prototype.hasOwnProperty.call(D,$))continue;if(typeof D[$]==="undefined"){if(this.isAttribute($))w+=""}else if(D[$]===null)if(this.isAttribute($))w+="";else if($[0]==="?")w+=this.indentate(F)+"<"+$+"?"+this.tagEndChar;else w+=this.indentate(F)+"<"+$+"/"+this.tagEndChar;else if(D[$]instanceof Date)w+=this.buildTextValNode(D[$],$,"",F);else if(typeof D[$]!=="object"){const C=this.isAttribute($);if(C)E+=this.buildAttrPairStr(C,""+D[$]);else if($===this.options.textNodeName){let f=this.options.tagValueProcessor($,""+D[$]);w+=this.replaceEntitiesValue(f)}else w+=this.buildTextValNode(D[$],$,"",F)}else if(Array.isArray(D[$])){const C=D[$].length;let f="",B="";for(let h=0;h<C;h++){const U=D[$][h];if(typeof U==="undefined");else if(U===null)if($[0]==="?")w+=this.indentate(F)+"<"+$+"?"+this.tagEndChar;else w+=this.indentate(F)+"<"+$+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const I=this.j2x(U,F+1);if(f+=I.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))B+=I.attrStr}else f+=this.processTextOrObjNode(U,$,F);else if(this.options.oneListGroup){let I=this.options.tagValueProcessor($,U);I=this.replaceEntitiesValue(I),f+=I}else f+=this.buildTextValNode(U,$,"",F)}if(this.options.oneListGroup)f=this.buildObjectNode(f,$,B,F);w+=f}else if(this.options.attributesGroupName&&$===this.options.attributesGroupName){const C=Object.keys(D[$]),f=C.length;for(let B=0;B<f;B++)E+=this.buildAttrPairStr(C[B],""+D[$][C[B]])}else w+=this.processTextOrObjNode(D[$],$,F)}return{attrStr:E,val:w}};U8.prototype.buildAttrPairStr=function(D,F){if(F=this.options.attributeValueProcessor(D,""+F),F=this.replaceEntitiesValue(F),this.options.suppressBooleanAttributes&&F==="true")return" "+D;else return" "+D+'="'+F+'"'};U8.prototype.buildObjectNode=function(D,F,E,w){if(D==="")if(F[0]==="?")return this.indentate(w)+"<"+F+E+"?"+this.tagEndChar;else return this.indentate(w)+"<"+F+E+this.closeTag(F)+this.tagEndChar;else{let $="</"+F+this.tagEndChar,C="";if(F[0]==="?")C="?",$="";if((E||E==="")&&D.indexOf("<")===-1)return this.indentate(w)+"<"+F+E+C+">"+D+$;else if(this.options.commentPropName!==!1&&F===this.options.commentPropName&&C.length===0)return this.indentate(w)+`<!--${D}-->`+this.newLine;else return this.indentate(w)+"<"+F+E+C+this.tagEndChar+D+this.indentate(w)+$}};U8.prototype.closeTag=function(D){let F="";if(this.options.unpairedTags.indexOf(D)!==-1){if(!this.options.suppressUnpairedNode)F="/"}else if(this.options.suppressEmptyNode)F="/";else F=`></${D}`;return F};U8.prototype.buildTextValNode=function(D,F,E,w){if(this.options.cdataPropName!==!1&&F===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${D}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&F===this.options.commentPropName)return this.indentate(w)+`<!--${D}-->`+this.newLine;else if(F[0]==="?")return this.indentate(w)+"<"+F+E+"?"+this.tagEndChar;else{let $=this.options.tagValueProcessor(F,D);if($=this.replaceEntitiesValue($),$==="")return this.indentate(w)+"<"+F+E+this.closeTag(F)+this.tagEndChar;else return this.indentate(w)+"<"+F+E+">"+$+"</"+F+this.tagEndChar}};U8.prototype.replaceEntitiesValue=function(D){if(D&&D.length>0&&this.options.processEntities)for(let F=0;F<this.options.entities.length;F++){const E=this.options.entities[F];D=D.replace(E.regex,E.val)}return D};QJ.exports=U8});var RJ=W((BCD,LJ)=>{var Jp=V9(),zp=XJ(),Tp=HJ();LJ.exports={XMLParser:zp,XMLValidator:Jp,XMLBuilder:Tp}});var PJ=W((hCD,jJ)=>{var{defineProperty:xw,getOwnPropertyDescriptor:Kp,getOwnPropertyNames:Sp}=Object,Qp=Object.prototype.hasOwnProperty,O0=(D,F)=>xw(D,"name",{value:F,configurable:!0}),Hp=(D,F)=>{for(var E in F)xw(D,E,{get:F[E],enumerable:!0})},Lp=(D,F,E,w)=>{if(F&&typeof F==="object"||typeof F==="function"){for(let $ of Sp(F))if(!Qp.call(D,$)&&$!==E)xw(D,$,{get:()=>F[$],enumerable:!(w=Kp(F,$))||w.enumerable})}return D},Rp=(D)=>Lp(xw({},"__esModule",{value:!0}),D),VJ={};Hp(VJ,{_toBool:()=>Np,_toNum:()=>qp,_toStr:()=>Vp,awsExpectUnion:()=>jp,loadRestJsonErrorCode:()=>kp,loadRestXmlErrorCode:()=>gp,parseJsonBody:()=>qJ,parseJsonErrorBody:()=>yp,parseXmlBody:()=>OJ,parseXmlErrorBody:()=>cp});jJ.exports=Rp(VJ);var Vp=O0((D)=>{if(D==null)return D;if(typeof D==="number"||typeof D==="bigint"){const F=new Error(`Received number ${D} where a string was expected.`);return F.name="Warning",console.warn(F),String(D)}if(typeof D==="boolean"){const F=new Error(`Received boolean ${D} where a string was expected.`);return F.name="Warning",console.warn(F),String(D)}return D},"_toStr"),Np=O0((D)=>{if(D==null)return D;if(typeof D==="string"){const F=D.toLowerCase();if(D!==""&&F!=="false"&&F!=="true"){const E=new Error(`Received string "${D}" where a boolean was expected.`);E.name="Warning",console.warn(E)}return D!==""&&F!=="false"}return D},"_toBool"),qp=O0((D)=>{if(D==null)return D;if(typeof D==="string"){const F=Number(D);if(F.toString()!==D){const E=new Error(`Received string "${D}" where a number was expected.`);return E.name="Warning",console.warn(E),D}return F}return D},"_toNum"),Op=q6(),jp=O0((D)=>{if(D==null)return;if(typeof D==="object"&&"__type"in D)delete D.__type;return Op.expectUnion(D)},"awsExpectUnion"),Pp=q6(),NJ=O0((D,F)=>Pp.collectBody(D,F).then((E)=>F.utf8Encoder(E)),"collectBodyString"),qJ=O0((D,F)=>NJ(D,F).then((E)=>{if(E.length)try{return JSON.parse(E)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:E});throw w}return{}}),"parseJsonBody"),yp=O0(async(D,F)=>{const E=await qJ(D,F);return E.message=E.message??E.Message,E},"parseJsonErrorBody"),kp=O0((D,F)=>{const E=O0((C,f)=>Object.keys(C).find((B)=>B.toLowerCase()===f.toLowerCase()),"findKey"),w=O0((C)=>{let f=C;if(typeof f==="number")f=f.toString();if(f.indexOf(",")>=0)f=f.split(",")[0];if(f.indexOf(":")>=0)f=f.split(":")[0];if(f.indexOf("#")>=0)f=f.split("#")[1];return f},"sanitizeErrorCode"),$=E(D.headers,"x-amzn-errortype");if($!==void 0)return w(D.headers[$]);if(F.code!==void 0)return w(F.code);if(F.__type!==void 0)return w(F.__type)},"loadRestJsonErrorCode"),bp=q6(),xp=RJ(),OJ=O0((D,F)=>NJ(D,F).then((E)=>{if(E.length){const w=new xp.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(h,U)=>U.trim()===""&&U.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let $;try{$=w.parse(E,!0)}catch(h){if(h&&typeof h==="object")Object.defineProperty(h,"$responseBodyText",{value:E});throw h}const C="#text",f=Object.keys($)[0],B=$[f];if(B[C])B[f]=B[C],delete B[C];return bp.getValueFromTextNode(B)}return{}}),"parseXmlBody"),cp=O0(async(D,F)=>{const E=await OJ(D,F);if(E.Error)E.Error.message=E.Error.message??E.Error.Message;return E},"parseXmlErrorBody"),gp=O0((D,F)=>{var E;if(((E=F==null?void 0:F.Error)==null?void 0:E.Code)!==void 0)return F.Error.Code;if((F==null?void 0:F.Code)!==void 0)return F.Code;if(D.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var PD=W((f3)=>{Object.defineProperty(f3,"__esModule",{value:!0});var O9=Z9();O9.__exportStar(B0(),f3);O9.__exportStar(lX(),f3);O9.__exportStar(PJ(),f3)});async function yJ(D,F,E){const w=E.request;if(typeof F.accountIdEndpointMode==="function")switch(await F.accountIdEndpointMode?.()){case"disabled":k6.setFeature(D,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":k6.setFeature(D,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":k6.setFeature(D,"ACCOUNT_ID_MODE_REQUIRED","R");break}const $=D.__smithy_context?.selectedHttpAuthScheme?.identity;if($?.$source){const C=$;if(C.accountId)k6.setFeature(D,"RESOLVED_ACCOUNT_ID","T");for(let[f,B]of Object.entries(C.$source??{}))k6.setFeature(D,f,B)}}var k6;var kJ=G(()=>{k6=L(PD(),1)});var j9="user-agent",cw="x-amz-user-agent",P9=" ",gw="/",bJ,xJ,y9="-";var cJ=G(()=>{bJ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,xJ=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function gJ(D){let F="";for(let E in D){const w=D[E];if(F.length+w.length+1<=1024){if(F.length)F+=","+w;else F+=w;continue}break}return F}var rp=(D)=>(F,E)=>async(w)=>{const{request:$}=w;if(!rD.isInstance($))return F(w);const{headers:C}=$,f=E?.userAgent?.map(rw)||[],B=(await D.defaultUserAgentProvider()).map(rw);await yJ(E,D,w);const h=E;B.push(`m/${gJ(Object.assign({},E.__smithy_context?.features,h.__aws_sdk_context?.features))}`);const U=D?.customUserAgent?.map(rw)||[],I=await D.userAgentAppId();if(I)B.push(rw([`app/${I}`]));const A=OW(),Y=(A?[A]:[]).concat([...B,...f,...U]).join(P9),M=[...B.filter((Z)=>Z.startsWith("aws-sdk-")),...U].join(P9);if(D.runtime!=="browser"){if(M)C[cw]=C[cw]?`${C[j9]} ${M}`:M;C[j9]=Y}else C[cw]=Y;return F({...w,request:$})},rw=(D)=>{const F=D[0].split(gw).map((f)=>f.replace(bJ,y9)).join(gw),E=D[1]?.replace(xJ,y9),w=F.indexOf(gw),$=F.substring(0,w);let C=F.substring(w+1);if($==="api")C=C.toLowerCase();return[$,C,E].filter((f)=>f&&f.length>0).reduce((f,B,h)=>{switch(h){case 0:return B;case 1:return`${f}/${B}`;default:return`${f}#${B}`}},"")},_p,r2=(D)=>({applyToStack:(F)=>{F.add(rp(D),_p)}});var rJ=G(()=>{p8();vD();kJ();cJ();_p={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var t8=G(()=>{uZ();rJ()});var b6=(D,F,E)=>{if(!(F in D))return;if(D[F]==="true")return!0;if(D[F]==="false")return!1;throw new Error(`Cannot load ${E} "${F}". Expected "true" or "false", got ${D[F]}.`)};var A8;var _J=G(()=>{(function(D){D.ENV="env",D.CONFIG="shared config entry"})(A8||(A8={}))});var k9=G(()=>{_J()});var sp="AWS_USE_DUALSTACK_ENDPOINT",up="use_dualstack_endpoint",_2;var sJ=G(()=>{k9();_2={environmentVariableSelector:(D)=>b6(D,sp,A8.ENV),configFileSelector:(D)=>b6(D,up,A8.CONFIG),default:!1}});var dp="AWS_USE_FIPS_ENDPOINT",vp="use_fips_endpoint",s2;var uJ=G(()=>{k9();s2={environmentVariableSelector:(D)=>b6(D,dp,A8.ENV),configFileSelector:(D)=>b6(D,vp,A8.CONFIG),default:!1}});var b9,m0=(D)=>D[b9.SMITHY_CONTEXT_KEY]||(D[b9.SMITHY_CONTEXT_KEY]={});var dJ=G(()=>{b9=L(J0(),1)});var sD=(D)=>{if(typeof D==="function")return D;const F=Promise.resolve(D);return()=>F};var W2=G(()=>{dJ()});var vJ=G(()=>{W2()});var mJ=G(()=>{W2()});var nJ=G(()=>{sJ();uJ();vJ();mJ()});var n0,u2;var lJ=G(()=>{n0={environmentVariableSelector:(D)=>D.AWS_REGION,configFileSelector:(D)=>D.region,default:()=>{throw new Error("Region is missing")}},u2={preferredFile:"credentials"}});var _w=(D)=>typeof D==="string"&&(D.startsWith("fips-")||D.endsWith("-fips"));var x9=(D)=>_w(D)?["fips-aws-global","aws-fips"].includes(D)?"us-east-1":D.replace(/fips-(dkr-|prod-)?|-fips/,""):D;var iJ=()=>{};var d2=(D)=>{const{region:F,useFipsEndpoint:E}=D;if(!F)throw new Error("Region is missing");return{...D,region:async()=>{if(typeof F==="string")return x9(F);const w=await F();return x9(w)},useFipsEndpoint:async()=>{const w=typeof F==="string"?F:await F();if(_w(w))return!0;return typeof E!=="function"?Promise.resolve(!!E):E()}}};var pJ=G(()=>{iJ()});var aJ=G(()=>{lJ();pJ()});var oJ=()=>{};var tJ=()=>{};var eJ=()=>{};var Dz=G(()=>{oJ();tJ();eJ()});var l0=G(()=>{nJ();aJ();Dz()});function mp(D){return(F)=>async(E)=>{const w=E.request;if(rD.isInstance(w)){const{body:$,headers:C}=w;if($&&Object.keys(C).map((f)=>f.toLowerCase()).indexOf(Ez)===-1)try{const f=D($);w.headers={...w.headers,[Ez]:String(f)}}catch(f){}}return F({...E,request:w})}}var Ez="content-length",np,v2=(D)=>({applyToStack:(F)=>{F.add(mp(D.bodyLengthChecker),np)}});var x6=G(()=>{vD();np={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var wz=async(D)=>{const F=D?.Bucket||"";if(typeof D.Bucket==="string")D.Bucket=F.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(op(F)){if(D.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!ap(F)||F.indexOf(".")!==-1&&!String(D.Endpoint).startsWith("http:")||F.toLowerCase()!==F||F.length<3)D.ForcePathStyle=!0;if(D.DisableMultiRegionAccessPoints)D.disableMultiRegionAccessPoints=!0,D.DisableMRAP=!0;return D},lp,ip,pp,ap=(D)=>lp.test(D)&&!ip.test(D)&&!pp.test(D),op=(D)=>{const[F,E,w,,,$]=D.split(":"),C=F==="arn"&&D.split(":").length>=6,f=Boolean(C&&E&&w&&$);if(C&&!f)throw new Error(`Invalid ARN: ${D} was an invalid ARN.`);return f};var $z=G(()=>{lp=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,ip=/(\d+\.){3}\d+/,pp=/\.\./});var fz=G(()=>{$z()});var Cz=(D,F,E)=>{const w=async()=>{const $=E[D]??E[F];if(typeof $==="function")return $();return $};if(D==="credentialScope"||F==="CredentialScope")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return $?.credentialScope??$?.CredentialScope};if(D==="accountId"||F==="AccountId")return async()=>{const $=typeof E.credentials==="function"?await E.credentials():E.credentials;return $?.accountId??$?.AccountId};if(D==="endpoint"||F==="endpoint")return async()=>{const $=await w();if($&&typeof $==="object"){if("url"in $)return $.url.href;if("hostname"in $){const{protocol:C,hostname:f,port:B,path:h}=$;return`${C}//${f}${B?":"+B:""}${h}`}}return $};return w};var i0;var C3=G(()=>{i0=class i0 extends Error{constructor(D,F=!0){let E,w=!0;if(typeof F==="boolean")E=void 0,w=F;else if(F!=null&&typeof F==="object")E=F.logger,w=F.tryNextLink??!0;super(D);this.name="ProviderError",this.tryNextLink=w,Object.setPrototypeOf(this,i0.prototype),E?.debug?.(`@smithy/property-provider ${w?"->":"(!)"} ${D}`)}static from(D,F=!0){return Object.assign(new this(D.message,F),D)}}});var x;var Bz=G(()=>{C3();x=class x extends i0{constructor(D,F=!0){super(D,F);this.name="CredentialsProviderError",Object.setPrototypeOf(this,x.prototype)}}});var z0;var hz=G(()=>{C3();z0=class z0 extends i0{constructor(D,F=!0){super(D,F);this.name="TokenProviderError",Object.setPrototypeOf(this,z0.prototype)}}});var N1=(...D)=>async()=>{if(D.length===0)throw new i0("No providers in chain");let F;for(let E of D)try{return await E()}catch(w){if(F=w,w?.tryNextLink)continue;throw w}throw F};var Uz=G(()=>{C3()});var Az=(D)=>()=>Promise.resolve(D);var e8=(D,F,E)=>{let w,$,C,f=!1;const B=async()=>{if(!$)$=D();try{w=await $,C=!0,f=!1}finally{$=void 0}return w};if(F===void 0)return async(h)=>{if(!C||h?.forceRefresh)w=await B();return w};return async(h)=>{if(!C||h?.forceRefresh)w=await B();if(f)return w;if(E&&!E(w))return f=!0,w;if(F(w))return await B(),w;return w}};var fD=G(()=>{Bz();C3();hz();Uz()});function sw(D){try{const F=new Set(Array.from(D.match(/([A-Z_]){3,}/g)??[]));return F.delete("CONFIG"),F.delete("CONFIG_PREFIX_SEPARATOR"),F.delete("ENV"),[...F].join(", ")}catch(F){return D}}var Iz=(D,F)=>async()=>{try{const E=D(process.env);if(E===void 0)throw new Error;return E}catch(E){throw new x(E.message||`Not found in ENV: ${sw(D.toString())}`,{logger:F})}};var Mz=G(()=>{fD()});import{homedir as tp}from"os";import{sep as ep}from"path";var c9,Da=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},I8=()=>{const{HOME:D,USERPROFILE:F,HOMEPATH:E,HOMEDRIVE:w=`C:${ep}`}=process.env;if(D)return D;if(F)return F;if(E)return`${w}${E}`;const $=Da();if(!c9[$])c9[$]=tp();return c9[$]};var c6=G(()=>{c9={}});var Gz="AWS_PROFILE",p0=(D)=>D.profile||process.env.AWS_PROFILE||"default";import{createHash as Fa}from"crypto";import{join as Ea}from"path";var uw=(D)=>{const E=Fa("sha1").update(D).digest("hex");return Ea(I8(),".aws","sso","cache",`${E}.json`)};var g9=G(()=>{c6()});import{promises as wa}from"fs";var $a,dw=async(D)=>{const F=uw(D),E=await $a(F,"utf8");return JSON.parse(E)};var Yz=G(()=>{g9();({readFile:$a}=wa)});var r9,Zz=(D)=>Object.entries(D).filter(([F])=>{const E=F.indexOf(a0);if(E===-1)return!1;return Object.values(r9.IniSectionType).includes(F.substring(0,E))}).reduce((F,[E,w])=>{const $=E.indexOf(a0),C=E.substring(0,$)===r9.IniSectionType.PROFILE?E.substring($+1):E;return F[C]=w,F},{...D.default&&{default:D.default}});var Wz=G(()=>{r9=L(J0(),1);g6()});import{join as fa}from"path";var Ca="AWS_CONFIG_FILE",vw=()=>process.env[Ca]||fa(I8(),".aws","config");var _9=G(()=>{c6()});import{join as Ba}from"path";var ha="AWS_SHARED_CREDENTIALS_FILE",Xz=()=>process.env[ha]||Ba(I8(),".aws","credentials");var Jz=G(()=>{c6()});var zz,Ua,Aa,B3=(D)=>{const F={};let E,w;for(let $ of D.split(/\r?\n/)){const C=$.split(/(^|\s)[;#]/)[0].trim();if(C[0]==="["&&C[C.length-1]==="]"){E=void 0,w=void 0;const B=C.substring(1,C.length-1),h=Ua.exec(B);if(h){const[,U,,I]=h;if(Object.values(zz.IniSectionType).includes(U))E=[U,I].join(a0)}else E=B;if(Aa.includes(B))throw new Error(`Found invalid profile name "${B}"`)}else if(E){const B=C.indexOf("=");if(![0,-1].includes(B)){const[h,U]=[C.substring(0,B).trim(),C.substring(B+1).trim()];if(U==="")w=h;else{if(w&&$.trimStart()===$)w=void 0;F[E]=F[E]||{};const I=w?[w,h].join(a0):h;F[E][I]=U}}}}return F};var s9=G(()=>{zz=L(J0(),1);g6();Ua=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Aa=["__proto__","profile __proto__"]});import{promises as Ia}from"fs";var Ma,u9,h3=(D,F)=>{if(!u9[D]||F?.ignoreCache)u9[D]=Ma(D,"utf8");return u9[D]};var d9=G(()=>{({readFile:Ma}=Ia),u9={}});import{join as Tz}from"path";var Kz=()=>({}),a0=".",mw=async(D={})=>{const{filepath:F=Xz(),configFilepath:E=vw()}=D,w=I8();let C=F;if(F.startsWith("~/"))C=Tz(w,F.slice(2));let f=E;if(E.startsWith("~/"))f=Tz(w,E.slice(2));const B=await Promise.all([h3(f,{ignoreCache:D.ignoreCache}).then(B3).then(Zz).catch(Kz),h3(C,{ignoreCache:D.ignoreCache}).then(B3).catch(Kz)]);return{configFile:B[0],credentialsFile:B[1]}};var g6=G(()=>{Wz();_9();Jz();c6();s9();d9()});var Sz,Qz=(D)=>Object.entries(D).filter(([F])=>F.startsWith(Sz.IniSectionType.SSO_SESSION+a0)).reduce((F,[E,w])=>({...F,[E.substring(E.indexOf(a0)+1)]:w}),{});var Hz=G(()=>{Sz=L(J0(),1);g6()});var Ga=()=>({}),nw=async(D={})=>h3(D.configFilepath??vw()).then(B3).then(Qz).catch(Ga);var Lz=G(()=>{_9();Hz();s9();d9()});var Rz=(...D)=>{const F={};for(let E of D)for(let[w,$]of Object.entries(E))if(F[w]!==void 0)Object.assign(F[w],$);else F[w]=$;return F};var M8=async(D)=>{const F=await mw(D);return Rz(F.configFile,F.credentialsFile)};var Vz=G(()=>{g6()});var Nz=()=>{};var X2=G(()=>{c6();g9();Yz();g6();Lz();Vz();Nz()});var qz=(D,{preferredFile:F="config",...E}={})=>async()=>{const w=p0(E),{configFile:$,credentialsFile:C}=await mw(E),f=C[w]||{},B=$[w]||{},h=F==="config"?{...f,...B}:{...B,...f};try{const I=D(h,F==="config"?$:C);if(I===void 0)throw new Error;return I}catch(U){throw new x(U.message||`Not found in config files w/ profile [${w}]: ${sw(D.toString())}`,{logger:E.logger})}};var Oz=G(()=>{fD();X2()});var Ya=(D)=>typeof D==="function",jz=(D)=>Ya(D)?async()=>await D():Az(D);var Pz=G(()=>{fD()});var i=({environmentVariableSelector:D,configFileSelector:F,default:E},w={})=>e8(N1(Iz(D),qz(F,w),jz(E)));var yz=G(()=>{fD();Mz();Oz();Pz()});var m2=G(()=>{yz()});var kz="AWS_ENDPOINT_URL",bz="endpoint_url",xz=(D)=>({environmentVariableSelector:(F)=>{const E=D.split(" ").map((C)=>C.toUpperCase()),w=F[[kz,...E].join("_")];if(w)return w;const $=F[kz];if($)return $;return},configFileSelector:(F,E)=>{if(E&&F.services){const $=E[["services",F.services].join(a0)];if($){const C=D.split(" ").map((B)=>B.toLowerCase()),f=$[[C.join("_"),bz].join(a0)];if(f)return f}}const w=F[bz];if(w)return w;return},default:void 0});var cz=G(()=>{X2()});var lw=async(D)=>i(xz(D??""))();var v9=G(()=>{m2();cz()});function gz(D){const F={};if(D=D.replace(/^\?/,""),D)for(let E of D.split("&")){let[w,$=null]=E.split("=");if(w=decodeURIComponent(w),$)$=decodeURIComponent($);if(!(w in F))F[w]=$;else if(Array.isArray(F[w]))F[w].push($);else F[w]=[F[w],$]}return F}var D0=(D)=>{if(typeof D==="string")return D0(new URL(D));const{hostname:F,pathname:E,port:w,protocol:$,search:C}=D;let f;if(C)f=gz(C);return{hostname:F,port:w?parseInt(w):void 0,protocol:$,path:E,query:f}};var G8=()=>{};var iw=(D)=>{if(typeof D==="object"){if("url"in D)return D0(D.url);return D}return D0(D)};var pw=G(()=>{G8()});var rz=async(D,F,E,w)=>{if(!E.endpoint){let f;if(E.serviceConfiguredEndpoint)f=await E.serviceConfiguredEndpoint();else f=await lw(E.serviceId);if(f)E.endpoint=()=>Promise.resolve(iw(f))}const $=await Za(D,F,E);if(typeof E.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return E.endpointProvider($,w)},Za=async(D,F,E)=>{const w={},$=F?.getEndpointParameterInstructions?.()||{};for(let[C,f]of Object.entries($))switch(f.type){case"staticContextParams":w[C]=f.value;break;case"contextParams":w[C]=D[f.name];break;case"clientContextParams":case"builtInParams":w[C]=await Cz(f.name,C,E)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(f))}if(Object.keys($).length===0)Object.assign(w,E);if(String(E.serviceId).toLowerCase()==="s3")await wz(w);return w};var m9=G(()=>{fz();v9();pw()});var _z=G(()=>{m9();pw()});var sz=({config:D,instructions:F})=>{return(E,w)=>async($)=>{const C=await rz($.input,{getEndpointParameterInstructions(){return F}},{...D},w);w.endpointV2=C,w.authSchemes=C.properties?.authSchemes;const f=w.authSchemes?.[0];if(f){w.signing_region=f.signingRegion,w.signing_service=f.signingName;const h=m0(w)?.selectedHttpAuthScheme?.httpAuthOption;if(h)h.signingProperties=Object.assign(h.signingProperties||{},{signing_region:f.signingRegion,signingRegion:f.signingRegion,signing_service:f.signingName,signingName:f.signingName,signingRegionSet:f.signingRegionSet},f.properties)}return E({...$})}};var n9=G(()=>{W2();m9()});var uz=(D,F)=>(E)=>async(w)=>{const{response:$}=await E(w);try{const C=await F($,D);return{response:$,output:C}}catch(C){if(Object.defineProperty(C,"$response",{value:$}),!("$metadata"in C)){if(C.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof C.$responseBodyText!=="undefined"){if(C.$response)C.$response.body=C.$responseBodyText}}throw C}};var dz=(D,F)=>(E,w)=>async($)=>{const C=w.endpointV2?.url&&D.urlParser?async()=>D.urlParser(w.endpointV2.url):D.endpoint;if(!C)throw new Error("No valid endpoint provider available.");const f=await F($.input,{...D,endpoint:C});return E({...$,request:f})};function p(D,F,E){return{applyToStack:(w)=>{w.add(uz(D,E),Wa),w.add(dz(D,F),l9)}}}var Wa,l9;var vz=G(()=>{Wa={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},l9={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var LD=G(()=>{vz()});var Xa,a=(D,F)=>({applyToStack:(E)=>{E.addRelativeTo(sz({config:D,instructions:F}),Xa)}});var mz=G(()=>{LD();n9();Xa={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:l9.name}});var n2=(D)=>{const F=D.tls??!0,{endpoint:E}=D,w=E!=null?async()=>iw(await sD(E)()):void 0,C={...D,endpoint:w,tls:F,isCustomEndpoint:!!E,useDualstackEndpoint:sD(D.useDualstackEndpoint??!1),useFipsEndpoint:sD(D.useFipsEndpoint??!1)};let f=void 0;return C.serviceConfiguredEndpoint=async()=>{if(D.serviceId&&!f)f=lw(D.serviceId);return f},C};var nz=G(()=>{W2();v9();pw()});var lz=()=>{};var AD=G(()=>{_z();n9();mz();nz();lz()});var o0,D6=3,t0;var aw=G(()=>{(function(D){D.STANDARD="standard",D.ADAPTIVE="adaptive"})(o0||(o0={}));t0=o0.STANDARD});var iz,pz,az,oz;var tz=G(()=>{iz=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],pz=["TimeoutError","RequestTimeout","RequestTimeoutException"],az=[500,502,503,504],oz=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var Ja=(D)=>D.$metadata?.clockSkewCorrected,r6=(D)=>D.$metadata?.httpStatusCode===429||iz.includes(D.name)||D.$retryable?.throttling==!0,ow=(D)=>Ja(D)||pz.includes(D.name)||oz.includes(D?.code||"")||az.includes(D.$metadata?.httpStatusCode||0),ez=(D)=>{if(D.$metadata?.httpStatusCode!==void 0){const F=D.$metadata.httpStatusCode;if(500<=F&&F<=599&&!ow(D))return!0;return!1}return!1};var U3=G(()=>{tz()});class tw{constructor(D){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=D?.beta??0.7,this.minCapacity=D?.minCapacity??1,this.minFillRate=D?.minFillRate??0.5,this.scaleConstant=D?.scaleConstant??0.4,this.smooth=D?.smooth??0.8;const F=this.getCurrentTimeInSeconds();this.lastThrottleTime=F,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(D){if(!this.enabled)return;if(this.refillTokenBucket(),D>this.currentCapacity){const F=(D-this.currentCapacity)/this.fillRate*1000;await new Promise((E)=>setTimeout(E,F))}this.currentCapacity=this.currentCapacity-D}refillTokenBucket(){const D=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=D;return}const F=(D-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+F),this.lastTimestamp=D}updateClientSendingRate(D){let F;if(this.updateMeasuredRate(),r6(D)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),F=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),F=this.cubicSuccess(this.getCurrentTimeInSeconds());const E=Math.min(F,2*this.measuredTxRate);this.updateTokenBucketRate(E)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(D){return this.getPrecise(D*this.beta)}cubicSuccess(D){return this.getPrecise(this.scaleConstant*Math.pow(D-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(D){this.refillTokenBucket(),this.fillRate=Math.max(D,this.minFillRate),this.maxCapacity=Math.max(D,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const D=this.getCurrentTimeInSeconds(),F=Math.floor(D*2)/2;if(this.requestCount++,F>this.lastTxRateBucket){const E=this.requestCount/(F-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(E*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=F}}getPrecise(D){return parseFloat(D.toFixed(8))}}var i9=G(()=>{U3()});var F6=100,A3=20000,p9=500,ew=500,a9=5,o9=10,t9=1,D$="amz-sdk-invocation-id",F$="amz-sdk-request";var DT=()=>{let D=F6;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(A3,Math.random()*2**w*D))},setDelayBase:(w)=>{D=w}}};var FT=()=>{};var e9=({retryDelay:D,retryCount:F,retryCost:E})=>{return{getRetryCount:()=>F,getRetryDelay:()=>Math.min(A3,D),getRetryCost:()=>E}};var ET=()=>{};class _6{constructor(D){this.maxAttempts=D,this.mode=o0.STANDARD,this.capacity=ew,this.retryBackoffStrategy=DT(),this.maxAttemptsProvider=typeof D==="function"?D:async()=>D}async acquireInitialRetryToken(D){return e9({retryDelay:F6,retryCount:0})}async refreshRetryTokenForRetry(D,F){const E=await this.getMaxAttempts();if(this.shouldRetry(D,F,E)){const w=F.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?p9:F6);const $=this.retryBackoffStrategy.computeNextBackoffDelay(D.getRetryCount()),C=F.retryAfterHint?Math.max(F.retryAfterHint.getTime()-Date.now()||0,$):$,f=this.getCapacityCost(w);return this.capacity-=f,e9({retryDelay:C,retryCount:D.getRetryCount()+1,retryCost:f})}throw new Error("No retry token available")}recordSuccess(D){this.capacity=Math.max(ew,this.capacity+(D.getRetryCost()??t9))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(D){return console.warn(`Max attempts provider could not resolve. Using default of ${D6}`),D6}}shouldRetry(D,F,E){return D.getRetryCount()+1<E&&this.capacity>=this.getCapacityCost(F.errorType)&&this.isRetryableError(F.errorType)}getCapacityCost(D){return D==="TRANSIENT"?o9:a9}isRetryableError(D){return D==="THROTTLING"||D==="TRANSIENT"}}var E$=G(()=>{aw();FT();ET()});class D5{constructor(D,F){this.maxAttemptsProvider=D,this.mode=o0.ADAPTIVE;const{rateLimiter:E}=F??{};this.rateLimiter=E??new tw,this.standardRetryStrategy=new _6(D)}async acquireInitialRetryToken(D){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(D)}async refreshRetryTokenForRetry(D,F){return this.rateLimiter.updateClientSendingRate(F),this.standardRetryStrategy.refreshRetryTokenForRetry(D,F)}recordSuccess(D){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(D)}}var wT=G(()=>{aw();i9();E$()});var $T=G(()=>{E$()});var fT=()=>{};var j0=G(()=>{wT();$T();i9();E$();aw();fT()});var l2,yAD,kAD,w$,bAD,xAD,cAD,gAD,rAD,_AD;var F5=G(()=>{l2=L(Zf(),1),yAD=l2.default.v1,kAD=l2.default.v3,w$=l2.default.v4,bAD=l2.default.v5,xAD=l2.default.NIL,cAD=l2.default.version,gAD=l2.default.validate,rAD=l2.default.stringify,_AD=l2.default.parse});var CT=G(()=>{j0()});var E5=G(()=>{j0()});var w5=G(()=>{U3()});var $5=(D)=>{if(D instanceof Error)return D;if(D instanceof Object)return Object.assign(new Error,D);if(typeof D==="string")return new Error(D);return new Error(`AWS SDK error wrapper for ${D}`)};var f5=G(()=>{vD();U3();j0();CT();E5();w5()});var BT=G(()=>{j0();f5()});var hT="AWS_MAX_ATTEMPTS",UT="max_attempts",i2,p2=(D)=>{const{retryStrategy:F}=D,E=sD(D.maxAttempts??D6);return{...D,maxAttempts:E,retryStrategy:async()=>{if(F)return F;if(await sD(D.retryMode)()===o0.ADAPTIVE)return new D5(E);return new _6(E)}}},za="AWS_RETRY_MODE",Ta="retry_mode",a2;var AT=G(()=>{W2();j0();i2={environmentVariableSelector:(D)=>{const F=D[hT];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Environment variable ${hT} mast be a number, got "${F}"`);return E},configFileSelector:(D)=>{const F=D[UT];if(!F)return;const E=parseInt(F);if(Number.isNaN(E))throw new Error(`Shared config file entry ${UT} mast be a number, got "${F}"`);return E},default:D6},a2={environmentVariableSelector:(D)=>D[za],configFileSelector:(D)=>D[Ta],default:t0}});var IT=G(()=>{vD();j0()});var E6=(D,F)=>{const E=[];if(D)E.push(D);if(F)for(let w of F)E.push(w);return E},Y8=(D,F)=>{return`${D||"anonymous"}${F&&F.length>0?` (a.k.a. ${F.join(",")})`:""}`},s6=()=>{let D=[],F=[],E=!1;const w=new Set,$=(A)=>A.sort((Y,M)=>MT[M.step]-MT[Y.step]||GT[M.priority||"normal"]-GT[Y.priority||"normal"]),C=(A)=>{let Y=!1;const M=(Z)=>{const z=E6(Z.name,Z.aliases);if(z.includes(A)){Y=!0;for(let X of z)w.delete(X);return!1}return!0};return D=D.filter(M),F=F.filter(M),Y},f=(A)=>{let Y=!1;const M=(Z)=>{if(Z.middleware===A){Y=!0;for(let z of E6(Z.name,Z.aliases))w.delete(z);return!1}return!0};return D=D.filter(M),F=F.filter(M),Y},B=(A)=>{return D.forEach((Y)=>{A.add(Y.middleware,{...Y})}),F.forEach((Y)=>{A.addRelativeTo(Y.middleware,{...Y})}),A.identifyOnResolve?.(I.identifyOnResolve()),A},h=(A)=>{const Y=[];return A.before.forEach((M)=>{if(M.before.length===0&&M.after.length===0)Y.push(M);else Y.push(...h(M))}),Y.push(A),A.after.reverse().forEach((M)=>{if(M.before.length===0&&M.after.length===0)Y.push(M);else Y.push(...h(M))}),Y},U=(A=!1)=>{const Y=[],M=[],Z={};return D.forEach((X)=>{const J={...X,before:[],after:[]};for(let K of E6(J.name,J.aliases))Z[K]=J;Y.push(J)}),F.forEach((X)=>{const J={...X,before:[],after:[]};for(let K of E6(J.name,J.aliases))Z[K]=J;M.push(J)}),M.forEach((X)=>{if(X.toMiddleware){const J=Z[X.toMiddleware];if(J===void 0){if(A)return;throw new Error(`${X.toMiddleware} is not found when adding ${Y8(X.name,X.aliases)} middleware ${X.relation} ${X.toMiddleware}`)}if(X.relation==="after")J.after.push(X);if(X.relation==="before")J.before.push(X)}}),$(Y).map(h).reduce((X,J)=>{return X.push(...J),X},[])},I={add:(A,Y={})=>{const{name:M,override:Z,aliases:z}=Y,X={step:"initialize",priority:"normal",middleware:A,...Y},J=E6(M,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${Y8(M,z)}'`);for(let K of J){const H=D.findIndex((m)=>m.name===K||m.aliases?.some((FD)=>FD===K));if(H===-1)continue;const V=D[H];if(V.step!==X.step||X.priority!==V.priority)throw new Error(`"${Y8(V.name,V.aliases)}" middleware with ${V.priority} priority in ${V.step} step cannot be overridden by "${Y8(M,z)}" middleware with ${X.priority} priority in ${X.step} step.`);D.splice(H,1)}}for(let K of J)w.add(K)}D.push(X)},addRelativeTo:(A,Y)=>{const{name:M,override:Z,aliases:z}=Y,X={middleware:A,...Y},J=E6(M,z);if(J.length>0){if(J.some((K)=>w.has(K))){if(!Z)throw new Error(`Duplicate middleware name '${Y8(M,z)}'`);for(let K of J){const H=F.findIndex((m)=>m.name===K||m.aliases?.some((FD)=>FD===K));if(H===-1)continue;const V=F[H];if(V.toMiddleware!==X.toMiddleware||V.relation!==X.relation)throw new Error(`"${Y8(V.name,V.aliases)}" middleware ${V.relation} "${V.toMiddleware}" middleware cannot be overridden by "${Y8(M,z)}" middleware ${X.relation} "${X.toMiddleware}" middleware.`);F.splice(H,1)}}for(let K of J)w.add(K)}F.push(X)},clone:()=>B(s6()),use:(A)=>{A.applyToStack(I)},remove:(A)=>{if(typeof A==="string")return C(A);else return f(A)},removeByTag:(A)=>{let Y=!1;const M=(Z)=>{const{tags:z,name:X,aliases:J}=Z;if(z&&z.includes(A)){const K=E6(X,J);for(let H of K)w.delete(H);return Y=!0,!1}return!0};return D=D.filter(M),F=F.filter(M),Y},concat:(A)=>{const Y=B(s6());return Y.use(A),Y.identifyOnResolve(E||Y.identifyOnResolve()||(A.identifyOnResolve?.()??!1)),Y},applyToStack:B,identify:()=>{return U(!0).map((A)=>{const Y=A.step??A.relation+" "+A.toMiddleware;return Y8(A.name,A.aliases)+" - "+Y})},identifyOnResolve(A){if(typeof A==="boolean")E=A;return E},resolve:(A,Y)=>{for(let M of U().map((Z)=>Z.middleware).reverse())A=M(A,Y);if(E)console.log(I.identify());return A}};return I},MT,GT;var YT=G(()=>{MT={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},GT={high:3,normal:2,low:1}});var C5=G(()=>{YT()});class P0{constructor(D){this.config=D,this.middlewareStack=s6()}send(D,F,E){const w=typeof F!=="function"?F:void 0,$=typeof F==="function"?F:E,C=w===void 0&&this.config.cacheMiddleware===!0;let f;if(C){if(!this.handlers)this.handlers=new WeakMap;const B=this.handlers;if(B.has(D.constructor))f=B.get(D.constructor);else f=D.resolveMiddleware(this.middlewareStack,this.config,w),B.set(D.constructor,f)}else delete this.handlers,f=D.resolveMiddleware(this.middlewareStack,this.config,w);if($)f(D).then((B)=>$(null,B.output),(B)=>$(B)).catch(()=>{});else return f(D).then((B)=>B.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var ZT=G(()=>{C5()});var WT=(D)=>typeof ArrayBuffer==="function"&&D instanceof ArrayBuffer||Object.prototype.toString.call(D)==="[object ArrayBuffer]";import{Buffer as B5}from"buffer";var q1=(D,F=0,E=D.byteLength-F)=>{if(!WT(D))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof D} (${D})`);return B5.from(D,F,E)},u6=(D,F)=>{if(typeof D!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof D} (${D})`);return F?B5.from(D,F):B5.from(D)};var w6=()=>{};var Ka,T0=(D)=>{if(D.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Ka.exec(D))throw new TypeError("Invalid base64 string.");const F=u6(D,"base64");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength)};var XT=G(()=>{w6();Ka=/^[A-Za-z0-9+/]*={0,2}$/});var F0=(D)=>{const F=u6(D,"utf8");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var h5=G(()=>{w6()});var JT=(D)=>{if(typeof D==="string")return F0(D);if(ArrayBuffer.isView(D))return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(D)};var zT=G(()=>{h5()});var K0=(D)=>{if(typeof D==="string")return D;if(typeof D!=="object"||typeof D.byteOffset!=="number"||typeof D.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return q1(D.buffer,D.byteOffset,D.byteLength).toString("utf8")};var TT=G(()=>{w6()});var o2=G(()=>{h5();zT();TT()});var S0=(D)=>{let F;if(typeof D==="string")F=F0(D);else F=D;if(typeof F!=="object"||typeof F.byteOffset!=="number"||typeof F.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return q1(F.buffer,F.byteOffset,F.byteLength).toString("base64")};var KT=G(()=>{w6();o2()});var O1=G(()=>{XT();KT()});function ST(D,F="utf-8"){if(F==="base64")return S0(D);return K0(D)}function QT(D,F){if(F==="base64")return j1.mutate(T0(D));return j1.mutate(F0(D))}var HT=G(()=>{O1();o2();U5()});var j1;var U5=G(()=>{HT();j1=class j1 extends Uint8Array{static fromString(D,F="utf-8"){switch(typeof D){case"string":return QT(D,F);default:throw new Error(`Unsupported conversion from ${typeof D} to Uint8ArrayBlobAdapter.`)}}static mutate(D){return Object.setPrototypeOf(D,j1.prototype),D}transformToString(D="utf-8"){return ST(this,D)}}});var LT=()=>{};var I3=(D)=>encodeURIComponent(D).replace(/[!'()*]/g,Sa),Sa=(D)=>`%${D.charCodeAt(0).toString(16).toUpperCase()}`;var RT=()=>{};var VT=G(()=>{RT()});function $$(D){const F=[];for(let E of Object.keys(D).sort()){const w=D[E];if(E=I3(E),Array.isArray(w))for(let $=0,C=w.length;$<C;$++)F.push(`${E}=${I3(w[$])}`);else{let $=E;if(w||typeof w==="string")$+=`=${I3(w)}`;F.push($)}}return F.join("&")}var f$=G(()=>{VT()});var NT;var qT=G(()=>{NT=["ECONNRESET","EPIPE","ETIMEDOUT"]});var A5=(D)=>{const F={};for(let E of Object.keys(D)){const w=D[E];F[E]=Array.isArray(w)?w.join(","):w}return F};var I5=()=>{};var OT=(D,F,E=0)=>{if(!E)return-1;const w=($)=>{const C=setTimeout(()=>{D.destroy(),F(Object.assign(new Error(`Socket timed out without establishing a connection within ${E} ms`),{name:"TimeoutError"}))},E-$),f=(B)=>{if(B?.connecting)B.on("connect",()=>{clearTimeout(C)});else clearTimeout(C)};if(D.socket)f(D.socket);else D.on("socket",f)};if(E<2000)return w(0),0;return setTimeout(w.bind(null,1000),1000)};var jT=(D,{keepAlive:F,keepAliveMsecs:E},w=3000)=>{if(F!==!0)return-1;const $=()=>{if(D.socket)D.socket.setKeepAlive(F,E||0);else D.on("socket",(C)=>{C.setKeepAlive(F,E||0)})};if(w===0)return $(),0;return setTimeout($,w)};var PT=(D,F,E=0)=>{const w=($)=>{D.setTimeout(E-$,()=>{D.destroy(),F(Object.assign(new Error(`Connection timed out after ${E} ms`),{name:"TimeoutError"}))})};if(0<E&&E<6000)return w(0),0;return setTimeout(w.bind(null,E===0?0:3000),3000)};import{Readable as Qa}from"stream";async function M5(D,F,E=yT){const w=F.headers??{},$=w.Expect||w.expect;let C=-1,f=!1;if($==="100-continue")await Promise.race([new Promise((B)=>{C=Number(setTimeout(B,Math.max(yT,E)))}),new Promise((B)=>{D.on("continue",()=>{clearTimeout(C),B()}),D.on("error",()=>{f=!0,clearTimeout(C),B()})})]);if(!f)Ha(D,F.body)}function Ha(D,F){if(F instanceof Qa){F.pipe(D);return}if(F){if(Buffer.isBuffer(F)||typeof F==="string"){D.end(F);return}const E=F;if(typeof E==="object"&&E.buffer&&typeof E.byteOffset==="number"&&typeof E.byteLength==="number"){D.end(Buffer.from(E.buffer,E.byteOffset,E.byteLength));return}D.end(Buffer.from(F));return}D.end()}var yT=1000;var G5=()=>{};import{Agent as kT,request as La}from"http";import{Agent as bT,request as Ra}from"https";class U0{static create(D){if(typeof D?.handle==="function")return D;return new U0(D)}static checkSocketUsage(D,F,E=console){const{sockets:w,requests:$,maxSockets:C}=D;if(typeof C!=="number"||C===1/0)return F;const f=15000;if(Date.now()-f<F)return F;if(w&&$)for(let B in w){const h=w[B]?.length??0,U=$[B]?.length??0;if(h>=C&&U>=2*C)return E?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${h} and ${U} additional requests are enqueued.
20
20
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
21
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return F}constructor(D){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((F,E)=>{if(typeof D==="function")D().then((w)=>{F(this.resolveDefaultConfig(w))}).catch(E);else F(this.resolveDefaultConfig(D))})}resolveDefaultConfig(D){const{requestTimeout:F,connectionTimeout:E,socketTimeout:w,httpAgent:$,httpsAgent:C}=D||{};return{connectionTimeout:E,requestTimeout:F??w,httpAgent:(()=>{if($ instanceof jT||typeof $?.destroy==="function")return $;return new jT({keepAlive:!0,maxSockets:50,...$})})(),httpsAgent:(()=>{if(C instanceof PT||typeof C?.destroy==="function")return C;return new PT({keepAlive:!0,maxSockets:50,...C})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(D,{abortSignal:F}={}){if(!this.config)this.config=await this.configProvider;return new Promise((E,w)=>{let $=void 0;const C=[],f=async(K)=>{await $,C.forEach(clearTimeout),E(K)},B=async(K)=>{await $,C.forEach(clearTimeout),w(K)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(F?.aborted){const K=new Error("Request aborted");K.name="AbortError",B(K);return}const h=D.protocol==="https:",U=h?this.config.httpsAgent:this.config.httpAgent;C.push(setTimeout(()=>{this.socketWarningTimestamp=h0.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const I=F$(D.query||{});let A=void 0;if(D.username!=null||D.password!=null){const K=D.username??"",L=D.password??"";A=`${K}:${L}`}let Y=D.path;if(I)Y+=`?${I}`;if(D.fragment)Y+=`#${D.fragment}`;let G=D.hostname??"";if(G[0]==="["&&G.endsWith("]"))G=D.hostname.slice(1,-1);else G=D.hostname;const Z={headers:D.headers,host:G,method:D.method,path:Y,port:D.port,agent:U,auth:A},W=(h?da:ua)(Z,(K)=>{const L=new E8({statusCode:K.statusCode||-1,reason:K.statusMessage,headers:h5(K.headers),body:K});f({response:L})});if(W.on("error",(K)=>{if(LT.includes(K.code))B(Object.assign(K,{name:"TimeoutError"}));else B(K)}),F){const K=()=>{W.destroy();const L=new Error("Request aborted");L.name="AbortError",B(L)};if(typeof F.addEventListener==="function"){const L=F;L.addEventListener("abort",K,{once:!0}),W.once("close",()=>L.removeEventListener("abort",K))}else F.onabort=K}C.push(VT(W,B,this.config.connectionTimeout)),C.push(qT(W,B,this.config.requestTimeout));const J=Z.agent;if(typeof J==="object"&&"keepAlive"in J)C.push(NT(W,{keepAlive:J.keepAlive,keepAliveMsecs:J.keepAliveMsecs}));$=A5(W,D,this.config.requestTimeout).catch((K)=>{return C.forEach(clearTimeout),w(K)})})}updateHttpClientConfig(D,F){this.config=void 0,this.configProvider=this.configProvider.then((E)=>{return{...E,[D]:F}})}httpHandlerConfigs(){return this.config??{}}}var yT=M(()=>{dD();E$();RT();U5();I5()});var kT=()=>{};var bT=M(()=>{kT()});var xT=M(()=>{dD();E$();U5();bT();I5()});import{Writable as va}from"stream";var G5;var cT=M(()=>{G5=class G5 extends va{constructor(){super(...arguments);this.bufferedBytes=[]}_write(D,F,E){this.bufferedBytes.push(D),E()}}});async function na(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}var t0=(D)=>{if(ma(D))return na(D);return new Promise((F,E)=>{const w=new G5;D.pipe(w),D.on("error",($)=>{w.end(),E($)}),w.on("error",E),w.on("finish",function(){const $=new Uint8Array(Buffer.concat(this.bufferedBytes));F($)})})},ma=(D)=>typeof ReadableStream==="function"&&D instanceof ReadableStream;var gT=M(()=>{cT()});var Z8=M(()=>{yT();xT();gT()});var rT=M(()=>{dD();E$()});async function la(D){const F=await pa(D),E=z0(F);return new Uint8Array(E)}async function ia(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}function pa(D){return new Promise((F,E)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return E(new Error("Reader aborted too early"));const $=w.result??"",C=$.indexOf(","),f=C>-1?C+1:$.length;F($.substring(f))},w.onabort=()=>E(new Error("Read aborted")),w.onerror=()=>E(w.error),w.readAsDataURL(D)})}var _T=(D)=>{if(typeof Blob==="function"&&D instanceof Blob)return la(D);return ia(D)};var sT=M(()=>{O1()});var uT=M(()=>{rT();sT()});function vT(D){if(D.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const F=new Uint8Array(D.length/2);for(let E=0;E<D.length;E+=2){const w=D.slice(E,E+2).toLowerCase();if(w in M5)F[E/2]=M5[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return F}function o2(D){let F="";for(let E=0;E<D.byteLength;E++)F+=dT[D[E]];return F}var dT,M5;var w$=M(()=>{dT={},M5={};for(let D=0;D<256;D++){let F=D.toString(16).toLowerCase();if(F.length===1)F=`0${F}`;dT[D]=F,M5[F]=D}});var A3=(D)=>typeof ReadableStream==="function"&&(D?.constructor?.name===ReadableStream.name||D instanceof ReadableStream);var mT="The stream has already been transformed.",lT=(D)=>{if(!nT(D)&&!A3(D)){const $=D?.__proto__?.constructor?.name||D;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${$}`)}let F=!1;const E=async()=>{if(F)throw new Error(mT);return F=!0,await _T(D)},w=($)=>{if(typeof $.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return $.stream()};return Object.assign(D,{transformToByteArray:E,transformToString:async($)=>{const C=await E();if($==="base64")return K0(C);else if($==="hex")return o2(C);else if($===void 0||$==="utf8"||$==="utf-8")return T0(C);else if(typeof TextDecoder==="function")return new TextDecoder($).decode(C);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(F)throw new Error(mT);if(F=!0,nT(D))return w(D);else if(A3(D))return D;else throw new Error(`Cannot transform payload to web stream, got ${D}`)}})},nT=(D)=>typeof Blob==="function"&&D instanceof Blob;var iT=M(()=>{uT();O1();w$();a2()});import{Readable as Y5}from"stream";import{TextDecoder as aa}from"util";var pT="The stream has already been transformed.",aT=(D)=>{if(!(D instanceof Y5))try{return lT(D)}catch(w){const $=D?.__proto__?.constructor?.name||D;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${$}`)}let F=!1;const E=async()=>{if(F)throw new Error(pT);return F=!0,await t0(D)};return Object.assign(D,{transformToByteArray:E,transformToString:async(w)=>{const $=await E();if(w===void 0||Buffer.isEncoding(w))return q1($.buffer,$.byteOffset,$.byteLength).toString(w);else return new aa(w).decode($)},transformToWebStream:()=>{if(F)throw new Error(pT);if(D.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Y5.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return F=!0,Y5.toWeb(D)}})};var oT=M(()=>{Z8();E6();iT()});var tT=()=>{};var eT=()=>{};var Z5=M(()=>{B5();ST();oT();tT();eT()});var w6=async(D=new Uint8Array,F)=>{if(D instanceof Uint8Array)return j1.mutate(D);if(!D)return j1.mutate(new Uint8Array);const E=F.streamCollector(D);return j1.mutate(await E)};var DK=M(()=>{Z5()});class l{constructor(){this.middlewareStack=_6()}static classBuilder(){return new EK}resolveMiddlewareWithContext(D,F,E,{middlewareFn:w,clientName:$,commandName:C,inputFilterSensitiveLog:f,outputFilterSensitiveLog:B,smithyContext:h,additionalContext:U,CommandCtor:I}){for(let z of w.bind(this)(I,D,F,E))this.middlewareStack.use(z);const A=D.concat(this.middlewareStack),{logger:Y}=F,G={logger:Y,clientName:$,commandName:C,inputFilterSensitiveLog:f,outputFilterSensitiveLog:B,[FK.SMITHY_CONTEXT_KEY]:{commandInstance:this,...h},...U},{requestHandler:Z}=F;return A.resolve((z)=>Z.handle(z.request,E||{}),G)}}class EK{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(D)=>D,this._outputFilterSensitiveLog=(D)=>D,this._serializer=null,this._deserializer=null}init(D){this._init=D}ep(D){return this._ep=D,this}m(D){return this._middlewareFn=D,this}s(D,F,E={}){return this._smithyContext={service:D,operation:F,...E},this}c(D={}){return this._additionalContext=D,this}n(D,F){return this._clientName=D,this._commandName=F,this}f(D=(E)=>E,F=(E)=>E){return this._inputFilterSensitiveLog=D,this._outputFilterSensitiveLog=F,this}ser(D){return this._serializer=D,this}de(D){return this._deserializer=D,this}build(){const D=this;let F;return F=class extends l{static getEndpointParameterInstructions(){return D._ep}constructor(...[E]){super();this.serialize=D._serializer,this.deserialize=D._deserializer,this.input=E??{},D._init(this)}resolveMiddleware(E,w,$){return this.resolveMiddlewareWithContext(E,w,$,{CommandCtor:F,middlewareFn:D._middlewareFn,clientName:D._clientName,commandName:D._commandName,inputFilterSensitiveLog:D._inputFilterSensitiveLog,outputFilterSensitiveLog:D._outputFilterSensitiveLog,smithyContext:D._smithyContext,additionalContext:D._additionalContext})}}}}var FK;var wK=M(()=>{$5();FK=Q(W0(),1)});var ED="***SensitiveInformation***";var u6=(D,F)=>{for(let E of Object.keys(D)){const w=D[E],$=async function(f,B,h){const U=new w(f);if(typeof B==="function")this.send(U,B);else if(typeof h==="function"){if(typeof B!=="object")throw new Error(`Expected http options but got ${typeof B}`);this.send(U,B||{},h)}else return this.send(U,B)},C=(E[0].toLowerCase()+E.slice(1)).replace(/Command$/,"");F.prototype[C]=$}};var oa=(D)=>{if(D===null||D===void 0)return;if(typeof D==="string"){const F=parseFloat(D);if(!Number.isNaN(F)){if(String(F)!==String(D))UK.warn(hK(`Expected number but observed string: ${D}`));return F}}if(typeof D==="number")return D;throw new TypeError(`Expected number, got ${typeof D}: ${D}`)},ta,X5=(D)=>{const F=oa(D);if(F!==void 0&&!Number.isNaN(F)&&F!==1/0&&F!==-1/0){if(Math.abs(F)>ta)throw new TypeError(`Expected 32-bit float, got ${D}`)}return F},$$=(D)=>{if(D===null||D===void 0)return;if(Number.isInteger(D)&&!Number.isNaN(D))return D;throw new TypeError(`Expected integer, got ${typeof D}: ${D}`)},W2=(D)=>W5(D,32),$K=(D)=>W5(D,16),fK=(D)=>W5(D,8),W5=(D,F)=>{const E=$$(D);if(E!==void 0&&ea(E,F)!==E)throw new TypeError(`Expected ${F}-bit integer, got ${D}`);return E},ea=(D,F)=>{switch(F){case 32:return Int32Array.of(D)[0];case 16:return Int16Array.of(D)[0];case 8:return Int8Array.of(D)[0]}},PD=(D,F)=>{if(D===null||D===void 0){if(F)throw new TypeError(`Expected a non-null value for ${F}`);throw new TypeError("Expected a non-null value")}return D},S0=(D)=>{if(D===null||D===void 0)return;if(typeof D==="object"&&!Array.isArray(D))return D;const F=Array.isArray(D)?"array":typeof D;throw new TypeError(`Expected object, got ${F}: ${D}`)},S=(D)=>{if(D===null||D===void 0)return;if(typeof D==="string")return D;if(["boolean","number","bigint"].includes(typeof D))return UK.warn(hK(`Expected string, got ${typeof D}: ${D}`)),String(D);throw new TypeError(`Expected string, got ${typeof D}: ${D}`)},CK=(D)=>{if(typeof D=="string")return X5(f$(D));return X5(D)},Do,f$=(D)=>{const F=D.match(Do);if(F===null||F[0].length!==D.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(D)},J5=(D)=>{if(typeof D=="string")return Fo(D);return X5(D)},Fo=(D)=>{switch(D){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${D}`)}},I3=(D)=>{if(typeof D==="string")return W2(f$(D));return W2(D)},z5=(D)=>{if(typeof D==="string")return $K(f$(D));return $K(D)},BK=(D)=>{if(typeof D==="string")return fK(f$(D));return fK(D)},hK=(D)=>{return String(new TypeError(D).stack||D).split("\n").slice(0,5).filter((F)=>!F.includes("stackTraceWarning")).join("\n")},UK;var T5=M(()=>{ta=Math.ceil(340282346638528860000000000000000000000),Do=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,UK={warn:console.warn}});var Eo,wo,AK=(D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=wo.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U]=F,I=z5(K5(w)),A=$6($,"month",1,12),Y=$6(C,"day",1,31);return IK(I,A,Y,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U})},$o,d6=(D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=$o.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U,I]=F,A=z5(K5(w)),Y=$6($,"month",1,12),G=$6(C,"day",1,31),Z=IK(A,Y,G,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U});if(I.toUpperCase()!="Z")Z.setTime(Z.getTime()-Uo(I));return Z},iMD,pMD,aMD,IK=(D,F,E,w)=>{const $=F-1;return Co(D,$,E),new Date(Date.UTC(D,$,E,$6(w.hours,"hour",0,23),$6(w.minutes,"minute",0,59),$6(w.seconds,"seconds",0,60),ho(w.fractionalMilliseconds)))},fo,Co=(D,F,E)=>{let w=fo[F];if(F===1&&Bo(D))w=29;if(E>w)throw new TypeError(`Invalid day for ${Eo[F]} in ${D}: ${E}`)},Bo=(D)=>{return D%4===0&&(D%100!==0||D%400===0)},$6=(D,F,E,w)=>{const $=BK(K5(D));if($<E||$>w)throw new TypeError(`${F} must be between ${E} and ${w}, inclusive`);return $},ho=(D)=>{if(D===null||D===void 0)return 0;return CK("0."+D)*1000},Uo=(D)=>{const F=D[0];let E=1;if(F=="+")E=1;else if(F=="-")E=-1;else throw new TypeError(`Offset direction, ${F}, must be "+" or "-"`);const w=Number(D.substring(1,3)),$=Number(D.substring(4,6));return E*(w*60+$)*60*1000},K5=(D)=>{let F=0;while(F<D.length-1&&D.charAt(F)==="0")F++;if(F===0)return D;return D.slice(F)};var GK=M(()=>{T5();Eo=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wo=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),$o=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),iMD=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),pMD=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),aMD=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),fo=[31,28,31,30,31,30,31,31,30,31,30,31]});var e0,u=(D,F={})=>{Object.entries(F).filter(([,w])=>w!==void 0).forEach(([w,$])=>{if(D[w]==null||D[w]==="")D[w]=$});const E=D.message||D.Message||"UnknownError";return D.message=E,delete D.Message,D};var S5=M(()=>{e0=class e0 extends Error{constructor(D){super(D.message);Object.setPrototypeOf(this,e0.prototype),this.name=D.name,this.$fault=D.$fault,this.$metadata=D.$metadata}}});var Ao=({output:D,parsedBody:F,exceptionCtor:E,errorCode:w})=>{const $=Io(D),C=$.httpStatusCode?$.httpStatusCode+"":void 0,f=new E({name:F?.code||F?.Code||w||C||"UnknownError",$fault:"client",$metadata:$});throw u(f,F)},t2=(D)=>{return({output:F,parsedBody:E,errorCode:w})=>{Ao({output:F,parsedBody:E,exceptionCtor:D,errorCode:w})}},Io=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]});var MK=M(()=>{S5()});var e2=(D)=>{switch(D){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var YK=!1,D1=(D)=>{if(D&&!YK&&parseInt(D.substring(1,D.indexOf(".")))<16)YK=!0};function C$(D){return encodeURIComponent(D).replace(/[!'()*]/g,function(F){return"%"+F.charCodeAt(0).toString(16).toUpperCase()})}var Q5,ZK=(D)=>{const F=[];for(let E in Q5.AlgorithmId){const w=Q5.AlgorithmId[E];if(D[w]===void 0)continue;F.push({algorithmId:()=>w,checksumConstructor:()=>D[w]})}return{_checksumAlgorithms:F,addChecksumAlgorithm(E){this._checksumAlgorithms.push(E)},checksumAlgorithms(){return this._checksumAlgorithms}}},XK=(D)=>{const F={};return D.checksumAlgorithms().forEach((E)=>{F[E.algorithmId()]=E.checksumConstructor()}),F};var WK=M(()=>{Q5=Q(W0(),1)});var JK=(D)=>{let F=D.retryStrategy;return{setRetryStrategy(E){F=E},retryStrategy(){return F}}},zK=(D)=>{const F={};return F.retryStrategy=D.retryStrategy(),F};var F1=(D)=>{return{...ZK(D),...JK(D)}},E1=(D)=>{return{...XK(D),...zK(D)}};var TK=M(()=>{WK()});var KK=M(()=>{TK()});var X8=(D)=>{return D!=null};var H5=function(){const D=Object.getPrototypeOf(this).constructor,E=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(E,D.prototype),E};var SK=M(()=>{H5.prototype=Object.create(String.prototype,{constructor:{value:H5,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(H5,String)});class P0{trace(){}debug(){}info(){}warn(){}error(){}}function k(D,F,E){let w,$,C;if(typeof F==="undefined"&&typeof E==="undefined")w={},C=D;else if(w=D,typeof F==="function")return $=F,C=E,Go(w,$,C);else C=F;for(let f of Object.keys(C)){if(!Array.isArray(C[f])){w[f]=C[f];continue}QK(w,null,C,f)}return w}var c=(D,F)=>{const E={};for(let w in F)QK(E,D,F,w);return E},Go=(D,F,E)=>{return k(D,Object.entries(E).reduce((w,[$,C])=>{if(Array.isArray(C))w[$]=C;else if(typeof C==="function")w[$]=[F,C()];else w[$]=[F,C];return w},{}))},QK=(D,F,E,w)=>{if(F!==null){let f=E[w];if(typeof f==="function")f=[,f];const[B=Mo,h=Yo,U=w]=f;if(typeof B==="function"&&B(F[U])||typeof B!=="function"&&!!B)D[w]=h(F[U]);return}let[$,C]=E[w];if(typeof C==="function"){let f;const B=$===void 0&&(f=C())!=null,h=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(B)D[w]=f;else if(h)D[w]=C()}else{const f=$===void 0&&C!=null,B=typeof $==="function"&&!!$(C)||typeof $!=="function"&&!!$;if(f||B)D[w]=C}},Mo=(D)=>D!=null,Yo=(D)=>D;var HK=()=>{};var CD=(D)=>{if(D==null)return{};if(Array.isArray(D))return D.filter((F)=>F!=null).map(CD);if(typeof D==="object"){const F={};for(let E of Object.keys(D)){if(D[E]==null)continue;F[E]=CD(D[E])}return F}return D};var y=M(()=>{GT();DK();wK();GK();MK();S5();KK();SK();T5();HK()});import{Readable as Zo}from"stream";var LK=(D)=>D?.body instanceof Zo||typeof ReadableStream!=="undefined"&&D?.body instanceof ReadableStream;var RK=()=>{};var Xo=(D)=>(F,E)=>async(w)=>{let $=await D.retryStrategy();const C=await D.maxAttempts();if(Wo($)){$=$;let f=await $.acquireInitialRetryToken(E.partition_id),B=new Error,h=0,U=0;const{request:I}=w,A=gD.isInstance(I);if(A)I.headers[ow]=D$();while(!0)try{if(A)I.headers[tw]=`attempt=${h+1}; max=${C}`;const{response:Y,output:G}=await F(w);return $.recordSuccess(f),G.$metadata.attempts=h+1,G.$metadata.totalRetryDelay=U,{response:Y,output:G}}catch(Y){const G=Jo(Y);if(B=E5(Y),A&&LK(I))throw(E.logger instanceof P0?console:E.logger)?.warn("An error was encountered in a non-retryable streaming request."),B;try{f=await $.refreshRetryTokenForRetry(f,G)}catch(z){if(!B.$metadata)B.$metadata={};throw B.$metadata.attempts=h+1,B.$metadata.totalRetryDelay=U,B}h=f.getRetryCount();const Z=f.getRetryDelay();U+=Z,await new Promise((z)=>setTimeout(z,Z))}}else{if($=$,$?.mode)E.userAgent=[...E.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(F,w)}},Wo=(D)=>typeof D.acquireInitialRetryToken!=="undefined"&&typeof D.refreshRetryTokenForRetry!=="undefined"&&typeof D.recordSuccess!=="undefined",Jo=(D)=>{const F={error:D,errorType:zo(D)},E=Ko(D.$response);if(E)F.retryAfterHint=E;return F},zo=(D)=>{if(g6(D))return"THROTTLING";if(iw(D))return"TRANSIENT";if(az(D))return"SERVER_ERROR";return"CLIENT_ERROR"},To,w1=(D)=>({applyToStack:(F)=>{F.add(Xo(D),To)}}),Ko=(D)=>{if(!E8.isInstance(D))return;const F=Object.keys(D.headers).find((C)=>C.toLowerCase()==="retry-after");if(!F)return;const E=D.headers[F],w=Number(E);if(!Number.isNaN(w))return new Date(w*1000);return new Date(E)};var VK=M(()=>{dD();B3();y();O0();e9();RK();To={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var J2=M(()=>{$T();w5();BT();D5();hT();F5();VK()});var kK,h$="AWS_ACCESS_KEY_ID",U$="AWS_SECRET_ACCESS_KEY",bK="AWS_SESSION_TOKEN",xK="AWS_CREDENTIAL_EXPIRATION",cK="AWS_CREDENTIAL_SCOPE",gK="AWS_ACCOUNT_ID",L5=(D)=>async()=>{D?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const F=process.env[h$],E=process.env[U$],w=process.env[bK],$=process.env[xK],C=process.env[cK],f=process.env[gK];if(F&&E){const B={accessKeyId:F,secretAccessKey:E,...w&&{sessionToken:w},...$&&{expiration:new Date($)},...C&&{credentialScope:C},...f&&{accountId:f}};return kK.setCredentialFeature(B,"CREDENTIALS_ENV_VARS","g"),B}throw new x("Unable to find environment variable credentials.",{logger:D?.logger})};var rK=M(()=>{kK=Q(C0(),1);$D()});var _K={};r0(_K,{fromEnv:()=>L5,ENV_SESSION:()=>bK,ENV_SECRET:()=>U$,ENV_KEY:()=>h$,ENV_EXPIRATION:()=>xK,ENV_CREDENTIAL_SCOPE:()=>cK,ENV_ACCOUNT_ID:()=>gK});var R5=M(()=>{rK()});import{Buffer as Ho}from"buffer";import{request as Lo}from"http";function W8(D){return new Promise((F,E)=>{const w=Lo({method:"GET",...D,hostname:D.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",($)=>{E(Object.assign(new l0("Unable to connect to instance metadata service"),$)),w.destroy()}),w.on("timeout",()=>{E(new l0("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",($)=>{const{statusCode:C=400}=$;if(C<200||300<=C)E(Object.assign(new l0("Error response received from instance metadata service"),{statusCode:C})),w.destroy();const f=[];$.on("data",(B)=>{f.push(B)}),$.on("end",()=>{F(Ho.concat(f)),w.destroy()})}),w.end()})}var A$=M(()=>{$D()});var I$=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.AccessKeyId==="string"&&typeof D.SecretAccessKey==="string"&&typeof D.Token==="string"&&typeof D.Expiration==="string",G$=(D)=>({accessKeyId:D.AccessKeyId,secretAccessKey:D.SecretAccessKey,sessionToken:D.Token,expiration:new Date(D.Expiration),...D.AccountId&&{accountId:D.AccountId}});var Ro=1000,Vo=0,G3=({maxRetries:D=0,timeout:F=1000})=>({maxRetries:D,timeout:F});var M3=(D,F)=>{let E=D();for(let w=0;w<F;w++)E=E.catch(D);return E};import{parse as No}from"url";var M$="AWS_CONTAINER_CREDENTIALS_FULL_URI",Y$="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",V5="AWS_CONTAINER_AUTHORIZATION_TOKEN",qo=(D={})=>{const{timeout:F,maxRetries:E}=G3(D);return()=>M3(async()=>{const w=await ko({logger:D.logger}),$=JSON.parse(await Oo(F,w));if(!I$($))throw new x("Invalid response received from instance metadata service.",{logger:D.logger});return G$($)},E)},Oo=async(D,F)=>{if(process.env[V5])F.headers={...F.headers,Authorization:process.env[V5]};return(await W8({...F,timeout:D})).toString()},jo="169.254.170.2",Po,yo,ko=async({logger:D})=>{if(process.env[Y$])return{hostname:jo,path:process.env[Y$]};if(process.env[M$]){const F=No(process.env[M$]);if(!F.hostname||!(F.hostname in Po))throw new x(`${F.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:D});if(!F.protocol||!(F.protocol in yo))throw new x(`${F.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:D});return{...F,port:F.port?parseInt(F.port,10):void 0}}throw new x(`The container metadata credential provider cannot be used unless the ${Y$} or ${M$} environment variable is set`,{tryNextLink:!1,logger:D})};var sK=M(()=>{$D();A$();Po={localhost:!0,"127.0.0.1":!0},yo={"http:":!0,"https:":!0}});var Z$;var uK=M(()=>{$D();Z$=class Z$ extends x{constructor(D,F=!0){super(D,F);this.tryNextLink=F,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Z$.prototype)}}});var f6;var N5=M(()=>{(function(D){D.IPv4="http://169.254.169.254",D.IPv6="http://[fd00:ec2::254]"})(f6||(f6={}))});var dK;var vK=M(()=>{dK={environmentVariableSelector:(D)=>D.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(D)=>D.ec2_metadata_service_endpoint,default:void 0}});var J8;var q5=M(()=>{(function(D){D.IPv4="IPv4",D.IPv6="IPv6"})(J8||(J8={}))});var bo="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",xo="ec2_metadata_service_endpoint_mode",mK;var nK=M(()=>{q5();mK={environmentVariableSelector:(D)=>D[bo],configFileSelector:(D)=>D[xo],default:J8.IPv4}});var X$=async()=>eD(await co()||await go()),co=async()=>i(dK)(),go=async()=>{const D=await i(mK)();switch(D){case J8.IPv4:return f6.IPv4;case J8.IPv6:return f6.IPv6;default:throw new Error(`Unsupported endpoint mode: ${D}. Select from ${Object.values(J8)}`)}};var O5=M(()=>{v2();M8();N5();vK();q5();nK()});var j5=(D,F)=>{const E=300+Math.floor(Math.random()*300),w=new Date(Date.now()+E*1000);F.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(w)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const $=D.originalExpiration??D.expiration;return{...D,...$?{originalExpiration:$}:{},expiration:w}};var lK=(D,F={})=>{const E=F?.logger||console;let w;return async()=>{let $;try{if($=await D(),$.expiration&&$.expiration.getTime()<Date.now())$=j5($,E)}catch(C){if(w)E.warn("Credential renew failed: ",C),$=j5(w,E);else throw C}return w=$,$}};var iK=()=>{};var oK="/latest/meta-data/iam/security-credentials/",ro="/latest/api/token",P5="AWS_EC2_METADATA_V1_DISABLED",pK="ec2_metadata_v1_disabled",aK="x-aws-ec2-metadata-token",_o=(D={})=>lK(so(D),{logger:D.logger}),so=(D={})=>{let F=!1;const{logger:E,profile:w}=D,{timeout:$,maxRetries:C}=G3(D),f=async(B,h)=>{if(F||h.headers?.[aK]==null){let A=!1,Y=!1;const G=await i({environmentVariableSelector:(Z)=>{const z=Z[P5];if(Y=!!z&&z!=="false",z===void 0)throw new x(`${P5} not set in env, checking config file next.`,{logger:D.logger});return Y},configFileSelector:(Z)=>{const z=Z[pK];return A=!!z&&z!=="false",A},default:!1},{profile:w})();if(D.ec2MetadataV1Disabled||G){const Z=[];if(D.ec2MetadataV1Disabled)Z.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(A)Z.push(`config file profile (${pK})`);if(Y)Z.push(`process environment variable (${P5})`);throw new Z$(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Z.join(", ")}].`)}}const I=(await M3(async()=>{let A;try{A=await vo(h)}catch(Y){if(Y.statusCode===401)F=!1;throw Y}return A},B)).trim();return M3(async()=>{let A;try{A=await mo(I,h,D)}catch(Y){if(Y.statusCode===401)F=!1;throw Y}return A},B)};return async()=>{const B=await X$();if(F)return E?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),f(C,{...B,timeout:$});else{let h;try{h=(await uo({...B,timeout:$})).toString()}catch(U){if(U?.statusCode===400)throw Object.assign(U,{message:"EC2 Metadata token request returned error"});else if(U.message==="TimeoutError"||[403,404,405].includes(U.statusCode))F=!0;return E?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),f(C,{...B,timeout:$})}return f(C,{...B,headers:{[aK]:h},timeout:$})}}},uo=async(D)=>W8({...D,path:ro,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),vo=async(D)=>(await W8({...D,path:oK})).toString(),mo=async(D,F,E)=>{const w=JSON.parse((await W8({...F,path:oK+D})).toString());if(!I$(w))throw new x("Invalid response received from instance metadata service.",{logger:E.logger});return G$(w)};var tK=M(()=>{v2();$D();uK();A$();O5();iK()});var eK=()=>{};var Y3={};r0(Y3,{providerConfigFromInit:()=>G3,httpRequest:()=>W8,getInstanceMetadataEndpoint:()=>X$,fromInstanceMetadata:()=>_o,fromContainerMetadata:()=>qo,Endpoint:()=>f6,ENV_CMDS_RELATIVE_URI:()=>Y$,ENV_CMDS_FULL_URI:()=>M$,ENV_CMDS_AUTH_TOKEN:()=>V5,DEFAULT_TIMEOUT:()=>Ro,DEFAULT_MAX_RETRIES:()=>Vo});var Z3=M(()=>{sK();tK();eK();A$();O5();N5()});var no="169.254.170.2",lo="169.254.170.23",io="[fd00:ec2::23]",DS=(D,F)=>{if(D.protocol==="https:")return;if(D.hostname===no||D.hostname===lo||D.hostname===io)return;if(D.hostname.includes("[")){if(D.hostname==="[::1]"||D.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(D.hostname==="localhost")return;const E=D.hostname.split("."),w=($)=>{const C=parseInt($,10);return 0<=C&&C<=255};if(E[0]==="127"&&w(E[1])&&w(E[2])&&w(E[3])&&E.length===4)return}throw new x(`URL not accepted. It must either be HTTPS or match one of the following:
21
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return F}constructor(D){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((F,E)=>{if(typeof D==="function")D().then((w)=>{F(this.resolveDefaultConfig(w))}).catch(E);else F(this.resolveDefaultConfig(D))})}resolveDefaultConfig(D){const{requestTimeout:F,connectionTimeout:E,socketTimeout:w,httpAgent:$,httpsAgent:C}=D||{};return{connectionTimeout:E,requestTimeout:F??w,httpAgent:(()=>{if($ instanceof kT||typeof $?.destroy==="function")return $;return new kT({keepAlive:!0,maxSockets:50,...$})})(),httpsAgent:(()=>{if(C instanceof bT||typeof C?.destroy==="function")return C;return new bT({keepAlive:!0,maxSockets:50,...C})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(D,{abortSignal:F}={}){if(!this.config)this.config=await this.configProvider;return new Promise((E,w)=>{let $=void 0;const C=[],f=async(K)=>{await $,C.forEach(clearTimeout),E(K)},B=async(K)=>{await $,C.forEach(clearTimeout),w(K)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(F?.aborted){const K=new Error("Request aborted");K.name="AbortError",B(K);return}const h=D.protocol==="https:",U=h?this.config.httpsAgent:this.config.httpAgent;C.push(setTimeout(()=>{this.socketWarningTimestamp=U0.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const I=$$(D.query||{});let A=void 0;if(D.username!=null||D.password!=null){const K=D.username??"",H=D.password??"";A=`${K}:${H}`}let Y=D.path;if(I)Y+=`?${I}`;if(D.fragment)Y+=`#${D.fragment}`;let M=D.hostname??"";if(M[0]==="["&&M.endsWith("]"))M=D.hostname.slice(1,-1);else M=D.hostname;const Z={headers:D.headers,host:M,method:D.method,path:Y,port:D.port,agent:U,auth:A},X=(h?Ra:La)(Z,(K)=>{const H=new E8({statusCode:K.statusCode||-1,reason:K.statusMessage,headers:A5(K.headers),body:K});f({response:H})});if(X.on("error",(K)=>{if(NT.includes(K.code))B(Object.assign(K,{name:"TimeoutError"}));else B(K)}),F){const K=()=>{X.destroy();const H=new Error("Request aborted");H.name="AbortError",B(H)};if(typeof F.addEventListener==="function"){const H=F;H.addEventListener("abort",K,{once:!0}),X.once("close",()=>H.removeEventListener("abort",K))}else F.onabort=K}C.push(OT(X,B,this.config.connectionTimeout)),C.push(PT(X,B,this.config.requestTimeout));const J=Z.agent;if(typeof J==="object"&&"keepAlive"in J)C.push(jT(X,{keepAlive:J.keepAlive,keepAliveMsecs:J.keepAliveMsecs}));$=M5(X,D,this.config.requestTimeout).catch((K)=>{return C.forEach(clearTimeout),w(K)})})}updateHttpClientConfig(D,F){this.config=void 0,this.configProvider=this.configProvider.then((E)=>{return{...E,[D]:F}})}httpHandlerConfigs(){return this.config??{}}}var xT=G(()=>{vD();f$();qT();I5();G5()});var cT=()=>{};var gT=G(()=>{cT()});var rT=G(()=>{vD();f$();I5();gT();G5()});import{Writable as Va}from"stream";var Y5;var _T=G(()=>{Y5=class Y5 extends Va{constructor(){super(...arguments);this.bufferedBytes=[]}_write(D,F,E){this.bufferedBytes.push(D),E()}}});async function qa(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}var e0=(D)=>{if(Na(D))return qa(D);return new Promise((F,E)=>{const w=new Y5;D.pipe(w),D.on("error",($)=>{w.end(),E($)}),w.on("error",E),w.on("finish",function(){const $=new Uint8Array(Buffer.concat(this.bufferedBytes));F($)})})},Na=(D)=>typeof ReadableStream==="function"&&D instanceof ReadableStream;var sT=G(()=>{_T()});var Z8=G(()=>{xT();rT();sT()});var uT=G(()=>{vD();f$()});async function Oa(D){const F=await Pa(D),E=T0(F);return new Uint8Array(E)}async function ja(D){const F=[],E=D.getReader();let w=!1,$=0;while(!w){const{done:B,value:h}=await E.read();if(h)F.push(h),$+=h.length;w=B}const C=new Uint8Array($);let f=0;for(let B of F)C.set(B,f),f+=B.length;return C}function Pa(D){return new Promise((F,E)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return E(new Error("Reader aborted too early"));const $=w.result??"",C=$.indexOf(","),f=C>-1?C+1:$.length;F($.substring(f))},w.onabort=()=>E(new Error("Read aborted")),w.onerror=()=>E(w.error),w.readAsDataURL(D)})}var dT=(D)=>{if(typeof Blob==="function"&&D instanceof Blob)return Oa(D);return ja(D)};var vT=G(()=>{O1()});var mT=G(()=>{uT();vT()});var M3=(D)=>typeof ReadableStream==="function"&&(D?.constructor?.name===ReadableStream.name||D instanceof ReadableStream);var iT,nT="The stream has already been transformed.",pT=(D)=>{if(!lT(D)&&!M3(D)){const $=D?.__proto__?.constructor?.name||D;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${$}`)}let F=!1;const E=async()=>{if(F)throw new Error(nT);return F=!0,await dT(D)},w=($)=>{if(typeof $.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return $.stream()};return Object.assign(D,{transformToByteArray:E,transformToString:async($)=>{const C=await E();if($==="base64")return S0(C);else if($==="hex")return iT.toHex(C);else if($===void 0||$==="utf8"||$==="utf-8")return K0(C);else if(typeof TextDecoder==="function")return new TextDecoder($).decode(C);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(F)throw new Error(nT);if(F=!0,lT(D))return w(D);else if(M3(D))return D;else throw new Error(`Cannot transform payload to web stream, got ${D}`)}})},lT=(D)=>typeof Blob==="function"&&D instanceof Blob;var aT=G(()=>{mT();O1();iT=L(L6(),1);o2()});import{Readable as Z5}from"stream";import{TextDecoder as ya}from"util";var oT="The stream has already been transformed.",tT=(D)=>{if(!(D instanceof Z5))try{return pT(D)}catch(w){const $=D?.__proto__?.constructor?.name||D;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${$}`)}let F=!1;const E=async()=>{if(F)throw new Error(oT);return F=!0,await e0(D)};return Object.assign(D,{transformToByteArray:E,transformToString:async(w)=>{const $=await E();if(w===void 0||Buffer.isEncoding(w))return q1($.buffer,$.byteOffset,$.byteLength).toString(w);else return new ya(w).decode($)},transformToWebStream:()=>{if(F)throw new Error(oT);if(D.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof Z5.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return F=!0,Z5.toWeb(D)}})};var eT=G(()=>{Z8();w6();aT()});var DK=()=>{};var FK=()=>{};var W5=G(()=>{U5();LT();eT();DK();FK()});var $6=async(D=new Uint8Array,F)=>{if(D instanceof Uint8Array)return j1.mutate(D);if(!D)return j1.mutate(new Uint8Array);const E=F.streamCollector(D);return j1.mutate(await E)};var EK=G(()=>{W5()});class l{constructor(){this.middlewareStack=s6()}static classBuilder(){return new $K}resolveMiddlewareWithContext(D,F,E,{middlewareFn:w,clientName:$,commandName:C,inputFilterSensitiveLog:f,outputFilterSensitiveLog:B,smithyContext:h,additionalContext:U,CommandCtor:I}){for(let z of w.bind(this)(I,D,F,E))this.middlewareStack.use(z);const A=D.concat(this.middlewareStack),{logger:Y}=F,M={logger:Y,clientName:$,commandName:C,inputFilterSensitiveLog:f,outputFilterSensitiveLog:B,[wK.SMITHY_CONTEXT_KEY]:{commandInstance:this,...h},...U},{requestHandler:Z}=F;return A.resolve((z)=>Z.handle(z.request,E||{}),M)}}class $K{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(D)=>D,this._outputFilterSensitiveLog=(D)=>D,this._serializer=null,this._deserializer=null}init(D){this._init=D}ep(D){return this._ep=D,this}m(D){return this._middlewareFn=D,this}s(D,F,E={}){return this._smithyContext={service:D,operation:F,...E},this}c(D={}){return this._additionalContext=D,this}n(D,F){return this._clientName=D,this._commandName=F,this}f(D=(E)=>E,F=(E)=>E){return this._inputFilterSensitiveLog=D,this._outputFilterSensitiveLog=F,this}ser(D){return this._serializer=D,this}de(D){return this._deserializer=D,this}build(){const D=this;let F;return F=class extends l{static getEndpointParameterInstructions(){return D._ep}constructor(...[E]){super();this.serialize=D._serializer,this.deserialize=D._deserializer,this.input=E??{},D._init(this)}resolveMiddleware(E,w,$){return this.resolveMiddlewareWithContext(E,w,$,{CommandCtor:F,middlewareFn:D._middlewareFn,clientName:D._clientName,commandName:D._commandName,inputFilterSensitiveLog:D._inputFilterSensitiveLog,outputFilterSensitiveLog:D._outputFilterSensitiveLog,smithyContext:D._smithyContext,additionalContext:D._additionalContext})}}}}var wK;var fK=G(()=>{C5();wK=L(J0(),1)});var wD="***SensitiveInformation***";var d6=(D,F)=>{for(let E of Object.keys(D)){const w=D[E],$=async function(f,B,h){const U=new w(f);if(typeof B==="function")this.send(U,B);else if(typeof h==="function"){if(typeof B!=="object")throw new Error(`Expected http options but got ${typeof B}`);this.send(U,B||{},h)}else return this.send(U,B)},C=(E[0].toLowerCase()+E.slice(1)).replace(/Command$/,"");F.prototype[C]=$}};var ka=(D)=>{if(D===null||D===void 0)return;if(typeof D==="string"){const F=parseFloat(D);if(!Number.isNaN(F)){if(String(F)!==String(D))IK.warn(AK(`Expected number but observed string: ${D}`));return F}}if(typeof D==="number")return D;throw new TypeError(`Expected number, got ${typeof D}: ${D}`)},ba,X5=(D)=>{const F=ka(D);if(F!==void 0&&!Number.isNaN(F)&&F!==1/0&&F!==-1/0){if(Math.abs(F)>ba)throw new TypeError(`Expected 32-bit float, got ${D}`)}return F},C$=(D)=>{if(D===null||D===void 0)return;if(Number.isInteger(D)&&!Number.isNaN(D))return D;throw new TypeError(`Expected integer, got ${typeof D}: ${D}`)},J2=(D)=>J5(D,32),CK=(D)=>J5(D,16),BK=(D)=>J5(D,8),J5=(D,F)=>{const E=C$(D);if(E!==void 0&&xa(E,F)!==E)throw new TypeError(`Expected ${F}-bit integer, got ${D}`);return E},xa=(D,F)=>{switch(F){case 32:return Int32Array.of(D)[0];case 16:return Int16Array.of(D)[0];case 8:return Int8Array.of(D)[0]}},yD=(D,F)=>{if(D===null||D===void 0){if(F)throw new TypeError(`Expected a non-null value for ${F}`);throw new TypeError("Expected a non-null value")}return D},Q0=(D)=>{if(D===null||D===void 0)return;if(typeof D==="object"&&!Array.isArray(D))return D;const F=Array.isArray(D)?"array":typeof D;throw new TypeError(`Expected object, got ${F}: ${D}`)},S=(D)=>{if(D===null||D===void 0)return;if(typeof D==="string")return D;if(["boolean","number","bigint"].includes(typeof D))return IK.warn(AK(`Expected string, got ${typeof D}: ${D}`)),String(D);throw new TypeError(`Expected string, got ${typeof D}: ${D}`)},hK=(D)=>{if(typeof D=="string")return X5(B$(D));return X5(D)},ca,B$=(D)=>{const F=D.match(ca);if(F===null||F[0].length!==D.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(D)},z5=(D)=>{if(typeof D=="string")return ga(D);return X5(D)},ga=(D)=>{switch(D){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${D}`)}},G3=(D)=>{if(typeof D==="string")return J2(B$(D));return J2(D)},T5=(D)=>{if(typeof D==="string")return CK(B$(D));return CK(D)},UK=(D)=>{if(typeof D==="string")return BK(B$(D));return BK(D)},AK=(D)=>{return String(new TypeError(D).stack||D).split("\n").slice(0,5).filter((F)=>!F.includes("stackTraceWarning")).join("\n")},IK;var K5=G(()=>{ba=Math.ceil(340282346638528860000000000000000000000),ca=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,IK={warn:console.warn}});var ra,_a,MK=(D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=_a.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U]=F,I=T5(S5(w)),A=f6($,"month",1,12),Y=f6(C,"day",1,31);return GK(I,A,Y,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U})},sa,v6=(D)=>{if(D===null||D===void 0)return;if(typeof D!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const F=sa.exec(D);if(!F)throw new TypeError("Invalid RFC-3339 date-time value");const[E,w,$,C,f,B,h,U,I]=F,A=T5(S5(w)),Y=f6($,"month",1,12),M=f6(C,"day",1,31),Z=GK(A,Y,M,{hours:f,minutes:B,seconds:h,fractionalMilliseconds:U});if(I.toUpperCase()!="Z")Z.setTime(Z.getTime()-na(I));return Z},rGD,_GD,sGD,GK=(D,F,E,w)=>{const $=F-1;return da(D,$,E),new Date(Date.UTC(D,$,E,f6(w.hours,"hour",0,23),f6(w.minutes,"minute",0,59),f6(w.seconds,"seconds",0,60),ma(w.fractionalMilliseconds)))},ua,da=(D,F,E)=>{let w=ua[F];if(F===1&&va(D))w=29;if(E>w)throw new TypeError(`Invalid day for ${ra[F]} in ${D}: ${E}`)},va=(D)=>{return D%4===0&&(D%100!==0||D%400===0)},f6=(D,F,E,w)=>{const $=UK(S5(D));if($<E||$>w)throw new TypeError(`${F} must be between ${E} and ${w}, inclusive`);return $},ma=(D)=>{if(D===null||D===void 0)return 0;return hK("0."+D)*1000},na=(D)=>{const F=D[0];let E=1;if(F=="+")E=1;else if(F=="-")E=-1;else throw new TypeError(`Offset direction, ${F}, must be "+" or "-"`);const w=Number(D.substring(1,3)),$=Number(D.substring(4,6));return E*(w*60+$)*60*1000},S5=(D)=>{let F=0;while(F<D.length-1&&D.charAt(F)==="0")F++;if(F===0)return D;return D.slice(F)};var YK=G(()=>{K5();ra=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_a=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),sa=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),rGD=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),_GD=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),sGD=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),ua=[31,28,31,30,31,30,31,31,30,31,30,31]});var D2,u=(D,F={})=>{Object.entries(F).filter(([,w])=>w!==void 0).forEach(([w,$])=>{if(D[w]==null||D[w]==="")D[w]=$});const E=D.message||D.Message||"UnknownError";return D.message=E,delete D.Message,D};var Q5=G(()=>{D2=class D2 extends Error{constructor(D){super(D.message);Object.setPrototypeOf(this,D2.prototype),this.name=D.name,this.$fault=D.$fault,this.$metadata=D.$metadata}}});var la=({output:D,parsedBody:F,exceptionCtor:E,errorCode:w})=>{const $=ia(D),C=$.httpStatusCode?$.httpStatusCode+"":void 0,f=new E({name:F?.code||F?.Code||w||C||"UnknownError",$fault:"client",$metadata:$});throw u(f,F)},t2=(D)=>{return({output:F,parsedBody:E,errorCode:w})=>{la({output:F,parsedBody:E,exceptionCtor:D,errorCode:w})}},ia=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]});var ZK=G(()=>{Q5()});var e2=(D)=>{switch(D){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var WK=!1,D1=(D)=>{if(D&&!WK&&parseInt(D.substring(1,D.indexOf(".")))<16)WK=!0};function h$(D){return encodeURIComponent(D).replace(/[!'()*]/g,function(F){return"%"+F.charCodeAt(0).toString(16).toUpperCase()})}var H5,XK=(D)=>{const F=[];for(let E in H5.AlgorithmId){const w=H5.AlgorithmId[E];if(D[w]===void 0)continue;F.push({algorithmId:()=>w,checksumConstructor:()=>D[w]})}return{_checksumAlgorithms:F,addChecksumAlgorithm(E){this._checksumAlgorithms.push(E)},checksumAlgorithms(){return this._checksumAlgorithms}}},JK=(D)=>{const F={};return D.checksumAlgorithms().forEach((E)=>{F[E.algorithmId()]=E.checksumConstructor()}),F};var zK=G(()=>{H5=L(J0(),1)});var TK=(D)=>{let F=D.retryStrategy;return{setRetryStrategy(E){F=E},retryStrategy(){return F}}},KK=(D)=>{const F={};return F.retryStrategy=D.retryStrategy(),F};var F1=(D)=>{return{...XK(D),...TK(D)}},E1=(D)=>{return{...JK(D),...KK(D)}};var SK=G(()=>{zK()});var QK=G(()=>{SK()});var W8=(D)=>{return D!=null};var L5=function(){const D=Object.getPrototypeOf(this).constructor,E=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(E,D.prototype),E};var HK=G(()=>{L5.prototype=Object.create(String.prototype,{constructor:{value:L5,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(L5,String)});class y0{trace(){}debug(){}info(){}warn(){}error(){}}function k(D,F,E){let w,$,C;if(typeof F==="undefined"&&typeof E==="undefined")w={},C=D;else if(w=D,typeof F==="function")return $=F,C=E,pa(w,$,C);else C=F;for(let f of Object.keys(C)){if(!Array.isArray(C[f])){w[f]=C[f];continue}LK(w,null,C,f)}return w}var c=(D,F)=>{const E={};for(let w in F)LK(E,D,F,w);return E},pa=(D,F,E)=>{return k(D,Object.entries(E).reduce((w,[$,C])=>{if(Array.isArray(C))w[$]=C;else if(typeof C==="function")w[$]=[F,C()];else w[$]=[F,C];return w},{}))},LK=(D,F,E,w)=>{if(F!==null){let f=E[w];if(typeof f==="function")f=[,f];const[B=aa,h=oa,U=w]=f;if(typeof B==="function"&&B(F[U])||typeof B!=="function"&&!!B)D[w]=h(F[U]);return}let[$,C]=E[w];if(typeof C==="function"){let f;const B=$===void 0&&(f=C())!=null,h=typeof $==="function"&&!!$(void 0)||typeof $!=="function"&&!!$;if(B)D[w]=f;else if(h)D[w]=C()}else{const f=$===void 0&&C!=null,B=typeof $==="function"&&!!$(C)||typeof $!=="function"&&!!$;if(f||B)D[w]=C}},aa=(D)=>D!=null,oa=(D)=>D;var RK=()=>{};var BD=(D)=>{if(D==null)return{};if(Array.isArray(D))return D.filter((F)=>F!=null).map(BD);if(typeof D==="object"){const F={};for(let E of Object.keys(D)){if(D[E]==null)continue;F[E]=BD(D[E])}return F}return D};var y=G(()=>{ZT();EK();fK();YK();ZK();Q5();QK();HK();K5();RK()});import{Readable as ta}from"stream";var VK=(D)=>D?.body instanceof ta||typeof ReadableStream!=="undefined"&&D?.body instanceof ReadableStream;var NK=()=>{};var ea=(D)=>(F,E)=>async(w)=>{let $=await D.retryStrategy();const C=await D.maxAttempts();if(Do($)){$=$;let f=await $.acquireInitialRetryToken(E.partition_id),B=new Error,h=0,U=0;const{request:I}=w,A=rD.isInstance(I);if(A)I.headers[D$]=w$();while(!0)try{if(A)I.headers[F$]=`attempt=${h+1}; max=${C}`;const{response:Y,output:M}=await F(w);return $.recordSuccess(f),M.$metadata.attempts=h+1,M.$metadata.totalRetryDelay=U,{response:Y,output:M}}catch(Y){const M=Fo(Y);if(B=$5(Y),A&&VK(I))throw(E.logger instanceof y0?console:E.logger)?.warn("An error was encountered in a non-retryable streaming request."),B;try{f=await $.refreshRetryTokenForRetry(f,M)}catch(z){if(!B.$metadata)B.$metadata={};throw B.$metadata.attempts=h+1,B.$metadata.totalRetryDelay=U,B}h=f.getRetryCount();const Z=f.getRetryDelay();U+=Z,await new Promise((z)=>setTimeout(z,Z))}}else{if($=$,$?.mode)E.userAgent=[...E.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(F,w)}},Do=(D)=>typeof D.acquireInitialRetryToken!=="undefined"&&typeof D.refreshRetryTokenForRetry!=="undefined"&&typeof D.recordSuccess!=="undefined",Fo=(D)=>{const F={error:D,errorType:Eo(D)},E=$o(D.$response);if(E)F.retryAfterHint=E;return F},Eo=(D)=>{if(r6(D))return"THROTTLING";if(ow(D))return"TRANSIENT";if(ez(D))return"SERVER_ERROR";return"CLIENT_ERROR"},wo,w1=(D)=>({applyToStack:(F)=>{F.add(ea(D),wo)}}),$o=(D)=>{if(!E8.isInstance(D))return;const F=Object.keys(D.headers).find((C)=>C.toLowerCase()==="retry-after");if(!F)return;const E=D.headers[F],w=Number(E);if(!Number.isNaN(w))return new Date(w*1000);return new Date(E)};var qK=G(()=>{vD();U3();y();j0();F5();NK();wo={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var z2=G(()=>{BT();f5();AT();E5();IT();w5();qK()});var xK,A$="AWS_ACCESS_KEY_ID",I$="AWS_SECRET_ACCESS_KEY",cK="AWS_SESSION_TOKEN",gK="AWS_CREDENTIAL_EXPIRATION",rK="AWS_CREDENTIAL_SCOPE",_K="AWS_ACCOUNT_ID",R5=(D)=>async()=>{D?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const F=process.env[A$],E=process.env[I$],w=process.env[cK],$=process.env[gK],C=process.env[rK],f=process.env[_K];if(F&&E){const B={accessKeyId:F,secretAccessKey:E,...w&&{sessionToken:w},...$&&{expiration:new Date($)},...C&&{credentialScope:C},...f&&{accountId:f}};return xK.setCredentialFeature(B,"CREDENTIALS_ENV_VARS","g"),B}throw new x("Unable to find environment variable credentials.",{logger:D?.logger})};var sK=G(()=>{xK=L(B0(),1);fD()});var uK={};_0(uK,{fromEnv:()=>R5,ENV_SESSION:()=>cK,ENV_SECRET:()=>I$,ENV_KEY:()=>A$,ENV_EXPIRATION:()=>gK,ENV_CREDENTIAL_SCOPE:()=>rK,ENV_ACCOUNT_ID:()=>_K});var V5=G(()=>{sK()});import{Buffer as Bo}from"buffer";import{request as ho}from"http";function X8(D){return new Promise((F,E)=>{const w=ho({method:"GET",...D,hostname:D.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",($)=>{E(Object.assign(new i0("Unable to connect to instance metadata service"),$)),w.destroy()}),w.on("timeout",()=>{E(new i0("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",($)=>{const{statusCode:C=400}=$;if(C<200||300<=C)E(Object.assign(new i0("Error response received from instance metadata service"),{statusCode:C})),w.destroy();const f=[];$.on("data",(B)=>{f.push(B)}),$.on("end",()=>{F(Bo.concat(f)),w.destroy()})}),w.end()})}var M$=G(()=>{fD()});var G$=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.AccessKeyId==="string"&&typeof D.SecretAccessKey==="string"&&typeof D.Token==="string"&&typeof D.Expiration==="string",Y$=(D)=>({accessKeyId:D.AccessKeyId,secretAccessKey:D.SecretAccessKey,sessionToken:D.Token,expiration:new Date(D.Expiration),...D.AccountId&&{accountId:D.AccountId}});var Uo=1000,Ao=0,Y3=({maxRetries:D=0,timeout:F=1000})=>({maxRetries:D,timeout:F});var Z3=(D,F)=>{let E=D();for(let w=0;w<F;w++)E=E.catch(D);return E};import{parse as Io}from"url";var Z$="AWS_CONTAINER_CREDENTIALS_FULL_URI",W$="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",N5="AWS_CONTAINER_AUTHORIZATION_TOKEN",Mo=(D={})=>{const{timeout:F,maxRetries:E}=Y3(D);return()=>Z3(async()=>{const w=await Xo({logger:D.logger}),$=JSON.parse(await Go(F,w));if(!G$($))throw new x("Invalid response received from instance metadata service.",{logger:D.logger});return Y$($)},E)},Go=async(D,F)=>{if(process.env[N5])F.headers={...F.headers,Authorization:process.env[N5]};return(await X8({...F,timeout:D})).toString()},Yo="169.254.170.2",Zo,Wo,Xo=async({logger:D})=>{if(process.env[W$])return{hostname:Yo,path:process.env[W$]};if(process.env[Z$]){const F=Io(process.env[Z$]);if(!F.hostname||!(F.hostname in Zo))throw new x(`${F.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:D});if(!F.protocol||!(F.protocol in Wo))throw new x(`${F.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:D});return{...F,port:F.port?parseInt(F.port,10):void 0}}throw new x(`The container metadata credential provider cannot be used unless the ${W$} or ${Z$} environment variable is set`,{tryNextLink:!1,logger:D})};var dK=G(()=>{fD();M$();Zo={localhost:!0,"127.0.0.1":!0},Wo={"http:":!0,"https:":!0}});var X$;var vK=G(()=>{fD();X$=class X$ extends x{constructor(D,F=!0){super(D,F);this.tryNextLink=F,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,X$.prototype)}}});var C6;var q5=G(()=>{(function(D){D.IPv4="http://169.254.169.254",D.IPv6="http://[fd00:ec2::254]"})(C6||(C6={}))});var mK;var nK=G(()=>{mK={environmentVariableSelector:(D)=>D.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(D)=>D.ec2_metadata_service_endpoint,default:void 0}});var J8;var O5=G(()=>{(function(D){D.IPv4="IPv4",D.IPv6="IPv6"})(J8||(J8={}))});var Jo="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",zo="ec2_metadata_service_endpoint_mode",lK;var iK=G(()=>{O5();lK={environmentVariableSelector:(D)=>D[Jo],configFileSelector:(D)=>D[zo],default:J8.IPv4}});var J$=async()=>D0(await To()||await Ko()),To=async()=>i(mK)(),Ko=async()=>{const D=await i(lK)();switch(D){case J8.IPv4:return C6.IPv4;case J8.IPv6:return C6.IPv6;default:throw new Error(`Unsupported endpoint mode: ${D}. Select from ${Object.values(J8)}`)}};var j5=G(()=>{m2();G8();q5();nK();O5();iK()});var P5=(D,F)=>{const E=300+Math.floor(Math.random()*300),w=new Date(Date.now()+E*1000);F.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(w)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const $=D.originalExpiration??D.expiration;return{...D,...$?{originalExpiration:$}:{},expiration:w}};var pK=(D,F={})=>{const E=F?.logger||console;let w;return async()=>{let $;try{if($=await D(),$.expiration&&$.expiration.getTime()<Date.now())$=P5($,E)}catch(C){if(w)E.warn("Credential renew failed: ",C),$=P5(w,E);else throw C}return w=$,$}};var aK=()=>{};var eK="/latest/meta-data/iam/security-credentials/",So="/latest/api/token",y5="AWS_EC2_METADATA_V1_DISABLED",oK="ec2_metadata_v1_disabled",tK="x-aws-ec2-metadata-token",Qo=(D={})=>pK(Ho(D),{logger:D.logger}),Ho=(D={})=>{let F=!1;const{logger:E,profile:w}=D,{timeout:$,maxRetries:C}=Y3(D),f=async(B,h)=>{if(F||h.headers?.[tK]==null){let A=!1,Y=!1;const M=await i({environmentVariableSelector:(Z)=>{const z=Z[y5];if(Y=!!z&&z!=="false",z===void 0)throw new x(`${y5} not set in env, checking config file next.`,{logger:D.logger});return Y},configFileSelector:(Z)=>{const z=Z[oK];return A=!!z&&z!=="false",A},default:!1},{profile:w})();if(D.ec2MetadataV1Disabled||M){const Z=[];if(D.ec2MetadataV1Disabled)Z.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(A)Z.push(`config file profile (${oK})`);if(Y)Z.push(`process environment variable (${y5})`);throw new X$(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Z.join(", ")}].`)}}const I=(await Z3(async()=>{let A;try{A=await Ro(h)}catch(Y){if(Y.statusCode===401)F=!1;throw Y}return A},B)).trim();return Z3(async()=>{let A;try{A=await Vo(I,h,D)}catch(Y){if(Y.statusCode===401)F=!1;throw Y}return A},B)};return async()=>{const B=await J$();if(F)return E?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),f(C,{...B,timeout:$});else{let h;try{h=(await Lo({...B,timeout:$})).toString()}catch(U){if(U?.statusCode===400)throw Object.assign(U,{message:"EC2 Metadata token request returned error"});else if(U.message==="TimeoutError"||[403,404,405].includes(U.statusCode))F=!0;return E?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),f(C,{...B,timeout:$})}return f(C,{...B,headers:{[tK]:h},timeout:$})}}},Lo=async(D)=>X8({...D,path:So,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ro=async(D)=>(await X8({...D,path:eK})).toString(),Vo=async(D,F,E)=>{const w=JSON.parse((await X8({...F,path:eK+D})).toString());if(!G$(w))throw new x("Invalid response received from instance metadata service.",{logger:E.logger});return Y$(w)};var DS=G(()=>{m2();fD();vK();M$();j5();aK()});var FS=()=>{};var W3={};_0(W3,{providerConfigFromInit:()=>Y3,httpRequest:()=>X8,getInstanceMetadataEndpoint:()=>J$,fromInstanceMetadata:()=>Qo,fromContainerMetadata:()=>Mo,Endpoint:()=>C6,ENV_CMDS_RELATIVE_URI:()=>W$,ENV_CMDS_FULL_URI:()=>Z$,ENV_CMDS_AUTH_TOKEN:()=>N5,DEFAULT_TIMEOUT:()=>Uo,DEFAULT_MAX_RETRIES:()=>Ao});var X3=G(()=>{dK();DS();FS();M$();j5();q5()});var No="169.254.170.2",qo="169.254.170.23",Oo="[fd00:ec2::23]",ES=(D,F)=>{if(D.protocol==="https:")return;if(D.hostname===No||D.hostname===qo||D.hostname===Oo)return;if(D.hostname.includes("[")){if(D.hostname==="[::1]"||D.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(D.hostname==="localhost")return;const E=D.hostname.split("."),w=($)=>{const C=parseInt($,10);return 0<=C&&C<=255};if(E[0]==="127"&&w(E[1])&&w(E[2])&&w(E[3])&&E.length===4)return}throw new x(`URL not accepted. It must either be HTTPS or match one of the following:
22
22
  - loopback CIDR 127.0.0.0/8 or [::1/128]
23
23
  - ECS container host 169.254.170.2
24
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:F})};var FS=M(()=>{$D()});function ES(D){return new gD({protocol:D.protocol,hostname:D.hostname,port:Number(D.port),path:D.pathname,query:Array.from(D.searchParams.entries()).reduce((F,[E,w])=>{return F[E]=w,F},{}),fragment:D.hash})}async function wS(D,F){const w=await aT(D.body).transformToString();if(D.statusCode===200){const $=JSON.parse(w);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new x("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:F});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:AK($.Expiration)}}if(D.statusCode>=400&&D.statusCode<500){let $={};try{$=JSON.parse(w)}catch(C){}throw Object.assign(new x(`Server responded with status: ${D.statusCode}`,{logger:F}),{Code:$.Code,Message:$.Message})}throw new x(`Server responded with status: ${D.statusCode}`,{logger:F})}var $S=M(()=>{$D();dD();y();Z5()});var fS=(D,F,E)=>{return async()=>{for(let w=0;w<F;++w)try{return await D()}catch($){await new Promise((C)=>setTimeout(C,E))}return await D()}};import po from"fs/promises";var CS,ao="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",oo="http://169.254.170.2",to="AWS_CONTAINER_CREDENTIALS_FULL_URI",eo="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Dt="AWS_CONTAINER_AUTHORIZATION_TOKEN",BS=(D={})=>{D.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let F;const E=D.awsContainerCredentialsRelativeUri??process.env[ao],w=D.awsContainerCredentialsFullUri??process.env[to],$=D.awsContainerAuthorizationToken??process.env[Dt],C=D.awsContainerAuthorizationTokenFile??process.env[eo],f=D.logger?.constructor?.name==="NoOpLogger"||!D.logger?console.warn:D.logger.warn;if(E&&w)f("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),f("awsContainerCredentialsFullUri will take precedence.");if($&&C)f("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),f("awsContainerAuthorizationToken will take precedence.");if(w)F=w;else if(E)F=`${oo}${E}`;else throw new x(`No HTTP credential provider host provided.
25
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:D.logger});const B=new URL(F);DS(B,D.logger);const h=new h0({requestTimeout:D.timeout??1000,connectionTimeout:D.timeout??1000});return fS(async()=>{const U=ES(B);if($)U.headers.Authorization=$;else if(C)U.headers.Authorization=(await po.readFile(C)).toString();try{const I=await h.handle(U);return wS(I.response).then((A)=>CS.setCredentialFeature(A,"CREDENTIALS_HTTP","z"))}catch(I){throw new x(String(I),{logger:D.logger})}},D.maxRetries??3,D.timeout??1000)};var hS=M(()=>{CS=Q(C0(),1);Z8();$D();FS();$S()});var y5={};r0(y5,{fromHttp:()=>BS});var k5=M(()=>{hS()});var Ft="AWS_EC2_METADATA_DISABLED",US=async(D)=>{const{ENV_CMDS_FULL_URI:F,ENV_CMDS_RELATIVE_URI:E,fromContainerMetadata:w,fromInstanceMetadata:$}=await Promise.resolve().then(() => (Z3(),Y3));if(process.env[E]||process.env[F]){D.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:C}=await Promise.resolve().then(() => (k5(),y5));return N1(C(D),w(D))}if(process.env[Ft])return async()=>{throw new x("EC2 Instance Metadata Service access disabled",{logger:D.logger})};return D.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(D)};var AS=M(()=>{$D()});var b5=(D)=>D&&(typeof D.sso_start_url==="string"||typeof D.sso_account_id==="string"||typeof D.sso_session==="string"||typeof D.sso_region==="string"||typeof D.sso_role_name==="string");var IS=300000,v6="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function Et(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}function x5(D){return{schemeId:"smithy.api#noAuth"}}var GS,MS=async(D,F,E)=>{return{operation:v0(F).operation,region:await _D(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},YS=(D)=>{const F=[];switch(D.operation){case"CreateToken":{F.push(x5(D));break}case"RegisterClient":{F.push(x5(D));break}case"StartDeviceAuthorization":{F.push(x5(D));break}default:F.push(Et(D))}return F},ZS=(D)=>{return{...GS.resolveAwsSdkSigV4Config(D)}};var c5=M(()=>{GS=Q(jD(),1);Z2()});var XS=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},z8;var m6=M(()=>{z8={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var JS;var WS=M(()=>{JS={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.668.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var g5;var r5=M(()=>{g5={isCrtAvailable:!1}});var zS=()=>{if(g5.isCrtAvailable)return["md/crt-avail"];return null};var TS=M(()=>{r5()});import{platform as $t,release as ft}from"os";import{env as KS,versions as Ct}from"process";var Bt=({serviceId:D,clientVersion:F})=>{return async(E)=>{const w=[["aws-sdk-js",F],["ua","2.1"],[`os/${$t()}`,ft()],["lang/js"],["md/nodejs",`${Ct.node}`]],$=zS();if($)w.push($);if(D)w.push([`api/${D}`,F]);if(KS.AWS_EXECUTION_ENV)w.push([`exec-env/${KS.AWS_EXECUTION_ENV}`]);const C=await E?.userAgentAppId?.();return C?[...w,[`app/${C}`]]:[...w]}},$1;var SS=M(()=>{TS();r5();$1=Bt});var ht="AWS_SDK_UA_APP_ID",Ut="sdk-ua-app-id",f1;var QS=M(()=>{o8();f1={environmentVariableSelector:(D)=>D[ht],configFileSelector:(D)=>D[Ut],default:D9}});var n6=M(()=>{SS();QS()});import{Buffer as At}from"buffer";import{createHash as It,createHmac as Gt}from"crypto";function HS(D,F){if(At.isBuffer(D))return D;if(typeof D==="string")return s6(D,F);if(ArrayBuffer.isView(D))return q1(D.buffer,D.byteOffset,D.byteLength);return q1(D)}class z2{constructor(D,F){this.algorithmIdentifier=D,this.secret=F,this.reset()}update(D,F){this.hash.update(ZT(HS(D,F)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Gt(this.algorithmIdentifier,HS(this.secret)):It(this.algorithmIdentifier)}}var l6=M(()=>{E6();a2()});import{fstatSync as Mt,lstatSync as Yt}from"fs";var C1=(D)=>{if(!D)return 0;if(typeof D==="string")return Buffer.byteLength(D);else if(typeof D.byteLength==="number")return D.byteLength;else if(typeof D.size==="number")return D.size;else if(typeof D.start==="number"&&typeof D.end==="number")return D.end+1-D.start;else if(typeof D.path==="string"||Buffer.isBuffer(D.path))return Yt(D.path).size;else if(typeof D.fd==="number")return Mt(D.fd).size;throw new Error(`Body Length computation failed for ${D}`)};var LS=()=>{};var i6=M(()=>{LS()});var RS,VS,NS,kS,bS,D2,qS,xS,OS,jS,PS,yS,Zt,cS;var gS=M(()=>{RS={["required"]:!1,type:"String"},VS={["required"]:!0,default:!1,type:"Boolean"},NS={["ref"]:"Endpoint"},kS={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},bS={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},D2={},qS={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},xS={["ref"]:"PartitionResult"},OS={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[xS,"supportsDualStack"]}]},jS=[kS],PS=[bS],yS=[{["ref"]:"Region"}],Zt={version:"1.0",parameters:{Region:RS,UseDualStack:VS,UseFIPS:VS,Endpoint:RS},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[NS]}],rules:[{conditions:jS,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:PS,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:NS,properties:D2,headers:D2},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:yS}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:yS,assign:"PartitionResult"}],rules:[{conditions:[kS,bS],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,qS]},OS],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:D2,headers:D2},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:jS,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[qS,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[xS,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:D2,headers:D2},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:D2,headers:D2},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:PS,rules:[{conditions:[OS],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:D2,headers:D2},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:D2,headers:D2},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},cS=Zt});var Xt,rS=(D,F={})=>{return Xt.get(D,()=>G2(cS,{endpointParams:D,logger:F.logger}))};var _S=M(()=>{i8();M2();gS();Xt=new I2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});f0.aws=Y2});var sS,uS,dS=(D)=>{return{apiVersion:"2019-06-10",base64Decoder:D?.base64Decoder??z0,base64Encoder:D?.base64Encoder??K0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??rS,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??YS,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new sS.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(F)=>F.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new uS.NoAuthSigner}],logger:D?.logger??new P0,serviceId:D?.serviceId??"SSO OIDC",urlParser:D?.urlParser??eD,utf8Decoder:D?.utf8Decoder??D0,utf8Encoder:D?.utf8Encoder??T0}};var vS=M(()=>{sS=Q(jD(),1),uS=Q(rD(),1);y();M8();O1();a2();c5();_S()});var mS="AWS_EXECUTION_ENV",_5="AWS_REGION",s5="AWS_DEFAULT_REGION",nS="AWS_EC2_METADATA_DISABLED",lS,iS="/latest/meta-data/placement/region";var pS=M(()=>{lS=["in-region","cross-region","mobile","standard","legacy"]});var aS;var oS=M(()=>{aS={environmentVariableSelector:(D)=>{return D.AWS_DEFAULTS_MODE},configFileSelector:(D)=>{return D.defaults_mode},default:"legacy"}});var B1=({region:D=i(m0),defaultsMode:F=i(aS)}={})=>t8(async()=>{const E=typeof F==="function"?await F():F;switch(E?.toLowerCase()){case"auto":return Wt(D);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(E?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${lS.join(", ")}, got ${E}`)}}),Wt=async(D)=>{if(D){const F=typeof D==="function"?await D():D,E=await Jt();if(!E)return"standard";if(F===E)return"in-region";else return"cross-region"}return"standard"},Jt=async()=>{if(process.env[mS]&&(process.env[_5]||process.env[s5]))return process.env[_5]??process.env[s5];if(!process.env[nS])try{const{getInstanceMetadataEndpoint:D,httpRequest:F}=await Promise.resolve().then(() => (Z3(),Y3)),E=await D();return(await F({...E,path:iS})).toString()}catch(D){}};var tS=M(()=>{n0();v2();$D();pS();oS()});var p6=M(()=>{tS()});var eS,DQ=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=dS(D);return eS.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??T2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:JS.version}),maxAttempts:D?.maxAttempts??i(l2),region:D?.region??i(m0,s2),requestHandler:h0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...p2,default:async()=>(await E()).retryMode||o0}),sha256:D?.sha256??z2.bind(null,"sha256"),streamCollector:D?.streamCollector??t0,useDualstackEndpoint:D?.useDualstackEndpoint??i(r2),useFipsEndpoint:D?.useFipsEndpoint??i(_2),userAgentAppId:D?.userAgentAppId??i(f1)}};var FQ=M(()=>{WS();eS=Q(jD(),1);a6();n6();n0();l6();J2();v2();Z8();i6();O0();vS();y();p6();y()});var h1=(D)=>{let F=async()=>{if(D.region===void 0)throw new Error("Region is missing from runtimeConfig");const E=D.region;if(typeof E==="string")return E;return E()};return{setRegion(E){F=E},region(){return F}}},U1=(D)=>{return{region:D.region()}};var EQ=()=>{};var wQ=()=>{};var $Q=M(()=>{wQ()});var fQ=M(()=>{EQ();$Q()});var o6=M(()=>{fQ()});var CQ=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},BQ=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var W$=(D)=>D,hQ=(D,F)=>{const E={...W$(h1(D)),...W$(F1(D)),...W$(O2(D)),...W$(CQ(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...j2(E),...BQ(E)}};var UQ=M(()=>{o6();dD();y()});var t6,J$;var u5=M(()=>{z6();T6();K6();o8();n0();t6=Q(rD(),1);b6();UD();J2();y();c5();m6();FQ();UQ();J$=class J$ extends j0{constructor(...[D]){const F=DQ(D||{}),E=XS(F),w=c2(E),$=i2(w),C=u2($),f=P2(C),B=m2(f),h=ZS(B),U=hQ(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(g2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(d2(this.config)),this.middlewareStack.use(y2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(t6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:MS,identityProviderConfigProvider:async(I)=>new t6.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(t6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var kD;var z$=M(()=>{y();kD=class kD extends e0{constructor(D){super(D);Object.setPrototypeOf(this,kD.prototype)}}});var X3,W3,J3,z3,T3,K3,S3,Q3,H3,L3,R3,V3,N3,q3,d5=(D)=>({...D,...D.clientSecret&&{clientSecret:ED},...D.refreshToken&&{refreshToken:ED},...D.codeVerifier&&{codeVerifier:ED}}),v5=(D)=>({...D,...D.accessToken&&{accessToken:ED},...D.refreshToken&&{refreshToken:ED},...D.idToken&&{idToken:ED}}),m5=(D)=>({...D,...D.refreshToken&&{refreshToken:ED},...D.assertion&&{assertion:ED},...D.subjectToken&&{subjectToken:ED},...D.codeVerifier&&{codeVerifier:ED}}),n5=(D)=>({...D,...D.accessToken&&{accessToken:ED},...D.refreshToken&&{refreshToken:ED},...D.idToken&&{idToken:ED}}),l5=(D)=>({...D,...D.clientSecret&&{clientSecret:ED}}),i5=(D)=>({...D,...D.clientSecret&&{clientSecret:ED}});var C6=M(()=>{y();z$();X3=class X3 extends kD{constructor(D){super({name:"AccessDeniedException",$fault:"client",...D});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,X3.prototype),this.error=D.error,this.error_description=D.error_description}};W3=class W3 extends kD{constructor(D){super({name:"AuthorizationPendingException",$fault:"client",...D});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,W3.prototype),this.error=D.error,this.error_description=D.error_description}};J3=class J3 extends kD{constructor(D){super({name:"ExpiredTokenException",$fault:"client",...D});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,J3.prototype),this.error=D.error,this.error_description=D.error_description}};z3=class z3 extends kD{constructor(D){super({name:"InternalServerException",$fault:"server",...D});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,z3.prototype),this.error=D.error,this.error_description=D.error_description}};T3=class T3 extends kD{constructor(D){super({name:"InvalidClientException",$fault:"client",...D});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,T3.prototype),this.error=D.error,this.error_description=D.error_description}};K3=class K3 extends kD{constructor(D){super({name:"InvalidGrantException",$fault:"client",...D});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,K3.prototype),this.error=D.error,this.error_description=D.error_description}};S3=class S3 extends kD{constructor(D){super({name:"InvalidRequestException",$fault:"client",...D});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,S3.prototype),this.error=D.error,this.error_description=D.error_description}};Q3=class Q3 extends kD{constructor(D){super({name:"InvalidScopeException",$fault:"client",...D});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,Q3.prototype),this.error=D.error,this.error_description=D.error_description}};H3=class H3 extends kD{constructor(D){super({name:"SlowDownException",$fault:"client",...D});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,H3.prototype),this.error=D.error,this.error_description=D.error_description}};L3=class L3 extends kD{constructor(D){super({name:"UnauthorizedClientException",$fault:"client",...D});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,L3.prototype),this.error=D.error,this.error_description=D.error_description}};R3=class R3 extends kD{constructor(D){super({name:"UnsupportedGrantTypeException",$fault:"client",...D});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,R3.prototype),this.error=D.error,this.error_description=D.error_description}};V3=class V3 extends kD{constructor(D){super({name:"InvalidRequestRegionException",$fault:"client",...D});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,V3.prototype),this.error=D.error,this.error_description=D.error_description,this.endpoint=D.endpoint,this.region=D.region}};N3=class N3 extends kD{constructor(D){super({name:"InvalidClientMetadataException",$fault:"client",...D});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,N3.prototype),this.error=D.error,this.error_description=D.error_description}};q3=class q3 extends kD{constructor(D){super({name:"InvalidRedirectUriException",$fault:"client",...D});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,q3.prototype),this.error=D.error,this.error_description=D.error_description}}});var P1,O3,AQ=async(D,F)=>{const E=O3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/token");let $;return $=JSON.stringify(c(D,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(C)=>CD(C)})),E.m("POST").h(w).b($),E.build()},IQ=async(D,F)=>{const E=O3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/token");const $=k({[bt]:[,"t"]});let C;return C=JSON.stringify(c(D,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(f)=>CD(f),subjectToken:[],subjectTokenType:[]})),E.m("POST").h(w).q($).b(C),E.build()},GQ=async(D,F)=>{const E=O3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/client/register");let $;return $=JSON.stringify(c(D,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(C)=>CD(C),issuerUrl:[],redirectUris:(C)=>CD(C),scopes:(C)=>CD(C)})),E.m("POST").h(w).b($),E.build()},MQ=async(D,F)=>{const E=O3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/device_authorization");let $;return $=JSON.stringify(c(D,{clientId:[],clientSecret:[],startUrl:[]})),E.m("POST").h(w).b($),E.build()},YQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return T$(D,F);const E=k({$metadata:mD(D)}),w=PD(S0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{accessToken:S,expiresIn:W2,idToken:S,refreshToken:S,tokenType:S});return Object.assign(E,$),E},ZQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return T$(D,F);const E=k({$metadata:mD(D)}),w=PD(S0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{accessToken:S,expiresIn:W2,idToken:S,issuedTokenType:S,refreshToken:S,scope:CD,tokenType:S});return Object.assign(E,$),E},XQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return T$(D,F);const E=k({$metadata:mD(D)}),w=PD(S0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{authorizationEndpoint:S,clientId:S,clientIdIssuedAt:$$,clientSecret:S,clientSecretExpiresAt:$$,tokenEndpoint:S});return Object.assign(E,$),E},WQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return T$(D,F);const E=k({$metadata:mD(D)}),w=PD(S0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{deviceCode:S,expiresIn:W2,interval:W2,userCode:S,verificationUri:S,verificationUriComplete:S});return Object.assign(E,$),E},T$=async(D,F)=>{const E={...D,body:await P1.parseJsonErrorBody(D.body,F)},w=P1.loadRestJsonErrorCode(D,E.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Kt(E,F);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await St(E,F);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Qt(E,F);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Ht(E,F);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Lt(E,F);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await Vt(E,F);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await qt(E,F);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await jt(E,F);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Pt(E,F);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await yt(E,F);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await kt(E,F);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Ot(E,F);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Rt(E,F);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Nt(E,F);default:const $=E.body;return Tt({output:D,parsedBody:$,errorCode:w})}},Tt,Kt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new X3({$metadata:mD(D),...E});return u(C,D.body)},St=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new W3({$metadata:mD(D),...E});return u(C,D.body)},Qt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new J3({$metadata:mD(D),...E});return u(C,D.body)},Ht=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new z3({$metadata:mD(D),...E});return u(C,D.body)},Lt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new T3({$metadata:mD(D),...E});return u(C,D.body)},Rt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new N3({$metadata:mD(D),...E});return u(C,D.body)},Vt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new K3({$metadata:mD(D),...E});return u(C,D.body)},Nt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new q3({$metadata:mD(D),...E});return u(C,D.body)},qt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new S3({$metadata:mD(D),...E});return u(C,D.body)},Ot=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{endpoint:S,error:S,error_description:S,region:S});Object.assign(E,$);const C=new V3({$metadata:mD(D),...E});return u(C,D.body)},jt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new Q3({$metadata:mD(D),...E});return u(C,D.body)},Pt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new H3({$metadata:mD(D),...E});return u(C,D.body)},yt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new L3({$metadata:mD(D),...E});return u(C,D.body)},kt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new R3({$metadata:mD(D),...E});return u(C,D.body)},mD=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),bt="aws_iam";var j3=M(()=>{P1=Q(jD(),1),O3=Q(rD(),1);y();C6();z$();Tt=t2(kD)});var JQ,K$;var p5=M(()=>{UD();JQ=Q(YD(),1);y();m6();C6();j3();K$=class K$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[JQ.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(d5,v5).ser(AQ).de(YQ).build(){}});var zQ,S$;var a5=M(()=>{UD();zQ=Q(YD(),1);y();m6();C6();j3();S$=class S$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[zQ.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(m5,n5).ser(IQ).de(ZQ).build(){}});var TQ,Q$;var o5=M(()=>{UD();TQ=Q(YD(),1);y();m6();C6();j3();Q$=class Q$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[TQ.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,l5).ser(GQ).de(XQ).build(){}});var KQ,H$;var t5=M(()=>{UD();KQ=Q(YD(),1);y();m6();C6();j3();H$=class H$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[KQ.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(i5,void 0).ser(MQ).de(WQ).build(){}});var xt,e5;var SQ=M(()=>{y();p5();a5();o5();t5();u5();xt={CreateTokenCommand:K$,CreateTokenWithIAMCommand:S$,RegisterClientCommand:Q$,StartDeviceAuthorizationCommand:H$};e5=class e5 extends J${};u6(xt,e5)});var QQ=M(()=>{p5();a5();o5();t5()});var HQ=M(()=>{C6()});var DC={};r0(DC,{__Client:()=>j0,UnsupportedGrantTypeException:()=>R3,UnauthorizedClientException:()=>L3,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>i5,StartDeviceAuthorizationCommand:()=>H$,SlowDownException:()=>H3,SSOOIDCServiceException:()=>kD,SSOOIDCClient:()=>J$,SSOOIDC:()=>e5,RegisterClientResponseFilterSensitiveLog:()=>l5,RegisterClientCommand:()=>Q$,InvalidScopeException:()=>Q3,InvalidRequestRegionException:()=>V3,InvalidRequestException:()=>S3,InvalidRedirectUriException:()=>q3,InvalidGrantException:()=>K3,InvalidClientMetadataException:()=>N3,InvalidClientException:()=>T3,InternalServerException:()=>z3,ExpiredTokenException:()=>J3,CreateTokenWithIAMResponseFilterSensitiveLog:()=>n5,CreateTokenWithIAMRequestFilterSensitiveLog:()=>m5,CreateTokenWithIAMCommand:()=>S$,CreateTokenResponseFilterSensitiveLog:()=>v5,CreateTokenRequestFilterSensitiveLog:()=>d5,CreateTokenCommand:()=>K$,AuthorizationPendingException:()=>W3,AccessDeniedException:()=>X3,$Command:()=>l});var FC=M(()=>{u5();SQ();QQ();HQ();z$()});var EC,LQ=async(D)=>{const{SSOOIDCClient:F}=await Promise.resolve().then(() => (FC(),DC));if(EC[D])return EC[D];const E=new F({region:D});return EC[D]=E,E};var RQ=M(()=>{EC={}});var VQ=async(D,F)=>{const{CreateTokenCommand:E}=await Promise.resolve().then(() => (FC(),DC));return(await LQ(F)).send(new E({clientId:D.clientId,clientSecret:D.clientSecret,refreshToken:D.refreshToken,grantType:"refresh_token"}))};var NQ=M(()=>{RQ()});var wC=(D)=>{if(D.expiration&&D.expiration.getTime()<Date.now())throw new J0(`Token is expired. ${v6}`,!1)};var qQ=M(()=>{$D()});var T8=(D,F,E=!1)=>{if(typeof F==="undefined")throw new J0(`Value not present for '${D}' in SSO Token${E?". Cannot refresh":""}. ${v6}`,!1)};var OQ=M(()=>{$D()});import{promises as ct}from"fs";var gt,jQ=(D,F)=>{const E=rw(D),w=JSON.stringify(F,null,2);return gt(E,w)};var PQ=M(()=>{X2();({writeFile:gt}=ct)});var yQ,kQ=(D={})=>async()=>{D.logger?.debug("@aws-sdk/token-providers - fromSso");const F=await G8(D),E=i0(D),w=F[E];if(!w)throw new J0(`Profile '${E}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new J0(`Profile '${E}' is missing required property 'sso_session'.`);const $=w.sso_session,f=(await dw(D))[$];if(!f)throw new J0(`Sso session '${$}' could not be found in shared credentials file.`,!1);for(let G of["sso_start_url","sso_region"])if(!f[G])throw new J0(`Sso session '${$}' is missing required property '${G}'.`,!1);const{sso_start_url:B,sso_region:h}=f;let U;try{U=await _w($)}catch(G){throw new J0(`The SSO session token associated with profile=${E} was not found or is invalid. ${v6}`,!1)}T8("accessToken",U.accessToken),T8("expiresAt",U.expiresAt);const{accessToken:I,expiresAt:A}=U,Y={token:I,expiration:new Date(A)};if(Y.expiration.getTime()-Date.now()>IS)return Y;if(Date.now()-yQ.getTime()<30000)return wC(Y),Y;T8("clientId",U.clientId,!0),T8("clientSecret",U.clientSecret,!0),T8("refreshToken",U.refreshToken,!0);try{yQ.setTime(Date.now());const G=await VQ(U,h);T8("accessToken",G.accessToken),T8("expiresIn",G.expiresIn);const Z=new Date(Date.now()+G.expiresIn*1000);try{await jQ($,{...U,accessToken:G.accessToken,expiresAt:Z.toISOString(),refreshToken:G.refreshToken})}catch(z){}return{token:G.accessToken,expiration:Z}}catch(G){return wC(Y),Y}};var bQ=M(()=>{$D();X2();NQ();qQ();OQ();PQ();yQ=new Date(0)});var xQ=M(()=>{$D()});var cQ=M(()=>{$D()});var gQ=M(()=>{bQ();xQ();cQ()});function rt(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}function L$(D){return{schemeId:"smithy.api#noAuth"}}var rQ,_Q=async(D,F,E)=>{return{operation:v0(F).operation,region:await _D(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},sQ=(D)=>{const F=[];switch(D.operation){case"GetRoleCredentials":{F.push(L$(D));break}case"ListAccountRoles":{F.push(L$(D));break}case"ListAccounts":{F.push(L$(D));break}case"Logout":{F.push(L$(D));break}default:F.push(rt(D))}return F},uQ=(D)=>{return{...rQ.resolveAwsSdkSigV4Config(D)}};var $C=M(()=>{rQ=Q(jD(),1);Z2()});var dQ=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},K8;var e6=M(()=>{K8={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var mQ;var vQ=M(()=>{mQ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var nQ,lQ,iQ,DH,FH,F2,pQ,EH,aQ,oQ,tQ,eQ,st,wH;var $H=M(()=>{nQ={["required"]:!1,type:"String"},lQ={["required"]:!0,default:!1,type:"Boolean"},iQ={["ref"]:"Endpoint"},DH={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},FH={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},F2={},pQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},EH={["ref"]:"PartitionResult"},aQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[EH,"supportsDualStack"]}]},oQ=[DH],tQ=[FH],eQ=[{["ref"]:"Region"}],st={version:"1.0",parameters:{Region:nQ,UseDualStack:lQ,UseFIPS:lQ,Endpoint:nQ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[iQ]}],rules:[{conditions:oQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:tQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:iQ,properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:eQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:eQ,assign:"PartitionResult"}],rules:[{conditions:[DH,FH],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,pQ]},aQ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:oQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[pQ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[EH,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:F2,headers:F2},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:tQ,rules:[{conditions:[aQ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},wH=st});var ut,fH=(D,F={})=>{return ut.get(D,()=>G2(wH,{endpointParams:D,logger:F.logger}))};var CH=M(()=>{i8();M2();$H();ut=new I2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});f0.aws=Y2});var BH,hH,UH=(D)=>{return{apiVersion:"2019-06-10",base64Decoder:D?.base64Decoder??z0,base64Encoder:D?.base64Encoder??K0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??fH,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??sQ,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new BH.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(F)=>F.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new hH.NoAuthSigner}],logger:D?.logger??new P0,serviceId:D?.serviceId??"SSO",urlParser:D?.urlParser??eD,utf8Decoder:D?.utf8Decoder??D0,utf8Encoder:D?.utf8Encoder??T0}};var AH=M(()=>{BH=Q(jD(),1),hH=Q(rD(),1);y();M8();O1();a2();$C();CH()});var IH,GH=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=UH(D);return IH.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:mQ.version}),maxAttempts:D?.maxAttempts??i(l2),region:D?.region??i(m0,s2),requestHandler:h0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...p2,default:async()=>(await E()).retryMode||o0}),sha256:D?.sha256??z2.bind(null,"sha256"),streamCollector:D?.streamCollector??t0,useDualstackEndpoint:D?.useDualstackEndpoint??i(r2),useFipsEndpoint:D?.useFipsEndpoint??i(_2),userAgentAppId:D?.userAgentAppId??i(f1)}};var MH=M(()=>{vQ();IH=Q(jD(),1);n6();n0();l6();J2();v2();Z8();i6();O0();AH();y();p6();y()});var YH=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},ZH=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var R$=(D)=>D,XH=(D,F)=>{const E={...R$(h1(D)),...R$(F1(D)),...R$(O2(D)),...R$(YH(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...j2(E),...ZH(E)}};var WH=M(()=>{o6();dD();y()});var DF,y1;var P3=M(()=>{z6();T6();K6();o8();n0();DF=Q(rD(),1);b6();UD();J2();y();$C();e6();MH();WH();y1=class y1 extends j0{constructor(...[D]){const F=GH(D||{}),E=dQ(F),w=c2(E),$=i2(w),C=u2($),f=P2(C),B=m2(f),h=uQ(B),U=XH(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(g2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(d2(this.config)),this.middlewareStack.use(y2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(DF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:_Q,identityProviderConfigProvider:async(I)=>new DF.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(DF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var k1;var fC=M(()=>{y();k1=class k1 extends e0{constructor(D){super(D);Object.setPrototypeOf(this,k1.prototype)}}});var V$,N$,q$,O$,JH=(D)=>({...D,...D.accessToken&&{accessToken:ED}}),dt=(D)=>({...D,...D.secretAccessKey&&{secretAccessKey:ED},...D.sessionToken&&{sessionToken:ED}}),zH=(D)=>({...D,...D.roleCredentials&&{roleCredentials:dt(D.roleCredentials)}}),TH=(D)=>({...D,...D.accessToken&&{accessToken:ED}}),KH=(D)=>({...D,...D.accessToken&&{accessToken:ED}}),SH=(D)=>({...D,...D.accessToken&&{accessToken:ED}});var B6=M(()=>{y();fC();V$=class V$ extends k1{constructor(D){super({name:"InvalidRequestException",$fault:"client",...D});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,V$.prototype)}};N$=class N$ extends k1{constructor(D){super({name:"ResourceNotFoundException",$fault:"client",...D});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,N$.prototype)}};q$=class q$ extends k1{constructor(D){super({name:"TooManyRequestsException",$fault:"client",...D});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,q$.prototype)}};O$=class O$ extends k1{constructor(D){super({name:"UnauthorizedException",$fault:"client",...D});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,O$.prototype)}}});var S8,y3,QH=async(D,F)=>{const E=y3.requestBuilder(D,F),w=k({},X8,{[y$]:D[P$]});E.bp("/federation/credentials");const $=k({[at]:[,PD(D[pt],"roleName")],[PH]:[,PD(D[jH],"accountId")]});let C;return E.m("GET").h(w).q($).b(C),E.build()},HH=async(D,F)=>{const E=y3.requestBuilder(D,F),w=k({},X8,{[y$]:D[P$]});E.bp("/assignment/roles");const $=k({[xH]:[,D[bH]],[kH]:[()=>D.maxResults!==void 0,()=>D[yH].toString()],[PH]:[,PD(D[jH],"accountId")]});let C;return E.m("GET").h(w).q($).b(C),E.build()},LH=async(D,F)=>{const E=y3.requestBuilder(D,F),w=k({},X8,{[y$]:D[P$]});E.bp("/assignment/accounts");const $=k({[xH]:[,D[bH]],[kH]:[()=>D.maxResults!==void 0,()=>D[yH].toString()]});let C;return E.m("GET").h(w).q($).b(C),E.build()},RH=async(D,F)=>{const E=y3.requestBuilder(D,F),w=k({},X8,{[y$]:D[P$]});E.bp("/logout");let $;return E.m("POST").h(w).b($),E.build()},VH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return j$(D,F);const E=k({$metadata:Q8(D)}),w=PD(S0(await S8.parseJsonBody(D.body,F)),"body"),$=c(w,{roleCredentials:CD});return Object.assign(E,$),E},NH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return j$(D,F);const E=k({$metadata:Q8(D)}),w=PD(S0(await S8.parseJsonBody(D.body,F)),"body"),$=c(w,{nextToken:S,roleList:CD});return Object.assign(E,$),E},qH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return j$(D,F);const E=k({$metadata:Q8(D)}),w=PD(S0(await S8.parseJsonBody(D.body,F)),"body"),$=c(w,{accountList:CD,nextToken:S});return Object.assign(E,$),E},OH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return j$(D,F);const E=k({$metadata:Q8(D)});return await w6(D.body,F),E},j$=async(D,F)=>{const E={...D,body:await S8.parseJsonErrorBody(D.body,F)},w=S8.loadRestJsonErrorCode(D,E.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await mt(E,F);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await nt(E,F);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await lt(E,F);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await it(E,F);default:const $=E.body;return vt({output:D,parsedBody:$,errorCode:w})}},vt,mt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new V$({$metadata:Q8(D),...E});return u(C,D.body)},nt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new N$({$metadata:Q8(D),...E});return u(C,D.body)},lt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new q$({$metadata:Q8(D),...E});return u(C,D.body)},it=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new O$({$metadata:Q8(D),...E});return u(C,D.body)},Q8=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),jH="accountId",P$="accessToken",PH="account_id",yH="maxResults",kH="max_result",bH="nextToken",xH="next_token",pt="roleName",at="role_name",y$="x-amz-sso_bearer_token";var k3=M(()=>{S8=Q(jD(),1),y3=Q(rD(),1);y();B6();fC();vt=t2(k1)});var cH,b3;var CC=M(()=>{UD();cH=Q(YD(),1);y();e6();B6();k3();b3=class b3 extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[cH.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(JH,zH).ser(QH).de(VH).build(){}});var gH,x3;var k$=M(()=>{UD();gH=Q(YD(),1);y();e6();B6();k3();x3=class x3 extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[gH.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(TH,void 0).ser(HH).de(NH).build(){}});var rH,c3;var b$=M(()=>{UD();rH=Q(YD(),1);y();e6();B6();k3();c3=class c3 extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[rH.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(KH,void 0).ser(LH).de(qH).build(){}});var _H,BC;var hC=M(()=>{UD();_H=Q(YD(),1);y();e6();B6();k3();BC=class BC extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[_H.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(SH,void 0).ser(RH).de(OH).build(){}});var ot,sH;var uH=M(()=>{y();CC();k$();b$();hC();P3();ot={GetRoleCredentialsCommand:b3,ListAccountRolesCommand:x3,ListAccountsCommand:c3,LogoutCommand:BC};sH=class sH extends y1{};u6(ot,sH)});var dH=M(()=>{CC();k$();b$();hC()});var vH=()=>{};var mH,_KD;var nH=M(()=>{mH=Q(rD(),1);k$();P3();_KD=mH.createPaginator(y1,x3,"nextToken","nextToken","maxResults")});var lH,vKD;var iH=M(()=>{lH=Q(rD(),1);b$();P3();vKD=lH.createPaginator(y1,c3,"nextToken","nextToken","maxResults")});var pH=M(()=>{vH();nH();iH()});var aH=M(()=>{B6()});var oH=M(()=>{P3();uH();dH();pH();aH()});var tH={};r0(tH,{SSOClient:()=>y1,GetRoleCredentialsCommand:()=>b3});var eH=M(()=>{oH()});var UC,g3=!1,AC=async({ssoStartUrl:D,ssoSession:F,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoClient:C,clientConfig:f,profile:B,logger:h})=>{let U;const I="To refresh this SSO session run aws sso login with the corresponding profile.";if(F)try{const wD=await kQ({profile:B})();U={accessToken:wD.token,expiresAt:new Date(wD.expiration).toISOString()}}catch(wD){throw new x(wD.message,{tryNextLink:g3,logger:h})}else try{U=await _w(D)}catch(wD){throw new x("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:g3,logger:h})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new x("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:g3,logger:h});const{accessToken:A}=U,{SSOClient:Y,GetRoleCredentialsCommand:G}=await Promise.resolve().then(() => (eH(),tH)),Z=C||new Y(Object.assign({},f??{},{region:f?.region??w}));let z;try{z=await Z.send(new G({accountId:E,roleName:$,accessToken:A}))}catch(wD){throw new x(wD,{tryNextLink:g3,logger:h})}const{roleCredentials:{accessKeyId:W,secretAccessKey:J,sessionToken:K,expiration:L,credentialScope:V,accountId:m}={}}=z;if(!W||!J||!K||!L)throw new x("SSO returns an invalid temporary credential.",{tryNextLink:g3,logger:h});const DD={accessKeyId:W,secretAccessKey:J,sessionToken:K,expiration:new Date(L),...V&&{credentialScope:V},...m&&{accountId:m}};if(F)UC.setCredentialFeature(DD,"CREDENTIALS_SSO","s");else UC.setCredentialFeature(DD,"CREDENTIALS_SSO_LEGACY","u");return DD};var DL=M(()=>{UC=Q(C0(),1);gQ();$D();X2()});var IC=(D,F)=>{const{sso_start_url:E,sso_account_id:w,sso_region:$,sso_role_name:C}=D;if(!E||!w||!$||!C)throw new x(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(D).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:F});return D};var GC=M(()=>{$D()});var tt=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:F,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoSession:C}=D,{ssoClient:f}=D,B=i0(D);if(!F&&!E&&!w&&!$&&!C){const U=(await G8(D))[B];if(!U)throw new x(`Profile ${B} was not found.`,{logger:D.logger});if(!b5(U))throw new x(`Profile ${B} is not configured with SSO credentials.`,{logger:D.logger});if(U?.sso_session){const W=(await dw(D))[U.sso_session],J=` configurations in profile ${B} and sso-session ${U.sso_session}`;if(w&&w!==W.sso_region)throw new x("Conflicting SSO region"+J,{tryNextLink:!1,logger:D.logger});if(F&&F!==W.sso_start_url)throw new x("Conflicting SSO start_url"+J,{tryNextLink:!1,logger:D.logger});U.sso_region=W.sso_region,U.sso_start_url=W.sso_start_url}const{sso_start_url:I,sso_account_id:A,sso_region:Y,sso_role_name:G,sso_session:Z}=IC(U,D.logger);return AC({ssoStartUrl:I,ssoSession:Z,ssoAccountId:A,ssoRegion:Y,ssoRoleName:G,ssoClient:f,clientConfig:D.clientConfig,profile:B})}else if(!F||!E||!w||!$)throw new x('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:D.logger});else return AC({ssoStartUrl:F,ssoSession:C,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoClient:f,clientConfig:D.clientConfig,profile:B})};var FL=M(()=>{$D();X2();DL();GC()});var EL=()=>{};var MC={};r0(MC,{validateSsoProfile:()=>IC,isSsoProfile:()=>b5,fromSSO:()=>tt});var YC=M(()=>{FL();EL();GC()});var wL,$L=(D,F,E)=>{const w={EcsContainer:async($)=>{const{fromHttp:C}=await Promise.resolve().then(() => (k5(),y5)),{fromContainerMetadata:f}=await Promise.resolve().then(() => (Z3(),Y3));return E?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>N1(C($??{}),f($))().then(ZC)},Ec2InstanceMetadata:async($)=>{E?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:C}=await Promise.resolve().then(() => (Z3(),Y3));return async()=>C($)().then(ZC)},Environment:async($)=>{E?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:C}=await Promise.resolve().then(() => (R5(),_K));return async()=>C($)().then(ZC)}};if(D in w)return w[D];else throw new x(`Unsupported credential source in profile ${F}. Got ${D}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:E})},ZC=(D)=>wL.setCredentialFeature(D,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var fL=M(()=>{wL=Q(C0(),1);$D()});function et(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}function CL(D){return{schemeId:"smithy.api#noAuth"}}var BL,hL=async(D,F,E)=>{return{operation:v0(F).operation,region:await _D(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},UL=(D)=>{const F=[];switch(D.operation){case"AssumeRoleWithSAML":{F.push(CL(D));break}case"AssumeRoleWithWebIdentity":{F.push(CL(D));break}default:F.push(et(D))}return F},De=(D)=>({...D,stsClientCtor:b1}),AL=(D)=>{const F=De(D);return{...BL.resolveAwsSdkSigV4Config(F)}};var XC=M(()=>{BL=Q(jD(),1);Z2();r3()});var IL=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,useGlobalEndpoint:D.useGlobalEndpoint??!1,defaultSigningName:"sts"}},F0;var A1=M(()=>{F0={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var ML;var GL=M(()=>{ML={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var YL,WC,QL,ZL,aD,XL,HL,LL,E0,y0,WL,RL,VL,JL,NL,zL,TL,KL,SL,Ee,qL;var OL=M(()=>{YL={["required"]:!1,["type"]:"String"},WC={["required"]:!0,default:!1,["type"]:"Boolean"},QL={["ref"]:"Endpoint"},ZL={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},aD={["ref"]:"Region"},XL={["fn"]:"aws.partition",["argv"]:[aD],assign:"PartitionResult"},HL={["ref"]:"UseFIPS"},LL={["ref"]:"UseDualStack"},E0={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},y0={},WL={conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"aws-global"]}],["endpoint"]:E0,["type"]:"endpoint"},RL={["fn"]:"booleanEquals",["argv"]:[HL,!0]},VL={["fn"]:"booleanEquals",["argv"]:[LL,!0]},JL={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},NL={["ref"]:"PartitionResult"},zL={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[NL,"supportsDualStack"]}]},TL=[{["fn"]:"isSet",["argv"]:[QL]}],KL=[RL],SL=[VL],Ee={version:"1.0",parameters:{Region:YL,UseDualStack:WC,UseFIPS:WC,Endpoint:YL,UseGlobalEndpoint:WC},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:TL},ZL,XL,{["fn"]:"booleanEquals",["argv"]:[HL,!1]},{["fn"]:"booleanEquals",["argv"]:[LL,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"ap-northeast-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"ap-south-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"ap-southeast-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"ap-southeast-2"]}],endpoint:E0,["type"]:"endpoint"},WL,{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"ca-central-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"eu-central-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"eu-north-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"eu-west-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"eu-west-2"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"eu-west-3"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"sa-east-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"us-east-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"us-east-2"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"us-west-1"]}],endpoint:E0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[aD,"us-west-2"]}],endpoint:E0,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:y0},["type"]:"endpoint"}],["type"]:"tree"},{conditions:TL,rules:[{conditions:KL,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:SL,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:QL,properties:y0,headers:y0},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[ZL],rules:[{conditions:[XL],rules:[{conditions:[RL,VL],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,JL]},zL],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:y0,headers:y0},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:KL,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[JL,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[NL,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:y0,headers:y0},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:y0,headers:y0},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:SL,rules:[{conditions:[zL],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:y0,headers:y0},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},WL,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:y0,headers:y0},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},qL=Ee});var we,jL=(D,F={})=>{return we.get(D,()=>G2(qL,{endpointParams:D,logger:F.logger}))};var PL=M(()=>{i8();M2();OL();we=new I2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]});f0.aws=Y2});var yL,kL,bL=(D)=>{return{apiVersion:"2011-06-15",base64Decoder:D?.base64Decoder??z0,base64Encoder:D?.base64Encoder??K0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??jL,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??UL,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new yL.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(F)=>F.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new kL.NoAuthSigner}],logger:D?.logger??new P0,serviceId:D?.serviceId??"STS",urlParser:D?.urlParser??eD,utf8Decoder:D?.utf8Decoder??D0,utf8Encoder:D?.utf8Encoder??T0}};var xL=M(()=>{yL=Q(jD(),1),kL=Q(rD(),1);y();M8();O1();a2();XC();PL()});var x$,cL,gL=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=bL(D);return x$.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??T2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:ML.version}),httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:($)=>$.getIdentityProvider("aws.auth#sigv4")||(async(C)=>await T2(C?.__config||{})()),signer:new x$.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:($)=>$.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new cL.NoAuthSigner}],maxAttempts:D?.maxAttempts??i(l2),region:D?.region??i(m0,s2),requestHandler:h0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...p2,default:async()=>(await E()).retryMode||o0}),sha256:D?.sha256??z2.bind(null,"sha256"),streamCollector:D?.streamCollector??t0,useDualstackEndpoint:D?.useDualstackEndpoint??i(r2),useFipsEndpoint:D?.useFipsEndpoint??i(_2),userAgentAppId:D?.userAgentAppId??i(f1)}};var rL=M(()=>{GL();x$=Q(jD(),1);a6();n6();n0();cL=Q(rD(),1);l6();J2();v2();Z8();i6();O0();xL();y();p6();y()});var _L=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},sL=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var c$=(D)=>D,uL=(D,F)=>{const E={...c$(h1(D)),...c$(F1(D)),...c$(O2(D)),...c$(_L(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...j2(E),...sL(E)}};var dL=M(()=>{o6();dD();y()});var FF,b1;var r3=M(()=>{z6();T6();K6();o8();n0();FF=Q(rD(),1);b6();UD();J2();y();XC();A1();rL();dL();b1=class b1 extends j0{constructor(...[D]){const F=gL(D||{}),E=IL(F),w=c2(E),$=i2(w),C=u2($),f=P2(C),B=m2(f),h=AL(B),U=uL(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(g2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(d2(this.config)),this.middlewareStack.use(y2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(FF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:hL,identityProviderConfigProvider:async(I)=>new FF.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(FF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var U0;var g$=M(()=>{y();U0=class U0 extends e0{constructor(D){super(D);Object.setPrototypeOf(this,U0.prototype)}}});var _3,s3,u3,d3,v3,m3,n3,l3,EF=(D)=>({...D,...D.SecretAccessKey&&{SecretAccessKey:ED}}),JC=(D)=>({...D,...D.Credentials&&{Credentials:EF(D.Credentials)}}),zC=(D)=>({...D,...D.SAMLAssertion&&{SAMLAssertion:ED}}),TC=(D)=>({...D,...D.Credentials&&{Credentials:EF(D.Credentials)}}),KC=(D)=>({...D,...D.WebIdentityToken&&{WebIdentityToken:ED}}),SC=(D)=>({...D,...D.Credentials&&{Credentials:EF(D.Credentials)}}),QC=(D)=>({...D,...D.Credentials&&{Credentials:EF(D.Credentials)}}),HC=(D)=>({...D,...D.Credentials&&{Credentials:EF(D.Credentials)}});var H8=M(()=>{y();g$();_3=class _3 extends U0{constructor(D){super({name:"ExpiredTokenException",$fault:"client",...D});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,_3.prototype)}};s3=class s3 extends U0{constructor(D){super({name:"MalformedPolicyDocumentException",$fault:"client",...D});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,s3.prototype)}};u3=class u3 extends U0{constructor(D){super({name:"PackedPolicyTooLargeException",$fault:"client",...D});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,u3.prototype)}};d3=class d3 extends U0{constructor(D){super({name:"RegionDisabledException",$fault:"client",...D});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,d3.prototype)}};v3=class v3 extends U0{constructor(D){super({name:"IDPRejectedClaimException",$fault:"client",...D});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,v3.prototype)}};m3=class m3 extends U0{constructor(D){super({name:"InvalidIdentityTokenException",$fault:"client",...D});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,m3.prototype)}};n3=class n3 extends U0{constructor(D){super({name:"IDPCommunicationErrorException",$fault:"client",...D});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,n3.prototype)}};l3=class l3 extends U0{constructor(D){super({name:"InvalidAuthorizationMessageException",$fault:"client",...D});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,l3.prototype)}}});var K2,vL=async(D,F)=>{const E=V8;let w;return w=j8({...Ge(D,F),[q8]:de,[O8]:N8}),R8(F,E,"/",void 0,w)},mL=async(D,F)=>{const E=V8;let w;return w=j8({...Me(D,F),[q8]:ve,[O8]:N8}),R8(F,E,"/",void 0,w)},nL=async(D,F)=>{const E=V8;let w;return w=j8({...Ye(D,F),[q8]:me,[O8]:N8}),R8(F,E,"/",void 0,w)},lL=async(D,F)=>{const E=V8;let w;return w=j8({...Ze(D,F),[q8]:ne,[O8]:N8}),R8(F,E,"/",void 0,w)},iL=async(D,F)=>{const E=V8;let w;return w=j8({...Xe(D,F),[q8]:le,[O8]:N8}),R8(F,E,"/",void 0,w)},pL=async(D,F)=>{const E=V8;let w;return w=j8({...We(D,F),[q8]:ie,[O8]:N8}),R8(F,E,"/",void 0,w)},aL=async(D,F)=>{const E=V8;let w;return w=j8({...Je(D,F),[q8]:pe,[O8]:N8}),R8(F,E,"/",void 0,w)},oL=async(D,F)=>{const E=V8;let w;return w=j8({...ze(D,F),[q8]:ae,[O8]:N8}),R8(F,E,"/",void 0,w)},tL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=Le(E.AssumeRoleResult,F),{$metadata:w0(D),...w}},eL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=Re(E.AssumeRoleWithSAMLResult,F),{$metadata:w0(D),...w}},DR=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=Ve(E.AssumeRoleWithWebIdentityResult,F),{$metadata:w0(D),...w}},FR=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=Ne(E.DecodeAuthorizationMessageResult,F),{$metadata:w0(D),...w}},ER=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=je(E.GetAccessKeyInfoResult,F),{$metadata:w0(D),...w}},wR=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=Pe(E.GetCallerIdentityResult,F),{$metadata:w0(D),...w}},$R=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=ye(E.GetFederationTokenResult,F),{$metadata:w0(D),...w}},fR=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await K2.parseXmlBody(D.body,F);let w={};return w=ke(E.GetSessionTokenResult,F),{$metadata:w0(D),...w}},L8=async(D,F)=>{const E={...D,body:await K2.parseXmlErrorBody(D.body,F)},w=oe(D,E.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await $e(E,F);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Ue(E,F);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Ae(E,F);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ie(E,F);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Ce(E,F);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await he(E,F);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await fe(E,F);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Be(E,F);default:const $=E.body;return ue({output:D,parsedBody:$.Error,errorCode:w})}},$e=async(D,F)=>{const E=D.body,w=qe(E.Error,F),$=new _3({$metadata:w0(D),...w});return u($,E)},fe=async(D,F)=>{const E=D.body,w=be(E.Error,F),$=new n3({$metadata:w0(D),...w});return u($,E)},Ce=async(D,F)=>{const E=D.body,w=xe(E.Error,F),$=new v3({$metadata:w0(D),...w});return u($,E)},Be=async(D,F)=>{const E=D.body,w=ce(E.Error,F),$=new l3({$metadata:w0(D),...w});return u($,E)},he=async(D,F)=>{const E=D.body,w=ge(E.Error,F),$=new m3({$metadata:w0(D),...w});return u($,E)},Ue=async(D,F)=>{const E=D.body,w=re(E.Error,F),$=new s3({$metadata:w0(D),...w});return u($,E)},Ae=async(D,F)=>{const E=D.body,w=_e(E.Error,F),$=new u3({$metadata:w0(D),...w});return u($,E)},Ie=async(D,F)=>{const E=D.body,w=se(E.Error,F),$=new d3({$metadata:w0(D),...w});return u($,E)},Ge=(D,F)=>{const E={};if(D[g1]!=null)E[g1]=D[g1];if(D[CF]!=null)E[CF]=D[CF];if(D[w2]!=null){const w=r$(D[w2],F);if(D[w2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[E2]!=null)E[E2]=D[E2];if(D[I0]!=null)E[I0]=D[I0];if(D[hF]!=null){const w=CR(D[hF],F);if(D[hF]?.length===0)E.Tags=[];Object.entries(w).forEach(([$,C])=>{const f=`Tags.${$}`;E[f]=C})}if(D[iC]!=null){const w=He(D[iC],F);if(D[iC]?.length===0)E.TransitiveTagKeys=[];Object.entries(w).forEach(([$,C])=>{const f=`TransitiveTagKeys.${$}`;E[f]=C})}if(D[qC]!=null)E[qC]=D[qC];if(D[BF]!=null)E[BF]=D[BF];if(D[UF]!=null)E[UF]=D[UF];if(D[f2]!=null)E[f2]=D[f2];if(D[rC]!=null){const w=Se(D[rC],F);if(D[rC]?.length===0)E.ProvidedContexts=[];Object.entries(w).forEach(([$,C])=>{const f=`ProvidedContexts.${$}`;E[f]=C})}return E},Me=(D,F)=>{const E={};if(D[g1]!=null)E[g1]=D[g1];if(D[cC]!=null)E[cC]=D[cC];if(D[vC]!=null)E[vC]=D[vC];if(D[w2]!=null){const w=r$(D[w2],F);if(D[w2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[E2]!=null)E[E2]=D[E2];if(D[I0]!=null)E[I0]=D[I0];return E},Ye=(D,F)=>{const E={};if(D[g1]!=null)E[g1]=D[g1];if(D[CF]!=null)E[CF]=D[CF];if(D[oC]!=null)E[oC]=D[oC];if(D[_C]!=null)E[_C]=D[_C];if(D[w2]!=null){const w=r$(D[w2],F);if(D[w2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[E2]!=null)E[E2]=D[E2];if(D[I0]!=null)E[I0]=D[I0];return E},Ze=(D,F)=>{const E={};if(D[OC]!=null)E[OC]=D[OC];return E},Xe=(D,F)=>{const E={};if(D[wF]!=null)E[wF]=D[wF];return E},We=(D,F)=>{return{}},Je=(D,F)=>{const E={};if(D[bC]!=null)E[bC]=D[bC];if(D[E2]!=null)E[E2]=D[E2];if(D[w2]!=null){const w=r$(D[w2],F);if(D[w2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[I0]!=null)E[I0]=D[I0];if(D[hF]!=null){const w=CR(D[hF],F);if(D[hF]?.length===0)E.Tags=[];Object.entries(w).forEach(([$,C])=>{const f=`Tags.${$}`;E[f]=C})}return E},ze=(D,F)=>{const E={};if(D[I0]!=null)E[I0]=D[I0];if(D[BF]!=null)E[BF]=D[BF];if(D[UF]!=null)E[UF]=D[UF];return E},r$=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;const C=Te($,F);Object.entries(C).forEach(([f,B])=>{E[`member.${w}.${f}`]=B}),w++}return E},Te=(D,F)=>{const E={};if(D[tC]!=null)E[tC]=D[tC];return E},Ke=(D,F)=>{const E={};if(D[gC]!=null)E[gC]=D[gC];if(D[RC]!=null)E[RC]=D[RC];return E},Se=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;const C=Ke($,F);Object.entries(C).forEach(([f,B])=>{E[`member.${w}.${f}`]=B}),w++}return E},Qe=(D,F)=>{const E={};if(D[kC]!=null)E[kC]=D[kC];if(D[aC]!=null)E[aC]=D[aC];return E},He=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;E[`member.${w}`]=$,w++}return E},CR=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;const C=Qe($,F);Object.entries(C).forEach(([f,B])=>{E[`member.${w}.${f}`]=B}),w++}return E},eC=(D,F)=>{const E={};if(D[LC]!=null)E[LC]=S(D[LC]);if(D[c1]!=null)E[c1]=S(D[c1]);return E},Le=(D,F)=>{const E={};if(D[A0]!=null)E[A0]=i3(D[A0],F);if(D[x1]!=null)E[x1]=eC(D[x1],F);if(D[$2]!=null)E[$2]=I3(D[$2]);if(D[f2]!=null)E[f2]=S(D[f2]);return E},Re=(D,F)=>{const E={};if(D[A0]!=null)E[A0]=i3(D[A0],F);if(D[x1]!=null)E[x1]=eC(D[x1],F);if(D[$2]!=null)E[$2]=I3(D[$2]);if(D[uC]!=null)E[uC]=S(D[uC]);if(D[nC]!=null)E[nC]=S(D[nC]);if(D[yC]!=null)E[yC]=S(D[yC]);if(D[fF]!=null)E[fF]=S(D[fF]);if(D[xC]!=null)E[xC]=S(D[xC]);if(D[f2]!=null)E[f2]=S(D[f2]);return E},Ve=(D,F)=>{const E={};if(D[A0]!=null)E[A0]=i3(D[A0],F);if(D[mC]!=null)E[mC]=S(D[mC]);if(D[x1]!=null)E[x1]=eC(D[x1],F);if(D[$2]!=null)E[$2]=I3(D[$2]);if(D[sC]!=null)E[sC]=S(D[sC]);if(D[fF]!=null)E[fF]=S(D[fF]);if(D[f2]!=null)E[f2]=S(D[f2]);return E},i3=(D,F)=>{const E={};if(D[wF]!=null)E[wF]=S(D[wF]);if(D[dC]!=null)E[dC]=S(D[dC]);if(D[lC]!=null)E[lC]=S(D[lC]);if(D[NC]!=null)E[NC]=PD(d6(D[NC]));return E},Ne=(D,F)=>{const E={};if(D[VC]!=null)E[VC]=S(D[VC]);return E},qe=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},Oe=(D,F)=>{const E={};if(D[PC]!=null)E[PC]=S(D[PC]);if(D[c1]!=null)E[c1]=S(D[c1]);return E},je=(D,F)=>{const E={};if(D[$F]!=null)E[$F]=S(D[$F]);return E},Pe=(D,F)=>{const E={};if(D[pC]!=null)E[pC]=S(D[pC]);if(D[$F]!=null)E[$F]=S(D[$F]);if(D[c1]!=null)E[c1]=S(D[c1]);return E},ye=(D,F)=>{const E={};if(D[A0]!=null)E[A0]=i3(D[A0],F);if(D[jC]!=null)E[jC]=Oe(D[jC],F);if(D[$2]!=null)E[$2]=I3(D[$2]);return E},ke=(D,F)=>{const E={};if(D[A0]!=null)E[A0]=i3(D[A0],F);return E},be=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},xe=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},ce=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},ge=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},re=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},_e=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},se=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},w0=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),ue,R8=async(D,F,E,w,$)=>{const{hostname:C,protocol:f="https",port:B,path:h}=await D.endpoint(),U={protocol:f,hostname:C,port:B,method:"POST",path:h.endsWith("/")?h.slice(0,-1)+E:h+E,headers:F};if(w!==void 0)U.hostname=w;if($!==void 0)U.body=$;return new gD(U)},V8,N8="2011-06-15",q8="Action",wF="AccessKeyId",de="AssumeRole",LC="AssumedRoleId",x1="AssumedRoleUser",ve="AssumeRoleWithSAML",me="AssumeRoleWithWebIdentity",$F="Account",c1="Arn",fF="Audience",A0="Credentials",RC="ContextAssertion",ne="DecodeAuthorizationMessage",VC="DecodedMessage",I0="DurationSeconds",NC="Expiration",qC="ExternalId",OC="EncodedMessage",jC="FederatedUser",PC="FederatedUserId",le="GetAccessKeyInfo",ie="GetCallerIdentity",pe="GetFederationToken",ae="GetSessionToken",yC="Issuer",kC="Key",bC="Name",xC="NameQualifier",E2="Policy",w2="PolicyArns",cC="PrincipalArn",gC="ProviderArn",rC="ProvidedContexts",_C="ProviderId",$2="PackedPolicySize",sC="Provider",g1="RoleArn",CF="RoleSessionName",uC="Subject",dC="SecretAccessKey",vC="SAMLAssertion",mC="SubjectFromWebIdentityToken",f2="SourceIdentity",BF="SerialNumber",nC="SubjectType",lC="SessionToken",hF="Tags",UF="TokenCode",iC="TransitiveTagKeys",pC="UserId",O8="Version",aC="Value",oC="WebIdentityToken",tC="arn",zD="message",j8=(D)=>Object.entries(D).map(([F,E])=>C$(F)+"="+C$(E)).join("&"),oe=(D,F)=>{if(F.Error?.Code!==void 0)return F.Error.Code;if(D.statusCode==404)return"NotFound"};var r1=M(()=>{K2=Q(jD(),1);dD();y();H8();g$();ue=t2(U0),V8={"content-type":"application/x-www-form-urlencoded"}});var BR,AF;var _$=M(()=>{UD();BR=Q(YD(),1);y();A1();H8();r1();AF=class AF extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[BR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,JC).ser(vL).de(tL).build(){}});var hR,s$;var DB=M(()=>{UD();hR=Q(YD(),1);y();A1();H8();r1();s$=class s$ extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[hR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(zC,TC).ser(mL).de(eL).build(){}});var UR,IF;var u$=M(()=>{UD();UR=Q(YD(),1);y();A1();H8();r1();IF=class IF extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[UR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(KC,SC).ser(nL).de(DR).build(){}});var AR,d$;var FB=M(()=>{UD();AR=Q(YD(),1);y();A1();r1();d$=class d$ extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[AR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(lL).de(FR).build(){}});var IR,v$;var EB=M(()=>{UD();IR=Q(YD(),1);y();A1();r1();v$=class v$ extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[IR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(iL).de(ER).build(){}});var GR,m$;var wB=M(()=>{UD();GR=Q(YD(),1);y();A1();r1();m$=class m$ extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[GR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(pL).de(wR).build(){}});var MR,n$;var $B=M(()=>{UD();MR=Q(YD(),1);y();A1();H8();r1();n$=class n$ extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[MR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,QC).ser(aL).de($R).build(){}});var YR,l$;var fB=M(()=>{UD();YR=Q(YD(),1);y();A1();H8();r1();l$=class l$ extends l.classBuilder().ep(F0).m(function(D,F,E,w){return[YR.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,HC).ser(oL).de(fR).build(){}});var te,CB;var ZR=M(()=>{y();_$();DB();u$();FB();EB();wB();$B();fB();r3();te={AssumeRoleCommand:AF,AssumeRoleWithSAMLCommand:s$,AssumeRoleWithWebIdentityCommand:IF,DecodeAuthorizationMessageCommand:d$,GetAccessKeyInfoCommand:v$,GetCallerIdentityCommand:m$,GetFederationTokenCommand:n$,GetSessionTokenCommand:l$};CB=class CB extends b1{};u6(te,CB)});var XR=M(()=>{_$();DB();u$();FB();EB();wB();$B();fB()});var WR=M(()=>{H8()});var i$,JR="us-east-1",zR=(D)=>{if(typeof D?.Arn==="string"){const F=D.Arn.split(":");if(F.length>4&&F[4]!=="")return F[4]}return},TR=async(D,F,E)=>{const w=typeof D==="function"?await D():D,$=typeof F==="function"?await F():F;return E?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${$} (parent client)`,`${JR} (STS default)`),w??$??JR},KR=(D,F)=>{let E,w;return async($,C)=>{if(w=$,!E){const{logger:I=D?.parentClientConfig?.logger,region:A,requestHandler:Y=D?.parentClientConfig?.requestHandler,credentialProviderLogger:G}=D,Z=await TR(A,D?.parentClientConfig?.region,G),z=!QR(Y);E=new F({credentialDefaultProvider:()=>async()=>w,region:Z,requestHandler:z?Y:void 0,logger:I})}const{Credentials:f,AssumedRoleUser:B}=await E.send(new AF(C));if(!f||!f.AccessKeyId||!f.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${C.RoleArn}`);const h=zR(B),U={accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.SessionToken,expiration:f.Expiration,...f.CredentialScope&&{credentialScope:f.CredentialScope},...h&&{accountId:h}};return i$.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE","i"),U}},SR=(D,F)=>{let E;return async(w)=>{if(!E){const{logger:h=D?.parentClientConfig?.logger,region:U,requestHandler:I=D?.parentClientConfig?.requestHandler,credentialProviderLogger:A}=D,Y=await TR(U,D?.parentClientConfig?.region,A),G=!QR(I);E=new F({region:Y,requestHandler:G?I:void 0,logger:h})}const{Credentials:$,AssumedRoleUser:C}=await E.send(new IF(w));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const f=zR(C),B={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...f&&{accountId:f}};if(f)i$.setCredentialFeature(B,"RESOLVED_ACCOUNT_ID","T");return i$.setCredentialFeature(B,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),B}},QR=(D)=>{return D?.metadata?.handlerProtocol==="h2"};var HR=M(()=>{i$=Q(C0(),1);_$();u$()});var LR=(D,F)=>{if(!F)return D;else return class E extends D{constructor(w){super(w);for(let $ of F)this.middlewareStack.use($)}}},RR=(D={},F)=>KR(D,LR(b1,F)),VR=(D={},F)=>SR(D,LR(b1,F)),ee=(D)=>(F)=>D({roleAssumer:RR(F),roleAssumerWithWebIdentity:VR(F),...F});var NR=M(()=>{HR();r3()});var BB={};r0(BB,{getDefaultRoleAssumerWithWebIdentity:()=>VR,getDefaultRoleAssumer:()=>RR,decorateDefaultCredentialProvider:()=>ee,__Client:()=>j0,STSServiceException:()=>U0,STSClient:()=>b1,STS:()=>CB,RegionDisabledException:()=>d3,PackedPolicyTooLargeException:()=>u3,MalformedPolicyDocumentException:()=>s3,InvalidIdentityTokenException:()=>m3,InvalidAuthorizationMessageException:()=>l3,IDPRejectedClaimException:()=>v3,IDPCommunicationErrorException:()=>n3,GetSessionTokenResponseFilterSensitiveLog:()=>HC,GetSessionTokenCommand:()=>l$,GetFederationTokenResponseFilterSensitiveLog:()=>QC,GetFederationTokenCommand:()=>n$,GetCallerIdentityCommand:()=>m$,GetAccessKeyInfoCommand:()=>v$,ExpiredTokenException:()=>_3,DecodeAuthorizationMessageCommand:()=>d$,CredentialsFilterSensitiveLog:()=>EF,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>SC,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>KC,AssumeRoleWithWebIdentityCommand:()=>IF,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>TC,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>zC,AssumeRoleWithSAMLCommand:()=>s$,AssumeRoleResponseFilterSensitiveLog:()=>JC,AssumeRoleCommand:()=>AF,$Command:()=>l});var hB=M(()=>{r3();ZR();XR();WR();NR();g$()});var UB,OR=(D,{profile:F="default",logger:E}={})=>{return Boolean(D)&&typeof D==="object"&&typeof D.role_arn==="string"&&["undefined","string"].indexOf(typeof D.role_session_name)>-1&&["undefined","string"].indexOf(typeof D.external_id)>-1&&["undefined","string"].indexOf(typeof D.mfa_serial)>-1&&(DDD(D,{profile:F,logger:E})||FDD(D,{profile:F,logger:E}))},DDD=(D,{profile:F,logger:E})=>{const w=typeof D.source_profile==="string"&&typeof D.credential_source==="undefined";if(w)E?.debug?.(` ${F} isAssumeRoleWithSourceProfile source_profile=${D.source_profile}`);return w},FDD=(D,{profile:F,logger:E})=>{const w=typeof D.credential_source==="string"&&typeof D.source_profile==="undefined";if(w)E?.debug?.(` ${F} isCredentialSourceProfile credential_source=${D.credential_source}`);return w},jR=async(D,F,E,w={})=>{E.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const $=F[D];if(!E.roleAssumer){const{getDefaultRoleAssumer:B}=await Promise.resolve().then(() => (hB(),BB));E.roleAssumer=B({...E.clientConfig,credentialProviderLogger:E.logger,parentClientConfig:E?.parentClientConfig},E.clientPlugins)}const{source_profile:C}=$;if(C&&C in w)throw new x(`Detected a cycle attempting to resolve credentials for profile ${i0(E)}. Profiles visited: `+Object.keys(w).join(", "),{logger:E.logger});E.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${C?`source_profile=[${C}]`:`profile=[${D}]`}`);const f=C?p$(C,F,E,{...w,[C]:!0},qR(F[C]??{})):(await $L($.credential_source,D,E.logger)(E))();if(qR($))return f.then((B)=>UB.setCredentialFeature(B,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{const B={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:h}=$;if(h){if(!E.mfaCodeProvider)throw new x(`Profile ${D} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:E.logger,tryNextLink:!1});B.SerialNumber=h,B.TokenCode=await E.mfaCodeProvider(h)}const U=await f;return E.roleAssumer(U,B).then((I)=>UB.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},qR=(D)=>{return!D.role_arn&&!!D.credential_source};var PR=M(()=>{UB=Q(C0(),1);$D();X2();fL();AB()});var yR,kR=(D,F,E)=>{if(F.Version!==1)throw Error(`Profile ${D} credential_process did not return Version 1.`);if(F.AccessKeyId===void 0||F.SecretAccessKey===void 0)throw Error(`Profile ${D} credential_process returned invalid credentials.`);if(F.Expiration){const C=new Date;if(new Date(F.Expiration)<C)throw Error(`Profile ${D} credential_process returned expired credentials.`)}let w=F.AccountId;if(!w&&E?.[D]?.aws_account_id)w=E[D].aws_account_id;const $={accessKeyId:F.AccessKeyId,secretAccessKey:F.SecretAccessKey,...F.SessionToken&&{sessionToken:F.SessionToken},...F.Expiration&&{expiration:new Date(F.Expiration)},...F.CredentialScope&&{credentialScope:F.CredentialScope},...w&&{accountId:w}};return yR.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var bR=M(()=>{yR=Q(C0(),1)});import{exec as EDD}from"child_process";import{promisify as wDD}from"util";var xR=async(D,F,E)=>{const w=F[D];if(F[D]){const $=w.credential_process;if($!==void 0){const C=wDD(EDD);try{const{stdout:f}=await C($);let B;try{B=JSON.parse(f.trim())}catch{throw Error(`Profile ${D} credential_process returned invalid JSON.`)}return kR(D,B,F)}catch(f){throw new x(f.message,{logger:E})}}else throw new x(`Profile ${D} did not contain credential_process.`,{logger:E})}else throw new x(`Profile ${D} could not be found in shared credentials file.`,{logger:E})};var cR=M(()=>{$D();bR()});var $DD=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const F=await G8(D);return xR(i0(D),F,D.logger)};var gR=M(()=>{X2();cR()});var IB={};r0(IB,{fromProcess:()=>$DD});var GB=M(()=>{gR()});var rR,_R=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.credential_process==="string",sR=async(D,F)=>Promise.resolve().then(() => (GB(),IB)).then(({fromProcess:E})=>E({...D,profile:F})().then((w)=>rR.setCredentialFeature(w,"CREDENTIALS_PROFILE_PROCESS","v")));var uR=M(()=>{rR=Q(C0(),1)});var MB,dR=async(D,F,E={})=>{const{fromSSO:w}=await Promise.resolve().then(() => (YC(),MC));return w({profile:D,logger:E.logger})().then(($)=>{if(F.sso_session)return MB.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return MB.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},vR=(D)=>D&&(typeof D.sso_start_url==="string"||typeof D.sso_account_id==="string"||typeof D.sso_session==="string"||typeof D.sso_region==="string"||typeof D.sso_role_name==="string");var mR=M(()=>{MB=Q(C0(),1)});var nR,YB=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.aws_access_key_id==="string"&&typeof D.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof D.aws_session_token)>-1&&["undefined","string"].indexOf(typeof D.aws_account_id)>-1,ZB=async(D,F)=>{F?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const E={accessKeyId:D.aws_access_key_id,secretAccessKey:D.aws_secret_access_key,sessionToken:D.aws_session_token,...D.aws_credential_scope&&{credentialScope:D.aws_credential_scope},...D.aws_account_id&&{accountId:D.aws_account_id}};return nR.setCredentialFeature(E,"CREDENTIALS_PROFILE","n")};var lR=M(()=>{nR=Q(C0(),1)});var XB=(D)=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:F,roleSessionName:E,webIdentityToken:w,providerId:$,policyArns:C,policy:f,durationSeconds:B}=D;let{roleAssumerWithWebIdentity:h}=D;if(!h){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (hB(),BB));h=U({...D.clientConfig,credentialProviderLogger:D.logger,parentClientConfig:D.parentClientConfig},D.clientPlugins)}return h({RoleArn:F,RoleSessionName:E??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:w,ProviderId:$,PolicyArns:C,Policy:f,DurationSeconds:B})};import{readFileSync as fDD}from"fs";var pR,iR="AWS_WEB_IDENTITY_TOKEN_FILE",CDD="AWS_ROLE_ARN",BDD="AWS_ROLE_SESSION_NAME",hDD=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const F=D?.webIdentityTokenFile??process.env[iR],E=D?.roleArn??process.env[CDD],w=D?.roleSessionName??process.env[BDD];if(!F||!E)throw new x("Web identity configuration not specified",{logger:D.logger});const $=await XB({...D,webIdentityToken:fDD(F,{encoding:"ascii"}),roleArn:E,roleSessionName:w})();if(F===process.env[iR])pR.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var aR=M(()=>{pR=Q(C0(),1);$D()});var WB={};r0(WB,{fromWebToken:()=>XB,fromTokenFile:()=>hDD});var JB=M(()=>{aR()});var oR,tR=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.web_identity_token_file==="string"&&typeof D.role_arn==="string"&&["undefined","string"].indexOf(typeof D.role_session_name)>-1,eR=async(D,F)=>Promise.resolve().then(() => (JB(),WB)).then(({fromTokenFile:E})=>E({webIdentityTokenFile:D.web_identity_token_file,roleArn:D.role_arn,roleSessionName:D.role_session_name,roleAssumerWithWebIdentity:F.roleAssumerWithWebIdentity,logger:F.logger,parentClientConfig:F.parentClientConfig})().then((w)=>oR.setCredentialFeature(w,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var DV=M(()=>{oR=Q(C0(),1)});var p$=async(D,F,E,w={},$=!1)=>{const C=F[D];if(Object.keys(w).length>0&&YB(C))return ZB(C,E);if($||OR(C,{profile:D,logger:E.logger}))return jR(D,F,E,w);if(YB(C))return ZB(C,E);if(tR(C))return eR(C,E);if(_R(C))return sR(E,D);if(vR(C))return await dR(D,C,E);throw new x(`Could not resolve credentials using profile: [${D}] in configuration/credentials file(s).`,{logger:E.logger})};var AB=M(()=>{$D();PR();uR();mR();lR();DV()});var UDD=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const F=await G8(D);return p$(i0(D),F,D)};var FV=M(()=>{X2();AB()});var EV={};r0(EV,{fromIni:()=>UDD});var wV=M(()=>{FV()});var $V=!1,T2=(D={})=>t8(N1(async()=>{if(D.profile??process.env[Gz]){if(process.env[h$]&&process.env[U$]){if(!$V)(D.logger?.warn&&D.logger?.constructor?.name!=="NoOpLogger"?D.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
24
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:F})};var wS=G(()=>{fD()});function $S(D){return new rD({protocol:D.protocol,hostname:D.hostname,port:Number(D.port),path:D.pathname,query:Array.from(D.searchParams.entries()).reduce((F,[E,w])=>{return F[E]=w,F},{}),fragment:D.hash})}async function fS(D,F){const w=await tT(D.body).transformToString();if(D.statusCode===200){const $=JSON.parse(w);if(typeof $.AccessKeyId!=="string"||typeof $.SecretAccessKey!=="string"||typeof $.Token!=="string"||typeof $.Expiration!=="string")throw new x("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:F});return{accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.Token,expiration:MK($.Expiration)}}if(D.statusCode>=400&&D.statusCode<500){let $={};try{$=JSON.parse(w)}catch(C){}throw Object.assign(new x(`Server responded with status: ${D.statusCode}`,{logger:F}),{Code:$.Code,Message:$.Message})}throw new x(`Server responded with status: ${D.statusCode}`,{logger:F})}var CS=G(()=>{fD();vD();y();W5()});var BS=(D,F,E)=>{return async()=>{for(let w=0;w<F;++w)try{return await D()}catch($){await new Promise((C)=>setTimeout(C,E))}return await D()}};import jo from"fs/promises";var hS,Po="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",yo="http://169.254.170.2",ko="AWS_CONTAINER_CREDENTIALS_FULL_URI",bo="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",xo="AWS_CONTAINER_AUTHORIZATION_TOKEN",US=(D={})=>{D.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let F;const E=D.awsContainerCredentialsRelativeUri??process.env[Po],w=D.awsContainerCredentialsFullUri??process.env[ko],$=D.awsContainerAuthorizationToken??process.env[xo],C=D.awsContainerAuthorizationTokenFile??process.env[bo],f=D.logger?.constructor?.name==="NoOpLogger"||!D.logger?console.warn:D.logger.warn;if(E&&w)f("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),f("awsContainerCredentialsFullUri will take precedence.");if($&&C)f("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),f("awsContainerAuthorizationToken will take precedence.");if(w)F=w;else if(E)F=`${yo}${E}`;else throw new x(`No HTTP credential provider host provided.
25
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:D.logger});const B=new URL(F);ES(B,D.logger);const h=new U0({requestTimeout:D.timeout??1000,connectionTimeout:D.timeout??1000});return BS(async()=>{const U=$S(B);if($)U.headers.Authorization=$;else if(C)U.headers.Authorization=(await jo.readFile(C)).toString();try{const I=await h.handle(U);return fS(I.response).then((A)=>hS.setCredentialFeature(A,"CREDENTIALS_HTTP","z"))}catch(I){throw new x(String(I),{logger:D.logger})}},D.maxRetries??3,D.timeout??1000)};var AS=G(()=>{hS=L(B0(),1);Z8();fD();wS();CS()});var k5={};_0(k5,{fromHttp:()=>US});var b5=G(()=>{AS()});var co="AWS_EC2_METADATA_DISABLED",IS=async(D)=>{const{ENV_CMDS_FULL_URI:F,ENV_CMDS_RELATIVE_URI:E,fromContainerMetadata:w,fromInstanceMetadata:$}=await Promise.resolve().then(() => (X3(),W3));if(process.env[E]||process.env[F]){D.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:C}=await Promise.resolve().then(() => (b5(),k5));return N1(C(D),w(D))}if(process.env[co])return async()=>{throw new x("EC2 Instance Metadata Service access disabled",{logger:D.logger})};return D.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),$(D)};var MS=G(()=>{fD()});var x5=(D)=>D&&(typeof D.sso_start_url==="string"||typeof D.sso_account_id==="string"||typeof D.sso_session==="string"||typeof D.sso_region==="string"||typeof D.sso_role_name==="string");var GS=300000,m6="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function go(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}function c5(D){return{schemeId:"smithy.api#noAuth"}}var YS,ZS=async(D,F,E)=>{return{operation:m0(F).operation,region:await sD(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},WS=(D)=>{const F=[];switch(D.operation){case"CreateToken":{F.push(c5(D));break}case"RegisterClient":{F.push(c5(D));break}case"StartDeviceAuthorization":{F.push(c5(D));break}default:F.push(go(D))}return F},XS=(D)=>{return{...YS.resolveAwsSdkSigV4Config(D)}};var g5=G(()=>{YS=L(PD(),1);W2()});var JS=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},z8;var n6=G(()=>{z8={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var TS;var zS=G(()=>{TS={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.668.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var r5;var _5=G(()=>{r5={isCrtAvailable:!1}});var KS=()=>{if(r5.isCrtAvailable)return["md/crt-avail"];return null};var SS=G(()=>{_5()});import{platform as _o,release as so}from"os";import{env as QS,versions as uo}from"process";var vo=({serviceId:D,clientVersion:F})=>{return async(E)=>{const w=[["aws-sdk-js",F],["ua","2.1"],[`os/${_o()}`,so()],["lang/js"],["md/nodejs",`${uo.node}`]],$=KS();if($)w.push($);if(D)w.push([`api/${D}`,F]);if(QS.AWS_EXECUTION_ENV)w.push([`exec-env/${QS.AWS_EXECUTION_ENV}`]);const C=await E?.userAgentAppId?.();return C?[...w,[`app/${C}`]]:[...w]}},$1;var HS=G(()=>{SS();_5();$1=vo});var mo="AWS_SDK_UA_APP_ID",no="sdk-ua-app-id",f1;var LS=G(()=>{t8();f1={environmentVariableSelector:(D)=>D[mo],configFileSelector:(D)=>D[no],default:F9}});var l6=G(()=>{HS();LS()});import{Buffer as lo}from"buffer";import{createHash as io,createHmac as po}from"crypto";function RS(D,F){if(lo.isBuffer(D))return D;if(typeof D==="string")return u6(D,F);if(ArrayBuffer.isView(D))return q1(D.buffer,D.byteOffset,D.byteLength);return q1(D)}class T2{constructor(D,F){this.algorithmIdentifier=D,this.secret=F,this.reset()}update(D,F){this.hash.update(JT(RS(D,F)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?po(this.algorithmIdentifier,RS(this.secret)):io(this.algorithmIdentifier)}}var i6=G(()=>{w6();o2()});import{fstatSync as ao,lstatSync as oo}from"fs";var C1=(D)=>{if(!D)return 0;if(typeof D==="string")return Buffer.byteLength(D);else if(typeof D.byteLength==="number")return D.byteLength;else if(typeof D.size==="number")return D.size;else if(typeof D.start==="number"&&typeof D.end==="number")return D.end+1-D.start;else if(typeof D.path==="string"||Buffer.isBuffer(D.path))return oo(D.path).size;else if(typeof D.fd==="number")return ao(D.fd).size;throw new Error(`Body Length computation failed for ${D}`)};var VS=()=>{};var p6=G(()=>{VS()});var NS,qS,OS,xS,cS,F2,jS,gS,PS,yS,kS,bS,to,rS;var _S=G(()=>{NS={["required"]:!1,type:"String"},qS={["required"]:!0,default:!1,type:"Boolean"},OS={["ref"]:"Endpoint"},xS={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},cS={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},F2={},jS={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},gS={["ref"]:"PartitionResult"},PS={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[gS,"supportsDualStack"]}]},yS=[xS],kS=[cS],bS=[{["ref"]:"Region"}],to={version:"1.0",parameters:{Region:NS,UseDualStack:qS,UseFIPS:qS,Endpoint:NS},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[OS]}],rules:[{conditions:yS,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:kS,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:OS,properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:bS}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:bS,assign:"PartitionResult"}],rules:[{conditions:[xS,cS],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,jS]},PS],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:yS,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[jS,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[gS,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:F2,headers:F2},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:kS,rules:[{conditions:[PS],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:F2,headers:F2},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},rS=to});var eo,sS=(D,F={})=>{return eo.get(D,()=>G2(rS,{endpointParams:D,logger:F.logger}))};var uS=G(()=>{p8();Y2();_S();eo=new M2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});C0.aws=Z2});var dS,vS,mS=(D)=>{return{apiVersion:"2019-06-10",base64Decoder:D?.base64Decoder??T0,base64Encoder:D?.base64Encoder??S0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??sS,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??WS,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new dS.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(F)=>F.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new vS.NoAuthSigner}],logger:D?.logger??new y0,serviceId:D?.serviceId??"SSO OIDC",urlParser:D?.urlParser??D0,utf8Decoder:D?.utf8Decoder??F0,utf8Encoder:D?.utf8Encoder??K0}};var nS=G(()=>{dS=L(PD(),1),vS=L(_D(),1);y();G8();O1();o2();g5();uS()});var lS="AWS_EXECUTION_ENV",s5="AWS_REGION",u5="AWS_DEFAULT_REGION",iS="AWS_EC2_METADATA_DISABLED",pS,aS="/latest/meta-data/placement/region";var oS=G(()=>{pS=["in-region","cross-region","mobile","standard","legacy"]});var tS;var eS=G(()=>{tS={environmentVariableSelector:(D)=>{return D.AWS_DEFAULTS_MODE},configFileSelector:(D)=>{return D.defaults_mode},default:"legacy"}});var B1=({region:D=i(n0),defaultsMode:F=i(tS)}={})=>e8(async()=>{const E=typeof F==="function"?await F():F;switch(E?.toLowerCase()){case"auto":return Dt(D);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(E?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${pS.join(", ")}, got ${E}`)}}),Dt=async(D)=>{if(D){const F=typeof D==="function"?await D():D,E=await Ft();if(!E)return"standard";if(F===E)return"in-region";else return"cross-region"}return"standard"},Ft=async()=>{if(process.env[lS]&&(process.env[s5]||process.env[u5]))return process.env[s5]??process.env[u5];if(!process.env[iS])try{const{getInstanceMetadataEndpoint:D,httpRequest:F}=await Promise.resolve().then(() => (X3(),W3)),E=await D();return(await F({...E,path:aS})).toString()}catch(D){}};var DQ=G(()=>{l0();m2();fD();oS();eS()});var a6=G(()=>{DQ()});var FQ,EQ=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=mS(D);return FQ.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??K2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:TS.version}),maxAttempts:D?.maxAttempts??i(i2),region:D?.region??i(n0,u2),requestHandler:U0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...a2,default:async()=>(await E()).retryMode||t0}),sha256:D?.sha256??T2.bind(null,"sha256"),streamCollector:D?.streamCollector??e0,useDualstackEndpoint:D?.useDualstackEndpoint??i(_2),useFipsEndpoint:D?.useFipsEndpoint??i(s2),userAgentAppId:D?.userAgentAppId??i(f1)}};var wQ=G(()=>{zS();FQ=L(PD(),1);o6();l6();l0();i6();z2();m2();Z8();p6();j0();nS();y();a6();y()});var h1=(D)=>{let F=async()=>{if(D.region===void 0)throw new Error("Region is missing from runtimeConfig");const E=D.region;if(typeof E==="string")return E;return E()};return{setRegion(E){F=E},region(){return F}}},U1=(D)=>{return{region:D.region()}};var $Q=()=>{};var fQ=()=>{};var CQ=G(()=>{fQ()});var BQ=G(()=>{$Q();CQ()});var t6=G(()=>{BQ()});var hQ=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},UQ=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var z$=(D)=>D,AQ=(D,F)=>{const E={...z$(h1(D)),...z$(F1(D)),...z$(j2(D)),...z$(hQ(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...P2(E),...UQ(E)}};var IQ=G(()=>{t6();vD();y()});var e6,T$;var d5=G(()=>{z6();T6();K6();t8();l0();e6=L(_D(),1);x6();AD();z2();y();g5();n6();wQ();IQ();T$=class T$ extends P0{constructor(...[D]){const F=EQ(D||{}),E=JS(F),w=g2(E),$=p2(w),C=d2($),f=y2(C),B=n2(f),h=XS(B),U=AQ(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(r2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(v2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(x2(this.config)),this.middlewareStack.use(e6.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ZS,identityProviderConfigProvider:async(I)=>new e6.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(e6.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var bD;var K$=G(()=>{y();bD=class bD extends D2{constructor(D){super(D);Object.setPrototypeOf(this,bD.prototype)}}});var J3,z3,T3,K3,S3,Q3,H3,L3,R3,V3,N3,q3,O3,j3,v5=(D)=>({...D,...D.clientSecret&&{clientSecret:wD},...D.refreshToken&&{refreshToken:wD},...D.codeVerifier&&{codeVerifier:wD}}),m5=(D)=>({...D,...D.accessToken&&{accessToken:wD},...D.refreshToken&&{refreshToken:wD},...D.idToken&&{idToken:wD}}),n5=(D)=>({...D,...D.refreshToken&&{refreshToken:wD},...D.assertion&&{assertion:wD},...D.subjectToken&&{subjectToken:wD},...D.codeVerifier&&{codeVerifier:wD}}),l5=(D)=>({...D,...D.accessToken&&{accessToken:wD},...D.refreshToken&&{refreshToken:wD},...D.idToken&&{idToken:wD}}),i5=(D)=>({...D,...D.clientSecret&&{clientSecret:wD}}),p5=(D)=>({...D,...D.clientSecret&&{clientSecret:wD}});var B6=G(()=>{y();K$();J3=class J3 extends bD{constructor(D){super({name:"AccessDeniedException",$fault:"client",...D});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,J3.prototype),this.error=D.error,this.error_description=D.error_description}};z3=class z3 extends bD{constructor(D){super({name:"AuthorizationPendingException",$fault:"client",...D});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z3.prototype),this.error=D.error,this.error_description=D.error_description}};T3=class T3 extends bD{constructor(D){super({name:"ExpiredTokenException",$fault:"client",...D});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,T3.prototype),this.error=D.error,this.error_description=D.error_description}};K3=class K3 extends bD{constructor(D){super({name:"InternalServerException",$fault:"server",...D});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,K3.prototype),this.error=D.error,this.error_description=D.error_description}};S3=class S3 extends bD{constructor(D){super({name:"InvalidClientException",$fault:"client",...D});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,S3.prototype),this.error=D.error,this.error_description=D.error_description}};Q3=class Q3 extends bD{constructor(D){super({name:"InvalidGrantException",$fault:"client",...D});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,Q3.prototype),this.error=D.error,this.error_description=D.error_description}};H3=class H3 extends bD{constructor(D){super({name:"InvalidRequestException",$fault:"client",...D});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,H3.prototype),this.error=D.error,this.error_description=D.error_description}};L3=class L3 extends bD{constructor(D){super({name:"InvalidScopeException",$fault:"client",...D});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,L3.prototype),this.error=D.error,this.error_description=D.error_description}};R3=class R3 extends bD{constructor(D){super({name:"SlowDownException",$fault:"client",...D});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,R3.prototype),this.error=D.error,this.error_description=D.error_description}};V3=class V3 extends bD{constructor(D){super({name:"UnauthorizedClientException",$fault:"client",...D});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,V3.prototype),this.error=D.error,this.error_description=D.error_description}};N3=class N3 extends bD{constructor(D){super({name:"UnsupportedGrantTypeException",$fault:"client",...D});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,N3.prototype),this.error=D.error,this.error_description=D.error_description}};q3=class q3 extends bD{constructor(D){super({name:"InvalidRequestRegionException",$fault:"client",...D});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,q3.prototype),this.error=D.error,this.error_description=D.error_description,this.endpoint=D.endpoint,this.region=D.region}};O3=class O3 extends bD{constructor(D){super({name:"InvalidClientMetadataException",$fault:"client",...D});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,O3.prototype),this.error=D.error,this.error_description=D.error_description}};j3=class j3 extends bD{constructor(D){super({name:"InvalidRedirectUriException",$fault:"client",...D});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,j3.prototype),this.error=D.error,this.error_description=D.error_description}}});var P1,P3,MQ=async(D,F)=>{const E=P3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/token");let $;return $=JSON.stringify(c(D,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(C)=>BD(C)})),E.m("POST").h(w).b($),E.build()},GQ=async(D,F)=>{const E=P3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/token");const $=k({[Jt]:[,"t"]});let C;return C=JSON.stringify(c(D,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(f)=>BD(f),subjectToken:[],subjectTokenType:[]})),E.m("POST").h(w).q($).b(C),E.build()},YQ=async(D,F)=>{const E=P3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/client/register");let $;return $=JSON.stringify(c(D,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(C)=>BD(C),issuerUrl:[],redirectUris:(C)=>BD(C),scopes:(C)=>BD(C)})),E.m("POST").h(w).b($),E.build()},ZQ=async(D,F)=>{const E=P3.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/device_authorization");let $;return $=JSON.stringify(c(D,{clientId:[],clientSecret:[],startUrl:[]})),E.m("POST").h(w).b($),E.build()},WQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return S$(D,F);const E=k({$metadata:nD(D)}),w=yD(Q0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{accessToken:S,expiresIn:J2,idToken:S,refreshToken:S,tokenType:S});return Object.assign(E,$),E},XQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return S$(D,F);const E=k({$metadata:nD(D)}),w=yD(Q0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{accessToken:S,expiresIn:J2,idToken:S,issuedTokenType:S,refreshToken:S,scope:BD,tokenType:S});return Object.assign(E,$),E},JQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return S$(D,F);const E=k({$metadata:nD(D)}),w=yD(Q0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{authorizationEndpoint:S,clientId:S,clientIdIssuedAt:C$,clientSecret:S,clientSecretExpiresAt:C$,tokenEndpoint:S});return Object.assign(E,$),E},zQ=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return S$(D,F);const E=k({$metadata:nD(D)}),w=yD(Q0(await P1.parseJsonBody(D.body,F)),"body"),$=c(w,{deviceCode:S,expiresIn:J2,interval:J2,userCode:S,verificationUri:S,verificationUriComplete:S});return Object.assign(E,$),E},S$=async(D,F)=>{const E={...D,body:await P1.parseJsonErrorBody(D.body,F)},w=P1.loadRestJsonErrorCode(D,E.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await $t(E,F);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await ft(E,F);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Ct(E,F);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Bt(E,F);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await ht(E,F);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await At(E,F);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await Mt(E,F);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await Yt(E,F);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Zt(E,F);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await Wt(E,F);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Xt(E,F);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Gt(E,F);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Ut(E,F);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await It(E,F);default:const $=E.body;return wt({output:D,parsedBody:$,errorCode:w})}},wt,$t=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new J3({$metadata:nD(D),...E});return u(C,D.body)},ft=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new z3({$metadata:nD(D),...E});return u(C,D.body)},Ct=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new T3({$metadata:nD(D),...E});return u(C,D.body)},Bt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new K3({$metadata:nD(D),...E});return u(C,D.body)},ht=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new S3({$metadata:nD(D),...E});return u(C,D.body)},Ut=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new O3({$metadata:nD(D),...E});return u(C,D.body)},At=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new Q3({$metadata:nD(D),...E});return u(C,D.body)},It=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new j3({$metadata:nD(D),...E});return u(C,D.body)},Mt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new H3({$metadata:nD(D),...E});return u(C,D.body)},Gt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{endpoint:S,error:S,error_description:S,region:S});Object.assign(E,$);const C=new q3({$metadata:nD(D),...E});return u(C,D.body)},Yt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new L3({$metadata:nD(D),...E});return u(C,D.body)},Zt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new R3({$metadata:nD(D),...E});return u(C,D.body)},Wt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new V3({$metadata:nD(D),...E});return u(C,D.body)},Xt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{error:S,error_description:S});Object.assign(E,$);const C=new N3({$metadata:nD(D),...E});return u(C,D.body)},nD=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),Jt="aws_iam";var y3=G(()=>{P1=L(PD(),1),P3=L(_D(),1);y();B6();K$();wt=t2(bD)});var Q$;var a5=G(()=>{AD();LD();y();n6();B6();y3();Q$=class Q$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(v5,m5).ser(MQ).de(WQ).build(){}});var H$;var o5=G(()=>{AD();LD();y();n6();B6();y3();H$=class H$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(n5,l5).ser(GQ).de(XQ).build(){}});var L$;var t5=G(()=>{AD();LD();y();n6();B6();y3();L$=class L$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,i5).ser(YQ).de(JQ).build(){}});var R$;var e5=G(()=>{AD();LD();y();n6();B6();y3();R$=class R$ extends l.classBuilder().ep(z8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(p5,void 0).ser(ZQ).de(zQ).build(){}});var zt,DC;var TQ=G(()=>{y();a5();o5();t5();e5();d5();zt={CreateTokenCommand:Q$,CreateTokenWithIAMCommand:H$,RegisterClientCommand:L$,StartDeviceAuthorizationCommand:R$};DC=class DC extends T${};d6(zt,DC)});var KQ=G(()=>{a5();o5();t5();e5()});var SQ=G(()=>{B6()});var FC={};_0(FC,{__Client:()=>P0,UnsupportedGrantTypeException:()=>N3,UnauthorizedClientException:()=>V3,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>p5,StartDeviceAuthorizationCommand:()=>R$,SlowDownException:()=>R3,SSOOIDCServiceException:()=>bD,SSOOIDCClient:()=>T$,SSOOIDC:()=>DC,RegisterClientResponseFilterSensitiveLog:()=>i5,RegisterClientCommand:()=>L$,InvalidScopeException:()=>L3,InvalidRequestRegionException:()=>q3,InvalidRequestException:()=>H3,InvalidRedirectUriException:()=>j3,InvalidGrantException:()=>Q3,InvalidClientMetadataException:()=>O3,InvalidClientException:()=>S3,InternalServerException:()=>K3,ExpiredTokenException:()=>T3,CreateTokenWithIAMResponseFilterSensitiveLog:()=>l5,CreateTokenWithIAMRequestFilterSensitiveLog:()=>n5,CreateTokenWithIAMCommand:()=>H$,CreateTokenResponseFilterSensitiveLog:()=>m5,CreateTokenRequestFilterSensitiveLog:()=>v5,CreateTokenCommand:()=>Q$,AuthorizationPendingException:()=>z3,AccessDeniedException:()=>J3,$Command:()=>l});var EC=G(()=>{d5();TQ();KQ();SQ();K$()});var wC,QQ=async(D)=>{const{SSOOIDCClient:F}=await Promise.resolve().then(() => (EC(),FC));if(wC[D])return wC[D];const E=new F({region:D});return wC[D]=E,E};var HQ=G(()=>{wC={}});var LQ=async(D,F)=>{const{CreateTokenCommand:E}=await Promise.resolve().then(() => (EC(),FC));return(await QQ(F)).send(new E({clientId:D.clientId,clientSecret:D.clientSecret,refreshToken:D.refreshToken,grantType:"refresh_token"}))};var RQ=G(()=>{HQ()});var $C=(D)=>{if(D.expiration&&D.expiration.getTime()<Date.now())throw new z0(`Token is expired. ${m6}`,!1)};var VQ=G(()=>{fD()});var T8=(D,F,E=!1)=>{if(typeof F==="undefined")throw new z0(`Value not present for '${D}' in SSO Token${E?". Cannot refresh":""}. ${m6}`,!1)};var NQ=G(()=>{fD()});import{promises as Tt}from"fs";var Kt,qQ=(D,F)=>{const E=uw(D),w=JSON.stringify(F,null,2);return Kt(E,w)};var OQ=G(()=>{X2();({writeFile:Kt}=Tt)});var jQ,PQ=(D={})=>async()=>{D.logger?.debug("@aws-sdk/token-providers - fromSso");const F=await M8(D),E=p0(D),w=F[E];if(!w)throw new z0(`Profile '${E}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new z0(`Profile '${E}' is missing required property 'sso_session'.`);const $=w.sso_session,f=(await nw(D))[$];if(!f)throw new z0(`Sso session '${$}' could not be found in shared credentials file.`,!1);for(let M of["sso_start_url","sso_region"])if(!f[M])throw new z0(`Sso session '${$}' is missing required property '${M}'.`,!1);const{sso_start_url:B,sso_region:h}=f;let U;try{U=await dw($)}catch(M){throw new z0(`The SSO session token associated with profile=${E} was not found or is invalid. ${m6}`,!1)}T8("accessToken",U.accessToken),T8("expiresAt",U.expiresAt);const{accessToken:I,expiresAt:A}=U,Y={token:I,expiration:new Date(A)};if(Y.expiration.getTime()-Date.now()>GS)return Y;if(Date.now()-jQ.getTime()<30000)return $C(Y),Y;T8("clientId",U.clientId,!0),T8("clientSecret",U.clientSecret,!0),T8("refreshToken",U.refreshToken,!0);try{jQ.setTime(Date.now());const M=await LQ(U,h);T8("accessToken",M.accessToken),T8("expiresIn",M.expiresIn);const Z=new Date(Date.now()+M.expiresIn*1000);try{await qQ($,{...U,accessToken:M.accessToken,expiresAt:Z.toISOString(),refreshToken:M.refreshToken})}catch(z){}return{token:M.accessToken,expiration:Z}}catch(M){return $C(Y),Y}};var yQ=G(()=>{fD();X2();RQ();VQ();NQ();OQ();jQ=new Date(0)});var kQ=G(()=>{fD()});var bQ=G(()=>{fD()});var xQ=G(()=>{yQ();kQ();bQ()});function St(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}function V$(D){return{schemeId:"smithy.api#noAuth"}}var cQ,gQ=async(D,F,E)=>{return{operation:m0(F).operation,region:await sD(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},rQ=(D)=>{const F=[];switch(D.operation){case"GetRoleCredentials":{F.push(V$(D));break}case"ListAccountRoles":{F.push(V$(D));break}case"ListAccounts":{F.push(V$(D));break}case"Logout":{F.push(V$(D));break}default:F.push(St(D))}return F},_Q=(D)=>{return{...cQ.resolveAwsSdkSigV4Config(D)}};var fC=G(()=>{cQ=L(PD(),1);W2()});var sQ=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},K8;var DF=G(()=>{K8={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var dQ;var uQ=G(()=>{dQ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var vQ,mQ,nQ,tQ,eQ,E2,lQ,DH,iQ,pQ,aQ,oQ,Ht,FH;var EH=G(()=>{vQ={["required"]:!1,type:"String"},mQ={["required"]:!0,default:!1,type:"Boolean"},nQ={["ref"]:"Endpoint"},tQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},eQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},E2={},lQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},DH={["ref"]:"PartitionResult"},iQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[DH,"supportsDualStack"]}]},pQ=[tQ],aQ=[eQ],oQ=[{["ref"]:"Region"}],Ht={version:"1.0",parameters:{Region:vQ,UseDualStack:mQ,UseFIPS:mQ,Endpoint:vQ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[nQ]}],rules:[{conditions:pQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:aQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:nQ,properties:E2,headers:E2},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:oQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:oQ,assign:"PartitionResult"}],rules:[{conditions:[tQ,eQ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,lQ]},iQ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:E2,headers:E2},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:pQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[lQ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[DH,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:E2,headers:E2},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:E2,headers:E2},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:aQ,rules:[{conditions:[iQ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:E2,headers:E2},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:E2,headers:E2},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},FH=Ht});var Lt,wH=(D,F={})=>{return Lt.get(D,()=>G2(FH,{endpointParams:D,logger:F.logger}))};var $H=G(()=>{p8();Y2();EH();Lt=new M2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});C0.aws=Z2});var fH,CH,BH=(D)=>{return{apiVersion:"2019-06-10",base64Decoder:D?.base64Decoder??T0,base64Encoder:D?.base64Encoder??S0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??wH,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??rQ,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new fH.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(F)=>F.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new CH.NoAuthSigner}],logger:D?.logger??new y0,serviceId:D?.serviceId??"SSO",urlParser:D?.urlParser??D0,utf8Decoder:D?.utf8Decoder??F0,utf8Encoder:D?.utf8Encoder??K0}};var hH=G(()=>{fH=L(PD(),1),CH=L(_D(),1);y();G8();O1();o2();fC();$H()});var UH,AH=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=BH(D);return UH.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:dQ.version}),maxAttempts:D?.maxAttempts??i(i2),region:D?.region??i(n0,u2),requestHandler:U0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...a2,default:async()=>(await E()).retryMode||t0}),sha256:D?.sha256??T2.bind(null,"sha256"),streamCollector:D?.streamCollector??e0,useDualstackEndpoint:D?.useDualstackEndpoint??i(_2),useFipsEndpoint:D?.useFipsEndpoint??i(s2),userAgentAppId:D?.userAgentAppId??i(f1)}};var IH=G(()=>{uQ();UH=L(PD(),1);l6();l0();i6();z2();m2();Z8();p6();j0();hH();y();a6();y()});var MH=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},GH=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var N$=(D)=>D,YH=(D,F)=>{const E={...N$(h1(D)),...N$(F1(D)),...N$(j2(D)),...N$(MH(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...P2(E),...GH(E)}};var ZH=G(()=>{t6();vD();y()});var FF,y1;var k3=G(()=>{z6();T6();K6();t8();l0();FF=L(_D(),1);x6();AD();z2();y();fC();DF();IH();ZH();y1=class y1 extends P0{constructor(...[D]){const F=AH(D||{}),E=sQ(F),w=g2(E),$=p2(w),C=d2($),f=y2(C),B=n2(f),h=_Q(B),U=YH(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(r2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(v2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(x2(this.config)),this.middlewareStack.use(FF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:gQ,identityProviderConfigProvider:async(I)=>new FF.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(FF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var k1;var CC=G(()=>{y();k1=class k1 extends D2{constructor(D){super(D);Object.setPrototypeOf(this,k1.prototype)}}});var q$,O$,j$,P$,WH=(D)=>({...D,...D.accessToken&&{accessToken:wD}}),Rt=(D)=>({...D,...D.secretAccessKey&&{secretAccessKey:wD},...D.sessionToken&&{sessionToken:wD}}),XH=(D)=>({...D,...D.roleCredentials&&{roleCredentials:Rt(D.roleCredentials)}}),JH=(D)=>({...D,...D.accessToken&&{accessToken:wD}}),zH=(D)=>({...D,...D.accessToken&&{accessToken:wD}}),TH=(D)=>({...D,...D.accessToken&&{accessToken:wD}});var h6=G(()=>{y();CC();q$=class q$ extends k1{constructor(D){super({name:"InvalidRequestException",$fault:"client",...D});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,q$.prototype)}};O$=class O$ extends k1{constructor(D){super({name:"ResourceNotFoundException",$fault:"client",...D});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,O$.prototype)}};j$=class j$ extends k1{constructor(D){super({name:"TooManyRequestsException",$fault:"client",...D});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,j$.prototype)}};P$=class P$ extends k1{constructor(D){super({name:"UnauthorizedException",$fault:"client",...D});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,P$.prototype)}}});var S8,b3,KH=async(D,F)=>{const E=b3.requestBuilder(D,F),w=k({},W8,{[b$]:D[k$]});E.bp("/federation/credentials");const $=k({[yt]:[,yD(D[Pt],"roleName")],[OH]:[,yD(D[qH],"accountId")]});let C;return E.m("GET").h(w).q($).b(C),E.build()},SH=async(D,F)=>{const E=b3.requestBuilder(D,F),w=k({},W8,{[b$]:D[k$]});E.bp("/assignment/roles");const $=k({[kH]:[,D[yH]],[PH]:[()=>D.maxResults!==void 0,()=>D[jH].toString()],[OH]:[,yD(D[qH],"accountId")]});let C;return E.m("GET").h(w).q($).b(C),E.build()},QH=async(D,F)=>{const E=b3.requestBuilder(D,F),w=k({},W8,{[b$]:D[k$]});E.bp("/assignment/accounts");const $=k({[kH]:[,D[yH]],[PH]:[()=>D.maxResults!==void 0,()=>D[jH].toString()]});let C;return E.m("GET").h(w).q($).b(C),E.build()},HH=async(D,F)=>{const E=b3.requestBuilder(D,F),w=k({},W8,{[b$]:D[k$]});E.bp("/logout");let $;return E.m("POST").h(w).b($),E.build()},LH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return y$(D,F);const E=k({$metadata:Q8(D)}),w=yD(Q0(await S8.parseJsonBody(D.body,F)),"body"),$=c(w,{roleCredentials:BD});return Object.assign(E,$),E},RH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return y$(D,F);const E=k({$metadata:Q8(D)}),w=yD(Q0(await S8.parseJsonBody(D.body,F)),"body"),$=c(w,{nextToken:S,roleList:BD});return Object.assign(E,$),E},VH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return y$(D,F);const E=k({$metadata:Q8(D)}),w=yD(Q0(await S8.parseJsonBody(D.body,F)),"body"),$=c(w,{accountList:BD,nextToken:S});return Object.assign(E,$),E},NH=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return y$(D,F);const E=k({$metadata:Q8(D)});return await $6(D.body,F),E},y$=async(D,F)=>{const E={...D,body:await S8.parseJsonErrorBody(D.body,F)},w=S8.loadRestJsonErrorCode(D,E.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Nt(E,F);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await qt(E,F);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Ot(E,F);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await jt(E,F);default:const $=E.body;return Vt({output:D,parsedBody:$,errorCode:w})}},Vt,Nt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new q$({$metadata:Q8(D),...E});return u(C,D.body)},qt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new O$({$metadata:Q8(D),...E});return u(C,D.body)},Ot=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new j$({$metadata:Q8(D),...E});return u(C,D.body)},jt=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new P$({$metadata:Q8(D),...E});return u(C,D.body)},Q8=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),qH="accountId",k$="accessToken",OH="account_id",jH="maxResults",PH="max_result",yH="nextToken",kH="next_token",Pt="roleName",yt="role_name",b$="x-amz-sso_bearer_token";var x3=G(()=>{S8=L(PD(),1),b3=L(_D(),1);y();h6();CC();Vt=t2(k1)});var c3;var BC=G(()=>{AD();LD();y();DF();h6();x3();c3=class c3 extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(WH,XH).ser(KH).de(LH).build(){}});var g3;var x$=G(()=>{AD();LD();y();DF();h6();x3();g3=class g3 extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(JH,void 0).ser(SH).de(RH).build(){}});var r3;var c$=G(()=>{AD();LD();y();DF();h6();x3();r3=class r3 extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(zH,void 0).ser(QH).de(VH).build(){}});var hC;var UC=G(()=>{AD();LD();y();DF();h6();x3();hC=class hC extends l.classBuilder().ep(K8).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(TH,void 0).ser(HH).de(NH).build(){}});var kt,bH;var xH=G(()=>{y();BC();x$();c$();UC();k3();kt={GetRoleCredentialsCommand:c3,ListAccountRolesCommand:g3,ListAccountsCommand:r3,LogoutCommand:hC};bH=class bH extends y1{};d6(kt,bH)});var cH=G(()=>{BC();x$();c$();UC()});var gH=()=>{};var rH,rKD;var _H=G(()=>{rH=L(_D(),1);x$();k3();rKD=rH.createPaginator(y1,g3,"nextToken","nextToken","maxResults")});var sH,dKD;var uH=G(()=>{sH=L(_D(),1);c$();k3();dKD=sH.createPaginator(y1,r3,"nextToken","nextToken","maxResults")});var dH=G(()=>{gH();_H();uH()});var vH=G(()=>{h6()});var mH=G(()=>{k3();xH();cH();dH();vH()});var nH={};_0(nH,{SSOClient:()=>y1,GetRoleCredentialsCommand:()=>c3});var lH=G(()=>{mH()});var AC,_3=!1,IC=async({ssoStartUrl:D,ssoSession:F,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoClient:C,clientConfig:f,profile:B,logger:h})=>{let U;const I="To refresh this SSO session run aws sso login with the corresponding profile.";if(F)try{const $D=await PQ({profile:B})();U={accessToken:$D.token,expiresAt:new Date($D.expiration).toISOString()}}catch($D){throw new x($D.message,{tryNextLink:_3,logger:h})}else try{U=await dw(D)}catch($D){throw new x("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:_3,logger:h})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new x("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:_3,logger:h});const{accessToken:A}=U,{SSOClient:Y,GetRoleCredentialsCommand:M}=await Promise.resolve().then(() => (lH(),nH)),Z=C||new Y(Object.assign({},f??{},{region:f?.region??w}));let z;try{z=await Z.send(new M({accountId:E,roleName:$,accessToken:A}))}catch($D){throw new x($D,{tryNextLink:_3,logger:h})}const{roleCredentials:{accessKeyId:X,secretAccessKey:J,sessionToken:K,expiration:H,credentialScope:V,accountId:m}={}}=z;if(!X||!J||!K||!H)throw new x("SSO returns an invalid temporary credential.",{tryNextLink:_3,logger:h});const FD={accessKeyId:X,secretAccessKey:J,sessionToken:K,expiration:new Date(H),...V&&{credentialScope:V},...m&&{accountId:m}};if(F)AC.setCredentialFeature(FD,"CREDENTIALS_SSO","s");else AC.setCredentialFeature(FD,"CREDENTIALS_SSO_LEGACY","u");return FD};var iH=G(()=>{AC=L(B0(),1);xQ();fD();X2()});var MC=(D,F)=>{const{sso_start_url:E,sso_account_id:w,sso_region:$,sso_role_name:C}=D;if(!E||!w||!$||!C)throw new x(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(D).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:F});return D};var GC=G(()=>{fD()});var bt=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:F,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoSession:C}=D,{ssoClient:f}=D,B=p0(D);if(!F&&!E&&!w&&!$&&!C){const U=(await M8(D))[B];if(!U)throw new x(`Profile ${B} was not found.`,{logger:D.logger});if(!x5(U))throw new x(`Profile ${B} is not configured with SSO credentials.`,{logger:D.logger});if(U?.sso_session){const X=(await nw(D))[U.sso_session],J=` configurations in profile ${B} and sso-session ${U.sso_session}`;if(w&&w!==X.sso_region)throw new x("Conflicting SSO region"+J,{tryNextLink:!1,logger:D.logger});if(F&&F!==X.sso_start_url)throw new x("Conflicting SSO start_url"+J,{tryNextLink:!1,logger:D.logger});U.sso_region=X.sso_region,U.sso_start_url=X.sso_start_url}const{sso_start_url:I,sso_account_id:A,sso_region:Y,sso_role_name:M,sso_session:Z}=MC(U,D.logger);return IC({ssoStartUrl:I,ssoSession:Z,ssoAccountId:A,ssoRegion:Y,ssoRoleName:M,ssoClient:f,clientConfig:D.clientConfig,profile:B})}else if(!F||!E||!w||!$)throw new x('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:D.logger});else return IC({ssoStartUrl:F,ssoSession:C,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoClient:f,clientConfig:D.clientConfig,profile:B})};var pH=G(()=>{fD();X2();iH();GC()});var aH=()=>{};var YC={};_0(YC,{validateSsoProfile:()=>MC,isSsoProfile:()=>x5,fromSSO:()=>bt});var ZC=G(()=>{pH();aH();GC()});var oH,tH=(D,F,E)=>{const w={EcsContainer:async($)=>{const{fromHttp:C}=await Promise.resolve().then(() => (b5(),k5)),{fromContainerMetadata:f}=await Promise.resolve().then(() => (X3(),W3));return E?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>N1(C($??{}),f($))().then(WC)},Ec2InstanceMetadata:async($)=>{E?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:C}=await Promise.resolve().then(() => (X3(),W3));return async()=>C($)().then(WC)},Environment:async($)=>{E?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:C}=await Promise.resolve().then(() => (V5(),uK));return async()=>C($)().then(WC)}};if(D in w)return w[D];else throw new x(`Unsupported credential source in profile ${F}. Got ${D}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:E})},WC=(D)=>oH.setCredentialFeature(D,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var eH=G(()=>{oH=L(B0(),1);fD()});function xt(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}function DL(D){return{schemeId:"smithy.api#noAuth"}}var FL,EL=async(D,F,E)=>{return{operation:m0(F).operation,region:await sD(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},wL=(D)=>{const F=[];switch(D.operation){case"AssumeRoleWithSAML":{F.push(DL(D));break}case"AssumeRoleWithWebIdentity":{F.push(DL(D));break}default:F.push(xt(D))}return F},ct=(D)=>({...D,stsClientCtor:b1}),$L=(D)=>{const F=ct(D);return{...FL.resolveAwsSdkSigV4Config(F)}};var XC=G(()=>{FL=L(PD(),1);W2();s3()});var fL=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,useGlobalEndpoint:D.useGlobalEndpoint??!1,defaultSigningName:"sts"}},E0;var A1=G(()=>{E0={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var BL;var CL=G(()=>{BL={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var hL,JC,XL,UL,oD,AL,JL,zL,w0,k0,IL,TL,KL,ML,SL,GL,YL,ZL,WL,rt,QL;var HL=G(()=>{hL={["required"]:!1,["type"]:"String"},JC={["required"]:!0,default:!1,["type"]:"Boolean"},XL={["ref"]:"Endpoint"},UL={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},oD={["ref"]:"Region"},AL={["fn"]:"aws.partition",["argv"]:[oD],assign:"PartitionResult"},JL={["ref"]:"UseFIPS"},zL={["ref"]:"UseDualStack"},w0={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},k0={},IL={conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"aws-global"]}],["endpoint"]:w0,["type"]:"endpoint"},TL={["fn"]:"booleanEquals",["argv"]:[JL,!0]},KL={["fn"]:"booleanEquals",["argv"]:[zL,!0]},ML={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},SL={["ref"]:"PartitionResult"},GL={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[SL,"supportsDualStack"]}]},YL=[{["fn"]:"isSet",["argv"]:[XL]}],ZL=[TL],WL=[KL],rt={version:"1.0",parameters:{Region:hL,UseDualStack:JC,UseFIPS:JC,Endpoint:hL,UseGlobalEndpoint:JC},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:YL},UL,AL,{["fn"]:"booleanEquals",["argv"]:[JL,!1]},{["fn"]:"booleanEquals",["argv"]:[zL,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"ap-northeast-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"ap-south-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"ap-southeast-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"ap-southeast-2"]}],endpoint:w0,["type"]:"endpoint"},IL,{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"ca-central-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"eu-central-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"eu-north-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"eu-west-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"eu-west-2"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"eu-west-3"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"sa-east-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"us-east-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"us-east-2"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"us-west-1"]}],endpoint:w0,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[oD,"us-west-2"]}],endpoint:w0,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:k0},["type"]:"endpoint"}],["type"]:"tree"},{conditions:YL,rules:[{conditions:ZL,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:WL,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:XL,properties:k0,headers:k0},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[UL],rules:[{conditions:[AL],rules:[{conditions:[TL,KL],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,ML]},GL],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k0,headers:k0},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:ZL,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[ML,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[SL,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:k0,headers:k0},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k0,headers:k0},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:WL,rules:[{conditions:[GL],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k0,headers:k0},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},IL,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:k0,headers:k0},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},QL=rt});var _t,LL=(D,F={})=>{return _t.get(D,()=>G2(QL,{endpointParams:D,logger:F.logger}))};var RL=G(()=>{p8();Y2();HL();_t=new M2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]});C0.aws=Z2});var VL,NL,qL=(D)=>{return{apiVersion:"2011-06-15",base64Decoder:D?.base64Decoder??T0,base64Encoder:D?.base64Encoder??S0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??LL,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??wL,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new VL.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(F)=>F.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new NL.NoAuthSigner}],logger:D?.logger??new y0,serviceId:D?.serviceId??"STS",urlParser:D?.urlParser??D0,utf8Decoder:D?.utf8Decoder??F0,utf8Encoder:D?.utf8Encoder??K0}};var OL=G(()=>{VL=L(PD(),1),NL=L(_D(),1);y();G8();O1();o2();XC();RL()});var g$,jL,PL=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=qL(D);return g$.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??K2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:BL.version}),httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:($)=>$.getIdentityProvider("aws.auth#sigv4")||(async(C)=>await K2(C?.__config||{})()),signer:new g$.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:($)=>$.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new jL.NoAuthSigner}],maxAttempts:D?.maxAttempts??i(i2),region:D?.region??i(n0,u2),requestHandler:U0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...a2,default:async()=>(await E()).retryMode||t0}),sha256:D?.sha256??T2.bind(null,"sha256"),streamCollector:D?.streamCollector??e0,useDualstackEndpoint:D?.useDualstackEndpoint??i(_2),useFipsEndpoint:D?.useFipsEndpoint??i(s2),userAgentAppId:D?.userAgentAppId??i(f1)}};var yL=G(()=>{CL();g$=L(PD(),1);o6();l6();l0();jL=L(_D(),1);i6();z2();m2();Z8();p6();j0();OL();y();a6();y()});var kL=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},bL=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var r$=(D)=>D,xL=(D,F)=>{const E={...r$(h1(D)),...r$(F1(D)),...r$(j2(D)),...r$(kL(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...P2(E),...bL(E)}};var cL=G(()=>{t6();vD();y()});var EF,b1;var s3=G(()=>{z6();T6();K6();t8();l0();EF=L(_D(),1);x6();AD();z2();y();XC();A1();yL();cL();b1=class b1 extends P0{constructor(...[D]){const F=PL(D||{}),E=fL(F),w=g2(E),$=p2(w),C=d2($),f=y2(C),B=n2(f),h=$L(B),U=xL(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(r2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(v2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(x2(this.config)),this.middlewareStack.use(EF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:EL,identityProviderConfigProvider:async(I)=>new EF.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(EF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var A0;var _$=G(()=>{y();A0=class A0 extends D2{constructor(D){super(D);Object.setPrototypeOf(this,A0.prototype)}}});var u3,d3,v3,m3,n3,l3,i3,p3,wF=(D)=>({...D,...D.SecretAccessKey&&{SecretAccessKey:wD}}),zC=(D)=>({...D,...D.Credentials&&{Credentials:wF(D.Credentials)}}),TC=(D)=>({...D,...D.SAMLAssertion&&{SAMLAssertion:wD}}),KC=(D)=>({...D,...D.Credentials&&{Credentials:wF(D.Credentials)}}),SC=(D)=>({...D,...D.WebIdentityToken&&{WebIdentityToken:wD}}),QC=(D)=>({...D,...D.Credentials&&{Credentials:wF(D.Credentials)}}),HC=(D)=>({...D,...D.Credentials&&{Credentials:wF(D.Credentials)}}),LC=(D)=>({...D,...D.Credentials&&{Credentials:wF(D.Credentials)}});var H8=G(()=>{y();_$();u3=class u3 extends A0{constructor(D){super({name:"ExpiredTokenException",$fault:"client",...D});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,u3.prototype)}};d3=class d3 extends A0{constructor(D){super({name:"MalformedPolicyDocumentException",$fault:"client",...D});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,d3.prototype)}};v3=class v3 extends A0{constructor(D){super({name:"PackedPolicyTooLargeException",$fault:"client",...D});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,v3.prototype)}};m3=class m3 extends A0{constructor(D){super({name:"RegionDisabledException",$fault:"client",...D});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,m3.prototype)}};n3=class n3 extends A0{constructor(D){super({name:"IDPRejectedClaimException",$fault:"client",...D});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,n3.prototype)}};l3=class l3 extends A0{constructor(D){super({name:"InvalidIdentityTokenException",$fault:"client",...D});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,l3.prototype)}};i3=class i3 extends A0{constructor(D){super({name:"IDPCommunicationErrorException",$fault:"client",...D});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,i3.prototype)}};p3=class p3 extends A0{constructor(D){super({name:"InvalidAuthorizationMessageException",$fault:"client",...D});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,p3.prototype)}}});var S2,gL=async(D,F)=>{const E=V8;let w;return w=j8({...pt(D,F),[q8]:Re,[O8]:N8}),R8(F,E,"/",void 0,w)},rL=async(D,F)=>{const E=V8;let w;return w=j8({...at(D,F),[q8]:Ve,[O8]:N8}),R8(F,E,"/",void 0,w)},_L=async(D,F)=>{const E=V8;let w;return w=j8({...ot(D,F),[q8]:Ne,[O8]:N8}),R8(F,E,"/",void 0,w)},sL=async(D,F)=>{const E=V8;let w;return w=j8({...tt(D,F),[q8]:qe,[O8]:N8}),R8(F,E,"/",void 0,w)},uL=async(D,F)=>{const E=V8;let w;return w=j8({...et(D,F),[q8]:Oe,[O8]:N8}),R8(F,E,"/",void 0,w)},dL=async(D,F)=>{const E=V8;let w;return w=j8({...De(D,F),[q8]:je,[O8]:N8}),R8(F,E,"/",void 0,w)},vL=async(D,F)=>{const E=V8;let w;return w=j8({...Fe(D,F),[q8]:Pe,[O8]:N8}),R8(F,E,"/",void 0,w)},mL=async(D,F)=>{const E=V8;let w;return w=j8({...Ee(D,F),[q8]:ye,[O8]:N8}),R8(F,E,"/",void 0,w)},nL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=he(E.AssumeRoleResult,F),{$metadata:$0(D),...w}},lL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=Ue(E.AssumeRoleWithSAMLResult,F),{$metadata:$0(D),...w}},iL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=Ae(E.AssumeRoleWithWebIdentityResult,F),{$metadata:$0(D),...w}},pL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=Ie(E.DecodeAuthorizationMessageResult,F),{$metadata:$0(D),...w}},aL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=Ye(E.GetAccessKeyInfoResult,F),{$metadata:$0(D),...w}},oL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=Ze(E.GetCallerIdentityResult,F),{$metadata:$0(D),...w}},tL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=We(E.GetFederationTokenResult,F),{$metadata:$0(D),...w}},eL=async(D,F)=>{if(D.statusCode>=300)return L8(D,F);const E=await S2.parseXmlBody(D.body,F);let w={};return w=Xe(E.GetSessionTokenResult,F),{$metadata:$0(D),...w}},L8=async(D,F)=>{const E={...D,body:await S2.parseXmlErrorBody(D.body,F)},w=ke(D,E.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await st(E,F);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await nt(E,F);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await lt(E,F);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await it(E,F);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await dt(E,F);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await mt(E,F);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await ut(E,F);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await vt(E,F);default:const $=E.body;return Le({output:D,parsedBody:$.Error,errorCode:w})}},st=async(D,F)=>{const E=D.body,w=Me(E.Error,F),$=new u3({$metadata:$0(D),...w});return u($,E)},ut=async(D,F)=>{const E=D.body,w=Je(E.Error,F),$=new i3({$metadata:$0(D),...w});return u($,E)},dt=async(D,F)=>{const E=D.body,w=ze(E.Error,F),$=new n3({$metadata:$0(D),...w});return u($,E)},vt=async(D,F)=>{const E=D.body,w=Te(E.Error,F),$=new p3({$metadata:$0(D),...w});return u($,E)},mt=async(D,F)=>{const E=D.body,w=Ke(E.Error,F),$=new l3({$metadata:$0(D),...w});return u($,E)},nt=async(D,F)=>{const E=D.body,w=Se(E.Error,F),$=new d3({$metadata:$0(D),...w});return u($,E)},lt=async(D,F)=>{const E=D.body,w=Qe(E.Error,F),$=new v3({$metadata:$0(D),...w});return u($,E)},it=async(D,F)=>{const E=D.body,w=He(E.Error,F),$=new m3({$metadata:$0(D),...w});return u($,E)},pt=(D,F)=>{const E={};if(D[g1]!=null)E[g1]=D[g1];if(D[BF]!=null)E[BF]=D[BF];if(D[$2]!=null){const w=s$(D[$2],F);if(D[$2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[w2]!=null)E[w2]=D[w2];if(D[M0]!=null)E[M0]=D[M0];if(D[UF]!=null){const w=DR(D[UF],F);if(D[UF]?.length===0)E.Tags=[];Object.entries(w).forEach(([$,C])=>{const f=`Tags.${$}`;E[f]=C})}if(D[pC]!=null){const w=Be(D[pC],F);if(D[pC]?.length===0)E.TransitiveTagKeys=[];Object.entries(w).forEach(([$,C])=>{const f=`TransitiveTagKeys.${$}`;E[f]=C})}if(D[OC]!=null)E[OC]=D[OC];if(D[hF]!=null)E[hF]=D[hF];if(D[AF]!=null)E[AF]=D[AF];if(D[C2]!=null)E[C2]=D[C2];if(D[_C]!=null){const w=fe(D[_C],F);if(D[_C]?.length===0)E.ProvidedContexts=[];Object.entries(w).forEach(([$,C])=>{const f=`ProvidedContexts.${$}`;E[f]=C})}return E},at=(D,F)=>{const E={};if(D[g1]!=null)E[g1]=D[g1];if(D[gC]!=null)E[gC]=D[gC];if(D[mC]!=null)E[mC]=D[mC];if(D[$2]!=null){const w=s$(D[$2],F);if(D[$2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[w2]!=null)E[w2]=D[w2];if(D[M0]!=null)E[M0]=D[M0];return E},ot=(D,F)=>{const E={};if(D[g1]!=null)E[g1]=D[g1];if(D[BF]!=null)E[BF]=D[BF];if(D[tC]!=null)E[tC]=D[tC];if(D[sC]!=null)E[sC]=D[sC];if(D[$2]!=null){const w=s$(D[$2],F);if(D[$2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[w2]!=null)E[w2]=D[w2];if(D[M0]!=null)E[M0]=D[M0];return E},tt=(D,F)=>{const E={};if(D[jC]!=null)E[jC]=D[jC];return E},et=(D,F)=>{const E={};if(D[$F]!=null)E[$F]=D[$F];return E},De=(D,F)=>{return{}},Fe=(D,F)=>{const E={};if(D[xC]!=null)E[xC]=D[xC];if(D[w2]!=null)E[w2]=D[w2];if(D[$2]!=null){const w=s$(D[$2],F);if(D[$2]?.length===0)E.PolicyArns=[];Object.entries(w).forEach(([$,C])=>{const f=`PolicyArns.${$}`;E[f]=C})}if(D[M0]!=null)E[M0]=D[M0];if(D[UF]!=null){const w=DR(D[UF],F);if(D[UF]?.length===0)E.Tags=[];Object.entries(w).forEach(([$,C])=>{const f=`Tags.${$}`;E[f]=C})}return E},Ee=(D,F)=>{const E={};if(D[M0]!=null)E[M0]=D[M0];if(D[hF]!=null)E[hF]=D[hF];if(D[AF]!=null)E[AF]=D[AF];return E},s$=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;const C=we($,F);Object.entries(C).forEach(([f,B])=>{E[`member.${w}.${f}`]=B}),w++}return E},we=(D,F)=>{const E={};if(D[eC]!=null)E[eC]=D[eC];return E},$e=(D,F)=>{const E={};if(D[rC]!=null)E[rC]=D[rC];if(D[VC]!=null)E[VC]=D[VC];return E},fe=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;const C=$e($,F);Object.entries(C).forEach(([f,B])=>{E[`member.${w}.${f}`]=B}),w++}return E},Ce=(D,F)=>{const E={};if(D[bC]!=null)E[bC]=D[bC];if(D[oC]!=null)E[oC]=D[oC];return E},Be=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;E[`member.${w}`]=$,w++}return E},DR=(D,F)=>{const E={};let w=1;for(let $ of D){if($===null)continue;const C=Ce($,F);Object.entries(C).forEach(([f,B])=>{E[`member.${w}.${f}`]=B}),w++}return E},DB=(D,F)=>{const E={};if(D[RC]!=null)E[RC]=S(D[RC]);if(D[c1]!=null)E[c1]=S(D[c1]);return E},he=(D,F)=>{const E={};if(D[I0]!=null)E[I0]=a3(D[I0],F);if(D[x1]!=null)E[x1]=DB(D[x1],F);if(D[f2]!=null)E[f2]=G3(D[f2]);if(D[C2]!=null)E[C2]=S(D[C2]);return E},Ue=(D,F)=>{const E={};if(D[I0]!=null)E[I0]=a3(D[I0],F);if(D[x1]!=null)E[x1]=DB(D[x1],F);if(D[f2]!=null)E[f2]=G3(D[f2]);if(D[dC]!=null)E[dC]=S(D[dC]);if(D[lC]!=null)E[lC]=S(D[lC]);if(D[kC]!=null)E[kC]=S(D[kC]);if(D[CF]!=null)E[CF]=S(D[CF]);if(D[cC]!=null)E[cC]=S(D[cC]);if(D[C2]!=null)E[C2]=S(D[C2]);return E},Ae=(D,F)=>{const E={};if(D[I0]!=null)E[I0]=a3(D[I0],F);if(D[nC]!=null)E[nC]=S(D[nC]);if(D[x1]!=null)E[x1]=DB(D[x1],F);if(D[f2]!=null)E[f2]=G3(D[f2]);if(D[uC]!=null)E[uC]=S(D[uC]);if(D[CF]!=null)E[CF]=S(D[CF]);if(D[C2]!=null)E[C2]=S(D[C2]);return E},a3=(D,F)=>{const E={};if(D[$F]!=null)E[$F]=S(D[$F]);if(D[vC]!=null)E[vC]=S(D[vC]);if(D[iC]!=null)E[iC]=S(D[iC]);if(D[qC]!=null)E[qC]=yD(v6(D[qC]));return E},Ie=(D,F)=>{const E={};if(D[NC]!=null)E[NC]=S(D[NC]);return E},Me=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},Ge=(D,F)=>{const E={};if(D[yC]!=null)E[yC]=S(D[yC]);if(D[c1]!=null)E[c1]=S(D[c1]);return E},Ye=(D,F)=>{const E={};if(D[fF]!=null)E[fF]=S(D[fF]);return E},Ze=(D,F)=>{const E={};if(D[aC]!=null)E[aC]=S(D[aC]);if(D[fF]!=null)E[fF]=S(D[fF]);if(D[c1]!=null)E[c1]=S(D[c1]);return E},We=(D,F)=>{const E={};if(D[I0]!=null)E[I0]=a3(D[I0],F);if(D[PC]!=null)E[PC]=Ge(D[PC],F);if(D[f2]!=null)E[f2]=G3(D[f2]);return E},Xe=(D,F)=>{const E={};if(D[I0]!=null)E[I0]=a3(D[I0],F);return E},Je=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},ze=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},Te=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},Ke=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},Se=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},Qe=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},He=(D,F)=>{const E={};if(D[zD]!=null)E[zD]=S(D[zD]);return E},$0=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]}),Le,R8=async(D,F,E,w,$)=>{const{hostname:C,protocol:f="https",port:B,path:h}=await D.endpoint(),U={protocol:f,hostname:C,port:B,method:"POST",path:h.endsWith("/")?h.slice(0,-1)+E:h+E,headers:F};if(w!==void 0)U.hostname=w;if($!==void 0)U.body=$;return new rD(U)},V8,N8="2011-06-15",q8="Action",$F="AccessKeyId",Re="AssumeRole",RC="AssumedRoleId",x1="AssumedRoleUser",Ve="AssumeRoleWithSAML",Ne="AssumeRoleWithWebIdentity",fF="Account",c1="Arn",CF="Audience",I0="Credentials",VC="ContextAssertion",qe="DecodeAuthorizationMessage",NC="DecodedMessage",M0="DurationSeconds",qC="Expiration",OC="ExternalId",jC="EncodedMessage",PC="FederatedUser",yC="FederatedUserId",Oe="GetAccessKeyInfo",je="GetCallerIdentity",Pe="GetFederationToken",ye="GetSessionToken",kC="Issuer",bC="Key",xC="Name",cC="NameQualifier",w2="Policy",$2="PolicyArns",gC="PrincipalArn",rC="ProviderArn",_C="ProvidedContexts",sC="ProviderId",f2="PackedPolicySize",uC="Provider",g1="RoleArn",BF="RoleSessionName",dC="Subject",vC="SecretAccessKey",mC="SAMLAssertion",nC="SubjectFromWebIdentityToken",C2="SourceIdentity",hF="SerialNumber",lC="SubjectType",iC="SessionToken",UF="Tags",AF="TokenCode",pC="TransitiveTagKeys",aC="UserId",O8="Version",oC="Value",tC="WebIdentityToken",eC="arn",zD="message",j8=(D)=>Object.entries(D).map(([F,E])=>h$(F)+"="+h$(E)).join("&"),ke=(D,F)=>{if(F.Error?.Code!==void 0)return F.Error.Code;if(D.statusCode==404)return"NotFound"};var r1=G(()=>{S2=L(PD(),1);vD();y();H8();_$();Le=t2(A0),V8={"content-type":"application/x-www-form-urlencoded"}});var IF;var u$=G(()=>{AD();LD();y();A1();H8();r1();IF=class IF extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,zC).ser(gL).de(nL).build(){}});var d$;var FB=G(()=>{AD();LD();y();A1();H8();r1();d$=class d$ extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(TC,KC).ser(rL).de(lL).build(){}});var MF;var v$=G(()=>{AD();LD();y();A1();H8();r1();MF=class MF extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(SC,QC).ser(_L).de(iL).build(){}});var m$;var EB=G(()=>{AD();LD();y();A1();r1();m$=class m$ extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(sL).de(pL).build(){}});var n$;var wB=G(()=>{AD();LD();y();A1();r1();n$=class n$ extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(uL).de(aL).build(){}});var l$;var $B=G(()=>{AD();LD();y();A1();r1();l$=class l$ extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(dL).de(oL).build(){}});var i$;var fB=G(()=>{AD();LD();y();A1();H8();r1();i$=class i$ extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,HC).ser(vL).de(tL).build(){}});var p$;var CB=G(()=>{AD();LD();y();A1();H8();r1();p$=class p$ extends l.classBuilder().ep(E0).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,LC).ser(mL).de(eL).build(){}});var be,BB;var FR=G(()=>{y();u$();FB();v$();EB();wB();$B();fB();CB();s3();be={AssumeRoleCommand:IF,AssumeRoleWithSAMLCommand:d$,AssumeRoleWithWebIdentityCommand:MF,DecodeAuthorizationMessageCommand:m$,GetAccessKeyInfoCommand:n$,GetCallerIdentityCommand:l$,GetFederationTokenCommand:i$,GetSessionTokenCommand:p$};BB=class BB extends b1{};d6(be,BB)});var ER=G(()=>{u$();FB();v$();EB();wB();$B();fB();CB()});var wR=G(()=>{H8()});var a$,$R="us-east-1",fR=(D)=>{if(typeof D?.Arn==="string"){const F=D.Arn.split(":");if(F.length>4&&F[4]!=="")return F[4]}return},CR=async(D,F,E)=>{const w=typeof D==="function"?await D():D,$=typeof F==="function"?await F():F;return E?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${$} (parent client)`,`${$R} (STS default)`),w??$??$R},BR=(D,F)=>{let E,w;return async($,C)=>{if(w=$,!E){const{logger:I=D?.parentClientConfig?.logger,region:A,requestHandler:Y=D?.parentClientConfig?.requestHandler,credentialProviderLogger:M}=D,Z=await CR(A,D?.parentClientConfig?.region,M),z=!UR(Y);E=new F({credentialDefaultProvider:()=>async()=>w,region:Z,requestHandler:z?Y:void 0,logger:I})}const{Credentials:f,AssumedRoleUser:B}=await E.send(new IF(C));if(!f||!f.AccessKeyId||!f.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${C.RoleArn}`);const h=fR(B),U={accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,sessionToken:f.SessionToken,expiration:f.Expiration,...f.CredentialScope&&{credentialScope:f.CredentialScope},...h&&{accountId:h}};return a$.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE","i"),U}},hR=(D,F)=>{let E;return async(w)=>{if(!E){const{logger:h=D?.parentClientConfig?.logger,region:U,requestHandler:I=D?.parentClientConfig?.requestHandler,credentialProviderLogger:A}=D,Y=await CR(U,D?.parentClientConfig?.region,A),M=!UR(I);E=new F({region:Y,requestHandler:M?I:void 0,logger:h})}const{Credentials:$,AssumedRoleUser:C}=await E.send(new MF(w));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const f=fR(C),B={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...f&&{accountId:f}};if(f)a$.setCredentialFeature(B,"RESOLVED_ACCOUNT_ID","T");return a$.setCredentialFeature(B,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),B}},UR=(D)=>{return D?.metadata?.handlerProtocol==="h2"};var AR=G(()=>{a$=L(B0(),1);u$();v$()});var IR=(D,F)=>{if(!F)return D;else return class E extends D{constructor(w){super(w);for(let $ of F)this.middlewareStack.use($)}}},MR=(D={},F)=>BR(D,IR(b1,F)),GR=(D={},F)=>hR(D,IR(b1,F)),xe=(D)=>(F)=>D({roleAssumer:MR(F),roleAssumerWithWebIdentity:GR(F),...F});var YR=G(()=>{AR();s3()});var hB={};_0(hB,{getDefaultRoleAssumerWithWebIdentity:()=>GR,getDefaultRoleAssumer:()=>MR,decorateDefaultCredentialProvider:()=>xe,__Client:()=>P0,STSServiceException:()=>A0,STSClient:()=>b1,STS:()=>BB,RegionDisabledException:()=>m3,PackedPolicyTooLargeException:()=>v3,MalformedPolicyDocumentException:()=>d3,InvalidIdentityTokenException:()=>l3,InvalidAuthorizationMessageException:()=>p3,IDPRejectedClaimException:()=>n3,IDPCommunicationErrorException:()=>i3,GetSessionTokenResponseFilterSensitiveLog:()=>LC,GetSessionTokenCommand:()=>p$,GetFederationTokenResponseFilterSensitiveLog:()=>HC,GetFederationTokenCommand:()=>i$,GetCallerIdentityCommand:()=>l$,GetAccessKeyInfoCommand:()=>n$,ExpiredTokenException:()=>u3,DecodeAuthorizationMessageCommand:()=>m$,CredentialsFilterSensitiveLog:()=>wF,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>QC,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>SC,AssumeRoleWithWebIdentityCommand:()=>MF,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>KC,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>TC,AssumeRoleWithSAMLCommand:()=>d$,AssumeRoleResponseFilterSensitiveLog:()=>zC,AssumeRoleCommand:()=>IF,$Command:()=>l});var UB=G(()=>{s3();FR();ER();wR();YR();_$()});var AB,WR=(D,{profile:F="default",logger:E}={})=>{return Boolean(D)&&typeof D==="object"&&typeof D.role_arn==="string"&&["undefined","string"].indexOf(typeof D.role_session_name)>-1&&["undefined","string"].indexOf(typeof D.external_id)>-1&&["undefined","string"].indexOf(typeof D.mfa_serial)>-1&&(ce(D,{profile:F,logger:E})||ge(D,{profile:F,logger:E}))},ce=(D,{profile:F,logger:E})=>{const w=typeof D.source_profile==="string"&&typeof D.credential_source==="undefined";if(w)E?.debug?.(` ${F} isAssumeRoleWithSourceProfile source_profile=${D.source_profile}`);return w},ge=(D,{profile:F,logger:E})=>{const w=typeof D.credential_source==="string"&&typeof D.source_profile==="undefined";if(w)E?.debug?.(` ${F} isCredentialSourceProfile credential_source=${D.credential_source}`);return w},XR=async(D,F,E,w={})=>{E.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const $=F[D];if(!E.roleAssumer){const{getDefaultRoleAssumer:B}=await Promise.resolve().then(() => (UB(),hB));E.roleAssumer=B({...E.clientConfig,credentialProviderLogger:E.logger,parentClientConfig:E?.parentClientConfig},E.clientPlugins)}const{source_profile:C}=$;if(C&&C in w)throw new x(`Detected a cycle attempting to resolve credentials for profile ${p0(E)}. Profiles visited: `+Object.keys(w).join(", "),{logger:E.logger});E.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${C?`source_profile=[${C}]`:`profile=[${D}]`}`);const f=C?o$(C,F,E,{...w,[C]:!0},ZR(F[C]??{})):(await tH($.credential_source,D,E.logger)(E))();if(ZR($))return f.then((B)=>AB.setCredentialFeature(B,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{const B={RoleArn:$.role_arn,RoleSessionName:$.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:$.external_id,DurationSeconds:parseInt($.duration_seconds||"3600",10)},{mfa_serial:h}=$;if(h){if(!E.mfaCodeProvider)throw new x(`Profile ${D} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:E.logger,tryNextLink:!1});B.SerialNumber=h,B.TokenCode=await E.mfaCodeProvider(h)}const U=await f;return E.roleAssumer(U,B).then((I)=>AB.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},ZR=(D)=>{return!D.role_arn&&!!D.credential_source};var JR=G(()=>{AB=L(B0(),1);fD();X2();eH();IB()});var zR,TR=(D,F,E)=>{if(F.Version!==1)throw Error(`Profile ${D} credential_process did not return Version 1.`);if(F.AccessKeyId===void 0||F.SecretAccessKey===void 0)throw Error(`Profile ${D} credential_process returned invalid credentials.`);if(F.Expiration){const C=new Date;if(new Date(F.Expiration)<C)throw Error(`Profile ${D} credential_process returned expired credentials.`)}let w=F.AccountId;if(!w&&E?.[D]?.aws_account_id)w=E[D].aws_account_id;const $={accessKeyId:F.AccessKeyId,secretAccessKey:F.SecretAccessKey,...F.SessionToken&&{sessionToken:F.SessionToken},...F.Expiration&&{expiration:new Date(F.Expiration)},...F.CredentialScope&&{credentialScope:F.CredentialScope},...w&&{accountId:w}};return zR.setCredentialFeature($,"CREDENTIALS_PROCESS","w"),$};var KR=G(()=>{zR=L(B0(),1)});import{exec as re}from"child_process";import{promisify as _e}from"util";var SR=async(D,F,E)=>{const w=F[D];if(F[D]){const $=w.credential_process;if($!==void 0){const C=_e(re);try{const{stdout:f}=await C($);let B;try{B=JSON.parse(f.trim())}catch{throw Error(`Profile ${D} credential_process returned invalid JSON.`)}return TR(D,B,F)}catch(f){throw new x(f.message,{logger:E})}}else throw new x(`Profile ${D} did not contain credential_process.`,{logger:E})}else throw new x(`Profile ${D} could not be found in shared credentials file.`,{logger:E})};var QR=G(()=>{fD();KR()});var se=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const F=await M8(D);return SR(p0(D),F,D.logger)};var HR=G(()=>{X2();QR()});var MB={};_0(MB,{fromProcess:()=>se});var GB=G(()=>{HR()});var LR,RR=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.credential_process==="string",VR=async(D,F)=>Promise.resolve().then(() => (GB(),MB)).then(({fromProcess:E})=>E({...D,profile:F})().then((w)=>LR.setCredentialFeature(w,"CREDENTIALS_PROFILE_PROCESS","v")));var NR=G(()=>{LR=L(B0(),1)});var YB,qR=async(D,F,E={})=>{const{fromSSO:w}=await Promise.resolve().then(() => (ZC(),YC));return w({profile:D,logger:E.logger})().then(($)=>{if(F.sso_session)return YB.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO","r");else return YB.setCredentialFeature($,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},OR=(D)=>D&&(typeof D.sso_start_url==="string"||typeof D.sso_account_id==="string"||typeof D.sso_session==="string"||typeof D.sso_region==="string"||typeof D.sso_role_name==="string");var jR=G(()=>{YB=L(B0(),1)});var PR,ZB=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.aws_access_key_id==="string"&&typeof D.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof D.aws_session_token)>-1&&["undefined","string"].indexOf(typeof D.aws_account_id)>-1,WB=async(D,F)=>{F?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const E={accessKeyId:D.aws_access_key_id,secretAccessKey:D.aws_secret_access_key,sessionToken:D.aws_session_token,...D.aws_credential_scope&&{credentialScope:D.aws_credential_scope},...D.aws_account_id&&{accountId:D.aws_account_id}};return PR.setCredentialFeature(E,"CREDENTIALS_PROFILE","n")};var yR=G(()=>{PR=L(B0(),1)});var XB=(D)=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:F,roleSessionName:E,webIdentityToken:w,providerId:$,policyArns:C,policy:f,durationSeconds:B}=D;let{roleAssumerWithWebIdentity:h}=D;if(!h){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (UB(),hB));h=U({...D.clientConfig,credentialProviderLogger:D.logger,parentClientConfig:D.parentClientConfig},D.clientPlugins)}return h({RoleArn:F,RoleSessionName:E??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:w,ProviderId:$,PolicyArns:C,Policy:f,DurationSeconds:B})};import{readFileSync as ue}from"fs";var bR,kR="AWS_WEB_IDENTITY_TOKEN_FILE",de="AWS_ROLE_ARN",ve="AWS_ROLE_SESSION_NAME",me=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const F=D?.webIdentityTokenFile??process.env[kR],E=D?.roleArn??process.env[de],w=D?.roleSessionName??process.env[ve];if(!F||!E)throw new x("Web identity configuration not specified",{logger:D.logger});const $=await XB({...D,webIdentityToken:ue(F,{encoding:"ascii"}),roleArn:E,roleSessionName:w})();if(F===process.env[kR])bR.setCredentialFeature($,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return $};var xR=G(()=>{bR=L(B0(),1);fD()});var JB={};_0(JB,{fromWebToken:()=>XB,fromTokenFile:()=>me});var zB=G(()=>{xR()});var cR,gR=(D)=>Boolean(D)&&typeof D==="object"&&typeof D.web_identity_token_file==="string"&&typeof D.role_arn==="string"&&["undefined","string"].indexOf(typeof D.role_session_name)>-1,rR=async(D,F)=>Promise.resolve().then(() => (zB(),JB)).then(({fromTokenFile:E})=>E({webIdentityTokenFile:D.web_identity_token_file,roleArn:D.role_arn,roleSessionName:D.role_session_name,roleAssumerWithWebIdentity:F.roleAssumerWithWebIdentity,logger:F.logger,parentClientConfig:F.parentClientConfig})().then((w)=>cR.setCredentialFeature(w,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var _R=G(()=>{cR=L(B0(),1)});var o$=async(D,F,E,w={},$=!1)=>{const C=F[D];if(Object.keys(w).length>0&&ZB(C))return WB(C,E);if($||WR(C,{profile:D,logger:E.logger}))return XR(D,F,E,w);if(ZB(C))return WB(C,E);if(gR(C))return rR(C,E);if(RR(C))return VR(E,D);if(OR(C))return await qR(D,C,E);throw new x(`Could not resolve credentials using profile: [${D}] in configuration/credentials file(s).`,{logger:E.logger})};var IB=G(()=>{fD();JR();NR();jR();yR();_R()});var ne=(D={})=>async()=>{D.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const F=await M8(D);return o$(p0(D),F,D)};var sR=G(()=>{X2();IB()});var uR={};_0(uR,{fromIni:()=>ne});var dR=G(()=>{sR()});var vR=!1,K2=(D={})=>e8(N1(async()=>{if(D.profile??process.env[Gz]){if(process.env[A$]&&process.env[I$]){if(!vR)(D.logger?.warn&&D.logger?.constructor?.name!=="NoOpLogger"?D.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
26
26
  Multiple credential sources detected:
27
27
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
28
28
  This SDK will proceed with the AWS_PROFILE value.
@@ -30,60 +30,60 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
30
30
  However, a future version may change this behavior to prefer the ENV static credentials.
31
31
  Please ensure that your environment only sets either the AWS_PROFILE or the
32
32
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
33
- `),$V=!0}throw new x("AWS_PROFILE is set, skipping fromEnv provider.",{logger:D.logger,tryNextLink:!0})}return D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),L5(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:F,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoSession:C}=D;if(!F&&!E&&!w&&!$&&!C)throw new x("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:D.logger});const{fromSSO:f}=await Promise.resolve().then(() => (YC(),MC));return f(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:F}=await Promise.resolve().then(() => (wV(),EV));return F(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:F}=await Promise.resolve().then(() => (GB(),IB));return F(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:F}=await Promise.resolve().then(() => (JB(),WB));return F(D)()},async()=>{return D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await US(D))()},async()=>{throw new x("Could not load credentials from any providers",{tryNextLink:!1,logger:D.logger})}),IDD,ADD),ADD=(D)=>D?.expiration!==void 0,IDD=(D)=>D?.expiration!==void 0&&D.expiration.getTime()-Date.now()<300000;var fV=M(()=>{R5();$D();X2();AS()});var a6=M(()=>{fV()});var Aq=X((pB,aB)=>{(function(D,F){if(typeof pB==="object"&&typeof aB==="object")aB.exports=F();else if(typeof define==="function"&&define.amd)define(function(){return F()});else D.pluralize=F()})(pB,function(){var D=[],F=[],E={},w={},$={};function C(G){if(typeof G==="string")return new RegExp("^"+G+"$","i");return G}function f(G,Z){if(G===Z)return Z;if(G===G.toLowerCase())return Z.toLowerCase();if(G===G.toUpperCase())return Z.toUpperCase();if(G[0]===G[0].toUpperCase())return Z.charAt(0).toUpperCase()+Z.substr(1).toLowerCase();return Z.toLowerCase()}function B(G,Z){return G.replace(/\$(\d{1,2})/g,function(z,W){return Z[W]||""})}function h(G,Z){return G.replace(Z[0],function(z,W){var J=B(Z[1],arguments);if(z==="")return f(G[W-1],J);return f(z,J)})}function U(G,Z,z){if(!G.length||E.hasOwnProperty(G))return Z;var W=z.length;while(W--){var J=z[W];if(J[0].test(Z))return h(Z,J)}return Z}function I(G,Z,z){return function(W){var J=W.toLowerCase();if(Z.hasOwnProperty(J))return f(W,J);if(G.hasOwnProperty(J))return f(W,G[J]);return U(J,W,z)}}function A(G,Z,z,W){return function(J){var K=J.toLowerCase();if(Z.hasOwnProperty(K))return!0;if(G.hasOwnProperty(K))return!1;return U(K,K,z)===K}}function Y(G,Z,z){var W=Z===1?Y.singular(G):Y.plural(G);return(z?Z+" ":"")+W}return Y.plural=I($,w,D),Y.isPlural=A($,w,D),Y.singular=I(w,$,F),Y.isSingular=A(w,$,F),Y.addPluralRule=function(G,Z){D.push([C(G),Z])},Y.addSingularRule=function(G,Z){F.push([C(G),Z])},Y.addUncountableRule=function(G){if(typeof G==="string"){E[G.toLowerCase()]=!0;return}Y.addPluralRule(G,"$0"),Y.addSingularRule(G,"$0")},Y.addIrregularRule=function(G,Z){Z=Z.toLowerCase(),G=G.toLowerCase(),$[G]=Z,w[Z]=G},[["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"],["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"]].forEach(function(G){return Y.addIrregularRule(G[0],G[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$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(function(G){return Y.addPluralRule(G[0],G[1])}),[[/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"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|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(function(G){return Y.addSingularRule(G[0],G[1])}),["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","species","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(Y.addUncountableRule),Y})});var Iq=X((oB,tB)=>{(function(D,F,E){if(typeof oB==="object")tB.exports=E(),tB.exports.default=E();else if(typeof define==="function"&&define.amd)define(E);else F[D]=E()})("slugify",oB,function(){var D=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"}`),F=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 E(w,$){if(typeof w!=="string")throw new Error("slugify: string argument expected");$=typeof $==="string"?{replacement:$}:$||{};var C=F[$.locale]||{},f=$.replacement===void 0?"-":$.replacement,B=$.trim===void 0?!0:$.trim,h=w.normalize().split("").reduce(function(U,I){var A=C[I];if(A===void 0)A=D[I];if(A===void 0)A=I;if(A===f)A=" ";return U+A.replace($.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");if($.strict)h=h.replace(/[^A-Za-z0-9\s]/g,"");if(B)h=h.trim();if(h=h.replace(/\s+/g,f),$.lower)h=h.toLowerCase();return h}return E.extend=function(w){Object.assign(D,w)},E})});var LD=X((K4,Eh)=>{function Fh(D){return Fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},Fh(D)}function O0D(D){var F=typeof D==="string"||D instanceof String;if(!F){var E=Fh(D);if(D===null)E="null";else if(E==="object")E=D.constructor.name;throw new TypeError("Expected a string but received a ".concat(E))}}Object.defineProperty(K4,"__esModule",{value:!0});K4.default=O0D;Eh.exports=K4.default;Eh.exports.default=K4.default});var Q4=X((S4,$h)=>{function y0D(D){return D&&D.__esModule?D:{default:D}}function wh(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(P0D.default(D),F=String(F),!F)return wh(D,4)||wh(D,6);if(F==="4")return k0D.test(D);if(F==="6")return b0D.test(D);return!1}Object.defineProperty(S4,"__esModule",{value:!0});S4.default=wh;var P0D=y0D(LD()),Mq="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",k8="(".concat(Mq,"[.]){3}").concat(Mq),k0D=new RegExp("^".concat(k8,"$")),xD="(?:[0-9a-fA-F]{1,4})",b0D=new RegExp("^("+"(?:".concat(xD,":){7}(?:").concat(xD,"|:)|")+"(?:".concat(xD,":){6}(?:").concat(k8,"|:").concat(xD,"|:)|")+"(?:".concat(xD,":){5}(?::").concat(k8,"|(:").concat(xD,"){1,2}|:)|")+"(?:".concat(xD,":){4}(?:(:").concat(xD,"){0,1}:").concat(k8,"|(:").concat(xD,"){1,3}|:)|")+"(?:".concat(xD,":){3}(?:(:").concat(xD,"){0,2}:").concat(k8,"|(:").concat(xD,"){1,4}|:)|")+"(?:".concat(xD,":){2}(?:(:").concat(xD,"){0,3}:").concat(k8,"|(:").concat(xD,"){1,5}|:)|")+"(?:".concat(xD,":){1}(?:(:").concat(xD,"){0,4}:").concat(k8,"|(:").concat(xD,"){1,6}|:)|")+"(?::((?::".concat(xD,"){0,5}:").concat(k8,"|(?::").concat(xD,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");$h.exports=S4.default;$h.exports.default=S4.default});var b8=X((H4,fh)=>{function c0D(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=arguments.length>1?arguments[1]:void 0;for(var E in F)if(typeof D[E]==="undefined")D[E]=F[E];return D}Object.defineProperty(H4,"__esModule",{value:!0});H4.default=c0D;fh.exports=H4.default;fh.exports.default=H4.default});var Zq=X((L4,Ch)=>{function Yq(D){return D&&D.__esModule?D:{default:D}}function v0D(D,F){r0D.default(D),F=_0D.default(F,d0D);var E=D.length;if(F.urlSafe)return u0D.test(D);if(E%4!==0||s0D.test(D))return!1;var w=D.indexOf("=");return w===-1||w===E-1||w===E-2&&D[E-1]==="="}Object.defineProperty(L4,"__esModule",{value:!0});L4.default=v0D;var r0D=Yq(LD()),_0D=Yq(b8()),s0D=/[^A-Z0-9+\/=]/i,u0D=/^[A-Z0-9_\-]*$/i,d0D={urlSafe:!1};Ch.exports=L4.default;Ch.exports.default=L4.default});var Wq=X((R4,Bh)=>{function Xq(D){return D&&D.__esModule?D:{default:D}}function i0D(D){n0D.default(D);var F=D.split("."),E=F.length;if(E!==3)return!1;return F.reduce(function(w,$){return w&&l0D.default($,{urlSafe:!0})},!0)}Object.defineProperty(R4,"__esModule",{value:!0});R4.default=i0D;var n0D=Xq(LD()),l0D=Xq(Zq());Bh.exports=R4.default;Bh.exports.default=R4.default});var Uh=X((V4,hh)=>{function Jq(D){return D&&D.__esModule?D:{default:D}}function e0D(D,F){if(a0D.default(D),F=o0D.default(F,t0D),F.allow_trailing_dot&&D[D.length-1]===".")D=D.substring(0,D.length-1);if(F.allow_wildcard===!0&&D.indexOf("*.")===0)D=D.substring(2);var E=D.split("."),w=E[E.length-1];if(F.require_tld){if(E.length<2)return!1;if(!F.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(w))return!1;if(/\s/.test(w))return!1}if(!F.allow_numeric_tld&&/^\d+$/.test(w))return!1;return E.every(function($){if($.length>63&&!F.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test($))return!1;if(/[\uff01-\uff5e]/.test($))return!1;if(/^-|-$/.test($))return!1;if(!F.allow_underscores&&/_/.test($))return!1;return!0})}Object.defineProperty(V4,"__esModule",{value:!0});V4.default=e0D;var a0D=Jq(LD()),o0D=Jq(b8()),t0D={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};hh.exports=V4.default;hh.exports.default=V4.default});var Sq=X((q4,Ah)=>{function N4(D){return D&&D.__esModule?D:{default:D}}function $2D(D,F){return h2D(D)||B2D(D,F)||C2D(D,F)||f2D()}function f2D(){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 C2D(D,F){if(!D)return;if(typeof D==="string")return Tq(D,F);var E=Object.prototype.toString.call(D).slice(8,-1);if(E==="Object"&&D.constructor)E=D.constructor.name;if(E==="Map"||E==="Set")return Array.from(D);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Tq(D,F)}function Tq(D,F){if(F==null||F>D.length)F=D.length;for(var E=0,w=new Array(F);E<F;E++)w[E]=D[E];return w}function B2D(D,F){var E=D==null?null:typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(E!=null){var w,$,C,f,B=[],h=!0,U=!1;try{if(C=(E=E.call(D)).next,F===0){if(Object(E)!==E)return;h=!1}else for(;!(h=(w=C.call(E)).done)&&(B.push(w.value),B.length!==F);h=!0);}catch(I){U=!0,$=I}finally{try{if(!h&&E.return!=null&&(f=E.return(),Object(f)!==f))return}finally{if(U)throw $}}return B}}function h2D(D){if(Array.isArray(D))return D}function I2D(D){return Object.prototype.toString.call(D)==="[object RegExp]"}function Kq(D,F){for(var E=0;E<F.length;E++){var w=F[E];if(D===w||I2D(w)&&w.test(D))return!0}return!1}function G2D(D,F){if(F2D.default(D),!D||/[\s<>]/.test(D))return!1;if(D.indexOf("mailto:")===0)return!1;if(F=w2D.default(F,U2D),F.validate_length&&D.length>=2083)return!1;if(!F.allow_fragments&&D.includes("#"))return!1;if(!F.allow_query_components&&(D.includes("?")||D.includes("&")))return!1;var E,w,$,C,f,B,h,U;if(h=D.split("#"),D=h.shift(),h=D.split("?"),D=h.shift(),h=D.split("://"),h.length>1){if(E=h.shift().toLowerCase(),F.require_valid_protocol&&F.protocols.indexOf(E)===-1)return!1}else if(F.require_protocol)return!1;else if(D.slice(0,2)==="//"){if(!F.allow_protocol_relative_urls)return!1;h[0]=D.slice(2)}if(D=h.join("://"),D==="")return!1;if(h=D.split("/"),D=h.shift(),D===""&&!F.require_host)return!0;if(h=D.split("@"),h.length>1){if(F.disallow_auth)return!1;if(h[0]==="")return!1;if(w=h.shift(),w.indexOf(":")>=0&&w.split(":").length>2)return!1;var I=w.split(":"),A=$2D(I,2),Y=A[0],G=A[1];if(Y===""&&G==="")return!1}C=h.join("@"),B=null,U=null;var Z=C.match(A2D);if(Z)$="",U=Z[1],B=Z[2]||null;else if(h=C.split(":"),$=h.shift(),h.length)B=h.join(":");if(B!==null&&B.length>0){if(f=parseInt(B,10),!/^[0-9]+$/.test(B)||f<=0||f>65535)return!1}else if(F.require_port)return!1;if(F.host_whitelist)return Kq($,F.host_whitelist);if($===""&&!F.require_host)return!0;if(!zq.default($)&&!E2D.default($,F)&&(!U||!zq.default(U,6)))return!1;if($=$||U,F.host_blacklist&&Kq($,F.host_blacklist))return!1;return!0}Object.defineProperty(q4,"__esModule",{value:!0});q4.default=G2D;var F2D=N4(LD()),E2D=N4(Uh()),zq=N4(Q4()),w2D=N4(b8()),U2D={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},A2D=/^\[([^\]]+)\](?::([0-9]+))?$/;Ah.exports=q4.default;Ah.exports.default=q4.default});var Qq=X((O4,Ih)=>{function Z2D(D){return D&&D.__esModule?D:{default:D}}function W2D(D){return Y2D.default(D),X2D.test(D)}Object.defineProperty(O4,"__esModule",{value:!0});O4.default=W2D;var Y2D=Z2D(LD()),X2D=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;Ih.exports=O4.default;Ih.exports.default=O4.default});var Rq=X((Hq)=>{function T2D(D){return D&&D.__esModule?D:{default:D}}function K2D(D){var F=D.filter(function(E){return!(E in j4)});if(F.length>0)return!1;return!0}function S2D(D,F){var E=D.replace(/[\s\-]+/gi,"").toUpperCase(),w=E.slice(0,2).toUpperCase(),$=w in j4;if(F.whitelist){if(!K2D(F.whitelist))return!1;var C=F.whitelist.includes(w);if(!C)return!1}if(F.blacklist){var f=F.blacklist.includes(w);if(f)return!1}return $&&j4[w].test(E)}function Q2D(D){var F=D.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),E=F.slice(4)+F.slice(0,4),w=E.replace(/[A-Z]/g,function(C){return C.charCodeAt(0)-55}),$=w.match(/\d{1,7}/g).reduce(function(C,f){return Number(C+f)%97},"");return $===1}function H2D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return z2D.default(D),S2D(D,F)&&Q2D(D)}Object.defineProperty(Hq,"__esModule",{value:!0});Hq.default=H2D;Hq.locales=void 0;var z2D=T2D(LD()),j4={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}$/},_jD=Hq.locales=Object.keys(j4)});var Vq=X((P4,Gh)=>{function V2D(D){return D&&D.__esModule?D:{default:D}}function q2D(D,F){R2D.default(D);var E=N2D[![void 0,null].includes(F)?F:"all"];return!!E&&E.test(D)}Object.defineProperty(P4,"__esModule",{value:!0});P4.default=q2D;var R2D=V2D(LD()),N2D={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};Gh.exports=P4.default;Gh.exports.default=P4.default});var Nq=X((y4,Mh)=>{function P2D(D){return D&&D.__esModule?D:{default:D}}function k2D(D){return j2D.default(D),y2D.test(D)}Object.defineProperty(y4,"__esModule",{value:!0});y4.default=k2D;var j2D=P2D(LD()),y2D=/^[\x00-\x7F]+$/;Mh.exports=y4.default;Mh.exports.default=y4.default});var qq=X((k4,Zh)=>{function c2D(D){return D&&D.__esModule?D:{default:D}}function Yh(D){return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},Yh(D)}function g2D(D,F){x2D.default(D);var E,w;if(Yh(F)==="object")E=F.min||0,w=F.max;else E=arguments[1],w=arguments[2];var $=encodeURI(D).split(/%..|./).length-1;return $>=E&&(typeof w==="undefined"||$<=w)}Object.defineProperty(k4,"__esModule",{value:!0});k4.default=g2D;var x2D=c2D(LD());Zh.exports=k4.default;Zh.exports.default=k4.default});var jq=X((b4,Wh)=>{function a3(D){return D&&D.__esModule?D:{default:D}}function o2D(D){var F=D.replace(/^"(.+)"$/,"$1");if(!F.trim())return!1;var E=/[\.";<>]/.test(F);if(E){if(F===D)return!1;var w=F.split('"').length===F.split('\\"').length;if(!w)return!1}return!0}function t2D(D,F){if(_2D.default(D),F=u2D.default(F,d2D),F.require_display_name||F.allow_display_name){var E=D.match(v2D);if(E){var w=E[1];if(D=D.replace(w,"").replace(/(^<|>$)/g,""),w.endsWith(" "))w=w.slice(0,-1);if(!o2D(w))return!1}else if(F.require_display_name)return!1}if(!F.ignore_max_length&&D.length>a2D)return!1;var $=D.split("@"),C=$.pop(),f=C.toLowerCase();if(F.host_blacklist.includes(f))return!1;if(F.host_whitelist.length>0&&!F.host_whitelist.includes(f))return!1;var B=$.join("@");if(F.domain_specific_validation&&(f==="gmail.com"||f==="googlemail.com")){B=B.toLowerCase();var h=B.split("+")[0];if(!Xh.default(h.replace(/\./g,""),{min:6,max:30}))return!1;var U=h.split(".");for(var I=0;I<U.length;I++)if(!n2D.test(U[I]))return!1}if(F.ignore_max_length===!1&&(!Xh.default(B,{max:64})||!Xh.default(C,{max:254})))return!1;if(!s2D.default(C,{require_tld:F.require_tld,ignore_max_length:F.ignore_max_length,allow_underscores:F.allow_underscores})){if(!F.allow_ip_domain)return!1;if(!Oq.default(C)){if(!C.startsWith("[")||!C.endsWith("]"))return!1;var A=C.slice(1,-1);if(A.length===0||!Oq.default(A))return!1}}if(B[0]==='"')return B=B.slice(1,B.length-1),F.allow_utf8_local_part?p2D.test(B):l2D.test(B);var Y=F.allow_utf8_local_part?i2D:m2D,G=B.split(".");for(var Z=0;Z<G.length;Z++)if(!Y.test(G[Z]))return!1;if(F.blacklisted_chars){if(B.search(new RegExp("[".concat(F.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}Object.defineProperty(b4,"__esModule",{value:!0});b4.default=t2D;var _2D=a3(LD()),Xh=a3(qq()),s2D=a3(Uh()),Oq=a3(Q4()),u2D=a3(b8()),d2D={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:[]},v2D=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,m2D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,n2D=/^[a-z\d]+$/,l2D=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,i2D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p2D=/^([\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,a2D=254;Wh.exports=b4.default;Wh.exports.default=b4.default});var d4=X((gq)=>{Object.defineProperty(gq,"__esModule",{value:!0});gq.farsiLocales=gq.englishLocales=gq.dotDecimal=gq.decimal=gq.commaDecimal=gq.bengaliLocales=gq.arabicLocales=gq.alphanumeric=gq.alpha=void 0;var Q0=gq.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]+$/},H0=gq.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]+$/},G0=gq.decimal={"en-US":".",ar:"\u066B"},Pq=gq.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(x4=0;x4<Pq.length;x4++)o3="en-".concat(Pq[x4]),Q0[o3]=Q0["en-US"],H0[o3]=H0["en-US"],G0[o3]=G0["en-US"];var o3,x4,yq=gq.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(c4=0;c4<yq.length;c4++)t3="ar-".concat(yq[c4]),Q0[t3]=Q0.ar,H0[t3]=H0.ar,G0[t3]=G0.ar;var t3,c4,kq=gq.farsiLocales=["IR","AF"];for(r4=0;r4<kq.length;r4++)g4="fa-".concat(kq[r4]),H0[g4]=H0.fa,G0[g4]=G0.ar;var g4,r4,bq=gq.bengaliLocales=["BD","IN"];for(_4=0;_4<bq.length;_4++)e3="bn-".concat(bq[_4]),Q0[e3]=Q0.bn,H0[e3]=H0.bn,G0[e3]=G0["en-US"];var e3,_4,xq=gq.dotDecimal=["ar-EG","ar-LB","ar-LY"],cq=gq.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(s4=0;s4<xq.length;s4++)G0[xq[s4]]=G0["en-US"];var s4;for(u4=0;u4<cq.length;u4++)G0[cq[u4]]=",";var u4;Q0["fr-CA"]=Q0["fr-FR"];H0["fr-CA"]=H0["fr-FR"];Q0["pt-BR"]=Q0["pt-PT"];H0["pt-BR"]=H0["pt-PT"];G0["pt-BR"]=G0["pt-PT"];Q0["pl-Pl"]=Q0["pl-PL"];H0["pl-Pl"]=H0["pl-PL"];G0["pl-Pl"]=G0["pl-PL"];Q0["fa-AF"]=Q0.fa});var uq=X((_q)=>{function U1D(D){return D&&D.__esModule?D:{default:D}}function A1D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};h1D.default(D);var w=D,$=E.ignore;if($)if($ instanceof RegExp)w=w.replace($,"");else if(typeof $==="string")w=w.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(F in Jh.alpha)return Jh.alpha[F].test(w);throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(_q,"__esModule",{value:!0});_q.default=A1D;_q.locales=void 0;var h1D=U1D(LD()),Jh=d4(),djD=_q.locales=Object.keys(Jh.alpha)});var vq=X((v4,zh)=>{function dq(D){return D&&D.__esModule?D:{default:D}}function z1D(D,F){if(G1D.default(D),F=M1D.default(F,J1D),!D.includes(","))return!1;var E=D.split(",");if(E[0].startsWith("(")&&!E[1].endsWith(")")||E[1].endsWith(")")&&!E[0].startsWith("("))return!1;if(F.checkDMS)return X1D.test(E[0])&&W1D.test(E[1]);return Y1D.test(E[0])&&Z1D.test(E[1])}Object.defineProperty(v4,"__esModule",{value:!0});v4.default=z1D;var G1D=dq(LD()),M1D=dq(b8()),Y1D=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,Z1D=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,X1D=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,W1D=/^\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,J1D={checkDMS:!1};zh.exports=v4.default;zh.exports.default=v4.default});var nq=X((m4,Th)=>{Object.defineProperty(m4,"__esModule",{value:!0});m4.default=void 0;var K1D=function D(F,E){return F.some(function(w){return E===w})},mjD=m4.default=K1D;Th.exports=m4.default;Th.exports.default=m4.default});var iq=X((n4,Sh)=>{function Kh(D){return D&&D.__esModule?D:{default:D}}function L1D(D){var F=new RegExp("^[-+]?([0-9]+)?(\\".concat(lq.decimal[D.locale],"[0-9]{").concat(D.decimal_digits,"})").concat(D.force_decimal?"":"?","$"));return F}function N1D(D,F){if(Q1D.default(D),F=S1D.default(F,R1D),F.locale in lq.decimal)return!H1D.default(V1D,D.replace(/ /g,""))&&L1D(F).test(D);throw new Error("Invalid locale '".concat(F.locale,"'"))}Object.defineProperty(n4,"__esModule",{value:!0});n4.default=N1D;var S1D=Kh(b8()),Q1D=Kh(LD()),H1D=Kh(nq()),lq=d4(),R1D={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},V1D=["","-","+"];Sh.exports=n4.default;Sh.exports.default=n4.default});var pq=X((l4,Qh)=>{function j1D(D){return D&&D.__esModule?D:{default:D}}function y1D(D){return O1D.default(D),P1D.test(D)}Object.defineProperty(l4,"__esModule",{value:!0});l4.default=y1D;var O1D=j1D(LD()),P1D=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;Qh.exports=l4.default;Qh.exports.default=l4.default});var aq=X((i4,Hh)=>{function x1D(D){return D&&D.__esModule?D:{default:D}}function c1D(D){b1D.default(D);var F=D.replace(/[- ]+/g,""),E=0,w,$,C;for(var f=F.length-1;f>=0;f--){if(w=F.substring(f,f+1),$=parseInt(w,10),C)if($*=2,$>=10)E+=$%10+1;else E+=$;else E+=$;C=!C}return!!(E%10===0?F:!1)}Object.defineProperty(i4,"__esModule",{value:!0});i4.default=c1D;var b1D=x1D(LD());Hh.exports=i4.default;Hh.exports.default=i4.default});var tq=X((p4,Lh)=>{function oq(D){return D&&D.__esModule?D:{default:D}}function u1D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r1D.default(D);var E=F.provider,w=D.replace(/[- ]+/g,"");if(E&&E.toLowerCase()in JF){if(!JF[E.toLowerCase()].test(w))return!1}else if(E&&!(E.toLowerCase()in JF))throw new Error("".concat(E," is not a valid credit card provider."));else if(!s1D.some(function($){return $.test(w)}))return!1;return _1D.default(D)}Object.defineProperty(p4,"__esModule",{value:!0});p4.default=u1D;var r1D=oq(LD()),_1D=oq(aq()),JF={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})?$/},s1D=function(){var D=[];for(var F in JF)if(JF.hasOwnProperty(F))D.push(JF[F]);return D}();Lh.exports=p4.default;Lh.exports.default=p4.default});var FO=X((eq)=>{function m1D(D){return D&&D.__esModule?D:{default:D}}function n1D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};v1D.default(D);var w=D,$=E.ignore;if($)if($ instanceof RegExp)w=w.replace($,"");else if(typeof $==="string")w=w.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(F in Rh.alphanumeric)return Rh.alphanumeric[F].test(w);throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(eq,"__esModule",{value:!0});eq.default=n1D;eq.locales=void 0;var v1D=m1D(LD()),Rh=d4(),njD=eq.locales=Object.keys(Rh.alphanumeric)});var wO=X((a4,Vh)=>{function p1D(D){return D&&D.__esModule?D:{default:D}}function a1D(D,F){i1D.default(D);var E=D.replace(/\s/g,"").toUpperCase();return F.toUpperCase()in EO&&EO[F].test(E)}Object.defineProperty(a4,"__esModule",{value:!0});a4.default=a1D;var i1D=p1D(LD()),EO={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}$/};Vh.exports=a4.default;Vh.exports.default=a4.default});var qh=X((fO)=>{function e1D(D){return D&&D.__esModule?D:{default:D}}function D8D(D,F){if(t1D.default(D),F in zF)return zF[F].test(D);else if(F==="any"){for(var E in zF)if(zF.hasOwnProperty(E)){var w=zF[E];if(w.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(fO,"__esModule",{value:!0});fO.default=D8D;fO.locales=void 0;var t1D=e1D(LD()),$O=/^\d{3}$/,c0=/^\d{4}$/,M0=/^\d{5}$/,Nh=/^\d{6}$/,zF={AD:/^AD\d{3}$/,AT:c0,AU:c0,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:c0,BG:c0,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:c0,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:M0,DK:c0,DO:M0,DZ:M0,EE:M0,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:M0,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:c0,ID:M0,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:$O,IT:M0,JP:/^\d{3}\-\d{4}$/,KE:M0,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:c0,LV:/^LV\-\d{4}$/,LK:M0,MG:$O,MX:M0,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:M0,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:c0,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:c0,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:Nh,RU:Nh,SA:M0,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:Nh,SI:c0,SK:/^\d{3}\s?\d{2}$/,TH:M0,TN:c0,TW:/^\d{3}(\d{2})?$/,UA:M0,US:/^\d{5}(-\d{4})?$/,ZA:c0,ZM:M0},ijD=fO.locales=Object.keys(zF)});var Oh=X((BO)=>{function w8D(D){return D&&D.__esModule?D:{default:D}}function $8D(D,F,E){if(E8D.default(D),E&&E.strictMode&&!D.startsWith("+"))return!1;if(Array.isArray(F))return F.some(function(C){if(TD.hasOwnProperty(C)){var f=TD[C];if(f.test(D))return!0}return!1});else if(F in TD)return TD[F].test(D);else if(!F||F==="any"){for(var w in TD)if(TD.hasOwnProperty(w)){var $=TD[w];if($.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(BO,"__esModule",{value:!0});BO.default=$8D;BO.locales=void 0;var E8D=w8D(LD()),TD={"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})$/};TD["en-CA"]=TD["en-US"];TD["fr-CA"]=TD["en-CA"];TD["fr-BE"]=TD["nl-BE"];TD["zh-HK"]=TD["en-HK"];TD["zh-MO"]=TD["en-MO"];TD["ga-IE"]=TD["en-IE"];TD["fr-CH"]=TD["de-CH"];TD["it-CH"]=TD["fr-CH"];var ajD=BO.locales=Object.keys(TD)});var xh=X((kh,bh)=>{(function(D,F){typeof kh=="object"&&typeof bh!="undefined"?bh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs=F()})(kh,function(){var D=1000,F=60000,E=3600000,w="millisecond",$="second",C="minute",f="hour",B="day",h="week",U="month",I="quarter",A="year",Y="date",G="Invalid Date",Z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,z=/\[([^\]]+)]|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,W={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(_){var j=["th","st","nd","rd"],N=_%100;return"["+_+(j[(N-20)%10]||j[N]||j[0])+"]"}},J=function(_,j,N){var g=String(_);return!g||g.length>=j?_:""+Array(j+1-g.length).join(N)+_},K={s:J,z:function(_){var j=-_.utcOffset(),N=Math.abs(j),g=Math.floor(N/60),P=N%60;return(j<=0?"+":"-")+J(g,2,"0")+":"+J(P,2,"0")},m:function _(j,N){if(j.date()<N.date())return-_(N,j);var g=12*(N.year()-j.year())+(N.month()-j.month()),P=j.clone().add(g,U),v=N-P<0,n=j.clone().add(g+(v?-1:1),U);return+(-(g+(N-P)/(v?P-n:n-P))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:U,y:A,w:h,d:B,D:Y,h:f,m:C,s:$,ms:w,Q:I}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},L="en",V={};V[L]=W;var m="$isDayjsObject",DD=function(_){return _ instanceof hD||!(!_||!_[m])},wD=function _(j,N,g){var P;if(!j)return L;if(typeof j=="string"){var v=j.toLowerCase();V[v]&&(P=v),N&&(V[v]=N,P=v);var n=j.split("-");if(!P&&n.length>1)return _(n[0])}else{var e=j.name;V[e]=j,P=e}return!g&&P&&(L=P),P||!g&&L},t=function(_,j){if(DD(_))return _.clone();var N=typeof j=="object"?j:{};return N.date=_,N.args=arguments,new hD(N)},b=K;b.l=wD,b.i=DD,b.w=function(_,j){return t(_,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var hD=function(){function _(N){this.$L=wD(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[m]=!0}var j=_.prototype;return j.parse=function(N){this.$d=function(g){var{date:P,utc:v}=g;if(P===null)return new Date(NaN);if(b.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var n=P.match(Z);if(n){var e=n[2]-1||0,MD=(n[7]||"0").substring(0,3);return v?new Date(Date.UTC(n[1],e,n[3]||1,n[4]||0,n[5]||0,n[6]||0,MD)):new Date(n[1],e,n[3]||1,n[4]||0,n[5]||0,n[6]||0,MD)}}return new Date(P)}(N),this.init()},j.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},j.$utils=function(){return b},j.isValid=function(){return this.$d.toString()!==G},j.isSame=function(N,g){var P=t(N);return this.startOf(g)<=P&&P<=this.endOf(g)},j.isAfter=function(N,g){return t(N)<this.startOf(g)},j.isBefore=function(N,g){return this.endOf(g)<t(N)},j.$g=function(N,g,P){return b.u(N)?this[g]:this.set(P,N)},j.unix=function(){return Math.floor(this.valueOf()/1000)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(N,g){var P=this,v=!!b.u(g)||g,n=b.p(N),e=function(q2,iD){var g0=b.w(P.$u?Date.UTC(P.$y,iD,q2):new Date(P.$y,iD,q2),P);return v?g0:g0.endOf(B)},MD=function(q2,iD){return b.w(P.toDate()[q2].apply(P.toDate("s"),(v?[0,0,0,0]:[23,59,59,999]).slice(iD)),P)},QD=this.$W,uD=this.$M,X0=this.$D,D8="set"+(this.$u?"UTC":"");switch(n){case A:return v?e(1,0):e(31,11);case U:return v?e(1,uD):e(0,uD+1);case h:var S1=this.$locale().weekStart||0,u8=(QD<S1?QD+7:QD)-S1;return e(v?X0-u8:X0+(6-u8),uD);case B:case Y:return MD(D8+"Hours",0);case f:return MD(D8+"Minutes",1);case C:return MD(D8+"Seconds",2);case $:return MD(D8+"Milliseconds",3);default:return this.clone()}},j.endOf=function(N){return this.startOf(N,!1)},j.$set=function(N,g){var P,v=b.p(N),n="set"+(this.$u?"UTC":""),e=(P={},P[B]=n+"Date",P[Y]=n+"Date",P[U]=n+"Month",P[A]=n+"FullYear",P[f]=n+"Hours",P[C]=n+"Minutes",P[$]=n+"Seconds",P[w]=n+"Milliseconds",P)[v],MD=v===B?this.$D+(g-this.$W):g;if(v===U||v===A){var QD=this.clone().set(Y,1);QD.$d[e](MD),QD.init(),this.$d=QD.set(Y,Math.min(this.$D,QD.daysInMonth())).$d}else e&&this.$d[e](MD);return this.init(),this},j.set=function(N,g){return this.clone().$set(N,g)},j.get=function(N){return this[b.p(N)]()},j.add=function(N,g){var P,v=this;N=Number(N);var n=b.p(g),e=function(uD){var X0=t(v);return b.w(X0.date(X0.date()+Math.round(uD*N)),v)};if(n===U)return this.set(U,this.$M+N);if(n===A)return this.set(A,this.$y+N);if(n===B)return e(1);if(n===h)return e(7);var MD=(P={},P[C]=F,P[f]=E,P[$]=D,P)[n]||1,QD=this.$d.getTime()+N*MD;return b.w(QD,this)},j.subtract=function(N,g){return this.add(-1*N,g)},j.format=function(N){var g=this,P=this.$locale();if(!this.isValid())return P.invalidDate||G;var v=N||"YYYY-MM-DDTHH:mm:ssZ",n=b.z(this),e=this.$H,MD=this.$m,QD=this.$M,uD=P.weekdays,X0=P.months,D8=P.meridiem,S1=function(iD,g0,Q1,F8){return iD&&(iD[g0]||iD(g,v))||Q1[g0].slice(0,F8)},u8=function(iD){return b.s(e%12||12,iD,"0")},q2=D8||function(iD,g0,Q1){var F8=iD<12?"AM":"PM";return Q1?F8.toLowerCase():F8};return v.replace(z,function(iD,g0){return g0||function(Q1){switch(Q1){case"YY":return String(g.$y).slice(-2);case"YYYY":return b.s(g.$y,4,"0");case"M":return QD+1;case"MM":return b.s(QD+1,2,"0");case"MMM":return S1(P.monthsShort,QD,X0,3);case"MMMM":return S1(X0,QD);case"D":return g.$D;case"DD":return b.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return S1(P.weekdaysMin,g.$W,uD,2);case"ddd":return S1(P.weekdaysShort,g.$W,uD,3);case"dddd":return uD[g.$W];case"H":return String(e);case"HH":return b.s(e,2,"0");case"h":return u8(1);case"hh":return u8(2);case"a":return q2(e,MD,!0);case"A":return q2(e,MD,!1);case"m":return String(MD);case"mm":return b.s(MD,2,"0");case"s":return String(g.$s);case"ss":return b.s(g.$s,2,"0");case"SSS":return b.s(g.$ms,3,"0");case"Z":return n}return null}(iD)||n.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(N,g,P){var v,n=this,e=b.p(g),MD=t(N),QD=(MD.utcOffset()-this.utcOffset())*F,uD=this-MD,X0=function(){return b.m(n,MD)};switch(e){case A:v=X0()/12;break;case U:v=X0();break;case I:v=X0()/3;break;case h:v=(uD-QD)/604800000;break;case B:v=(uD-QD)/86400000;break;case f:v=uD/E;break;case C:v=uD/F;break;case $:v=uD/D;break;default:v=uD}return P?v:b.a(v)},j.daysInMonth=function(){return this.endOf(U).$D},j.$locale=function(){return V[this.$L]},j.locale=function(N,g){if(!N)return this.$L;var P=this.clone(),v=wD(N,g,!0);return v&&(P.$L=v),P},j.clone=function(){return b.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},_}(),tD=hD.prototype;return t.prototype=tD,[["$ms",w],["$s",$],["$m",C],["$H",f],["$W",B],["$M",U],["$y",A],["$D",Y]].forEach(function(_){tD[_[1]]=function(j){return this.$g(j,_[0],_[1])}}),t.extend=function(_,j){return _.$i||(_(j,hD,t),_.$i=!0),t},t.locale=wD,t.isDayjs=DD,t.unix=function(_){return t(1000*_)},t.en=V[L],t.Ls=V,t.p={},t})});var yO=X((ch,gh)=>{(function(D,F){typeof ch=="object"&&typeof gh!="undefined"?gh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrAfter=F()})(ch,function(){return function(D,F){F.prototype.isSameOrAfter=function(E,w){return this.isSame(E,w)||this.isAfter(E,w)}}})});var kO=X((rh,_h)=>{(function(D,F){typeof rh=="object"&&typeof _h!="undefined"?_h.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrBefore=F()})(rh,function(){return function(D,F){F.prototype.isSameOrBefore=function(E,w){return this.isSame(E,w)||this.isBefore(E,w)}}})});var bO=X((sh,uh)=>{(function(D,F){typeof sh=="object"&&typeof uh!="undefined"?uh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_customParseFormat=F()})(sh,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"},F=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,E=/\d/,w=/\d\d/,$=/\d\d?/,C=/\d*[^-_:/,()\s\d]+/,f={},B=function(Z){return(Z=+Z)+(Z>68?1900:2000)},h=function(Z){return function(z){this[Z]=+z}},U=[/[+-]\d\d:?(\d\d)?|Z/,function(Z){(this.zone||(this.zone={})).offset=function(z){if(!z)return 0;if(z==="Z")return 0;var W=z.match(/([+-]|\d\d)/g),J=60*W[1]+(+W[2]||0);return J===0?0:W[0]==="+"?-J:J}(Z)}],I=function(Z){var z=f[Z];return z&&(z.indexOf?z:z.s.concat(z.f))},A=function(Z,z){var W,J=f.meridiem;if(J){for(var K=1;K<=24;K+=1)if(Z.indexOf(J(K,0,z))>-1){W=K>12;break}}else W=Z===(z?"pm":"PM");return W},Y={A:[C,function(Z){this.afternoon=A(Z,!1)}],a:[C,function(Z){this.afternoon=A(Z,!0)}],Q:[E,function(Z){this.month=3*(Z-1)+1}],S:[E,function(Z){this.milliseconds=100*+Z}],SS:[w,function(Z){this.milliseconds=10*+Z}],SSS:[/\d{3}/,function(Z){this.milliseconds=+Z}],s:[$,h("seconds")],ss:[$,h("seconds")],m:[$,h("minutes")],mm:[$,h("minutes")],H:[$,h("hours")],h:[$,h("hours")],HH:[$,h("hours")],hh:[$,h("hours")],D:[$,h("day")],DD:[w,h("day")],Do:[C,function(Z){var z=f.ordinal,W=Z.match(/\d+/);if(this.day=W[0],z)for(var J=1;J<=31;J+=1)z(J).replace(/\[|\]/g,"")===Z&&(this.day=J)}],w:[$,h("week")],ww:[w,h("week")],M:[$,h("month")],MM:[w,h("month")],MMM:[C,function(Z){var z=I("months"),W=(I("monthsShort")||z.map(function(J){return J.slice(0,3)})).indexOf(Z)+1;if(W<1)throw new Error;this.month=W%12||W}],MMMM:[C,function(Z){var z=I("months").indexOf(Z)+1;if(z<1)throw new Error;this.month=z%12||z}],Y:[/[+-]?\d+/,h("year")],YY:[w,function(Z){this.year=B(Z)}],YYYY:[/\d{4}/,h("year")],Z:U,ZZ:U};function G(Z){var z,W;z=Z,W=f&&f.formats;for(var J=(Z=z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,b,hD){var tD=hD&&hD.toUpperCase();return b||W[hD]||D[hD]||W[tD].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(_,j,N){return j||N.slice(1)})})).match(F),K=J.length,L=0;L<K;L+=1){var V=J[L],m=Y[V],DD=m&&m[0],wD=m&&m[1];J[L]=wD?{regex:DD,parser:wD}:V.replace(/^\[|\]$/g,"")}return function(t){for(var b={},hD=0,tD=0;hD<K;hD+=1){var _=J[hD];if(typeof _=="string")tD+=_.length;else{var{regex:j,parser:N}=_,g=t.slice(tD),P=j.exec(g)[0];N.call(b,P),t=t.replace(P,"")}}return function(v){var n=v.afternoon;if(n!==void 0){var e=v.hours;n?e<12&&(v.hours+=12):e===12&&(v.hours=0),delete v.afternoon}}(b),b}}return function(Z,z,W){W.p.customParseFormat=!0,Z&&Z.parseTwoDigitYear&&(B=Z.parseTwoDigitYear);var J=z.prototype,K=J.parse;J.parse=function(L){var{date:V,utc:m,args:DD}=L;this.$u=m;var wD=DD[1];if(typeof wD=="string"){var t=DD[2]===!0,b=DD[3]===!0,hD=t||b,tD=DD[2];b&&(tD=DD[2]),f=this.$locale(),!t&&tD&&(f=W.Ls[tD]),this.$d=function(g,P,v,n){try{if(["x","X"].indexOf(P)>-1)return new Date((P==="X"?1000:1)*g);var e=G(P)(g),MD=e.year,QD=e.month,uD=e.day,X0=e.hours,D8=e.minutes,S1=e.seconds,u8=e.milliseconds,q2=e.zone,iD=e.week,g0=new Date,Q1=uD||(MD||QD?1:g0.getDate()),F8=MD||g0.getFullYear(),RE=0;MD&&!QD||(RE=QD>0?QD-1:g0.getMonth());var VE,d7=X0||0,v7=D8||0,m7=S1||0,n7=u8||0;return q2?new Date(Date.UTC(F8,RE,Q1,d7,v7,m7,n7+60*q2.offset*1000)):v?new Date(Date.UTC(F8,RE,Q1,d7,v7,m7,n7)):(VE=new Date(F8,RE,Q1,d7,v7,m7,n7),iD&&(VE=n(VE).week(iD).toDate()),VE)}catch(F7D){return new Date("")}}(V,wD,m,W),this.init(),tD&&tD!==!0&&(this.$L=this.locale(tD).$L),hD&&V!=this.format(wD)&&(this.$d=new Date("")),f={}}else if(wD instanceof Array)for(var _=wD.length,j=1;j<=_;j+=1){DD[1]=wD[j-1];var N=W.apply(this,DD);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}j===_&&(this.$d=new Date(""))}else K.call(this,L)}}})});var xO=X((t4,mh)=>{function J8D(D){return D&&D.__esModule?D:{default:D}}function z8D(D){return W8D.default(D),D.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}Object.defineProperty(t4,"__esModule",{value:!0});t4.default=z8D;var W8D=J8D(LD());mh.exports=t4.default;mh.exports.default=t4.default});var cO=X((e4,nh)=>{function S8D(D){return D&&D.__esModule?D:{default:D}}function N8D(D){if(D.length>1)return D;return""}function q8D(D,F){F=K8D.default(F,Q8D);var E=D.split("@"),w=E.pop(),$=E.join("@"),C=[$,w];if(C[1]=C[1].toLowerCase(),C[1]==="gmail.com"||C[1]==="googlemail.com"){if(F.gmail_remove_subaddress)C[0]=C[0].split("+")[0];if(F.gmail_remove_dots)C[0]=C[0].replace(/\.+/g,N8D);if(!C[0].length)return!1;if(F.all_lowercase||F.gmail_lowercase)C[0]=C[0].toLowerCase();C[1]=F.gmail_convert_googlemaildotcom?"gmail.com":C[1]}else if(H8D.indexOf(C[1])>=0){if(F.icloud_remove_subaddress)C[0]=C[0].split("+")[0];if(!C[0].length)return!1;if(F.all_lowercase||F.icloud_lowercase)C[0]=C[0].toLowerCase()}else if(L8D.indexOf(C[1])>=0){if(F.outlookdotcom_remove_subaddress)C[0]=C[0].split("+")[0];if(!C[0].length)return!1;if(F.all_lowercase||F.outlookdotcom_lowercase)C[0]=C[0].toLowerCase()}else if(R8D.indexOf(C[1])>=0){if(F.yahoo_remove_subaddress){var f=C[0].split("-");C[0]=f.length>1?f.slice(0,-1).join("-"):f[0]}if(!C[0].length)return!1;if(F.all_lowercase||F.yahoo_lowercase)C[0]=C[0].toLowerCase()}else if(V8D.indexOf(C[1])>=0){if(F.all_lowercase||F.yandex_lowercase)C[0]=C[0].toLowerCase();C[1]="yandex.ru"}else if(F.all_lowercase)C[0]=C[0].toLowerCase();return C.join("@")}Object.defineProperty(e4,"__esModule",{value:!0});e4.default=q8D;var K8D=S8D(b8()),Q8D={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},H8D=["icloud.com","me.com"],L8D=["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"],R8D=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],V8D=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];nh.exports=e4.default;nh.exports.default=e4.default});function EU(D){return D!==null&&typeof D==="object"}function CU(D,F,E=".",w){if(!EU(F))return CU(D,{},E,w);const $=Object.assign({},F);for(let C in D){if(C==="__proto__"||C==="constructor")continue;const f=D[C];if(f===null||f===void 0)continue;if(w&&w($,C,f,E))continue;if(Array.isArray(f)&&Array.isArray($[C]))$[C]=[...f,...$[C]];else if(EU(f)&&EU($[C]))$[C]=CU(f,$[C],(E?`${E}.`:"")+C.toString(),w);else $[C]=f}return $}function cFD(D){return(...F)=>F.reduce((E,w)=>CU(E,w,"",D),{})}function rFD(D){return Object.prototype.toString.call(D)==="[object Object]"}function _FD(D){if(!rFD(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}function $U(D,F={},E=3){if(D===void 0)return E;if(typeof D==="number")return D;if(F[D]&&F[D].level!==void 0)return F[D].level;return E}function By(D={}){return new lD(D)}class lD{constructor(D={}){const F=D.types||fU;this.options=gFD({...D,defaults:{...D.defaults},level:$U(D.level,F),reporters:[...D.reporters||[]]},{types:fU,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let E in F){const w={type:E,...this.options.defaults,...F[E]};this[E]=this._wrapLogFn(w),this[E].raw=this._wrapLogFn(w,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=$U(D,this.options.types,this.options.level)}prompt(D,F){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(D,F)}create(D){const F=new lD({...this.options,...D});if(this._mockFn)F.mockTypes(this._mockFn);return F}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){const F=this.options.reporters.indexOf(D);if(F>=0)return this.options.reporters.splice(F,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,F){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(E)=>{this[F].raw(String(E).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(){wU=!0}resumeLogs(){wU=!1;const D=Cy.splice(0);for(let F of D)F[0]._logFn(F[1],F[2])}mockTypes(D){const F=D||this.options.mockFn;if(this._mockFn=F,typeof F!=="function")return;for(let E in this.options.types)this[E]=F(E,this.options.types[E])||this[E],this[E].raw=this[E]}_wrapLogFn(D,F){return(...E)=>{if(wU){Cy.push([this,D,E,F]);return}return this._logFn(D,E,F)}}_logFn(D,F,E){if((D.level||0)>this.level)return!1;const w={date:new Date,args:[],...D,level:$U(D.level,this.options.types)};if(!E&&F.length===1&&_FD(F[0]))Object.assign(w,F[0]);else w.args=[...F];if(w.message)w.args.unshift(w.message),delete w.message;if(w.additional){if(!Array.isArray(w.additional))w.additional=w.additional.split("\n");w.args.push("\n"+w.additional.join("\n")),delete w.additional}w.type=typeof w.type==="string"?w.type.toLowerCase():"log",w.tag=typeof w.tag==="string"?w.tag:"";const $=(f=!1)=>{const B=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&B>0){const h=[...this._lastLog.object.args];if(B>1)h.push(`(repeated ${B} times)`);this._log({...this._lastLog.object,args:h}),this._lastLog.count=1}if(f)this._lastLog.object=w,this._log(w)};clearTimeout(this._lastLog.timeout);const C=this._lastLog.time&&w.date?w.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=w.date,C<this.options.throttle)try{const f=JSON.stringify([w.type,w.tag,w.args]),B=this._lastLog.serialized===f;if(this._lastLog.serialized=f,B){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout($,this.options.throttle);return}}}catch{}$(!0)}_log(D){for(let F of this.options.reporters)F.log(D,{options:this.options})}}var nD,fU,gFD,wU=!1,Cy;var I7=M(()=>{nD={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},fU={silent:{level:-1},fatal:{level:nD.fatal},error:{level:nD.error},warn:{level:nD.warn},log:{level:nD.log},info:{level:nD.info},success:{level:nD.success},fail:{level:nD.fail},ready:{level:nD.info},start:{level:nD.info},box:{level:nD.info},debug:{level:nD.debug},trace:{level:nD.trace},verbose:{level:nD.verbose}},gFD=cFD(),Cy=[];lD.prototype.add=lD.prototype.addReporter;lD.prototype.remove=lD.prototype.removeReporter;lD.prototype.clear=lD.prototype.removeReporter;lD.prototype.withScope=lD.prototype.withTag;lD.prototype.mock=lD.prototype.mockTypes;lD.prototype.pause=lD.prototype.pauseLogs;lD.prototype.resume=lD.prototype.resumeLogs});import{formatWithOptions as sFD}from"util";import{sep as uFD}from"path";function hU(D){const F=process.cwd()+uFD;return D.split("\n").splice(1).map((w)=>w.trim().replace("file://","").replace(F,""))}function dFD(D,F){return(F.__write||F.write).call(F,D)}class G7{formatStack(D,F){return" "+hU(D).join("\n ")}formatArgs(D,F){const E=D.map((w)=>{if(w&&typeof w.stack==="string")return w.message+"\n"+this.formatStack(w.stack,F);return w});return sFD(F,...E)}formatDate(D,F){return F.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,F){const E=this.formatArgs(D.args,F);if(D.type==="box")return"\n"+[BU(D.tag),D.title&&D.title,...E.split("\n")].filter(Boolean).map((w)=>" > "+w).join("\n")+"\n";return this.filterAndJoin([BU(D.type),BU(D.tag),E])}log(D,F){const E=this.formatLogObj(D,{columns:F.options.stdout.columns||0,...F.options.formatOptions});return dFD(E+"\n",D.level<2?F.options.stderr||process.stderr:F.options.stdout||process.stdout)}}var BU=(D)=>D?`[${D}]`:"";var M7=()=>{};import*as Y7 from"tty";function Gy(D,F,E,w,$=F.slice(0,Math.max(0,D))+w,C=F.slice(Math.max(0,D+E.length)),f=C.indexOf(E)){return $+(f<0?C:Gy(f,C,E,w))}function oFD(D,F,E,w,$){return D<0?E+F+w:E+Gy(D,F,w,$)+w}function tFD(D,F,E=D,w=D.length+1){return($)=>$||!($===""||$===void 0)?oFD((""+$).indexOf(F,w),$,D,F,E):""}function a(D,F,E){return tFD(`\x1B[${D}m`,`\x1B[${F}m`,E)}function eFD(D=aFD){return D?hy:Object.fromEntries(Object.keys(hy).map((F)=>[F,String]))}function My(D,F="reset"){return H[D]||H[F]}function Y0(D){return D.replace(new RegExp(D3D,"g"),"")}function UU(D,F={}){const E={...F,style:{...F3D,...F.style}},w=D.split("\n"),$=[],C=My(E.style.borderColor),f={...typeof E.style.borderStyle==="string"?Uy[E.style.borderStyle]||Uy.solid:E.style.borderStyle};if(C)for(let G in f)f[G]=C(f[G]);const B=E.style.padding%2===0?E.style.padding:E.style.padding+1,h=w.length+B,U=Math.max(...w.map((G)=>G.length))+B,I=U+B,A=E.style.marginLeft>0?" ".repeat(E.style.marginLeft):"";if(E.style.marginTop>0)$.push("".repeat(E.style.marginTop));if(E.title){const G=f.h.repeat(Math.floor((U-Y0(E.title).length)/2)),Z=f.h.repeat(U-Y0(E.title).length-Y0(G).length+B);$.push(`${A}${f.tl}${G}${E.title}${Z}${f.tr}`)}else $.push(`${A}${f.tl}${f.h.repeat(I)}${f.tr}`);const Y=E.style.valign==="center"?Math.floor((h-w.length)/2):E.style.valign==="top"?h-w.length-B:h-w.length;for(let G=0;G<h;G++)if(G<Y||G>=Y+w.length)$.push(`${A}${f.v}${" ".repeat(I)}${f.v}`);else{const Z=w[G-Y],z=" ".repeat(B),W=" ".repeat(U-Y0(Z).length);$.push(`${A}${f.v}${z}${Z}${W}${f.v}`)}if($.push(`${A}${f.bl}${f.h.repeat(I)}${f.br}`),E.style.marginBottom>0)$.push("".repeat(E.style.marginBottom));return $.join("\n")}var c8,Ay,vFD,mFD,nFD,lFD,Iy,iFD,pFD,aFD,hy,H,D3D,Uy,F3D;var CE=M(()=>{({env:c8={},argv:Ay=[],platform:vFD=""}=typeof process==="undefined"?{}:process),mFD="NO_COLOR"in c8||Ay.includes("--no-color"),nFD="FORCE_COLOR"in c8||Ay.includes("--color"),lFD=vFD==="win32",Iy=c8.TERM==="dumb",iFD=Y7&&Y7.isatty&&Y7.isatty(1)&&c8.TERM&&!Iy,pFD="CI"in c8&&(("GITHUB_ACTIONS"in c8)||("GITLAB_CI"in c8)||("CIRCLECI"in c8)),aFD=!mFD&&(nFD||lFD&&!Iy||iFD||pFD),hy={reset:a(0,0),bold:a(1,22,"\x1B[22m\x1B[1m"),dim:a(2,22,"\x1B[22m\x1B[2m"),italic:a(3,23),underline:a(4,24),inverse:a(7,27),hidden:a(8,28),strikethrough:a(9,29),black:a(30,39),red:a(31,39),green:a(32,39),yellow:a(33,39),blue:a(34,39),magenta:a(35,39),cyan:a(36,39),white:a(37,39),gray:a(90,39),bgBlack:a(40,49),bgRed:a(41,49),bgGreen:a(42,49),bgYellow:a(43,49),bgBlue:a(44,49),bgMagenta:a(45,49),bgCyan:a(46,49),bgWhite:a(47,49),blackBright:a(90,39),redBright:a(91,39),greenBright:a(92,39),yellowBright:a(93,39),blueBright:a(94,39),magentaBright:a(95,39),cyanBright:a(96,39),whiteBright:a(97,39),bgBlackBright:a(100,49),bgRedBright:a(101,49),bgGreenBright:a(102,49),bgYellowBright:a(103,49),bgBlueBright:a(104,49),bgMagentaBright:a(105,49),bgCyanBright:a(106,49),bgWhiteBright:a(107,49)},H=eFD(),D3D=["[\\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("|"),Uy={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"}},F3D={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var Py={};r0(Py,{prompt:()=>r3D});import{stdin as E3D,stdout as w3D}from"process";import Yy from"readline";import{WriteStream as $3D}from"tty";import f3D from"tty";function G3D({onlyFirst:D=!1}={}){const F=["[\\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(F,D?void 0:"g")}function Ly(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(G3D(),"")}function BE(D,F={}){if(typeof D!="string"||D.length===0||(F={ambiguousIsNarrow:!0,...F},D=Ly(D),D.length===0))return 0;D=D.replace(Z3D()," ");const E=F.ambiguousIsNarrow?1:2;let w=0;for(let $ of D){const C=$.codePointAt(0);if(C<=31||C>=127&&C<=159||C>=768&&C<=879)continue;switch(Y3D.eastAsianWidth($)){case"F":case"W":w+=2;break;case"A":w+=E;break;default:w+=1}}return w}function J3D(){const D=new Map;for(let[F,E]of Object.entries(SD)){for(let[w,$]of Object.entries(E))SD[w]={open:`\x1B[${$[0]}m`,close:`\x1B[${$[1]}m`},E[w]=SD[w],D.set($[0],$[1]);Object.defineProperty(SD,F,{value:E,enumerable:!1})}return Object.defineProperty(SD,"codes",{value:D,enumerable:!1}),SD.color.close="\x1B[39m",SD.bgColor.close="\x1B[49m",SD.color.ansi=Zy(),SD.color.ansi256=Xy(),SD.color.ansi16m=Wy(),SD.bgColor.ansi=Zy(IU),SD.bgColor.ansi256=Xy(IU),SD.bgColor.ansi16m=Wy(IU),Object.defineProperties(SD,{rgbToAnsi256:{value:(F,E,w)=>F===E&&E===w?F<8?16:F>248?231:Math.round((F-8)/247*24)+232:16+36*Math.round(F/255*5)+6*Math.round(E/255*5)+Math.round(w/255*5),enumerable:!1},hexToRgb:{value:(F)=>{const E=/[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));if(!E)return[0,0,0];let[w]=E;w.length===3&&(w=[...w].map((C)=>C+C).join(""));const $=Number.parseInt(w,16);return[$>>16&255,$>>8&255,$&255]},enumerable:!1},hexToAnsi256:{value:(F)=>SD.rgbToAnsi256(...SD.hexToRgb(F)),enumerable:!1},ansi256ToAnsi:{value:(F)=>{if(F<8)return 30+F;if(F<16)return 90+(F-8);let E,w,$;if(F>=232)E=((F-232)*10+8)/255,w=E,$=E;else{F-=16;const B=F%36;E=Math.floor(F/36)/5,w=Math.floor(B/6)/5,$=B%6/5}const C=Math.max(E,w,$)*2;if(C===0)return 30;let f=30+(Math.round($)<<2|Math.round(w)<<1|Math.round(E));return C===2&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(F,E,w)=>SD.ansi256ToAnsi(SD.rgbToAnsi256(F,E,w)),enumerable:!1},hexToAnsi:{value:(F)=>SD.ansi256ToAnsi(SD.hexToAnsi256(F)),enumerable:!1}}),SD}function Ty(D,F,E){return String(D).normalize().replace(/\r\n/g,`
33
+ `),vR=!0}throw new x("AWS_PROFILE is set, skipping fromEnv provider.",{logger:D.logger,tryNextLink:!0})}return D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),R5(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:F,ssoAccountId:E,ssoRegion:w,ssoRoleName:$,ssoSession:C}=D;if(!F&&!E&&!w&&!$&&!C)throw new x("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:D.logger});const{fromSSO:f}=await Promise.resolve().then(() => (ZC(),YC));return f(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:F}=await Promise.resolve().then(() => (dR(),uR));return F(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:F}=await Promise.resolve().then(() => (GB(),MB));return F(D)()},async()=>{D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:F}=await Promise.resolve().then(() => (zB(),JB));return F(D)()},async()=>{return D.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await IS(D))()},async()=>{throw new x("Could not load credentials from any providers",{tryNextLink:!1,logger:D.logger})}),ie,le),le=(D)=>D?.expiration!==void 0,ie=(D)=>D?.expiration!==void 0&&D.expiration.getTime()-Date.now()<300000;var mR=G(()=>{V5();fD();X2();MS()});var o6=G(()=>{mR()});var nN=W((aB,oB)=>{(function(D,F){if(typeof aB==="object"&&typeof oB==="object")oB.exports=F();else if(typeof define==="function"&&define.amd)define(function(){return F()});else D.pluralize=F()})(aB,function(){var D=[],F=[],E={},w={},$={};function C(M){if(typeof M==="string")return new RegExp("^"+M+"$","i");return M}function f(M,Z){if(M===Z)return Z;if(M===M.toLowerCase())return Z.toLowerCase();if(M===M.toUpperCase())return Z.toUpperCase();if(M[0]===M[0].toUpperCase())return Z.charAt(0).toUpperCase()+Z.substr(1).toLowerCase();return Z.toLowerCase()}function B(M,Z){return M.replace(/\$(\d{1,2})/g,function(z,X){return Z[X]||""})}function h(M,Z){return M.replace(Z[0],function(z,X){var J=B(Z[1],arguments);if(z==="")return f(M[X-1],J);return f(z,J)})}function U(M,Z,z){if(!M.length||E.hasOwnProperty(M))return Z;var X=z.length;while(X--){var J=z[X];if(J[0].test(Z))return h(Z,J)}return Z}function I(M,Z,z){return function(X){var J=X.toLowerCase();if(Z.hasOwnProperty(J))return f(X,J);if(M.hasOwnProperty(J))return f(X,M[J]);return U(J,X,z)}}function A(M,Z,z,X){return function(J){var K=J.toLowerCase();if(Z.hasOwnProperty(K))return!0;if(M.hasOwnProperty(K))return!1;return U(K,K,z)===K}}function Y(M,Z,z){var X=Z===1?Y.singular(M):Y.plural(M);return(z?Z+" ":"")+X}return Y.plural=I($,w,D),Y.isPlural=A($,w,D),Y.singular=I(w,$,F),Y.isSingular=A(w,$,F),Y.addPluralRule=function(M,Z){D.push([C(M),Z])},Y.addSingularRule=function(M,Z){F.push([C(M),Z])},Y.addUncountableRule=function(M){if(typeof M==="string"){E[M.toLowerCase()]=!0;return}Y.addPluralRule(M,"$0"),Y.addSingularRule(M,"$0")},Y.addIrregularRule=function(M,Z){Z=Z.toLowerCase(),M=M.toLowerCase(),$[M]=Z,w[Z]=M},[["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"],["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"]].forEach(function(M){return Y.addIrregularRule(M[0],M[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$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(function(M){return Y.addPluralRule(M[0],M[1])}),[[/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"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|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(function(M){return Y.addSingularRule(M[0],M[1])}),["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","species","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(Y.addUncountableRule),Y})});var lN=W((tB,eB)=>{(function(D,F,E){if(typeof tB==="object")eB.exports=E(),eB.exports.default=E();else if(typeof define==="function"&&define.amd)define(E);else F[D]=E()})("slugify",tB,function(){var D=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"}`),F=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 E(w,$){if(typeof w!=="string")throw new Error("slugify: string argument expected");$=typeof $==="string"?{replacement:$}:$||{};var C=F[$.locale]||{},f=$.replacement===void 0?"-":$.replacement,B=$.trim===void 0?!0:$.trim,h=w.normalize().split("").reduce(function(U,I){var A=C[I];if(A===void 0)A=D[I];if(A===void 0)A=I;if(A===f)A=" ";return U+A.replace($.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");if($.strict)h=h.replace(/[^A-Za-z0-9\s]/g,"");if(B)h=h.trim();if(h=h.replace(/\s+/g,f),$.lower)h=h.toLowerCase();return h}return E.extend=function(w){Object.assign(D,w)},E})});var RD=W((Q4,wh)=>{function Eh(D){return Eh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},Eh(D)}function G0D(D){var F=typeof D==="string"||D instanceof String;if(!F){var E=Eh(D);if(D===null)E="null";else if(E==="object")E=D.constructor.name;throw new TypeError("Expected a string but received a ".concat(E))}}Object.defineProperty(Q4,"__esModule",{value:!0});Q4.default=G0D;wh.exports=Q4.default;wh.exports.default=Q4.default});var L4=W((H4,fh)=>{function W0D(D){return D&&D.__esModule?D:{default:D}}function $h(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(Z0D.default(D),F=String(F),!F)return $h(D,4)||$h(D,6);if(F==="4")return X0D.test(D);if(F==="6")return J0D.test(D);return!1}Object.defineProperty(H4,"__esModule",{value:!0});H4.default=$h;var Z0D=W0D(RD()),pN="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",b8="(".concat(pN,"[.]){3}").concat(pN),X0D=new RegExp("^".concat(b8,"$")),cD="(?:[0-9a-fA-F]{1,4})",J0D=new RegExp("^("+"(?:".concat(cD,":){7}(?:").concat(cD,"|:)|")+"(?:".concat(cD,":){6}(?:").concat(b8,"|:").concat(cD,"|:)|")+"(?:".concat(cD,":){5}(?::").concat(b8,"|(:").concat(cD,"){1,2}|:)|")+"(?:".concat(cD,":){4}(?:(:").concat(cD,"){0,1}:").concat(b8,"|(:").concat(cD,"){1,3}|:)|")+"(?:".concat(cD,":){3}(?:(:").concat(cD,"){0,2}:").concat(b8,"|(:").concat(cD,"){1,4}|:)|")+"(?:".concat(cD,":){2}(?:(:").concat(cD,"){0,3}:").concat(b8,"|(:").concat(cD,"){1,5}|:)|")+"(?:".concat(cD,":){1}(?:(:").concat(cD,"){0,4}:").concat(b8,"|(:").concat(cD,"){1,6}|:)|")+"(?::((?::".concat(cD,"){0,5}:").concat(b8,"|(?::").concat(cD,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");fh.exports=H4.default;fh.exports.default=H4.default});var x8=W((R4,Ch)=>{function T0D(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=arguments.length>1?arguments[1]:void 0;for(var E in F)if(typeof D[E]==="undefined")D[E]=F[E];return D}Object.defineProperty(R4,"__esModule",{value:!0});R4.default=T0D;Ch.exports=R4.default;Ch.exports.default=R4.default});var oN=W((V4,Bh)=>{function aN(D){return D&&D.__esModule?D:{default:D}}function V0D(D,F){S0D.default(D),F=Q0D.default(F,R0D);var E=D.length;if(F.urlSafe)return L0D.test(D);if(E%4!==0||H0D.test(D))return!1;var w=D.indexOf("=");return w===-1||w===E-1||w===E-2&&D[E-1]==="="}Object.defineProperty(V4,"__esModule",{value:!0});V4.default=V0D;var S0D=aN(RD()),Q0D=aN(x8()),H0D=/[^A-Z0-9+\/=]/i,L0D=/^[A-Z0-9_\-]*$/i,R0D={urlSafe:!1};Bh.exports=V4.default;Bh.exports.default=V4.default});var eN=W((N4,hh)=>{function tN(D){return D&&D.__esModule?D:{default:D}}function j0D(D){q0D.default(D);var F=D.split("."),E=F.length;if(E!==3)return!1;return F.reduce(function(w,$){return w&&O0D.default($,{urlSafe:!0})},!0)}Object.defineProperty(N4,"__esModule",{value:!0});N4.default=j0D;var q0D=tN(RD()),O0D=tN(oN());hh.exports=N4.default;hh.exports.default=N4.default});var Ah=W((q4,Uh)=>{function Dq(D){return D&&D.__esModule?D:{default:D}}function x0D(D,F){if(y0D.default(D),F=k0D.default(F,b0D),F.allow_trailing_dot&&D[D.length-1]===".")D=D.substring(0,D.length-1);if(F.allow_wildcard===!0&&D.indexOf("*.")===0)D=D.substring(2);var E=D.split("."),w=E[E.length-1];if(F.require_tld){if(E.length<2)return!1;if(!F.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(w))return!1;if(/\s/.test(w))return!1}if(!F.allow_numeric_tld&&/^\d+$/.test(w))return!1;return E.every(function($){if($.length>63&&!F.ignore_max_length)return!1;if(!/^[a-z_\u00a1-\uffff0-9-]+$/i.test($))return!1;if(/[\uff01-\uff5e]/.test($))return!1;if(/^-|-$/.test($))return!1;if(!F.allow_underscores&&/_/.test($))return!1;return!0})}Object.defineProperty(q4,"__esModule",{value:!0});q4.default=x0D;var y0D=Dq(RD()),k0D=Dq(x8()),b0D={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};Uh.exports=q4.default;Uh.exports.default=q4.default});var $q=W((j4,Ih)=>{function O4(D){return D&&D.__esModule?D:{default:D}}function s0D(D,F){return m0D(D)||v0D(D,F)||d0D(D,F)||u0D()}function u0D(){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 d0D(D,F){if(!D)return;if(typeof D==="string")return Eq(D,F);var E=Object.prototype.toString.call(D).slice(8,-1);if(E==="Object"&&D.constructor)E=D.constructor.name;if(E==="Map"||E==="Set")return Array.from(D);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Eq(D,F)}function Eq(D,F){if(F==null||F>D.length)F=D.length;for(var E=0,w=new Array(F);E<F;E++)w[E]=D[E];return w}function v0D(D,F){var E=D==null?null:typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(E!=null){var w,$,C,f,B=[],h=!0,U=!1;try{if(C=(E=E.call(D)).next,F===0){if(Object(E)!==E)return;h=!1}else for(;!(h=(w=C.call(E)).done)&&(B.push(w.value),B.length!==F);h=!0);}catch(I){U=!0,$=I}finally{try{if(!h&&E.return!=null&&(f=E.return(),Object(f)!==f))return}finally{if(U)throw $}}return B}}function m0D(D){if(Array.isArray(D))return D}function i0D(D){return Object.prototype.toString.call(D)==="[object RegExp]"}function wq(D,F){for(var E=0;E<F.length;E++){var w=F[E];if(D===w||i0D(w)&&w.test(D))return!0}return!1}function p0D(D,F){if(g0D.default(D),!D||/[\s<>]/.test(D))return!1;if(D.indexOf("mailto:")===0)return!1;if(F=_0D.default(F,n0D),F.validate_length&&D.length>=2083)return!1;if(!F.allow_fragments&&D.includes("#"))return!1;if(!F.allow_query_components&&(D.includes("?")||D.includes("&")))return!1;var E,w,$,C,f,B,h,U;if(h=D.split("#"),D=h.shift(),h=D.split("?"),D=h.shift(),h=D.split("://"),h.length>1){if(E=h.shift().toLowerCase(),F.require_valid_protocol&&F.protocols.indexOf(E)===-1)return!1}else if(F.require_protocol)return!1;else if(D.slice(0,2)==="//"){if(!F.allow_protocol_relative_urls)return!1;h[0]=D.slice(2)}if(D=h.join("://"),D==="")return!1;if(h=D.split("/"),D=h.shift(),D===""&&!F.require_host)return!0;if(h=D.split("@"),h.length>1){if(F.disallow_auth)return!1;if(h[0]==="")return!1;if(w=h.shift(),w.indexOf(":")>=0&&w.split(":").length>2)return!1;var I=w.split(":"),A=s0D(I,2),Y=A[0],M=A[1];if(Y===""&&M==="")return!1}C=h.join("@"),B=null,U=null;var Z=C.match(l0D);if(Z)$="",U=Z[1],B=Z[2]||null;else if(h=C.split(":"),$=h.shift(),h.length)B=h.join(":");if(B!==null&&B.length>0){if(f=parseInt(B,10),!/^[0-9]+$/.test(B)||f<=0||f>65535)return!1}else if(F.require_port)return!1;if(F.host_whitelist)return wq($,F.host_whitelist);if($===""&&!F.require_host)return!0;if(!Fq.default($)&&!r0D.default($,F)&&(!U||!Fq.default(U,6)))return!1;if($=$||U,F.host_blacklist&&wq($,F.host_blacklist))return!1;return!0}Object.defineProperty(j4,"__esModule",{value:!0});j4.default=p0D;var g0D=O4(RD()),r0D=O4(Ah()),Fq=O4(L4()),_0D=O4(x8()),n0D={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},l0D=/^\[([^\]]+)\](?::([0-9]+))?$/;Ih.exports=j4.default;Ih.exports.default=j4.default});var fq=W((P4,Mh)=>{function t0D(D){return D&&D.__esModule?D:{default:D}}function D2D(D){return o0D.default(D),e0D.test(D)}Object.defineProperty(P4,"__esModule",{value:!0});P4.default=D2D;var o0D=t0D(RD()),e0D=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;Mh.exports=P4.default;Mh.exports.default=P4.default});var hq=W((Cq)=>{function w2D(D){return D&&D.__esModule?D:{default:D}}function $2D(D){var F=D.filter(function(E){return!(E in y4)});if(F.length>0)return!1;return!0}function f2D(D,F){var E=D.replace(/[\s\-]+/gi,"").toUpperCase(),w=E.slice(0,2).toUpperCase(),$=w in y4;if(F.whitelist){if(!$2D(F.whitelist))return!1;var C=F.whitelist.includes(w);if(!C)return!1}if(F.blacklist){var f=F.blacklist.includes(w);if(f)return!1}return $&&y4[w].test(E)}function C2D(D){var F=D.replace(/[^A-Z0-9]+/gi,"").toUpperCase(),E=F.slice(4)+F.slice(0,4),w=E.replace(/[A-Z]/g,function(C){return C.charCodeAt(0)-55}),$=w.match(/\d{1,7}/g).reduce(function(C,f){return Number(C+f)%97},"");return $===1}function B2D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E2D.default(D),f2D(D,F)&&C2D(D)}Object.defineProperty(Cq,"__esModule",{value:!0});Cq.default=B2D;Cq.locales=void 0;var E2D=w2D(RD()),y4={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}$/},ajD=Cq.locales=Object.keys(y4)});var Uq=W((k4,Gh)=>{function A2D(D){return D&&D.__esModule?D:{default:D}}function M2D(D,F){U2D.default(D);var E=I2D[![void 0,null].includes(F)?F:"all"];return!!E&&E.test(D)}Object.defineProperty(k4,"__esModule",{value:!0});k4.default=M2D;var U2D=A2D(RD()),I2D={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};Gh.exports=k4.default;Gh.exports.default=k4.default});var Aq=W((b4,Yh)=>{function Z2D(D){return D&&D.__esModule?D:{default:D}}function X2D(D){return Y2D.default(D),W2D.test(D)}Object.defineProperty(b4,"__esModule",{value:!0});b4.default=X2D;var Y2D=Z2D(RD()),W2D=/^[\x00-\x7F]+$/;Yh.exports=b4.default;Yh.exports.default=b4.default});var Iq=W((x4,Wh)=>{function T2D(D){return D&&D.__esModule?D:{default:D}}function Zh(D){return Zh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},Zh(D)}function K2D(D,F){z2D.default(D);var E,w;if(Zh(F)==="object")E=F.min||0,w=F.max;else E=arguments[1],w=arguments[2];var $=encodeURI(D).split(/%..|./).length-1;return $>=E&&(typeof w==="undefined"||$<=w)}Object.defineProperty(x4,"__esModule",{value:!0});x4.default=K2D;var z2D=T2D(RD());Wh.exports=x4.default;Wh.exports.default=x4.default});var Gq=W((c4,Jh)=>{function t3(D){return D&&D.__esModule?D:{default:D}}function k2D(D){var F=D.replace(/^"(.+)"$/,"$1");if(!F.trim())return!1;var E=/[\.";<>]/.test(F);if(E){if(F===D)return!1;var w=F.split('"').length===F.split('\\"').length;if(!w)return!1}return!0}function b2D(D,F){if(Q2D.default(D),F=L2D.default(F,R2D),F.require_display_name||F.allow_display_name){var E=D.match(V2D);if(E){var w=E[1];if(D=D.replace(w,"").replace(/(^<|>$)/g,""),w.endsWith(" "))w=w.slice(0,-1);if(!k2D(w))return!1}else if(F.require_display_name)return!1}if(!F.ignore_max_length&&D.length>y2D)return!1;var $=D.split("@"),C=$.pop(),f=C.toLowerCase();if(F.host_blacklist.includes(f))return!1;if(F.host_whitelist.length>0&&!F.host_whitelist.includes(f))return!1;var B=$.join("@");if(F.domain_specific_validation&&(f==="gmail.com"||f==="googlemail.com")){B=B.toLowerCase();var h=B.split("+")[0];if(!Xh.default(h.replace(/\./g,""),{min:6,max:30}))return!1;var U=h.split(".");for(var I=0;I<U.length;I++)if(!q2D.test(U[I]))return!1}if(F.ignore_max_length===!1&&(!Xh.default(B,{max:64})||!Xh.default(C,{max:254})))return!1;if(!H2D.default(C,{require_tld:F.require_tld,ignore_max_length:F.ignore_max_length,allow_underscores:F.allow_underscores})){if(!F.allow_ip_domain)return!1;if(!Mq.default(C)){if(!C.startsWith("[")||!C.endsWith("]"))return!1;var A=C.slice(1,-1);if(A.length===0||!Mq.default(A))return!1}}if(B[0]==='"')return B=B.slice(1,B.length-1),F.allow_utf8_local_part?P2D.test(B):O2D.test(B);var Y=F.allow_utf8_local_part?j2D:N2D,M=B.split(".");for(var Z=0;Z<M.length;Z++)if(!Y.test(M[Z]))return!1;if(F.blacklisted_chars){if(B.search(new RegExp("[".concat(F.blacklisted_chars,"]+"),"g"))!==-1)return!1}return!0}Object.defineProperty(c4,"__esModule",{value:!0});c4.default=b2D;var Q2D=t3(RD()),Xh=t3(Iq()),H2D=t3(Ah()),Mq=t3(L4()),L2D=t3(x8()),R2D={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:[]},V2D=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,N2D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,q2D=/^[a-z\d]+$/,O2D=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,j2D=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,P2D=/^([\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,y2D=254;Jh.exports=c4.default;Jh.exports.default=c4.default});var m4=W((Tq)=>{Object.defineProperty(Tq,"__esModule",{value:!0});Tq.farsiLocales=Tq.englishLocales=Tq.dotDecimal=Tq.decimal=Tq.commaDecimal=Tq.bengaliLocales=Tq.arabicLocales=Tq.alphanumeric=Tq.alpha=void 0;var H0=Tq.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]+$/},L0=Tq.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]+$/},G0=Tq.decimal={"en-US":".",ar:"\u066B"},Yq=Tq.englishLocales=["AU","GB","HK","IN","NZ","ZA","ZM"];for(g4=0;g4<Yq.length;g4++)e3="en-".concat(Yq[g4]),H0[e3]=H0["en-US"],L0[e3]=L0["en-US"],G0[e3]=G0["en-US"];var e3,g4,Zq=Tq.arabicLocales=["AE","BH","DZ","EG","IQ","JO","KW","LB","LY","MA","QM","QA","SA","SD","SY","TN","YE"];for(r4=0;r4<Zq.length;r4++)DE="ar-".concat(Zq[r4]),H0[DE]=H0.ar,L0[DE]=L0.ar,G0[DE]=G0.ar;var DE,r4,Wq=Tq.farsiLocales=["IR","AF"];for(s4=0;s4<Wq.length;s4++)_4="fa-".concat(Wq[s4]),L0[_4]=L0.fa,G0[_4]=G0.ar;var _4,s4,Xq=Tq.bengaliLocales=["BD","IN"];for(u4=0;u4<Xq.length;u4++)FE="bn-".concat(Xq[u4]),H0[FE]=H0.bn,L0[FE]=L0.bn,G0[FE]=G0["en-US"];var FE,u4,Jq=Tq.dotDecimal=["ar-EG","ar-LB","ar-LY"],zq=Tq.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(d4=0;d4<Jq.length;d4++)G0[Jq[d4]]=G0["en-US"];var d4;for(v4=0;v4<zq.length;v4++)G0[zq[v4]]=",";var v4;H0["fr-CA"]=H0["fr-FR"];L0["fr-CA"]=L0["fr-FR"];H0["pt-BR"]=H0["pt-PT"];L0["pt-BR"]=L0["pt-PT"];G0["pt-BR"]=G0["pt-PT"];H0["pl-Pl"]=H0["pl-PL"];L0["pl-Pl"]=L0["pl-PL"];G0["pl-Pl"]=G0["pl-PL"];H0["fa-AF"]=H0.fa});var Hq=W((Sq)=>{function n2D(D){return D&&D.__esModule?D:{default:D}}function l2D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m2D.default(D);var w=D,$=E.ignore;if($)if($ instanceof RegExp)w=w.replace($,"");else if(typeof $==="string")w=w.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(F in zh.alpha)return zh.alpha[F].test(w);throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(Sq,"__esModule",{value:!0});Sq.default=l2D;Sq.locales=void 0;var m2D=n2D(RD()),zh=m4(),ejD=Sq.locales=Object.keys(zh.alpha)});var Rq=W((n4,Th)=>{function Lq(D){return D&&D.__esModule?D:{default:D}}function E1D(D,F){if(p2D.default(D),F=a2D.default(F,F1D),!D.includes(","))return!1;var E=D.split(",");if(E[0].startsWith("(")&&!E[1].endsWith(")")||E[1].endsWith(")")&&!E[0].startsWith("("))return!1;if(F.checkDMS)return e2D.test(E[0])&&D1D.test(E[1]);return o2D.test(E[0])&&t2D.test(E[1])}Object.defineProperty(n4,"__esModule",{value:!0});n4.default=E1D;var p2D=Lq(RD()),a2D=Lq(x8()),o2D=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,t2D=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,e2D=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,D1D=/^\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,F1D={checkDMS:!1};Th.exports=n4.default;Th.exports.default=n4.default});var Nq=W((l4,Kh)=>{Object.defineProperty(l4,"__esModule",{value:!0});l4.default=void 0;var $1D=function D(F,E){return F.some(function(w){return E===w})},FPD=l4.default=$1D;Kh.exports=l4.default;Kh.exports.default=l4.default});var Oq=W((i4,Qh)=>{function Sh(D){return D&&D.__esModule?D:{default:D}}function h1D(D){var F=new RegExp("^[-+]?([0-9]+)?(\\".concat(qq.decimal[D.locale],"[0-9]{").concat(D.decimal_digits,"})").concat(D.force_decimal?"":"?","$"));return F}function I1D(D,F){if(C1D.default(D),F=f1D.default(F,U1D),F.locale in qq.decimal)return!B1D.default(A1D,D.replace(/ /g,""))&&h1D(F).test(D);throw new Error("Invalid locale '".concat(F.locale,"'"))}Object.defineProperty(i4,"__esModule",{value:!0});i4.default=I1D;var f1D=Sh(x8()),C1D=Sh(RD()),B1D=Sh(Nq()),qq=m4(),U1D={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},A1D=["","-","+"];Qh.exports=i4.default;Qh.exports.default=i4.default});var jq=W((p4,Hh)=>{function Y1D(D){return D&&D.__esModule?D:{default:D}}function W1D(D){return G1D.default(D),Z1D.test(D)}Object.defineProperty(p4,"__esModule",{value:!0});p4.default=W1D;var G1D=Y1D(RD()),Z1D=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;Hh.exports=p4.default;Hh.exports.default=p4.default});var Pq=W((a4,Lh)=>{function z1D(D){return D&&D.__esModule?D:{default:D}}function T1D(D){J1D.default(D);var F=D.replace(/[- ]+/g,""),E=0,w,$,C;for(var f=F.length-1;f>=0;f--){if(w=F.substring(f,f+1),$=parseInt(w,10),C)if($*=2,$>=10)E+=$%10+1;else E+=$;else E+=$;C=!C}return!!(E%10===0?F:!1)}Object.defineProperty(a4,"__esModule",{value:!0});a4.default=T1D;var J1D=z1D(RD());Lh.exports=a4.default;Lh.exports.default=a4.default});var kq=W((o4,Rh)=>{function yq(D){return D&&D.__esModule?D:{default:D}}function L1D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};S1D.default(D);var E=F.provider,w=D.replace(/[- ]+/g,"");if(E&&E.toLowerCase()in zF){if(!zF[E.toLowerCase()].test(w))return!1}else if(E&&!(E.toLowerCase()in zF))throw new Error("".concat(E," is not a valid credit card provider."));else if(!H1D.some(function($){return $.test(w)}))return!1;return Q1D.default(D)}Object.defineProperty(o4,"__esModule",{value:!0});o4.default=L1D;var S1D=yq(RD()),Q1D=yq(Pq()),zF={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})?$/},H1D=function(){var D=[];for(var F in zF)if(zF.hasOwnProperty(F))D.push(zF[F]);return D}();Rh.exports=o4.default;Rh.exports.default=o4.default});var cq=W((bq)=>{function N1D(D){return D&&D.__esModule?D:{default:D}}function q1D(D){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"en-US",E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};V1D.default(D);var w=D,$=E.ignore;if($)if($ instanceof RegExp)w=w.replace($,"");else if(typeof $==="string")w=w.replace(new RegExp("[".concat($.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"");else throw new Error("ignore should be instance of a String or RegExp");if(F in Vh.alphanumeric)return Vh.alphanumeric[F].test(w);throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(bq,"__esModule",{value:!0});bq.default=q1D;bq.locales=void 0;var V1D=N1D(RD()),Vh=m4(),EPD=bq.locales=Object.keys(Vh.alphanumeric)});var rq=W((t4,Nh)=>{function P1D(D){return D&&D.__esModule?D:{default:D}}function y1D(D,F){j1D.default(D);var E=D.replace(/\s/g,"").toUpperCase();return F.toUpperCase()in gq&&gq[F].test(E)}Object.defineProperty(t4,"__esModule",{value:!0});t4.default=y1D;var j1D=P1D(RD()),gq={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}$/};Nh.exports=t4.default;Nh.exports.default=t4.default});var Oh=W((sq)=>{function x1D(D){return D&&D.__esModule?D:{default:D}}function c1D(D,F){if(b1D.default(D),F in TF)return TF[F].test(D);else if(F==="any"){for(var E in TF)if(TF.hasOwnProperty(E)){var w=TF[E];if(w.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(sq,"__esModule",{value:!0});sq.default=c1D;sq.locales=void 0;var b1D=x1D(RD()),_q=/^\d{3}$/,g0=/^\d{4}$/,Y0=/^\d{5}$/,qh=/^\d{6}$/,TF={AD:/^AD\d{3}$/,AT:g0,AU:g0,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:g0,BG:g0,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:g0,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:Y0,DK:g0,DO:Y0,DZ:Y0,EE:Y0,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:Y0,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:g0,ID:Y0,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:_q,IT:Y0,JP:/^\d{3}\-\d{4}$/,KE:Y0,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:g0,LV:/^LV\-\d{4}$/,LK:Y0,MG:_q,MX:Y0,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:Y0,NL:/^[1-9]\d{3}\s?(?!sa|sd|ss)[a-z]{2}$/i,NO:g0,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:g0,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:qh,RU:qh,SA:Y0,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:qh,SI:g0,SK:/^\d{3}\s?\d{2}$/,TH:Y0,TN:g0,TW:/^\d{3}(\d{2})?$/,UA:Y0,US:/^\d{5}(-\d{4})?$/,ZA:g0,ZM:Y0},$PD=sq.locales=Object.keys(TF)});var jh=W((dq)=>{function _1D(D){return D&&D.__esModule?D:{default:D}}function s1D(D,F,E){if(r1D.default(D),E&&E.strictMode&&!D.startsWith("+"))return!1;if(Array.isArray(F))return F.some(function(C){if(TD.hasOwnProperty(C)){var f=TD[C];if(f.test(D))return!0}return!1});else if(F in TD)return TD[F].test(D);else if(!F||F==="any"){for(var w in TD)if(TD.hasOwnProperty(w)){var $=TD[w];if($.test(D))return!0}return!1}throw new Error("Invalid locale '".concat(F,"'"))}Object.defineProperty(dq,"__esModule",{value:!0});dq.default=s1D;dq.locales=void 0;var r1D=_1D(RD()),TD={"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})$/};TD["en-CA"]=TD["en-US"];TD["fr-CA"]=TD["en-CA"];TD["fr-BE"]=TD["nl-BE"];TD["zh-HK"]=TD["en-HK"];TD["zh-MO"]=TD["en-MO"];TD["ga-IE"]=TD["en-IE"];TD["fr-CH"]=TD["de-CH"];TD["it-CH"]=TD["fr-CH"];var CPD=dq.locales=Object.keys(TD)});var ch=W((bh,xh)=>{(function(D,F){typeof bh=="object"&&typeof xh!="undefined"?xh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs=F()})(bh,function(){var D=1000,F=60000,E=3600000,w="millisecond",$="second",C="minute",f="hour",B="day",h="week",U="month",I="quarter",A="year",Y="date",M="Invalid Date",Z=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,z=/\[([^\]]+)]|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,X={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(_){var j=["th","st","nd","rd"],N=_%100;return"["+_+(j[(N-20)%10]||j[N]||j[0])+"]"}},J=function(_,j,N){var g=String(_);return!g||g.length>=j?_:""+Array(j+1-g.length).join(N)+_},K={s:J,z:function(_){var j=-_.utcOffset(),N=Math.abs(j),g=Math.floor(N/60),P=N%60;return(j<=0?"+":"-")+J(g,2,"0")+":"+J(P,2,"0")},m:function _(j,N){if(j.date()<N.date())return-_(N,j);var g=12*(N.year()-j.year())+(N.month()-j.month()),P=j.clone().add(g,U),v=N-P<0,n=j.clone().add(g+(v?-1:1),U);return+(-(g+(N-P)/(v?P-n:n-P))||0)},a:function(_){return _<0?Math.ceil(_)||0:Math.floor(_)},p:function(_){return{M:U,y:A,w:h,d:B,D:Y,h:f,m:C,s:$,ms:w,Q:I}[_]||String(_||"").toLowerCase().replace(/s$/,"")},u:function(_){return _===void 0}},H="en",V={};V[H]=X;var m="$isDayjsObject",FD=function(_){return _ instanceof UD||!(!_||!_[m])},$D=function _(j,N,g){var P;if(!j)return H;if(typeof j=="string"){var v=j.toLowerCase();V[v]&&(P=v),N&&(V[v]=N,P=v);var n=j.split("-");if(!P&&n.length>1)return _(n[0])}else{var DD=j.name;V[DD]=j,P=DD}return!g&&P&&(H=P),P||!g&&H},e=function(_,j){if(FD(_))return _.clone();var N=typeof j=="object"?j:{};return N.date=_,N.args=arguments,new UD(N)},b=K;b.l=$D,b.i=FD,b.w=function(_,j){return e(_,{locale:j.$L,utc:j.$u,x:j.$x,$offset:j.$offset})};var UD=function(){function _(N){this.$L=$D(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[m]=!0}var j=_.prototype;return j.parse=function(N){this.$d=function(g){var{date:P,utc:v}=g;if(P===null)return new Date(NaN);if(b.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var n=P.match(Z);if(n){var DD=n[2]-1||0,YD=(n[7]||"0").substring(0,3);return v?new Date(Date.UTC(n[1],DD,n[3]||1,n[4]||0,n[5]||0,n[6]||0,YD)):new Date(n[1],DD,n[3]||1,n[4]||0,n[5]||0,n[6]||0,YD)}}return new Date(P)}(N),this.init()},j.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},j.$utils=function(){return b},j.isValid=function(){return this.$d.toString()!==M},j.isSame=function(N,g){var P=e(N);return this.startOf(g)<=P&&P<=this.endOf(g)},j.isAfter=function(N,g){return e(N)<this.startOf(g)},j.isBefore=function(N,g){return this.endOf(g)<e(N)},j.$g=function(N,g,P){return b.u(N)?this[g]:this.set(P,N)},j.unix=function(){return Math.floor(this.valueOf()/1000)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(N,g){var P=this,v=!!b.u(g)||g,n=b.p(N),DD=function(O2,pD){var r0=b.w(P.$u?Date.UTC(P.$y,pD,O2):new Date(P.$y,pD,O2),P);return v?r0:r0.endOf(B)},YD=function(O2,pD){return b.w(P.toDate()[O2].apply(P.toDate("s"),(v?[0,0,0,0]:[23,59,59,999]).slice(pD)),P)},QD=this.$W,dD=this.$M,X0=this.$D,D8="set"+(this.$u?"UTC":"");switch(n){case A:return v?DD(1,0):DD(31,11);case U:return v?DD(1,dD):DD(0,dD+1);case h:var S1=this.$locale().weekStart||0,d8=(QD<S1?QD+7:QD)-S1;return DD(v?X0-d8:X0+(6-d8),dD);case B:case Y:return YD(D8+"Hours",0);case f:return YD(D8+"Minutes",1);case C:return YD(D8+"Seconds",2);case $:return YD(D8+"Milliseconds",3);default:return this.clone()}},j.endOf=function(N){return this.startOf(N,!1)},j.$set=function(N,g){var P,v=b.p(N),n="set"+(this.$u?"UTC":""),DD=(P={},P[B]=n+"Date",P[Y]=n+"Date",P[U]=n+"Month",P[A]=n+"FullYear",P[f]=n+"Hours",P[C]=n+"Minutes",P[$]=n+"Seconds",P[w]=n+"Milliseconds",P)[v],YD=v===B?this.$D+(g-this.$W):g;if(v===U||v===A){var QD=this.clone().set(Y,1);QD.$d[DD](YD),QD.init(),this.$d=QD.set(Y,Math.min(this.$D,QD.daysInMonth())).$d}else DD&&this.$d[DD](YD);return this.init(),this},j.set=function(N,g){return this.clone().$set(N,g)},j.get=function(N){return this[b.p(N)]()},j.add=function(N,g){var P,v=this;N=Number(N);var n=b.p(g),DD=function(dD){var X0=e(v);return b.w(X0.date(X0.date()+Math.round(dD*N)),v)};if(n===U)return this.set(U,this.$M+N);if(n===A)return this.set(A,this.$y+N);if(n===B)return DD(1);if(n===h)return DD(7);var YD=(P={},P[C]=F,P[f]=E,P[$]=D,P)[n]||1,QD=this.$d.getTime()+N*YD;return b.w(QD,this)},j.subtract=function(N,g){return this.add(-1*N,g)},j.format=function(N){var g=this,P=this.$locale();if(!this.isValid())return P.invalidDate||M;var v=N||"YYYY-MM-DDTHH:mm:ssZ",n=b.z(this),DD=this.$H,YD=this.$m,QD=this.$M,dD=P.weekdays,X0=P.months,D8=P.meridiem,S1=function(pD,r0,Q1,F8){return pD&&(pD[r0]||pD(g,v))||Q1[r0].slice(0,F8)},d8=function(pD){return b.s(DD%12||12,pD,"0")},O2=D8||function(pD,r0,Q1){var F8=pD<12?"AM":"PM";return Q1?F8.toLowerCase():F8};return v.replace(z,function(pD,r0){return r0||function(Q1){switch(Q1){case"YY":return String(g.$y).slice(-2);case"YYYY":return b.s(g.$y,4,"0");case"M":return QD+1;case"MM":return b.s(QD+1,2,"0");case"MMM":return S1(P.monthsShort,QD,X0,3);case"MMMM":return S1(X0,QD);case"D":return g.$D;case"DD":return b.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return S1(P.weekdaysMin,g.$W,dD,2);case"ddd":return S1(P.weekdaysShort,g.$W,dD,3);case"dddd":return dD[g.$W];case"H":return String(DD);case"HH":return b.s(DD,2,"0");case"h":return d8(1);case"hh":return d8(2);case"a":return O2(DD,YD,!0);case"A":return O2(DD,YD,!1);case"m":return String(YD);case"mm":return b.s(YD,2,"0");case"s":return String(g.$s);case"ss":return b.s(g.$s,2,"0");case"SSS":return b.s(g.$ms,3,"0");case"Z":return n}return null}(pD)||n.replace(":","")})},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(N,g,P){var v,n=this,DD=b.p(g),YD=e(N),QD=(YD.utcOffset()-this.utcOffset())*F,dD=this-YD,X0=function(){return b.m(n,YD)};switch(DD){case A:v=X0()/12;break;case U:v=X0();break;case I:v=X0()/3;break;case h:v=(dD-QD)/604800000;break;case B:v=(dD-QD)/86400000;break;case f:v=dD/E;break;case C:v=dD/F;break;case $:v=dD/D;break;default:v=dD}return P?v:b.a(v)},j.daysInMonth=function(){return this.endOf(U).$D},j.$locale=function(){return V[this.$L]},j.locale=function(N,g){if(!N)return this.$L;var P=this.clone(),v=$D(N,g,!0);return v&&(P.$L=v),P},j.clone=function(){return b.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},_}(),eD=UD.prototype;return e.prototype=eD,[["$ms",w],["$s",$],["$m",C],["$H",f],["$W",B],["$M",U],["$y",A],["$D",Y]].forEach(function(_){eD[_[1]]=function(j){return this.$g(j,_[0],_[1])}}),e.extend=function(_,j){return _.$i||(_(j,UD,e),_.$i=!0),e},e.locale=$D,e.isDayjs=FD,e.unix=function(_){return e(1000*_)},e.en=V[H],e.Ls=V,e.p={},e})});var ZO=W((gh,rh)=>{(function(D,F){typeof gh=="object"&&typeof rh!="undefined"?rh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrAfter=F()})(gh,function(){return function(D,F){F.prototype.isSameOrAfter=function(E,w){return this.isSame(E,w)||this.isAfter(E,w)}}})});var WO=W((_h,sh)=>{(function(D,F){typeof _h=="object"&&typeof sh!="undefined"?sh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_isSameOrBefore=F()})(_h,function(){return function(D,F){F.prototype.isSameOrBefore=function(E,w){return this.isSame(E,w)||this.isBefore(E,w)}}})});var XO=W((uh,dh)=>{(function(D,F){typeof uh=="object"&&typeof dh!="undefined"?dh.exports=F():typeof define=="function"&&define.amd?define(F):(D=typeof globalThis!="undefined"?globalThis:D||self).dayjs_plugin_customParseFormat=F()})(uh,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"},F=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,E=/\d/,w=/\d\d/,$=/\d\d?/,C=/\d*[^-_:/,()\s\d]+/,f={},B=function(Z){return(Z=+Z)+(Z>68?1900:2000)},h=function(Z){return function(z){this[Z]=+z}},U=[/[+-]\d\d:?(\d\d)?|Z/,function(Z){(this.zone||(this.zone={})).offset=function(z){if(!z)return 0;if(z==="Z")return 0;var X=z.match(/([+-]|\d\d)/g),J=60*X[1]+(+X[2]||0);return J===0?0:X[0]==="+"?-J:J}(Z)}],I=function(Z){var z=f[Z];return z&&(z.indexOf?z:z.s.concat(z.f))},A=function(Z,z){var X,J=f.meridiem;if(J){for(var K=1;K<=24;K+=1)if(Z.indexOf(J(K,0,z))>-1){X=K>12;break}}else X=Z===(z?"pm":"PM");return X},Y={A:[C,function(Z){this.afternoon=A(Z,!1)}],a:[C,function(Z){this.afternoon=A(Z,!0)}],Q:[E,function(Z){this.month=3*(Z-1)+1}],S:[E,function(Z){this.milliseconds=100*+Z}],SS:[w,function(Z){this.milliseconds=10*+Z}],SSS:[/\d{3}/,function(Z){this.milliseconds=+Z}],s:[$,h("seconds")],ss:[$,h("seconds")],m:[$,h("minutes")],mm:[$,h("minutes")],H:[$,h("hours")],h:[$,h("hours")],HH:[$,h("hours")],hh:[$,h("hours")],D:[$,h("day")],DD:[w,h("day")],Do:[C,function(Z){var z=f.ordinal,X=Z.match(/\d+/);if(this.day=X[0],z)for(var J=1;J<=31;J+=1)z(J).replace(/\[|\]/g,"")===Z&&(this.day=J)}],w:[$,h("week")],ww:[w,h("week")],M:[$,h("month")],MM:[w,h("month")],MMM:[C,function(Z){var z=I("months"),X=(I("monthsShort")||z.map(function(J){return J.slice(0,3)})).indexOf(Z)+1;if(X<1)throw new Error;this.month=X%12||X}],MMMM:[C,function(Z){var z=I("months").indexOf(Z)+1;if(z<1)throw new Error;this.month=z%12||z}],Y:[/[+-]?\d+/,h("year")],YY:[w,function(Z){this.year=B(Z)}],YYYY:[/\d{4}/,h("year")],Z:U,ZZ:U};function M(Z){var z,X;z=Z,X=f&&f.formats;for(var J=(Z=z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,b,UD){var eD=UD&&UD.toUpperCase();return b||X[UD]||D[UD]||X[eD].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(_,j,N){return j||N.slice(1)})})).match(F),K=J.length,H=0;H<K;H+=1){var V=J[H],m=Y[V],FD=m&&m[0],$D=m&&m[1];J[H]=$D?{regex:FD,parser:$D}:V.replace(/^\[|\]$/g,"")}return function(e){for(var b={},UD=0,eD=0;UD<K;UD+=1){var _=J[UD];if(typeof _=="string")eD+=_.length;else{var{regex:j,parser:N}=_,g=e.slice(eD),P=j.exec(g)[0];N.call(b,P),e=e.replace(P,"")}}return function(v){var n=v.afternoon;if(n!==void 0){var DD=v.hours;n?DD<12&&(v.hours+=12):DD===12&&(v.hours=0),delete v.afternoon}}(b),b}}return function(Z,z,X){X.p.customParseFormat=!0,Z&&Z.parseTwoDigitYear&&(B=Z.parseTwoDigitYear);var J=z.prototype,K=J.parse;J.parse=function(H){var{date:V,utc:m,args:FD}=H;this.$u=m;var $D=FD[1];if(typeof $D=="string"){var e=FD[2]===!0,b=FD[3]===!0,UD=e||b,eD=FD[2];b&&(eD=FD[2]),f=this.$locale(),!e&&eD&&(f=X.Ls[eD]),this.$d=function(g,P,v,n){try{if(["x","X"].indexOf(P)>-1)return new Date((P==="X"?1000:1)*g);var DD=M(P)(g),YD=DD.year,QD=DD.month,dD=DD.day,X0=DD.hours,D8=DD.minutes,S1=DD.seconds,d8=DD.milliseconds,O2=DD.zone,pD=DD.week,r0=new Date,Q1=dD||(YD||QD?1:r0.getDate()),F8=YD||r0.getFullYear(),qE=0;YD&&!QD||(qE=QD>0?QD-1:r0.getMonth());var OE,v7=X0||0,m7=D8||0,n7=S1||0,l7=d8||0;return O2?new Date(Date.UTC(F8,qE,Q1,v7,m7,n7,l7+60*O2.offset*1000)):v?new Date(Date.UTC(F8,qE,Q1,v7,m7,n7,l7)):(OE=new Date(F8,qE,Q1,v7,m7,n7,l7),pD&&(OE=n(OE).week(pD).toDate()),OE)}catch(g4D){return new Date("")}}(V,$D,m,X),this.init(),eD&&eD!==!0&&(this.$L=this.locale(eD).$L),UD&&V!=this.format($D)&&(this.$d=new Date("")),f={}}else if($D instanceof Array)for(var _=$D.length,j=1;j<=_;j+=1){FD[1]=$D[j-1];var N=X.apply(this,FD);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}j===_&&(this.$d=new Date(""))}else K.call(this,H)}}})});var JO=W((D7,nh)=>{function F8D(D){return D&&D.__esModule?D:{default:D}}function E8D(D){return D8D.default(D),D.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\//g,"&#x2F;").replace(/\\/g,"&#x5C;").replace(/`/g,"&#96;")}Object.defineProperty(D7,"__esModule",{value:!0});D7.default=E8D;var D8D=F8D(RD());nh.exports=D7.default;nh.exports.default=D7.default});var zO=W((F7,lh)=>{function f8D(D){return D&&D.__esModule?D:{default:D}}function I8D(D){if(D.length>1)return D;return""}function M8D(D,F){F=$8D.default(F,C8D);var E=D.split("@"),w=E.pop(),$=E.join("@"),C=[$,w];if(C[1]=C[1].toLowerCase(),C[1]==="gmail.com"||C[1]==="googlemail.com"){if(F.gmail_remove_subaddress)C[0]=C[0].split("+")[0];if(F.gmail_remove_dots)C[0]=C[0].replace(/\.+/g,I8D);if(!C[0].length)return!1;if(F.all_lowercase||F.gmail_lowercase)C[0]=C[0].toLowerCase();C[1]=F.gmail_convert_googlemaildotcom?"gmail.com":C[1]}else if(B8D.indexOf(C[1])>=0){if(F.icloud_remove_subaddress)C[0]=C[0].split("+")[0];if(!C[0].length)return!1;if(F.all_lowercase||F.icloud_lowercase)C[0]=C[0].toLowerCase()}else if(h8D.indexOf(C[1])>=0){if(F.outlookdotcom_remove_subaddress)C[0]=C[0].split("+")[0];if(!C[0].length)return!1;if(F.all_lowercase||F.outlookdotcom_lowercase)C[0]=C[0].toLowerCase()}else if(U8D.indexOf(C[1])>=0){if(F.yahoo_remove_subaddress){var f=C[0].split("-");C[0]=f.length>1?f.slice(0,-1).join("-"):f[0]}if(!C[0].length)return!1;if(F.all_lowercase||F.yahoo_lowercase)C[0]=C[0].toLowerCase()}else if(A8D.indexOf(C[1])>=0){if(F.all_lowercase||F.yandex_lowercase)C[0]=C[0].toLowerCase();C[1]="yandex.ru"}else if(F.all_lowercase)C[0]=C[0].toLowerCase();return C.join("@")}Object.defineProperty(F7,"__esModule",{value:!0});F7.default=M8D;var $8D=f8D(x8()),C8D={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},B8D=["icloud.com","me.com"],h8D=["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"],U8D=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],A8D=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];lh.exports=F7.default;lh.exports.default=F7.default});function th(D){return D!==null&&typeof D==="object"}function EU(D,F,E=".",w){if(!th(F))return EU(D,{},E,w);const $=Object.assign({},F);for(let C in D){if(C==="__proto__"||C==="constructor")continue;const f=D[C];if(f===null||f===void 0)continue;if(w&&w($,C,f,E))continue;if(Array.isArray(f)&&Array.isArray($[C]))$[C]=[...f,...$[C]];else if(th(f)&&th($[C]))$[C]=EU(f,$[C],(E?`${E}.`:"")+C.toString(),w);else $[C]=f}return $}function w6D(D){return(...F)=>F.reduce((E,w)=>EU(E,w,"",D),{})}function f6D(D){return Object.prototype.toString.call(D)==="[object Object]"}function C6D(D){if(!f6D(D))return!1;if(!D.message&&!D.args)return!1;if(D.stack)return!1;return!0}function DU(D,F={},E=3){if(D===void 0)return E;if(typeof D==="number")return D;if(F[D]&&F[D].level!==void 0)return F[D].level;return E}function UP(D={}){return new iD(D)}class iD{constructor(D={}){const F=D.types||FU;this.options=$6D({...D,defaults:{...D.defaults},level:DU(D.level,F),reporters:[...D.reporters||[]]},{types:FU,throttle:1000,throttleMin:5,formatOptions:{date:!0,colors:!1,compact:!0}});for(let E in F){const w={type:E,...this.options.defaults,...F[E]};this[E]=this._wrapLogFn(w),this[E].raw=this._wrapLogFn(w,!0)}if(this.options.mockFn)this.mockTypes();this._lastLog={}}get level(){return this.options.level}set level(D){this.options.level=DU(D,this.options.types,this.options.level)}prompt(D,F){if(!this.options.prompt)throw new Error("prompt is not supported!");return this.options.prompt(D,F)}create(D){const F=new iD({...this.options,...D});if(this._mockFn)F.mockTypes(this._mockFn);return F}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){const F=this.options.reporters.indexOf(D);if(F>=0)return this.options.reporters.splice(F,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,F){if(!D)return;if(!D.__write)D.__write=D.write;D.write=(E)=>{this[F].raw(String(E).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(){eh=!0}resumeLogs(){eh=!1;const D=hP.splice(0);for(let F of D)F[0]._logFn(F[1],F[2])}mockTypes(D){const F=D||this.options.mockFn;if(this._mockFn=F,typeof F!=="function")return;for(let E in this.options.types)this[E]=F(E,this.options.types[E])||this[E],this[E].raw=this[E]}_wrapLogFn(D,F){return(...E)=>{if(eh){hP.push([this,D,E,F]);return}return this._logFn(D,E,F)}}_logFn(D,F,E){if((D.level||0)>this.level)return!1;const w={date:new Date,args:[],...D,level:DU(D.level,this.options.types)};if(!E&&F.length===1&&C6D(F[0]))Object.assign(w,F[0]);else w.args=[...F];if(w.message)w.args.unshift(w.message),delete w.message;if(w.additional){if(!Array.isArray(w.additional))w.additional=w.additional.split("\n");w.args.push("\n"+w.additional.join("\n")),delete w.additional}w.type=typeof w.type==="string"?w.type.toLowerCase():"log",w.tag=typeof w.tag==="string"?w.tag:"";const $=(f=!1)=>{const B=(this._lastLog.count||0)-this.options.throttleMin;if(this._lastLog.object&&B>0){const h=[...this._lastLog.object.args];if(B>1)h.push(`(repeated ${B} times)`);this._log({...this._lastLog.object,args:h}),this._lastLog.count=1}if(f)this._lastLog.object=w,this._log(w)};clearTimeout(this._lastLog.timeout);const C=this._lastLog.time&&w.date?w.date.getTime()-this._lastLog.time.getTime():0;if(this._lastLog.time=w.date,C<this.options.throttle)try{const f=JSON.stringify([w.type,w.tag,w.args]),B=this._lastLog.serialized===f;if(this._lastLog.serialized=f,B){if(this._lastLog.count=(this._lastLog.count||0)+1,this._lastLog.count>this.options.throttleMin){this._lastLog.timeout=setTimeout($,this.options.throttle);return}}}catch{}$(!0)}_log(D){for(let F of this.options.reporters)F.log(D,{options:this.options})}}var lD,FU,$6D,eh=!1,hP;var C7=G(()=>{lD={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},FU={silent:{level:-1},fatal:{level:lD.fatal},error:{level:lD.error},warn:{level:lD.warn},log:{level:lD.log},info:{level:lD.info},success:{level:lD.success},fail:{level:lD.fail},ready:{level:lD.info},start:{level:lD.info},box:{level:lD.info},debug:{level:lD.debug},trace:{level:lD.trace},verbose:{level:lD.verbose}},$6D=w6D(),hP=[];iD.prototype.add=iD.prototype.addReporter;iD.prototype.remove=iD.prototype.removeReporter;iD.prototype.clear=iD.prototype.removeReporter;iD.prototype.withScope=iD.prototype.withTag;iD.prototype.mock=iD.prototype.mockTypes;iD.prototype.pause=iD.prototype.pauseLogs;iD.prototype.resume=iD.prototype.resumeLogs});import{formatWithOptions as B6D}from"util";import{sep as h6D}from"path";function $U(D){const F=process.cwd()+h6D;return D.split("\n").splice(1).map((w)=>w.trim().replace("file://","").replace(F,""))}function U6D(D,F){return(F.__write||F.write).call(F,D)}class B7{formatStack(D,F){return" "+$U(D).join("\n ")}formatArgs(D,F){const E=D.map((w)=>{if(w&&typeof w.stack==="string")return w.message+"\n"+this.formatStack(w.stack,F);return w});return B6D(F,...E)}formatDate(D,F){return F.date?D.toLocaleTimeString():""}filterAndJoin(D){return D.filter(Boolean).join(" ")}formatLogObj(D,F){const E=this.formatArgs(D.args,F);if(D.type==="box")return"\n"+[wU(D.tag),D.title&&D.title,...E.split("\n")].filter(Boolean).map((w)=>" > "+w).join("\n")+"\n";return this.filterAndJoin([wU(D.type),wU(D.tag),E])}log(D,F){const E=this.formatLogObj(D,{columns:F.options.stdout.columns||0,...F.options.formatOptions});return U6D(E+"\n",D.level<2?F.options.stderr||process.stderr:F.options.stdout||process.stdout)}}var wU=(D)=>D?`[${D}]`:"";var h7=()=>{};import*as U7 from"tty";function YP(D,F,E,w,$=F.slice(0,Math.max(0,D))+w,C=F.slice(Math.max(0,D+E.length)),f=C.indexOf(E)){return $+(f<0?C:YP(f,C,E,w))}function X6D(D,F,E,w,$){return D<0?E+F+w:E+YP(D,F,w,$)+w}function J6D(D,F,E=D,w=D.length+1){return($)=>$||!($===""||$===void 0)?X6D((""+$).indexOf(F,w),$,D,F,E):""}function o(D,F,E){return J6D(`\x1B[${D}m`,`\x1B[${F}m`,E)}function z6D(D=W6D){return D?AP:Object.fromEntries(Object.keys(AP).map((F)=>[F,String]))}function ZP(D,F="reset"){return Q[D]||Q[F]}function Z0(D){return D.replace(new RegExp(T6D,"g"),"")}function fU(D,F={}){const E={...F,style:{...K6D,...F.style}},w=D.split("\n"),$=[],C=ZP(E.style.borderColor),f={...typeof E.style.borderStyle==="string"?IP[E.style.borderStyle]||IP.solid:E.style.borderStyle};if(C)for(let M in f)f[M]=C(f[M]);const B=E.style.padding%2===0?E.style.padding:E.style.padding+1,h=w.length+B,U=Math.max(...w.map((M)=>M.length))+B,I=U+B,A=E.style.marginLeft>0?" ".repeat(E.style.marginLeft):"";if(E.style.marginTop>0)$.push("".repeat(E.style.marginTop));if(E.title){const M=f.h.repeat(Math.floor((U-Z0(E.title).length)/2)),Z=f.h.repeat(U-Z0(E.title).length-Z0(M).length+B);$.push(`${A}${f.tl}${M}${E.title}${Z}${f.tr}`)}else $.push(`${A}${f.tl}${f.h.repeat(I)}${f.tr}`);const Y=E.style.valign==="center"?Math.floor((h-w.length)/2):E.style.valign==="top"?h-w.length-B:h-w.length;for(let M=0;M<h;M++)if(M<Y||M>=Y+w.length)$.push(`${A}${f.v}${" ".repeat(I)}${f.v}`);else{const Z=w[M-Y],z=" ".repeat(B),X=" ".repeat(U-Z0(Z).length);$.push(`${A}${f.v}${z}${Z}${X}${f.v}`)}if($.push(`${A}${f.bl}${f.h.repeat(I)}${f.br}`),E.style.marginBottom>0)$.push("".repeat(E.style.marginBottom));return $.join("\n")}var c8,MP,A6D,I6D,M6D,G6D,GP,Y6D,Z6D,W6D,AP,Q,T6D,IP,K6D;var hE=G(()=>{({env:c8={},argv:MP=[],platform:A6D=""}=typeof process==="undefined"?{}:process),I6D="NO_COLOR"in c8||MP.includes("--no-color"),M6D="FORCE_COLOR"in c8||MP.includes("--color"),G6D=A6D==="win32",GP=c8.TERM==="dumb",Y6D=U7&&U7.isatty&&U7.isatty(1)&&c8.TERM&&!GP,Z6D="CI"in c8&&(("GITHUB_ACTIONS"in c8)||("GITLAB_CI"in c8)||("CIRCLECI"in c8)),W6D=!I6D&&(M6D||G6D&&!GP||Y6D||Z6D),AP={reset:o(0,0),bold:o(1,22,"\x1B[22m\x1B[1m"),dim:o(2,22,"\x1B[22m\x1B[2m"),italic:o(3,23),underline:o(4,24),inverse:o(7,27),hidden:o(8,28),strikethrough:o(9,29),black:o(30,39),red:o(31,39),green:o(32,39),yellow:o(33,39),blue:o(34,39),magenta:o(35,39),cyan:o(36,39),white:o(37,39),gray:o(90,39),bgBlack:o(40,49),bgRed:o(41,49),bgGreen:o(42,49),bgYellow:o(43,49),bgBlue:o(44,49),bgMagenta:o(45,49),bgCyan:o(46,49),bgWhite:o(47,49),blackBright:o(90,39),redBright:o(91,39),greenBright:o(92,39),yellowBright:o(93,39),blueBright:o(94,39),magentaBright:o(95,39),cyanBright:o(96,39),whiteBright:o(97,39),bgBlackBright:o(100,49),bgRedBright:o(101,49),bgGreenBright:o(102,49),bgYellowBright:o(103,49),bgBlueBright:o(104,49),bgMagentaBright:o(105,49),bgCyanBright:o(106,49),bgWhiteBright:o(107,49)},Q=z6D(),T6D=["[\\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("|"),IP={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"}},K6D={borderColor:"white",borderStyle:"rounded",valign:"center",padding:2,marginLeft:1,marginTop:1,marginBottom:1}});var kP={};_0(kP,{prompt:()=>fFD});import{stdin as S6D,stdout as Q6D}from"process";import WP from"readline";import{WriteStream as H6D}from"tty";import L6D from"tty";function P6D({onlyFirst:D=!1}={}){const F=["[\\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(F,D?void 0:"g")}function VP(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(P6D(),"")}function UE(D,F={}){if(typeof D!="string"||D.length===0||(F={ambiguousIsNarrow:!0,...F},D=VP(D),D.length===0))return 0;D=D.replace(b6D()," ");const E=F.ambiguousIsNarrow?1:2;let w=0;for(let $ of D){const C=$.codePointAt(0);if(C<=31||C>=127&&C<=159||C>=768&&C<=879)continue;switch(k6D.eastAsianWidth($)){case"F":case"W":w+=2;break;case"A":w+=E;break;default:w+=1}}return w}function g6D(){const D=new Map;for(let[F,E]of Object.entries(SD)){for(let[w,$]of Object.entries(E))SD[w]={open:`\x1B[${$[0]}m`,close:`\x1B[${$[1]}m`},E[w]=SD[w],D.set($[0],$[1]);Object.defineProperty(SD,F,{value:E,enumerable:!1})}return Object.defineProperty(SD,"codes",{value:D,enumerable:!1}),SD.color.close="\x1B[39m",SD.bgColor.close="\x1B[49m",SD.color.ansi=XP(),SD.color.ansi256=JP(),SD.color.ansi16m=zP(),SD.bgColor.ansi=XP(BU),SD.bgColor.ansi256=JP(BU),SD.bgColor.ansi16m=zP(BU),Object.defineProperties(SD,{rgbToAnsi256:{value:(F,E,w)=>F===E&&E===w?F<8?16:F>248?231:Math.round((F-8)/247*24)+232:16+36*Math.round(F/255*5)+6*Math.round(E/255*5)+Math.round(w/255*5),enumerable:!1},hexToRgb:{value:(F)=>{const E=/[a-f\d]{6}|[a-f\d]{3}/i.exec(F.toString(16));if(!E)return[0,0,0];let[w]=E;w.length===3&&(w=[...w].map((C)=>C+C).join(""));const $=Number.parseInt(w,16);return[$>>16&255,$>>8&255,$&255]},enumerable:!1},hexToAnsi256:{value:(F)=>SD.rgbToAnsi256(...SD.hexToRgb(F)),enumerable:!1},ansi256ToAnsi:{value:(F)=>{if(F<8)return 30+F;if(F<16)return 90+(F-8);let E,w,$;if(F>=232)E=((F-232)*10+8)/255,w=E,$=E;else{F-=16;const B=F%36;E=Math.floor(F/36)/5,w=Math.floor(B/6)/5,$=B%6/5}const C=Math.max(E,w,$)*2;if(C===0)return 30;let f=30+(Math.round($)<<2|Math.round(w)<<1|Math.round(E));return C===2&&(f+=60),f},enumerable:!1},rgbToAnsi:{value:(F,E,w)=>SD.ansi256ToAnsi(SD.rgbToAnsi256(F,E,w)),enumerable:!1},hexToAnsi:{value:(F)=>SD.ansi256ToAnsi(SD.hexToAnsi256(F)),enumerable:!1}}),SD}function SP(D,F,E){return String(D).normalize().replace(/\r\n/g,`
34
34
  `).split(`
35
- `).map((w)=>H3D(w,F,E)).join(`
36
- `)}function L3D(D,F){if(D===F)return;const E=D.split(`
35
+ `).map((w)=>v6D(w,F,E)).join(`
36
+ `)}function m6D(D,F){if(D===F)return;const E=D.split(`
37
37
  `),w=F.split(`
38
- `),$=[];for(let C=0;C<Math.max(E.length,w.length);C++)E[C]!==w[C]&&$.push(C);return $}function Z7(D,F){D.isTTY&&D.setRawMode(F)}async function r3D(D,F={}){if(!F.type||F.type==="text")return await b3D({message:D,defaultValue:F.default,placeholder:F.placeholder,initialValue:F.initial});if(F.type==="confirm")return await x3D({message:D,initialValue:F.initial});if(F.type==="select")return await c3D({message:D,options:F.options.map((E)=>typeof E==="string"?{value:E,label:E}:E)});if(F.type==="multiselect")return await g3D({message:D,options:F.options.map((E)=>typeof E==="string"?{value:E,label:E}:E),required:F.required});throw new Error(`Unknown prompt type: ${F.type}`)}class hE{constructor({render:D,input:F=E3D,output:E=w3D,...w},$=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=w,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=$,this.input=F,this.output=E}prompt(){const D=new $3D(0);return D._write=(F,E,w)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),w()},this.input.pipe(D),this.rl=Yy.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),Yy.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),Z7(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((F,E)=>{this.once("submit",()=>{this.output.write(L2.cursor.show),this.output.off("resize",this.render),Z7(this.input,!1),F(this.value)}),this.once("cancel",()=>{this.output.write(L2.cursor.show),this.output.off("resize",this.render),Z7(this.input,!1),F(R3D)})})}on(D,F){const E=this.subscribers.get(D)??[];E.push({cb:F}),this.subscribers.set(D,E)}once(D,F){const E=this.subscribers.get(D)??[];E.push({cb:F,once:!0}),this.subscribers.set(D,E)}emit(D,...F){const E=this.subscribers.get(D)??[],w=[];for(let $ of E)$.cb(...F),$.once&&w.push(()=>E.splice(E.indexOf($),1));for(let $ of w)$()}unsubscribe(){this.subscribers.clear()}onKeypress(D,F){if(this.state==="error"&&(this.state="active"),F?.name&&!this._track&&Ky.has(F.name)&&this.emit("cursor",Ky.get(F.name)),F?.name&&V3D.has(F.name)&&this.emit("cursor",F.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D&&this.emit("key",D.toLowerCase()),F?.name==="return"){if(this.opts.validate){const E=this.opts.validate(this.value);E&&(this.error=E,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(`
39
- `),Z7(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=Ty(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
40
- `).length-1;this.output.write(L2.cursor.move(-999,D*-1))}render(){const D=Ty(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(L2.cursor.hide);else{const F=L3D(this._prevFrame,D);if(this.restoreCursor(),F&&F?.length===1){const E=F[0];this.output.write(L2.cursor.move(0,E)),this.output.write(L2.erase.lines(1));const w=D.split(`
41
- `);this.output.write(w[E]),this._prevFrame=D,this.output.write(L2.cursor.move(0,w.length-E-1));return}else if(F&&F?.length>1){const E=F[0];this.output.write(L2.cursor.move(0,E)),this.output.write(L2.erase.down());const w=D.split(`
38
+ `),$=[];for(let C=0;C<Math.max(E.length,w.length);C++)E[C]!==w[C]&&$.push(C);return $}function A7(D,F){D.isTTY&&D.setRawMode(F)}async function fFD(D,F={}){if(!F.type||F.type==="text")return await FFD({message:D,defaultValue:F.default,placeholder:F.placeholder,initialValue:F.initial});if(F.type==="confirm")return await EFD({message:D,initialValue:F.initial});if(F.type==="select")return await wFD({message:D,options:F.options.map((E)=>typeof E==="string"?{value:E,label:E}:E)});if(F.type==="multiselect")return await $FD({message:D,options:F.options.map((E)=>typeof E==="string"?{value:E,label:E}:E),required:F.required});throw new Error(`Unknown prompt type: ${F.type}`)}class AE{constructor({render:D,input:F=S6D,output:E=Q6D,...w},$=!0){this._track=!1,this._cursor=0,this.state="initial",this.error="",this.subscribers=new Map,this._prevFrame="",this.opts=w,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=$,this.input=F,this.output=E}prompt(){const D=new H6D(0);return D._write=(F,E,w)=>{this._track&&(this.value=this.rl.line.replace(/\t/g,""),this._cursor=this.rl.cursor,this.emit("value",this.value)),w()},this.input.pipe(D),this.rl=WP.createInterface({input:this.input,output:D,tabSize:2,prompt:"",escapeCodeTimeout:50}),WP.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),A7(this.input,!0),this.output.on("resize",this.render),this.render(),new Promise((F,E)=>{this.once("submit",()=>{this.output.write(H2.cursor.show),this.output.off("resize",this.render),A7(this.input,!1),F(this.value)}),this.once("cancel",()=>{this.output.write(H2.cursor.show),this.output.off("resize",this.render),A7(this.input,!1),F(n6D)})})}on(D,F){const E=this.subscribers.get(D)??[];E.push({cb:F}),this.subscribers.set(D,E)}once(D,F){const E=this.subscribers.get(D)??[];E.push({cb:F,once:!0}),this.subscribers.set(D,E)}emit(D,...F){const E=this.subscribers.get(D)??[],w=[];for(let $ of E)$.cb(...F),$.once&&w.push(()=>E.splice(E.indexOf($),1));for(let $ of w)$()}unsubscribe(){this.subscribers.clear()}onKeypress(D,F){if(this.state==="error"&&(this.state="active"),F?.name&&!this._track&&QP.has(F.name)&&this.emit("cursor",QP.get(F.name)),F?.name&&l6D.has(F.name)&&this.emit("cursor",F.name),D&&(D.toLowerCase()==="y"||D.toLowerCase()==="n")&&this.emit("confirm",D.toLowerCase()==="y"),D&&this.emit("key",D.toLowerCase()),F?.name==="return"){if(this.opts.validate){const E=this.opts.validate(this.value);E&&(this.error=E,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(`
39
+ `),A7(this.input,!1),this.rl.close(),this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const D=SP(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
40
+ `).length-1;this.output.write(H2.cursor.move(-999,D*-1))}render(){const D=SP(this._render(this)??"",process.stdout.columns,{hard:!0});if(D!==this._prevFrame){if(this.state==="initial")this.output.write(H2.cursor.hide);else{const F=m6D(this._prevFrame,D);if(this.restoreCursor(),F&&F?.length===1){const E=F[0];this.output.write(H2.cursor.move(0,E)),this.output.write(H2.erase.lines(1));const w=D.split(`
41
+ `);this.output.write(w[E]),this._prevFrame=D,this.output.write(H2.cursor.move(0,w.length-E-1));return}else if(F&&F?.length>1){const E=F[0];this.output.write(H2.cursor.move(0,E)),this.output.write(H2.erase.down());const w=D.split(`
42
42
  `).slice(E);this.output.write(w.join(`
43
- `)),this._prevFrame=D;return}this.output.write(L2.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}var MU="\x1B",VD,C3D="\x07",YU,B3D,h3D,L2,JU,U3D,A3D,KD=(D,F,E=D)=>(w)=>{let $=""+w,C=$.indexOf(F,D.length);return~C?D+Qy($,F,E,C)+F:D+$+F},Qy=(D,F,E,w)=>{let $=D.substring(0,w)+E,C=D.substring(w+F.length),f=C.indexOf(F);return~f?$+Qy(C,F,E,f):$+C},Hy=(D=A3D)=>({isColorSupported:D,reset:D?(F)=>`\x1B[0m${F}\x1B[0m`:String,bold:D?KD("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?KD("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?KD("\x1B[3m","\x1B[23m"):String,underline:D?KD("\x1B[4m","\x1B[24m"):String,inverse:D?KD("\x1B[7m","\x1B[27m"):String,hidden:D?KD("\x1B[8m","\x1B[28m"):String,strikethrough:D?KD("\x1B[9m","\x1B[29m"):String,black:D?KD("\x1B[30m","\x1B[39m"):String,red:D?KD("\x1B[31m","\x1B[39m"):String,green:D?KD("\x1B[32m","\x1B[39m"):String,yellow:D?KD("\x1B[33m","\x1B[39m"):String,blue:D?KD("\x1B[34m","\x1B[39m"):String,magenta:D?KD("\x1B[35m","\x1B[39m"):String,cyan:D?KD("\x1B[36m","\x1B[39m"):String,white:D?KD("\x1B[37m","\x1B[39m"):String,gray:D?KD("\x1B[90m","\x1B[39m"):String,bgBlack:D?KD("\x1B[40m","\x1B[49m"):String,bgRed:D?KD("\x1B[41m","\x1B[49m"):String,bgGreen:D?KD("\x1B[42m","\x1B[49m"):String,bgYellow:D?KD("\x1B[43m","\x1B[49m"):String,bgBlue:D?KD("\x1B[44m","\x1B[49m"):String,bgMagenta:D?KD("\x1B[45m","\x1B[49m"):String,bgCyan:D?KD("\x1B[46m","\x1B[49m"):String,bgWhite:D?KD("\x1B[47m","\x1B[49m"):String}),I3D,AU,ZU,M3D,Y3D,Z3D=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},IU=10,Zy=(D=0)=>(F)=>`\x1B[${F+D}m`,Xy=(D=0)=>(F)=>`\x1B[${38+D};5;${F}m`,Wy=(D=0)=>(F,E,w)=>`\x1B[${38+D};2;${F};${E};${w}m`,SD,X3D,W3D,z3D,X7,T3D=39,zU="\x07",Ry="[",K3D="]",Vy="m",TU,Jy=(D)=>`${X7.values().next().value}${Ry}${D}${Vy}`,zy=(D)=>`${X7.values().next().value}${TU}${D}${zU}`,S3D=(D)=>D.split(" ").map((F)=>BE(F)),GU=(D,F,E)=>{const w=[...F];let $=!1,C=!1,f=BE(Ly(D[D.length-1]));for(let[B,h]of w.entries()){const U=BE(h);if(f+U<=E?D[D.length-1]+=h:(D.push(h),f=0),X7.has(h)&&($=!0,C=w.slice(B+1).join("").startsWith(TU)),$){C?h===zU&&($=!1,C=!1):h===Vy&&($=!1);continue}f+=U,f===E&&B<w.length-1&&(D.push(""),f=0)}!f&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},Q3D=(D)=>{const F=D.split(" ");let E=F.length;for(;E>0&&!(BE(F[E-1])>0);)E--;return E===F.length?D:F.slice(0,E).join(" ")+F.slice(E).join("")},H3D=(D,F,E={})=>{if(E.trim!==!1&&D.trim()==="")return"";let w="",$,C;const f=S3D(D);let B=[""];for(let[U,I]of D.split(" ").entries()){E.trim!==!1&&(B[B.length-1]=B[B.length-1].trimStart());let A=BE(B[B.length-1]);if(U!==0&&(A>=F&&(E.wordWrap===!1||E.trim===!1)&&(B.push(""),A=0),(A>0||E.trim===!1)&&(B[B.length-1]+=" ",A++)),E.hard&&f[U]>F){const Y=F-A,G=1+Math.floor((f[U]-Y-1)/F);Math.floor((f[U]-1)/F)<G&&B.push(""),GU(B,I,F);continue}if(A+f[U]>F&&A>0&&f[U]>0){if(E.wordWrap===!1&&A<F){GU(B,I,F);continue}B.push("")}if(A+f[U]>F&&E.wordWrap===!1){GU(B,I,F);continue}B[B.length-1]+=I}E.trim!==!1&&(B=B.map((U)=>Q3D(U)));const h=[...B.join(`
44
- `)];for(let[U,I]of h.entries()){if(w+=I,X7.has(I)){const{groups:Y}=new RegExp(`(?:\\${Ry}(?<code>\\d+)m|\\${TU}(?<uri>.*)${zU})`).exec(h.slice(U).join(""))||{groups:{}};if(Y.code!==void 0){const G=Number.parseFloat(Y.code);$=G===T3D?void 0:G}else Y.uri!==void 0&&(C=Y.uri.length===0?void 0:Y.uri)}const A=z3D.codes.get(Number($));h[U+1]===`
45
- `?(C&&(w+=zy("")),$&&A&&(w+=Jy(A))):I===`
46
- `&&($&&A&&(w+=Jy($)),C&&(w+=zy(C)))}return w},R3D,Ky,V3D,Ny,qy,Oy,jy,N3D,v1=(D,F)=>N3D?D:F,q3D,O3D,j3D,P3D,WD="",VF="",XU,WU,y3D,Sy,k3D,W7=(D)=>{switch(D){case"initial":case"active":return H.cyan(q3D);case"cancel":return H.red(O3D);case"error":return H.yellow(j3D);case"submit":return H.green(P3D)}},b3D=(D)=>{return new jy({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){const F=`${H.gray(WD)}
47
- ${W7(this.state)} ${D.message}
48
- `,E=D.placeholder?H.inverse(D.placeholder[0])+H.dim(D.placeholder.slice(1)):H.inverse(H.hidden("_")),w=this.value?this.valueWithCursor:E;switch(this.state){case"error":return`${F.trim()}
49
- ${H.yellow(WD)} ${w}
50
- ${H.yellow(VF)} ${H.yellow(this.error)}
51
- `;case"submit":return`${F}${H.gray(WD)} ${H.dim(this.value||D.placeholder)}`;case"cancel":return`${F}${H.gray(WD)} ${H.strikethrough(H.dim(this.value??""))}${this.value?.trim()?"\n"+H.gray(WD):""}`;default:return`${F}${H.cyan(WD)} ${w}
52
- ${H.cyan(VF)}
53
- `}}}).prompt()},x3D=(D)=>{const F=D.active??"Yes",E=D.inactive??"No";return new Ny({active:F,inactive:E,initialValue:D.initialValue??!0,render(){const w=`${H.gray(WD)}
54
- ${W7(this.state)} ${D.message}
55
- `,$=this.value?F:E;switch(this.state){case"submit":return`${w}${H.gray(WD)} ${H.dim($)}`;case"cancel":return`${w}${H.gray(WD)} ${H.strikethrough(H.dim($))}
56
- ${H.gray(WD)}`;default:return`${w}${H.cyan(WD)} ${this.value?`${H.green(XU)} ${F}`:`${H.dim(WU)} ${H.dim(F)}`} ${H.dim("/")} ${this.value?`${H.dim(WU)} ${H.dim(E)}`:`${H.green(XU)} ${E}`}
57
- ${H.cyan(VF)}
58
- `}}}).prompt()},c3D=(D)=>{const F=(E,w)=>{const $=E.label??String(E.value);switch(w){case"active":return`${H.green(XU)} ${$} ${E.hint?H.dim(`(${E.hint})`):""}`;case"selected":return`${H.dim($)}`;case"cancelled":return`${H.strikethrough(H.dim($))}`}return`${H.dim(WU)} ${H.dim($)}`};return new Oy({options:D.options,initialValue:D.initialValue,render(){const E=`${H.gray(WD)}
59
- ${W7(this.state)} ${D.message}
60
- `;switch(this.state){case"submit":return`${E}${H.gray(WD)} ${F(this.options[this.cursor],"selected")}`;case"cancel":return`${E}${H.gray(WD)} ${F(this.options[this.cursor],"cancelled")}
61
- ${H.gray(WD)}`;default:return`${E}${H.cyan(WD)} ${this.options.map((w,$)=>F(w,$===this.cursor?"active":"inactive")).join(`
62
- ${H.cyan(WD)} `)}
63
- ${H.cyan(VF)}
64
- `}}}).prompt()},g3D=(D)=>{const F=(E,w)=>{const $=E.label??String(E.value);switch(w){case"active":return`${H.cyan(y3D)} ${$} ${E.hint?H.dim(`(${E.hint})`):""}`;case"selected":return`${H.green(Sy)} ${H.dim($)}`;case"cancelled":return`${H.strikethrough(H.dim($))}`;case"active-selected":return`${H.green(Sy)} ${$} ${E.hint?H.dim(`(${E.hint})`):""}`;case"submitted":return`${H.dim($)}`}return`${H.dim(k3D)} ${H.dim($)}`};return new qy({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(E){if(this.required&&E.length===0)return`Please select at least one option.
65
- ${H.reset(H.dim(`Press ${H.gray(H.bgWhite(H.inverse(" space ")))} to select, ${H.gray(H.bgWhite(H.inverse(" enter ")))} to submit`))}`},render(){const E=`${H.gray(WD)}
66
- ${W7(this.state)} ${D.message}
67
- `;switch(this.state){case"submit":return`${E}${H.gray(WD)} ${this.options.filter(({value:w})=>this.value.includes(w)).map((w)=>F(w,"submitted")).join(H.dim(", "))||H.dim("none")}`;case"cancel":{const w=this.options.filter(({value:$})=>this.value.includes($)).map(($)=>F($,"cancelled")).join(H.dim(", "));return`${E}${H.gray(WD)} ${w.trim()?`${w}
68
- ${H.gray(WD)}`:""}`}case"error":{const w=this.error.split("\n").map(($,C)=>C===0?`${H.yellow(VF)} ${H.yellow($)}`:` ${$}`).join("\n");return E+H.yellow(WD)+" "+this.options.map(($,C)=>{const f=this.value.includes($.value),B=C===this.cursor;if(B&&f)return F($,"active-selected");if(f)return F($,"selected");return F($,B?"active":"inactive")}).join(`
69
- ${H.yellow(WD)} `)+"\n"+w+"\n"}default:return`${E}${H.cyan(WD)} ${this.options.map((w,$)=>{const C=this.value.includes(w.value),f=$===this.cursor;if(f&&C)return F(w,"active-selected");if(C)return F(w,"selected");return F(w,f?"active":"inactive")}).join(`
70
- ${H.cyan(WD)} `)}
71
- ${H.cyan(VF)}
72
- `}}}).prompt()};var yy=M(()=>{QU();CE();I7();M7();VD=`${MU}[`,YU={to(D,F){if(!F)return`${VD}${D+1}G`;return`${VD}${F+1};${D+1}H`},move(D,F){let E="";if(D<0)E+=`${VD}${-D}D`;else if(D>0)E+=`${VD}${D}C`;if(F<0)E+=`${VD}${-F}A`;else if(F>0)E+=`${VD}${F}B`;return E},up:(D=1)=>`${VD}${D}A`,down:(D=1)=>`${VD}${D}B`,forward:(D=1)=>`${VD}${D}C`,backward:(D=1)=>`${VD}${D}D`,nextLine:(D=1)=>`${VD}E`.repeat(D),prevLine:(D=1)=>`${VD}F`.repeat(D),left:`${VD}G`,hide:`${VD}?25l`,show:`${VD}?25h`,save:`${MU}7`,restore:`${MU}8`},B3D={up:(D=1)=>`${VD}S`.repeat(D),down:(D=1)=>`${VD}T`.repeat(D)},h3D={screen:`${VD}2J`,up:(D=1)=>`${VD}1J`.repeat(D),down:(D=1)=>`${VD}J`.repeat(D),line:`${VD}2K`,lineEnd:`${VD}K`,lineStart:`${VD}1K`,lines(D){let F="";for(let E=0;E<D;E++)F+=this.line+(E<D-1?YU.up():"");if(D)F+=YU.left;return F}},L2={cursor:YU,scroll:B3D,erase:h3D,beep:C3D},JU={exports:{}},U3D=f3D,A3D=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||U3D.isatty(1)&&process.env.TERM!=="dumb"||("CI"in process.env));JU.exports=Hy();JU.exports.createColors=Hy;I3D=JU.exports,AU=KU(I3D),ZU={},M3D={get exports(){return ZU},set exports(D){ZU=D}};(function(D){var F={};D.exports=F,F.eastAsianWidth=function(w){var $=w.charCodeAt(0),C=w.length==2?w.charCodeAt(1):0,f=$;return 55296<=$&&$<=56319&&56320<=C&&C<=57343&&($&=1023,C&=1023,f=$<<10|C,f+=65536),f==12288||65281<=f&&f<=65376||65504<=f&&f<=65510?"F":f==8361||65377<=f&&f<=65470||65474<=f&&f<=65479||65482<=f&&f<=65487||65490<=f&&f<=65495||65498<=f&&f<=65500||65512<=f&&f<=65518?"H":4352<=f&&f<=4447||4515<=f&&f<=4519||4602<=f&&f<=4607||9001<=f&&f<=9002||11904<=f&&f<=11929||11931<=f&&f<=12019||12032<=f&&f<=12245||12272<=f&&f<=12283||12289<=f&&f<=12350||12353<=f&&f<=12438||12441<=f&&f<=12543||12549<=f&&f<=12589||12593<=f&&f<=12686||12688<=f&&f<=12730||12736<=f&&f<=12771||12784<=f&&f<=12830||12832<=f&&f<=12871||12880<=f&&f<=13054||13056<=f&&f<=19903||19968<=f&&f<=42124||42128<=f&&f<=42182||43360<=f&&f<=43388||44032<=f&&f<=55203||55216<=f&&f<=55238||55243<=f&&f<=55291||63744<=f&&f<=64255||65040<=f&&f<=65049||65072<=f&&f<=65106||65108<=f&&f<=65126||65128<=f&&f<=65131||110592<=f&&f<=110593||127488<=f&&f<=127490||127504<=f&&f<=127546||127552<=f&&f<=127560||127568<=f&&f<=127569||131072<=f&&f<=194367||177984<=f&&f<=196605||196608<=f&&f<=262141?"W":32<=f&&f<=126||162<=f&&f<=163||165<=f&&f<=166||f==172||f==175||10214<=f&&f<=10221||10629<=f&&f<=10630?"Na":f==161||f==164||167<=f&&f<=168||f==170||173<=f&&f<=174||176<=f&&f<=180||182<=f&&f<=186||188<=f&&f<=191||f==198||f==208||215<=f&&f<=216||222<=f&&f<=225||f==230||232<=f&&f<=234||236<=f&&f<=237||f==240||242<=f&&f<=243||247<=f&&f<=250||f==252||f==254||f==257||f==273||f==275||f==283||294<=f&&f<=295||f==299||305<=f&&f<=307||f==312||319<=f&&f<=322||f==324||328<=f&&f<=331||f==333||338<=f&&f<=339||358<=f&&f<=359||f==363||f==462||f==464||f==466||f==468||f==470||f==472||f==474||f==476||f==593||f==609||f==708||f==711||713<=f&&f<=715||f==717||f==720||728<=f&&f<=731||f==733||f==735||768<=f&&f<=879||913<=f&&f<=929||931<=f&&f<=937||945<=f&&f<=961||963<=f&&f<=969||f==1025||1040<=f&&f<=1103||f==1105||f==8208||8211<=f&&f<=8214||8216<=f&&f<=8217||8220<=f&&f<=8221||8224<=f&&f<=8226||8228<=f&&f<=8231||f==8240||8242<=f&&f<=8243||f==8245||f==8251||f==8254||f==8308||f==8319||8321<=f&&f<=8324||f==8364||f==8451||f==8453||f==8457||f==8467||f==8470||8481<=f&&f<=8482||f==8486||f==8491||8531<=f&&f<=8532||8539<=f&&f<=8542||8544<=f&&f<=8555||8560<=f&&f<=8569||f==8585||8592<=f&&f<=8601||8632<=f&&f<=8633||f==8658||f==8660||f==8679||f==8704||8706<=f&&f<=8707||8711<=f&&f<=8712||f==8715||f==8719||f==8721||f==8725||f==8730||8733<=f&&f<=8736||f==8739||f==8741||8743<=f&&f<=8748||f==8750||8756<=f&&f<=8759||8764<=f&&f<=8765||f==8776||f==8780||f==8786||8800<=f&&f<=8801||8804<=f&&f<=8807||8810<=f&&f<=8811||8814<=f&&f<=8815||8834<=f&&f<=8835||8838<=f&&f<=8839||f==8853||f==8857||f==8869||f==8895||f==8978||9312<=f&&f<=9449||9451<=f&&f<=9547||9552<=f&&f<=9587||9600<=f&&f<=9615||9618<=f&&f<=9621||9632<=f&&f<=9633||9635<=f&&f<=9641||9650<=f&&f<=9651||9654<=f&&f<=9655||9660<=f&&f<=9661||9664<=f&&f<=9665||9670<=f&&f<=9672||f==9675||9678<=f&&f<=9681||9698<=f&&f<=9701||f==9711||9733<=f&&f<=9734||f==9737||9742<=f&&f<=9743||9748<=f&&f<=9749||f==9756||f==9758||f==9792||f==9794||9824<=f&&f<=9825||9827<=f&&f<=9829||9831<=f&&f<=9834||9836<=f&&f<=9837||f==9839||9886<=f&&f<=9887||9918<=f&&f<=9919||9924<=f&&f<=9933||9935<=f&&f<=9953||f==9955||9960<=f&&f<=9983||f==10045||f==10071||10102<=f&&f<=10111||11093<=f&&f<=11097||12872<=f&&f<=12879||57344<=f&&f<=63743||65024<=f&&f<=65039||f==65533||127232<=f&&f<=127242||127248<=f&&f<=127277||127280<=f&&f<=127337||127344<=f&&f<=127386||917760<=f&&f<=917999||983040<=f&&f<=1048573||1048576<=f&&f<=1114109?"A":"N"},F.characterLength=function(w){var $=this.eastAsianWidth(w);return $=="F"||$=="W"||$=="A"?2:1};function E(w){return w.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}F.length=function(w){for(var $=E(w),C=0,f=0;f<$.length;f++)C=C+this.characterLength($[f]);return C},F.slice=function(w,$,C){textLen=F.length(w),$=$||0,C=C||1,$<0&&($=textLen+$),C<0&&(C=textLen+C);for(var f="",B=0,h=E(w),U=0;U<h.length;U++){var I=h[U],A=F.length(I);if(B>=$-(A==2?1:0))if(B+A<=C)f+=I;else break;B+=A}return f}})(M3D);Y3D=ZU,SD={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(SD.modifier);X3D=Object.keys(SD.color),W3D=Object.keys(SD.bgColor);[...X3D];z3D=J3D(),X7=new Set(["\x1B","\x9B"]),TU=`${K3D}8;;`,R3D=Symbol("clack:cancel"),Ky=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),V3D=new Set(["up","down","left","right","space","enter"]);Ny=class Ny extends hE{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",(F)=>{this.output.write(L2.cursor.move(0,-1)),this.value=F,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};qy=class qy extends hE{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:F})=>F===D.cursorAt),0),this.on("key",(F)=>{F==="a"&&this.toggleAll()}),this.on("cursor",(F)=>{switch(F){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(){const D=this.value.length===this.options.length;this.value=D?[]:this.options.map((F)=>F.value)}toggleValue(){const D=this.value.includes(this._value);this.value=D?this.value.filter((F)=>F!==this._value):[...this.value,this._value]}};Oy=class Oy extends hE{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.cursor=this.options.findIndex(({value:F})=>F===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(F)=>{switch(F){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}};jy=class jy extends hE{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}${AU.inverse(AU.hidden("_"))}`;else{const F=this.value.slice(0,this.cursor),E=this.value.slice(this.cursor);this.valueWithCursor=`${F}${AU.inverse(E[0])}${E.slice(1)}`}})}get cursor(){return this._cursor}};N3D=SU(),q3D=v1("\u276F",">"),O3D=v1("\u25A0","x"),j3D=v1("\u25B2","x"),P3D=v1("\u2714","\u221A"),XU=v1("\u25CF",">"),WU=v1("\u25CB"," "),y3D=v1("\u25FB","[\u2022]"),Sy=v1("\u25FC","[+]"),k3D=v1("\u25FB","[ ]")});import R2 from"process";function s3D(D){for(let F of _3D){const E=F[1]||F[0];if(D[E])return{name:F[0].toLowerCase(),...F[2]}}if(D.SHELL&&D.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function AE(D){return D?D!=="false":!1}function m3D({onlyFirst:D=!1}={}){const F=["[\\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(F,D?void 0:"g")}function l3D(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(n3D,"")}function KU(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function o3D(D,F){if(typeof D!=="string"||D.length===0)return 0;if(F={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...F},!F.countAnsiEscapeCodes)D=l3D(D);if(D.length===0)return 0;const E=F.ambiguousIsNarrow?1:2;let w=0;for(let{segment:$}of new Intl.Segmenter().segment(D)){const C=$.codePointAt(0);if(C<=31||C>=127&&C<=159)continue;if(C>=768&&C<=879)continue;if(a3D().test($)){w+=2;continue}switch(p3D.eastAsianWidth($)){case"F":case"W":{w+=2;break}case"A":{w+=E;break}default:w+=1}}return w}function SU(){if(R2.platform!=="win32")return R2.env.TERM!=="linux";return Boolean(R2.env.CI)||Boolean(R2.env.WT_SESSION)||Boolean(R2.env.TERMINUS_SUBLIME)||R2.env.ConEmuTask==="{cmd::Cmder}"||R2.env.TERM_PROGRAM==="Terminus-Sublime"||R2.env.TERM_PROGRAM==="vscode"||R2.env.TERM==="xterm-256color"||R2.env.TERM==="alacritty"||R2.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function by(D){if(!Intl.Segmenter)return Y0(D).length;return o3D(D)}function J7(D){return D.replace(/`([^`]+)`/gm,(F,E)=>H.cyan(E)).replace(/\s+_([^_]+)_\s+/gm,(F,E)=>` ${H.underline(E)} `)}function FED(D="white"){return H[D]||H.white}function EED(D="bgWhite"){return H[`bg${D[0].toUpperCase()}${D.slice(1)}`]||H.bgWhite}function T7(D={}){let F=wED();if(process.env.CONSOLA_LEVEL)F=Number.parseInt(process.env.CONSOLA_LEVEL)??F;return By({level:F,defaults:{level:F},stdout:process.stdout,stderr:process.stderr,prompt:(...w)=>Promise.resolve().then(() => (yy(),Py)).then(($)=>$.prompt(...w)),reporters:D.reporters||[D.fancy??!(cy||HU)?new ry:new G7],...D})}function wED(){if(v3D)return nD.debug;if(HU)return nD.warn;return nD.info}var _3D,z7,UE,xy,u3D,cy,d3D,v3D,HU,n3D,gy,i3D,p3D,a3D=()=>{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},t3D,e3D,DED,Y1=(D,F)=>DED?D:F,ky,ry,LU;var QU=M(()=>{I7();M7();CE();_3D=[["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"]],z7=typeof process!=="undefined"?process:{},UE=z7.env||{},xy=s3D(UE),u3D=typeof process!=="undefined"&&process.env&&"development"||"";z7.platform;xy.name;cy=AE(UE.CI)||xy.ci!==!1,d3D=AE(z7.stdout&&z7.stdout.isTTY),v3D=AE(UE.DEBUG),HU=u3D==="test"||AE(UE.TEST);AE(UE.MINIMAL);n3D=m3D(),gy={exports:{}};(function(D){var F={};D.exports=F,F.eastAsianWidth=function(w){var $=w.charCodeAt(0),C=w.length==2?w.charCodeAt(1):0,f=$;if(55296<=$&&$<=56319&&(56320<=C&&C<=57343))$&=1023,C&=1023,f=$<<10|C,f+=65536;if(f==12288||65281<=f&&f<=65376||65504<=f&&f<=65510)return"F";if(f==8361||65377<=f&&f<=65470||65474<=f&&f<=65479||65482<=f&&f<=65487||65490<=f&&f<=65495||65498<=f&&f<=65500||65512<=f&&f<=65518)return"H";if(4352<=f&&f<=4447||4515<=f&&f<=4519||4602<=f&&f<=4607||9001<=f&&f<=9002||11904<=f&&f<=11929||11931<=f&&f<=12019||12032<=f&&f<=12245||12272<=f&&f<=12283||12289<=f&&f<=12350||12353<=f&&f<=12438||12441<=f&&f<=12543||12549<=f&&f<=12589||12593<=f&&f<=12686||12688<=f&&f<=12730||12736<=f&&f<=12771||12784<=f&&f<=12830||12832<=f&&f<=12871||12880<=f&&f<=13054||13056<=f&&f<=19903||19968<=f&&f<=42124||42128<=f&&f<=42182||43360<=f&&f<=43388||44032<=f&&f<=55203||55216<=f&&f<=55238||55243<=f&&f<=55291||63744<=f&&f<=64255||65040<=f&&f<=65049||65072<=f&&f<=65106||65108<=f&&f<=65126||65128<=f&&f<=65131||110592<=f&&f<=110593||127488<=f&&f<=127490||127504<=f&&f<=127546||127552<=f&&f<=127560||127568<=f&&f<=127569||131072<=f&&f<=194367||177984<=f&&f<=196605||196608<=f&&f<=262141)return"W";if(32<=f&&f<=126||162<=f&&f<=163||165<=f&&f<=166||f==172||f==175||10214<=f&&f<=10221||10629<=f&&f<=10630)return"Na";if(f==161||f==164||167<=f&&f<=168||f==170||173<=f&&f<=174||176<=f&&f<=180||182<=f&&f<=186||188<=f&&f<=191||f==198||f==208||215<=f&&f<=216||222<=f&&f<=225||f==230||232<=f&&f<=234||236<=f&&f<=237||f==240||242<=f&&f<=243||247<=f&&f<=250||f==252||f==254||f==257||f==273||f==275||f==283||294<=f&&f<=295||f==299||305<=f&&f<=307||f==312||319<=f&&f<=322||f==324||328<=f&&f<=331||f==333||338<=f&&f<=339||358<=f&&f<=359||f==363||f==462||f==464||f==466||f==468||f==470||f==472||f==474||f==476||f==593||f==609||f==708||f==711||713<=f&&f<=715||f==717||f==720||728<=f&&f<=731||f==733||f==735||768<=f&&f<=879||913<=f&&f<=929||931<=f&&f<=937||945<=f&&f<=961||963<=f&&f<=969||f==1025||1040<=f&&f<=1103||f==1105||f==8208||8211<=f&&f<=8214||8216<=f&&f<=8217||8220<=f&&f<=8221||8224<=f&&f<=8226||8228<=f&&f<=8231||f==8240||8242<=f&&f<=8243||f==8245||f==8251||f==8254||f==8308||f==8319||8321<=f&&f<=8324||f==8364||f==8451||f==8453||f==8457||f==8467||f==8470||8481<=f&&f<=8482||f==8486||f==8491||8531<=f&&f<=8532||8539<=f&&f<=8542||8544<=f&&f<=8555||8560<=f&&f<=8569||f==8585||8592<=f&&f<=8601||8632<=f&&f<=8633||f==8658||f==8660||f==8679||f==8704||8706<=f&&f<=8707||8711<=f&&f<=8712||f==8715||f==8719||f==8721||f==8725||f==8730||8733<=f&&f<=8736||f==8739||f==8741||8743<=f&&f<=8748||f==8750||8756<=f&&f<=8759||8764<=f&&f<=8765||f==8776||f==8780||f==8786||8800<=f&&f<=8801||8804<=f&&f<=8807||8810<=f&&f<=8811||8814<=f&&f<=8815||8834<=f&&f<=8835||8838<=f&&f<=8839||f==8853||f==8857||f==8869||f==8895||f==8978||9312<=f&&f<=9449||9451<=f&&f<=9547||9552<=f&&f<=9587||9600<=f&&f<=9615||9618<=f&&f<=9621||9632<=f&&f<=9633||9635<=f&&f<=9641||9650<=f&&f<=9651||9654<=f&&f<=9655||9660<=f&&f<=9661||9664<=f&&f<=9665||9670<=f&&f<=9672||f==9675||9678<=f&&f<=9681||9698<=f&&f<=9701||f==9711||9733<=f&&f<=9734||f==9737||9742<=f&&f<=9743||9748<=f&&f<=9749||f==9756||f==9758||f==9792||f==9794||9824<=f&&f<=9825||9827<=f&&f<=9829||9831<=f&&f<=9834||9836<=f&&f<=9837||f==9839||9886<=f&&f<=9887||9918<=f&&f<=9919||9924<=f&&f<=9933||9935<=f&&f<=9953||f==9955||9960<=f&&f<=9983||f==10045||f==10071||10102<=f&&f<=10111||11093<=f&&f<=11097||12872<=f&&f<=12879||57344<=f&&f<=63743||65024<=f&&f<=65039||f==65533||127232<=f&&f<=127242||127248<=f&&f<=127277||127280<=f&&f<=127337||127344<=f&&f<=127386||917760<=f&&f<=917999||983040<=f&&f<=1048573||1048576<=f&&f<=1114109)return"A";return"N"},F.characterLength=function(w){var $=this.eastAsianWidth(w);if($=="F"||$=="W"||$=="A")return 2;else return 1};function E(w){return w.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}F.length=function(w){var $=E(w),C=0;for(var f=0;f<$.length;f++)C=C+this.characterLength($[f]);return C},F.slice=function(w,$,C){if(textLen=F.length(w),$=$?$:0,C=C?C:1,$<0)$=textLen+$;if(C<0)C=textLen+C;var f="",B=0,h=E(w);for(var U=0;U<h.length;U++){var I=h[U],A=F.length(I);if(B>=$-(A==2?1:0))if(B+A<=C)f+=I;else break;B+=A}return f}})(gy);i3D=gy.exports,p3D=KU(i3D),t3D={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},e3D={0:"red",1:"yellow"},DED=SU(),ky={error:Y1("\u2716","\xD7"),fatal:Y1("\u2716","\xD7"),ready:Y1("\u2714","\u221A"),warn:Y1("\u26A0","\u203C"),info:Y1("\u2139","i"),success:Y1("\u2714","\u221A"),debug:Y1("\u2699","D"),trace:Y1("\u2192","\u2192"),fail:Y1("\u2716","\xD7"),start:Y1("\u25D0","o"),log:""};ry=class ry extends G7{formatStack(D){return"\n"+hU(D).map((F)=>" "+F.replace(/^at +/,(E)=>H.gray(E)).replace(/\((.+)\)/,(E,w)=>`(${H.cyan(w)})`)).join("\n")}formatType(D,F,E){const w=t3D[D.type]||e3D[D.level]||"gray";if(F)return EED(w)(H.black(` ${D.type.toUpperCase()} `));const $=typeof ky[D.type]==="string"?ky[D.type]:D.icon||D.type;return $?FED(w)($):""}formatLogObj(D,F){const[E,...w]=this.formatArgs(D.args,F).split("\n");if(D.type==="box")return UU(J7(E+(w.length>0?"\n"+w.join("\n"):"")),{title:D.title?J7(D.title):void 0,style:D.style});const $=this.formatDate(D.date,F),C=$&&H.gray($),f=D.badge??D.level<2,B=this.formatType(D,f,F),h=D.tag?H.gray(D.tag):"";let U;const I=this.filterAndJoin([B,J7(E)]),A=this.filterAndJoin(F.columns?[h,C]:[h]),Y=(F.columns||0)-by(I)-by(A)-2;if(U=Y>0&&(F.columns||0)>=80?I+" ".repeat(Y)+A:(A?`${H.gray(`[${A}]`)} `:"")+I,U+=J7(w.length>0?"\n"+w.join("\n"):""),D.type==="trace"){const G=new Error("Trace: "+D.message);U+=this.formatStack(G.stack||"")}return f?"\n"+U+"\n":U}};LU=T7()});var ND=X((IcD,dy)=>{function uy(D,F){let E=0,w,$="",C="";for(;E<D.length;E++)if(w=D[E],$+=w.open,C+=w.close,F.includes(w.close))F=F.replace(w.rgx,w.close+w.open);return $+F+C}function IED(D,F){let E={has:D,keys:F};return E.reset=fD.reset.bind(E),E.bold=fD.bold.bind(E),E.dim=fD.dim.bind(E),E.italic=fD.italic.bind(E),E.underline=fD.underline.bind(E),E.inverse=fD.inverse.bind(E),E.hidden=fD.hidden.bind(E),E.strikethrough=fD.strikethrough.bind(E),E.black=fD.black.bind(E),E.red=fD.red.bind(E),E.green=fD.green.bind(E),E.yellow=fD.yellow.bind(E),E.blue=fD.blue.bind(E),E.magenta=fD.magenta.bind(E),E.cyan=fD.cyan.bind(E),E.white=fD.white.bind(E),E.gray=fD.gray.bind(E),E.grey=fD.grey.bind(E),E.bgBlack=fD.bgBlack.bind(E),E.bgRed=fD.bgRed.bind(E),E.bgGreen=fD.bgGreen.bind(E),E.bgYellow=fD.bgYellow.bind(E),E.bgBlue=fD.bgBlue.bind(E),E.bgMagenta=fD.bgMagenta.bind(E),E.bgCyan=fD.bgCyan.bind(E),E.bgWhite=fD.bgWhite.bind(E),E}function GD(D,F){let E={open:`\x1B[${D}m`,close:`\x1B[${F}m`,rgx:new RegExp(`\\x1b\\[${F}m`,"g")};return function(w){if(this!==void 0&&this.has!==void 0)return this.has.includes(D)||(this.has.push(D),this.keys.push(E)),w===void 0?this:fD.enabled?uy(this.keys,w+""):w+"";return w===void 0?IED([D],[E]):fD.enabled?uy([E],w+""):w+""}}var{FORCE_COLOR:hED,NODE_DISABLE_COLORS:UED,TERM:AED}=process.env,fD={enabled:!UED&&AED!=="dumb"&&hED!=="0",reset:GD(0,0),bold:GD(1,22),dim:GD(2,22),italic:GD(3,23),underline:GD(4,24),inverse:GD(7,27),hidden:GD(8,28),strikethrough:GD(9,29),black:GD(30,39),red:GD(31,39),green:GD(32,39),yellow:GD(33,39),blue:GD(34,39),magenta:GD(35,39),cyan:GD(36,39),white:GD(37,39),gray:GD(90,39),grey:GD(90,39),bgBlack:GD(40,49),bgRed:GD(41,49),bgGreen:GD(42,49),bgYellow:GD(43,49),bgBlue:GD(44,49),bgMagenta:GD(45,49),bgCyan:GD(46,49),bgWhite:GD(47,49)};dy.exports=fD});var my=X((GcD,vy)=>{vy.exports=(D,F)=>{if(D.meta&&D.name!=="escape")return;if(D.ctrl){if(D.name==="a")return"first";if(D.name==="c")return"abort";if(D.name==="d")return"abort";if(D.name==="e")return"last";if(D.name==="g")return"reset"}if(F){if(D.name==="j")return"down";if(D.name==="k")return"up"}if(D.name==="return")return"submit";if(D.name==="enter")return"submit";if(D.name==="backspace")return"delete";if(D.name==="delete")return"deleteForward";if(D.name==="abort")return"abort";if(D.name==="escape")return"exit";if(D.name==="tab")return"next";if(D.name==="pagedown")return"nextPage";if(D.name==="pageup")return"prevPage";if(D.name==="home")return"home";if(D.name==="end")return"end";if(D.name==="up")return"up";if(D.name==="down")return"down";if(D.name==="right")return"right";if(D.name==="left")return"left";return!1}});var S7=X((McD,ny)=>{ny.exports=(D)=>{const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),E=new RegExp(F,"g");return typeof D==="string"?D.replace(E,""):D}});var OD=X((YcD,ly)=>{var qD=`${"\x1B"}[`,VU={to(D,F){if(!F)return`${qD}${D+1}G`;return`${qD}${F+1};${D+1}H`},move(D,F){let E="";if(D<0)E+=`${qD}${-D}D`;else if(D>0)E+=`${qD}${D}C`;if(F<0)E+=`${qD}${-F}A`;else if(F>0)E+=`${qD}${F}B`;return E},up:(D=1)=>`${qD}${D}A`,down:(D=1)=>`${qD}${D}B`,forward:(D=1)=>`${qD}${D}C`,backward:(D=1)=>`${qD}${D}D`,nextLine:(D=1)=>`${qD}E`.repeat(D),prevLine:(D=1)=>`${qD}F`.repeat(D),left:`${qD}G`,hide:`${qD}?25l`,show:`${qD}?25h`,save:`${"\x1B"}7`,restore:`${"\x1B"}8`},GED={up:(D=1)=>`${qD}S`.repeat(D),down:(D=1)=>`${qD}T`.repeat(D)},MED={screen:`${qD}2J`,up:(D=1)=>`${qD}1J`.repeat(D),down:(D=1)=>`${qD}J`.repeat(D),line:`${qD}2K`,lineEnd:`${qD}K`,lineStart:`${qD}1K`,lines(D){let F="";for(let E=0;E<D;E++)F+=this.line+(E<D-1?VU.up():"");if(D)F+=VU.left;return F}};ly.exports={cursor:VU,scroll:GED,erase:MED,beep:"\x07"}});var ty=X((ZcD,oy)=>{function YED(D,F){var E=typeof Symbol!=="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!E){if(Array.isArray(D)||(E=ZED(D))||F&&D&&typeof D.length==="number"){if(E)D=E;var w=0,$=function h(){};return{s:$,n:function h(){if(w>=D.length)return{done:!0};return{done:!1,value:D[w++]}},e:function h(U){throw U},f:$}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var C=!0,f=!1,B;return{s:function h(){E=E.call(D)},n:function h(){var U=E.next();return C=U.done,U},e:function h(U){f=!0,B=U},f:function h(){try{if(!C&&E.return!=null)E.return()}finally{if(f)throw B}}}}function ZED(D,F){if(!D)return;if(typeof D==="string")return iy(D,F);var E=Object.prototype.toString.call(D).slice(8,-1);if(E==="Object"&&D.constructor)E=D.constructor.name;if(E==="Map"||E==="Set")return Array.from(D);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return iy(D,F)}function iy(D,F){if(F==null||F>D.length)F=D.length;for(var E=0,w=new Array(F);E<F;E++)w[E]=D[E];return w}var XED=S7(),ay=OD(),py=ay.erase,WED=ay.cursor,JED=(D)=>[...XED(D)].length;oy.exports=function(D,F){if(!F)return py.line+WED.to(0);let E=0;const w=D.split(/\r?\n/);var $=YED(w),C;try{for($.s();!(C=$.n()).done;){let f=C.value;E+=1+Math.floor(Math.max(JED(f)-1,0)/F)}}catch(f){$.e(f)}finally{$.f()}return py.lines(E)}});var NU=X((XcD,ey)=>{var GE={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},zED={arrowUp:GE.arrowUp,arrowDown:GE.arrowDown,arrowLeft:GE.arrowLeft,arrowRight:GE.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},TED=process.platform==="win32"?zED:GE;ey.exports=TED});var Fk=X((WcD,Dk)=>{var NF=ND(),Z6=NU(),qU=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),KED=(D)=>qU[D]||qU.default,ME=Object.freeze({aborted:NF.red(Z6.cross),done:NF.green(Z6.tick),exited:NF.yellow(Z6.cross),default:NF.cyan("?")}),SED=(D,F,E)=>F?ME.aborted:E?ME.exited:D?ME.done:ME.default,QED=(D)=>NF.gray(D?Z6.ellipsis:Z6.pointerSmall),HED=(D,F)=>NF.gray(D?F?Z6.pointerSmall:"+":Z6.line);Dk.exports={styles:qU,render:KED,symbols:ME,symbol:SED,delimiter:QED,item:HED}});var wk=X((JcD,Ek)=>{var LED=S7();Ek.exports=function(D,F){let E=String(LED(D)||"").split(/\r?\n/);if(!F)return E.length;return E.map((w)=>Math.ceil(w.length/F)).reduce((w,$)=>w+$)}});var fk=X((zcD,$k)=>{$k.exports=(D,F={})=>{const E=Number.isSafeInteger(parseInt(F.margin))?new Array(parseInt(F.margin)).fill(" ").join(""):F.margin||"",w=F.width;return(D||"").split(/\r?\n/g).map(($)=>$.split(/\s+/g).reduce((C,f)=>{if(f.length+E.length>=w||C[C.length-1].length+f.length+1<w)C[C.length-1]+=` ${f}`;else C.push(`${E}${f}`);return C},[E]).join("\n")).join("\n")}});var Bk=X((TcD,Ck)=>{Ck.exports=(D,F,E)=>{E=E||F;let w=Math.min(F-E,D-Math.floor(E/2));if(w<0)w=0;let $=Math.min(w+E,F);return{startIndex:w,endIndex:$}}});var V2=X((KcD,hk)=>{hk.exports={action:my(),clear:ty(),style:Fk(),strip:S7(),figures:NU(),lines:wk(),wrap:fk(),entriesToDisplay:Bk()}});var n1=X((ScD,Gk)=>{var Uk=import.meta.require("readline"),RED=V2(),VED=RED.action,NED=import.meta.require("events"),Ak=OD(),qED=Ak.beep,OED=Ak.cursor,jED=ND();class Ik extends NED{constructor(D={}){super();this.firstRender=!0,this.in=D.stdin||process.stdin,this.out=D.stdout||process.stdout,this.onRender=(D.onRender||(()=>{return})).bind(this);const F=Uk.createInterface({input:this.in,escapeCodeTimeout:50});if(Uk.emitKeypressEvents(this.in,F),this.in.isTTY)this.in.setRawMode(!0);const E=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,w=($,C)=>{let f=VED(C,E);if(f===!1)this._&&this._($,C);else if(typeof this[f]==="function")this[f](C);else this.bell()};this.close=()=>{if(this.out.write(OED.show),this.in.removeListener("keypress",w),this.in.isTTY)this.in.setRawMode(!1);F.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",w)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(qED)}render(){if(this.onRender(jED),this.firstRender)this.firstRender=!1}}Gk.exports=Ik});var Jk=X((QcD,Wk)=>{function Mk(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function Yk(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){Mk(C,w,$,f,B,"next",h)}function B(h){Mk(C,w,$,f,B,"throw",h)}f(void 0)})}}var Q7=ND(),PED=n1(),Zk=OD(),yED=Zk.erase,YE=Zk.cursor,H7=V2(),OU=H7.style,jU=H7.clear,kED=H7.lines,bED=H7.figures;class Xk extends PED{constructor(D={}){super(D);this.transform=OU.render(D.style),this.scale=this.transform.scale,this.msg=D.message,this.initial=D.initial||"",this.validator=D.validate||(()=>!0),this.value="",this.errorMsg=D.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=jU("",this.out.columns),this.render()}set value(D){if(!D&&this.initial)this.placeholder=!0,this.rendered=Q7.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(D);this._value=D,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var D=this;return Yk(function*(){let F=yield D.validator(D.value);if(typeof F==="string")D.errorMsg=F,F=!1;D.error=!F})()}submit(){var D=this;return Yk(function*(){if(D.value=D.value||D.initial,D.cursorOffset=0,D.cursor=D.rendered.length,yield D.validate(),D.error){D.red=!0,D.fire(),D.render();return}D.done=!0,D.aborted=!1,D.fire(),D.render(),D.out.write("\n"),D.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(D){if(this.placeholder)return;this.cursor=this.cursor+D,this.cursorOffset+=D}_(D,F){let E=this.value.slice(0,this.cursor),w=this.value.slice(this.cursor);this.value=`${E}${D}${w}`,this.red=!1,this.cursor=this.placeholder?0:E.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let D=this.value.slice(0,this.cursor-1),F=this.value.slice(this.cursor);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let D=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor+1);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(YE.down(kED(this.outputError,this.out.columns)-1)+jU(this.outputError,this.out.columns));this.out.write(jU(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[OU.symbol(this.done,this.aborted),Q7.bold(this.msg),OU.delimiter(this.done),this.red?Q7.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":bED.pointerSmall} ${Q7.red().italic(F)}`,"");this.out.write(yED.line+YE.to(0)+this.outputText+YE.save+this.outputError+YE.restore+YE.move(this.cursorOffset,0))}}Wk.exports=Xk});var Qk=X((HcD,Sk)=>{var l1=ND(),xED=n1(),ZE=V2(),zk=ZE.style,Tk=ZE.clear,L7=ZE.figures,cED=ZE.wrap,gED=ZE.entriesToDisplay,rED=OD(),_ED=rED.cursor;class Kk extends xED{constructor(D={}){super(D);this.msg=D.message,this.hint=D.hint||"- Use arrow-keys. Return to submit.",this.warn=D.warn||"- This option is disabled",this.cursor=D.initial||0,this.choices=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),value:F&&(F.value===void 0?E:F.value),description:F&&F.description,selected:F&&F.selected,disabled:F&&F.disabled}}),this.optionsPerPage=D.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Tk("",this.out.columns),this.render()}moveCursor(D){this.cursor=D,this.value=this.choices[D].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(D,F){if(D===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(_ED.hide);else this.out.write(Tk(this.outputText,this.out.columns));super.render();let D=gED(this.cursor,this.choices.length,this.optionsPerPage),F=D.startIndex,E=D.endIndex;if(this.outputText=[zk.symbol(this.done,this.aborted),l1.bold(this.msg),zk.delimiter(!1),this.done?this.selection.title:this.selection.disabled?l1.yellow(this.warn):l1.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let w=F;w<E;w++){let $,C,f="",B=this.choices[w];if(w===F&&F>0)C=L7.arrowUp;else if(w===E-1&&E<this.choices.length)C=L7.arrowDown;else C=" ";if(B.disabled)$=this.cursor===w?l1.gray().underline(B.title):l1.strikethrough().gray(B.title),C=(this.cursor===w?l1.bold().gray(L7.pointer)+" ":" ")+C;else if($=this.cursor===w?l1.cyan().underline(B.title):B.title,C=(this.cursor===w?l1.cyan(L7.pointer)+" ":" ")+C,B.description&&this.cursor===w){if(f=` - ${B.description}`,C.length+$.length+f.length>=this.out.columns||B.description.split(/\r?\n/).length>1)f="\n"+cED(B.description,{margin:3,width:this.out.columns})}this.outputText+=`${C} ${$}${l1.gray(f)}\n`}}this.out.write(this.outputText)}}Sk.exports=Kk});var Ok=X((LcD,qk)=>{var R7=ND(),sED=n1(),Rk=V2(),Hk=Rk.style,uED=Rk.clear,Vk=OD(),Lk=Vk.cursor,dED=Vk.erase;class Nk extends sED{constructor(D={}){super(D);this.msg=D.message,this.value=!!D.initial,this.active=D.active||"on",this.inactive=D.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(D,F){if(D===" ")this.value=!this.value;else if(D==="1")this.value=!0;else if(D==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(Lk.hide);else this.out.write(uED(this.outputText,this.out.columns));super.render(),this.outputText=[Hk.symbol(this.done,this.aborted),R7.bold(this.msg),Hk.delimiter(this.done),this.value?this.inactive:R7.cyan().underline(this.inactive),R7.gray("/"),this.value?R7.cyan().underline(this.active):this.active].join(" "),this.out.write(dED.line+Lk.to(0)+this.outputText)}}qk.exports=Nk});var Z1=X((RcD,jk)=>{class V7{constructor({token:D,date:F,parts:E,locales:w}){this.token=D,this.date=F||new Date,this.parts=E||[this],this.locales=w||{}}up(){}down(){}next(){const D=this.parts.indexOf(this);return this.parts.find((F,E)=>E>D&&F instanceof V7)}setTo(D){}prev(){let D=[].concat(this.parts).reverse();const F=D.indexOf(this);return D.find((E,w)=>w>F&&E instanceof V7)}toString(){return String(this.date)}}jk.exports=V7});var kk=X((VcD,yk)=>{var vED=Z1();class Pk extends vED{constructor(D={}){super(D)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let D=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?D.toUpperCase():D}}yk.exports=Pk});var ck=X((NcD,xk)=>{var mED=Z1(),nED=(D)=>{return D=D%10,D===1?"st":D===2?"nd":D===3?"rd":"th"};class bk extends mED{constructor(D={}){super(D)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(D){this.date.setDate(parseInt(D.substr(-2)))}toString(){let D=this.date.getDate(),F=this.date.getDay();return this.token==="DD"?String(D).padStart(2,"0"):this.token==="Do"?D+nED(D):this.token==="d"?F+1:this.token==="ddd"?this.locales.weekdaysShort[F]:this.token==="dddd"?this.locales.weekdays[F]:D}}xk.exports=bk});var _k=X((qcD,rk)=>{var lED=Z1();class gk extends lED{constructor(D={}){super(D)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(D){this.date.setHours(parseInt(D.substr(-2)))}toString(){let D=this.date.getHours();if(/h/.test(this.token))D=D%12||12;return this.token.length>1?String(D).padStart(2,"0"):D}}rk.exports=gk});var dk=X((OcD,uk)=>{var iED=Z1();class sk extends iED{constructor(D={}){super(D)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(D){this.date.setMilliseconds(parseInt(D.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}uk.exports=sk});var nk=X((jcD,mk)=>{var pED=Z1();class vk extends pED{constructor(D={}){super(D)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(D){this.date.setMinutes(parseInt(D.substr(-2)))}toString(){let D=this.date.getMinutes();return this.token.length>1?String(D).padStart(2,"0"):D}}mk.exports=vk});var pk=X((PcD,ik)=>{var aED=Z1();class lk extends aED{constructor(D={}){super(D)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(D){D=parseInt(D.substr(-2))-1,this.date.setMonth(D<0?0:D)}toString(){let D=this.date.getMonth(),F=this.token.length;return F===2?String(D+1).padStart(2,"0"):F===3?this.locales.monthsShort[D]:F===4?this.locales.months[D]:String(D+1)}}ik.exports=lk});var tk=X((ycD,ok)=>{var oED=Z1();class ak extends oED{constructor(D={}){super(D)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(D){this.date.setSeconds(parseInt(D.substr(-2)))}toString(){let D=this.date.getSeconds();return this.token.length>1?String(D).padStart(2,"0"):D}}ok.exports=ak});var Fb=X((kcD,Db)=>{var tED=Z1();class ek extends tED{constructor(D={}){super(D)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(D){this.date.setFullYear(D.substr(-4))}toString(){let D=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?D.substr(-2):D}}Db.exports=ek});var wb=X((bcD,Eb)=>{Eb.exports={DatePart:Z1(),Meridiem:kk(),Day:ck(),Hours:_k(),Milliseconds:dk(),Minutes:nk(),Month:pk(),Seconds:tk(),Year:Fb()}});var Yb=X((xcD,Mb)=>{function $b(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function fb(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){$b(C,w,$,f,B,"next",h)}function B(h){$b(C,w,$,f,B,"throw",h)}f(void 0)})}}var PU=ND(),eED=n1(),yU=V2(),Cb=yU.style,Bb=yU.clear,DwD=yU.figures,Ib=OD(),FwD=Ib.erase,hb=Ib.cursor,i1=wb(),Ub=i1.DatePart,EwD=i1.Meridiem,wwD=i1.Day,$wD=i1.Hours,fwD=i1.Milliseconds,CwD=i1.Minutes,BwD=i1.Month,hwD=i1.Seconds,UwD=i1.Year,AwD=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Ab={1:({token:D})=>D.replace(/\\(.)/g,"$1"),2:(D)=>new wwD(D),3:(D)=>new BwD(D),4:(D)=>new UwD(D),5:(D)=>new EwD(D),6:(D)=>new $wD(D),7:(D)=>new CwD(D),8:(D)=>new hwD(D),9:(D)=>new fwD(D)},IwD={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class Gb extends eED{constructor(D={}){super(D);this.msg=D.message,this.cursor=0,this.typed="",this.locales=Object.assign(IwD,D.locales),this._date=D.initial||new Date,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.mask=D.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Bb("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(D){if(D)this._date.setTime(D.getTime())}set mask(D){let F;this.parts=[];while(F=AwD.exec(D)){let w=F.shift(),$=F.findIndex((C)=>C!=null);this.parts.push($ in Ab?Ab[$]({token:F[$]||w,date:this.date,parts:this.parts,locales:this.locales}):F[$]||w)}let E=this.parts.reduce((w,$)=>{if(typeof $==="string"&&typeof w[w.length-1]==="string")w[w.length-1]+=$;else w.push($);return w},[]);this.parts.splice(0),this.parts.push(...E),this.reset()}moveCursor(D){this.typed="",this.cursor=D,this.fire()}reset(){this.moveCursor(this.parts.findIndex((D)=>D instanceof Ub)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var D=this;return fb(function*(){let F=yield D.validator(D.value);if(typeof F==="string")D.errorMsg=F,F=!1;D.error=!F})()}submit(){var D=this;return fb(function*(){if(yield D.validate(),D.error){D.color="red",D.fire(),D.render();return}D.done=!0,D.aborted=!1,D.fire(),D.render(),D.out.write("\n"),D.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let D=this.parts[this.cursor].prev();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}right(){let D=this.parts[this.cursor].next();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}next(){let D=this.parts[this.cursor].next();this.moveCursor(D?this.parts.indexOf(D):this.parts.findIndex((F)=>F instanceof Ub)),this.render()}_(D){if(/\d/.test(D))this.typed+=D,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(hb.hide);else this.out.write(Bb(this.outputText,this.out.columns));if(super.render(),this.outputText=[Cb.symbol(this.done,this.aborted),PU.bold(this.msg),Cb.delimiter(!1),this.parts.reduce((D,F,E)=>D.concat(E===this.cursor&&!this.done?PU.cyan().underline(F.toString()):F),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":DwD.pointerSmall} ${PU.red().italic(F)}`,"");this.out.write(FwD.line+hb.to(0)+this.outputText)}}Mb.exports=Gb});var Sb=X((ccD,Kb)=>{function Zb(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function Xb(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){Zb(C,w,$,f,B,"next",h)}function B(h){Zb(C,w,$,f,B,"throw",h)}f(void 0)})}}var N7=ND(),GwD=n1(),zb=OD(),q7=zb.cursor,MwD=zb.erase,O7=V2(),kU=O7.style,YwD=O7.figures,Wb=O7.clear,ZwD=O7.lines,XwD=/[0-9]/,bU=(D)=>D!==void 0,Jb=(D,F)=>{let E=Math.pow(10,F);return Math.round(D*E)/E};class Tb extends GwD{constructor(D={}){super(D);this.transform=kU.render(D.style),this.msg=D.message,this.initial=bU(D.initial)?D.initial:"",this.float=!!D.float,this.round=D.round||2,this.inc=D.increment||1,this.min=bU(D.min)?D.min:-1/0,this.max=bU(D.max)?D.max:1/0,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(D){if(!D&&D!==0)this.placeholder=!0,this.rendered=N7.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${Jb(D,this.round)}`),this._value=Jb(D,this.round);this.fire()}get value(){return this._value}parse(D){return this.float?parseFloat(D):parseInt(D)}valid(D){return D==="-"||D==="."&&this.float||XwD.test(D)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let D=this.value;this.value=D!==""?D:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var D=this;return Xb(function*(){let F=yield D.validator(D.value);if(typeof F==="string")D.errorMsg=F,F=!1;D.error=!F})()}submit(){var D=this;return Xb(function*(){if(yield D.validate(),D.error){D.color="red",D.fire(),D.render();return}let F=D.value;D.value=F!==""?F:D.initial,D.done=!0,D.aborted=!1,D.error=!1,D.fire(),D.render(),D.out.write("\n"),D.close()})()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let D=this.value.toString();if(D.length===0)return this.bell();if(this.value=this.parse(D=D.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(D,F){if(!this.valid(D))return this.bell();const E=Date.now();if(E-this.lastHit>1000)this.typed="";if(this.typed+=D,this.lastHit=E,this.color="cyan",D===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(q7.down(ZwD(this.outputError,this.out.columns)-1)+Wb(this.outputError,this.out.columns));this.out.write(Wb(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[kU.symbol(this.done,this.aborted),N7.bold(this.msg),kU.delimiter(this.done),!this.done||!this.done&&!this.placeholder?N7[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":YwD.pointerSmall} ${N7.red().italic(F)}`,"");this.out.write(MwD.line+q7.to(0)+this.outputText+q7.save+this.outputError+q7.restore)}}Kb.exports=Tb});var xU=X((gcD,Rb)=>{var X1=ND(),WwD=OD(),JwD=WwD.cursor,zwD=n1(),XE=V2(),Qb=XE.clear,g8=XE.figures,Hb=XE.style,TwD=XE.wrap,KwD=XE.entriesToDisplay;class Lb extends zwD{constructor(D={}){super(D);if(this.msg=D.message,this.cursor=D.cursor||0,this.scrollIndex=D.cursor||0,this.hint=D.hint||"",this.warn=D.warn||"- This option is disabled -",this.minSelected=D.min,this.showMinError=!1,this.maxChoices=D.max,this.instructions=D.instructions,this.optionsPerPage=D.optionsPerPage||10,this.value=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),description:F&&F.description,value:F&&(F.value===void 0?E:F.value),selected:F&&F.selected,disabled:F&&F.disabled}}),this.clear=Qb("",this.out.columns),!D.overrideRender)this.render()}reset(){this.value.map((D)=>!D.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((D)=>D.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const D=this.value.filter((F)=>F.selected);if(this.minSelected&&D.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const D=this.value[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const D=!this.value[this.cursor].selected;this.value.filter((F)=>!F.disabled).forEach((F)=>F.selected=D),this.render()}_(D,F){if(D===" ")this.handleSpaceToggle();else if(D==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`\nInstructions:\n ${g8.arrowUp}/${g8.arrowDown}: Highlight option\n ${g8.arrowLeft}/${g8.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(D,F,E,w){const $=(F.selected?X1.green(g8.radioOn):g8.radioOff)+" "+w+" ";let C,f;if(F.disabled)C=D===E?X1.gray().underline(F.title):X1.strikethrough().gray(F.title);else if(C=D===E?X1.cyan().underline(F.title):F.title,D===E&&F.description){if(f=` - ${F.description}`,$.length+C.length+f.length>=this.out.columns||F.description.split(/\r?\n/).length>1)f="\n"+TwD(F.description,{margin:$.length,width:this.out.columns})}return $+C+X1.gray(f||"")}paginateOptions(D){if(D.length===0)return X1.red("No matches for this query.");let F=KwD(this.cursor,D.length,this.optionsPerPage),E=F.startIndex,w=F.endIndex,$,C=[];for(let f=E;f<w;f++){if(f===E&&E>0)$=g8.arrowUp;else if(f===w-1&&w<D.length)$=g8.arrowDown;else $=" ";C.push(this.renderOption(this.cursor,D[f],f,$))}return"\n"+C.join("\n")}renderOptions(D){if(!this.done)return this.paginateOptions(D);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[X1.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)D.push(X1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(JwD.hide);super.render();let D=[Hb.symbol(this.done,this.aborted),X1.bold(this.msg),Hb.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=X1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.value),this.out.write(this.clear+D),this.clear=Qb(D,this.out.columns)}}Rb.exports=Lb});var kb=X((rcD,yb)=>{function Vb(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function SwD(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){Vb(C,w,$,f,B,"next",h)}function B(h){Vb(C,w,$,f,B,"throw",h)}f(void 0)})}}var WE=ND(),QwD=n1(),jb=OD(),HwD=jb.erase,Nb=jb.cursor,JE=V2(),cU=JE.style,qb=JE.clear,gU=JE.figures,LwD=JE.wrap,RwD=JE.entriesToDisplay,Ob=(D,F)=>D[F]&&(D[F].value||D[F].title||D[F]),VwD=(D,F)=>D[F]&&(D[F].title||D[F].value||D[F]),NwD=(D,F)=>{const E=D.findIndex((w)=>w.value===F||w.title===F);return E>-1?E:void 0};class Pb extends QwD{constructor(D={}){super(D);this.msg=D.message,this.suggest=D.suggest,this.choices=D.choices,this.initial=typeof D.initial==="number"?D.initial:NwD(D.choices,D.initial),this.select=this.initial||D.cursor||0,this.i18n={noMatches:D.noMatches||"no matches found"},this.fallback=D.fallback||this.initial,this.clearFirst=D.clearFirst||!1,this.suggestions=[],this.input="",this.limit=D.limit||10,this.cursor=0,this.transform=cU.render(D.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=qb("",this.out.columns),this.complete(this.render),this.render()}set fallback(D){this._fb=Number.isSafeInteger(parseInt(D))?parseInt(D):D}get fallback(){let D;if(typeof this._fb==="number")D=this.choices[this._fb];else if(typeof this._fb==="string")D={title:this._fb};return D||this._fb||{title:this.i18n.noMatches}}moveSelect(D){if(this.select=D,this.suggestions.length>0)this.value=Ob(this.suggestions,D);else this.value=this.fallback.value;this.fire()}complete(D){var F=this;return SwD(function*(){const E=F.completing=F.suggest(F.input,F.choices),w=yield E;if(F.completing!==E)return;F.suggestions=w.map((C,f,B)=>({title:VwD(B,f),value:Ob(B,f),description:C.description})),F.completing=!1;const $=Math.max(w.length-1,0);F.moveSelect(Math.min($,F.select)),D&&D()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){let E=this.input.slice(0,this.cursor),w=this.input.slice(this.cursor);this.input=`${E}${D}${w}`,this.cursor=E.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let D=this.input.slice(0,this.cursor-1),F=this.input.slice(this.cursor);this.input=`${D}${F}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let D=this.input.slice(0,this.cursor),F=this.input.slice(this.cursor+1);this.input=`${D}${F}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(D,F,E,w){let $,C=E?gU.arrowUp:w?gU.arrowDown:" ",f=F?WE.cyan().underline(D.title):D.title;if(C=(F?WE.cyan(gU.pointer)+" ":" ")+C,D.description){if($=` - ${D.description}`,C.length+f.length+$.length>=this.out.columns||D.description.split(/\r?\n/).length>1)$="\n"+LwD(D.description,{margin:3,width:this.out.columns})}return C+" "+f+WE.gray($||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(Nb.hide);else this.out.write(qb(this.outputText,this.out.columns));super.render();let D=RwD(this.select,this.choices.length,this.limit),F=D.startIndex,E=D.endIndex;if(this.outputText=[cU.symbol(this.done,this.aborted,this.exited),WE.bold(this.msg),cU.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const w=this.suggestions.slice(F,E).map(($,C)=>this.renderOption($,this.select===C+F,C===0&&F>0,C+F===E-1&&E<this.choices.length)).join("\n");this.outputText+="\n"+(w||WE.gray(this.fallback.title))}this.out.write(HwD.line+Nb.to(0)+this.outputText)}}yb.exports=Pb});var rb=X((_cD,gb)=>{var p1=ND(),qwD=OD(),OwD=qwD.cursor,jwD=xU(),rU=V2(),bb=rU.clear,xb=rU.style,qF=rU.figures;class cb extends jwD{constructor(D={}){D.overrideRender=!0;super(D);this.inputValue="",this.clear=bb("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const D=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((E)=>{if(this.inputValue){if(typeof E.title==="string"){if(E.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof E.value==="string"){if(E.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const F=this.filteredOptions.findIndex((E)=>E===D);this.cursor=F<0?0:F,this.render()}handleSpaceToggle(){const D=this.filteredOptions[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}handleInputChange(D){this.inputValue=this.inputValue+D,this.updateFilteredOptions()}_(D,F){if(D===" ")this.handleSpaceToggle();else this.handleInputChange(D)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
43
+ `)),this._prevFrame=D;return}this.output.write(H2.erase.down())}this.output.write(D),this.state==="initial"&&(this.state="active"),this._prevFrame=D}}}var UU="\x1B",VD,R6D="\x07",AU,V6D,N6D,H2,YU,q6D,O6D,KD=(D,F,E=D)=>(w)=>{let $=""+w,C=$.indexOf(F,D.length);return~C?D+LP($,F,E,C)+F:D+$+F},LP=(D,F,E,w)=>{let $=D.substring(0,w)+E,C=D.substring(w+F.length),f=C.indexOf(F);return~f?$+LP(C,F,E,f):$+C},RP=(D=O6D)=>({isColorSupported:D,reset:D?(F)=>`\x1B[0m${F}\x1B[0m`:String,bold:D?KD("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:D?KD("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:D?KD("\x1B[3m","\x1B[23m"):String,underline:D?KD("\x1B[4m","\x1B[24m"):String,inverse:D?KD("\x1B[7m","\x1B[27m"):String,hidden:D?KD("\x1B[8m","\x1B[28m"):String,strikethrough:D?KD("\x1B[9m","\x1B[29m"):String,black:D?KD("\x1B[30m","\x1B[39m"):String,red:D?KD("\x1B[31m","\x1B[39m"):String,green:D?KD("\x1B[32m","\x1B[39m"):String,yellow:D?KD("\x1B[33m","\x1B[39m"):String,blue:D?KD("\x1B[34m","\x1B[39m"):String,magenta:D?KD("\x1B[35m","\x1B[39m"):String,cyan:D?KD("\x1B[36m","\x1B[39m"):String,white:D?KD("\x1B[37m","\x1B[39m"):String,gray:D?KD("\x1B[90m","\x1B[39m"):String,bgBlack:D?KD("\x1B[40m","\x1B[49m"):String,bgRed:D?KD("\x1B[41m","\x1B[49m"):String,bgGreen:D?KD("\x1B[42m","\x1B[49m"):String,bgYellow:D?KD("\x1B[43m","\x1B[49m"):String,bgBlue:D?KD("\x1B[44m","\x1B[49m"):String,bgMagenta:D?KD("\x1B[45m","\x1B[49m"):String,bgCyan:D?KD("\x1B[46m","\x1B[49m"):String,bgWhite:D?KD("\x1B[47m","\x1B[49m"):String}),j6D,CU,IU,y6D,k6D,b6D=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},BU=10,XP=(D=0)=>(F)=>`\x1B[${F+D}m`,JP=(D=0)=>(F)=>`\x1B[${38+D};5;${F}m`,zP=(D=0)=>(F,E,w)=>`\x1B[${38+D};2;${F};${E};${w}m`,SD,x6D,c6D,r6D,I7,_6D=39,ZU="\x07",NP="[",s6D="]",qP="m",WU,TP=(D)=>`${I7.values().next().value}${NP}${D}${qP}`,KP=(D)=>`${I7.values().next().value}${WU}${D}${ZU}`,u6D=(D)=>D.split(" ").map((F)=>UE(F)),hU=(D,F,E)=>{const w=[...F];let $=!1,C=!1,f=UE(VP(D[D.length-1]));for(let[B,h]of w.entries()){const U=UE(h);if(f+U<=E?D[D.length-1]+=h:(D.push(h),f=0),I7.has(h)&&($=!0,C=w.slice(B+1).join("").startsWith(WU)),$){C?h===ZU&&($=!1,C=!1):h===qP&&($=!1);continue}f+=U,f===E&&B<w.length-1&&(D.push(""),f=0)}!f&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},d6D=(D)=>{const F=D.split(" ");let E=F.length;for(;E>0&&!(UE(F[E-1])>0);)E--;return E===F.length?D:F.slice(0,E).join(" ")+F.slice(E).join("")},v6D=(D,F,E={})=>{if(E.trim!==!1&&D.trim()==="")return"";let w="",$,C;const f=u6D(D);let B=[""];for(let[U,I]of D.split(" ").entries()){E.trim!==!1&&(B[B.length-1]=B[B.length-1].trimStart());let A=UE(B[B.length-1]);if(U!==0&&(A>=F&&(E.wordWrap===!1||E.trim===!1)&&(B.push(""),A=0),(A>0||E.trim===!1)&&(B[B.length-1]+=" ",A++)),E.hard&&f[U]>F){const Y=F-A,M=1+Math.floor((f[U]-Y-1)/F);Math.floor((f[U]-1)/F)<M&&B.push(""),hU(B,I,F);continue}if(A+f[U]>F&&A>0&&f[U]>0){if(E.wordWrap===!1&&A<F){hU(B,I,F);continue}B.push("")}if(A+f[U]>F&&E.wordWrap===!1){hU(B,I,F);continue}B[B.length-1]+=I}E.trim!==!1&&(B=B.map((U)=>d6D(U)));const h=[...B.join(`
44
+ `)];for(let[U,I]of h.entries()){if(w+=I,I7.has(I)){const{groups:Y}=new RegExp(`(?:\\${NP}(?<code>\\d+)m|\\${WU}(?<uri>.*)${ZU})`).exec(h.slice(U).join(""))||{groups:{}};if(Y.code!==void 0){const M=Number.parseFloat(Y.code);$=M===_6D?void 0:M}else Y.uri!==void 0&&(C=Y.uri.length===0?void 0:Y.uri)}const A=r6D.codes.get(Number($));h[U+1]===`
45
+ `?(C&&(w+=KP("")),$&&A&&(w+=TP(A))):I===`
46
+ `&&($&&A&&(w+=TP($)),C&&(w+=KP(C)))}return w},n6D,QP,l6D,OP,jP,PP,yP,i6D,u1=(D,F)=>i6D?D:F,p6D,a6D,o6D,t6D,XD="",VF="",MU,GU,e6D,HP,DFD,M7=(D)=>{switch(D){case"initial":case"active":return Q.cyan(p6D);case"cancel":return Q.red(a6D);case"error":return Q.yellow(o6D);case"submit":return Q.green(t6D)}},FFD=(D)=>{return new yP({validate:D.validate,placeholder:D.placeholder,defaultValue:D.defaultValue,initialValue:D.initialValue,render(){const F=`${Q.gray(XD)}
47
+ ${M7(this.state)} ${D.message}
48
+ `,E=D.placeholder?Q.inverse(D.placeholder[0])+Q.dim(D.placeholder.slice(1)):Q.inverse(Q.hidden("_")),w=this.value?this.valueWithCursor:E;switch(this.state){case"error":return`${F.trim()}
49
+ ${Q.yellow(XD)} ${w}
50
+ ${Q.yellow(VF)} ${Q.yellow(this.error)}
51
+ `;case"submit":return`${F}${Q.gray(XD)} ${Q.dim(this.value||D.placeholder)}`;case"cancel":return`${F}${Q.gray(XD)} ${Q.strikethrough(Q.dim(this.value??""))}${this.value?.trim()?"\n"+Q.gray(XD):""}`;default:return`${F}${Q.cyan(XD)} ${w}
52
+ ${Q.cyan(VF)}
53
+ `}}}).prompt()},EFD=(D)=>{const F=D.active??"Yes",E=D.inactive??"No";return new OP({active:F,inactive:E,initialValue:D.initialValue??!0,render(){const w=`${Q.gray(XD)}
54
+ ${M7(this.state)} ${D.message}
55
+ `,$=this.value?F:E;switch(this.state){case"submit":return`${w}${Q.gray(XD)} ${Q.dim($)}`;case"cancel":return`${w}${Q.gray(XD)} ${Q.strikethrough(Q.dim($))}
56
+ ${Q.gray(XD)}`;default:return`${w}${Q.cyan(XD)} ${this.value?`${Q.green(MU)} ${F}`:`${Q.dim(GU)} ${Q.dim(F)}`} ${Q.dim("/")} ${this.value?`${Q.dim(GU)} ${Q.dim(E)}`:`${Q.green(MU)} ${E}`}
57
+ ${Q.cyan(VF)}
58
+ `}}}).prompt()},wFD=(D)=>{const F=(E,w)=>{const $=E.label??String(E.value);switch(w){case"active":return`${Q.green(MU)} ${$} ${E.hint?Q.dim(`(${E.hint})`):""}`;case"selected":return`${Q.dim($)}`;case"cancelled":return`${Q.strikethrough(Q.dim($))}`}return`${Q.dim(GU)} ${Q.dim($)}`};return new PP({options:D.options,initialValue:D.initialValue,render(){const E=`${Q.gray(XD)}
59
+ ${M7(this.state)} ${D.message}
60
+ `;switch(this.state){case"submit":return`${E}${Q.gray(XD)} ${F(this.options[this.cursor],"selected")}`;case"cancel":return`${E}${Q.gray(XD)} ${F(this.options[this.cursor],"cancelled")}
61
+ ${Q.gray(XD)}`;default:return`${E}${Q.cyan(XD)} ${this.options.map((w,$)=>F(w,$===this.cursor?"active":"inactive")).join(`
62
+ ${Q.cyan(XD)} `)}
63
+ ${Q.cyan(VF)}
64
+ `}}}).prompt()},$FD=(D)=>{const F=(E,w)=>{const $=E.label??String(E.value);switch(w){case"active":return`${Q.cyan(e6D)} ${$} ${E.hint?Q.dim(`(${E.hint})`):""}`;case"selected":return`${Q.green(HP)} ${Q.dim($)}`;case"cancelled":return`${Q.strikethrough(Q.dim($))}`;case"active-selected":return`${Q.green(HP)} ${$} ${E.hint?Q.dim(`(${E.hint})`):""}`;case"submitted":return`${Q.dim($)}`}return`${Q.dim(DFD)} ${Q.dim($)}`};return new jP({options:D.options,initialValues:D.initialValues,required:D.required??!0,cursorAt:D.cursorAt,validate(E){if(this.required&&E.length===0)return`Please select at least one option.
65
+ ${Q.reset(Q.dim(`Press ${Q.gray(Q.bgWhite(Q.inverse(" space ")))} to select, ${Q.gray(Q.bgWhite(Q.inverse(" enter ")))} to submit`))}`},render(){const E=`${Q.gray(XD)}
66
+ ${M7(this.state)} ${D.message}
67
+ `;switch(this.state){case"submit":return`${E}${Q.gray(XD)} ${this.options.filter(({value:w})=>this.value.includes(w)).map((w)=>F(w,"submitted")).join(Q.dim(", "))||Q.dim("none")}`;case"cancel":{const w=this.options.filter(({value:$})=>this.value.includes($)).map(($)=>F($,"cancelled")).join(Q.dim(", "));return`${E}${Q.gray(XD)} ${w.trim()?`${w}
68
+ ${Q.gray(XD)}`:""}`}case"error":{const w=this.error.split("\n").map(($,C)=>C===0?`${Q.yellow(VF)} ${Q.yellow($)}`:` ${$}`).join("\n");return E+Q.yellow(XD)+" "+this.options.map(($,C)=>{const f=this.value.includes($.value),B=C===this.cursor;if(B&&f)return F($,"active-selected");if(f)return F($,"selected");return F($,B?"active":"inactive")}).join(`
69
+ ${Q.yellow(XD)} `)+"\n"+w+"\n"}default:return`${E}${Q.cyan(XD)} ${this.options.map((w,$)=>{const C=this.value.includes(w.value),f=$===this.cursor;if(f&&C)return F(w,"active-selected");if(C)return F(w,"selected");return F(w,f?"active":"inactive")}).join(`
70
+ ${Q.cyan(XD)} `)}
71
+ ${Q.cyan(VF)}
72
+ `}}}).prompt()};var bP=G(()=>{zU();hE();C7();h7();VD=`${UU}[`,AU={to(D,F){if(!F)return`${VD}${D+1}G`;return`${VD}${F+1};${D+1}H`},move(D,F){let E="";if(D<0)E+=`${VD}${-D}D`;else if(D>0)E+=`${VD}${D}C`;if(F<0)E+=`${VD}${-F}A`;else if(F>0)E+=`${VD}${F}B`;return E},up:(D=1)=>`${VD}${D}A`,down:(D=1)=>`${VD}${D}B`,forward:(D=1)=>`${VD}${D}C`,backward:(D=1)=>`${VD}${D}D`,nextLine:(D=1)=>`${VD}E`.repeat(D),prevLine:(D=1)=>`${VD}F`.repeat(D),left:`${VD}G`,hide:`${VD}?25l`,show:`${VD}?25h`,save:`${UU}7`,restore:`${UU}8`},V6D={up:(D=1)=>`${VD}S`.repeat(D),down:(D=1)=>`${VD}T`.repeat(D)},N6D={screen:`${VD}2J`,up:(D=1)=>`${VD}1J`.repeat(D),down:(D=1)=>`${VD}J`.repeat(D),line:`${VD}2K`,lineEnd:`${VD}K`,lineStart:`${VD}1K`,lines(D){let F="";for(let E=0;E<D;E++)F+=this.line+(E<D-1?AU.up():"");if(D)F+=AU.left;return F}},H2={cursor:AU,scroll:V6D,erase:N6D,beep:R6D},YU={exports:{}},q6D=L6D,O6D=!(("NO_COLOR"in process.env)||process.argv.includes("--no-color"))&&(("FORCE_COLOR"in process.env)||process.argv.includes("--color")||process.platform==="win32"||q6D.isatty(1)&&process.env.TERM!=="dumb"||("CI"in process.env));YU.exports=RP();YU.exports.createColors=RP;j6D=YU.exports,CU=XU(j6D),IU={},y6D={get exports(){return IU},set exports(D){IU=D}};(function(D){var F={};D.exports=F,F.eastAsianWidth=function(w){var $=w.charCodeAt(0),C=w.length==2?w.charCodeAt(1):0,f=$;return 55296<=$&&$<=56319&&56320<=C&&C<=57343&&($&=1023,C&=1023,f=$<<10|C,f+=65536),f==12288||65281<=f&&f<=65376||65504<=f&&f<=65510?"F":f==8361||65377<=f&&f<=65470||65474<=f&&f<=65479||65482<=f&&f<=65487||65490<=f&&f<=65495||65498<=f&&f<=65500||65512<=f&&f<=65518?"H":4352<=f&&f<=4447||4515<=f&&f<=4519||4602<=f&&f<=4607||9001<=f&&f<=9002||11904<=f&&f<=11929||11931<=f&&f<=12019||12032<=f&&f<=12245||12272<=f&&f<=12283||12289<=f&&f<=12350||12353<=f&&f<=12438||12441<=f&&f<=12543||12549<=f&&f<=12589||12593<=f&&f<=12686||12688<=f&&f<=12730||12736<=f&&f<=12771||12784<=f&&f<=12830||12832<=f&&f<=12871||12880<=f&&f<=13054||13056<=f&&f<=19903||19968<=f&&f<=42124||42128<=f&&f<=42182||43360<=f&&f<=43388||44032<=f&&f<=55203||55216<=f&&f<=55238||55243<=f&&f<=55291||63744<=f&&f<=64255||65040<=f&&f<=65049||65072<=f&&f<=65106||65108<=f&&f<=65126||65128<=f&&f<=65131||110592<=f&&f<=110593||127488<=f&&f<=127490||127504<=f&&f<=127546||127552<=f&&f<=127560||127568<=f&&f<=127569||131072<=f&&f<=194367||177984<=f&&f<=196605||196608<=f&&f<=262141?"W":32<=f&&f<=126||162<=f&&f<=163||165<=f&&f<=166||f==172||f==175||10214<=f&&f<=10221||10629<=f&&f<=10630?"Na":f==161||f==164||167<=f&&f<=168||f==170||173<=f&&f<=174||176<=f&&f<=180||182<=f&&f<=186||188<=f&&f<=191||f==198||f==208||215<=f&&f<=216||222<=f&&f<=225||f==230||232<=f&&f<=234||236<=f&&f<=237||f==240||242<=f&&f<=243||247<=f&&f<=250||f==252||f==254||f==257||f==273||f==275||f==283||294<=f&&f<=295||f==299||305<=f&&f<=307||f==312||319<=f&&f<=322||f==324||328<=f&&f<=331||f==333||338<=f&&f<=339||358<=f&&f<=359||f==363||f==462||f==464||f==466||f==468||f==470||f==472||f==474||f==476||f==593||f==609||f==708||f==711||713<=f&&f<=715||f==717||f==720||728<=f&&f<=731||f==733||f==735||768<=f&&f<=879||913<=f&&f<=929||931<=f&&f<=937||945<=f&&f<=961||963<=f&&f<=969||f==1025||1040<=f&&f<=1103||f==1105||f==8208||8211<=f&&f<=8214||8216<=f&&f<=8217||8220<=f&&f<=8221||8224<=f&&f<=8226||8228<=f&&f<=8231||f==8240||8242<=f&&f<=8243||f==8245||f==8251||f==8254||f==8308||f==8319||8321<=f&&f<=8324||f==8364||f==8451||f==8453||f==8457||f==8467||f==8470||8481<=f&&f<=8482||f==8486||f==8491||8531<=f&&f<=8532||8539<=f&&f<=8542||8544<=f&&f<=8555||8560<=f&&f<=8569||f==8585||8592<=f&&f<=8601||8632<=f&&f<=8633||f==8658||f==8660||f==8679||f==8704||8706<=f&&f<=8707||8711<=f&&f<=8712||f==8715||f==8719||f==8721||f==8725||f==8730||8733<=f&&f<=8736||f==8739||f==8741||8743<=f&&f<=8748||f==8750||8756<=f&&f<=8759||8764<=f&&f<=8765||f==8776||f==8780||f==8786||8800<=f&&f<=8801||8804<=f&&f<=8807||8810<=f&&f<=8811||8814<=f&&f<=8815||8834<=f&&f<=8835||8838<=f&&f<=8839||f==8853||f==8857||f==8869||f==8895||f==8978||9312<=f&&f<=9449||9451<=f&&f<=9547||9552<=f&&f<=9587||9600<=f&&f<=9615||9618<=f&&f<=9621||9632<=f&&f<=9633||9635<=f&&f<=9641||9650<=f&&f<=9651||9654<=f&&f<=9655||9660<=f&&f<=9661||9664<=f&&f<=9665||9670<=f&&f<=9672||f==9675||9678<=f&&f<=9681||9698<=f&&f<=9701||f==9711||9733<=f&&f<=9734||f==9737||9742<=f&&f<=9743||9748<=f&&f<=9749||f==9756||f==9758||f==9792||f==9794||9824<=f&&f<=9825||9827<=f&&f<=9829||9831<=f&&f<=9834||9836<=f&&f<=9837||f==9839||9886<=f&&f<=9887||9918<=f&&f<=9919||9924<=f&&f<=9933||9935<=f&&f<=9953||f==9955||9960<=f&&f<=9983||f==10045||f==10071||10102<=f&&f<=10111||11093<=f&&f<=11097||12872<=f&&f<=12879||57344<=f&&f<=63743||65024<=f&&f<=65039||f==65533||127232<=f&&f<=127242||127248<=f&&f<=127277||127280<=f&&f<=127337||127344<=f&&f<=127386||917760<=f&&f<=917999||983040<=f&&f<=1048573||1048576<=f&&f<=1114109?"A":"N"},F.characterLength=function(w){var $=this.eastAsianWidth(w);return $=="F"||$=="W"||$=="A"?2:1};function E(w){return w.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}F.length=function(w){for(var $=E(w),C=0,f=0;f<$.length;f++)C=C+this.characterLength($[f]);return C},F.slice=function(w,$,C){textLen=F.length(w),$=$||0,C=C||1,$<0&&($=textLen+$),C<0&&(C=textLen+C);for(var f="",B=0,h=E(w),U=0;U<h.length;U++){var I=h[U],A=F.length(I);if(B>=$-(A==2?1:0))if(B+A<=C)f+=I;else break;B+=A}return f}})(y6D);k6D=IU,SD={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(SD.modifier);x6D=Object.keys(SD.color),c6D=Object.keys(SD.bgColor);[...x6D];r6D=g6D(),I7=new Set(["\x1B","\x9B"]),WU=`${s6D}8;;`,n6D=Symbol("clack:cancel"),QP=new Map([["k","up"],["j","down"],["h","left"],["l","right"]]),l6D=new Set(["up","down","left","right","space","enter"]);OP=class OP extends AE{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",(F)=>{this.output.write(H2.cursor.move(0,-1)),this.value=F,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};jP=class jP extends AE{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.value=[...D.initialValues??[]],this.cursor=Math.max(this.options.findIndex(({value:F})=>F===D.cursorAt),0),this.on("key",(F)=>{F==="a"&&this.toggleAll()}),this.on("cursor",(F)=>{switch(F){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(){const D=this.value.length===this.options.length;this.value=D?[]:this.options.map((F)=>F.value)}toggleValue(){const D=this.value.includes(this._value);this.value=D?this.value.filter((F)=>F!==this._value):[...this.value,this._value]}};PP=class PP extends AE{constructor(D){super(D,!1),this.cursor=0,this.options=D.options,this.cursor=this.options.findIndex(({value:F})=>F===D.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",(F)=>{switch(F){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}};yP=class yP extends AE{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}${CU.inverse(CU.hidden("_"))}`;else{const F=this.value.slice(0,this.cursor),E=this.value.slice(this.cursor);this.valueWithCursor=`${F}${CU.inverse(E[0])}${E.slice(1)}`}})}get cursor(){return this._cursor}};i6D=JU(),p6D=u1("\u276F",">"),a6D=u1("\u25A0","x"),o6D=u1("\u25B2","x"),t6D=u1("\u2714","\u221A"),MU=u1("\u25CF",">"),GU=u1("\u25CB"," "),e6D=u1("\u25FB","[\u2022]"),HP=u1("\u25FC","[+]"),DFD=u1("\u25FB","[ ]")});import L2 from"process";function BFD(D){for(let F of CFD){const E=F[1]||F[0];if(D[E])return{name:F[0].toLowerCase(),...F[2]}}if(D.SHELL&&D.SHELL==="/bin/jsh")return{name:"stackblitz",ci:!1};return{name:"",ci:!1}}function ME(D){return D?D!=="false":!1}function IFD({onlyFirst:D=!1}={}){const F=["[\\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(F,D?void 0:"g")}function GFD(D){if(typeof D!=="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(MFD,"")}function XU(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}function XFD(D,F){if(typeof D!=="string"||D.length===0)return 0;if(F={ambiguousIsNarrow:!0,countAnsiEscapeCodes:!1,...F},!F.countAnsiEscapeCodes)D=GFD(D);if(D.length===0)return 0;const E=F.ambiguousIsNarrow?1:2;let w=0;for(let{segment:$}of new Intl.Segmenter().segment(D)){const C=$.codePointAt(0);if(C<=31||C>=127&&C<=159)continue;if(C>=768&&C<=879)continue;if(WFD().test($)){w+=2;continue}switch(ZFD.eastAsianWidth($)){case"F":case"W":{w+=2;break}case"A":{w+=E;break}default:w+=1}}return w}function JU(){if(L2.platform!=="win32")return L2.env.TERM!=="linux";return Boolean(L2.env.CI)||Boolean(L2.env.WT_SESSION)||Boolean(L2.env.TERMINUS_SUBLIME)||L2.env.ConEmuTask==="{cmd::Cmder}"||L2.env.TERM_PROGRAM==="Terminus-Sublime"||L2.env.TERM_PROGRAM==="vscode"||L2.env.TERM==="xterm-256color"||L2.env.TERM==="alacritty"||L2.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}function cP(D){if(!Intl.Segmenter)return Z0(D).length;return XFD(D)}function G7(D){return D.replace(/`([^`]+)`/gm,(F,E)=>Q.cyan(E)).replace(/\s+_([^_]+)_\s+/gm,(F,E)=>` ${Q.underline(E)} `)}function KFD(D="white"){return Q[D]||Q.white}function SFD(D="bgWhite"){return Q[`bg${D[0].toUpperCase()}${D.slice(1)}`]||Q.bgWhite}function Z7(D={}){let F=QFD();if(process.env.CONSOLA_LEVEL)F=Number.parseInt(process.env.CONSOLA_LEVEL)??F;return UP({level:F,defaults:{level:F},stdout:process.stdout,stderr:process.stderr,prompt:(...w)=>Promise.resolve().then(() => (bP(),kP)).then(($)=>$.prompt(...w)),reporters:D.reporters||[D.fancy??!(rP||TU)?new sP:new B7],...D})}function QFD(){if(AFD)return lD.debug;if(TU)return lD.warn;return lD.info}var CFD,Y7,IE,gP,hFD,rP,UFD,AFD,TU,MFD,_P,YFD,ZFD,WFD=()=>{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},JFD,zFD,TFD,Y1=(D,F)=>TFD?D:F,xP,sP,KU;var zU=G(()=>{C7();h7();hE();CFD=[["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"]],Y7=typeof process!=="undefined"?process:{},IE=Y7.env||{},gP=BFD(IE),hFD=typeof process!=="undefined"&&process.env&&"development"||"";Y7.platform;gP.name;rP=ME(IE.CI)||gP.ci!==!1,UFD=ME(Y7.stdout&&Y7.stdout.isTTY),AFD=ME(IE.DEBUG),TU=hFD==="test"||ME(IE.TEST);ME(IE.MINIMAL);MFD=IFD(),_P={exports:{}};(function(D){var F={};D.exports=F,F.eastAsianWidth=function(w){var $=w.charCodeAt(0),C=w.length==2?w.charCodeAt(1):0,f=$;if(55296<=$&&$<=56319&&(56320<=C&&C<=57343))$&=1023,C&=1023,f=$<<10|C,f+=65536;if(f==12288||65281<=f&&f<=65376||65504<=f&&f<=65510)return"F";if(f==8361||65377<=f&&f<=65470||65474<=f&&f<=65479||65482<=f&&f<=65487||65490<=f&&f<=65495||65498<=f&&f<=65500||65512<=f&&f<=65518)return"H";if(4352<=f&&f<=4447||4515<=f&&f<=4519||4602<=f&&f<=4607||9001<=f&&f<=9002||11904<=f&&f<=11929||11931<=f&&f<=12019||12032<=f&&f<=12245||12272<=f&&f<=12283||12289<=f&&f<=12350||12353<=f&&f<=12438||12441<=f&&f<=12543||12549<=f&&f<=12589||12593<=f&&f<=12686||12688<=f&&f<=12730||12736<=f&&f<=12771||12784<=f&&f<=12830||12832<=f&&f<=12871||12880<=f&&f<=13054||13056<=f&&f<=19903||19968<=f&&f<=42124||42128<=f&&f<=42182||43360<=f&&f<=43388||44032<=f&&f<=55203||55216<=f&&f<=55238||55243<=f&&f<=55291||63744<=f&&f<=64255||65040<=f&&f<=65049||65072<=f&&f<=65106||65108<=f&&f<=65126||65128<=f&&f<=65131||110592<=f&&f<=110593||127488<=f&&f<=127490||127504<=f&&f<=127546||127552<=f&&f<=127560||127568<=f&&f<=127569||131072<=f&&f<=194367||177984<=f&&f<=196605||196608<=f&&f<=262141)return"W";if(32<=f&&f<=126||162<=f&&f<=163||165<=f&&f<=166||f==172||f==175||10214<=f&&f<=10221||10629<=f&&f<=10630)return"Na";if(f==161||f==164||167<=f&&f<=168||f==170||173<=f&&f<=174||176<=f&&f<=180||182<=f&&f<=186||188<=f&&f<=191||f==198||f==208||215<=f&&f<=216||222<=f&&f<=225||f==230||232<=f&&f<=234||236<=f&&f<=237||f==240||242<=f&&f<=243||247<=f&&f<=250||f==252||f==254||f==257||f==273||f==275||f==283||294<=f&&f<=295||f==299||305<=f&&f<=307||f==312||319<=f&&f<=322||f==324||328<=f&&f<=331||f==333||338<=f&&f<=339||358<=f&&f<=359||f==363||f==462||f==464||f==466||f==468||f==470||f==472||f==474||f==476||f==593||f==609||f==708||f==711||713<=f&&f<=715||f==717||f==720||728<=f&&f<=731||f==733||f==735||768<=f&&f<=879||913<=f&&f<=929||931<=f&&f<=937||945<=f&&f<=961||963<=f&&f<=969||f==1025||1040<=f&&f<=1103||f==1105||f==8208||8211<=f&&f<=8214||8216<=f&&f<=8217||8220<=f&&f<=8221||8224<=f&&f<=8226||8228<=f&&f<=8231||f==8240||8242<=f&&f<=8243||f==8245||f==8251||f==8254||f==8308||f==8319||8321<=f&&f<=8324||f==8364||f==8451||f==8453||f==8457||f==8467||f==8470||8481<=f&&f<=8482||f==8486||f==8491||8531<=f&&f<=8532||8539<=f&&f<=8542||8544<=f&&f<=8555||8560<=f&&f<=8569||f==8585||8592<=f&&f<=8601||8632<=f&&f<=8633||f==8658||f==8660||f==8679||f==8704||8706<=f&&f<=8707||8711<=f&&f<=8712||f==8715||f==8719||f==8721||f==8725||f==8730||8733<=f&&f<=8736||f==8739||f==8741||8743<=f&&f<=8748||f==8750||8756<=f&&f<=8759||8764<=f&&f<=8765||f==8776||f==8780||f==8786||8800<=f&&f<=8801||8804<=f&&f<=8807||8810<=f&&f<=8811||8814<=f&&f<=8815||8834<=f&&f<=8835||8838<=f&&f<=8839||f==8853||f==8857||f==8869||f==8895||f==8978||9312<=f&&f<=9449||9451<=f&&f<=9547||9552<=f&&f<=9587||9600<=f&&f<=9615||9618<=f&&f<=9621||9632<=f&&f<=9633||9635<=f&&f<=9641||9650<=f&&f<=9651||9654<=f&&f<=9655||9660<=f&&f<=9661||9664<=f&&f<=9665||9670<=f&&f<=9672||f==9675||9678<=f&&f<=9681||9698<=f&&f<=9701||f==9711||9733<=f&&f<=9734||f==9737||9742<=f&&f<=9743||9748<=f&&f<=9749||f==9756||f==9758||f==9792||f==9794||9824<=f&&f<=9825||9827<=f&&f<=9829||9831<=f&&f<=9834||9836<=f&&f<=9837||f==9839||9886<=f&&f<=9887||9918<=f&&f<=9919||9924<=f&&f<=9933||9935<=f&&f<=9953||f==9955||9960<=f&&f<=9983||f==10045||f==10071||10102<=f&&f<=10111||11093<=f&&f<=11097||12872<=f&&f<=12879||57344<=f&&f<=63743||65024<=f&&f<=65039||f==65533||127232<=f&&f<=127242||127248<=f&&f<=127277||127280<=f&&f<=127337||127344<=f&&f<=127386||917760<=f&&f<=917999||983040<=f&&f<=1048573||1048576<=f&&f<=1114109)return"A";return"N"},F.characterLength=function(w){var $=this.eastAsianWidth(w);if($=="F"||$=="W"||$=="A")return 2;else return 1};function E(w){return w.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}F.length=function(w){var $=E(w),C=0;for(var f=0;f<$.length;f++)C=C+this.characterLength($[f]);return C},F.slice=function(w,$,C){if(textLen=F.length(w),$=$?$:0,C=C?C:1,$<0)$=textLen+$;if(C<0)C=textLen+C;var f="",B=0,h=E(w);for(var U=0;U<h.length;U++){var I=h[U],A=F.length(I);if(B>=$-(A==2?1:0))if(B+A<=C)f+=I;else break;B+=A}return f}})(_P);YFD=_P.exports,ZFD=XU(YFD),JFD={info:"cyan",fail:"red",success:"green",ready:"green",start:"magenta"},zFD={0:"red",1:"yellow"},TFD=JU(),xP={error:Y1("\u2716","\xD7"),fatal:Y1("\u2716","\xD7"),ready:Y1("\u2714","\u221A"),warn:Y1("\u26A0","\u203C"),info:Y1("\u2139","i"),success:Y1("\u2714","\u221A"),debug:Y1("\u2699","D"),trace:Y1("\u2192","\u2192"),fail:Y1("\u2716","\xD7"),start:Y1("\u25D0","o"),log:""};sP=class sP extends B7{formatStack(D){return"\n"+$U(D).map((F)=>" "+F.replace(/^at +/,(E)=>Q.gray(E)).replace(/\((.+)\)/,(E,w)=>`(${Q.cyan(w)})`)).join("\n")}formatType(D,F,E){const w=JFD[D.type]||zFD[D.level]||"gray";if(F)return SFD(w)(Q.black(` ${D.type.toUpperCase()} `));const $=typeof xP[D.type]==="string"?xP[D.type]:D.icon||D.type;return $?KFD(w)($):""}formatLogObj(D,F){const[E,...w]=this.formatArgs(D.args,F).split("\n");if(D.type==="box")return fU(G7(E+(w.length>0?"\n"+w.join("\n"):"")),{title:D.title?G7(D.title):void 0,style:D.style});const $=this.formatDate(D.date,F),C=$&&Q.gray($),f=D.badge??D.level<2,B=this.formatType(D,f,F),h=D.tag?Q.gray(D.tag):"";let U;const I=this.filterAndJoin([B,G7(E)]),A=this.filterAndJoin(F.columns?[h,C]:[h]),Y=(F.columns||0)-cP(I)-cP(A)-2;if(U=Y>0&&(F.columns||0)>=80?I+" ".repeat(Y)+A:(A?`${Q.gray(`[${A}]`)} `:"")+I,U+=G7(w.length>0?"\n"+w.join("\n"):""),D.type==="trace"){const M=new Error("Trace: "+D.message);U+=this.formatStack(M.stack||"")}return f?"\n"+U+"\n":U}};KU=Z7()});var qD=W((LcD,Ly)=>{function Hy(D,F){let E=0,w,$="",C="";for(;E<D.length;E++)if(w=D[E],$+=w.open,C+=w.close,F.includes(w.close))F=F.replace(w.rgx,w.close+w.open);return $+F+C}function i3D(D,F){let E={has:D,keys:F};return E.reset=CD.reset.bind(E),E.bold=CD.bold.bind(E),E.dim=CD.dim.bind(E),E.italic=CD.italic.bind(E),E.underline=CD.underline.bind(E),E.inverse=CD.inverse.bind(E),E.hidden=CD.hidden.bind(E),E.strikethrough=CD.strikethrough.bind(E),E.black=CD.black.bind(E),E.red=CD.red.bind(E),E.green=CD.green.bind(E),E.yellow=CD.yellow.bind(E),E.blue=CD.blue.bind(E),E.magenta=CD.magenta.bind(E),E.cyan=CD.cyan.bind(E),E.white=CD.white.bind(E),E.gray=CD.gray.bind(E),E.grey=CD.grey.bind(E),E.bgBlack=CD.bgBlack.bind(E),E.bgRed=CD.bgRed.bind(E),E.bgGreen=CD.bgGreen.bind(E),E.bgYellow=CD.bgYellow.bind(E),E.bgBlue=CD.bgBlue.bind(E),E.bgMagenta=CD.bgMagenta.bind(E),E.bgCyan=CD.bgCyan.bind(E),E.bgWhite=CD.bgWhite.bind(E),E}function GD(D,F){let E={open:`\x1B[${D}m`,close:`\x1B[${F}m`,rgx:new RegExp(`\\x1b\\[${F}m`,"g")};return function(w){if(this!==void 0&&this.has!==void 0)return this.has.includes(D)||(this.has.push(D),this.keys.push(E)),w===void 0?this:CD.enabled?Hy(this.keys,w+""):w+"";return w===void 0?i3D([D],[E]):CD.enabled?Hy([E],w+""):w+""}}var{FORCE_COLOR:m3D,NODE_DISABLE_COLORS:n3D,TERM:l3D}=process.env,CD={enabled:!n3D&&l3D!=="dumb"&&m3D!=="0",reset:GD(0,0),bold:GD(1,22),dim:GD(2,22),italic:GD(3,23),underline:GD(4,24),inverse:GD(7,27),hidden:GD(8,28),strikethrough:GD(9,29),black:GD(30,39),red:GD(31,39),green:GD(32,39),yellow:GD(33,39),blue:GD(34,39),magenta:GD(35,39),cyan:GD(36,39),white:GD(37,39),gray:GD(90,39),grey:GD(90,39),bgBlack:GD(40,49),bgRed:GD(41,49),bgGreen:GD(42,49),bgYellow:GD(43,49),bgBlue:GD(44,49),bgMagenta:GD(45,49),bgCyan:GD(46,49),bgWhite:GD(47,49)};Ly.exports=CD});var Vy=W((RcD,Ry)=>{Ry.exports=(D,F)=>{if(D.meta&&D.name!=="escape")return;if(D.ctrl){if(D.name==="a")return"first";if(D.name==="c")return"abort";if(D.name==="d")return"abort";if(D.name==="e")return"last";if(D.name==="g")return"reset"}if(F){if(D.name==="j")return"down";if(D.name==="k")return"up"}if(D.name==="return")return"submit";if(D.name==="enter")return"submit";if(D.name==="backspace")return"delete";if(D.name==="delete")return"deleteForward";if(D.name==="abort")return"abort";if(D.name==="escape")return"exit";if(D.name==="tab")return"next";if(D.name==="pagedown")return"nextPage";if(D.name==="pageup")return"prevPage";if(D.name==="home")return"home";if(D.name==="end")return"end";if(D.name==="up")return"up";if(D.name==="down")return"down";if(D.name==="right")return"right";if(D.name==="left")return"left";return!1}});var Q7=W((VcD,Ny)=>{Ny.exports=(D)=>{const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),E=new RegExp(F,"g");return typeof D==="string"?D.replace(E,""):D}});var jD=W((NcD,qy)=>{var OD=`${"\x1B"}[`,NU={to(D,F){if(!F)return`${OD}${D+1}G`;return`${OD}${F+1};${D+1}H`},move(D,F){let E="";if(D<0)E+=`${OD}${-D}D`;else if(D>0)E+=`${OD}${D}C`;if(F<0)E+=`${OD}${-F}A`;else if(F>0)E+=`${OD}${F}B`;return E},up:(D=1)=>`${OD}${D}A`,down:(D=1)=>`${OD}${D}B`,forward:(D=1)=>`${OD}${D}C`,backward:(D=1)=>`${OD}${D}D`,nextLine:(D=1)=>`${OD}E`.repeat(D),prevLine:(D=1)=>`${OD}F`.repeat(D),left:`${OD}G`,hide:`${OD}?25l`,show:`${OD}?25h`,save:`${"\x1B"}7`,restore:`${"\x1B"}8`},p3D={up:(D=1)=>`${OD}S`.repeat(D),down:(D=1)=>`${OD}T`.repeat(D)},a3D={screen:`${OD}2J`,up:(D=1)=>`${OD}1J`.repeat(D),down:(D=1)=>`${OD}J`.repeat(D),line:`${OD}2K`,lineEnd:`${OD}K`,lineStart:`${OD}1K`,lines(D){let F="";for(let E=0;E<D;E++)F+=this.line+(E<D-1?NU.up():"");if(D)F+=NU.left;return F}};qy.exports={cursor:NU,scroll:p3D,erase:a3D,beep:"\x07"}});var ky=W((qcD,yy)=>{function o3D(D,F){var E=typeof Symbol!=="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!E){if(Array.isArray(D)||(E=t3D(D))||F&&D&&typeof D.length==="number"){if(E)D=E;var w=0,$=function h(){};return{s:$,n:function h(){if(w>=D.length)return{done:!0};return{done:!1,value:D[w++]}},e:function h(U){throw U},f:$}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var C=!0,f=!1,B;return{s:function h(){E=E.call(D)},n:function h(){var U=E.next();return C=U.done,U},e:function h(U){f=!0,B=U},f:function h(){try{if(!C&&E.return!=null)E.return()}finally{if(f)throw B}}}}function t3D(D,F){if(!D)return;if(typeof D==="string")return Oy(D,F);var E=Object.prototype.toString.call(D).slice(8,-1);if(E==="Object"&&D.constructor)E=D.constructor.name;if(E==="Map"||E==="Set")return Array.from(D);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Oy(D,F)}function Oy(D,F){if(F==null||F>D.length)F=D.length;for(var E=0,w=new Array(F);E<F;E++)w[E]=D[E];return w}var e3D=Q7(),Py=jD(),jy=Py.erase,DED=Py.cursor,FED=(D)=>[...e3D(D)].length;yy.exports=function(D,F){if(!F)return jy.line+DED.to(0);let E=0;const w=D.split(/\r?\n/);var $=o3D(w),C;try{for($.s();!(C=$.n()).done;){let f=C.value;E+=1+Math.floor(Math.max(FED(f)-1,0)/F)}}catch(f){$.e(f)}finally{$.f()}return jy.lines(E)}});var qU=W((OcD,by)=>{var ZE={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},EED={arrowUp:ZE.arrowUp,arrowDown:ZE.arrowDown,arrowLeft:ZE.arrowLeft,arrowRight:ZE.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},wED=process.platform==="win32"?EED:ZE;by.exports=wED});var cy=W((jcD,xy)=>{var OF=qD(),Z6=qU(),OU=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),$ED=(D)=>OU[D]||OU.default,WE=Object.freeze({aborted:OF.red(Z6.cross),done:OF.green(Z6.tick),exited:OF.yellow(Z6.cross),default:OF.cyan("?")}),fED=(D,F,E)=>F?WE.aborted:E?WE.exited:D?WE.done:WE.default,CED=(D)=>OF.gray(D?Z6.ellipsis:Z6.pointerSmall),BED=(D,F)=>OF.gray(D?F?Z6.pointerSmall:"+":Z6.line);xy.exports={styles:OU,render:$ED,symbols:WE,symbol:fED,delimiter:CED,item:BED}});var ry=W((PcD,gy)=>{var hED=Q7();gy.exports=function(D,F){let E=String(hED(D)||"").split(/\r?\n/);if(!F)return E.length;return E.map((w)=>Math.ceil(w.length/F)).reduce((w,$)=>w+$)}});var sy=W((ycD,_y)=>{_y.exports=(D,F={})=>{const E=Number.isSafeInteger(parseInt(F.margin))?new Array(parseInt(F.margin)).fill(" ").join(""):F.margin||"",w=F.width;return(D||"").split(/\r?\n/g).map(($)=>$.split(/\s+/g).reduce((C,f)=>{if(f.length+E.length>=w||C[C.length-1].length+f.length+1<w)C[C.length-1]+=` ${f}`;else C.push(`${E}${f}`);return C},[E]).join("\n")).join("\n")}});var dy=W((kcD,uy)=>{uy.exports=(D,F,E)=>{E=E||F;let w=Math.min(F-E,D-Math.floor(E/2));if(w<0)w=0;let $=Math.min(w+E,F);return{startIndex:w,endIndex:$}}});var N2=W((bcD,vy)=>{vy.exports={action:Vy(),clear:ky(),style:cy(),strip:Q7(),figures:qU(),lines:ry(),wrap:sy(),entriesToDisplay:dy()}});var n1=W((xcD,iy)=>{var my=import.meta.require("readline"),UED=N2(),AED=UED.action,IED=import.meta.require("events"),ny=jD(),MED=ny.beep,GED=ny.cursor,YED=qD();class ly extends IED{constructor(D={}){super();this.firstRender=!0,this.in=D.stdin||process.stdin,this.out=D.stdout||process.stdout,this.onRender=(D.onRender||(()=>{return})).bind(this);const F=my.createInterface({input:this.in,escapeCodeTimeout:50});if(my.emitKeypressEvents(this.in,F),this.in.isTTY)this.in.setRawMode(!0);const E=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,w=($,C)=>{let f=AED(C,E);if(f===!1)this._&&this._($,C);else if(typeof this[f]==="function")this[f](C);else this.bell()};this.close=()=>{if(this.out.write(GED.show),this.in.removeListener("keypress",w),this.in.isTTY)this.in.setRawMode(!1);F.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",w)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(MED)}render(){if(this.onRender(YED),this.firstRender)this.firstRender=!1}}iy.exports=ly});var Dk=W((ccD,ey)=>{function py(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function ay(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){py(C,w,$,f,B,"next",h)}function B(h){py(C,w,$,f,B,"throw",h)}f(void 0)})}}var H7=qD(),ZED=n1(),oy=jD(),WED=oy.erase,XE=oy.cursor,L7=N2(),jU=L7.style,PU=L7.clear,XED=L7.lines,JED=L7.figures;class ty extends ZED{constructor(D={}){super(D);this.transform=jU.render(D.style),this.scale=this.transform.scale,this.msg=D.message,this.initial=D.initial||"",this.validator=D.validate||(()=>!0),this.value="",this.errorMsg=D.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=PU("",this.out.columns),this.render()}set value(D){if(!D&&this.initial)this.placeholder=!0,this.rendered=H7.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(D);this._value=D,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var D=this;return ay(function*(){let F=yield D.validator(D.value);if(typeof F==="string")D.errorMsg=F,F=!1;D.error=!F})()}submit(){var D=this;return ay(function*(){if(D.value=D.value||D.initial,D.cursorOffset=0,D.cursor=D.rendered.length,yield D.validate(),D.error){D.red=!0,D.fire(),D.render();return}D.done=!0,D.aborted=!1,D.fire(),D.render(),D.out.write("\n"),D.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(D){if(this.placeholder)return;this.cursor=this.cursor+D,this.cursorOffset+=D}_(D,F){let E=this.value.slice(0,this.cursor),w=this.value.slice(this.cursor);this.value=`${E}${D}${w}`,this.red=!1,this.cursor=this.placeholder?0:E.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let D=this.value.slice(0,this.cursor-1),F=this.value.slice(this.cursor);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let D=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor+1);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(XE.down(XED(this.outputError,this.out.columns)-1)+PU(this.outputError,this.out.columns));this.out.write(PU(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[jU.symbol(this.done,this.aborted),H7.bold(this.msg),jU.delimiter(this.done),this.red?H7.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":JED.pointerSmall} ${H7.red().italic(F)}`,"");this.out.write(WED.line+XE.to(0)+this.outputText+XE.save+this.outputError+XE.restore+XE.move(this.cursorOffset,0))}}ey.exports=ty});var fk=W((gcD,$k)=>{var l1=qD(),zED=n1(),JE=N2(),Fk=JE.style,Ek=JE.clear,R7=JE.figures,TED=JE.wrap,KED=JE.entriesToDisplay,SED=jD(),QED=SED.cursor;class wk extends zED{constructor(D={}){super(D);this.msg=D.message,this.hint=D.hint||"- Use arrow-keys. Return to submit.",this.warn=D.warn||"- This option is disabled",this.cursor=D.initial||0,this.choices=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),value:F&&(F.value===void 0?E:F.value),description:F&&F.description,selected:F&&F.selected,disabled:F&&F.disabled}}),this.optionsPerPage=D.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Ek("",this.out.columns),this.render()}moveCursor(D){this.cursor=D,this.value=this.choices[D].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(D,F){if(D===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(QED.hide);else this.out.write(Ek(this.outputText,this.out.columns));super.render();let D=KED(this.cursor,this.choices.length,this.optionsPerPage),F=D.startIndex,E=D.endIndex;if(this.outputText=[Fk.symbol(this.done,this.aborted),l1.bold(this.msg),Fk.delimiter(!1),this.done?this.selection.title:this.selection.disabled?l1.yellow(this.warn):l1.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let w=F;w<E;w++){let $,C,f="",B=this.choices[w];if(w===F&&F>0)C=R7.arrowUp;else if(w===E-1&&E<this.choices.length)C=R7.arrowDown;else C=" ";if(B.disabled)$=this.cursor===w?l1.gray().underline(B.title):l1.strikethrough().gray(B.title),C=(this.cursor===w?l1.bold().gray(R7.pointer)+" ":" ")+C;else if($=this.cursor===w?l1.cyan().underline(B.title):B.title,C=(this.cursor===w?l1.cyan(R7.pointer)+" ":" ")+C,B.description&&this.cursor===w){if(f=` - ${B.description}`,C.length+$.length+f.length>=this.out.columns||B.description.split(/\r?\n/).length>1)f="\n"+TED(B.description,{margin:3,width:this.out.columns})}this.outputText+=`${C} ${$}${l1.gray(f)}\n`}}this.out.write(this.outputText)}}$k.exports=wk});var Mk=W((rcD,Ik)=>{var V7=qD(),HED=n1(),hk=N2(),Ck=hk.style,LED=hk.clear,Uk=jD(),Bk=Uk.cursor,RED=Uk.erase;class Ak extends HED{constructor(D={}){super(D);this.msg=D.message,this.value=!!D.initial,this.active=D.active||"on",this.inactive=D.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(D,F){if(D===" ")this.value=!this.value;else if(D==="1")this.value=!0;else if(D==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(Bk.hide);else this.out.write(LED(this.outputText,this.out.columns));super.render(),this.outputText=[Ck.symbol(this.done,this.aborted),V7.bold(this.msg),Ck.delimiter(this.done),this.value?this.inactive:V7.cyan().underline(this.inactive),V7.gray("/"),this.value?V7.cyan().underline(this.active):this.active].join(" "),this.out.write(RED.line+Bk.to(0)+this.outputText)}}Ik.exports=Ak});var Z1=W((_cD,Gk)=>{class N7{constructor({token:D,date:F,parts:E,locales:w}){this.token=D,this.date=F||new Date,this.parts=E||[this],this.locales=w||{}}up(){}down(){}next(){const D=this.parts.indexOf(this);return this.parts.find((F,E)=>E>D&&F instanceof N7)}setTo(D){}prev(){let D=[].concat(this.parts).reverse();const F=D.indexOf(this);return D.find((E,w)=>w>F&&E instanceof N7)}toString(){return String(this.date)}}Gk.exports=N7});var Wk=W((scD,Zk)=>{var VED=Z1();class Yk extends VED{constructor(D={}){super(D)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let D=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?D.toUpperCase():D}}Zk.exports=Yk});var zk=W((ucD,Jk)=>{var NED=Z1(),qED=(D)=>{return D=D%10,D===1?"st":D===2?"nd":D===3?"rd":"th"};class Xk extends NED{constructor(D={}){super(D)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(D){this.date.setDate(parseInt(D.substr(-2)))}toString(){let D=this.date.getDate(),F=this.date.getDay();return this.token==="DD"?String(D).padStart(2,"0"):this.token==="Do"?D+qED(D):this.token==="d"?F+1:this.token==="ddd"?this.locales.weekdaysShort[F]:this.token==="dddd"?this.locales.weekdays[F]:D}}Jk.exports=Xk});var Sk=W((dcD,Kk)=>{var OED=Z1();class Tk extends OED{constructor(D={}){super(D)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(D){this.date.setHours(parseInt(D.substr(-2)))}toString(){let D=this.date.getHours();if(/h/.test(this.token))D=D%12||12;return this.token.length>1?String(D).padStart(2,"0"):D}}Kk.exports=Tk});var Lk=W((vcD,Hk)=>{var jED=Z1();class Qk extends jED{constructor(D={}){super(D)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(D){this.date.setMilliseconds(parseInt(D.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}Hk.exports=Qk});var Nk=W((mcD,Vk)=>{var PED=Z1();class Rk extends PED{constructor(D={}){super(D)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(D){this.date.setMinutes(parseInt(D.substr(-2)))}toString(){let D=this.date.getMinutes();return this.token.length>1?String(D).padStart(2,"0"):D}}Vk.exports=Rk});var jk=W((ncD,Ok)=>{var yED=Z1();class qk extends yED{constructor(D={}){super(D)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(D){D=parseInt(D.substr(-2))-1,this.date.setMonth(D<0?0:D)}toString(){let D=this.date.getMonth(),F=this.token.length;return F===2?String(D+1).padStart(2,"0"):F===3?this.locales.monthsShort[D]:F===4?this.locales.months[D]:String(D+1)}}Ok.exports=qk});var kk=W((lcD,yk)=>{var kED=Z1();class Pk extends kED{constructor(D={}){super(D)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(D){this.date.setSeconds(parseInt(D.substr(-2)))}toString(){let D=this.date.getSeconds();return this.token.length>1?String(D).padStart(2,"0"):D}}yk.exports=Pk});var ck=W((icD,xk)=>{var bED=Z1();class bk extends bED{constructor(D={}){super(D)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(D){this.date.setFullYear(D.substr(-4))}toString(){let D=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?D.substr(-2):D}}xk.exports=bk});var rk=W((pcD,gk)=>{gk.exports={DatePart:Z1(),Meridiem:Wk(),Day:zk(),Hours:Sk(),Milliseconds:Lk(),Minutes:Nk(),Month:jk(),Seconds:kk(),Year:ck()}});var ak=W((acD,pk)=>{function _k(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function sk(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){_k(C,w,$,f,B,"next",h)}function B(h){_k(C,w,$,f,B,"throw",h)}f(void 0)})}}var yU=qD(),xED=n1(),kU=N2(),uk=kU.style,dk=kU.clear,cED=kU.figures,lk=jD(),gED=lk.erase,vk=lk.cursor,i1=rk(),mk=i1.DatePart,rED=i1.Meridiem,_ED=i1.Day,sED=i1.Hours,uED=i1.Milliseconds,dED=i1.Minutes,vED=i1.Month,mED=i1.Seconds,nED=i1.Year,lED=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,nk={1:({token:D})=>D.replace(/\\(.)/g,"$1"),2:(D)=>new _ED(D),3:(D)=>new vED(D),4:(D)=>new nED(D),5:(D)=>new rED(D),6:(D)=>new sED(D),7:(D)=>new dED(D),8:(D)=>new mED(D),9:(D)=>new uED(D)},iED={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class ik extends xED{constructor(D={}){super(D);this.msg=D.message,this.cursor=0,this.typed="",this.locales=Object.assign(iED,D.locales),this._date=D.initial||new Date,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.mask=D.mask||"YYYY-MM-DD HH:mm:ss",this.clear=dk("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(D){if(D)this._date.setTime(D.getTime())}set mask(D){let F;this.parts=[];while(F=lED.exec(D)){let w=F.shift(),$=F.findIndex((C)=>C!=null);this.parts.push($ in nk?nk[$]({token:F[$]||w,date:this.date,parts:this.parts,locales:this.locales}):F[$]||w)}let E=this.parts.reduce((w,$)=>{if(typeof $==="string"&&typeof w[w.length-1]==="string")w[w.length-1]+=$;else w.push($);return w},[]);this.parts.splice(0),this.parts.push(...E),this.reset()}moveCursor(D){this.typed="",this.cursor=D,this.fire()}reset(){this.moveCursor(this.parts.findIndex((D)=>D instanceof mk)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var D=this;return sk(function*(){let F=yield D.validator(D.value);if(typeof F==="string")D.errorMsg=F,F=!1;D.error=!F})()}submit(){var D=this;return sk(function*(){if(yield D.validate(),D.error){D.color="red",D.fire(),D.render();return}D.done=!0,D.aborted=!1,D.fire(),D.render(),D.out.write("\n"),D.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let D=this.parts[this.cursor].prev();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}right(){let D=this.parts[this.cursor].next();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}next(){let D=this.parts[this.cursor].next();this.moveCursor(D?this.parts.indexOf(D):this.parts.findIndex((F)=>F instanceof mk)),this.render()}_(D){if(/\d/.test(D))this.typed+=D,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(vk.hide);else this.out.write(dk(this.outputText,this.out.columns));if(super.render(),this.outputText=[uk.symbol(this.done,this.aborted),yU.bold(this.msg),uk.delimiter(!1),this.parts.reduce((D,F,E)=>D.concat(E===this.cursor&&!this.done?yU.cyan().underline(F.toString()):F),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":cED.pointerSmall} ${yU.red().italic(F)}`,"");this.out.write(gED.line+vk.to(0)+this.outputText)}}pk.exports=ik});var $b=W((ocD,wb)=>{function ok(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function tk(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){ok(C,w,$,f,B,"next",h)}function B(h){ok(C,w,$,f,B,"throw",h)}f(void 0)})}}var q7=qD(),pED=n1(),Fb=jD(),O7=Fb.cursor,aED=Fb.erase,j7=N2(),bU=j7.style,oED=j7.figures,ek=j7.clear,tED=j7.lines,eED=/[0-9]/,xU=(D)=>D!==void 0,Db=(D,F)=>{let E=Math.pow(10,F);return Math.round(D*E)/E};class Eb extends pED{constructor(D={}){super(D);this.transform=bU.render(D.style),this.msg=D.message,this.initial=xU(D.initial)?D.initial:"",this.float=!!D.float,this.round=D.round||2,this.inc=D.increment||1,this.min=xU(D.min)?D.min:-1/0,this.max=xU(D.max)?D.max:1/0,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(D){if(!D&&D!==0)this.placeholder=!0,this.rendered=q7.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${Db(D,this.round)}`),this._value=Db(D,this.round);this.fire()}get value(){return this._value}parse(D){return this.float?parseFloat(D):parseInt(D)}valid(D){return D==="-"||D==="."&&this.float||eED.test(D)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let D=this.value;this.value=D!==""?D:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var D=this;return tk(function*(){let F=yield D.validator(D.value);if(typeof F==="string")D.errorMsg=F,F=!1;D.error=!F})()}submit(){var D=this;return tk(function*(){if(yield D.validate(),D.error){D.color="red",D.fire(),D.render();return}let F=D.value;D.value=F!==""?F:D.initial,D.done=!0,D.aborted=!1,D.error=!1,D.fire(),D.render(),D.out.write("\n"),D.close()})()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let D=this.value.toString();if(D.length===0)return this.bell();if(this.value=this.parse(D=D.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(D,F){if(!this.valid(D))return this.bell();const E=Date.now();if(E-this.lastHit>1000)this.typed="";if(this.typed+=D,this.lastHit=E,this.color="cyan",D===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(O7.down(tED(this.outputError,this.out.columns)-1)+ek(this.outputError,this.out.columns));this.out.write(ek(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[bU.symbol(this.done,this.aborted),q7.bold(this.msg),bU.delimiter(this.done),!this.done||!this.done&&!this.placeholder?q7[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":oED.pointerSmall} ${q7.red().italic(F)}`,"");this.out.write(aED.line+O7.to(0)+this.outputText+O7.save+this.outputError+O7.restore)}}wb.exports=Eb});var cU=W((tcD,hb)=>{var W1=qD(),DwD=jD(),FwD=DwD.cursor,EwD=n1(),zE=N2(),fb=zE.clear,r8=zE.figures,Cb=zE.style,wwD=zE.wrap,$wD=zE.entriesToDisplay;class Bb extends EwD{constructor(D={}){super(D);if(this.msg=D.message,this.cursor=D.cursor||0,this.scrollIndex=D.cursor||0,this.hint=D.hint||"",this.warn=D.warn||"- This option is disabled -",this.minSelected=D.min,this.showMinError=!1,this.maxChoices=D.max,this.instructions=D.instructions,this.optionsPerPage=D.optionsPerPage||10,this.value=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),description:F&&F.description,value:F&&(F.value===void 0?E:F.value),selected:F&&F.selected,disabled:F&&F.disabled}}),this.clear=fb("",this.out.columns),!D.overrideRender)this.render()}reset(){this.value.map((D)=>!D.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((D)=>D.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const D=this.value.filter((F)=>F.selected);if(this.minSelected&&D.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const D=this.value[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const D=!this.value[this.cursor].selected;this.value.filter((F)=>!F.disabled).forEach((F)=>F.selected=D),this.render()}_(D,F){if(D===" ")this.handleSpaceToggle();else if(D==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`\nInstructions:\n ${r8.arrowUp}/${r8.arrowDown}: Highlight option\n ${r8.arrowLeft}/${r8.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(D,F,E,w){const $=(F.selected?W1.green(r8.radioOn):r8.radioOff)+" "+w+" ";let C,f;if(F.disabled)C=D===E?W1.gray().underline(F.title):W1.strikethrough().gray(F.title);else if(C=D===E?W1.cyan().underline(F.title):F.title,D===E&&F.description){if(f=` - ${F.description}`,$.length+C.length+f.length>=this.out.columns||F.description.split(/\r?\n/).length>1)f="\n"+wwD(F.description,{margin:$.length,width:this.out.columns})}return $+C+W1.gray(f||"")}paginateOptions(D){if(D.length===0)return W1.red("No matches for this query.");let F=$wD(this.cursor,D.length,this.optionsPerPage),E=F.startIndex,w=F.endIndex,$,C=[];for(let f=E;f<w;f++){if(f===E&&E>0)$=r8.arrowUp;else if(f===w-1&&w<D.length)$=r8.arrowDown;else $=" ";C.push(this.renderOption(this.cursor,D[f],f,$))}return"\n"+C.join("\n")}renderOptions(D){if(!this.done)return this.paginateOptions(D);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[W1.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)D.push(W1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(FwD.hide);super.render();let D=[Cb.symbol(this.done,this.aborted),W1.bold(this.msg),Cb.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=W1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.value),this.out.write(this.clear+D),this.clear=fb(D,this.out.columns)}}hb.exports=Bb});var Wb=W((ecD,Zb)=>{function Ub(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function fwD(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){Ub(C,w,$,f,B,"next",h)}function B(h){Ub(C,w,$,f,B,"throw",h)}f(void 0)})}}var TE=qD(),CwD=n1(),Gb=jD(),BwD=Gb.erase,Ab=Gb.cursor,KE=N2(),gU=KE.style,Ib=KE.clear,rU=KE.figures,hwD=KE.wrap,UwD=KE.entriesToDisplay,Mb=(D,F)=>D[F]&&(D[F].value||D[F].title||D[F]),AwD=(D,F)=>D[F]&&(D[F].title||D[F].value||D[F]),IwD=(D,F)=>{const E=D.findIndex((w)=>w.value===F||w.title===F);return E>-1?E:void 0};class Yb extends CwD{constructor(D={}){super(D);this.msg=D.message,this.suggest=D.suggest,this.choices=D.choices,this.initial=typeof D.initial==="number"?D.initial:IwD(D.choices,D.initial),this.select=this.initial||D.cursor||0,this.i18n={noMatches:D.noMatches||"no matches found"},this.fallback=D.fallback||this.initial,this.clearFirst=D.clearFirst||!1,this.suggestions=[],this.input="",this.limit=D.limit||10,this.cursor=0,this.transform=gU.render(D.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ib("",this.out.columns),this.complete(this.render),this.render()}set fallback(D){this._fb=Number.isSafeInteger(parseInt(D))?parseInt(D):D}get fallback(){let D;if(typeof this._fb==="number")D=this.choices[this._fb];else if(typeof this._fb==="string")D={title:this._fb};return D||this._fb||{title:this.i18n.noMatches}}moveSelect(D){if(this.select=D,this.suggestions.length>0)this.value=Mb(this.suggestions,D);else this.value=this.fallback.value;this.fire()}complete(D){var F=this;return fwD(function*(){const E=F.completing=F.suggest(F.input,F.choices),w=yield E;if(F.completing!==E)return;F.suggestions=w.map((C,f,B)=>({title:AwD(B,f),value:Mb(B,f),description:C.description})),F.completing=!1;const $=Math.max(w.length-1,0);F.moveSelect(Math.min($,F.select)),D&&D()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){let E=this.input.slice(0,this.cursor),w=this.input.slice(this.cursor);this.input=`${E}${D}${w}`,this.cursor=E.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let D=this.input.slice(0,this.cursor-1),F=this.input.slice(this.cursor);this.input=`${D}${F}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let D=this.input.slice(0,this.cursor),F=this.input.slice(this.cursor+1);this.input=`${D}${F}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(D,F,E,w){let $,C=E?rU.arrowUp:w?rU.arrowDown:" ",f=F?TE.cyan().underline(D.title):D.title;if(C=(F?TE.cyan(rU.pointer)+" ":" ")+C,D.description){if($=` - ${D.description}`,C.length+f.length+$.length>=this.out.columns||D.description.split(/\r?\n/).length>1)$="\n"+hwD(D.description,{margin:3,width:this.out.columns})}return C+" "+f+TE.gray($||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(Ab.hide);else this.out.write(Ib(this.outputText,this.out.columns));super.render();let D=UwD(this.select,this.choices.length,this.limit),F=D.startIndex,E=D.endIndex;if(this.outputText=[gU.symbol(this.done,this.aborted,this.exited),TE.bold(this.msg),gU.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const w=this.suggestions.slice(F,E).map(($,C)=>this.renderOption($,this.select===C+F,C===0&&F>0,C+F===E-1&&E<this.choices.length)).join("\n");this.outputText+="\n"+(w||TE.gray(this.fallback.title))}this.out.write(BwD.line+Ab.to(0)+this.outputText)}}Zb.exports=Yb});var Kb=W((DgD,Tb)=>{var p1=qD(),MwD=jD(),GwD=MwD.cursor,YwD=cU(),_U=N2(),Xb=_U.clear,Jb=_U.style,jF=_U.figures;class zb extends YwD{constructor(D={}){D.overrideRender=!0;super(D);this.inputValue="",this.clear=Xb("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const D=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((E)=>{if(this.inputValue){if(typeof E.title==="string"){if(E.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof E.value==="string"){if(E.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const F=this.filteredOptions.findIndex((E)=>E===D);this.cursor=F<0?0:F,this.render()}handleSpaceToggle(){const D=this.filteredOptions[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}handleInputChange(D){this.inputValue=this.inputValue+D,this.updateFilteredOptions()}_(D,F){if(D===" ")this.handleSpaceToggle();else this.handleInputChange(D)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
73
73
  Instructions:
74
- ${qF.arrowUp}/${qF.arrowDown}: Highlight option
75
- ${qF.arrowLeft}/${qF.arrowRight}/[space]: Toggle selection
74
+ ${jF.arrowUp}/${jF.arrowDown}: Highlight option
75
+ ${jF.arrowLeft}/${jF.arrowRight}/[space]: Toggle selection
76
76
  [a,b,c]/delete: Filter choices
77
77
  enter/return: Complete answer
78
78
  `}return""}renderCurrentInput(){return`
79
- Filtered results for: ${this.inputValue?this.inputValue:p1.gray("Enter something to filter")}\n`}renderOption(D,F,E){let w;if(F.disabled)w=D===E?p1.gray().underline(F.title):p1.strikethrough().gray(F.title);else w=D===E?p1.cyan().underline(F.title):F.title;return(F.selected?p1.green(qF.radioOn):qF.radioOff)+" "+w}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[p1.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)D.push(p1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(OwD.hide);super.render();let D=[xb.symbol(this.done,this.aborted),p1.bold(this.msg),xb.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=p1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+D),this.clear=bb(D,this.out.columns)}}gb.exports=cb});var lb=X((scD,nb)=>{var _b=ND(),PwD=n1(),db=V2(),sb=db.style,ywD=db.clear,vb=OD(),kwD=vb.erase,ub=vb.cursor;class mb extends PwD{constructor(D={}){super(D);this.msg=D.message,this.value=D.initial,this.initialValue=!!D.initial,this.yesMsg=D.yes||"yes",this.yesOption=D.yesOption||"(Y/n)",this.noMsg=D.no||"no",this.noOption=D.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){if(D.toLowerCase()==="y")return this.value=!0,this.submit();if(D.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(ub.hide);else this.out.write(ywD(this.outputText,this.out.columns));super.render(),this.outputText=[sb.symbol(this.done,this.aborted),_b.bold(this.msg),sb.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:_b.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(kwD.line+ub.to(0)+this.outputText)}}nb.exports=mb});var pb=X((ucD,ib)=>{ib.exports={TextPrompt:Jk(),SelectPrompt:Qk(),TogglePrompt:Ok(),DatePrompt:Yb(),NumberPrompt:Sb(),MultiselectPrompt:xU(),AutocompletePrompt:kb(),AutocompleteMultiselectPrompt:rb(),ConfirmPrompt:lb()}});var ob=X((ab)=>{function W1(D,F,E={}){return new Promise((w,$)=>{const C=new bwD[D](F),f=E.onAbort||j7,B=E.onSubmit||j7,h=E.onExit||j7;C.on("state",F.onState||j7),C.on("submit",(U)=>w(B(U))),C.on("exit",(U)=>w(h(U))),C.on("abort",(U)=>$(f(U)))})}var R0=ab,bwD=pb(),j7=(D)=>D;R0.text=(D)=>W1("TextPrompt",D);R0.password=(D)=>{return D.style="password",R0.text(D)};R0.invisible=(D)=>{return D.style="invisible",R0.text(D)};R0.number=(D)=>W1("NumberPrompt",D);R0.date=(D)=>W1("DatePrompt",D);R0.confirm=(D)=>W1("ConfirmPrompt",D);R0.list=(D)=>{const F=D.separator||",";return W1("TextPrompt",D,{onSubmit:(E)=>E.split(F).map((w)=>w.trim())})};R0.toggle=(D)=>W1("TogglePrompt",D);R0.select=(D)=>W1("SelectPrompt",D);R0.multiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return W1("MultiselectPrompt",D,{onAbort:F,onSubmit:F})};R0.autocompleteMultiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return W1("AutocompleteMultiselectPrompt",D,{onAbort:F,onSubmit:F})};var xwD=(D,F)=>Promise.resolve(F.filter((E)=>E.title.slice(0,D.length).toLowerCase()===D.toLowerCase()));R0.autocomplete=(D)=>{return D.suggest=D.suggest||xwD,D.choices=[].concat(D.choices||[]),W1("AutocompletePrompt",D)}});var fx=X((vcD,$x)=>{function tb(D,F){var E=Object.keys(D);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(D);if(F)w=w.filter(function($){return Object.getOwnPropertyDescriptor(D,$).enumerable});E.push.apply(E,w)}return E}function eb(D){for(var F=1;F<arguments.length;F++){var E=arguments[F]!=null?arguments[F]:{};if(F%2)tb(Object(E),!0).forEach(function(w){cwD(D,w,E[w])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(D,Object.getOwnPropertyDescriptors(E));else tb(Object(E)).forEach(function(w){Object.defineProperty(D,w,Object.getOwnPropertyDescriptor(E,w))})}return D}function cwD(D,F,E){if(F in D)Object.defineProperty(D,F,{value:E,enumerable:!0,configurable:!0,writable:!0});else D[F]=E;return D}function gwD(D,F){var E=typeof Symbol!=="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!E){if(Array.isArray(D)||(E=rwD(D))||F&&D&&typeof D.length==="number"){if(E)D=E;var w=0,$=function h(){};return{s:$,n:function h(){if(w>=D.length)return{done:!0};return{done:!1,value:D[w++]}},e:function h(U){throw U},f:$}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var C=!0,f=!1,B;return{s:function h(){E=E.call(D)},n:function h(){var U=E.next();return C=U.done,U},e:function h(U){f=!0,B=U},f:function h(){try{if(!C&&E.return!=null)E.return()}finally{if(f)throw B}}}}function rwD(D,F){if(!D)return;if(typeof D==="string")return Dx(D,F);var E=Object.prototype.toString.call(D).slice(8,-1);if(E==="Object"&&D.constructor)E=D.constructor.name;if(E==="Map"||E==="Set")return Array.from(D);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return Dx(D,F)}function Dx(D,F){if(F==null||F>D.length)F=D.length;for(var E=0,w=new Array(F);E<F;E++)w[E]=D[E];return w}function Fx(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function Ex(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){Fx(C,w,$,f,B,"next",h)}function B(h){Fx(C,w,$,f,B,"throw",h)}f(void 0)})}}function r8(){return sU.apply(this,arguments)}function sU(){return sU=Ex(function*(D=[],{onSubmit:F=wx,onCancel:E=wx}={}){const w={},$=r8._override||{};D=[].concat(D);let C,f,B,h,U,I;const A=function(){var W=Ex(function*(J,K,L=!1){if(!L&&J.validate&&J.validate(K)!==!0)return;return J.format?yield J.format(K,w):K});return function J(K,L){return W.apply(this,arguments)}}();var Y=gwD(D),G;try{for(Y.s();!(G=Y.n()).done;){f=G.value;var Z=f;if(h=Z.name,U=Z.type,typeof U==="function")U=yield U(C,eb({},w),f),f.type=U;if(!U)continue;for(let W in f){if(_wD.includes(W))continue;let J=f[W];f[W]=typeof J==="function"?yield J(C,eb({},w),I):J}if(I=f,typeof f.message!=="string")throw new Error("prompt message is required");var z=f;if(h=z.name,U=z.type,_U[U]===void 0)throw new Error(`prompt type (${U}) is not defined`);if($[f.name]!==void 0){if(C=yield A(f,$[f.name]),C!==void 0){w[h]=C;continue}}try{C=r8._injected?swD(r8._injected,f.initial):yield _U[U](f),w[h]=C=yield A(f,C,!0),B=yield F(f,C,w)}catch(W){B=!(yield E(f,w))}if(B)return w}}catch(W){Y.e(W)}finally{Y.f()}return w}),sU.apply(this,arguments)}function swD(D,F){const E=D.shift();if(E instanceof Error)throw E;return E===void 0?F:E}function uwD(D){r8._injected=(r8._injected||[]).concat(D)}function dwD(D){r8._override=Object.assign({},D)}var _U=ob(),_wD=["suggest","format","onState","validate","onRender","type"],wx=()=>{};$x.exports=Object.assign(r8,{prompt:r8,prompts:_U,inject:uwD,override:dwD})});var Bx=X((mcD,Cx)=>{Cx.exports=(D,F)=>{if(D.meta&&D.name!=="escape")return;if(D.ctrl){if(D.name==="a")return"first";if(D.name==="c")return"abort";if(D.name==="d")return"abort";if(D.name==="e")return"last";if(D.name==="g")return"reset"}if(F){if(D.name==="j")return"down";if(D.name==="k")return"up"}if(D.name==="return")return"submit";if(D.name==="enter")return"submit";if(D.name==="backspace")return"delete";if(D.name==="delete")return"deleteForward";if(D.name==="abort")return"abort";if(D.name==="escape")return"exit";if(D.name==="tab")return"next";if(D.name==="pagedown")return"nextPage";if(D.name==="pageup")return"prevPage";if(D.name==="home")return"home";if(D.name==="end")return"end";if(D.name==="up")return"up";if(D.name==="down")return"down";if(D.name==="right")return"right";if(D.name==="left")return"left";return!1}});var P7=X((ncD,hx)=>{hx.exports=(D)=>{const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),E=new RegExp(F,"g");return typeof D==="string"?D.replace(E,""):D}});var Ix=X((lcD,Ax)=>{var vwD=P7(),{erase:Ux,cursor:mwD}=OD(),nwD=(D)=>[...vwD(D)].length;Ax.exports=function(D,F){if(!F)return Ux.line+mwD.to(0);let E=0;const w=D.split(/\r?\n/);for(let $ of w)E+=1+Math.floor(Math.max(nwD($)-1,0)/F);return Ux.lines(E)}});var uU=X((icD,Gx)=>{var zE={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},lwD={arrowUp:zE.arrowUp,arrowDown:zE.arrowDown,arrowLeft:zE.arrowLeft,arrowRight:zE.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},iwD=process.platform==="win32"?lwD:zE;Gx.exports=iwD});var Yx=X((pcD,Mx)=>{var OF=ND(),X6=uU(),dU=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),pwD=(D)=>dU[D]||dU.default,TE=Object.freeze({aborted:OF.red(X6.cross),done:OF.green(X6.tick),exited:OF.yellow(X6.cross),default:OF.cyan("?")}),awD=(D,F,E)=>F?TE.aborted:E?TE.exited:D?TE.done:TE.default,owD=(D)=>OF.gray(D?X6.ellipsis:X6.pointerSmall),twD=(D,F)=>OF.gray(D?F?X6.pointerSmall:"+":X6.line);Mx.exports={styles:dU,render:pwD,symbols:TE,symbol:awD,delimiter:owD,item:twD}});var Xx=X((acD,Zx)=>{var ewD=P7();Zx.exports=function(D,F){let E=String(ewD(D)||"").split(/\r?\n/);if(!F)return E.length;return E.map((w)=>Math.ceil(w.length/F)).reduce((w,$)=>w+$)}});var Jx=X((ocD,Wx)=>{Wx.exports=(D,F={})=>{const E=Number.isSafeInteger(parseInt(F.margin))?new Array(parseInt(F.margin)).fill(" ").join(""):F.margin||"",w=F.width;return(D||"").split(/\r?\n/g).map(($)=>$.split(/\s+/g).reduce((C,f)=>{if(f.length+E.length>=w||C[C.length-1].length+f.length+1<w)C[C.length-1]+=` ${f}`;else C.push(`${E}${f}`);return C},[E]).join("\n")).join("\n")}});var Tx=X((tcD,zx)=>{zx.exports=(D,F,E)=>{E=E||F;let w=Math.min(F-E,D-Math.floor(E/2));if(w<0)w=0;let $=Math.min(w+E,F);return{startIndex:w,endIndex:$}}});var N2=X((ecD,Kx)=>{Kx.exports={action:Bx(),clear:Ix(),style:Yx(),strip:P7(),figures:uU(),lines:Xx(),wrap:Jx(),entriesToDisplay:Tx()}});var a1=X((DgD,Hx)=>{var Sx=import.meta.require("readline"),{action:D$D}=N2(),F$D=import.meta.require("events"),{beep:E$D,cursor:w$D}=OD(),$$D=ND();class Qx extends F$D{constructor(D={}){super();this.firstRender=!0,this.in=D.stdin||process.stdin,this.out=D.stdout||process.stdout,this.onRender=(D.onRender||(()=>{return})).bind(this);const F=Sx.createInterface({input:this.in,escapeCodeTimeout:50});if(Sx.emitKeypressEvents(this.in,F),this.in.isTTY)this.in.setRawMode(!0);const E=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,w=($,C)=>{let f=D$D(C,E);if(f===!1)this._&&this._($,C);else if(typeof this[f]==="function")this[f](C);else this.bell()};this.close=()=>{if(this.out.write(w$D.show),this.in.removeListener("keypress",w),this.in.isTTY)this.in.setRawMode(!1);F.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",w)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(E$D)}render(){if(this.onRender($$D),this.firstRender)this.firstRender=!1}}Hx.exports=Qx});var Vx=X((FgD,Rx)=>{var y7=ND(),f$D=a1(),{erase:C$D,cursor:KE}=OD(),{style:vU,clear:mU,lines:B$D,figures:h$D}=N2();class Lx extends f$D{constructor(D={}){super(D);this.transform=vU.render(D.style),this.scale=this.transform.scale,this.msg=D.message,this.initial=D.initial||"",this.validator=D.validate||(()=>!0),this.value="",this.errorMsg=D.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=mU("",this.out.columns),this.render()}set value(D){if(!D&&this.initial)this.placeholder=!0,this.rendered=y7.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(D);this._value=D,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let D=await this.validator(this.value);if(typeof D==="string")this.errorMsg=D,D=!1;this.error=!D}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(D){if(this.placeholder)return;this.cursor=this.cursor+D,this.cursorOffset+=D}_(D,F){let E=this.value.slice(0,this.cursor),w=this.value.slice(this.cursor);this.value=`${E}${D}${w}`,this.red=!1,this.cursor=this.placeholder?0:E.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let D=this.value.slice(0,this.cursor-1),F=this.value.slice(this.cursor);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let D=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor+1);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(KE.down(B$D(this.outputError,this.out.columns)-1)+mU(this.outputError,this.out.columns));this.out.write(mU(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[vU.symbol(this.done,this.aborted),y7.bold(this.msg),vU.delimiter(this.done),this.red?y7.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":h$D.pointerSmall} ${y7.red().italic(F)}`,"");this.out.write(C$D.line+KE.to(0)+this.outputText+KE.save+this.outputError+KE.restore+KE.move(this.cursorOffset,0))}}Rx.exports=Lx});var Px=X((EgD,jx)=>{var o1=ND(),U$D=a1(),{style:Nx,clear:qx,figures:k7,wrap:A$D,entriesToDisplay:I$D}=N2(),{cursor:G$D}=OD();class Ox extends U$D{constructor(D={}){super(D);this.msg=D.message,this.hint=D.hint||"- Use arrow-keys. Return to submit.",this.warn=D.warn||"- This option is disabled",this.cursor=D.initial||0,this.choices=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),value:F&&(F.value===void 0?E:F.value),description:F&&F.description,selected:F&&F.selected,disabled:F&&F.disabled}}),this.optionsPerPage=D.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=qx("",this.out.columns),this.render()}moveCursor(D){this.cursor=D,this.value=this.choices[D].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(D,F){if(D===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(G$D.hide);else this.out.write(qx(this.outputText,this.out.columns));super.render();let{startIndex:D,endIndex:F}=I$D(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Nx.symbol(this.done,this.aborted),o1.bold(this.msg),Nx.delimiter(!1),this.done?this.selection.title:this.selection.disabled?o1.yellow(this.warn):o1.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let E=D;E<F;E++){let w,$,C="",f=this.choices[E];if(E===D&&D>0)$=k7.arrowUp;else if(E===F-1&&F<this.choices.length)$=k7.arrowDown;else $=" ";if(f.disabled)w=this.cursor===E?o1.gray().underline(f.title):o1.strikethrough().gray(f.title),$=(this.cursor===E?o1.bold().gray(k7.pointer)+" ":" ")+$;else if(w=this.cursor===E?o1.cyan().underline(f.title):f.title,$=(this.cursor===E?o1.cyan(k7.pointer)+" ":" ")+$,f.description&&this.cursor===E){if(C=` - ${f.description}`,$.length+w.length+C.length>=this.out.columns||f.description.split(/\r?\n/).length>1)C="\n"+A$D(f.description,{margin:3,width:this.out.columns})}this.outputText+=`${$} ${w}${o1.gray(C)}\n`}}this.out.write(this.outputText)}}jx.exports=Ox});var cx=X((wgD,xx)=>{var b7=ND(),M$D=a1(),{style:yx,clear:Y$D}=N2(),{cursor:kx,erase:Z$D}=OD();class bx extends M$D{constructor(D={}){super(D);this.msg=D.message,this.value=!!D.initial,this.active=D.active||"on",this.inactive=D.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(D,F){if(D===" ")this.value=!this.value;else if(D==="1")this.value=!0;else if(D==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(kx.hide);else this.out.write(Y$D(this.outputText,this.out.columns));super.render(),this.outputText=[yx.symbol(this.done,this.aborted),b7.bold(this.msg),yx.delimiter(this.done),this.value?this.inactive:b7.cyan().underline(this.inactive),b7.gray("/"),this.value?b7.cyan().underline(this.active):this.active].join(" "),this.out.write(Z$D.line+kx.to(0)+this.outputText)}}xx.exports=bx});var J1=X(($gD,gx)=>{class x7{constructor({token:D,date:F,parts:E,locales:w}){this.token=D,this.date=F||new Date,this.parts=E||[this],this.locales=w||{}}up(){}down(){}next(){const D=this.parts.indexOf(this);return this.parts.find((F,E)=>E>D&&F instanceof x7)}setTo(D){}prev(){let D=[].concat(this.parts).reverse();const F=D.indexOf(this);return D.find((E,w)=>w>F&&E instanceof x7)}toString(){return String(this.date)}}gx.exports=x7});var sx=X((fgD,_x)=>{var X$D=J1();class rx extends X$D{constructor(D={}){super(D)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let D=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?D.toUpperCase():D}}_x.exports=rx});var vx=X((CgD,dx)=>{var W$D=J1(),J$D=(D)=>{return D=D%10,D===1?"st":D===2?"nd":D===3?"rd":"th"};class ux extends W$D{constructor(D={}){super(D)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(D){this.date.setDate(parseInt(D.substr(-2)))}toString(){let D=this.date.getDate(),F=this.date.getDay();return this.token==="DD"?String(D).padStart(2,"0"):this.token==="Do"?D+J$D(D):this.token==="d"?F+1:this.token==="ddd"?this.locales.weekdaysShort[F]:this.token==="dddd"?this.locales.weekdays[F]:D}}dx.exports=ux});var lx=X((BgD,nx)=>{var z$D=J1();class mx extends z$D{constructor(D={}){super(D)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(D){this.date.setHours(parseInt(D.substr(-2)))}toString(){let D=this.date.getHours();if(/h/.test(this.token))D=D%12||12;return this.token.length>1?String(D).padStart(2,"0"):D}}nx.exports=mx});var ax=X((hgD,px)=>{var T$D=J1();class ix extends T$D{constructor(D={}){super(D)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(D){this.date.setMilliseconds(parseInt(D.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}px.exports=ix});var ex=X((UgD,tx)=>{var K$D=J1();class ox extends K$D{constructor(D={}){super(D)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(D){this.date.setMinutes(parseInt(D.substr(-2)))}toString(){let D=this.date.getMinutes();return this.token.length>1?String(D).padStart(2,"0"):D}}tx.exports=ox});var Ec=X((AgD,Fc)=>{var S$D=J1();class Dc extends S$D{constructor(D={}){super(D)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(D){D=parseInt(D.substr(-2))-1,this.date.setMonth(D<0?0:D)}toString(){let D=this.date.getMonth(),F=this.token.length;return F===2?String(D+1).padStart(2,"0"):F===3?this.locales.monthsShort[D]:F===4?this.locales.months[D]:String(D+1)}}Fc.exports=Dc});var fc=X((IgD,$c)=>{var Q$D=J1();class wc extends Q$D{constructor(D={}){super(D)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(D){this.date.setSeconds(parseInt(D.substr(-2)))}toString(){let D=this.date.getSeconds();return this.token.length>1?String(D).padStart(2,"0"):D}}$c.exports=wc});var hc=X((GgD,Bc)=>{var H$D=J1();class Cc extends H$D{constructor(D={}){super(D)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(D){this.date.setFullYear(D.substr(-4))}toString(){let D=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?D.substr(-2):D}}Bc.exports=Cc});var Ac=X((MgD,Uc)=>{Uc.exports={DatePart:J1(),Meridiem:sx(),Day:vx(),Hours:lx(),Milliseconds:ax(),Minutes:ex(),Month:Ec(),Seconds:fc(),Year:hc()}});var Jc=X((YgD,Wc)=>{var nU=ND(),L$D=a1(),{style:Ic,clear:Gc,figures:R$D}=N2(),{erase:V$D,cursor:Mc}=OD(),{DatePart:Yc,Meridiem:N$D,Day:q$D,Hours:O$D,Milliseconds:j$D,Minutes:P$D,Month:y$D,Seconds:k$D,Year:b$D}=Ac(),x$D=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Zc={1:({token:D})=>D.replace(/\\(.)/g,"$1"),2:(D)=>new q$D(D),3:(D)=>new y$D(D),4:(D)=>new b$D(D),5:(D)=>new N$D(D),6:(D)=>new O$D(D),7:(D)=>new P$D(D),8:(D)=>new k$D(D),9:(D)=>new j$D(D)},c$D={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class Xc extends L$D{constructor(D={}){super(D);this.msg=D.message,this.cursor=0,this.typed="",this.locales=Object.assign(c$D,D.locales),this._date=D.initial||new Date,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.mask=D.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Gc("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(D){if(D)this._date.setTime(D.getTime())}set mask(D){let F;this.parts=[];while(F=x$D.exec(D)){let w=F.shift(),$=F.findIndex((C)=>C!=null);this.parts.push($ in Zc?Zc[$]({token:F[$]||w,date:this.date,parts:this.parts,locales:this.locales}):F[$]||w)}let E=this.parts.reduce((w,$)=>{if(typeof $==="string"&&typeof w[w.length-1]==="string")w[w.length-1]+=$;else w.push($);return w},[]);this.parts.splice(0),this.parts.push(...E),this.reset()}moveCursor(D){this.typed="",this.cursor=D,this.fire()}reset(){this.moveCursor(this.parts.findIndex((D)=>D instanceof Yc)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let D=await this.validator(this.value);if(typeof D==="string")this.errorMsg=D,D=!1;this.error=!D}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let D=this.parts[this.cursor].prev();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}right(){let D=this.parts[this.cursor].next();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}next(){let D=this.parts[this.cursor].next();this.moveCursor(D?this.parts.indexOf(D):this.parts.findIndex((F)=>F instanceof Yc)),this.render()}_(D){if(/\d/.test(D))this.typed+=D,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(Mc.hide);else this.out.write(Gc(this.outputText,this.out.columns));if(super.render(),this.outputText=[Ic.symbol(this.done,this.aborted),nU.bold(this.msg),Ic.delimiter(!1),this.parts.reduce((D,F,E)=>D.concat(E===this.cursor&&!this.done?nU.cyan().underline(F.toString()):F),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":R$D.pointerSmall} ${nU.red().italic(F)}`,"");this.out.write(V$D.line+Mc.to(0)+this.outputText)}}Wc.exports=Xc});var Qc=X((ZgD,Sc)=>{var c7=ND(),g$D=a1(),{cursor:g7,erase:r$D}=OD(),{style:lU,figures:_$D,clear:zc,lines:s$D}=N2(),u$D=/[0-9]/,iU=(D)=>D!==void 0,Tc=(D,F)=>{let E=Math.pow(10,F);return Math.round(D*E)/E};class Kc extends g$D{constructor(D={}){super(D);this.transform=lU.render(D.style),this.msg=D.message,this.initial=iU(D.initial)?D.initial:"",this.float=!!D.float,this.round=D.round||2,this.inc=D.increment||1,this.min=iU(D.min)?D.min:-1/0,this.max=iU(D.max)?D.max:1/0,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(D){if(!D&&D!==0)this.placeholder=!0,this.rendered=c7.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${Tc(D,this.round)}`),this._value=Tc(D,this.round);this.fire()}get value(){return this._value}parse(D){return this.float?parseFloat(D):parseInt(D)}valid(D){return D==="-"||D==="."&&this.float||u$D.test(D)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let D=this.value;this.value=D!==""?D:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let D=await this.validator(this.value);if(typeof D==="string")this.errorMsg=D,D=!1;this.error=!D}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let D=this.value;this.value=D!==""?D:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let D=this.value.toString();if(D.length===0)return this.bell();if(this.value=this.parse(D=D.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(D,F){if(!this.valid(D))return this.bell();const E=Date.now();if(E-this.lastHit>1000)this.typed="";if(this.typed+=D,this.lastHit=E,this.color="cyan",D===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(g7.down(s$D(this.outputError,this.out.columns)-1)+zc(this.outputError,this.out.columns));this.out.write(zc(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[lU.symbol(this.done,this.aborted),c7.bold(this.msg),lU.delimiter(this.done),!this.done||!this.done&&!this.placeholder?c7[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":_$D.pointerSmall} ${c7.red().italic(F)}`,"");this.out.write(r$D.line+g7.to(0)+this.outputText+g7.save+this.outputError+g7.restore)}}Sc.exports=Kc});var pU=X((XgD,Vc)=>{var z1=ND(),{cursor:d$D}=OD(),v$D=a1(),{clear:Hc,figures:_8,style:Lc,wrap:m$D,entriesToDisplay:n$D}=N2();class Rc extends v$D{constructor(D={}){super(D);if(this.msg=D.message,this.cursor=D.cursor||0,this.scrollIndex=D.cursor||0,this.hint=D.hint||"",this.warn=D.warn||"- This option is disabled -",this.minSelected=D.min,this.showMinError=!1,this.maxChoices=D.max,this.instructions=D.instructions,this.optionsPerPage=D.optionsPerPage||10,this.value=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),description:F&&F.description,value:F&&(F.value===void 0?E:F.value),selected:F&&F.selected,disabled:F&&F.disabled}}),this.clear=Hc("",this.out.columns),!D.overrideRender)this.render()}reset(){this.value.map((D)=>!D.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((D)=>D.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const D=this.value.filter((F)=>F.selected);if(this.minSelected&&D.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const D=this.value[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const D=!this.value[this.cursor].selected;this.value.filter((F)=>!F.disabled).forEach((F)=>F.selected=D),this.render()}_(D,F){if(D===" ")this.handleSpaceToggle();else if(D==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`\nInstructions:\n ${_8.arrowUp}/${_8.arrowDown}: Highlight option\n ${_8.arrowLeft}/${_8.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(D,F,E,w){const $=(F.selected?z1.green(_8.radioOn):_8.radioOff)+" "+w+" ";let C,f;if(F.disabled)C=D===E?z1.gray().underline(F.title):z1.strikethrough().gray(F.title);else if(C=D===E?z1.cyan().underline(F.title):F.title,D===E&&F.description){if(f=` - ${F.description}`,$.length+C.length+f.length>=this.out.columns||F.description.split(/\r?\n/).length>1)f="\n"+m$D(F.description,{margin:$.length,width:this.out.columns})}return $+C+z1.gray(f||"")}paginateOptions(D){if(D.length===0)return z1.red("No matches for this query.");let{startIndex:F,endIndex:E}=n$D(this.cursor,D.length,this.optionsPerPage),w,$=[];for(let C=F;C<E;C++){if(C===F&&F>0)w=_8.arrowUp;else if(C===E-1&&E<D.length)w=_8.arrowDown;else w=" ";$.push(this.renderOption(this.cursor,D[C],C,w))}return"\n"+$.join("\n")}renderOptions(D){if(!this.done)return this.paginateOptions(D);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[z1.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)D.push(z1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(d$D.hide);super.render();let D=[Lc.symbol(this.done,this.aborted),z1.bold(this.msg),Lc.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=z1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.value),this.out.write(this.clear+D),this.clear=Hc(D,this.out.columns)}}Vc.exports=Rc});var yc=X((WgD,Pc)=>{var SE=ND(),l$D=a1(),{erase:i$D,cursor:Nc}=OD(),{style:aU,clear:qc,figures:oU,wrap:p$D,entriesToDisplay:a$D}=N2(),Oc=(D,F)=>D[F]&&(D[F].value||D[F].title||D[F]),o$D=(D,F)=>D[F]&&(D[F].title||D[F].value||D[F]),t$D=(D,F)=>{const E=D.findIndex((w)=>w.value===F||w.title===F);return E>-1?E:void 0};class jc extends l$D{constructor(D={}){super(D);this.msg=D.message,this.suggest=D.suggest,this.choices=D.choices,this.initial=typeof D.initial==="number"?D.initial:t$D(D.choices,D.initial),this.select=this.initial||D.cursor||0,this.i18n={noMatches:D.noMatches||"no matches found"},this.fallback=D.fallback||this.initial,this.clearFirst=D.clearFirst||!1,this.suggestions=[],this.input="",this.limit=D.limit||10,this.cursor=0,this.transform=aU.render(D.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=qc("",this.out.columns),this.complete(this.render),this.render()}set fallback(D){this._fb=Number.isSafeInteger(parseInt(D))?parseInt(D):D}get fallback(){let D;if(typeof this._fb==="number")D=this.choices[this._fb];else if(typeof this._fb==="string")D={title:this._fb};return D||this._fb||{title:this.i18n.noMatches}}moveSelect(D){if(this.select=D,this.suggestions.length>0)this.value=Oc(this.suggestions,D);else this.value=this.fallback.value;this.fire()}async complete(D){const F=this.completing=this.suggest(this.input,this.choices),E=await F;if(this.completing!==F)return;this.suggestions=E.map(($,C,f)=>({title:o$D(f,C),value:Oc(f,C),description:$.description})),this.completing=!1;const w=Math.max(E.length-1,0);this.moveSelect(Math.min(w,this.select)),D&&D()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){let E=this.input.slice(0,this.cursor),w=this.input.slice(this.cursor);this.input=`${E}${D}${w}`,this.cursor=E.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let D=this.input.slice(0,this.cursor-1),F=this.input.slice(this.cursor);this.input=`${D}${F}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let D=this.input.slice(0,this.cursor),F=this.input.slice(this.cursor+1);this.input=`${D}${F}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(D,F,E,w){let $,C=E?oU.arrowUp:w?oU.arrowDown:" ",f=F?SE.cyan().underline(D.title):D.title;if(C=(F?SE.cyan(oU.pointer)+" ":" ")+C,D.description){if($=` - ${D.description}`,C.length+f.length+$.length>=this.out.columns||D.description.split(/\r?\n/).length>1)$="\n"+p$D(D.description,{margin:3,width:this.out.columns})}return C+" "+f+SE.gray($||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(Nc.hide);else this.out.write(qc(this.outputText,this.out.columns));super.render();let{startIndex:D,endIndex:F}=a$D(this.select,this.choices.length,this.limit);if(this.outputText=[aU.symbol(this.done,this.aborted,this.exited),SE.bold(this.msg),aU.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const E=this.suggestions.slice(D,F).map((w,$)=>this.renderOption(w,this.select===$+D,$===0&&D>0,$+D===F-1&&F<this.choices.length)).join("\n");this.outputText+="\n"+(E||SE.gray(this.fallback.title))}this.out.write(i$D.line+Nc.to(0)+this.outputText)}}Pc.exports=jc});var gc=X((JgD,cc)=>{var t1=ND(),{cursor:e$D}=OD(),D4D=pU(),{clear:kc,style:bc,figures:jF}=N2();class xc extends D4D{constructor(D={}){D.overrideRender=!0;super(D);this.inputValue="",this.clear=kc("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const D=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((E)=>{if(this.inputValue){if(typeof E.title==="string"){if(E.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof E.value==="string"){if(E.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const F=this.filteredOptions.findIndex((E)=>E===D);this.cursor=F<0?0:F,this.render()}handleSpaceToggle(){const D=this.filteredOptions[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}handleInputChange(D){this.inputValue=this.inputValue+D,this.updateFilteredOptions()}_(D,F){if(D===" ")this.handleSpaceToggle();else this.handleInputChange(D)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
79
+ Filtered results for: ${this.inputValue?this.inputValue:p1.gray("Enter something to filter")}\n`}renderOption(D,F,E){let w;if(F.disabled)w=D===E?p1.gray().underline(F.title):p1.strikethrough().gray(F.title);else w=D===E?p1.cyan().underline(F.title):F.title;return(F.selected?p1.green(jF.radioOn):jF.radioOff)+" "+w}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[p1.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)D.push(p1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(GwD.hide);super.render();let D=[Jb.symbol(this.done,this.aborted),p1.bold(this.msg),Jb.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=p1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+D),this.clear=Xb(D,this.out.columns)}}Tb.exports=zb});var qb=W((FgD,Nb)=>{var Sb=qD(),ZwD=n1(),Lb=N2(),Qb=Lb.style,WwD=Lb.clear,Rb=jD(),XwD=Rb.erase,Hb=Rb.cursor;class Vb extends ZwD{constructor(D={}){super(D);this.msg=D.message,this.value=D.initial,this.initialValue=!!D.initial,this.yesMsg=D.yes||"yes",this.yesOption=D.yesOption||"(Y/n)",this.noMsg=D.no||"no",this.noOption=D.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){if(D.toLowerCase()==="y")return this.value=!0,this.submit();if(D.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(Hb.hide);else this.out.write(WwD(this.outputText,this.out.columns));super.render(),this.outputText=[Qb.symbol(this.done,this.aborted),Sb.bold(this.msg),Qb.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Sb.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(XwD.line+Hb.to(0)+this.outputText)}}Nb.exports=Vb});var jb=W((EgD,Ob)=>{Ob.exports={TextPrompt:Dk(),SelectPrompt:fk(),TogglePrompt:Mk(),DatePrompt:ak(),NumberPrompt:$b(),MultiselectPrompt:cU(),AutocompletePrompt:Wb(),AutocompleteMultiselectPrompt:Kb(),ConfirmPrompt:qb()}});var yb=W((Pb)=>{function X1(D,F,E={}){return new Promise((w,$)=>{const C=new JwD[D](F),f=E.onAbort||P7,B=E.onSubmit||P7,h=E.onExit||P7;C.on("state",F.onState||P7),C.on("submit",(U)=>w(B(U))),C.on("exit",(U)=>w(h(U))),C.on("abort",(U)=>$(f(U)))})}var V0=Pb,JwD=jb(),P7=(D)=>D;V0.text=(D)=>X1("TextPrompt",D);V0.password=(D)=>{return D.style="password",V0.text(D)};V0.invisible=(D)=>{return D.style="invisible",V0.text(D)};V0.number=(D)=>X1("NumberPrompt",D);V0.date=(D)=>X1("DatePrompt",D);V0.confirm=(D)=>X1("ConfirmPrompt",D);V0.list=(D)=>{const F=D.separator||",";return X1("TextPrompt",D,{onSubmit:(E)=>E.split(F).map((w)=>w.trim())})};V0.toggle=(D)=>X1("TogglePrompt",D);V0.select=(D)=>X1("SelectPrompt",D);V0.multiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return X1("MultiselectPrompt",D,{onAbort:F,onSubmit:F})};V0.autocompleteMultiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return X1("AutocompleteMultiselectPrompt",D,{onAbort:F,onSubmit:F})};var zwD=(D,F)=>Promise.resolve(F.filter((E)=>E.title.slice(0,D.length).toLowerCase()===D.toLowerCase()));V0.autocomplete=(D)=>{return D.suggest=D.suggest||zwD,D.choices=[].concat(D.choices||[]),X1("AutocompletePrompt",D)}});var sb=W(($gD,_b)=>{function kb(D,F){var E=Object.keys(D);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(D);if(F)w=w.filter(function($){return Object.getOwnPropertyDescriptor(D,$).enumerable});E.push.apply(E,w)}return E}function bb(D){for(var F=1;F<arguments.length;F++){var E=arguments[F]!=null?arguments[F]:{};if(F%2)kb(Object(E),!0).forEach(function(w){TwD(D,w,E[w])});else if(Object.getOwnPropertyDescriptors)Object.defineProperties(D,Object.getOwnPropertyDescriptors(E));else kb(Object(E)).forEach(function(w){Object.defineProperty(D,w,Object.getOwnPropertyDescriptor(E,w))})}return D}function TwD(D,F,E){if(F in D)Object.defineProperty(D,F,{value:E,enumerable:!0,configurable:!0,writable:!0});else D[F]=E;return D}function KwD(D,F){var E=typeof Symbol!=="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!E){if(Array.isArray(D)||(E=SwD(D))||F&&D&&typeof D.length==="number"){if(E)D=E;var w=0,$=function h(){};return{s:$,n:function h(){if(w>=D.length)return{done:!0};return{done:!1,value:D[w++]}},e:function h(U){throw U},f:$}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var C=!0,f=!1,B;return{s:function h(){E=E.call(D)},n:function h(){var U=E.next();return C=U.done,U},e:function h(U){f=!0,B=U},f:function h(){try{if(!C&&E.return!=null)E.return()}finally{if(f)throw B}}}}function SwD(D,F){if(!D)return;if(typeof D==="string")return xb(D,F);var E=Object.prototype.toString.call(D).slice(8,-1);if(E==="Object"&&D.constructor)E=D.constructor.name;if(E==="Map"||E==="Set")return Array.from(D);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return xb(D,F)}function xb(D,F){if(F==null||F>D.length)F=D.length;for(var E=0,w=new Array(F);E<F;E++)w[E]=D[E];return w}function cb(D,F,E,w,$,C,f){try{var B=D[C](f),h=B.value}catch(U){E(U);return}if(B.done)F(h);else Promise.resolve(h).then(w,$)}function gb(D){return function(){var F=this,E=arguments;return new Promise(function(w,$){var C=D.apply(F,E);function f(h){cb(C,w,$,f,B,"next",h)}function B(h){cb(C,w,$,f,B,"throw",h)}f(void 0)})}}function _8(){return uU.apply(this,arguments)}function uU(){return uU=gb(function*(D=[],{onSubmit:F=rb,onCancel:E=rb}={}){const w={},$=_8._override||{};D=[].concat(D);let C,f,B,h,U,I;const A=function(){var X=gb(function*(J,K,H=!1){if(!H&&J.validate&&J.validate(K)!==!0)return;return J.format?yield J.format(K,w):K});return function J(K,H){return X.apply(this,arguments)}}();var Y=KwD(D),M;try{for(Y.s();!(M=Y.n()).done;){f=M.value;var Z=f;if(h=Z.name,U=Z.type,typeof U==="function")U=yield U(C,bb({},w),f),f.type=U;if(!U)continue;for(let X in f){if(QwD.includes(X))continue;let J=f[X];f[X]=typeof J==="function"?yield J(C,bb({},w),I):J}if(I=f,typeof f.message!=="string")throw new Error("prompt message is required");var z=f;if(h=z.name,U=z.type,sU[U]===void 0)throw new Error(`prompt type (${U}) is not defined`);if($[f.name]!==void 0){if(C=yield A(f,$[f.name]),C!==void 0){w[h]=C;continue}}try{C=_8._injected?HwD(_8._injected,f.initial):yield sU[U](f),w[h]=C=yield A(f,C,!0),B=yield F(f,C,w)}catch(X){B=!(yield E(f,w))}if(B)return w}}catch(X){Y.e(X)}finally{Y.f()}return w}),uU.apply(this,arguments)}function HwD(D,F){const E=D.shift();if(E instanceof Error)throw E;return E===void 0?F:E}function LwD(D){_8._injected=(_8._injected||[]).concat(D)}function RwD(D){_8._override=Object.assign({},D)}var sU=yb(),QwD=["suggest","format","onState","validate","onRender","type"],rb=()=>{};_b.exports=Object.assign(_8,{prompt:_8,prompts:sU,inject:LwD,override:RwD})});var db=W((fgD,ub)=>{ub.exports=(D,F)=>{if(D.meta&&D.name!=="escape")return;if(D.ctrl){if(D.name==="a")return"first";if(D.name==="c")return"abort";if(D.name==="d")return"abort";if(D.name==="e")return"last";if(D.name==="g")return"reset"}if(F){if(D.name==="j")return"down";if(D.name==="k")return"up"}if(D.name==="return")return"submit";if(D.name==="enter")return"submit";if(D.name==="backspace")return"delete";if(D.name==="delete")return"deleteForward";if(D.name==="abort")return"abort";if(D.name==="escape")return"exit";if(D.name==="tab")return"next";if(D.name==="pagedown")return"nextPage";if(D.name==="pageup")return"prevPage";if(D.name==="home")return"home";if(D.name==="end")return"end";if(D.name==="up")return"up";if(D.name==="down")return"down";if(D.name==="right")return"right";if(D.name==="left")return"left";return!1}});var y7=W((CgD,vb)=>{vb.exports=(D)=>{const F=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),E=new RegExp(F,"g");return typeof D==="string"?D.replace(E,""):D}});var lb=W((BgD,nb)=>{var VwD=y7(),{erase:mb,cursor:NwD}=jD(),qwD=(D)=>[...VwD(D)].length;nb.exports=function(D,F){if(!F)return mb.line+NwD.to(0);let E=0;const w=D.split(/\r?\n/);for(let $ of w)E+=1+Math.floor(Math.max(qwD($)-1,0)/F);return mb.lines(E)}});var dU=W((hgD,ib)=>{var SE={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},OwD={arrowUp:SE.arrowUp,arrowDown:SE.arrowDown,arrowLeft:SE.arrowLeft,arrowRight:SE.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},jwD=process.platform==="win32"?OwD:SE;ib.exports=jwD});var ab=W((UgD,pb)=>{var PF=qD(),W6=dU(),vU=Object.freeze({password:{scale:1,render:(D)=>"*".repeat(D.length)},emoji:{scale:2,render:(D)=>"\uD83D\uDE03".repeat(D.length)},invisible:{scale:0,render:(D)=>""},default:{scale:1,render:(D)=>`${D}`}}),PwD=(D)=>vU[D]||vU.default,QE=Object.freeze({aborted:PF.red(W6.cross),done:PF.green(W6.tick),exited:PF.yellow(W6.cross),default:PF.cyan("?")}),ywD=(D,F,E)=>F?QE.aborted:E?QE.exited:D?QE.done:QE.default,kwD=(D)=>PF.gray(D?W6.ellipsis:W6.pointerSmall),bwD=(D,F)=>PF.gray(D?F?W6.pointerSmall:"+":W6.line);pb.exports={styles:vU,render:PwD,symbols:QE,symbol:ywD,delimiter:kwD,item:bwD}});var tb=W((AgD,ob)=>{var xwD=y7();ob.exports=function(D,F){let E=String(xwD(D)||"").split(/\r?\n/);if(!F)return E.length;return E.map((w)=>Math.ceil(w.length/F)).reduce((w,$)=>w+$)}});var Dx=W((IgD,eb)=>{eb.exports=(D,F={})=>{const E=Number.isSafeInteger(parseInt(F.margin))?new Array(parseInt(F.margin)).fill(" ").join(""):F.margin||"",w=F.width;return(D||"").split(/\r?\n/g).map(($)=>$.split(/\s+/g).reduce((C,f)=>{if(f.length+E.length>=w||C[C.length-1].length+f.length+1<w)C[C.length-1]+=` ${f}`;else C.push(`${E}${f}`);return C},[E]).join("\n")).join("\n")}});var Ex=W((MgD,Fx)=>{Fx.exports=(D,F,E)=>{E=E||F;let w=Math.min(F-E,D-Math.floor(E/2));if(w<0)w=0;let $=Math.min(w+E,F);return{startIndex:w,endIndex:$}}});var q2=W((GgD,wx)=>{wx.exports={action:db(),clear:lb(),style:ab(),strip:y7(),figures:dU(),lines:tb(),wrap:Dx(),entriesToDisplay:Ex()}});var a1=W((YgD,Cx)=>{var $x=import.meta.require("readline"),{action:cwD}=q2(),gwD=import.meta.require("events"),{beep:rwD,cursor:_wD}=jD(),swD=qD();class fx extends gwD{constructor(D={}){super();this.firstRender=!0,this.in=D.stdin||process.stdin,this.out=D.stdout||process.stdout,this.onRender=(D.onRender||(()=>{return})).bind(this);const F=$x.createInterface({input:this.in,escapeCodeTimeout:50});if($x.emitKeypressEvents(this.in,F),this.in.isTTY)this.in.setRawMode(!0);const E=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,w=($,C)=>{let f=cwD(C,E);if(f===!1)this._&&this._($,C);else if(typeof this[f]==="function")this[f](C);else this.bell()};this.close=()=>{if(this.out.write(_wD.show),this.in.removeListener("keypress",w),this.in.isTTY)this.in.setRawMode(!1);F.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",w)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(rwD)}render(){if(this.onRender(swD),this.firstRender)this.firstRender=!1}}Cx.exports=fx});var Ux=W((ZgD,hx)=>{var k7=qD(),uwD=a1(),{erase:dwD,cursor:HE}=jD(),{style:mU,clear:nU,lines:vwD,figures:mwD}=q2();class Bx extends uwD{constructor(D={}){super(D);this.transform=mU.render(D.style),this.scale=this.transform.scale,this.msg=D.message,this.initial=D.initial||"",this.validator=D.validate||(()=>!0),this.value="",this.errorMsg=D.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=nU("",this.out.columns),this.render()}set value(D){if(!D&&this.initial)this.placeholder=!0,this.rendered=k7.gray(this.transform.render(this.initial));else this.placeholder=!1,this.rendered=this.transform.render(D);this._value=D,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let D=await this.validator(this.value);if(typeof D==="string")this.errorMsg=D,D=!1;this.error=!D}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(D){if(this.placeholder)return;this.cursor=this.cursor+D,this.cursorOffset+=D}_(D,F){let E=this.value.slice(0,this.cursor),w=this.value.slice(this.cursor);this.value=`${E}${D}${w}`,this.red=!1,this.cursor=this.placeholder?0:E.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let D=this.value.slice(0,this.cursor-1),F=this.value.slice(this.cursor);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtStart())this.cursorOffset=0;else this.cursorOffset++,this.moveCursor(-1);this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let D=this.value.slice(0,this.cursor),F=this.value.slice(this.cursor+1);if(this.value=`${D}${F}`,this.red=!1,this.isCursorAtEnd())this.cursorOffset=0;else this.cursorOffset++;this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(HE.down(vwD(this.outputError,this.out.columns)-1)+nU(this.outputError,this.out.columns));this.out.write(nU(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[mU.symbol(this.done,this.aborted),k7.bold(this.msg),mU.delimiter(this.done),this.red?k7.red(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":mwD.pointerSmall} ${k7.red().italic(F)}`,"");this.out.write(dwD.line+HE.to(0)+this.outputText+HE.save+this.outputError+HE.restore+HE.move(this.cursorOffset,0))}}hx.exports=Bx});var Yx=W((WgD,Gx)=>{var o1=qD(),nwD=a1(),{style:Ax,clear:Ix,figures:b7,wrap:lwD,entriesToDisplay:iwD}=q2(),{cursor:pwD}=jD();class Mx extends nwD{constructor(D={}){super(D);this.msg=D.message,this.hint=D.hint||"- Use arrow-keys. Return to submit.",this.warn=D.warn||"- This option is disabled",this.cursor=D.initial||0,this.choices=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),value:F&&(F.value===void 0?E:F.value),description:F&&F.description,selected:F&&F.selected,disabled:F&&F.disabled}}),this.optionsPerPage=D.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Ix("",this.out.columns),this.render()}moveCursor(D){this.cursor=D,this.value=this.choices[D].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){if(!this.selection.disabled)this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close();else this.bell()}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){if(this.cursor===0)this.moveCursor(this.choices.length-1);else this.moveCursor(this.cursor-1);this.render()}down(){if(this.cursor===this.choices.length-1)this.moveCursor(0);else this.moveCursor(this.cursor+1);this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(D,F){if(D===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;if(this.firstRender)this.out.write(pwD.hide);else this.out.write(Ix(this.outputText,this.out.columns));super.render();let{startIndex:D,endIndex:F}=iwD(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Ax.symbol(this.done,this.aborted),o1.bold(this.msg),Ax.delimiter(!1),this.done?this.selection.title:this.selection.disabled?o1.yellow(this.warn):o1.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let E=D;E<F;E++){let w,$,C="",f=this.choices[E];if(E===D&&D>0)$=b7.arrowUp;else if(E===F-1&&F<this.choices.length)$=b7.arrowDown;else $=" ";if(f.disabled)w=this.cursor===E?o1.gray().underline(f.title):o1.strikethrough().gray(f.title),$=(this.cursor===E?o1.bold().gray(b7.pointer)+" ":" ")+$;else if(w=this.cursor===E?o1.cyan().underline(f.title):f.title,$=(this.cursor===E?o1.cyan(b7.pointer)+" ":" ")+$,f.description&&this.cursor===E){if(C=` - ${f.description}`,$.length+w.length+C.length>=this.out.columns||f.description.split(/\r?\n/).length>1)C="\n"+lwD(f.description,{margin:3,width:this.out.columns})}this.outputText+=`${$} ${w}${o1.gray(C)}\n`}}this.out.write(this.outputText)}}Gx.exports=Mx});var zx=W((XgD,Jx)=>{var x7=qD(),awD=a1(),{style:Zx,clear:owD}=q2(),{cursor:Wx,erase:twD}=jD();class Xx extends awD{constructor(D={}){super(D);this.msg=D.message,this.value=!!D.initial,this.active=D.active||"on",this.inactive=D.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(D,F){if(D===" ")this.value=!this.value;else if(D==="1")this.value=!0;else if(D==="0")this.value=!1;else return this.bell();this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(Wx.hide);else this.out.write(owD(this.outputText,this.out.columns));super.render(),this.outputText=[Zx.symbol(this.done,this.aborted),x7.bold(this.msg),Zx.delimiter(this.done),this.value?this.inactive:x7.cyan().underline(this.inactive),x7.gray("/"),this.value?x7.cyan().underline(this.active):this.active].join(" "),this.out.write(twD.line+Wx.to(0)+this.outputText)}}Jx.exports=Xx});var J1=W((JgD,Tx)=>{class c7{constructor({token:D,date:F,parts:E,locales:w}){this.token=D,this.date=F||new Date,this.parts=E||[this],this.locales=w||{}}up(){}down(){}next(){const D=this.parts.indexOf(this);return this.parts.find((F,E)=>E>D&&F instanceof c7)}setTo(D){}prev(){let D=[].concat(this.parts).reverse();const F=D.indexOf(this);return D.find((E,w)=>w>F&&E instanceof c7)}toString(){return String(this.date)}}Tx.exports=c7});var Qx=W((zgD,Sx)=>{var ewD=J1();class Kx extends ewD{constructor(D={}){super(D)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let D=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?D.toUpperCase():D}}Sx.exports=Kx});var Rx=W((TgD,Lx)=>{var D$D=J1(),F$D=(D)=>{return D=D%10,D===1?"st":D===2?"nd":D===3?"rd":"th"};class Hx extends D$D{constructor(D={}){super(D)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(D){this.date.setDate(parseInt(D.substr(-2)))}toString(){let D=this.date.getDate(),F=this.date.getDay();return this.token==="DD"?String(D).padStart(2,"0"):this.token==="Do"?D+F$D(D):this.token==="d"?F+1:this.token==="ddd"?this.locales.weekdaysShort[F]:this.token==="dddd"?this.locales.weekdays[F]:D}}Lx.exports=Hx});var qx=W((KgD,Nx)=>{var E$D=J1();class Vx extends E$D{constructor(D={}){super(D)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(D){this.date.setHours(parseInt(D.substr(-2)))}toString(){let D=this.date.getHours();if(/h/.test(this.token))D=D%12||12;return this.token.length>1?String(D).padStart(2,"0"):D}}Nx.exports=Vx});var Px=W((SgD,jx)=>{var w$D=J1();class Ox extends w$D{constructor(D={}){super(D)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(D){this.date.setMilliseconds(parseInt(D.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}jx.exports=Ox});var bx=W((QgD,kx)=>{var $$D=J1();class yx extends $$D{constructor(D={}){super(D)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(D){this.date.setMinutes(parseInt(D.substr(-2)))}toString(){let D=this.date.getMinutes();return this.token.length>1?String(D).padStart(2,"0"):D}}kx.exports=yx});var gx=W((HgD,cx)=>{var f$D=J1();class xx extends f$D{constructor(D={}){super(D)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(D){D=parseInt(D.substr(-2))-1,this.date.setMonth(D<0?0:D)}toString(){let D=this.date.getMonth(),F=this.token.length;return F===2?String(D+1).padStart(2,"0"):F===3?this.locales.monthsShort[D]:F===4?this.locales.months[D]:String(D+1)}}cx.exports=xx});var sx=W((LgD,_x)=>{var C$D=J1();class rx extends C$D{constructor(D={}){super(D)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(D){this.date.setSeconds(parseInt(D.substr(-2)))}toString(){let D=this.date.getSeconds();return this.token.length>1?String(D).padStart(2,"0"):D}}_x.exports=rx});var vx=W((RgD,dx)=>{var B$D=J1();class ux extends B$D{constructor(D={}){super(D)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(D){this.date.setFullYear(D.substr(-4))}toString(){let D=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?D.substr(-2):D}}dx.exports=ux});var nx=W((VgD,mx)=>{mx.exports={DatePart:J1(),Meridiem:Qx(),Day:Rx(),Hours:qx(),Milliseconds:Px(),Minutes:bx(),Month:gx(),Seconds:sx(),Year:vx()}});var Dc=W((NgD,ex)=>{var lU=qD(),h$D=a1(),{style:lx,clear:ix,figures:U$D}=q2(),{erase:A$D,cursor:px}=jD(),{DatePart:ax,Meridiem:I$D,Day:M$D,Hours:G$D,Milliseconds:Y$D,Minutes:Z$D,Month:W$D,Seconds:X$D,Year:J$D}=nx(),z$D=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,ox={1:({token:D})=>D.replace(/\\(.)/g,"$1"),2:(D)=>new M$D(D),3:(D)=>new W$D(D),4:(D)=>new J$D(D),5:(D)=>new I$D(D),6:(D)=>new G$D(D),7:(D)=>new Z$D(D),8:(D)=>new X$D(D),9:(D)=>new Y$D(D)},T$D={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class tx extends h$D{constructor(D={}){super(D);this.msg=D.message,this.cursor=0,this.typed="",this.locales=Object.assign(T$D,D.locales),this._date=D.initial||new Date,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.mask=D.mask||"YYYY-MM-DD HH:mm:ss",this.clear=ix("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(D){if(D)this._date.setTime(D.getTime())}set mask(D){let F;this.parts=[];while(F=z$D.exec(D)){let w=F.shift(),$=F.findIndex((C)=>C!=null);this.parts.push($ in ox?ox[$]({token:F[$]||w,date:this.date,parts:this.parts,locales:this.locales}):F[$]||w)}let E=this.parts.reduce((w,$)=>{if(typeof $==="string"&&typeof w[w.length-1]==="string")w[w.length-1]+=$;else w.push($);return w},[]);this.parts.splice(0),this.parts.push(...E),this.reset()}moveCursor(D){this.typed="",this.cursor=D,this.fire()}reset(){this.moveCursor(this.parts.findIndex((D)=>D instanceof ax)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let D=await this.validator(this.value);if(typeof D==="string")this.errorMsg=D,D=!1;this.error=!D}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let D=this.parts[this.cursor].prev();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}right(){let D=this.parts[this.cursor].next();if(D==null)return this.bell();this.moveCursor(this.parts.indexOf(D)),this.render()}next(){let D=this.parts[this.cursor].next();this.moveCursor(D?this.parts.indexOf(D):this.parts.findIndex((F)=>F instanceof ax)),this.render()}_(D){if(/\d/.test(D))this.typed+=D,this.parts[this.cursor].setTo(this.typed),this.render()}render(){if(this.closed)return;if(this.firstRender)this.out.write(px.hide);else this.out.write(ix(this.outputText,this.out.columns));if(super.render(),this.outputText=[lx.symbol(this.done,this.aborted),lU.bold(this.msg),lx.delimiter(!1),this.parts.reduce((D,F,E)=>D.concat(E===this.cursor&&!this.done?lU.cyan().underline(F.toString()):F),[]).join("")].join(" "),this.error)this.outputText+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":U$D.pointerSmall} ${lU.red().italic(F)}`,"");this.out.write(A$D.line+px.to(0)+this.outputText)}}ex.exports=tx});var fc=W((qgD,$c)=>{var g7=qD(),K$D=a1(),{cursor:r7,erase:S$D}=jD(),{style:iU,figures:Q$D,clear:Fc,lines:H$D}=q2(),L$D=/[0-9]/,pU=(D)=>D!==void 0,Ec=(D,F)=>{let E=Math.pow(10,F);return Math.round(D*E)/E};class wc extends K$D{constructor(D={}){super(D);this.transform=iU.render(D.style),this.msg=D.message,this.initial=pU(D.initial)?D.initial:"",this.float=!!D.float,this.round=D.round||2,this.inc=D.increment||1,this.min=pU(D.min)?D.min:-1/0,this.max=pU(D.max)?D.max:1/0,this.errorMsg=D.error||"Please Enter A Valid Value",this.validator=D.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(D){if(!D&&D!==0)this.placeholder=!0,this.rendered=g7.gray(this.transform.render(`${this.initial}`)),this._value="";else this.placeholder=!1,this.rendered=this.transform.render(`${Ec(D,this.round)}`),this._value=Ec(D,this.round);this.fire()}get value(){return this._value}parse(D){return this.float?parseFloat(D):parseInt(D)}valid(D){return D==="-"||D==="."&&this.float||L$D.test(D)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let D=this.value;this.value=D!==""?D:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let D=await this.validator(this.value);if(typeof D==="string")this.errorMsg=D,D=!1;this.error=!D}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let D=this.value;this.value=D!==""?D:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",this.value==="")this.value=this.min-this.inc;if(this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value==="")this.value=this.min+this.inc;if(this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let D=this.value.toString();if(D.length===0)return this.bell();if(this.value=this.parse(D=D.slice(0,-1))||"",this.value!==""&&this.value<this.min)this.value=this.min;this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(D,F){if(!this.valid(D))return this.bell();const E=Date.now();if(E-this.lastHit>1000)this.typed="";if(this.typed+=D,this.lastHit=E,this.color="cyan",D===".")return this.fire();if(this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max)this.value=this.max;if(this.value<this.min)this.value=this.min;this.fire(),this.render()}render(){if(this.closed)return;if(!this.firstRender){if(this.outputError)this.out.write(r7.down(H$D(this.outputError,this.out.columns)-1)+Fc(this.outputError,this.out.columns));this.out.write(Fc(this.outputText,this.out.columns))}if(super.render(),this.outputError="",this.outputText=[iU.symbol(this.done,this.aborted),g7.bold(this.msg),iU.delimiter(this.done),!this.done||!this.done&&!this.placeholder?g7[this.color]().underline(this.rendered):this.rendered].join(" "),this.error)this.outputError+=this.errorMsg.split("\n").reduce((D,F,E)=>D+`\n${E?" ":Q$D.pointerSmall} ${g7.red().italic(F)}`,"");this.out.write(S$D.line+r7.to(0)+this.outputText+r7.save+this.outputError+r7.restore)}}$c.exports=wc});var aU=W((OgD,Uc)=>{var z1=qD(),{cursor:R$D}=jD(),V$D=a1(),{clear:Cc,figures:s8,style:Bc,wrap:N$D,entriesToDisplay:q$D}=q2();class hc extends V$D{constructor(D={}){super(D);if(this.msg=D.message,this.cursor=D.cursor||0,this.scrollIndex=D.cursor||0,this.hint=D.hint||"",this.warn=D.warn||"- This option is disabled -",this.minSelected=D.min,this.showMinError=!1,this.maxChoices=D.max,this.instructions=D.instructions,this.optionsPerPage=D.optionsPerPage||10,this.value=D.choices.map((F,E)=>{if(typeof F==="string")F={title:F,value:E};return{title:F&&(F.title||F.value||F),description:F&&F.description,value:F&&(F.value===void 0?E:F.value),selected:F&&F.selected,disabled:F&&F.disabled}}),this.clear=Cc("",this.out.columns),!D.overrideRender)this.render()}reset(){this.value.map((D)=>!D.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((D)=>D.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const D=this.value.filter((F)=>F.selected);if(this.minSelected&&D.length<this.minSelected)this.showMinError=!0,this.render();else this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){if(this.cursor===0)this.cursor=this.value.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.value.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const D=this.value[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const D=!this.value[this.cursor].selected;this.value.filter((F)=>!F.disabled).forEach((F)=>F.selected=D),this.render()}_(D,F){if(D===" ")this.handleSpaceToggle();else if(D==="a")this.toggleAll();else return this.bell()}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`\nInstructions:\n ${s8.arrowUp}/${s8.arrowDown}: Highlight option\n ${s8.arrowLeft}/${s8.arrowRight}/[space]: Toggle selection\n`+(this.maxChoices===void 0?" a: Toggle all\n":"")+" enter/return: Complete answer"}return""}renderOption(D,F,E,w){const $=(F.selected?z1.green(s8.radioOn):s8.radioOff)+" "+w+" ";let C,f;if(F.disabled)C=D===E?z1.gray().underline(F.title):z1.strikethrough().gray(F.title);else if(C=D===E?z1.cyan().underline(F.title):F.title,D===E&&F.description){if(f=` - ${F.description}`,$.length+C.length+f.length>=this.out.columns||F.description.split(/\r?\n/).length>1)f="\n"+N$D(F.description,{margin:$.length,width:this.out.columns})}return $+C+z1.gray(f||"")}paginateOptions(D){if(D.length===0)return z1.red("No matches for this query.");let{startIndex:F,endIndex:E}=q$D(this.cursor,D.length,this.optionsPerPage),w,$=[];for(let C=F;C<E;C++){if(C===F&&F>0)w=s8.arrowUp;else if(C===E-1&&E<D.length)w=s8.arrowDown;else w=" ";$.push(this.renderOption(this.cursor,D[C],C,w))}return"\n"+$.join("\n")}renderOptions(D){if(!this.done)return this.paginateOptions(D);return""}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[z1.gray(this.hint),this.renderInstructions()];if(this.value[this.cursor].disabled)D.push(z1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(R$D.hide);super.render();let D=[Bc.symbol(this.done,this.aborted),z1.bold(this.msg),Bc.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=z1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.value),this.out.write(this.clear+D),this.clear=Cc(D,this.out.columns)}}Uc.exports=hc});var Zc=W((jgD,Yc)=>{var LE=qD(),O$D=a1(),{erase:j$D,cursor:Ac}=jD(),{style:oU,clear:Ic,figures:tU,wrap:P$D,entriesToDisplay:y$D}=q2(),Mc=(D,F)=>D[F]&&(D[F].value||D[F].title||D[F]),k$D=(D,F)=>D[F]&&(D[F].title||D[F].value||D[F]),b$D=(D,F)=>{const E=D.findIndex((w)=>w.value===F||w.title===F);return E>-1?E:void 0};class Gc extends O$D{constructor(D={}){super(D);this.msg=D.message,this.suggest=D.suggest,this.choices=D.choices,this.initial=typeof D.initial==="number"?D.initial:b$D(D.choices,D.initial),this.select=this.initial||D.cursor||0,this.i18n={noMatches:D.noMatches||"no matches found"},this.fallback=D.fallback||this.initial,this.clearFirst=D.clearFirst||!1,this.suggestions=[],this.input="",this.limit=D.limit||10,this.cursor=0,this.transform=oU.render(D.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=Ic("",this.out.columns),this.complete(this.render),this.render()}set fallback(D){this._fb=Number.isSafeInteger(parseInt(D))?parseInt(D):D}get fallback(){let D;if(typeof this._fb==="number")D=this.choices[this._fb];else if(typeof this._fb==="string")D={title:this._fb};return D||this._fb||{title:this.i18n.noMatches}}moveSelect(D){if(this.select=D,this.suggestions.length>0)this.value=Mc(this.suggestions,D);else this.value=this.fallback.value;this.fire()}async complete(D){const F=this.completing=this.suggest(this.input,this.choices),E=await F;if(this.completing!==F)return;this.suggestions=E.map(($,C,f)=>({title:k$D(f,C),value:Mc(f,C),description:$.description})),this.completing=!1;const w=Math.max(E.length-1,0);this.moveSelect(Math.min(w,this.select)),D&&D()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){if(this.clearFirst&&this.input.length>0)this.reset();else this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){let E=this.input.slice(0,this.cursor),w=this.input.slice(this.cursor);this.input=`${E}${D}${w}`,this.cursor=E.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let D=this.input.slice(0,this.cursor-1),F=this.input.slice(this.cursor);this.input=`${D}${F}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let D=this.input.slice(0,this.cursor),F=this.input.slice(this.cursor+1);this.input=`${D}${F}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){if(this.select===0)this.moveSelect(this.suggestions.length-1);else this.moveSelect(this.select-1);this.render()}down(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}next(){if(this.select===this.suggestions.length-1)this.moveSelect(0);else this.moveSelect(this.select+1);this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(D,F,E,w){let $,C=E?tU.arrowUp:w?tU.arrowDown:" ",f=F?LE.cyan().underline(D.title):D.title;if(C=(F?LE.cyan(tU.pointer)+" ":" ")+C,D.description){if($=` - ${D.description}`,C.length+f.length+$.length>=this.out.columns||D.description.split(/\r?\n/).length>1)$="\n"+P$D(D.description,{margin:3,width:this.out.columns})}return C+" "+f+LE.gray($||"")}render(){if(this.closed)return;if(this.firstRender)this.out.write(Ac.hide);else this.out.write(Ic(this.outputText,this.out.columns));super.render();let{startIndex:D,endIndex:F}=y$D(this.select,this.choices.length,this.limit);if(this.outputText=[oU.symbol(this.done,this.aborted,this.exited),LE.bold(this.msg),oU.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const E=this.suggestions.slice(D,F).map((w,$)=>this.renderOption(w,this.select===$+D,$===0&&D>0,$+D===F-1&&F<this.choices.length)).join("\n");this.outputText+="\n"+(E||LE.gray(this.fallback.title))}this.out.write(j$D.line+Ac.to(0)+this.outputText)}}Yc.exports=Gc});var Tc=W((PgD,zc)=>{var t1=qD(),{cursor:x$D}=jD(),c$D=aU(),{clear:Wc,style:Xc,figures:yF}=q2();class Jc extends c$D{constructor(D={}){D.overrideRender=!0;super(D);this.inputValue="",this.clear=Wc("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){if(this.cursor===0)this.cursor=this.filteredOptions.length-1;else this.cursor--;this.render()}down(){if(this.cursor===this.filteredOptions.length-1)this.cursor=0;else this.cursor++;this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((D)=>D.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){if(this.inputValue.length)this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions()}updateFilteredOptions(){const D=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((E)=>{if(this.inputValue){if(typeof E.title==="string"){if(E.title.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}if(typeof E.value==="string"){if(E.value.toLowerCase().includes(this.inputValue.toLowerCase()))return!0}return!1}return!0});const F=this.filteredOptions.findIndex((E)=>E===D);this.cursor=F<0?0:F,this.render()}handleSpaceToggle(){const D=this.filteredOptions[this.cursor];if(D.selected)D.selected=!1,this.render();else if(D.disabled||this.value.filter((F)=>F.selected).length>=this.maxChoices)return this.bell();else D.selected=!0,this.render()}handleInputChange(D){this.inputValue=this.inputValue+D,this.updateFilteredOptions()}_(D,F){if(D===" ")this.handleSpaceToggle();else this.handleInputChange(D)}renderInstructions(){if(this.instructions===void 0||this.instructions){if(typeof this.instructions==="string")return this.instructions;return`
80
80
  Instructions:
81
- ${jF.arrowUp}/${jF.arrowDown}: Highlight option
82
- ${jF.arrowLeft}/${jF.arrowRight}/[space]: Toggle selection
81
+ ${yF.arrowUp}/${yF.arrowDown}: Highlight option
82
+ ${yF.arrowLeft}/${yF.arrowRight}/[space]: Toggle selection
83
83
  [a,b,c]/delete: Filter choices
84
84
  enter/return: Complete answer
85
85
  `}return""}renderCurrentInput(){return`
86
- Filtered results for: ${this.inputValue?this.inputValue:t1.gray("Enter something to filter")}\n`}renderOption(D,F,E){let w;if(F.disabled)w=D===E?t1.gray().underline(F.title):t1.strikethrough().gray(F.title);else w=D===E?t1.cyan().underline(F.title):F.title;return(F.selected?t1.green(jF.radioOn):jF.radioOff)+" "+w}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[t1.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)D.push(t1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(e$D.hide);super.render();let D=[bc.symbol(this.done,this.aborted),t1.bold(this.msg),bc.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=t1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+D),this.clear=kc(D,this.out.columns)}}cc.exports=xc});var vc=X((zgD,dc)=>{var rc=ND(),F4D=a1(),{style:_c,clear:E4D}=N2(),{erase:w4D,cursor:sc}=OD();class uc extends F4D{constructor(D={}){super(D);this.msg=D.message,this.value=D.initial,this.initialValue=!!D.initial,this.yesMsg=D.yes||"yes",this.yesOption=D.yesOption||"(Y/n)",this.noMsg=D.no||"no",this.noOption=D.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){if(D.toLowerCase()==="y")return this.value=!0,this.submit();if(D.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(sc.hide);else this.out.write(E4D(this.outputText,this.out.columns));super.render(),this.outputText=[_c.symbol(this.done,this.aborted),rc.bold(this.msg),_c.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:rc.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(w4D.line+sc.to(0)+this.outputText)}}dc.exports=uc});var nc=X((TgD,mc)=>{mc.exports={TextPrompt:Vx(),SelectPrompt:Px(),TogglePrompt:cx(),DatePrompt:Jc(),NumberPrompt:Qc(),MultiselectPrompt:pU(),AutocompletePrompt:yc(),AutocompleteMultiselectPrompt:gc(),ConfirmPrompt:vc()}});var ic=X((lc)=>{function T1(D,F,E={}){return new Promise((w,$)=>{const C=new $4D[D](F),f=E.onAbort||r7,B=E.onSubmit||r7,h=E.onExit||r7;C.on("state",F.onState||r7),C.on("submit",(U)=>w(B(U))),C.on("exit",(U)=>w(h(U))),C.on("abort",(U)=>$(f(U)))})}var V0=lc,$4D=nc(),r7=(D)=>D;V0.text=(D)=>T1("TextPrompt",D);V0.password=(D)=>{return D.style="password",V0.text(D)};V0.invisible=(D)=>{return D.style="invisible",V0.text(D)};V0.number=(D)=>T1("NumberPrompt",D);V0.date=(D)=>T1("DatePrompt",D);V0.confirm=(D)=>T1("ConfirmPrompt",D);V0.list=(D)=>{const F=D.separator||",";return T1("TextPrompt",D,{onSubmit:(E)=>E.split(F).map((w)=>w.trim())})};V0.toggle=(D)=>T1("TogglePrompt",D);V0.select=(D)=>T1("SelectPrompt",D);V0.multiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return T1("MultiselectPrompt",D,{onAbort:F,onSubmit:F})};V0.autocompleteMultiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return T1("AutocompleteMultiselectPrompt",D,{onAbort:F,onSubmit:F})};var f4D=(D,F)=>Promise.resolve(F.filter((E)=>E.title.slice(0,D.length).toLowerCase()===D.toLowerCase()));V0.autocomplete=(D)=>{return D.suggest=D.suggest||f4D,D.choices=[].concat(D.choices||[]),T1("AutocompletePrompt",D)}});var oc=X((SgD,ac)=>{async function s8(D=[],{onSubmit:F=pc,onCancel:E=pc}={}){const w={},$=s8._override||{};D=[].concat(D);let C,f,B,h,U,I;const A=async(Y,G,Z=!1)=>{if(!Z&&Y.validate&&Y.validate(G)!==!0)return;return Y.format?await Y.format(G,w):G};for(f of D){if({name:h,type:U}=f,typeof U==="function")U=await U(C,{...w},f),f.type=U;if(!U)continue;for(let Y in f){if(C4D.includes(Y))continue;let G=f[Y];f[Y]=typeof G==="function"?await G(C,{...w},I):G}if(I=f,typeof f.message!=="string")throw new Error("prompt message is required");if({name:h,type:U}=f,tU[U]===void 0)throw new Error(`prompt type (${U}) is not defined`);if($[f.name]!==void 0){if(C=await A(f,$[f.name]),C!==void 0){w[h]=C;continue}}try{C=s8._injected?B4D(s8._injected,f.initial):await tU[U](f),w[h]=C=await A(f,C,!0),B=await F(f,C,w)}catch(Y){B=!await E(f,w)}if(B)return w}return w}function B4D(D,F){const E=D.shift();if(E instanceof Error)throw E;return E===void 0?F:E}function h4D(D){s8._injected=(s8._injected||[]).concat(D)}function U4D(D){s8._override=Object.assign({},D)}var tU=ic(),C4D=["suggest","format","onState","validate","onRender","type"],pc=()=>{};ac.exports=Object.assign(s8,{prompt:s8,prompts:tU,inject:h4D,override:U4D})});var ec=X((QgD,tc)=>{function A4D(D){D=(Array.isArray(D)?D:D.split(".")).map(Number);let F=0,E=process.versions.node.split(".").map(Number);for(;F<D.length;F++){if(E[F]>D[F])return!1;if(D[F]>E[F])return!0}return!1}tc.exports=A4D("8.6.0")?fx():oc()});var Ag=X((brD,Ug)=>{function HE(D){this.capacity=D|0,this.map=Object.create(null),this.list=new s7}function s7(){this.firstNode=null,this.lastNode=null}function a4D(D,F){this.key=D,this.val=F,this.prev=null,this.next=null}Ug.exports=function(D){return new HE(D)};HE.prototype.get=function(D){var F=this.map[D];if(F==null)return;return this.used(F),F.val};HE.prototype.set=function(D,F){var E=this.map[D];if(E!=null)E.val=F;else{if(!this.capacity)this.prune();if(!this.capacity)return!1;E=new a4D(D,F),this.map[D]=E,this.capacity--}return this.used(E),!0};HE.prototype.used=function(D){this.list.moveToFront(D)};HE.prototype.prune=function(){var D=this.list.pop();if(D!=null)delete this.map[D.key],this.capacity++};s7.prototype.moveToFront=function(D){if(this.firstNode==D)return;if(this.remove(D),this.firstNode==null)this.firstNode=D,this.lastNode=D,D.prev=null,D.next=null;else D.prev=null,D.next=this.firstNode,D.next.prev=D,this.firstNode=D};s7.prototype.pop=function(){var D=this.lastNode;if(D!=null)this.remove(D);return D};s7.prototype.remove=function(D){if(this.firstNode==D)this.firstNode=D.next;else if(D.prev!=null)D.prev.next=D.next;if(this.lastNode==D)this.lastNode=D.prev;else if(D.next!=null)D.next.prev=D.prev}});var Wg=X((Xg)=>{function LE(D,F,E){return Yg.createHmac("sha256",D).update(F,"utf8").digest(E)}function DA(D,F){return Yg.createHash("sha256").update(D,"utf8").digest(F)}function Zg(D){return D.replace(/[!'()*]/g,function(F){return"%"+F.charCodeAt(0).toString(16).toUpperCase()})}function u7(D){return Zg(encodeURIComponent(D))}function cD(D,F){if(typeof D==="string")D=o4D.parse(D);var E=D.headers=Object.assign({},D.headers||{}),w=(!this.service||!this.region)&&this.matchHost(D.hostname||D.host||E.Host||E.host);if(this.request=D,this.credentials=F||this.defaultCredentials(),this.service=D.service||w[0]||"",this.region=D.region||w[1]||"us-east-1",this.service==="email")this.service="ses";if(!D.method&&D.body)D.method="POST";if(!E.Host&&!E.host){if(E.Host=D.hostname||D.host||this.createHost(),D.port)E.Host+=":"+D.port}if(!D.hostname&&!D.host)D.hostname=E.Host||E.host;this.isCodeCommitGit=this.service==="codecommit"&&D.method==="GIT",this.extraHeadersToIgnore=D.extraHeadersToIgnore||Object.create(null),this.extraHeadersToInclude=D.extraHeadersToInclude||Object.create(null)}var Gg=Xg,o4D=import.meta.require("url"),Mg=import.meta.require("querystring"),Yg=import.meta.require("crypto"),t4D=Ag(),Ig=t4D(1000),e4D={authorization:!0,connection:!0,"x-amzn-trace-id":!0,"user-agent":!0,expect:!0,"presigned-expires":!0,range:!0};cD.prototype.matchHost=function(D){var F=(D||"").match(/([^\.]{1,63})\.(?:([^\.]{0,63})\.)?amazonaws\.com(\.cn)?$/),E=(F||[]).slice(1,3);if(E[1]==="es"||E[1]==="aoss")E=E.reverse();if(E[1]=="s3")E[0]="s3",E[1]="us-east-1";else for(var w=0;w<2;w++)if(/^s3-/.test(E[w])){E[1]=E[w].slice(3),E[0]="s3";break}return E};cD.prototype.isSingleRegion=function(){if(["s3","sdb"].indexOf(this.service)>=0&&this.region==="us-east-1")return!0;return["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0};cD.prototype.createHost=function(){var D=this.isSingleRegion()?"":"."+this.region,F=this.service==="ses"?"email":this.service;return F+D+".amazonaws.com"};cD.prototype.prepareRequest=function(){this.parsePath();var D=this.request,F=D.headers,E;if(D.signQuery){if(this.parsedPath.query=E=this.parsedPath.query||{},this.credentials.sessionToken)E["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3"&&!E["X-Amz-Expires"])E["X-Amz-Expires"]=86400;if(E["X-Amz-Date"])this.datetime=E["X-Amz-Date"];else E["X-Amz-Date"]=this.getDateTime();E["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",E["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),E["X-Amz-SignedHeaders"]=this.signedHeaders()}else{if(!D.doNotModifyHeaders&&!this.isCodeCommitGit){if(D.body&&!F["Content-Type"]&&!F["content-type"])F["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8";if(D.body&&!F["Content-Length"]&&!F["content-length"])F["Content-Length"]=Buffer.byteLength(D.body);if(this.credentials.sessionToken&&!F["X-Amz-Security-Token"]&&!F["x-amz-security-token"])F["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3"&&!F["X-Amz-Content-Sha256"]&&!F["x-amz-content-sha256"])F["X-Amz-Content-Sha256"]=DA(this.request.body||"","hex");if(F["X-Amz-Date"]||F["x-amz-date"])this.datetime=F["X-Amz-Date"]||F["x-amz-date"];else F["X-Amz-Date"]=this.getDateTime()}delete F.Authorization,delete F.authorization}};cD.prototype.sign=function(){if(!this.parsedPath)this.prepareRequest();if(this.request.signQuery)this.parsedPath.query["X-Amz-Signature"]=this.signature();else this.request.headers.Authorization=this.authHeader();return this.request.path=this.formatPath(),this.request};cD.prototype.getDateTime=function(){if(!this.datetime){var D=this.request.headers,F=new Date(D.Date||D.date||new Date);if(this.datetime=F.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit)this.datetime=this.datetime.slice(0,-1)}return this.datetime};cD.prototype.getDate=function(){return this.getDateTime().substr(0,8)};cD.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")};cD.prototype.signature=function(){var D=this.getDate(),F=[this.credentials.secretAccessKey,D,this.region,this.service].join(),E,w,$,C=Ig.get(F);if(!C)E=LE("AWS4"+this.credentials.secretAccessKey,D),w=LE(E,this.region),$=LE(w,this.service),C=LE($,"aws4_request"),Ig.set(F,C);return LE(C,this.stringToSign(),"hex")};cD.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),DA(this.canonicalString(),"hex")].join("\n")};cD.prototype.canonicalString=function(){if(!this.parsedPath)this.prepareRequest();var D=this.parsedPath.path,F=this.parsedPath.query,E=this.request.headers,w="",$=this.service!=="s3",C=this.service==="s3"||this.request.doNotEncodePath,f=this.service==="s3",B=this.service==="s3",h;if(this.service==="s3"&&this.request.signQuery)h="UNSIGNED-PAYLOAD";else if(this.isCodeCommitGit)h="";else h=E["X-Amz-Content-Sha256"]||E["x-amz-content-sha256"]||DA(this.request.body||"","hex");if(F){var U=Object.keys(F).reduce(function(A,Y){if(!Y)return A;return A[u7(Y)]=!Array.isArray(F[Y])?F[Y]:B?F[Y][0]:F[Y],A},{}),I=[];Object.keys(U).sort().forEach(function(A){if(!Array.isArray(U[A]))I.push(A+"="+u7(U[A]));else U[A].map(u7).sort().forEach(function(Y){I.push(A+"="+Y)})}),w=I.join("&")}if(D!=="/"){if($)D=D.replace(/\/{2,}/g,"/");if(D=D.split("/").reduce(function(A,Y){if($&&Y==="..")A.pop();else if(!$||Y!=="."){if(C)Y=decodeURIComponent(Y.replace(/\+/g," "));A.push(u7(Y))}return A},[]).join("/"),D[0]!=="/")D="/"+D;if(f)D=D.replace(/%2F/g,"/")}return[this.request.method||"GET",D,w,this.canonicalHeaders()+"\n",this.signedHeaders(),h].join("\n")};cD.prototype.filterHeaders=function(){var D=this.request.headers,F=this.extraHeadersToInclude,E=this.extraHeadersToIgnore;this.filteredHeaders=Object.keys(D).map(function(w){return[w.toLowerCase(),D[w]]}).filter(function(w){return F[w[0]]||e4D[w[0]]==null&&!E[w[0]]}).sort(function(w,$){return w[0]<$[0]?-1:1})};cD.prototype.canonicalHeaders=function(){if(!this.filteredHeaders)this.filterHeaders();return this.filteredHeaders.map(function(D){return D[0]+":"+D[1].toString().trim().replace(/\s+/g," ")}).join("\n")};cD.prototype.signedHeaders=function(){if(!this.filteredHeaders)this.filterHeaders();return this.filteredHeaders.map(function(D){return D[0]}).join(";")};cD.prototype.credentialString=function(){return[this.getDate(),this.region,this.service,"aws4_request"].join("/")};cD.prototype.defaultCredentials=function(){var D=process.env;return{accessKeyId:D.AWS_ACCESS_KEY_ID||D.AWS_ACCESS_KEY,secretAccessKey:D.AWS_SECRET_ACCESS_KEY||D.AWS_SECRET_KEY,sessionToken:D.AWS_SESSION_TOKEN}};cD.prototype.parsePath=function(){var D=this.request.path||"/";if(/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(D))D=encodeURI(decodeURI(D));var F=D.indexOf("?"),E=null;if(F>=0)E=Mg.parse(D.slice(F+1)),D=D.slice(0,F);this.parsedPath={path:D,query:E}};cD.prototype.formatPath=function(){var D=this.parsedPath.path,F=this.parsedPath.query;if(!F)return D;if(F[""]!=null)delete F[""];return D+"?"+Zg(Mg.stringify(F))};Gg.RequestSigner=cD;Gg.sign=function(D,F){return new cD(D,F).sign()}});import iDD from"process";z6();T6();K6();o8();n0();var MF=Q(rD(),1);var Dz=(D)=>({...D,eventStreamMarshaller:D.eventStreamSerdeProvider(D)});b6();UD();J2();y();var NK=Q(jD(),1);Z2();function So(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}var qK=async(D,F,E)=>{return{operation:v0(F).operation,region:await _D(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},OK=(D)=>{const F=[];switch(D.operation){default:F.push(So(D))}return F},jK=(D)=>{return{...NK.resolveAwsSdkSigV4Config(D)}};var PK=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"bedrock"}},B$={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var yK={name:"@aws-sdk/client-bedrock-runtime",description:"AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-bedrock-runtime","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock-runtime"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/eventstream-serde-browser":"^3.0.10","@smithy/eventstream-serde-config-resolver":"^3.0.7","@smithy/eventstream-serde-node":"^3.0.9","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-stream":"^3.1.9","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock-runtime"}};var bV=Q(jD(),1);a6();n6();n0();var CV=Q(Y9(),1),{__extends:nLD,__assign:lLD,__rest:iLD,__decorate:pLD,__param:aLD,__esDecorate:oLD,__runInitializers:tLD,__propKey:eLD,__setFunctionName:DRD,__metadata:FRD,__awaiter:BV,__generator:hV,__exportStar:ERD,__createBinding:wRD,__values:UV,__read:$RD,__spread:fRD,__spreadArrays:CRD,__spreadArray:BRD,__await:hRD,__asyncGenerator:URD,__asyncDelegator:ARD,__asyncValues:IRD,__makeTemplateObject:GRD,__importStar:MRD,__importDefault:YRD,__classPrivateFieldGet:ZRD,__classPrivateFieldSet:XRD,__classPrivateFieldIn:WRD,__addDisposableResource:JRD,__disposeResources:zRD}=CV.default;import{Buffer as AV}from"buffer";var IV=(D,F)=>{if(typeof D!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof D} (${D})`);return F?AV.from(D,F):AV.from(D)};var zB=(D)=>{const F=IV(D,"utf8");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength/Uint8Array.BYTES_PER_ELEMENT)};function TB(D){if(D instanceof Uint8Array)return D;if(typeof D==="string")return GDD(D);if(ArrayBuffer.isView(D))return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(D)}var GDD=typeof Buffer!=="undefined"&&Buffer.from?function(D){return Buffer.from(D,"utf8")}:zB;function KB(D){if(typeof D==="string")return D.length===0;return D.byteLength===0}function SB(D){return new Uint8Array([(D&4278190080)>>24,(D&16711680)>>16,(D&65280)>>8,D&255])}function QB(D){if(!Uint32Array.from){var F=new Uint32Array(D.length),E=0;while(E<D.length)F[E]=D[E],E+=1;return F}return Uint32Array.from(D)}var MDD=function(){function D(){this.crc32=new h6}return D.prototype.update=function(F){if(KB(F))return;this.crc32.update(TB(F))},D.prototype.digest=function(){return BV(this,void 0,void 0,function(){return hV(this,function(F){return[2,SB(this.crc32.digest())]})})},D.prototype.reset=function(){this.crc32=new h6},D}();var h6=function(){function D(){this.checksum=4294967295}return D.prototype.update=function(F){var E,w;try{for(var $=UV(F),C=$.next();!C.done;C=$.next()){var f=C.value;this.checksum=this.checksum>>>8^ZDD[(this.checksum^f)&255]}}catch(B){E={error:B}}finally{try{if(C&&!C.done&&(w=$.return))w.call($)}finally{if(E)throw E.error}}return this},D.prototype.digest=function(){return(this.checksum^4294967295)>>>0},D}();var YDD=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],ZDD=QB(YDD);w$();w$();function GV(D){for(let F=0;F<8;F++)D[F]^=255;for(let F=7;F>-1;F--)if(D[F]++,D[F]!==0)break}class GF{constructor(D){if(this.bytes=D,D.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(D){if(D>9223372036854776000||D<-9223372036854776000)throw new Error(`${D} is too large (or, if negative, too small) to represent as an Int64`);const F=new Uint8Array(8);for(let E=7,w=Math.abs(Math.round(D));E>-1&&w>0;E--,w/=256)F[E]=w;if(D<0)GV(F);return new GF(F)}valueOf(){const D=this.bytes.slice(0),F=D[0]&128;if(F)GV(D);return parseInt(o2(D),16)*(F?-1:1)}toString(){return String(this.valueOf())}}class HB{constructor(D,F){this.toUtf8=D,this.fromUtf8=F}format(D){const F=[];for(let $ of Object.keys(D)){const C=this.fromUtf8($);F.push(Uint8Array.from([C.byteLength]),C,this.formatHeaderValue(D[$]))}const E=new Uint8Array(F.reduce(($,C)=>$+C.byteLength,0));let w=0;for(let $ of F)E.set($,w),w+=$.byteLength;return E}formatHeaderValue(D){switch(D.type){case"boolean":return Uint8Array.from([D.value?0:1]);case"byte":return Uint8Array.from([2,D.value]);case"short":const F=new DataView(new ArrayBuffer(3));return F.setUint8(0,3),F.setInt16(1,D.value,!1),new Uint8Array(F.buffer);case"integer":const E=new DataView(new ArrayBuffer(5));return E.setUint8(0,4),E.setInt32(1,D.value,!1),new Uint8Array(E.buffer);case"long":const w=new Uint8Array(9);return w[0]=5,w.set(D.value.bytes,1),w;case"binary":const $=new DataView(new ArrayBuffer(3+D.value.byteLength));$.setUint8(0,6),$.setUint16(1,D.value.byteLength,!1);const C=new Uint8Array($.buffer);return C.set(D.value,3),C;case"string":const f=this.fromUtf8(D.value),B=new DataView(new ArrayBuffer(3+f.byteLength));B.setUint8(0,7),B.setUint16(1,f.byteLength,!1);const h=new Uint8Array(B.buffer);return h.set(f,3),h;case"timestamp":const U=new Uint8Array(9);return U[0]=8,U.set(GF.fromNumber(D.value.valueOf()).bytes,1),U;case"uuid":if(!HDD.test(D.value))throw new Error(`Invalid UUID received: ${D.value}`);const I=new Uint8Array(17);return I[0]=9,I.set(vT(D.value.replace(/\-/g,"")),1),I}}parse(D){const F={};let E=0;while(E<D.byteLength){const w=D.getUint8(E++),$=this.toUtf8(new Uint8Array(D.buffer,D.byteOffset+E,w));switch(E+=w,D.getUint8(E++)){case 0:F[$]={type:YV,value:!0};break;case 1:F[$]={type:YV,value:!1};break;case 2:F[$]={type:XDD,value:D.getInt8(E++)};break;case 3:F[$]={type:WDD,value:D.getInt16(E,!1)},E+=2;break;case 4:F[$]={type:JDD,value:D.getInt32(E,!1)},E+=4;break;case 5:F[$]={type:zDD,value:new GF(new Uint8Array(D.buffer,D.byteOffset+E,8))},E+=8;break;case 6:const C=D.getUint16(E,!1);E+=2,F[$]={type:TDD,value:new Uint8Array(D.buffer,D.byteOffset+E,C)},E+=C;break;case 7:const f=D.getUint16(E,!1);E+=2,F[$]={type:KDD,value:this.toUtf8(new Uint8Array(D.buffer,D.byteOffset+E,f))},E+=f;break;case 8:F[$]={type:SDD,value:new Date(new GF(new Uint8Array(D.buffer,D.byteOffset+E,8)).valueOf())},E+=8;break;case 9:const B=new Uint8Array(D.buffer,D.byteOffset+E,16);E+=16,F[$]={type:QDD,value:`${o2(B.subarray(0,4))}-${o2(B.subarray(4,6))}-${o2(B.subarray(6,8))}-${o2(B.subarray(8,10))}-${o2(B.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return F}}var MV;(function(D){D[D.boolTrue=0]="boolTrue",D[D.boolFalse=1]="boolFalse",D[D.byte=2]="byte",D[D.short=3]="short",D[D.integer=4]="integer",D[D.long=5]="long",D[D.byteArray=6]="byteArray",D[D.string=7]="string",D[D.timestamp=8]="timestamp",D[D.uuid=9]="uuid"})(MV||(MV={}));var YV="boolean",XDD="byte",WDD="short",JDD="integer",zDD="long",TDD="binary",KDD="string",SDD="timestamp",QDD="uuid",HDD=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;function XV({byteLength:D,byteOffset:F,buffer:E}){if(D<LDD)throw new Error("Provided message too short to accommodate event stream message overhead");const w=new DataView(E,F,D),$=w.getUint32(0,!1);if(D!==$)throw new Error("Reported message length does not match received message length");const C=w.getUint32(ZV,!1),f=w.getUint32(P8,!1),B=w.getUint32(D-U6,!1),h=new h6().update(new Uint8Array(E,F,P8));if(f!==h.digest())throw new Error(`The prelude checksum specified in the message (${f}) does not match the calculated CRC32 checksum (${h.digest()})`);if(h.update(new Uint8Array(E,F+P8,D-(P8+U6))),B!==h.digest())throw new Error(`The message checksum (${h.digest()}) did not match the expected value of ${B}`);return{headers:new DataView(E,F+P8+U6,C),body:new Uint8Array(E,F+P8+U6+C,$-C-(P8+U6+U6))}}var ZV=4,P8=ZV*2,U6=4,LDD=P8+U6*2;class LB{constructor(D,F){this.headerMarshaller=new HB(D,F),this.messageBuffer=[],this.isEndOfStream=!1}feed(D){this.messageBuffer.push(this.decode(D))}endOfStream(){this.isEndOfStream=!0}getMessage(){const D=this.messageBuffer.pop(),F=this.isEndOfStream;return{getMessage(){return D},isEndOfStream(){return F}}}getAvailableMessages(){const D=this.messageBuffer;this.messageBuffer=[];const F=this.isEndOfStream;return{getMessages(){return D},isEndOfStream(){return F}}}encode({headers:D,body:F}){const E=this.headerMarshaller.format(D),w=E.byteLength+F.byteLength+16,$=new Uint8Array(w),C=new DataView($.buffer,$.byteOffset,$.byteLength),f=new h6;return C.setUint32(0,w,!1),C.setUint32(4,E.byteLength,!1),C.setUint32(8,f.update($.subarray(0,8)).digest(),!1),$.set(E,12),$.set(F,E.byteLength+12),C.setUint32(w-4,f.update($.subarray(8,w-4)).digest(),!1),$}decode(D){const{headers:F,body:E}=XV(D);return{headers:this.headerMarshaller.parse(F),body:E}}formatHeaders(D){return this.headerMarshaller.format(D)}}class RB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.inputStream)yield this.options.decoder.decode(D)}}class VB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.messageStream)yield this.options.encoder.encode(D);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class NB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.messageStream){const F=await this.options.deserializer(D);if(F===void 0)continue;yield F}}}class qB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.inputStream)yield this.options.serializer(D)}}function WV(D){let F=0,E=0,w=null,$=null;const C=(B)=>{if(typeof B!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+B);F=B,E=4,w=new Uint8Array(B),new DataView(w.buffer).setUint32(0,B,!1)},f=async function*(){const B=D[Symbol.asyncIterator]();while(!0){const{value:h,done:U}=await B.next();if(U){if(!F)return;else if(F===E)yield w;else throw new Error("Truncated event message received.");return}const I=h.length;let A=0;while(A<I){if(!w){const G=I-A;if(!$)$=new Uint8Array(4);const Z=Math.min(4-E,G);if($.set(h.slice(A,A+Z),E),E+=Z,A+=Z,E<4)break;C(new DataView($.buffer).getUint32(0,!1)),$=null}const Y=Math.min(F-E,I-A);if(w.set(h.slice(A,A+Y),E),E+=Y,A+=Y,F&&F===E)yield w,w=null,F=0,E=0}}};return{[Symbol.asyncIterator]:f}}function JV(D,F){return async function(E){const{value:w}=E.headers[":message-type"];if(w==="error"){const $=new Error(E.headers[":error-message"].value||"UnknownError");throw $.name=E.headers[":error-code"].value,$}else if(w==="exception"){const $=E.headers[":exception-type"].value,C={[$]:E},f=await D(C);if(f.$unknown){const B=new Error(F(E.body));throw B.name=$,B}throw f[$]}else if(w==="event"){const $={[E.headers[":event-type"].value]:E},C=await D($);if(C.$unknown)return;return C}else throw Error(`Unrecognizable event type: ${E.headers[":event-type"].value}`)}}class a${constructor({utf8Encoder:D,utf8Decoder:F}){this.eventStreamCodec=new LB(D,F),this.utfEncoder=D}deserialize(D,F){const E=WV(D);return new NB({messageStream:new RB({inputStream:E,decoder:this.eventStreamCodec}),deserializer:JV(F,this.utfEncoder)})}serialize(D,F){return new VB({messageStream:new qB({inputStream:D,serializer:F}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as RDD}from"stream";async function*zV(D){let F=!1,E=!1;const w=new Array;D.on("error",($)=>{if(!F)F=!0;if($)throw $}),D.on("data",($)=>{w.push($)}),D.on("end",()=>{F=!0});while(!E){const $=await new Promise((C)=>setTimeout(()=>C(w.shift()),0));if($)yield $;E=F&&w.length===0}}class OB{constructor({utf8Encoder:D,utf8Decoder:F}){this.universalMarshaller=new a$({utf8Decoder:F,utf8Encoder:D})}deserialize(D,F){const E=typeof D[Symbol.asyncIterator]==="function"?D:zV(D);return this.universalMarshaller.deserialize(E,F)}serialize(D,F){return RDD.from(this.universalMarshaller.serialize(D,F))}}var TV=(D)=>new OB(D);l6();J2();v2();Z8();i6();O0();var yV=Q(jD(),1);y();M8();O1();a2();i8();M2();var KV={["required"]:!1,type:"String"},SV={["required"]:!0,default:!1,type:"Boolean"},QV={["ref"]:"Endpoint"},qV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},OV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},I1={},HV={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},LV={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},RV=[qV],VV=[OV],NV=[{["ref"]:"Region"}],VDD={version:"1.0",parameters:{Region:KV,UseDualStack:SV,UseFIPS:SV,Endpoint:KV},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[QV]}],rules:[{conditions:RV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{rules:[{conditions:VV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:QV,properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{rules:[{conditions:[{["fn"]:"isSet",["argv"]:NV}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:NV,assign:"PartitionResult"}],rules:[{conditions:[qV,OV],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,HV]},LV],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:RV,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[HV,!0]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:VV,rules:[{conditions:[LV],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}],type:"tree"}]},jV=VDD;var NDD=new I2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),PV=(D,F={})=>{return NDD.get(D,()=>G2(jV,{endpointParams:D,logger:F.logger}))};f0.aws=Y2;var kV=(D)=>{return{apiVersion:"2023-09-30",base64Decoder:D?.base64Decoder??z0,base64Encoder:D?.base64Encoder??K0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??PV,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??OK,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new yV.AwsSdkSigV4Signer}],logger:D?.logger??new P0,serviceId:D?.serviceId??"Bedrock Runtime",urlParser:D?.urlParser??eD,utf8Decoder:D?.utf8Decoder??D0,utf8Encoder:D?.utf8Encoder??T0}};y();p6();y();var xV=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=kV(D);return bV.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??T2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:yK.version}),eventStreamSerdeProvider:D?.eventStreamSerdeProvider??TV,maxAttempts:D?.maxAttempts??i(l2),region:D?.region??i(m0,s2),requestHandler:h0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...p2,default:async()=>(await E()).retryMode||o0}),sha256:D?.sha256??z2.bind(null,"sha256"),streamCollector:D?.streamCollector??t0,useDualstackEndpoint:D?.useDualstackEndpoint??i(r2),useFipsEndpoint:D?.useFipsEndpoint??i(_2),userAgentAppId:D?.userAgentAppId??i(f1)}};o6();dD();y();var cV=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},gV=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var o$=(D)=>D,rV=(D,F)=>{const E={...o$(h1(D)),...o$(F1(D)),...o$(O2(D)),...o$(cV(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...j2(E),...gV(E)}};class jB extends j0{constructor(...[D]){const F=xV(D||{}),E=PK(F),w=c2(E),$=i2(w),C=u2($),f=P2(C),B=m2(f),h=Dz(B),U=jK(h),I=rV(U,D?.extensions||[]);super(I);this.config=I,this.middlewareStack.use(g2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(d2(this.config)),this.middlewareStack.use(y2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(MF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:qK,identityProviderConfigProvider:async(A)=>new MF.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(MF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var k0=Q(jD(),1),rB=Q(rD(),1);y();y();class $0 extends e0{constructor(D){super(D);Object.setPrototypeOf(this,$0.prototype)}}y();class t$ extends $0{constructor(D){super({name:"AccessDeniedException",$fault:"client",...D});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,t$.prototype)}}var _V;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);return E._(F.$unknown[0],F.$unknown[1])}})(_V||(_V={}));class e$ extends $0{constructor(D){super({name:"InternalServerException",$fault:"server",...D});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,e$.prototype)}}class D4 extends $0{constructor(D){super({name:"ResourceNotFoundException",$fault:"client",...D});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,D4.prototype)}}class F4 extends $0{constructor(D){super({name:"ServiceQuotaExceededException",$fault:"client",...D});this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,F4.prototype)}}class E4 extends $0{constructor(D){super({name:"ThrottlingException",$fault:"client",...D});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,E4.prototype)}}class w4 extends $0{constructor(D){super({name:"ValidationException",$fault:"client",...D});this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,w4.prototype)}}var PB;(function(D){D.visit=(F,E)=>{if(F.bytes!==void 0)return E.bytes(F.bytes);return E._(F.$unknown[0],F.$unknown[1])}})(PB||(PB={}));var sV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);return E._(F.$unknown[0],F.$unknown[1])}})(sV||(sV={}));var yB;(function(D){D.visit=(F,E)=>{if(F.bytes!==void 0)return E.bytes(F.bytes);return E._(F.$unknown[0],F.$unknown[1])}})(yB||(yB={}));var kB;(function(D){D.visit=(F,E)=>{if(F.json!==void 0)return E.json(F.json);if(F.text!==void 0)return E.text(F.text);if(F.image!==void 0)return E.image(F.image);if(F.document!==void 0)return E.document(F.document);return E._(F.$unknown[0],F.$unknown[1])}})(kB||(kB={}));var bB;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);if(F.image!==void 0)return E.image(F.image);if(F.document!==void 0)return E.document(F.document);if(F.toolUse!==void 0)return E.toolUse(F.toolUse);if(F.toolResult!==void 0)return E.toolResult(F.toolResult);if(F.guardContent!==void 0)return E.guardContent(F.guardContent);return E._(F.$unknown[0],F.$unknown[1])}})(bB||(bB={}));var uV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);if(F.guardContent!==void 0)return E.guardContent(F.guardContent);return E._(F.$unknown[0],F.$unknown[1])}})(uV||(uV={}));var dV;(function(D){D.visit=(F,E)=>{if(F.auto!==void 0)return E.auto(F.auto);if(F.any!==void 0)return E.any(F.any);if(F.tool!==void 0)return E.tool(F.tool);return E._(F.$unknown[0],F.$unknown[1])}})(dV||(dV={}));var xB;(function(D){D.visit=(F,E)=>{if(F.json!==void 0)return E.json(F.json);return E._(F.$unknown[0],F.$unknown[1])}})(xB||(xB={}));var cB;(function(D){D.visit=(F,E)=>{if(F.toolSpec!==void 0)return E.toolSpec(F.toolSpec);return E._(F.$unknown[0],F.$unknown[1])}})(cB||(cB={}));var vV;(function(D){D.visit=(F,E)=>{if(F.message!==void 0)return E.message(F.message);return E._(F.$unknown[0],F.$unknown[1])}})(vV||(vV={}));class $4 extends $0{constructor(D){super({name:"ModelErrorException",$fault:"client",...D});this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,$4.prototype),this.originalStatusCode=D.originalStatusCode,this.resourceName=D.resourceName}}class f4 extends $0{constructor(D){super({name:"ModelNotReadyException",$fault:"client",...D});this.name="ModelNotReadyException",this.$fault="client",this.$retryable={},Object.setPrototypeOf(this,f4.prototype)}}class C4 extends $0{constructor(D){super({name:"ModelTimeoutException",$fault:"client",...D});this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,C4.prototype)}}class B4 extends $0{constructor(D){super({name:"ServiceUnavailableException",$fault:"server",...D});this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,B4.prototype)}}var mV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);if(F.toolUse!==void 0)return E.toolUse(F.toolUse);return E._(F.$unknown[0],F.$unknown[1])}})(mV||(mV={}));var nV;(function(D){D.visit=(F,E)=>{if(F.toolUse!==void 0)return E.toolUse(F.toolUse);return E._(F.$unknown[0],F.$unknown[1])}})(nV||(nV={}));class h4 extends $0{constructor(D){super({name:"ModelStreamErrorException",$fault:"client",...D});this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,h4.prototype),this.originalStatusCode=D.originalStatusCode,this.originalMessage=D.originalMessage}}var lV;(function(D){D.visit=(F,E)=>{if(F.messageStart!==void 0)return E.messageStart(F.messageStart);if(F.contentBlockStart!==void 0)return E.contentBlockStart(F.contentBlockStart);if(F.contentBlockDelta!==void 0)return E.contentBlockDelta(F.contentBlockDelta);if(F.contentBlockStop!==void 0)return E.contentBlockStop(F.contentBlockStop);if(F.messageStop!==void 0)return E.messageStop(F.messageStop);if(F.metadata!==void 0)return E.metadata(F.metadata);if(F.internalServerException!==void 0)return E.internalServerException(F.internalServerException);if(F.modelStreamErrorException!==void 0)return E.modelStreamErrorException(F.modelStreamErrorException);if(F.validationException!==void 0)return E.validationException(F.validationException);if(F.throttlingException!==void 0)return E.throttlingException(F.throttlingException);if(F.serviceUnavailableException!==void 0)return E.serviceUnavailableException(F.serviceUnavailableException);return E._(F.$unknown[0],F.$unknown[1])}})(lV||(lV={}));var iV;(function(D){D.visit=(F,E)=>{if(F.chunk!==void 0)return E.chunk(F.chunk);if(F.internalServerException!==void 0)return E.internalServerException(F.internalServerException);if(F.modelStreamErrorException!==void 0)return E.modelStreamErrorException(F.modelStreamErrorException);if(F.validationException!==void 0)return E.validationException(F.validationException);if(F.throttlingException!==void 0)return E.throttlingException(F.throttlingException);if(F.modelTimeoutException!==void 0)return E.modelTimeoutException(F.modelTimeoutException);if(F.serviceUnavailableException!==void 0)return E.serviceUnavailableException(F.serviceUnavailableException);return E._(F.$unknown[0],F.$unknown[1])}})(iV||(iV={}));var pV=(D)=>({...D,...D.body&&{body:ED}}),aV=(D)=>({...D,...D.body&&{body:ED}}),oV=(D)=>({...D,...D.body&&{body:ED}});var tV=(D)=>({...D,...D.body&&{body:"STREAMING_CONTENT"}});var eV=async(D,F)=>{const E=rB.requestBuilder(D,F),w=k({},X8,{[_B]:D[U4]||"application/octet-stream",[gB]:D[gB],[ZN]:D[GN],[MN]:D[AN],[YN]:D[IN]});E.bp("/model/{modelId}/invoke"),E.p("modelId",()=>D.modelId,"{modelId}",!1);let $;if(D.body!==void 0)$=D.body;return E.m("POST").h(w).b($),E.build()},DN=async(D,F)=>{const E=rB.requestBuilder(D,F),w=k({},X8,{[_B]:D[U4]||"application/octet-stream",[nDD]:D[gB],[ZN]:D[GN],[MN]:D[AN],[YN]:D[IN]});E.bp("/model/{modelId}/invoke-with-response-stream"),E.p("modelId",()=>D.modelId,"{modelId}",!1);let $;if(D.body!==void 0)$=D.body;return E.m("POST").h(w).b($),E.build()};var FN=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return wN(D,F);const E=k({$metadata:b0(D),[U4]:[,D.headers[_B]]}),w=await w6(D.body,F);return E.body=w,E},EN=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return wN(D,F);const E=k({$metadata:b0(D),[U4]:[,D.headers[lDD]]}),w=D.body;return E.body=cDD(w,F),E},wN=async(D,F)=>{const E={...D,body:await k0.parseJsonErrorBody(D.body,F)},w=k0.loadRestJsonErrorCode(D,E.body);switch(w){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await PDD(E,F);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await $N(E,F);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await bDD(E,F);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await xDD(E,F);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await hN(E,F);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await UN(E,F);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await yDD(E,F);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await kDD(E,F);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await CN(E,F);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await BN(E,F);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await fN(E,F);default:const $=E.body;return jDD({output:D,parsedBody:$,errorCode:w})}},jDD=t2($0),PDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new t$({$metadata:b0(D),...E});return u(C,D.body)},$N=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new e$({$metadata:b0(D),...E});return u(C,D.body)},yDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S,originalStatusCode:W2,resourceName:S});Object.assign(E,$);const C=new $4({$metadata:b0(D),...E});return u(C,D.body)},kDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new f4({$metadata:b0(D),...E});return u(C,D.body)},fN=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S,originalMessage:S,originalStatusCode:W2});Object.assign(E,$);const C=new h4({$metadata:b0(D),...E});return u(C,D.body)},CN=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new C4({$metadata:b0(D),...E});return u(C,D.body)},bDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new D4({$metadata:b0(D),...E});return u(C,D.body)},xDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new F4({$metadata:b0(D),...E});return u(C,D.body)},BN=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new B4({$metadata:b0(D),...E});return u(C,D.body)},hN=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new E4({$metadata:b0(D),...E});return u(C,D.body)},UN=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new w4({$metadata:b0(D),...E});return u(C,D.body)};var cDD=(D,F)=>{return F.eventStreamMarshaller.deserialize(D,async(E)=>{if(E.chunk!=null)return{chunk:await sDD(E.chunk,F)};if(E.internalServerException!=null)return{internalServerException:await gDD(E.internalServerException,F)};if(E.modelStreamErrorException!=null)return{modelStreamErrorException:await rDD(E.modelStreamErrorException,F)};if(E.validationException!=null)return{validationException:await vDD(E.validationException,F)};if(E.throttlingException!=null)return{throttlingException:await dDD(E.throttlingException,F)};if(E.modelTimeoutException!=null)return{modelTimeoutException:await _DD(E.modelTimeoutException,F)};if(E.serviceUnavailableException!=null)return{serviceUnavailableException:await uDD(E.serviceUnavailableException,F)};return{$unknown:D}})};var gDD=async(D,F)=>{const E={...D,body:await k0.parseJsonBody(D.body,F)};return $N(E,F)};var rDD=async(D,F)=>{const E={...D,body:await k0.parseJsonBody(D.body,F)};return fN(E,F)},_DD=async(D,F)=>{const E={...D,body:await k0.parseJsonBody(D.body,F)};return CN(E,F)},sDD=async(D,F)=>{const E={},w=await k0.parseJsonBody(D.body,F);return Object.assign(E,mDD(w,F)),E},uDD=async(D,F)=>{const E={...D,body:await k0.parseJsonBody(D.body,F)};return BN(E,F)},dDD=async(D,F)=>{const E={...D,body:await k0.parseJsonBody(D.body,F)};return hN(E,F)},vDD=async(D,F)=>{const E={...D,body:await k0.parseJsonBody(D.body,F)};return UN(E,F)};var mDD=(D,F)=>{return c(D,{bytes:F.base64Decoder})};var b0=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]});var gB="accept",U4="contentType",_B="content-type",AN="guardrailIdentifier",IN="guardrailVersion",GN="trace",nDD="x-amzn-bedrock-accept",lDD="x-amzn-bedrock-content-type",MN="x-amzn-bedrock-guardrailidentifier",YN="x-amzn-bedrock-guardrailversion",ZN="x-amzn-bedrock-trace";UD();var XN=Q(YD(),1);y();class YF extends l.classBuilder().ep(B$).m(function(D,F,E,w){return[XN.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(pV,aV).ser(eV).de(FN).build(){}UD();var WN=Q(YD(),1);y();class sB extends l.classBuilder().ep(B$).m(function(D,F,E,w){return[WN.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(oV,tV).ser(DN).de(EN).build(){}async function AqD(D){ZF.debug(D);const F=new YF(D),E=await p3.send(F);return ZF.debug("Successfully invoke model"),ZF.debug(E),E}async function IqD(D){ZF.debug(D);const F=new sB(D),E=await p3.send(F);return ZF.debug("Successfully invoke model with response stream"),ZF.debug(E),E}var p3=new jB({region:iDD.env.REGION||"us-east-1"}),ZF=console;async function YqD(D,F={}){const{maxTokenCount:E=512,temperature:w=0,topP:$=0.9}=F,C=new YF({modelId:"amazon.titan-text-express-v1",contentType:"application/json",accept:"*/*",body:JSON.stringify({inputText:`Summarize the following text: ${D}`,textGenerationConfig:{maxTokenCount:E,stopSequences:[],temperature:w,topP:$}})});try{const f=await p3.send(C);return JSON.parse(new TextDecoder().decode(f.body)).results[0].outputText}catch(f){throw console.error("Error summarizing text:",f),f}}async function ZqD(D,F={}){const{maxTokenCount:E=512,temperature:w=0,topP:$=0.9}=F,C=new YF({modelId:"amazon.titan-text-express-v1",contentType:"application/json",accept:"*/*",body:JSON.stringify({inputText:D,textGenerationConfig:{maxTokenCount:E,stopSequences:[],temperature:w,topP:$}})});try{const f=await p3.send(C);return JSON.parse(new TextDecoder().decode(f.body)).results[0].outputText}catch(f){throw console.error("Error asking question:",f),f}}import I0D from"process";z6();T6();K6();o8();n0();var WF=Q(rD(),1);b6();UD();J2();y();var JN=Q(jD(),1);Z2();function pDD(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}var zN=async(D,F,E)=>{return{operation:v0(F).operation,region:await _D(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},TN=(D)=>{const F=[];switch(D.operation){default:F.push(pDD(D))}return F},KN=(D)=>{return{...JN.resolveAwsSdkSigV4Config(D)}};var SN=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"bedrock"}},XF={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var QN={name:"@aws-sdk/client-bedrock",description:"AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-bedrock","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2",uuid:"^9.0.1"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96","@types/uuid":"^9.0.4",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock"}};var gN=Q(jD(),1);a6();n6();n0();l6();J2();v2();Z8();i6();O0();var xN=Q(jD(),1);y();M8();O1();a2();i8();M2();var HN={["required"]:!1,type:"String"},LN={["required"]:!0,default:!1,type:"Boolean"},RN={["ref"]:"Endpoint"},PN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},yN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},G1={},VN={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},NN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},qN=[PN],ON=[yN],jN=[{["ref"]:"Region"}],oDD={version:"1.0",parameters:{Region:HN,UseDualStack:LN,UseFIPS:LN,Endpoint:HN},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[RN]}],rules:[{conditions:qN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{rules:[{conditions:ON,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:RN,properties:G1,headers:G1},type:"endpoint"}],type:"tree"}],type:"tree"},{rules:[{conditions:[{["fn"]:"isSet",["argv"]:jN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:jN,assign:"PartitionResult"}],rules:[{conditions:[PN,yN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,VN]},NN],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:G1,headers:G1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:qN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[VN,!0]}],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}",properties:G1,headers:G1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:ON,rules:[{conditions:[NN],rules:[{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:G1,headers:G1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dnsSuffix}",properties:G1,headers:G1},type:"endpoint"}],type:"tree"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}],type:"tree"}]},kN=oDD;var tDD=new I2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),bN=(D,F={})=>{return tDD.get(D,()=>G2(kN,{endpointParams:D,logger:F.logger}))};f0.aws=Y2;var cN=(D)=>{return{apiVersion:"2023-04-20",base64Decoder:D?.base64Decoder??z0,base64Encoder:D?.base64Encoder??K0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??bN,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??TN,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new xN.AwsSdkSigV4Signer}],logger:D?.logger??new P0,serviceId:D?.serviceId??"Bedrock",urlParser:D?.urlParser??eD,utf8Decoder:D?.utf8Decoder??D0,utf8Encoder:D?.utf8Encoder??T0}};y();p6();y();var rN=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=cN(D);return gN.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??T2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:QN.version}),maxAttempts:D?.maxAttempts??i(l2),region:D?.region??i(m0,s2),requestHandler:h0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...p2,default:async()=>(await E()).retryMode||o0}),sha256:D?.sha256??z2.bind(null,"sha256"),streamCollector:D?.streamCollector??t0,useDualstackEndpoint:D?.useDualstackEndpoint??i(r2),useFipsEndpoint:D?.useFipsEndpoint??i(_2),userAgentAppId:D?.userAgentAppId??i(f1)}};o6();dD();y();var _N=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},sN=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var A4=(D)=>D,uN=(D,F)=>{const E={...A4(h1(D)),...A4(F1(D)),...A4(O2(D)),...A4(_N(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...j2(E),...sN(E)}};class uB extends j0{constructor(...[D]){const F=rN(D||{}),E=SN(F),w=c2(E),$=i2(w),C=u2($),f=P2(C),B=m2(f),h=KN(B),U=uN(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(g2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(d2(this.config)),this.middlewareStack.use(y2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(WF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:zN,identityProviderConfigProvider:async(I)=>new WF.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(WF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}y();y();class x0 extends e0{constructor(D){super(D);Object.setPrototypeOf(this,x0.prototype)}}class I4 extends x0{constructor(D){super({name:"AccessDeniedException",$fault:"client",...D});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,I4.prototype)}}class G4 extends x0{constructor(D){super({name:"ConflictException",$fault:"client",...D});this.name="ConflictException",this.$fault="client",Object.setPrototypeOf(this,G4.prototype)}}class M4 extends x0{constructor(D){super({name:"InternalServerException",$fault:"server",...D});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,M4.prototype)}}class Y4 extends x0{constructor(D){super({name:"ResourceNotFoundException",$fault:"client",...D});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,Y4.prototype)}}class Z4 extends x0{constructor(D){super({name:"ThrottlingException",$fault:"client",...D});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,Z4.prototype)}}class X4 extends x0{constructor(D){super({name:"ValidationException",$fault:"client",...D});this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,X4.prototype)}}var dN;(function(D){D.visit=(F,E)=>{if(F.s3Uri!==void 0)return E.s3Uri(F.s3Uri);return E._(F.$unknown[0],F.$unknown[1])}})(dN||(dN={}));var vN;(function(D){D.visit=(F,E)=>{if(F.automated!==void 0)return E.automated(F.automated);if(F.human!==void 0)return E.human(F.human);return E._(F.$unknown[0],F.$unknown[1])}})(vN||(vN={}));var mN;(function(D){D.visit=(F,E)=>{if(F.bedrockModel!==void 0)return E.bedrockModel(F.bedrockModel);return E._(F.$unknown[0],F.$unknown[1])}})(mN||(mN={}));var nN;(function(D){D.visit=(F,E)=>{if(F.models!==void 0)return E.models(F.models);return E._(F.$unknown[0],F.$unknown[1])}})(nN||(nN={}));class W4 extends x0{constructor(D){super({name:"ServiceQuotaExceededException",$fault:"client",...D});this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,W4.prototype)}}class J4 extends x0{constructor(D){super({name:"TooManyTagsException",$fault:"client",...D});this.name="TooManyTagsException",this.$fault="client",Object.setPrototypeOf(this,J4.prototype),this.resourceName=D.resourceName}}var lN;(function(D){D.visit=(F,E)=>{if(F.s3DataSource!==void 0)return E.s3DataSource(F.s3DataSource);return E._(F.$unknown[0],F.$unknown[1])}})(lN||(lN={}));var iN;(function(D){D.visit=(F,E)=>{if(F.s3InputDataConfig!==void 0)return E.s3InputDataConfig(F.s3InputDataConfig);return E._(F.$unknown[0],F.$unknown[1])}})(iN||(iN={}));var pN;(function(D){D.visit=(F,E)=>{if(F.s3OutputDataConfig!==void 0)return E.s3OutputDataConfig(F.s3OutputDataConfig);return E._(F.$unknown[0],F.$unknown[1])}})(pN||(pN={}));var _1=Q(jD(),1),z4=Q(rD(),1);y();e9();var Dq=async(D,F)=>{const E=z4.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/model-customization-jobs");let $;return $=JSON.stringify(c(D,{baseModelIdentifier:[],clientRequestToken:[!0,(C)=>C??D$()],customModelKmsKeyId:[],customModelName:[],customModelTags:(C)=>CD(C),customizationType:[],hyperParameters:(C)=>CD(C),jobName:[],jobTags:(C)=>CD(C),outputDataConfig:(C)=>CD(C),roleArn:[],trainingDataConfig:(C)=>CD(C),validationDataConfig:(C)=>CD(C),vpcConfig:(C)=>CD(C)})),E.m("POST").h(w).b($),E.build()};var Fq=async(D,F)=>{const E=z4.requestBuilder(D,F),w={};E.bp("/model-customization-jobs/{jobIdentifier}"),E.p("jobIdentifier",()=>D.jobIdentifier,"{jobIdentifier}",!1);let $;return E.m("GET").h(w).b($),E.build()};var Eq=async(D,F)=>{const E=z4.requestBuilder(D,F),w={};E.bp("/foundation-models");const $=k({[eN]:[,D[eN]],[aN]:[,D[aN]],[tN]:[,D[tN]],[oN]:[,D[oN]]});let C;return E.m("GET").h(w).q($).b(C),E.build()};var wq=async(D,F)=>{if(D.statusCode!==201&&D.statusCode>=300)return dB(D,F);const E=k({$metadata:S2(D)}),w=PD(S0(await _1.parseJsonBody(D.body,F)),"body"),$=c(w,{jobArn:S});return Object.assign(E,$),E};var $q=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return dB(D,F);const E=k({$metadata:S2(D)}),w=PD(S0(await _1.parseJsonBody(D.body,F)),"body"),$=c(w,{baseModelArn:S,clientRequestToken:S,creationTime:(C)=>PD(d6(C)),customizationType:S,endTime:(C)=>PD(d6(C)),failureMessage:S,hyperParameters:CD,jobArn:S,jobName:S,lastModifiedTime:(C)=>PD(d6(C)),outputDataConfig:CD,outputModelArn:S,outputModelKmsKeyArn:S,outputModelName:S,roleArn:S,status:S,trainingDataConfig:CD,trainingMetrics:(C)=>h0D(C,F),validationDataConfig:CD,validationMetrics:(C)=>U0D(C,F),vpcConfig:CD});return Object.assign(E,$),E};var fq=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return dB(D,F);const E=k({$metadata:S2(D)}),w=PD(S0(await _1.parseJsonBody(D.body,F)),"body"),$=c(w,{modelSummaries:CD});return Object.assign(E,$),E};var dB=async(D,F)=>{const E={...D,body:await _1.parseJsonErrorBody(D.body,F)},w=_1.loadRestJsonErrorCode(D,E.body);switch(w){case"AccessDeniedException":case"com.amazonaws.bedrock#AccessDeniedException":throw await D0D(E,F);case"ConflictException":case"com.amazonaws.bedrock#ConflictException":throw await F0D(E,F);case"InternalServerException":case"com.amazonaws.bedrock#InternalServerException":throw await E0D(E,F);case"ResourceNotFoundException":case"com.amazonaws.bedrock#ResourceNotFoundException":throw await w0D(E,F);case"ThrottlingException":case"com.amazonaws.bedrock#ThrottlingException":throw await f0D(E,F);case"ValidationException":case"com.amazonaws.bedrock#ValidationException":throw await B0D(E,F);case"ServiceQuotaExceededException":case"com.amazonaws.bedrock#ServiceQuotaExceededException":throw await $0D(E,F);case"TooManyTagsException":case"com.amazonaws.bedrock#TooManyTagsException":throw await C0D(E,F);default:const $=E.body;return eDD({output:D,parsedBody:$,errorCode:w})}},eDD=t2(x0),D0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new I4({$metadata:S2(D),...E});return u(C,D.body)},F0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new G4({$metadata:S2(D),...E});return u(C,D.body)},E0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new M4({$metadata:S2(D),...E});return u(C,D.body)},w0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new Y4({$metadata:S2(D),...E});return u(C,D.body)},$0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new W4({$metadata:S2(D),...E});return u(C,D.body)},f0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new Z4({$metadata:S2(D),...E});return u(C,D.body)},C0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S,resourceName:S});Object.assign(E,$);const C=new J4({$metadata:S2(D),...E});return u(C,D.body)},B0D=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new X4({$metadata:S2(D),...E});return u(C,D.body)};var h0D=(D,F)=>{return c(D,{trainingLoss:J5})},U0D=(D,F)=>{return(D||[]).filter((w)=>w!=null).map((w)=>{return A0D(w,F)})},A0D=(D,F)=>{return c(D,{validationLoss:J5})},S2=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]});var aN="byCustomizationType",oN="byInferenceType";var tN="byOutputModality",eN="byProvider";UD();var Cq=Q(YD(),1);y();class vB extends l.classBuilder().ep(XF).m(function(D,F,E,w){return[Cq.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelCustomizationJob",{}).n("BedrockClient","CreateModelCustomizationJobCommand").f(void 0,void 0).ser(Dq).de(wq).build(){}UD();var Bq=Q(YD(),1);y();class mB extends l.classBuilder().ep(XF).m(function(D,F,E,w){return[Bq.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelCustomizationJob",{}).n("BedrockClient","GetModelCustomizationJobCommand").f(void 0,void 0).ser(Fq).de($q).build(){}UD();var hq=Q(YD(),1);y();class nB extends l.classBuilder().ep(XF).m(function(D,F,E,w){return[hq.getSerdePlugin(E,this.serialize,this.deserialize),p(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListFoundationModels",{}).n("BedrockClient","ListFoundationModelsCommand").f(void 0,void 0).ser(Eq).de(fq).build(){}async function uOD(D){s1.debug(D);const F=new vB(D),E=await lB.send(F);return s1.debug("Successfully create model customization job"),s1.debug(E),E}async function dOD(D){s1.debug(D);const F=new mB(D),E=await lB.send(F);return s1.debug("Successfully get model customization job"),s1.debug(E),E}async function vOD(D){s1.debug(D);const F=new nB(D),E=await lB.send(F);return s1.debug("Successfully list foundation models"),s1.debug(E),E}var lB=new uB({region:I0D.env.REGION||"us-east-1"}),s1=console;a6();import D7D from"process";var pOD=process.argv,aOD=`${process.platform}-${process.arch} node-${process.version}`;var G0D=new Set([".","!","?"]),fjD=new Set([...G0D,":",'"',"'","\u201D"]);var y8=Q(Aq(),1);var R0D=Q(Iq(),1);function eB(D){return typeof D==="string"}var q={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"},Gq={"":"data"};var q0D=Object.defineProperty,T4=(D,F)=>{for(var E in F)q0D(D,E,{get:F[E],enumerable:!0})};function Dh(D,F,E,w,$){for(F=F.split?F.split("."):F,w=0;w<F.length;w++)D=D?D[F[w]]:$;return D===$?E:D}var AO=Q(Q4(),1),IO=Q(Wq(),1),GO=Q(Sq(),1),MO=Q(Qq(),1),YO=Q(Rq(),1),ZO=Q(Vq(),1),XO=Q(Nq(),1),WO=Q(jq(),1),JO=Q(uq(),1),zO=Q(vq(),1),TO=Q(iq(),1),KO=Q(pq(),1),SO=Q(tq(),1),QO=Q(FO(),1),HO=Q(wO(),1),LO=Q(qh(),1),RO=Q(Oh(),1),VO=Q(Oh(),1),NO=Q(qh(),1),DE=class{#D;#F;constructor(D,F){this.#D=D,this.#F=F||{}}#E(D,F){if(!D.includes("{{"))return D;return D.replace(/(\\)?{{(.*?)}}/g,(E,w,$)=>{const C=$.trim().split(".");let f=F;while(C.length){if(f===null||typeof f!=="object")return;const B=C.shift();f=Object.hasOwn(f,B)?f[B]:void 0}return f})}getMessage(D,F,E,w){const $=this.#F[E.name]||E.name,C=this.#D[`${E.getFieldPath()}.${F}`];if(C)return this.#E(C,{field:$,...w});const f=this.#D[`${E.wildCardPath}.${F}`];if(f)return this.#E(f,{field:$,...w});const B=this.#D[F];if(B)return this.#E(B,{field:$,...w});return this.#E(D,{field:$,...w})}toJSON(){return{messages:this.#D,fields:this.#F}}},o4={};T4(o4,{E_VALIDATION_ERROR:()=>UO});var jh=class extends Error{constructor(D,F){super("Validation failure",F);this.messages=D;const E=this.constructor;Error.captureStackTrace(this,E)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},UO=jh,Ph=class{hasErrors=!1;errors=[];report(D,F,E,w){const $={message:D,rule:F,field:E.getFieldPath()};if(w)$.meta=w;if(E.isArrayMember)$.index=E.name;this.hasErrors=!0,this.errors.push($)}createError(){return new UO(this.errors)}},C8D=["1",1,"true",!0,"on"],B8D=["0",0,"false",!1],d={exists(D){return D!==null&&D!==void 0},isMissing(D){return!this.exists(D)},isTrue(D){return C8D.includes(D)},isFalse(D){return B8D.includes(D)},isString(D){return typeof D==="string"},isObject(D){return!!(D&&typeof D==="object"&&!Array.isArray(D))},hasKeys(D,F){for(let E of F)if(E 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:WO.default.default,isURL:GO.default.default,isAlpha:JO.default.default,isAlphaNumeric:QO.default.default,isIP:AO.default.default,isUUID:ZO.default.default,isAscii:XO.default.default,isCreditCard:SO.default.default,isIBAN:YO.default.default,isJWT:IO.default.default,isLatLong:zO.default.default,isMobilePhone:RO.default.default,isPassportNumber:HO.default.default,isPostalCode:LO.default.default,isSlug:MO.default.default,isDecimal:TO.default.default,mobileLocales:VO.locales,postalCountryCodes:NO.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 KO.default.default(D)},isActiveURL:async(D)=>{const{resolve4:F,resolve6:E}=await import("dns/promises");try{const{hostname:w}=new URL(D);if((await E(w)).length)return!0;else return(await F(w)).length>0}catch{return!1}},isDistinct:(D,F)=>{const E=new Set;if(!F){for(let $ of D)if(d.exists($))if(E.has($))return!1;else E.add($);return!0}const w=Array.isArray(F)?F:[F];for(let $ of D)if(d.isObject($)&&d.hasKeys($,w)){const C=w.map((f)=>$[f]).join("_");if(E.has(C))return!1;else E.add(C)}return!0},getNestedValue(D,F){if(D.indexOf(".")>-1)return Dh(F.data,D);return F.parent[D]}};function O(D,F){const E={validator:D,isAsync:F?.isAsync||D.constructor.name==="AsyncFunction",implicit:F?.implicit??!1};return function(...w){return{rule:E,options:w[0]}}}var TF=class{static macro(D,F){this.prototype[D]=F}static getter(D,F,E=!1){Object.defineProperty(this.prototype,D,{get(){const w=F.call(this);if(E)Object.defineProperty(this,D,{configurable:!1,enumerable:!1,value:w,writable:!1});return w},configurable:!0,enumerable:!1})}};var h8D=/[\p{Lu}]/u,U8D=/[\p{Ll}]/u,qO=/^[\p{Lu}](?![\p{Lu}])/gu,PO=/([\p{Alpha}\p{N}_]|$)/u,yh=/[_.\- ]+/,A8D=new RegExp("^"+yh.source),OO=new RegExp(yh.source+PO.source,"gu"),jO=new RegExp("\\d+"+PO.source,"gu"),I8D=(D,F,E,w)=>{let $=!1,C=!1,f=!1,B=!1;for(let h=0;h<D.length;h++){const U=D[h];if(B=h>2?D[h-3]==="-":!0,$&&h8D.test(U))D=D.slice(0,h)+"-"+D.slice(h),$=!1,f=C,C=!0,h++;else if(C&&f&&U8D.test(U)&&(!B||w))D=D.slice(0,h-1)+"-"+D.slice(h-1),f=C,C=!1,$=!0;else $=F(U)===U&&E(U)!==U,f=C,C=E(U)===U&&F(U)!==U}return D},G8D=(D,F)=>{return qO.lastIndex=0,D.replaceAll(qO,(E)=>F(E))},M8D=(D,F)=>{return OO.lastIndex=0,jO.lastIndex=0,D.replaceAll(jO,(E,w,$)=>["_","-"].includes(D.charAt($+E.length))?E:F(E)).replaceAll(OO,(E,w)=>F(w))};function oD(D,F){if(!(typeof D==="string"||Array.isArray(D)))throw new TypeError("Expected the input to be `string | string[]`");if(F={pascalCase:!1,preserveConsecutiveUppercase:!1,...F},Array.isArray(D))D=D.map((C)=>C.trim()).filter((C)=>C.length).join("-");else D=D.trim();if(D.length===0)return"";const E=F.locale===!1?(C)=>C.toLowerCase():(C)=>C.toLocaleLowerCase(F.locale),w=F.locale===!1?(C)=>C.toUpperCase():(C)=>C.toLocaleUpperCase(F.locale);if(D.length===1){if(yh.test(D))return"";return F.pascalCase?w(D):E(D)}if(D!==E(D))D=I8D(D,E,w,F.preserveConsecutiveUppercase);if(D=D.replace(A8D,""),D=F.preserveConsecutiveUppercase?G8D(D,E):E(D),F.pascalCase)D=w(D.charAt(0))+D.slice(1);return M8D(D,w)}var AP=Q(xh(),1),XD=Q(xh(),1),IP=Q(yO(),1),GP=Q(kO(),1),MP=Q(bO(),1);function ph(D){return new YP(D)}var dh=(D,F)=>F.some((E)=>E instanceof RegExp?E.test(D):E===D),Y8D=new Set(["https:","http:","file:"]),Z8D=(D)=>{try{const{protocol:F}=new URL(D);return F.endsWith(":")&&!F.includes(".")&&!Y8D.has(F)}catch{return!1}},X8D=(D,{stripHash:F})=>{const E=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(D);if(!E)throw new Error(`Invalid URL: ${D}`);let{type:w,data:$,hash:C}=E.groups;const f=w.split(";");C=F?"":C;let B=!1;if(f[f.length-1]==="base64")f.pop(),B=!0;const h=f.shift()?.toLowerCase()??"",I=[...f.map((A)=>{let[Y,G=""]=A.split("=").map((Z)=>Z.trim());if(Y==="charset"){if(G=G.toLowerCase(),G==="us-ascii")return""}return`${Y}${G?`=${G}`:""}`}).filter(Boolean)];if(B)I.push("base64");if(I.length>0||h&&h!=="text/plain")I.unshift(h);return`data:${I.join(";")},${B?$.trim():$}${C?`#${C}`:""}`};function vh(D,F){if(F={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,...F},typeof F.defaultProtocol==="string"&&!F.defaultProtocol.endsWith(":"))F.defaultProtocol=`${F.defaultProtocol}:`;if(D=D.trim(),/^data:/i.test(D))return X8D(D,F);if(Z8D(D))return D;const E=D.startsWith("//");if(!(!E&&/^\.*\//.test(D)))D=D.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,F.defaultProtocol);const $=new URL(D);if(F.forceHttp&&F.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(F.forceHttp&&$.protocol==="https:")$.protocol="http:";if(F.forceHttps&&$.protocol==="http:")$.protocol="https:";if(F.stripAuthentication)$.username="",$.password="";if(F.stripHash)$.hash="";else if(F.stripTextFragment)$.hash=$.hash.replace(/#?:~:text.*?$/i,"");if($.pathname){const f=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let B=0,h="";for(;;){const I=f.exec($.pathname);if(!I)break;const A=I[0],Y=I.index,G=$.pathname.slice(B,Y);h+=G.replace(/\/{2,}/g,"/"),h+=A,B=Y+A.length}const U=$.pathname.slice(B,$.pathname.length);h+=U.replace(/\/{2,}/g,"/"),$.pathname=h}if($.pathname)try{$.pathname=decodeURI($.pathname)}catch{}if(F.removeDirectoryIndex===!0)F.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(F.removeDirectoryIndex)&&F.removeDirectoryIndex.length>0){let f=$.pathname.split("/");const B=f[f.length-1];if(dh(B,F.removeDirectoryIndex))f=f.slice(0,-1),$.pathname=f.slice(1).join("/")+"/"}if($.hostname){if($.hostname=$.hostname.replace(/\.$/,""),F.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test($.hostname))$.hostname=$.hostname.replace(/^www\./,"")}if(Array.isArray(F.removeQueryParameters)){for(let f of[...$.searchParams.keys()])if(dh(f,F.removeQueryParameters))$.searchParams.delete(f)}if(!Array.isArray(F.keepQueryParameters)&&F.removeQueryParameters===!0)$.search="";if(Array.isArray(F.keepQueryParameters)&&F.keepQueryParameters.length>0){for(let f of[...$.searchParams.keys()])if(!dh(f,F.keepQueryParameters))$.searchParams.delete(f)}if(F.sortQueryParameters){$.searchParams.sort();try{$.search=decodeURIComponent($.search)}catch{}}if(F.removeTrailingSlash)$.pathname=$.pathname.replace(/\/$/,"");if(F.removeExplicitPort&&$.port)$.port="";const C=D;if(D=$.toString(),!F.removeSingleSlash&&$.pathname==="/"&&!C.endsWith("/")&&$.hash==="")D=D.replace(/\/$/,"");if((F.removeTrailingSlash||$.pathname==="/")&&$.hash===""&&F.removeSingleSlash)D=D.replace(/\/$/,"");if(E&&!F.normalizeProtocol)D=D.replace(/^http:\/\//,"//");if(F.stripProtocol)D=D.replace(/^(?:https?:)?\/\//,"");return D}var TP=Q(xO(),1),KP=Q(cO(),1);function ah(D){return new M6D(D)}function P8D({parseFnRefId:D,variableName:F,wildCardPath:E,isArrayMember:w,valueExpression:$,parentExpression:C,fieldNameExpression:f,parentValueExpression:B}){const h=D?`refs['${D}'](${$}, {
86
+ Filtered results for: ${this.inputValue?this.inputValue:t1.gray("Enter something to filter")}\n`}renderOption(D,F,E){let w;if(F.disabled)w=D===E?t1.gray().underline(F.title):t1.strikethrough().gray(F.title);else w=D===E?t1.cyan().underline(F.title):F.title;return(F.selected?t1.green(yF.radioOn):yF.radioOff)+" "+w}renderDoneOrInstructions(){if(this.done)return this.value.filter((F)=>F.selected).map((F)=>F.title).join(", ");const D=[t1.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];if(this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled)D.push(t1.yellow(this.warn));return D.join(" ")}render(){if(this.closed)return;if(this.firstRender)this.out.write(x$D.hide);super.render();let D=[Xc.symbol(this.done,this.aborted),t1.bold(this.msg),Xc.delimiter(!1),this.renderDoneOrInstructions()].join(" ");if(this.showMinError)D+=t1.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1;D+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+D),this.clear=Wc(D,this.out.columns)}}zc.exports=Jc});var Rc=W((ygD,Lc)=>{var Kc=qD(),g$D=a1(),{style:Sc,clear:r$D}=q2(),{erase:_$D,cursor:Qc}=jD();class Hc extends g$D{constructor(D={}){super(D);this.msg=D.message,this.value=D.initial,this.initialValue=!!D.initial,this.yesMsg=D.yes||"yes",this.yesOption=D.yesOption||"(Y/n)",this.noMsg=D.no||"no",this.noOption=D.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(D,F){if(D.toLowerCase()==="y")return this.value=!0,this.submit();if(D.toLowerCase()==="n")return this.value=!1,this.submit();return this.bell()}render(){if(this.closed)return;if(this.firstRender)this.out.write(Qc.hide);else this.out.write(r$D(this.outputText,this.out.columns));super.render(),this.outputText=[Sc.symbol(this.done,this.aborted),Kc.bold(this.msg),Sc.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Kc.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(_$D.line+Qc.to(0)+this.outputText)}}Lc.exports=Hc});var Nc=W((kgD,Vc)=>{Vc.exports={TextPrompt:Ux(),SelectPrompt:Yx(),TogglePrompt:zx(),DatePrompt:Dc(),NumberPrompt:fc(),MultiselectPrompt:aU(),AutocompletePrompt:Zc(),AutocompleteMultiselectPrompt:Tc(),ConfirmPrompt:Rc()}});var Oc=W((qc)=>{function T1(D,F,E={}){return new Promise((w,$)=>{const C=new s$D[D](F),f=E.onAbort||_7,B=E.onSubmit||_7,h=E.onExit||_7;C.on("state",F.onState||_7),C.on("submit",(U)=>w(B(U))),C.on("exit",(U)=>w(h(U))),C.on("abort",(U)=>$(f(U)))})}var N0=qc,s$D=Nc(),_7=(D)=>D;N0.text=(D)=>T1("TextPrompt",D);N0.password=(D)=>{return D.style="password",N0.text(D)};N0.invisible=(D)=>{return D.style="invisible",N0.text(D)};N0.number=(D)=>T1("NumberPrompt",D);N0.date=(D)=>T1("DatePrompt",D);N0.confirm=(D)=>T1("ConfirmPrompt",D);N0.list=(D)=>{const F=D.separator||",";return T1("TextPrompt",D,{onSubmit:(E)=>E.split(F).map((w)=>w.trim())})};N0.toggle=(D)=>T1("TogglePrompt",D);N0.select=(D)=>T1("SelectPrompt",D);N0.multiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return T1("MultiselectPrompt",D,{onAbort:F,onSubmit:F})};N0.autocompleteMultiselect=(D)=>{D.choices=[].concat(D.choices||[]);const F=(E)=>E.filter((w)=>w.selected).map((w)=>w.value);return T1("AutocompleteMultiselectPrompt",D,{onAbort:F,onSubmit:F})};var u$D=(D,F)=>Promise.resolve(F.filter((E)=>E.title.slice(0,D.length).toLowerCase()===D.toLowerCase()));N0.autocomplete=(D)=>{return D.suggest=D.suggest||u$D,D.choices=[].concat(D.choices||[]),T1("AutocompletePrompt",D)}});var yc=W((xgD,Pc)=>{async function u8(D=[],{onSubmit:F=jc,onCancel:E=jc}={}){const w={},$=u8._override||{};D=[].concat(D);let C,f,B,h,U,I;const A=async(Y,M,Z=!1)=>{if(!Z&&Y.validate&&Y.validate(M)!==!0)return;return Y.format?await Y.format(M,w):M};for(f of D){if({name:h,type:U}=f,typeof U==="function")U=await U(C,{...w},f),f.type=U;if(!U)continue;for(let Y in f){if(d$D.includes(Y))continue;let M=f[Y];f[Y]=typeof M==="function"?await M(C,{...w},I):M}if(I=f,typeof f.message!=="string")throw new Error("prompt message is required");if({name:h,type:U}=f,eU[U]===void 0)throw new Error(`prompt type (${U}) is not defined`);if($[f.name]!==void 0){if(C=await A(f,$[f.name]),C!==void 0){w[h]=C;continue}}try{C=u8._injected?v$D(u8._injected,f.initial):await eU[U](f),w[h]=C=await A(f,C,!0),B=await F(f,C,w)}catch(Y){B=!await E(f,w)}if(B)return w}return w}function v$D(D,F){const E=D.shift();if(E instanceof Error)throw E;return E===void 0?F:E}function m$D(D){u8._injected=(u8._injected||[]).concat(D)}function n$D(D){u8._override=Object.assign({},D)}var eU=Oc(),d$D=["suggest","format","onState","validate","onRender","type"],jc=()=>{};Pc.exports=Object.assign(u8,{prompt:u8,prompts:eU,inject:m$D,override:n$D})});var bc=W((cgD,kc)=>{function l$D(D){D=(Array.isArray(D)?D:D.split(".")).map(Number);let F=0,E=process.versions.node.split(".").map(Number);for(;F<D.length;F++){if(E[F]>D[F])return!1;if(D[F]>E[F])return!0}return!1}kc.exports=l$D("8.6.0")?sb():yc()});var nc=W((prD,mc)=>{function VE(D){this.capacity=D|0,this.map=Object.create(null),this.list=new u7}function u7(){this.firstNode=null,this.lastNode=null}function y4D(D,F){this.key=D,this.val=F,this.prev=null,this.next=null}mc.exports=function(D){return new VE(D)};VE.prototype.get=function(D){var F=this.map[D];if(F==null)return;return this.used(F),F.val};VE.prototype.set=function(D,F){var E=this.map[D];if(E!=null)E.val=F;else{if(!this.capacity)this.prune();if(!this.capacity)return!1;E=new y4D(D,F),this.map[D]=E,this.capacity--}return this.used(E),!0};VE.prototype.used=function(D){this.list.moveToFront(D)};VE.prototype.prune=function(){var D=this.list.pop();if(D!=null)delete this.map[D.key],this.capacity++};u7.prototype.moveToFront=function(D){if(this.firstNode==D)return;if(this.remove(D),this.firstNode==null)this.firstNode=D,this.lastNode=D,D.prev=null,D.next=null;else D.prev=null,D.next=this.firstNode,D.next.prev=D,this.firstNode=D};u7.prototype.pop=function(){var D=this.lastNode;if(D!=null)this.remove(D);return D};u7.prototype.remove=function(D){if(this.firstNode==D)this.firstNode=D.next;else if(D.prev!=null)D.prev.next=D.next;if(this.lastNode==D)this.lastNode=D.prev;else if(D.next!=null)D.next.prev=D.prev}});var ec=W((tc)=>{function NE(D,F,E){return ac.createHmac("sha256",D).update(F,"utf8").digest(E)}function FA(D,F){return ac.createHash("sha256").update(D,"utf8").digest(F)}function oc(D){return D.replace(/[!'()*]/g,function(F){return"%"+F.charCodeAt(0).toString(16).toUpperCase()})}function d7(D){return oc(encodeURIComponent(D))}function gD(D,F){if(typeof D==="string")D=k4D.parse(D);var E=D.headers=Object.assign({},D.headers||{}),w=(!this.service||!this.region)&&this.matchHost(D.hostname||D.host||E.Host||E.host);if(this.request=D,this.credentials=F||this.defaultCredentials(),this.service=D.service||w[0]||"",this.region=D.region||w[1]||"us-east-1",this.service==="email")this.service="ses";if(!D.method&&D.body)D.method="POST";if(!E.Host&&!E.host){if(E.Host=D.hostname||D.host||this.createHost(),D.port)E.Host+=":"+D.port}if(!D.hostname&&!D.host)D.hostname=E.Host||E.host;this.isCodeCommitGit=this.service==="codecommit"&&D.method==="GIT",this.extraHeadersToIgnore=D.extraHeadersToIgnore||Object.create(null),this.extraHeadersToInclude=D.extraHeadersToInclude||Object.create(null)}var ic=tc,k4D=import.meta.require("url"),pc=import.meta.require("querystring"),ac=import.meta.require("crypto"),b4D=nc(),lc=b4D(1000),x4D={authorization:!0,connection:!0,"x-amzn-trace-id":!0,"user-agent":!0,expect:!0,"presigned-expires":!0,range:!0};gD.prototype.matchHost=function(D){var F=(D||"").match(/([^\.]{1,63})\.(?:([^\.]{0,63})\.)?amazonaws\.com(\.cn)?$/),E=(F||[]).slice(1,3);if(E[1]==="es"||E[1]==="aoss")E=E.reverse();if(E[1]=="s3")E[0]="s3",E[1]="us-east-1";else for(var w=0;w<2;w++)if(/^s3-/.test(E[w])){E[1]=E[w].slice(3),E[0]="s3";break}return E};gD.prototype.isSingleRegion=function(){if(["s3","sdb"].indexOf(this.service)>=0&&this.region==="us-east-1")return!0;return["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0};gD.prototype.createHost=function(){var D=this.isSingleRegion()?"":"."+this.region,F=this.service==="ses"?"email":this.service;return F+D+".amazonaws.com"};gD.prototype.prepareRequest=function(){this.parsePath();var D=this.request,F=D.headers,E;if(D.signQuery){if(this.parsedPath.query=E=this.parsedPath.query||{},this.credentials.sessionToken)E["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3"&&!E["X-Amz-Expires"])E["X-Amz-Expires"]=86400;if(E["X-Amz-Date"])this.datetime=E["X-Amz-Date"];else E["X-Amz-Date"]=this.getDateTime();E["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",E["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),E["X-Amz-SignedHeaders"]=this.signedHeaders()}else{if(!D.doNotModifyHeaders&&!this.isCodeCommitGit){if(D.body&&!F["Content-Type"]&&!F["content-type"])F["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8";if(D.body&&!F["Content-Length"]&&!F["content-length"])F["Content-Length"]=Buffer.byteLength(D.body);if(this.credentials.sessionToken&&!F["X-Amz-Security-Token"]&&!F["x-amz-security-token"])F["X-Amz-Security-Token"]=this.credentials.sessionToken;if(this.service==="s3"&&!F["X-Amz-Content-Sha256"]&&!F["x-amz-content-sha256"])F["X-Amz-Content-Sha256"]=FA(this.request.body||"","hex");if(F["X-Amz-Date"]||F["x-amz-date"])this.datetime=F["X-Amz-Date"]||F["x-amz-date"];else F["X-Amz-Date"]=this.getDateTime()}delete F.Authorization,delete F.authorization}};gD.prototype.sign=function(){if(!this.parsedPath)this.prepareRequest();if(this.request.signQuery)this.parsedPath.query["X-Amz-Signature"]=this.signature();else this.request.headers.Authorization=this.authHeader();return this.request.path=this.formatPath(),this.request};gD.prototype.getDateTime=function(){if(!this.datetime){var D=this.request.headers,F=new Date(D.Date||D.date||new Date);if(this.datetime=F.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit)this.datetime=this.datetime.slice(0,-1)}return this.datetime};gD.prototype.getDate=function(){return this.getDateTime().substr(0,8)};gD.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")};gD.prototype.signature=function(){var D=this.getDate(),F=[this.credentials.secretAccessKey,D,this.region,this.service].join(),E,w,$,C=lc.get(F);if(!C)E=NE("AWS4"+this.credentials.secretAccessKey,D),w=NE(E,this.region),$=NE(w,this.service),C=NE($,"aws4_request"),lc.set(F,C);return NE(C,this.stringToSign(),"hex")};gD.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),FA(this.canonicalString(),"hex")].join("\n")};gD.prototype.canonicalString=function(){if(!this.parsedPath)this.prepareRequest();var D=this.parsedPath.path,F=this.parsedPath.query,E=this.request.headers,w="",$=this.service!=="s3",C=this.service==="s3"||this.request.doNotEncodePath,f=this.service==="s3",B=this.service==="s3",h;if(this.service==="s3"&&this.request.signQuery)h="UNSIGNED-PAYLOAD";else if(this.isCodeCommitGit)h="";else h=E["X-Amz-Content-Sha256"]||E["x-amz-content-sha256"]||FA(this.request.body||"","hex");if(F){var U=Object.keys(F).reduce(function(A,Y){if(!Y)return A;return A[d7(Y)]=!Array.isArray(F[Y])?F[Y]:B?F[Y][0]:F[Y],A},{}),I=[];Object.keys(U).sort().forEach(function(A){if(!Array.isArray(U[A]))I.push(A+"="+d7(U[A]));else U[A].map(d7).sort().forEach(function(Y){I.push(A+"="+Y)})}),w=I.join("&")}if(D!=="/"){if($)D=D.replace(/\/{2,}/g,"/");if(D=D.split("/").reduce(function(A,Y){if($&&Y==="..")A.pop();else if(!$||Y!=="."){if(C)Y=decodeURIComponent(Y.replace(/\+/g," "));A.push(d7(Y))}return A},[]).join("/"),D[0]!=="/")D="/"+D;if(f)D=D.replace(/%2F/g,"/")}return[this.request.method||"GET",D,w,this.canonicalHeaders()+"\n",this.signedHeaders(),h].join("\n")};gD.prototype.filterHeaders=function(){var D=this.request.headers,F=this.extraHeadersToInclude,E=this.extraHeadersToIgnore;this.filteredHeaders=Object.keys(D).map(function(w){return[w.toLowerCase(),D[w]]}).filter(function(w){return F[w[0]]||x4D[w[0]]==null&&!E[w[0]]}).sort(function(w,$){return w[0]<$[0]?-1:1})};gD.prototype.canonicalHeaders=function(){if(!this.filteredHeaders)this.filterHeaders();return this.filteredHeaders.map(function(D){return D[0]+":"+D[1].toString().trim().replace(/\s+/g," ")}).join("\n")};gD.prototype.signedHeaders=function(){if(!this.filteredHeaders)this.filterHeaders();return this.filteredHeaders.map(function(D){return D[0]}).join(";")};gD.prototype.credentialString=function(){return[this.getDate(),this.region,this.service,"aws4_request"].join("/")};gD.prototype.defaultCredentials=function(){var D=process.env;return{accessKeyId:D.AWS_ACCESS_KEY_ID||D.AWS_ACCESS_KEY,secretAccessKey:D.AWS_SECRET_ACCESS_KEY||D.AWS_SECRET_KEY,sessionToken:D.AWS_SESSION_TOKEN}};gD.prototype.parsePath=function(){var D=this.request.path||"/";if(/[^0-9A-Za-z;,/?:@&=+$\-_.!~*'()#%]/.test(D))D=encodeURI(decodeURI(D));var F=D.indexOf("?"),E=null;if(F>=0)E=pc.parse(D.slice(F+1)),D=D.slice(0,F);this.parsedPath={path:D,query:E}};gD.prototype.formatPath=function(){var D=this.parsedPath.path,F=this.parsedPath.query;if(!F)return D;if(F[""]!=null)delete F[""];return D+"?"+oc(pc.stringify(F))};ic.RequestSigner=gD;ic.sign=function(D,F){return new gD(D,F).sign()}});import jDD from"process";z6();T6();K6();t8();l0();var YF=L(_D(),1);var Fz=(D)=>({...D,eventStreamMarshaller:D.eventStreamSerdeProvider(D)});x6();AD();z2();y();var OK=L(PD(),1);W2();function fo(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}var jK=async(D,F,E)=>{return{operation:m0(F).operation,region:await sD(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},PK=(D)=>{const F=[];switch(D.operation){default:F.push(fo(D))}return F},yK=(D)=>{return{...OK.resolveAwsSdkSigV4Config(D)}};var kK=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"bedrock"}},U$={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var bK={name:"@aws-sdk/client-bedrock-runtime",description:"AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-bedrock-runtime","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock-runtime"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/eventstream-serde-browser":"^3.0.10","@smithy/eventstream-serde-config-resolver":"^3.0.7","@smithy/eventstream-serde-node":"^3.0.9","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-stream":"^3.1.9","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock-runtime",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock-runtime"}};var SV=L(PD(),1);o6();l6();l0();var nR=L(Z9(),1),{__extends:eLD,__assign:DRD,__rest:FRD,__decorate:ERD,__param:wRD,__esDecorate:$RD,__runInitializers:fRD,__propKey:CRD,__setFunctionName:BRD,__metadata:hRD,__awaiter:lR,__generator:iR,__exportStar:URD,__createBinding:ARD,__values:pR,__read:IRD,__spread:MRD,__spreadArrays:GRD,__spreadArray:YRD,__await:ZRD,__asyncGenerator:WRD,__asyncDelegator:XRD,__asyncValues:JRD,__makeTemplateObject:zRD,__importStar:TRD,__importDefault:KRD,__classPrivateFieldGet:SRD,__classPrivateFieldSet:QRD,__classPrivateFieldIn:HRD,__addDisposableResource:LRD,__disposeResources:RRD}=nR.default;import{Buffer as aR}from"buffer";var oR=(D,F)=>{if(typeof D!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof D} (${D})`);return F?aR.from(D,F):aR.from(D)};var TB=(D)=>{const F=oR(D,"utf8");return new Uint8Array(F.buffer,F.byteOffset,F.byteLength/Uint8Array.BYTES_PER_ELEMENT)};function KB(D){if(D instanceof Uint8Array)return D;if(typeof D==="string")return pe(D);if(ArrayBuffer.isView(D))return new Uint8Array(D.buffer,D.byteOffset,D.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(D)}var pe=typeof Buffer!=="undefined"&&Buffer.from?function(D){return Buffer.from(D,"utf8")}:TB;function SB(D){if(typeof D==="string")return D.length===0;return D.byteLength===0}function QB(D){return new Uint8Array([(D&4278190080)>>24,(D&16711680)>>16,(D&65280)>>8,D&255])}function HB(D){if(!Uint32Array.from){var F=new Uint32Array(D.length),E=0;while(E<D.length)F[E]=D[E],E+=1;return F}return Uint32Array.from(D)}var ae=function(){function D(){this.crc32=new U6}return D.prototype.update=function(F){if(SB(F))return;this.crc32.update(KB(F))},D.prototype.digest=function(){return lR(this,void 0,void 0,function(){return iR(this,function(F){return[2,QB(this.crc32.digest())]})})},D.prototype.reset=function(){this.crc32=new U6},D}();var U6=function(){function D(){this.checksum=4294967295}return D.prototype.update=function(F){var E,w;try{for(var $=pR(F),C=$.next();!C.done;C=$.next()){var f=C.value;this.checksum=this.checksum>>>8^te[(this.checksum^f)&255]}}catch(B){E={error:B}}finally{try{if(C&&!C.done&&(w=$.return))w.call($)}finally{if(E)throw E.error}}return this},D.prototype.digest=function(){return(this.checksum^4294967295)>>>0},D}();var oe=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],te=HB(oe);var P8=L(L6(),1);var eR=L(L6(),1);function tR(D){for(let F=0;F<8;F++)D[F]^=255;for(let F=7;F>-1;F--)if(D[F]++,D[F]!==0)break}class GF{constructor(D){if(this.bytes=D,D.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(D){if(D>9223372036854776000||D<-9223372036854776000)throw new Error(`${D} is too large (or, if negative, too small) to represent as an Int64`);const F=new Uint8Array(8);for(let E=7,w=Math.abs(Math.round(D));E>-1&&w>0;E--,w/=256)F[E]=w;if(D<0)tR(F);return new GF(F)}valueOf(){const D=this.bytes.slice(0),F=D[0]&128;if(F)tR(D);return parseInt(eR.toHex(D),16)*(F?-1:1)}toString(){return String(this.valueOf())}}class LB{constructor(D,F){this.toUtf8=D,this.fromUtf8=F}format(D){const F=[];for(let $ of Object.keys(D)){const C=this.fromUtf8($);F.push(Uint8Array.from([C.byteLength]),C,this.formatHeaderValue(D[$]))}const E=new Uint8Array(F.reduce(($,C)=>$+C.byteLength,0));let w=0;for(let $ of F)E.set($,w),w+=$.byteLength;return E}formatHeaderValue(D){switch(D.type){case"boolean":return Uint8Array.from([D.value?0:1]);case"byte":return Uint8Array.from([2,D.value]);case"short":const F=new DataView(new ArrayBuffer(3));return F.setUint8(0,3),F.setInt16(1,D.value,!1),new Uint8Array(F.buffer);case"integer":const E=new DataView(new ArrayBuffer(5));return E.setUint8(0,4),E.setInt32(1,D.value,!1),new Uint8Array(E.buffer);case"long":const w=new Uint8Array(9);return w[0]=5,w.set(D.value.bytes,1),w;case"binary":const $=new DataView(new ArrayBuffer(3+D.value.byteLength));$.setUint8(0,6),$.setUint16(1,D.value.byteLength,!1);const C=new Uint8Array($.buffer);return C.set(D.value,3),C;case"string":const f=this.fromUtf8(D.value),B=new DataView(new ArrayBuffer(3+f.byteLength));B.setUint8(0,7),B.setUint16(1,f.byteLength,!1);const h=new Uint8Array(B.buffer);return h.set(f,3),h;case"timestamp":const U=new Uint8Array(9);return U[0]=8,U.set(GF.fromNumber(D.value.valueOf()).bytes,1),U;case"uuid":if(!BDD.test(D.value))throw new Error(`Invalid UUID received: ${D.value}`);const I=new Uint8Array(17);return I[0]=9,I.set(P8.fromHex(D.value.replace(/\-/g,"")),1),I}}parse(D){const F={};let E=0;while(E<D.byteLength){const w=D.getUint8(E++),$=this.toUtf8(new Uint8Array(D.buffer,D.byteOffset+E,w));switch(E+=w,D.getUint8(E++)){case 0:F[$]={type:FV,value:!0};break;case 1:F[$]={type:FV,value:!1};break;case 2:F[$]={type:ee,value:D.getInt8(E++)};break;case 3:F[$]={type:DDD,value:D.getInt16(E,!1)},E+=2;break;case 4:F[$]={type:FDD,value:D.getInt32(E,!1)},E+=4;break;case 5:F[$]={type:EDD,value:new GF(new Uint8Array(D.buffer,D.byteOffset+E,8))},E+=8;break;case 6:const C=D.getUint16(E,!1);E+=2,F[$]={type:wDD,value:new Uint8Array(D.buffer,D.byteOffset+E,C)},E+=C;break;case 7:const f=D.getUint16(E,!1);E+=2,F[$]={type:$DD,value:this.toUtf8(new Uint8Array(D.buffer,D.byteOffset+E,f))},E+=f;break;case 8:F[$]={type:fDD,value:new Date(new GF(new Uint8Array(D.buffer,D.byteOffset+E,8)).valueOf())},E+=8;break;case 9:const B=new Uint8Array(D.buffer,D.byteOffset+E,16);E+=16,F[$]={type:CDD,value:`${P8.toHex(B.subarray(0,4))}-${P8.toHex(B.subarray(4,6))}-${P8.toHex(B.subarray(6,8))}-${P8.toHex(B.subarray(8,10))}-${P8.toHex(B.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return F}}var DV;(function(D){D[D.boolTrue=0]="boolTrue",D[D.boolFalse=1]="boolFalse",D[D.byte=2]="byte",D[D.short=3]="short",D[D.integer=4]="integer",D[D.long=5]="long",D[D.byteArray=6]="byteArray",D[D.string=7]="string",D[D.timestamp=8]="timestamp",D[D.uuid=9]="uuid"})(DV||(DV={}));var FV="boolean",ee="byte",DDD="short",FDD="integer",EDD="long",wDD="binary",$DD="string",fDD="timestamp",CDD="uuid",BDD=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;function wV({byteLength:D,byteOffset:F,buffer:E}){if(D<hDD)throw new Error("Provided message too short to accommodate event stream message overhead");const w=new DataView(E,F,D),$=w.getUint32(0,!1);if(D!==$)throw new Error("Reported message length does not match received message length");const C=w.getUint32(EV,!1),f=w.getUint32(y8,!1),B=w.getUint32(D-A6,!1),h=new U6().update(new Uint8Array(E,F,y8));if(f!==h.digest())throw new Error(`The prelude checksum specified in the message (${f}) does not match the calculated CRC32 checksum (${h.digest()})`);if(h.update(new Uint8Array(E,F+y8,D-(y8+A6))),B!==h.digest())throw new Error(`The message checksum (${h.digest()}) did not match the expected value of ${B}`);return{headers:new DataView(E,F+y8+A6,C),body:new Uint8Array(E,F+y8+A6+C,$-C-(y8+A6+A6))}}var EV=4,y8=EV*2,A6=4,hDD=y8+A6*2;class RB{constructor(D,F){this.headerMarshaller=new LB(D,F),this.messageBuffer=[],this.isEndOfStream=!1}feed(D){this.messageBuffer.push(this.decode(D))}endOfStream(){this.isEndOfStream=!0}getMessage(){const D=this.messageBuffer.pop(),F=this.isEndOfStream;return{getMessage(){return D},isEndOfStream(){return F}}}getAvailableMessages(){const D=this.messageBuffer;this.messageBuffer=[];const F=this.isEndOfStream;return{getMessages(){return D},isEndOfStream(){return F}}}encode({headers:D,body:F}){const E=this.headerMarshaller.format(D),w=E.byteLength+F.byteLength+16,$=new Uint8Array(w),C=new DataView($.buffer,$.byteOffset,$.byteLength),f=new U6;return C.setUint32(0,w,!1),C.setUint32(4,E.byteLength,!1),C.setUint32(8,f.update($.subarray(0,8)).digest(),!1),$.set(E,12),$.set(F,E.byteLength+12),C.setUint32(w-4,f.update($.subarray(8,w-4)).digest(),!1),$}decode(D){const{headers:F,body:E}=wV(D);return{headers:this.headerMarshaller.parse(F),body:E}}formatHeaders(D){return this.headerMarshaller.format(D)}}class VB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.inputStream)yield this.options.decoder.decode(D)}}class NB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.messageStream)yield this.options.encoder.encode(D);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class qB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.messageStream){const F=await this.options.deserializer(D);if(F===void 0)continue;yield F}}}class OB{constructor(D){this.options=D}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let D of this.options.inputStream)yield this.options.serializer(D)}}function $V(D){let F=0,E=0,w=null,$=null;const C=(B)=>{if(typeof B!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+B);F=B,E=4,w=new Uint8Array(B),new DataView(w.buffer).setUint32(0,B,!1)},f=async function*(){const B=D[Symbol.asyncIterator]();while(!0){const{value:h,done:U}=await B.next();if(U){if(!F)return;else if(F===E)yield w;else throw new Error("Truncated event message received.");return}const I=h.length;let A=0;while(A<I){if(!w){const M=I-A;if(!$)$=new Uint8Array(4);const Z=Math.min(4-E,M);if($.set(h.slice(A,A+Z),E),E+=Z,A+=Z,E<4)break;C(new DataView($.buffer).getUint32(0,!1)),$=null}const Y=Math.min(F-E,I-A);if(w.set(h.slice(A,A+Y),E),E+=Y,A+=Y,F&&F===E)yield w,w=null,F=0,E=0}}};return{[Symbol.asyncIterator]:f}}function fV(D,F){return async function(E){const{value:w}=E.headers[":message-type"];if(w==="error"){const $=new Error(E.headers[":error-message"].value||"UnknownError");throw $.name=E.headers[":error-code"].value,$}else if(w==="exception"){const $=E.headers[":exception-type"].value,C={[$]:E},f=await D(C);if(f.$unknown){const B=new Error(F(E.body));throw B.name=$,B}throw f[$]}else if(w==="event"){const $={[E.headers[":event-type"].value]:E},C=await D($);if(C.$unknown)return;return C}else throw Error(`Unrecognizable event type: ${E.headers[":event-type"].value}`)}}class t${constructor({utf8Encoder:D,utf8Decoder:F}){this.eventStreamCodec=new RB(D,F),this.utfEncoder=D}deserialize(D,F){const E=$V(D);return new qB({messageStream:new VB({inputStream:E,decoder:this.eventStreamCodec}),deserializer:fV(F,this.utfEncoder)})}serialize(D,F){return new NB({messageStream:new OB({inputStream:D,serializer:F}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as UDD}from"stream";async function*CV(D){let F=!1,E=!1;const w=new Array;D.on("error",($)=>{if(!F)F=!0;if($)throw $}),D.on("data",($)=>{w.push($)}),D.on("end",()=>{F=!0});while(!E){const $=await new Promise((C)=>setTimeout(()=>C(w.shift()),0));if($)yield $;E=F&&w.length===0}}class jB{constructor({utf8Encoder:D,utf8Decoder:F}){this.universalMarshaller=new t$({utf8Decoder:F,utf8Encoder:D})}deserialize(D,F){const E=typeof D[Symbol.asyncIterator]==="function"?D:CV(D);return this.universalMarshaller.deserialize(E,F)}serialize(D,F){return UDD.from(this.universalMarshaller.serialize(D,F))}}var BV=(D)=>new jB(D);i6();z2();m2();Z8();p6();j0();var TV=L(PD(),1);y();G8();O1();o2();p8();Y2();var hV={["required"]:!1,type:"String"},UV={["required"]:!0,default:!1,type:"Boolean"},AV={["ref"]:"Endpoint"},WV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},XV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},I1={},IV={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},MV={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},GV=[WV],YV=[XV],ZV=[{["ref"]:"Region"}],ADD={version:"1.0",parameters:{Region:hV,UseDualStack:UV,UseFIPS:UV,Endpoint:hV},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[AV]}],rules:[{conditions:GV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{rules:[{conditions:YV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:AV,properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{rules:[{conditions:[{["fn"]:"isSet",["argv"]:ZV}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ZV,assign:"PartitionResult"}],rules:[{conditions:[WV,XV],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,IV]},MV],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:GV,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[IV,!0]}],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:YV,rules:[{conditions:[MV],rules:[{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{rules:[{endpoint:{url:"https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",properties:I1,headers:I1},type:"endpoint"}],type:"tree"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}],type:"tree"}]},JV=ADD;var IDD=new M2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),zV=(D,F={})=>{return IDD.get(D,()=>G2(JV,{endpointParams:D,logger:F.logger}))};C0.aws=Z2;var KV=(D)=>{return{apiVersion:"2023-09-30",base64Decoder:D?.base64Decoder??T0,base64Encoder:D?.base64Encoder??S0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??zV,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??PK,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new TV.AwsSdkSigV4Signer}],logger:D?.logger??new y0,serviceId:D?.serviceId??"Bedrock Runtime",urlParser:D?.urlParser??D0,utf8Decoder:D?.utf8Decoder??F0,utf8Encoder:D?.utf8Encoder??K0}};y();a6();y();var QV=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=KV(D);return SV.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??K2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:bK.version}),eventStreamSerdeProvider:D?.eventStreamSerdeProvider??BV,maxAttempts:D?.maxAttempts??i(i2),region:D?.region??i(n0,u2),requestHandler:U0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...a2,default:async()=>(await E()).retryMode||t0}),sha256:D?.sha256??T2.bind(null,"sha256"),streamCollector:D?.streamCollector??e0,useDualstackEndpoint:D?.useDualstackEndpoint??i(_2),useFipsEndpoint:D?.useFipsEndpoint??i(s2),userAgentAppId:D?.userAgentAppId??i(f1)}};t6();vD();y();var HV=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},LV=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var e$=(D)=>D,RV=(D,F)=>{const E={...e$(h1(D)),...e$(F1(D)),...e$(j2(D)),...e$(HV(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...P2(E),...LV(E)}};class PB extends P0{constructor(...[D]){const F=QV(D||{}),E=kK(F),w=g2(E),$=p2(w),C=d2($),f=y2(C),B=n2(f),h=Fz(B),U=yK(h),I=RV(U,D?.extensions||[]);super(I);this.config=I,this.middlewareStack.use(r2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(v2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(x2(this.config)),this.middlewareStack.use(YF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:jK,identityProviderConfigProvider:async(A)=>new YF.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(YF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}var b0=L(PD(),1),_B=L(_D(),1);y();y();class f0 extends D2{constructor(D){super(D);Object.setPrototypeOf(this,f0.prototype)}}y();class D4 extends f0{constructor(D){super({name:"AccessDeniedException",$fault:"client",...D});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,D4.prototype)}}var VV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);return E._(F.$unknown[0],F.$unknown[1])}})(VV||(VV={}));class F4 extends f0{constructor(D){super({name:"InternalServerException",$fault:"server",...D});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,F4.prototype)}}class E4 extends f0{constructor(D){super({name:"ResourceNotFoundException",$fault:"client",...D});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,E4.prototype)}}class w4 extends f0{constructor(D){super({name:"ServiceQuotaExceededException",$fault:"client",...D});this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,w4.prototype)}}class $4 extends f0{constructor(D){super({name:"ThrottlingException",$fault:"client",...D});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,$4.prototype)}}class f4 extends f0{constructor(D){super({name:"ValidationException",$fault:"client",...D});this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,f4.prototype)}}var yB;(function(D){D.visit=(F,E)=>{if(F.bytes!==void 0)return E.bytes(F.bytes);return E._(F.$unknown[0],F.$unknown[1])}})(yB||(yB={}));var NV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);return E._(F.$unknown[0],F.$unknown[1])}})(NV||(NV={}));var kB;(function(D){D.visit=(F,E)=>{if(F.bytes!==void 0)return E.bytes(F.bytes);return E._(F.$unknown[0],F.$unknown[1])}})(kB||(kB={}));var bB;(function(D){D.visit=(F,E)=>{if(F.json!==void 0)return E.json(F.json);if(F.text!==void 0)return E.text(F.text);if(F.image!==void 0)return E.image(F.image);if(F.document!==void 0)return E.document(F.document);return E._(F.$unknown[0],F.$unknown[1])}})(bB||(bB={}));var xB;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);if(F.image!==void 0)return E.image(F.image);if(F.document!==void 0)return E.document(F.document);if(F.toolUse!==void 0)return E.toolUse(F.toolUse);if(F.toolResult!==void 0)return E.toolResult(F.toolResult);if(F.guardContent!==void 0)return E.guardContent(F.guardContent);return E._(F.$unknown[0],F.$unknown[1])}})(xB||(xB={}));var qV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);if(F.guardContent!==void 0)return E.guardContent(F.guardContent);return E._(F.$unknown[0],F.$unknown[1])}})(qV||(qV={}));var OV;(function(D){D.visit=(F,E)=>{if(F.auto!==void 0)return E.auto(F.auto);if(F.any!==void 0)return E.any(F.any);if(F.tool!==void 0)return E.tool(F.tool);return E._(F.$unknown[0],F.$unknown[1])}})(OV||(OV={}));var cB;(function(D){D.visit=(F,E)=>{if(F.json!==void 0)return E.json(F.json);return E._(F.$unknown[0],F.$unknown[1])}})(cB||(cB={}));var gB;(function(D){D.visit=(F,E)=>{if(F.toolSpec!==void 0)return E.toolSpec(F.toolSpec);return E._(F.$unknown[0],F.$unknown[1])}})(gB||(gB={}));var jV;(function(D){D.visit=(F,E)=>{if(F.message!==void 0)return E.message(F.message);return E._(F.$unknown[0],F.$unknown[1])}})(jV||(jV={}));class C4 extends f0{constructor(D){super({name:"ModelErrorException",$fault:"client",...D});this.name="ModelErrorException",this.$fault="client",Object.setPrototypeOf(this,C4.prototype),this.originalStatusCode=D.originalStatusCode,this.resourceName=D.resourceName}}class B4 extends f0{constructor(D){super({name:"ModelNotReadyException",$fault:"client",...D});this.name="ModelNotReadyException",this.$fault="client",this.$retryable={},Object.setPrototypeOf(this,B4.prototype)}}class h4 extends f0{constructor(D){super({name:"ModelTimeoutException",$fault:"client",...D});this.name="ModelTimeoutException",this.$fault="client",Object.setPrototypeOf(this,h4.prototype)}}class U4 extends f0{constructor(D){super({name:"ServiceUnavailableException",$fault:"server",...D});this.name="ServiceUnavailableException",this.$fault="server",Object.setPrototypeOf(this,U4.prototype)}}var PV;(function(D){D.visit=(F,E)=>{if(F.text!==void 0)return E.text(F.text);if(F.toolUse!==void 0)return E.toolUse(F.toolUse);return E._(F.$unknown[0],F.$unknown[1])}})(PV||(PV={}));var yV;(function(D){D.visit=(F,E)=>{if(F.toolUse!==void 0)return E.toolUse(F.toolUse);return E._(F.$unknown[0],F.$unknown[1])}})(yV||(yV={}));class A4 extends f0{constructor(D){super({name:"ModelStreamErrorException",$fault:"client",...D});this.name="ModelStreamErrorException",this.$fault="client",Object.setPrototypeOf(this,A4.prototype),this.originalStatusCode=D.originalStatusCode,this.originalMessage=D.originalMessage}}var kV;(function(D){D.visit=(F,E)=>{if(F.messageStart!==void 0)return E.messageStart(F.messageStart);if(F.contentBlockStart!==void 0)return E.contentBlockStart(F.contentBlockStart);if(F.contentBlockDelta!==void 0)return E.contentBlockDelta(F.contentBlockDelta);if(F.contentBlockStop!==void 0)return E.contentBlockStop(F.contentBlockStop);if(F.messageStop!==void 0)return E.messageStop(F.messageStop);if(F.metadata!==void 0)return E.metadata(F.metadata);if(F.internalServerException!==void 0)return E.internalServerException(F.internalServerException);if(F.modelStreamErrorException!==void 0)return E.modelStreamErrorException(F.modelStreamErrorException);if(F.validationException!==void 0)return E.validationException(F.validationException);if(F.throttlingException!==void 0)return E.throttlingException(F.throttlingException);if(F.serviceUnavailableException!==void 0)return E.serviceUnavailableException(F.serviceUnavailableException);return E._(F.$unknown[0],F.$unknown[1])}})(kV||(kV={}));var bV;(function(D){D.visit=(F,E)=>{if(F.chunk!==void 0)return E.chunk(F.chunk);if(F.internalServerException!==void 0)return E.internalServerException(F.internalServerException);if(F.modelStreamErrorException!==void 0)return E.modelStreamErrorException(F.modelStreamErrorException);if(F.validationException!==void 0)return E.validationException(F.validationException);if(F.throttlingException!==void 0)return E.throttlingException(F.throttlingException);if(F.modelTimeoutException!==void 0)return E.modelTimeoutException(F.modelTimeoutException);if(F.serviceUnavailableException!==void 0)return E.serviceUnavailableException(F.serviceUnavailableException);return E._(F.$unknown[0],F.$unknown[1])}})(bV||(bV={}));var xV=(D)=>({...D,...D.body&&{body:wD}}),cV=(D)=>({...D,...D.body&&{body:wD}}),gV=(D)=>({...D,...D.body&&{body:wD}});var rV=(D)=>({...D,...D.body&&{body:"STREAMING_CONTENT"}});var _V=async(D,F)=>{const E=_B.requestBuilder(D,F),w=k({},W8,{[sB]:D[I4]||"application/octet-stream",[rB]:D[rB],[EN]:D[eV],[DN]:D[oV],[FN]:D[tV]});E.bp("/model/{modelId}/invoke"),E.p("modelId",()=>D.modelId,"{modelId}",!1);let $;if(D.body!==void 0)$=D.body;return E.m("POST").h(w).b($),E.build()},sV=async(D,F)=>{const E=_B.requestBuilder(D,F),w=k({},W8,{[sB]:D[I4]||"application/octet-stream",[qDD]:D[rB],[EN]:D[eV],[DN]:D[oV],[FN]:D[tV]});E.bp("/model/{modelId}/invoke-with-response-stream"),E.p("modelId",()=>D.modelId,"{modelId}",!1);let $;if(D.body!==void 0)$=D.body;return E.m("POST").h(w).b($),E.build()};var uV=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return vV(D,F);const E=k({$metadata:x0(D),[I4]:[,D.headers[sB]]}),w=await $6(D.body,F);return E.body=w,E},dV=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return vV(D,F);const E=k({$metadata:x0(D),[I4]:[,D.headers[ODD]]}),w=D.body;return E.body=TDD(w,F),E},vV=async(D,F)=>{const E={...D,body:await b0.parseJsonErrorBody(D.body,F)},w=b0.loadRestJsonErrorCode(D,E.body);switch(w){case"AccessDeniedException":case"com.amazonaws.bedrockruntime#AccessDeniedException":throw await ZDD(E,F);case"InternalServerException":case"com.amazonaws.bedrockruntime#InternalServerException":throw await mV(E,F);case"ResourceNotFoundException":case"com.amazonaws.bedrockruntime#ResourceNotFoundException":throw await JDD(E,F);case"ServiceQuotaExceededException":case"com.amazonaws.bedrockruntime#ServiceQuotaExceededException":throw await zDD(E,F);case"ThrottlingException":case"com.amazonaws.bedrockruntime#ThrottlingException":throw await pV(E,F);case"ValidationException":case"com.amazonaws.bedrockruntime#ValidationException":throw await aV(E,F);case"ModelErrorException":case"com.amazonaws.bedrockruntime#ModelErrorException":throw await WDD(E,F);case"ModelNotReadyException":case"com.amazonaws.bedrockruntime#ModelNotReadyException":throw await XDD(E,F);case"ModelTimeoutException":case"com.amazonaws.bedrockruntime#ModelTimeoutException":throw await lV(E,F);case"ServiceUnavailableException":case"com.amazonaws.bedrockruntime#ServiceUnavailableException":throw await iV(E,F);case"ModelStreamErrorException":case"com.amazonaws.bedrockruntime#ModelStreamErrorException":throw await nV(E,F);default:const $=E.body;return YDD({output:D,parsedBody:$,errorCode:w})}},YDD=t2(f0),ZDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new D4({$metadata:x0(D),...E});return u(C,D.body)},mV=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new F4({$metadata:x0(D),...E});return u(C,D.body)},WDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S,originalStatusCode:J2,resourceName:S});Object.assign(E,$);const C=new C4({$metadata:x0(D),...E});return u(C,D.body)},XDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new B4({$metadata:x0(D),...E});return u(C,D.body)},nV=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S,originalMessage:S,originalStatusCode:J2});Object.assign(E,$);const C=new A4({$metadata:x0(D),...E});return u(C,D.body)},lV=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new h4({$metadata:x0(D),...E});return u(C,D.body)},JDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new E4({$metadata:x0(D),...E});return u(C,D.body)},zDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new w4({$metadata:x0(D),...E});return u(C,D.body)},iV=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new U4({$metadata:x0(D),...E});return u(C,D.body)},pV=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new $4({$metadata:x0(D),...E});return u(C,D.body)},aV=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new f4({$metadata:x0(D),...E});return u(C,D.body)};var TDD=(D,F)=>{return F.eventStreamMarshaller.deserialize(D,async(E)=>{if(E.chunk!=null)return{chunk:await HDD(E.chunk,F)};if(E.internalServerException!=null)return{internalServerException:await KDD(E.internalServerException,F)};if(E.modelStreamErrorException!=null)return{modelStreamErrorException:await SDD(E.modelStreamErrorException,F)};if(E.validationException!=null)return{validationException:await VDD(E.validationException,F)};if(E.throttlingException!=null)return{throttlingException:await RDD(E.throttlingException,F)};if(E.modelTimeoutException!=null)return{modelTimeoutException:await QDD(E.modelTimeoutException,F)};if(E.serviceUnavailableException!=null)return{serviceUnavailableException:await LDD(E.serviceUnavailableException,F)};return{$unknown:D}})};var KDD=async(D,F)=>{const E={...D,body:await b0.parseJsonBody(D.body,F)};return mV(E,F)};var SDD=async(D,F)=>{const E={...D,body:await b0.parseJsonBody(D.body,F)};return nV(E,F)},QDD=async(D,F)=>{const E={...D,body:await b0.parseJsonBody(D.body,F)};return lV(E,F)},HDD=async(D,F)=>{const E={},w=await b0.parseJsonBody(D.body,F);return Object.assign(E,NDD(w,F)),E},LDD=async(D,F)=>{const E={...D,body:await b0.parseJsonBody(D.body,F)};return iV(E,F)},RDD=async(D,F)=>{const E={...D,body:await b0.parseJsonBody(D.body,F)};return pV(E,F)},VDD=async(D,F)=>{const E={...D,body:await b0.parseJsonBody(D.body,F)};return aV(E,F)};var NDD=(D,F)=>{return c(D,{bytes:F.base64Decoder})};var x0=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]});var rB="accept",I4="contentType",sB="content-type",oV="guardrailIdentifier",tV="guardrailVersion",eV="trace",qDD="x-amzn-bedrock-accept",ODD="x-amzn-bedrock-content-type",DN="x-amzn-bedrock-guardrailidentifier",FN="x-amzn-bedrock-guardrailversion",EN="x-amzn-bedrock-trace";AD();LD();y();class ZF extends l.classBuilder().ep(U$).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModel",{}).n("BedrockRuntimeClient","InvokeModelCommand").f(xV,cV).ser(_V).de(uV).build(){}AD();LD();y();class uB extends l.classBuilder().ep(U$).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockFrontendService","InvokeModelWithResponseStream",{eventStream:{output:!0}}).n("BedrockRuntimeClient","InvokeModelWithResponseStreamCommand").f(gV,rV).ser(sV).de(dV).build(){}async function XqD(D){WF.debug(D);const F=new ZF(D),E=await o3.send(F);return WF.debug("Successfully invoke model"),WF.debug(E),E}async function JqD(D){WF.debug(D);const F=new uB(D),E=await o3.send(F);return WF.debug("Successfully invoke model with response stream"),WF.debug(E),E}var o3=new PB({region:jDD.env.REGION||"us-east-1"}),WF=console;async function KqD(D,F={}){const{maxTokenCount:E=512,temperature:w=0,topP:$=0.9}=F,C=new ZF({modelId:"amazon.titan-text-express-v1",contentType:"application/json",accept:"*/*",body:JSON.stringify({inputText:`Summarize the following text: ${D}`,textGenerationConfig:{maxTokenCount:E,stopSequences:[],temperature:w,topP:$}})});try{const f=await o3.send(C);return JSON.parse(new TextDecoder().decode(f.body)).results[0].outputText}catch(f){throw console.error("Error summarizing text:",f),f}}async function SqD(D,F={}){const{maxTokenCount:E=512,temperature:w=0,topP:$=0.9}=F,C=new ZF({modelId:"amazon.titan-text-express-v1",contentType:"application/json",accept:"*/*",body:JSON.stringify({inputText:D,textGenerationConfig:{maxTokenCount:E,stopSequences:[],temperature:w,topP:$}})});try{const f=await o3.send(C);return JSON.parse(new TextDecoder().decode(f.body)).results[0].outputText}catch(f){throw console.error("Error asking question:",f),f}}import iDD from"process";z6();T6();K6();t8();l0();var JF=L(_D(),1);x6();AD();z2();y();var wN=L(PD(),1);W2();function PDD(D){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"bedrock",region:D.region},propertiesExtractor:(F,E)=>({signingProperties:{config:F,context:E}})}}var $N=async(D,F,E)=>{return{operation:m0(F).operation,region:await sD(D.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},fN=(D)=>{const F=[];switch(D.operation){default:F.push(PDD(D))}return F},CN=(D)=>{return{...wN.resolveAwsSdkSigV4Config(D)}};var BN=(D)=>{return{...D,useDualstackEndpoint:D.useDualstackEndpoint??!1,useFipsEndpoint:D.useFipsEndpoint??!1,defaultSigningName:"bedrock"}},XF={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var hN={name:"@aws-sdk/client-bedrock",description:"AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-bedrock","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo bedrock"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2",uuid:"^9.0.1"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96","@types/uuid":"^9.0.4",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-bedrock",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-bedrock"}};var QN=L(PD(),1);o6();l6();l0();i6();z2();m2();Z8();p6();j0();var KN=L(PD(),1);y();G8();O1();o2();p8();Y2();var UN={["required"]:!1,type:"String"},AN={["required"]:!0,default:!1,type:"Boolean"},IN={["ref"]:"Endpoint"},XN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},JN={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},M1={},MN={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},GN={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},YN=[XN],ZN=[JN],WN=[{["ref"]:"Region"}],kDD={version:"1.0",parameters:{Region:UN,UseDualStack:AN,UseFIPS:AN,Endpoint:UN},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[IN]}],rules:[{conditions:YN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{rules:[{conditions:ZN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:IN,properties:M1,headers:M1},type:"endpoint"}],type:"tree"}],type:"tree"},{rules:[{conditions:[{["fn"]:"isSet",["argv"]:WN}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:WN,assign:"PartitionResult"}],rules:[{conditions:[XN,JN],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,MN]},GN],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:M1,headers:M1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:YN,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[MN,!0]}],rules:[{rules:[{endpoint:{url:"https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}",properties:M1,headers:M1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:ZN,rules:[{conditions:[GN],rules:[{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:M1,headers:M1},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{rules:[{endpoint:{url:"https://bedrock.{Region}.{PartitionResult#dnsSuffix}",properties:M1,headers:M1},type:"endpoint"}],type:"tree"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}],type:"tree"}]},zN=kDD;var bDD=new M2({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),TN=(D,F={})=>{return bDD.get(D,()=>G2(zN,{endpointParams:D,logger:F.logger}))};C0.aws=Z2;var SN=(D)=>{return{apiVersion:"2023-04-20",base64Decoder:D?.base64Decoder??T0,base64Encoder:D?.base64Encoder??S0,disableHostPrefix:D?.disableHostPrefix??!1,endpointProvider:D?.endpointProvider??TN,extensions:D?.extensions??[],httpAuthSchemeProvider:D?.httpAuthSchemeProvider??fN,httpAuthSchemes:D?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(F)=>F.getIdentityProvider("aws.auth#sigv4"),signer:new KN.AwsSdkSigV4Signer}],logger:D?.logger??new y0,serviceId:D?.serviceId??"Bedrock",urlParser:D?.urlParser??D0,utf8Decoder:D?.utf8Decoder??F0,utf8Encoder:D?.utf8Encoder??K0}};y();a6();y();var HN=(D)=>{D1(process.version);const F=B1(D),E=()=>F().then(e2),w=SN(D);return QN.emitWarningIfUnsupportedVersion(process.version),{...w,...D,runtime:"node",defaultsMode:F,bodyLengthChecker:D?.bodyLengthChecker??C1,credentialDefaultProvider:D?.credentialDefaultProvider??K2,defaultUserAgentProvider:D?.defaultUserAgentProvider??$1({serviceId:w.serviceId,clientVersion:hN.version}),maxAttempts:D?.maxAttempts??i(i2),region:D?.region??i(n0,u2),requestHandler:U0.create(D?.requestHandler??E),retryMode:D?.retryMode??i({...a2,default:async()=>(await E()).retryMode||t0}),sha256:D?.sha256??T2.bind(null,"sha256"),streamCollector:D?.streamCollector??e0,useDualstackEndpoint:D?.useDualstackEndpoint??i(_2),useFipsEndpoint:D?.useFipsEndpoint??i(s2),userAgentAppId:D?.userAgentAppId??i(f1)}};t6();vD();y();var LN=(D)=>{const F=D.httpAuthSchemes;let{httpAuthSchemeProvider:E,credentials:w}=D;return{setHttpAuthScheme($){const C=F.findIndex((f)=>f.schemeId===$.schemeId);if(C===-1)F.push($);else F.splice(C,1,$)},httpAuthSchemes(){return F},setHttpAuthSchemeProvider($){E=$},httpAuthSchemeProvider(){return E},setCredentials($){w=$},credentials(){return w}}},RN=(D)=>{return{httpAuthSchemes:D.httpAuthSchemes(),httpAuthSchemeProvider:D.httpAuthSchemeProvider(),credentials:D.credentials()}};var M4=(D)=>D,VN=(D,F)=>{const E={...M4(h1(D)),...M4(F1(D)),...M4(j2(D)),...M4(LN(D))};return F.forEach((w)=>w.configure(E)),{...D,...U1(E),...E1(E),...P2(E),...RN(E)}};class dB extends P0{constructor(...[D]){const F=HN(D||{}),E=BN(F),w=g2(E),$=p2(w),C=d2($),f=y2(C),B=n2(f),h=CN(B),U=VN(h,D?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(r2(this.config)),this.middlewareStack.use(w1(this.config)),this.middlewareStack.use(v2(this.config)),this.middlewareStack.use(k2(this.config)),this.middlewareStack.use(b2(this.config)),this.middlewareStack.use(x2(this.config)),this.middlewareStack.use(JF.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:$N,identityProviderConfigProvider:async(I)=>new JF.DefaultIdentityProviderConfig({"aws.auth#sigv4":I.credentials})})),this.middlewareStack.use(JF.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}y();y();class c0 extends D2{constructor(D){super(D);Object.setPrototypeOf(this,c0.prototype)}}class G4 extends c0{constructor(D){super({name:"AccessDeniedException",$fault:"client",...D});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,G4.prototype)}}class Y4 extends c0{constructor(D){super({name:"ConflictException",$fault:"client",...D});this.name="ConflictException",this.$fault="client",Object.setPrototypeOf(this,Y4.prototype)}}class Z4 extends c0{constructor(D){super({name:"InternalServerException",$fault:"server",...D});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,Z4.prototype)}}class W4 extends c0{constructor(D){super({name:"ResourceNotFoundException",$fault:"client",...D});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,W4.prototype)}}class X4 extends c0{constructor(D){super({name:"ThrottlingException",$fault:"client",...D});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,X4.prototype)}}class J4 extends c0{constructor(D){super({name:"ValidationException",$fault:"client",...D});this.name="ValidationException",this.$fault="client",Object.setPrototypeOf(this,J4.prototype)}}var NN;(function(D){D.visit=(F,E)=>{if(F.s3Uri!==void 0)return E.s3Uri(F.s3Uri);return E._(F.$unknown[0],F.$unknown[1])}})(NN||(NN={}));var qN;(function(D){D.visit=(F,E)=>{if(F.automated!==void 0)return E.automated(F.automated);if(F.human!==void 0)return E.human(F.human);return E._(F.$unknown[0],F.$unknown[1])}})(qN||(qN={}));var ON;(function(D){D.visit=(F,E)=>{if(F.bedrockModel!==void 0)return E.bedrockModel(F.bedrockModel);return E._(F.$unknown[0],F.$unknown[1])}})(ON||(ON={}));var jN;(function(D){D.visit=(F,E)=>{if(F.models!==void 0)return E.models(F.models);return E._(F.$unknown[0],F.$unknown[1])}})(jN||(jN={}));class z4 extends c0{constructor(D){super({name:"ServiceQuotaExceededException",$fault:"client",...D});this.name="ServiceQuotaExceededException",this.$fault="client",Object.setPrototypeOf(this,z4.prototype)}}class T4 extends c0{constructor(D){super({name:"TooManyTagsException",$fault:"client",...D});this.name="TooManyTagsException",this.$fault="client",Object.setPrototypeOf(this,T4.prototype),this.resourceName=D.resourceName}}var PN;(function(D){D.visit=(F,E)=>{if(F.s3DataSource!==void 0)return E.s3DataSource(F.s3DataSource);return E._(F.$unknown[0],F.$unknown[1])}})(PN||(PN={}));var yN;(function(D){D.visit=(F,E)=>{if(F.s3InputDataConfig!==void 0)return E.s3InputDataConfig(F.s3InputDataConfig);return E._(F.$unknown[0],F.$unknown[1])}})(yN||(yN={}));var kN;(function(D){D.visit=(F,E)=>{if(F.s3OutputDataConfig!==void 0)return E.s3OutputDataConfig(F.s3OutputDataConfig);return E._(F.$unknown[0],F.$unknown[1])}})(kN||(kN={}));var _1=L(PD(),1),K4=L(_D(),1);y();F5();var rN=async(D,F)=>{const E=K4.requestBuilder(D,F),w={"content-type":"application/json"};E.bp("/model-customization-jobs");let $;return $=JSON.stringify(c(D,{baseModelIdentifier:[],clientRequestToken:[!0,(C)=>C??w$()],customModelKmsKeyId:[],customModelName:[],customModelTags:(C)=>BD(C),customizationType:[],hyperParameters:(C)=>BD(C),jobName:[],jobTags:(C)=>BD(C),outputDataConfig:(C)=>BD(C),roleArn:[],trainingDataConfig:(C)=>BD(C),validationDataConfig:(C)=>BD(C),vpcConfig:(C)=>BD(C)})),E.m("POST").h(w).b($),E.build()};var _N=async(D,F)=>{const E=K4.requestBuilder(D,F),w={};E.bp("/model-customization-jobs/{jobIdentifier}"),E.p("jobIdentifier",()=>D.jobIdentifier,"{jobIdentifier}",!1);let $;return E.m("GET").h(w).b($),E.build()};var sN=async(D,F)=>{const E=K4.requestBuilder(D,F),w={};E.bp("/foundation-models");const $=k({[gN]:[,D[gN]],[bN]:[,D[bN]],[cN]:[,D[cN]],[xN]:[,D[xN]]});let C;return E.m("GET").h(w).q($).b(C),E.build()};var uN=async(D,F)=>{if(D.statusCode!==201&&D.statusCode>=300)return vB(D,F);const E=k({$metadata:Q2(D)}),w=yD(Q0(await _1.parseJsonBody(D.body,F)),"body"),$=c(w,{jobArn:S});return Object.assign(E,$),E};var dN=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return vB(D,F);const E=k({$metadata:Q2(D)}),w=yD(Q0(await _1.parseJsonBody(D.body,F)),"body"),$=c(w,{baseModelArn:S,clientRequestToken:S,creationTime:(C)=>yD(v6(C)),customizationType:S,endTime:(C)=>yD(v6(C)),failureMessage:S,hyperParameters:BD,jobArn:S,jobName:S,lastModifiedTime:(C)=>yD(v6(C)),outputDataConfig:BD,outputModelArn:S,outputModelKmsKeyArn:S,outputModelName:S,roleArn:S,status:S,trainingDataConfig:BD,trainingMetrics:(C)=>mDD(C,F),validationDataConfig:BD,validationMetrics:(C)=>nDD(C,F),vpcConfig:BD});return Object.assign(E,$),E};var vN=async(D,F)=>{if(D.statusCode!==200&&D.statusCode>=300)return vB(D,F);const E=k({$metadata:Q2(D)}),w=yD(Q0(await _1.parseJsonBody(D.body,F)),"body"),$=c(w,{modelSummaries:BD});return Object.assign(E,$),E};var vB=async(D,F)=>{const E={...D,body:await _1.parseJsonErrorBody(D.body,F)},w=_1.loadRestJsonErrorCode(D,E.body);switch(w){case"AccessDeniedException":case"com.amazonaws.bedrock#AccessDeniedException":throw await cDD(E,F);case"ConflictException":case"com.amazonaws.bedrock#ConflictException":throw await gDD(E,F);case"InternalServerException":case"com.amazonaws.bedrock#InternalServerException":throw await rDD(E,F);case"ResourceNotFoundException":case"com.amazonaws.bedrock#ResourceNotFoundException":throw await _DD(E,F);case"ThrottlingException":case"com.amazonaws.bedrock#ThrottlingException":throw await uDD(E,F);case"ValidationException":case"com.amazonaws.bedrock#ValidationException":throw await vDD(E,F);case"ServiceQuotaExceededException":case"com.amazonaws.bedrock#ServiceQuotaExceededException":throw await sDD(E,F);case"TooManyTagsException":case"com.amazonaws.bedrock#TooManyTagsException":throw await dDD(E,F);default:const $=E.body;return xDD({output:D,parsedBody:$,errorCode:w})}},xDD=t2(c0),cDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new G4({$metadata:Q2(D),...E});return u(C,D.body)},gDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new Y4({$metadata:Q2(D),...E});return u(C,D.body)},rDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new Z4({$metadata:Q2(D),...E});return u(C,D.body)},_DD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new W4({$metadata:Q2(D),...E});return u(C,D.body)},sDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new z4({$metadata:Q2(D),...E});return u(C,D.body)},uDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new X4({$metadata:Q2(D),...E});return u(C,D.body)},dDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S,resourceName:S});Object.assign(E,$);const C=new T4({$metadata:Q2(D),...E});return u(C,D.body)},vDD=async(D,F)=>{const E=k({}),w=D.body,$=c(w,{message:S});Object.assign(E,$);const C=new J4({$metadata:Q2(D),...E});return u(C,D.body)};var mDD=(D,F)=>{return c(D,{trainingLoss:z5})},nDD=(D,F)=>{return(D||[]).filter((w)=>w!=null).map((w)=>{return lDD(w,F)})},lDD=(D,F)=>{return c(D,{validationLoss:z5})},Q2=(D)=>({httpStatusCode:D.statusCode,requestId:D.headers["x-amzn-requestid"]??D.headers["x-amzn-request-id"]??D.headers["x-amz-request-id"],extendedRequestId:D.headers["x-amz-id-2"],cfId:D.headers["x-amz-cf-id"]});var bN="byCustomizationType",xN="byInferenceType";var cN="byOutputModality",gN="byProvider";AD();LD();y();class mB extends l.classBuilder().ep(XF).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","CreateModelCustomizationJob",{}).n("BedrockClient","CreateModelCustomizationJobCommand").f(void 0,void 0).ser(rN).de(uN).build(){}AD();LD();y();class nB extends l.classBuilder().ep(XF).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","GetModelCustomizationJob",{}).n("BedrockClient","GetModelCustomizationJobCommand").f(void 0,void 0).ser(_N).de(dN).build(){}AD();LD();y();class lB extends l.classBuilder().ep(XF).m(function(D,F,E,w){return[p(E,this.serialize,this.deserialize),a(E,D.getEndpointParameterInstructions())]}).s("AmazonBedrockControlPlaneService","ListFoundationModels",{}).n("BedrockClient","ListFoundationModelsCommand").f(void 0,void 0).ser(sN).de(vN).build(){}async function tOD(D){s1.debug(D);const F=new mB(D),E=await iB.send(F);return s1.debug("Successfully create model customization job"),s1.debug(E),E}async function eOD(D){s1.debug(D);const F=new nB(D),E=await iB.send(F);return s1.debug("Successfully get model customization job"),s1.debug(E),E}async function DjD(D){s1.debug(D);const F=new lB(D),E=await iB.send(F);return s1.debug("Successfully list foundation models"),s1.debug(E),E}var iB=new dB({region:iDD.env.REGION||"us-east-1"}),s1=console;o6();import c4D from"process";var fjD=process.argv,CjD=`${process.platform}-${process.arch} node-${process.version}`;import{access as y3D,appendFile as Jy,mkdir as zy}from"fs/promises";import{dirname as k3D}from"path";import b3D from"process";var ND={};_0(ND,{ui:()=>j3D,team:()=>O3D,storage:()=>q3D,services:()=>N3D,security:()=>R3D,searchEngine:()=>V3D,queue:()=>L3D,ports:()=>H3D,payment:()=>Q3D,overrides:()=>LU,notification:()=>S3D,logging:()=>K3D,localUrl:()=>bFD,library:()=>T3D,hashing:()=>z3D,git:()=>J3D,errors:()=>X3D,email:()=>W3D,docs:()=>Z3D,dns:()=>Y3D,determineAppEnv:()=>P3D,defineUi:()=>C3D,defineStorage:()=>f3D,defineStacksConfig:()=>xFD,defineSms:()=>$3D,defineServices:()=>w3D,defineSecurity:()=>E3D,defineSearchEngine:()=>F3D,defineQueue:()=>D3D,definePayment:()=>eFD,defineNotification:()=>tFD,defineModel:()=>B3D,defineLibrary:()=>oFD,defineJob:()=>uFD,defineHashing:()=>aFD,defineGit:()=>pFD,defineEvents:()=>h3D,defineEmailConfig:()=>lFD,defineEmail:()=>iFD,defineDns:()=>nFD,defineDependencies:()=>mFD,defineDatabase:()=>vFD,defineCronJob:()=>dFD,defineCli:()=>sFD,defineChat:()=>_FD,defineCdn:()=>rFD,defineCache:()=>gFD,defineApp:()=>cFD,defaults:()=>HU,database:()=>G3D,config:()=>MD,cloud:()=>I3D,cli:()=>M3D,cache:()=>A3D,app:()=>G6,analytics:()=>U3D,ai:()=>RU});import{basename as JbD,delimiter as zbD,dirname as vP,extname as TbD,isAbsolute as KbD,join as SbD,normalize as QbD,parse as HbD,relative as LFD,resolve as uP,sep as LbD,toNamespacedPath as RbD}from"path";import dP from"process";import W7 from"process";var pDD=new Set([".","!","?"]),ZjD=new Set([...pDD,":",'"',"'","\u201D"]);var k8=L(nN(),1);var U0D=L(lN(),1);function Dh(D){return typeof D==="string"}var q={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"},iN={"":"data"};var M0D=Object.defineProperty,S4=(D,F)=>{for(var E in F)M0D(D,E,{get:F[E],enumerable:!0})};function Fh(D,F,E,w,$){for(F=F.split?F.split("."):F,w=0;w<F.length;w++)D=D?D[F[w]]:$;return D===$?E:D}var nq=L(L4(),1),lq=L(eN(),1),iq=L($q(),1),pq=L(fq(),1),aq=L(hq(),1),oq=L(Uq(),1),tq=L(Aq(),1),eq=L(Gq(),1),DO=L(Hq(),1),FO=L(Rq(),1),EO=L(Oq(),1),wO=L(jq(),1),$O=L(kq(),1),fO=L(cq(),1),CO=L(rq(),1),BO=L(Oh(),1),hO=L(jh(),1),UO=L(jh(),1),AO=L(Oh(),1),EE=class{#D;#F;constructor(D,F){this.#D=D,this.#F=F||{}}#E(D,F){if(!D.includes("{{"))return D;return D.replace(/(\\)?{{(.*?)}}/g,(E,w,$)=>{const C=$.trim().split(".");let f=F;while(C.length){if(f===null||typeof f!=="object")return;const B=C.shift();f=Object.hasOwn(f,B)?f[B]:void 0}return f})}getMessage(D,F,E,w){const $=this.#F[E.name]||E.name,C=this.#D[`${E.getFieldPath()}.${F}`];if(C)return this.#E(C,{field:$,...w});const f=this.#D[`${E.wildCardPath}.${F}`];if(f)return this.#E(f,{field:$,...w});const B=this.#D[F];if(B)return this.#E(B,{field:$,...w});return this.#E(D,{field:$,...w})}toJSON(){return{messages:this.#D,fields:this.#F}}},e4={};S4(e4,{E_VALIDATION_ERROR:()=>mq});var Ph=class extends Error{constructor(D,F){super("Validation failure",F);this.messages=D;const E=this.constructor;Error.captureStackTrace(this,E)}status=422;code="E_VALIDATION_ERROR";get[Symbol.toStringTag](){return this.constructor.name}toString(){return`${this.name} [${this.code}]: ${this.message}`}},mq=Ph,yh=class{hasErrors=!1;errors=[];report(D,F,E,w){const $={message:D,rule:F,field:E.getFieldPath()};if(w)$.meta=w;if(E.isArrayMember)$.index=E.name;this.hasErrors=!0,this.errors.push($)}createError(){return new mq(this.errors)}},d1D=["1",1,"true",!0,"on"],v1D=["0",0,"false",!1],d={exists(D){return D!==null&&D!==void 0},isMissing(D){return!this.exists(D)},isTrue(D){return d1D.includes(D)},isFalse(D){return v1D.includes(D)},isString(D){return typeof D==="string"},isObject(D){return!!(D&&typeof D==="object"&&!Array.isArray(D))},hasKeys(D,F){for(let E of F)if(E 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:eq.default.default,isURL:iq.default.default,isAlpha:DO.default.default,isAlphaNumeric:fO.default.default,isIP:nq.default.default,isUUID:oq.default.default,isAscii:tq.default.default,isCreditCard:$O.default.default,isIBAN:aq.default.default,isJWT:lq.default.default,isLatLong:FO.default.default,isMobilePhone:hO.default.default,isPassportNumber:CO.default.default,isPostalCode:BO.default.default,isSlug:pq.default.default,isDecimal:EO.default.default,mobileLocales:UO.locales,postalCountryCodes:AO.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 wO.default.default(D)},isActiveURL:async(D)=>{const{resolve4:F,resolve6:E}=await import("dns/promises");try{const{hostname:w}=new URL(D);if((await E(w)).length)return!0;else return(await F(w)).length>0}catch{return!1}},isDistinct:(D,F)=>{const E=new Set;if(!F){for(let $ of D)if(d.exists($))if(E.has($))return!1;else E.add($);return!0}const w=Array.isArray(F)?F:[F];for(let $ of D)if(d.isObject($)&&d.hasKeys($,w)){const C=w.map((f)=>$[f]).join("_");if(E.has(C))return!1;else E.add(C)}return!0},getNestedValue(D,F){if(D.indexOf(".")>-1)return Fh(F.data,D);return F.parent[D]}};function O(D,F){const E={validator:D,isAsync:F?.isAsync||D.constructor.name==="AsyncFunction",implicit:F?.implicit??!1};return function(...w){return{rule:E,options:w[0]}}}var KF=class{static macro(D,F){this.prototype[D]=F}static getter(D,F,E=!1){Object.defineProperty(this.prototype,D,{get(){const w=F.call(this);if(E)Object.defineProperty(this,D,{configurable:!1,enumerable:!1,value:w,writable:!1});return w},configurable:!0,enumerable:!1})}};var m1D=/[\p{Lu}]/u,n1D=/[\p{Ll}]/u,IO=/^[\p{Lu}](?![\p{Lu}])/gu,YO=/([\p{Alpha}\p{N}_]|$)/u,kh=/[_.\- ]+/,l1D=new RegExp("^"+kh.source),MO=new RegExp(kh.source+YO.source,"gu"),GO=new RegExp("\\d+"+YO.source,"gu"),i1D=(D,F,E,w)=>{let $=!1,C=!1,f=!1,B=!1;for(let h=0;h<D.length;h++){const U=D[h];if(B=h>2?D[h-3]==="-":!0,$&&m1D.test(U))D=D.slice(0,h)+"-"+D.slice(h),$=!1,f=C,C=!0,h++;else if(C&&f&&n1D.test(U)&&(!B||w))D=D.slice(0,h-1)+"-"+D.slice(h-1),f=C,C=!1,$=!0;else $=F(U)===U&&E(U)!==U,f=C,C=E(U)===U&&F(U)!==U}return D},p1D=(D,F)=>{return IO.lastIndex=0,D.replaceAll(IO,(E)=>F(E))},a1D=(D,F)=>{return MO.lastIndex=0,GO.lastIndex=0,D.replaceAll(GO,(E,w,$)=>["_","-"].includes(D.charAt($+E.length))?E:F(E)).replaceAll(MO,(E,w)=>F(w))};function tD(D,F){if(!(typeof D==="string"||Array.isArray(D)))throw new TypeError("Expected the input to be `string | string[]`");if(F={pascalCase:!1,preserveConsecutiveUppercase:!1,...F},Array.isArray(D))D=D.map((C)=>C.trim()).filter((C)=>C.length).join("-");else D=D.trim();if(D.length===0)return"";const E=F.locale===!1?(C)=>C.toLowerCase():(C)=>C.toLocaleLowerCase(F.locale),w=F.locale===!1?(C)=>C.toUpperCase():(C)=>C.toLocaleUpperCase(F.locale);if(D.length===1){if(kh.test(D))return"";return F.pascalCase?w(D):E(D)}if(D!==E(D))D=i1D(D,E,w,F.preserveConsecutiveUppercase);if(D=D.replace(l1D,""),D=F.preserveConsecutiveUppercase?p1D(D,E):E(D),F.pascalCase)D=w(D.charAt(0))+D.slice(1);return a1D(D,w)}var nj=L(ch(),1),WD=L(ch(),1),lj=L(ZO(),1),ij=L(WO(),1),pj=L(XO(),1);function ah(D){return new aj(D)}var vh=(D,F)=>F.some((E)=>E instanceof RegExp?E.test(D):E===D),o1D=new Set(["https:","http:","file:"]),t1D=(D)=>{try{const{protocol:F}=new URL(D);return F.endsWith(":")&&!F.includes(".")&&!o1D.has(F)}catch{return!1}},e1D=(D,{stripHash:F})=>{const E=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(D);if(!E)throw new Error(`Invalid URL: ${D}`);let{type:w,data:$,hash:C}=E.groups;const f=w.split(";");C=F?"":C;let B=!1;if(f[f.length-1]==="base64")f.pop(),B=!0;const h=f.shift()?.toLowerCase()??"",I=[...f.map((A)=>{let[Y,M=""]=A.split("=").map((Z)=>Z.trim());if(Y==="charset"){if(M=M.toLowerCase(),M==="us-ascii")return""}return`${Y}${M?`=${M}`:""}`}).filter(Boolean)];if(B)I.push("base64");if(I.length>0||h&&h!=="text/plain")I.unshift(h);return`data:${I.join(";")},${B?$.trim():$}${C?`#${C}`:""}`};function mh(D,F){if(F={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,...F},typeof F.defaultProtocol==="string"&&!F.defaultProtocol.endsWith(":"))F.defaultProtocol=`${F.defaultProtocol}:`;if(D=D.trim(),/^data:/i.test(D))return e1D(D,F);if(t1D(D))return D;const E=D.startsWith("//");if(!(!E&&/^\.*\//.test(D)))D=D.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,F.defaultProtocol);const $=new URL(D);if(F.forceHttp&&F.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(F.forceHttp&&$.protocol==="https:")$.protocol="http:";if(F.forceHttps&&$.protocol==="http:")$.protocol="https:";if(F.stripAuthentication)$.username="",$.password="";if(F.stripHash)$.hash="";else if(F.stripTextFragment)$.hash=$.hash.replace(/#?:~:text.*?$/i,"");if($.pathname){const f=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g;let B=0,h="";for(;;){const I=f.exec($.pathname);if(!I)break;const A=I[0],Y=I.index,M=$.pathname.slice(B,Y);h+=M.replace(/\/{2,}/g,"/"),h+=A,B=Y+A.length}const U=$.pathname.slice(B,$.pathname.length);h+=U.replace(/\/{2,}/g,"/"),$.pathname=h}if($.pathname)try{$.pathname=decodeURI($.pathname)}catch{}if(F.removeDirectoryIndex===!0)F.removeDirectoryIndex=[/^index\.[a-z]+$/];if(Array.isArray(F.removeDirectoryIndex)&&F.removeDirectoryIndex.length>0){let f=$.pathname.split("/");const B=f[f.length-1];if(vh(B,F.removeDirectoryIndex))f=f.slice(0,-1),$.pathname=f.slice(1).join("/")+"/"}if($.hostname){if($.hostname=$.hostname.replace(/\.$/,""),F.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test($.hostname))$.hostname=$.hostname.replace(/^www\./,"")}if(Array.isArray(F.removeQueryParameters)){for(let f of[...$.searchParams.keys()])if(vh(f,F.removeQueryParameters))$.searchParams.delete(f)}if(!Array.isArray(F.keepQueryParameters)&&F.removeQueryParameters===!0)$.search="";if(Array.isArray(F.keepQueryParameters)&&F.keepQueryParameters.length>0){for(let f of[...$.searchParams.keys()])if(!vh(f,F.keepQueryParameters))$.searchParams.delete(f)}if(F.sortQueryParameters){$.searchParams.sort();try{$.search=decodeURIComponent($.search)}catch{}}if(F.removeTrailingSlash)$.pathname=$.pathname.replace(/\/$/,"");if(F.removeExplicitPort&&$.port)$.port="";const C=D;if(D=$.toString(),!F.removeSingleSlash&&$.pathname==="/"&&!C.endsWith("/")&&$.hash==="")D=D.replace(/\/$/,"");if((F.removeTrailingSlash||$.pathname==="/")&&$.hash===""&&F.removeSingleSlash)D=D.replace(/\/$/,"");if(E&&!F.normalizeProtocol)D=D.replace(/^http:\/\//,"//");if(F.stripProtocol)D=D.replace(/^(?:https?:)?\/\//,"");return D}var EP=L(JO(),1),wP=L(zO(),1);function oh(D){return new a8D(D)}function Z8D({parseFnRefId:D,variableName:F,wildCardPath:E,isArrayMember:w,valueExpression:$,parentExpression:C,fieldNameExpression:f,parentValueExpression:B}){const h=D?`refs['${D}'](${$}, {
87
87
  data: root,
88
88
  meta: meta,
89
89
  parent: ${B}
@@ -100,39 +100,39 @@ Filtered results for: ${this.inputValue?this.inputValue:t1.gray("Enter something
100
100
  isValid: true,
101
101
  parent: ${B},
102
102
  isArrayMember: ${w},
103
- });`}function gO({variableName:D,guardedCodeSnippet:F}){return`if (ensureIsArray(${D})) {
103
+ });`}function TO({variableName:D,guardedCodeSnippet:F}){return`if (ensureIsArray(${D})) {
104
104
  ${F}
105
- }`}function D7({variableName:D,bail:F,guardedCodeSnippet:E}){if(!F)return E;return`if (${D}.isValid) {
105
+ }`}function E7({variableName:D,bail:F,guardedCodeSnippet:E}){if(!F)return E;return`if (${D}.isValid) {
106
106
  ${E}
107
- }`}function FE({allowNull:D,conditional:F,variableName:E,outputExpression:w,transformFnRefId:$}){if(!D)return"";return`${F||"if"}(${E}.value === null) {
107
+ }`}function wE({allowNull:D,conditional:F,variableName:E,outputExpression:w,transformFnRefId:$}){if(!D)return"";return`${F||"if"}(${E}.value === null) {
108
108
  ${w} = ${$?`refs['${$}'](null, ${E});`:"null;"}
109
- }`}function y8D(D,F){const[E,w]=D;if(E&&w)return`if (${E} && ${w}) {
109
+ }`}function W8D(D,F){const[E,w]=D;if(E&&w)return`if (${E} && ${w}) {
110
110
  ${F}
111
111
  }`;if(E)return`if (${E}) {
112
112
  ${F}
113
113
  }`;if(w)return`if (${w}) {
114
114
  ${F}
115
- }`;return F}function k8D({isAsync:D,implicit:F,ruleFnId:E},w,$,C){const f=`refs['${E}']`,B=`${f}.validator(${w}.value, ${f}.options, ${w});`,h=$?`${w}.isValid`:"",U=F||C?"":`${w}.isDefined`;return y8D([h,U],D?`await ${B}`:`${B}`)}function EE({bail:D,validations:F,variableName:E,dropMissingCheck:w}){return`${F.map(($)=>k8D($,E,D,w)).join("\n")}`}function rO({variableName:D,outputExpression:F,outputValueExpression:E}){return`const ${D}_out = ${E};
116
- ${F} = ${D}_out;`}function wE({allowNull:D,isOptional:F,variableName:E}){if(F===!1)if(D===!1)return`ensureExists(${E});`;else return`ensureIsDefined(${E});`;return""}function x8D({variableName:D,loopCodeSnippet:F,startingIndex:E}){return E=E||0,`const ${D}_items_size = ${D}.value.length;
115
+ }`;return F}function X8D({isAsync:D,implicit:F,ruleFnId:E},w,$,C){const f=`refs['${E}']`,B=`${f}.validator(${w}.value, ${f}.options, ${w});`,h=$?`${w}.isValid`:"",U=F||C?"":`${w}.isDefined`;return W8D([h,U],D?`await ${B}`:`${B}`)}function $E({bail:D,validations:F,variableName:E,dropMissingCheck:w}){return`${F.map(($)=>X8D($,E,D,w)).join("\n")}`}function KO({variableName:D,outputExpression:F,outputValueExpression:E}){return`const ${D}_out = ${E};
116
+ ${F} = ${D}_out;`}function fE({allowNull:D,isOptional:F,variableName:E}){if(F===!1)if(D===!1)return`ensureExists(${E});`;else return`ensureIsDefined(${E});`;return""}function z8D({variableName:D,loopCodeSnippet:F,startingIndex:E}){return E=E||0,`const ${D}_items_size = ${D}.value.length;
117
117
  for (let ${D}_i = ${E}; ${D}_i < ${D}_items_size; ${D}_i++) {
118
118
  ${F}
119
- }`}function g8D({parseFnRefId:D,variableName:F}){if(D)return`${F}.value = refs['${D}'](${F}.value);`;return""}function _O({variableName:D,conditionalFnRefId:F}){return`else {
119
+ }`}function K8D({parseFnRefId:D,variableName:F}){if(D)return`${F}.value = refs['${D}'](${F}.value);`;return""}function SO({variableName:D,conditionalFnRefId:F}){return`else {
120
120
  refs['${F}'](${D}.value, ${D});
121
- }`}function sO({conditional:D,variableName:F,conditionalFnRefId:E,guardedCodeSnippet:w}){return`${D}(refs['${E}'](${F}.value, ${F})) {
121
+ }`}function QO({conditional:D,variableName:F,conditionalFnRefId:E,guardedCodeSnippet:w}){return`${D}(refs['${E}'](${F}.value, ${F})) {
122
122
  ${w}
123
- }`}function _8D({variableName:D,loopCodeSnippet:F}){return`const ${D}_keys = Object.keys(${D}.value);
123
+ }`}function Q8D({variableName:D,loopCodeSnippet:F}){return`const ${D}_keys = Object.keys(${D}.value);
124
124
  const ${D}_keys_size = ${D}_keys.length;
125
125
  for (let ${D}_key_i = 0; ${D}_key_i < ${D}_keys_size; ${D}_key_i++) {
126
126
  const ${D}_i = ${D}_keys[${D}_key_i];
127
127
  ${F}
128
- }`}function uO({variableName:D,guardedCodeSnippet:F}){return`if (ensureIsObject(${D})) {
128
+ }`}function HO({variableName:D,guardedCodeSnippet:F}){return`if (ensureIsObject(${D})) {
129
129
  ${F}
130
- }`}function dO({variableName:D,outputExpression:F,outputValueExpression:E}){return`const ${D}_out = ${E};
131
- ${F} = ${D}_out;`}function u8D(D){return`[${D.map((F)=>`"${F}"`).join(", ")}]`}function d8D({variableName:D,fieldsToIgnore:F,allowUnknownProperties:E}){if(!E)return"";const w=u8D(F);return`moveProperties(${D}.value, ${D}_out, ${w});`}function m8D(D){return{parentExpression:D.variableName,parentValueExpression:D.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${D.variableName}_item`,valueExpression:"root",outputExpression:D.outputExpression,isArrayMember:!1}}function n8D({variableName:D,outputExpression:F,transformFnRefId:E}){const w=E?`refs['${E}'](${D}.value, ${D})`:`${D}.value`;return`if (${D}.isDefined && ${D}.isValid) {
130
+ }`}function LO({variableName:D,outputExpression:F,outputValueExpression:E}){return`const ${D}_out = ${E};
131
+ ${F} = ${D}_out;`}function L8D(D){return`[${D.map((F)=>`"${F}"`).join(", ")}]`}function R8D({variableName:D,fieldsToIgnore:F,allowUnknownProperties:E}){if(!E)return"";const w=L8D(F);return`moveProperties(${D}.value, ${D}_out, ${w});`}function N8D(D){return{parentExpression:D.variableName,parentValueExpression:D.variableName,fieldNameExpression:"''",fieldPathExpression:"''",wildCardPath:"",variableName:`${D.variableName}_item`,valueExpression:"root",outputExpression:D.outputExpression,isArrayMember:!1}}function q8D({variableName:D,outputExpression:F,transformFnRefId:E}){const w=E?`refs['${E}'](${D}.value, ${D})`:`${D}.value`;return`if (${D}.isDefined && ${D}.isValid) {
132
132
  ${F} = ${w};
133
- }`}function i8D(D){const F=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:F,wildCardPath:F,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!0}}function p8D(D,F){const E=F.wildCardPath!==""?`${F.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:F.variableName,parentValueExpression:`${F.variableName}.value`,fieldNameExpression:`${D.fieldName}`,fieldPathExpression:E,wildCardPath:E,variableName:`${F.variableName}_item_${D.fieldName}`,valueExpression:`${F.variableName}.value[${D.fieldName}]`,outputExpression:`${F.variableName}_out[${D.propertyName}]`,isArrayMember:!0}}function a8D(){return`if(errorReporter.hasErrors) {
133
+ }`}function j8D(D){const F=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:F,wildCardPath:F,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!0}}function P8D(D,F){const E=F.wildCardPath!==""?`${F.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:F.variableName,parentValueExpression:`${F.variableName}.value`,fieldNameExpression:`${D.fieldName}`,fieldPathExpression:E,wildCardPath:E,variableName:`${F.variableName}_item_${D.fieldName}`,valueExpression:`${F.variableName}.value[${D.fieldName}]`,outputExpression:`${F.variableName}_out[${D.propertyName}]`,isArrayMember:!0}}function y8D(){return`if(errorReporter.hasErrors) {
134
134
  throw errorReporter.createError();
135
- }`}function o8D(D,F,E){const w=E.wildCardPath!==""?`${E.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:E.variableName,parentValueExpression:`${E.variableName}.value`,fieldNameExpression:`'${D.fieldName}'`,fieldPathExpression:w,wildCardPath:w,variableName:`${D.propertyName}_${F}`,valueExpression:`${E.variableName}.value['${D.fieldName}']`,outputExpression:`${E.variableName}_out['${D.propertyName}']`,isArrayMember:!1}}function t8D(D){const F=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:F,wildCardPath:F,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!1}}function e8D(D){return`function report(message, rule, field, args) {
135
+ }`}function k8D(D,F,E){const w=E.wildCardPath!==""?`${E.wildCardPath}.${D.fieldName}`:D.fieldName;return{parentExpression:E.variableName,parentValueExpression:`${E.variableName}.value`,fieldNameExpression:`'${D.fieldName}'`,fieldPathExpression:w,wildCardPath:w,variableName:`${D.propertyName}_${F}`,valueExpression:`${E.variableName}.value['${D.fieldName}']`,outputExpression:`${E.variableName}_out['${D.propertyName}']`,isArrayMember:!1}}function b8D(D){const F=D.wildCardPath!==""?`${D.wildCardPath}.*`:"*";return{parentExpression:D.variableName,parentValueExpression:`${D.variableName}.value`,fieldNameExpression:`${D.variableName}_i`,fieldPathExpression:F,wildCardPath:F,variableName:`${D.variableName}_item`,valueExpression:`${D.variableName}.value[${D.variableName}_i]`,outputExpression:`${D.variableName}_out[${D.variableName}_i]`,isArrayMember:!1}}function x8D(D){return`function report(message, rule, field, args) {
136
136
  field.isValid = false;
137
137
  errorReporter.report(messagesProvider.getMessage(message, rule, field, args), rule, field, args);
138
138
  };
@@ -201,9 +201,9 @@ function moveProperties(source, destination, ignoreKeys) {
201
201
  destination[key] = copyProperties(value)
202
202
  }
203
203
  }
204
- };`}function D6D(D){return`const REQUIRED = '${D.required}';
204
+ };`}function c8D(D){return`const REQUIRED = '${D.required}';
205
205
  const NOT_AN_OBJECT = '${D.object}';
206
- const NOT_AN_ARRAY = '${D.array}';`}function mO(){let D=0;const F={};return{toJSON(){return F},track(E){D++;const w=`ref://${D}`;return F[w]=E,w},trackValidation(E){return this.track(E)},trackParser(E){return this.track(E)},trackTransformer(E){return this.track(E)},trackConditional(E){return this.track(E)}}}var j8D=class D{#D="";newLine="\n";writeStatement(F){this.#D=`${this.#D}${this.newLine}${F}`}child(){return new D}toString(){return this.#D}flush(){this.#D=""}},KF=class{#D;#F;field;constructor(D,F,E,w){if(this.#F=w,this.#D=D,this.#F)this.field=this.#F;else F.variablesCounter++,this.field=F.createFieldFor(D,E)}defineField(D){if(!this.#F)D.writeStatement(P8D({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}))}},b8D=class extends KF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(){const D=this.#F.child(),F={type:"tuple",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((E)=>{this.#E.compileNode(E,D,F)}),D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(wE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=D7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${rO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#D.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#w()}`}),F=gO({variableName:this.field.variableName,guardedCodeSnippet:`${EE({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#F.newLine}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${FE({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},c8D=class extends KF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(){const D=this.#F.child();this.#E.compileNode(this.#D.each,D,{type:"array",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});const F=this.#F.child();return F.writeStatement(x8D({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:D.toString()})),D.flush(),F.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(wE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=D7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${rO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#F.newLine}${this.#w()}`}),F=gO({variableName:this.field.variableName,guardedCodeSnippet:`${EE({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#F.newLine}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${FE({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},r8D=class extends KF{#D;#F;#E;#w;constructor(D,F,E,w,$){super(D,E,w,$);this.#F=D,this.#E=F,this.#w=w,this.#D=E}#$(){const D=this.#E.child();if(this.#F.conditions.forEach((F,E)=>{const w=this.#E.child();if("parseFnId"in F.schema)w.writeStatement(g8D({parseFnRefId:F.schema.parseFnId,variableName:this.field.variableName}));this.#D.compileNode(F.schema,w,this.#w,this.field),D.writeStatement(sO({conditional:E===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:F.conditionalFnRefId,guardedCodeSnippet:w.toString()})),w.flush()}),this.#F.elseConditionalFnRefId&&this.#F.conditions.length)D.writeStatement(_O({variableName:this.field.variableName,conditionalFnRefId:this.#F.elseConditionalFnRefId}));return D.toString()}compile(){this.defineField(this.#E),this.#E.writeStatement(this.#$())}},s8D=class extends KF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(){const D=this.#F.child(),F=this.#F.child();return this.#E.compileNode(this.#D.each,F,{type:"record",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),D.writeStatement(_8D({variableName:this.field.variableName,loopCodeSnippet:F.toString()})),F.flush(),D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(wE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=D7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${dO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#w()}`}),F=uO({variableName:this.field.variableName,guardedCodeSnippet:`${EE({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#F.newLine}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${FE({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},v8D=class extends KF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(D){let F=D.properties.map((w)=>w.fieldName);const E=D.groups.flatMap((w)=>this.#$(w));return F.concat(E)}#$(D){return D.conditions.flatMap((F)=>{return this.#w(F.schema)})}#f(){const D=this.#F.child(),F={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((E)=>this.#E.compileNode(E,D,F)),D.toString()}#C(){const D=this.#F.child(),F={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.groups.forEach((E)=>this.#B(E,D,F)),D.toString()}#B(D,F,E){if(D.conditions.forEach((w,$)=>{const C=F.child();w.schema.properties.forEach((f)=>{this.#E.compileNode(f,C,E)}),w.schema.groups.forEach((f)=>{this.#B(f,C,E)}),F.writeStatement(sO({variableName:this.field.variableName,conditional:$===0?"if":"else if",conditionalFnRefId:w.conditionalFnRefId,guardedCodeSnippet:C.toString()}))}),D.elseConditionalFnRefId&&D.conditions.length)F.writeStatement(_O({variableName:this.field.variableName,conditionalFnRefId:D.elseConditionalFnRefId}))}compile(){this.defineField(this.#F),this.#F.writeStatement(wE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=D7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${dO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#F.newLine}${this.#f()}${this.#F.newLine}${this.#C()}${this.#F.newLine}${d8D({variableName:this.field.variableName,allowUnknownProperties:this.#D.allowUnknownProperties,fieldsToIgnore:this.#D.allowUnknownProperties?this.#w(this.#D):[]})}`}),F=uO({variableName:this.field.variableName,guardedCodeSnippet:`${EE({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${FE({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}},l8D=class extends KF{#D;#F;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F}compile(){this.defineField(this.#F),this.#F.writeStatement(wE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#F.writeStatement(EE({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1})),this.#F.writeStatement(`${n8D({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId})}${this.#F.newLine}${FE({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId,conditional:"else if"})}`)}},F6D=Object.getPrototypeOf(async function(){}).constructor,vO=class{variablesCounter=0;#D;#F;#E=new j8D;constructor(D,F){this.#D=D,this.#F=F||{convertEmptyStringsToNull:!1}}#w(){this.#E.writeStatement(D6D({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#F.messages})),this.#E.writeStatement(e8D(this.#F)),this.#E.writeStatement("let out;")}#$(){this.#E.writeStatement(a8D()),this.#E.writeStatement("return out;")}#f(){this.compileNode(this.#D.schema,this.#E,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#C(){return new F6D("root","meta","refs","messagesProvider","errorReporter",this.#E.toString())}createFieldFor(D,F){switch(F.type){case"array":return i8D(F);case"root":return m8D(F);case"object":return o8D(D,this.variablesCounter,F);case"tuple":return p8D(D,F);case"record":return t8D(F)}}compileNode(D,F,E,w){switch(D.type){case"literal":return new l8D(D,F,this,E,w).compile();case"array":return new c8D(D,F,this,E,w).compile();case"record":return new s8D(D,F,this,E,w).compile();case"object":return new v8D(D,F,this,E,w).compile();case"tuple":return new b8D(D,F,this,E,w).compile();case"union":return new r8D(D,F,this,E,w).compile()}}compile(){this.#w(),this.#f(),this.#$();const D=this.#C();return this.variablesCounter=0,this.#E.flush(),D}};var hP={};T4(hP,{COTYPE:()=>$6D,IS_OF_TYPE:()=>C2,ITYPE:()=>E6D,OTYPE:()=>w6D,PARSE:()=>FD,UNIQUE_NAME:()=>L0,VALIDATION:()=>A6});var L0=Symbol.for("schema_name"),C2=Symbol.for("is_of_type"),FD=Symbol.for("parse"),E6D=Symbol.for("opaque_input_type"),w6D=Symbol.for("opaque_type"),$6D=Symbol.for("camelcase_opaque_type"),A6=Symbol.for("to_validation"),SF=O((D,F,E)=>{const w=F(E);if(!E.isDefined&&w)E.report(q.required,"required",E)},{implicit:!0}),E7=class extends TF{optional(D){return new C6D(this,D)}nullable(){return new f6D(this)}transform(D){return new B6D(D,this)}},f6D=class D extends E7{#D;constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[FD](F,E,w){const $=this.#D[FD](F,E,w);return $.allowNull=!0,$}},C6D=class D extends E7{#D;validations;constructor(F,E){super();this.#D=F,this.validations=E||[]}cloneValidations(){return this.validations.map((F)=>{return{options:F.options,rule:F.rule}})}compileValidations(F){return this.validations.map((E)=>{return{ruleFnId:F.track({validator:E.rule.validator,options:E.options}),implicit:E.rule.implicit,isAsync:E.rule.isAsync}})}use(F){return this.validations.push(A6 in F?F[A6]():F),this}requiredWhen(F,E,w){if(typeof F==="function")return this.use(SF(F));let $;switch(E){case"=":$=(C)=>C===w;break;case"!=":$=(C)=>C!==w;break;case"in":$=(C)=>w.includes(C);break;case"notIn":$=(C)=>!w.includes(C);break;case">":$=(C)=>C>w;break;case"<":$=(C)=>C<w;break;case">=":$=(C)=>C>=w;break;case"<=":$=(C)=>C<=w}return this.use(SF((C)=>{const f=d.getNestedValue(F,C);return $(f)}))}requiredIfExists(F){const E=Array.isArray(F)?F:[F];return this.use(SF((w)=>{return E.every(($)=>d.exists(d.getNestedValue($,w)))}))}requiredIfAnyExists(F){return this.use(SF((E)=>{return F.some((w)=>d.exists(d.getNestedValue(w,E)))}))}requiredIfMissing(F){const E=Array.isArray(F)?F:[F];return this.use(SF((w)=>{return E.every(($)=>d.isMissing(d.getNestedValue($,w)))}))}requiredIfAnyMissing(F){return this.use(SF((E)=>{return F.some((w)=>d.isMissing(d.getNestedValue(w,E)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[FD](F,E,w){const $=this.#D[FD](F,E,w);return $.isOptional=!0,$.validations=$.validations.concat(this.compileValidations(E)),$}},B6D=class D extends E7{#D;#F;constructor(F,E){super();this.#F=F,this.#D=E}clone(){return new D(this.#F,this.#D.clone())}[FD](F,E,w){const $=this.#D[FD](F,E,w);return $.transformFnId=E.trackTransformer(this.#F),$}},M1=class extends E7{options;validations;constructor(D,F){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...D},this.validations=F||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((F)=>{return{ruleFnId:D.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(A6 in D?D[A6]():D),this}bail(D){return this.options.bail=D,this}[FD](D,F,E){return{type:"literal",fieldName:D,propertyName:E.toCamelCase?oD(D):D,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},UP=class D extends M1{constructor(F,E){super(F,E)}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},F7=O((D,F,E)=>{const w=typeof F.choices==="function"?F.choices(E):F.choices;if(!w.includes(D))E.report(q.enum,"enum",E,{choices:w})}),QF=class D extends M1{static rules={enum:F7};#D;getChoices(){return this.#D}constructor(F,E,w){super(E,w||[F7({choices:F})]);this.#D=F}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},I6=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];XD.default.extend(MP.default);XD.default.extend(IP.default);XD.default.extend(GP.default);var h6D=O((D,F,E)=>{if(typeof D!=="string"&&typeof D!=="number"){E.report(q.date,"date",E);return}let w=!1,$=F.formats||I6;if(Array.isArray($))$=[...$],w=$.includes("x");else if(typeof $!=="string")$={...$},w=$.format==="x";const C=w?d.asNumber(D):D,f=w&&!Number.isNaN(C)?XD.default(C):XD.default(D,$,!0);if(!f.isValid()){E.report(q.date,"date",E);return}E.meta.$value=f,E.meta.$formats=$,E.mutate(f.toDate(),E)}),nO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||I6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=XD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the equals rule`);if(!C.isSame(B,w))E.report(q["date.equals"],"date.equals",E,{expectedValue:f,compare:w})}),lO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||I6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?XD.default():f==="tomorrow"?XD.default().add(1,"day"):XD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the after rule`);if(!C.isAfter(B,w))E.report(q["date.after"],"date.after",E,{expectedValue:f,compare:w})}),iO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||I6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?XD.default():f==="tomorrow"?XD.default().add(1,"day"):XD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the afterOrEqual rule`);if(!C.isSameOrAfter(B,w))E.report(q["date.afterOrEqual"],"date.afterOrEqual",E,{expectedValue:f,compare:w})}),pO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||I6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?XD.default():f==="yesterday"?XD.default().subtract(1,"day"):XD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the before rule`);if(!C.isBefore(B,w))E.report(q["date.before"],"date.before",E,{expectedValue:f,compare:w})}),aO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||I6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?XD.default():f==="yesterday"?XD.default().subtract(1,"day"):XD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the beforeOrEqual rule`);if(!C.isSameOrBefore(B,w))E.report(q["date.beforeOrEqual"],"date.beforeOrEqual",E,{expectedValue:f,compare:w})}),oO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=XD.default(f,C,!0);if(!B.isValid())return;if(!$.isSame(B,w))E.report(q["date.sameAs"],"date.sameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),tO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=XD.default(f,C,!0);if(!B.isValid())return;if($.isSame(B,w))E.report(q["date.notSameAs"],"date.notSameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),eO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=XD.default(f,C,!0);if(!B.isValid())return;if(!$.isAfter(B,w))E.report(q["date.afterField"],"date.afterField",E,{otherField:F.otherField,expectedValue:f,compare:w})}),Dj=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=XD.default(f,C,!0);if(!B.isValid())return;if(!$.isSameOrAfter(B,w))E.report(q["date.afterOrSameAs"],"date.afterOrSameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),Fj=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=XD.default(f,C,!0);if(!B.isValid())return;if(!$.isBefore(B,w))E.report(q["date.beforeField"],"date.beforeField",E,{otherField:F.otherField,expectedValue:f,compare:w})}),Ej=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=XD.default(f,C,!0);if(!B.isValid())return;if(!$.isSameOrBefore(B,w))E.report(q["date.beforeOrSameAs"],"date.beforeOrSameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),wj=O((D,F,E)=>{if(!E.meta.$value)return;const $=E.meta.$value.day();if($!==0&&$!==6)E.report(q["date.weekend"],"date.weekend",E)}),$j=O((D,F,E)=>{if(!E.meta.$value)return;const $=E.meta.$value.day();if($===0||$===6)E.report(q["date.weekday"],"date.weekday",E)}),ih=class D extends M1{static rules={equals:nO,after:lO,afterOrEqual:iO,before:pO,beforeOrEqual:aO,sameAs:oO,notSameAs:tO,afterField:eO,afterOrSameAs:Dj,beforeField:Fj,beforeOrSameAs:Ej,weekend:wj,weekday:$j};[L0]="vine.date";[C2]=(F)=>{if(typeof F!=="string")return!1;return AP.default(F,this.options.formats||I6,!0).isValid()};constructor(F,E){super(F,E||[h6D(F||{})])}equals(F,E){return this.use(nO({expectedValue:F,...E}))}after(F,E){return this.use(lO({expectedValue:F,...E}))}afterOrEqual(F,E){return this.use(iO({expectedValue:F,...E}))}before(F,E){return this.use(pO({expectedValue:F,...E}))}beforeOrEqual(F,E){return this.use(aO({expectedValue:F,...E}))}sameAs(F,E){return this.use(oO({otherField:F,...E}))}notSameAs(F,E){return this.use(tO({otherField:F,...E}))}afterField(F,E){return this.use(eO({otherField:F,...E}))}afterOrSameAs(F,E){return this.use(Dj({otherField:F,...E}))}beforeField(F,E){return this.use(Fj({otherField:F,...E}))}beforeOrSameAs(F,E){return this.use(Ej({otherField:F,...E}))}weekend(){return this.use(wj())}weekday(){return this.use($j())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},YP=class D{#D;#F=(F,E)=>{E.report(q.union,"union",E)};constructor(F){this.#D=F}otherwise(F){return this.#F=F,this}clone(){const F=new D(this.#D);return F.otherwise(this.#F),F}[FD](F,E,w){return{type:"union",fieldName:F,propertyName:w.toCamelCase?oD(F):F,elseConditionalFnRefId:E.trackConditional(this.#F),conditions:this.#D.map(($)=>$[FD](F,E,w))}}},ZP=class{#D;#F;constructor(D,F){this.#D=F,this.#F=D}[FD](D,F,E){return{conditionalFnRefId:F.trackConditional(this.#F),schema:this.#D[FD](D,F,E)}}};ph.if=function D(F,E){return new ZP(F,E)};ph.else=function D(F){return new ZP(()=>!0,F)};var $E=class extends TF{optional(){return new A6D(this)}nullable(){return new U6D(this)}},U6D=class D extends $E{#D;constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[FD](F,E,w){const $=this.#D[FD](F,E,w);if($.type!=="union")$.allowNull=!0;return $}},A6D=class D extends $E{#D;constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[FD](F,E,w){const $=this.#D[FD](F,E,w);if($.type!=="union")$.isOptional=!0;return $}},fE=class extends $E{options;validations;constructor(D,F){super();this.options=D||{bail:!0,allowNull:!1,isOptional:!1},this.validations=F||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((F)=>{return{ruleFnId:D.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(A6 in D?D[A6]():D),this}bail(D){return this.options.bail=D,this}},XP=class D extends fE{#D;#F=!1;[L0]="vine.array";[C2]=(F)=>{return Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}allowUnknownProperties(){return this.#F=!0,this}clone(){const F=new D(this.#D.map((E)=>E.clone()),this.cloneOptions(),this.cloneValidations());if(this.#F)F.allowUnknownProperties();return F}[FD](F,E,w){return{type:"tuple",fieldName:F,propertyName:w.toCamelCase?oD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#F,parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,validations:this.compileValidations(E),properties:this.#D.map(($,C)=>$[FD](String(C),E,w))}}},fj=O((D,F,E)=>{if(!E.isValid)return;if(D.length<F.min)E.report(q["array.minLength"],"array.minLength",E,F)}),Cj=O((D,F,E)=>{if(!E.isValid)return;if(D.length>F.max)E.report(q["array.maxLength"],"array.maxLength",E,F)}),Bj=O((D,F,E)=>{if(!E.isValid)return;if(D.length!==F.size)E.report(q["array.fixedLength"],"array.fixedLength",E,F)}),hj=O((D,F,E)=>{if(!E.isValid)return;if(D.length<=0)E.report(q.notEmpty,"notEmpty",E)}),Uj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isDistinct(D,F.fields))E.report(q.distinct,"distinct",E,F)}),Aj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.filter((w)=>d.exists(w)&&w!==""),E)}),WP=class D extends fE{static rules={compact:Aj,notEmpty:hj,distinct:Uj,minLength:fj,maxLength:Cj,fixedLength:Bj};#D;[L0]="vine.array";[C2]=(F)=>{return Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}minLength(F){return this.use(fj({min:F}))}maxLength(F){return this.use(Cj({max:F}))}fixedLength(F){return this.use(Bj({size:F}))}notEmpty(){return this.use(hj())}distinct(F){return this.use(Uj({fields:F}))}compact(){return this.use(Aj())}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[FD](F,E,w){return{type:"array",fieldName:F,propertyName:w.toCamelCase?oD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[FD]("*",E,w),parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,validations:this.compileValidations(E)}}},I6D=class D extends $E{#D;[L0]="types.object";[C2]=(F)=>{return F!==null&&typeof F==="object"&&!Array.isArray(F)};constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[FD](F,E,w){return w.toCamelCase=!0,this.#D[FD](F,E,w)}},JP=class D extends fE{#D;#F=[];#E=!1;[L0]="vine.object";[C2]=(F)=>{return F!==null&&typeof F==="object"&&!Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}getProperties(){return Object.keys(this.#D).reduce((F,E)=>{return F[E]=this.#D[E].clone(),F},{})}allowUnknownProperties(){return this.#E=!0,this}merge(F){return this.#F.push(F),this}clone(){const F=new D(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#F.forEach((E)=>F.merge(E)),this.#E)F.allowUnknownProperties();return F}toCamelCase(){return new I6D(this)}[FD](F,E,w){return{type:"object",fieldName:F,propertyName:w.toCamelCase?oD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#E,validations:this.compileValidations(E),properties:Object.keys(this.#D).map(($)=>{return this.#D[$][FD]($,E,w)}),groups:this.#F.map(($)=>{return $[FD](E,w)})}}},Ij=O((D,F,E)=>{if(!E.isValid)return;if(Object.keys(D).length<F.min)E.report(q["record.minLength"],"record.minLength",E,F)}),Gj=O((D,F,E)=>{if(!E.isValid)return;if(Object.keys(D).length>F.max)E.report(q["record.maxLength"],"record.maxLength",E,F)}),Mj=O((D,F,E)=>{if(!E.isValid)return;if(Object.keys(D).length!==F.size)E.report(q["record.fixedLength"],"record.fixedLength",E,F)}),Yj=O((D,F,E)=>{if(!E.isValid)return;F(Object.keys(D),E)}),zP=class D extends fE{static rules={maxLength:Gj,minLength:Ij,fixedLength:Mj,validateKeys:Yj};#D;[L0]="vine.object";[C2]=(F)=>{return F!==null&&typeof F==="object"&&!Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}minLength(F){return this.use(Ij({min:F}))}maxLength(F){return this.use(Gj({max:F}))}fixedLength(F){return this.use(Mj({size:F}))}validateKeys(...F){return this.use(Yj(...F))}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[FD](F,E,w){return{type:"record",fieldName:F,propertyName:w.toCamelCase?oD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[FD]("*",E,w),parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,validations:this.compileValidations(E)}}},Zj=O((D,F,E)=>{if(typeof D!=="string")E.report(q.string,"string",E)}),Xj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isEmail(D,F))E.report(q.email,"email",E)}),Wj=O((D,F,E)=>{if(!E.isValid)return;const w=F&&typeof F==="function"?F(E):F,$=w?.locale||"any";if(!d.isMobilePhone(D,$,w))E.report(q.mobile,"mobile",E)}),Jj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isIP(D,F?.version))E.report(q.ipAddress,"ipAddress",E)}),zj=O((D,F,E)=>{if(!E.isValid)return;if(!F.test(D))E.report(q.regex,"regex",E)}),Tj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isHexColor(D))E.report(q.hexCode,"hexCode",E)}),Kj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isURL(D,F))E.report(q.url,"url",E)}),Sj=O(async(D,F,E)=>{if(!E.isValid)return;if(!await d.isActiveURL(D))E.report(q.activeUrl,"activeUrl",E)}),Qj=O((D,F,E)=>{if(!E.isValid)return;let w="a-zA-Z";if(F){if(F.allowSpaces)w+="\\s";if(F.allowDashes)w+="-";if(F.allowUnderscores)w+="_"}if(!new RegExp(`^[${w}]+\$`).test(D))E.report(q.alpha,"alpha",E)}),Hj=O((D,F,E)=>{if(!E.isValid)return;let w="a-zA-Z0-9";if(F){if(F.allowSpaces)w+="\\s";if(F.allowDashes)w+="-";if(F.allowUnderscores)w+="_"}if(!new RegExp(`^[${w}]+\$`).test(D))E.report(q.alphaNumeric,"alphaNumeric",E)}),Lj=O((D,F,E)=>{if(!E.isValid)return;if(D.length<F.min)E.report(q.minLength,"minLength",E,F)}),Rj=O((D,F,E)=>{if(!E.isValid)return;if(D.length>F.max)E.report(q.maxLength,"maxLength",E,F)}),Vj=O((D,F,E)=>{if(!E.isValid)return;if(D.length!==F.size)E.report(q.fixedLength,"fixedLength",E,F)}),Nj=O((D,F,E)=>{if(!E.isValid)return;if(!D.endsWith(F.substring))E.report(q.endsWith,"endsWith",E,F)}),qj=O((D,F,E)=>{if(!E.isValid)return;if(!D.startsWith(F.substring))E.report(q.startsWith,"startsWith",E,F)}),Oj=O((D,F,E)=>{if(!E.isValid)return;if(d.getNestedValue(F.otherField,E)!==D){E.report(q.sameAs,"sameAs",E,F);return}}),jj=O((D,F,E)=>{if(!E.isValid)return;if(d.getNestedValue(F.otherField,E)===D){E.report(q.notSameAs,"notSameAs",E,F);return}}),Pj=O((D,F,E)=>{if(!E.isValid)return;const w=F?.confirmationField||`${E.name}_confirmation`;if(E.parent[w]!==D){E.report(q.confirmed,"confirmed",E,{otherField:w});return}}),yj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.trim(),E)}),kj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(KP.default.default(D,F),E)}),bj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.toLocaleUpperCase(F),E)}),xj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.toLocaleLowerCase(F),E)}),cj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(oD(D),E)}),gj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(TP.default.default(D),E)}),rj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(vh(D,F),E)}),_j=O((D,F,E)=>{if(!E.isValid)return;if(!(typeof F.choices==="function"?F.choices(E):F.choices).includes(D)){E.report(q.in,"in",E,F);return}}),sj=O((D,F,E)=>{if(!E.isValid)return;if((typeof F.list==="function"?F.list(E):F.list).includes(D)){E.report(q.notIn,"notIn",E,F);return}}),uj=O((D,F,E)=>{if(!E.isValid)return;const w=F?typeof F==="function"?F(E)?.provider||[]:F.provider:[];if(!w.length){if(!d.isCreditCard(D))E.report(q.creditCard,"creditCard",E,{providersList:"credit"})}else if(!w.find((C)=>d.isCreditCard(D,{provider:C})))E.report(q.creditCard,"creditCard",E,{providers:w,providersList:w.join("/")})}),dj=O((D,F,E)=>{if(!E.isValid)return;const w=typeof F==="function"?F(E).countryCode:F.countryCode;if(!w.find((C)=>d.isPassportNumber(D,C)))E.report(q.passport,"passport",E,{countryCodes:w})}),vj=O((D,F,E)=>{if(!E.isValid)return;const w=F?typeof F==="function"?F(E)?.countryCode||[]:F.countryCode:[];if(!w.length){if(!d.isPostalCode(D,"any"))E.report(q.postalCode,"postalCode",E)}else if(!w.find((C)=>d.isPostalCode(D,C)))E.report(q.postalCode,"postalCode",E,{countryCodes:w})}),mj=O((D,F,E)=>{if(!E.isValid)return;if(!F||!F.version){if(!d.isUUID(D))E.report(q.uuid,"uuid",E)}else if(!F.version.find(($)=>d.isUUID(D,$)))E.report(q.uuid,"uuid",E,F)}),nj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isAscii(D))E.report(q.ascii,"ascii",E)}),lj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isIBAN(D))E.report(q.iban,"iban",E)}),ij=O((D,F,E)=>{if(!E.isValid)return;if(!d.isJWT(D))E.report(q.jwt,"jwt",E)}),pj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isLatLong(D))E.report(q.coordinates,"coordinates",E)}),w7=class D extends M1{static rules={in:_j,jwt:ij,url:Kj,iban:lj,uuid:mj,trim:yj,email:Xj,alpha:Qj,ascii:nj,notIn:sj,regex:zj,escape:gj,sameAs:Oj,mobile:Wj,string:Zj,hexCode:Tj,passport:dj,endsWith:Nj,confirmed:Pj,activeUrl:Sj,minLength:Lj,notSameAs:jj,maxLength:Rj,ipAddress:Jj,creditCard:uj,postalCode:vj,startsWith:qj,toUpperCase:bj,toLowerCase:xj,toCamelCase:cj,fixedLength:Vj,coordinates:pj,normalizeUrl:rj,alphaNumeric:Hj,normalizeEmail:kj};[L0]="vine.string";[C2]=(F)=>{return typeof F==="string"};constructor(F,E){super(F,E||[Zj()])}url(...F){return this.use(Kj(...F))}activeUrl(){return this.use(Sj())}email(...F){return this.use(Xj(...F))}mobile(...F){return this.use(Wj(...F))}ipAddress(F){return this.use(Jj(F?{version:F}:void 0))}hexCode(){return this.use(Tj())}regex(F){return this.use(zj(F))}alpha(F){return this.use(Qj(F))}alphaNumeric(F){return this.use(Hj(F))}minLength(F){return this.use(Lj({min:F}))}maxLength(F){return this.use(Rj({max:F}))}fixedLength(F){return this.use(Vj({size:F}))}confirmed(F){return this.use(Pj(F))}trim(){return this.use(yj())}normalizeEmail(F){return this.use(kj(F))}toUpperCase(){return this.use(bj())}toLowerCase(){return this.use(xj())}toCamelCase(){return this.use(cj())}escape(){return this.use(gj())}normalizeUrl(...F){return this.use(rj(...F))}startsWith(F){return this.use(qj({substring:F}))}endsWith(F){return this.use(Nj({substring:F}))}sameAs(F){return this.use(Oj({otherField:F}))}notSameAs(F){return this.use(jj({otherField:F}))}in(F){return this.use(_j({choices:F}))}notIn(F){return this.use(sj({list:F}))}creditCard(...F){return this.use(uj(...F))}passport(...F){return this.use(dj(...F))}postalCode(...F){return this.use(vj(...F))}uuid(...F){return this.use(mj(...F))}ascii(){return this.use(nj())}iban(){return this.use(lj())}jwt(){return this.use(ij())}coordinates(){return this.use(pj())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},aj=O((D,F,E)=>{const w=F.strict?D:d.asNumber(D);if(typeof w!=="number"||Number.isNaN(w)||w===Number.POSITIVE_INFINITY||w===Number.NEGATIVE_INFINITY){E.report(q.number,"number",E);return}E.mutate(w,E)}),oj=O((D,F,E)=>{if(!E.isValid)return;if(D<F.min)E.report(q.min,"min",E,F)}),tj=O((D,F,E)=>{if(!E.isValid)return;if(D>F.max)E.report(q.max,"max",E,F)}),ej=O((D,F,E)=>{if(!E.isValid)return;if(D<F.min||D>F.max)E.report(q.range,"range",E,F)}),DP=O((D,F,E)=>{if(!E.isValid)return;if(D<0)E.report(q.positive,"positive",E)}),FP=O((D,F,E)=>{if(!E.isValid)return;if(D>=0)E.report(q.negative,"negative",E)}),EP=O((D,F,E)=>{if(!E.isValid)return;if(!d.isDecimal(String(D),{force_decimal:F.range[0]!==0,decimal_digits:F.range.join(",")}))E.report(q.decimal,"decimal",E,{digits:F.range.join("-")})}),wP=O((D,F,E)=>{if(!E.isValid)return;if(!Number.isInteger(D))E.report(q.withoutDecimals,"withoutDecimals",E)}),$P=O((D,F,E)=>{if(!E.isValid)return;if(!F.values.includes(D))E.report(q["number.in"],"in",E,F)}),HF=class D extends M1{static rules={in:$P,max:tj,min:oj,range:ej,number:aj,decimal:EP,negative:FP,positive:DP,withoutDecimals:wP};[L0]="vine.number";[C2]=(F)=>{const E=d.asNumber(F);return!Number.isNaN(E)};constructor(F,E){super(F,E||[aj(F||{})])}min(F){return this.use(oj({min:F}))}max(F){return this.use(tj({max:F}))}range(F){return this.use(ej({min:F[0],max:F[1]}))}positive(){return this.use(DP())}negative(){return this.use(FP())}decimal(F){return this.use(EP({range:Array.isArray(F)?F:[F]}))}withoutDecimals(){return this.use(wP())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}in(F){return this.use($P({values:F}))}},fP=O((D,F,E)=>{const w=F.strict===!0?D:d.asBoolean(D);if(typeof w!=="boolean"){E.report(q.boolean,"boolean",E);return}E.mutate(w,E)}),LF=class D extends M1{static rules={boolean:fP};[L0]="vine.boolean";[C2]=(F)=>{return typeof(this.options.strict===!0?F:d.asBoolean(F))==="boolean"};constructor(F,E){super(F,E||[fP(F||{})])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},CP=O((D,F,E)=>{let w=D;if(typeof F.expectedValue==="boolean")w=d.asBoolean(D);else if(typeof F.expectedValue==="number")w=d.asNumber(D);if(w!==F.expectedValue){E.report(q.literal,"literal",E,F);return}E.mutate(w,E)}),SP=class D extends M1{static rules={equals:CP};#D;constructor(F,E,w){super(E,w||[CP({expectedValue:F})]);this.#D=F}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},G6D=["on","1","yes","true",!0,1],BP=O((D,F,E)=>{if(!G6D.includes(D))E.report(q.accepted,"accepted",E)}),QP=class D extends M1{static rules={accepted:BP};constructor(F,E){super(F,E||[BP()])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},M6D=class D{#D;#F=(F,E)=>{E.report(q.unionGroup,"unionGroup",E)};constructor(F){this.#D=F}clone(){const F=new D(this.#D);return F.otherwise(this.#F),F}otherwise(F){return this.#F=F,this}[FD](F,E){return{type:"group",elseConditionalFnRefId:F.trackConditional(this.#F),conditions:this.#D.map((w)=>w[FD](F,E))}}},HP=class{#D;#F;constructor(D,F){this.#D=F,this.#F=D}[FD](D,F){return{schema:{type:"sub_object",properties:Object.keys(this.#D).map((E)=>{return this.#D[E][FD](E,D,F)}),groups:[]},conditionalFnRefId:D.trackConditional(this.#F)}}};ah.if=function D(F,E){return new HP(F,E)};ah.else=function D(F){return new HP(()=>!0,F)};var Y6D=class D extends M1{static rules={enum:F7};#D;constructor(F,E,w){super(E,w||[F7({choices:Object.values(F)})]);this.#D=F}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},Z6D=class D{#D;#F=(F,E)=>{E.report(q.unionOfTypes,"unionOfTypes",E)};constructor(F){this.#D=F}otherwise(F){return this.#F=F,this}clone(){const F=new D(this.#D);return F.otherwise(this.#F),F}[FD](F,E,w){return{type:"union",fieldName:F,propertyName:w.toCamelCase?oD(F):F,elseConditionalFnRefId:E.trackConditional(this.#F),conditions:this.#D.map(($)=>{return{conditionalFnRefId:E.trackConditional((C,f)=>{return $[C2](C,f)}),schema:$[FD](F,E,w)}})}}},X6D=class extends TF{group=ah;union=ph;string(){return new w7}boolean(D){return new LF(D)}accepted(){return new QP}number(D){return new HF(D)}date(D){return new ih(D)}literal(D){return new SP(D)}object(D){return new JP(D)}array(D){return new WP(D)}tuple(D){return new XP(D)}record(D){return new zP(D)}enum(D){if(Array.isArray(D)||typeof D==="function")return new QF(D);return new Y6D(D)}any(){return new UP}unionOfTypes(D){const F=new Set;return D.forEach((E)=>{if(!E[C2]||!E[L0])throw new Error(`Cannot use "${E.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(F.has(E[L0]))throw new Error(`Cannot use duplicate schema "${E[L0]}". "vine.unionOfTypes" needs distinct schema types only`);F.add(E[L0])}),F.clear(),new Z6D(D)}},W6D={required:q.required,array:q.array,object:q.object},lh=class{#D;messagesProvider;errorReporter;#F(D){const F=mO();return{compilerNode:{type:"root",schema:D[FD]("",F,{toCamelCase:!1})},refs:F.toJSON()}}constructor(D,F){const{compilerNode:E,refs:w}=this.#F(D);this.#D={schema:E,refs:w};const $=F.metaDataValidator,C=new vO(E,{convertEmptyStringsToNull:F.convertEmptyStringsToNull,messages:W6D}).compile();if(this.errorReporter=F.errorReporter,this.messagesProvider=F.messagesProvider,$)this.validate=(f,B)=>{let h=B??{};const U=h.meta??{},I=h.errorReporter??this.errorReporter,A=h.messagesProvider??this.messagesProvider;return $(U),C(f,U,w,A,I())};else this.validate=(f,B)=>{let h=B??{};const U=h.meta??{},I=h.errorReporter??this.errorReporter,A=h.messagesProvider??this.messagesProvider;return C(f,U,w,A,I())}}async tryValidate(D,...[F]){try{return[null,await this.validate(D,F)]}catch(E){if(E instanceof jh)return[E,null];throw E}}toJSON(){const{schema:D,refs:F}=this.#D;return{schema:structuredClone(D),refs:F}}},LP=class extends X6D{messagesProvider=new DE(q,Gq);errorReporter=()=>new Ph;convertEmptyStringsToNull=!1;helpers=d;createRule=O;compile(D){return new lh(D,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(D){return{compile:(F)=>{return new lh(F,{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)}},J6D=new LP,r=J6D;import{basename as KbD,delimiter as SbD,dirname as Fy,extname as QbD,isAbsolute as HbD,join as LbD,normalize as RbD,parse as VbD,relative as fED,resolve as _y,sep as NbD,toNamespacedPath as qbD}from"path";import sy from"process";import K7 from"process";import{access as HFD,appendFile as eP,mkdir as Dy}from"fs/promises";import{dirname as LFD}from"path";import RFD from"process";var RD={};r0(RD,{ui:()=>SFD,team:()=>KFD,storage:()=>TFD,services:()=>zFD,security:()=>WFD,searchEngine:()=>JFD,queue:()=>XFD,ports:()=>ZFD,payment:()=>YFD,overrides:()=>th,notification:()=>MFD,logging:()=>GFD,localUrl:()=>R6D,library:()=>IFD,hashing:()=>AFD,git:()=>UFD,errors:()=>hFD,email:()=>BFD,docs:()=>CFD,dns:()=>fFD,determineAppEnv:()=>QFD,defineUi:()=>o6D,defineStorage:()=>a6D,defineStacksConfig:()=>V6D,defineSms:()=>p6D,defineServices:()=>i6D,defineSecurity:()=>l6D,defineSearchEngine:()=>n6D,defineQueue:()=>m6D,definePayment:()=>v6D,defineNotification:()=>d6D,defineModel:()=>t6D,defineLibrary:()=>u6D,defineJob:()=>y6D,defineHashing:()=>s6D,defineGit:()=>_6D,defineEvents:()=>e6D,defineEmailConfig:()=>g6D,defineEmail:()=>r6D,defineDns:()=>c6D,defineDependencies:()=>x6D,defineDatabase:()=>b6D,defineCronJob:()=>k6D,defineCli:()=>P6D,defineChat:()=>j6D,defineCdn:()=>O6D,defineCache:()=>q6D,defineApp:()=>N6D,defaults:()=>oh,database:()=>$FD,config:()=>ID,cloud:()=>EFD,cli:()=>wFD,cache:()=>FFD,app:()=>G6,analytics:()=>DFD,ai:()=>eh});var z6D={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:VP(),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:RP("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"}}}},oh=z6D;var NP={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 qP={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};import S6D from"process";function H6D(){return typeof Bun!=="undefined"?Bun.env:S6D.env}var OP={APP_NAME:r.string(),APP_ENV:r.enum(["local","dev","stage","prod"]),APP_KEY:r.string(),APP_URL:r.string(),PORT:r.number(),PORT_BACKEND:r.number(),PORT_ADMIN:r.number(),PORT_LIBRARY:r.number(),PORT_DESKTOP:r.number(),PORT_EMAIL:r.number(),PORT_DOCS:r.number(),PORT_INSPECT:r.number(),PORT_API:r.number(),PORT_SYSTEM_TRAY:r.number(),APP_MAINTENANCE:r.boolean(),DEBUG:r.boolean(),API_PREFIX:r.string(),DOCS_PREFIX:r.string(),DB_CONNECTION:r.enum(["mysql","sqlite","postgres"]),DB_HOST:r.string(),DB_PORT:r.number(),DB_DATABASE:r.string(),DB_USERNAME:r.string(),DB_PASSWORD:r.string(),AWS_ACCOUNT_ID:r.string(),AWS_ACCESS_KEY_ID:r.string(),AWS_SECRET_ACCESS_KEY:r.string(),AWS_DEFAULT_REGION:r.string(),AWS_DEFAULT_PASSWORD:r.string(),MAIL_MAILER:r.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:r.string(),MAIL_PORT:r.number(),MAIL_USERNAME:r.string(),MAIL_PASSWORD:r.string(),MAIL_ENCRYPTION:r.string(),MAIL_FROM_NAME:r.string(),MAIL_FROM_ADDRESS:r.string(),SEARCH_ENGINE_DRIVER:r.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:r.string(),MEILISEARCH_KEY:r.string(),FRONTEND_APP_ENV:r.enum(["development","staging","production"]),FRONTEND_APP_URL:r.string()};var T6D={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"]},K6D=Object.entries(OP).reduce((D,[F,E])=>{let w;switch(typeof E){case"string":w=r.string();break;case"number":w=r.number();break;case"boolean":w=r.boolean();break;default:if(Array.isArray(E)){w=r.enum(E);break}if(typeof E==="object"){const C=Symbol.for("schema_name"),f=E[C];if(f==="vine.string"){w=r.string();break}if(f==="vine.number"){w=r.number();break}if(f==="vine.boolean"){w=r.boolean();break}if(!f){w=r.enum(T6D.APP_ENV);break}console.error("Unknown env value type",typeof E)}throw new Error(`Invalid env value for ${F}`)}const $=F;return D[$]=w,D},{}),ByD=r.object(K6D);var Q6D={get:(D,F)=>{const E=D[F];if(typeof E==="string"&&/^\d+$/.test(E)&&F!=="AWS_ACCOUNT_ID")return Number(E);if(typeof E==="string"&&/^true|false$/.test(E))return E==="true";if(E instanceof QF)return D[F];if(E instanceof LF)return!!D[F];if(E instanceof HF)return Number(D[F]);return E}},s=new Proxy(H6D(),Q6D);var jP={name:s.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:s.APP_ENV??"local",url:s.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:s.DEBUG??!1,key:s.APP_KEY,maintenanceMode:s.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"};var PP={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:s.AWS_ACCESS_KEY_ID||"",secret:s.AWS_SECRET_ACCESS_KEY||"",region:s.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 yP={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 f7={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}};var kP={type:"serverless",driver:"aws",firewall:f7.firewall,environments:["production","staging","development"],storage:{},api:{prefix:s.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 bP={default:s.DB_CONNECTION||"sqlite",connections:{sqlite:{database:s.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:s.AWS_ACCESS_KEY_ID||"",secret:s.AWS_SECRET_ACCESS_KEY||"",region:s.AWS_DEFAULT_REGION||"us-east-1",prefix:s.DB_DATABASE||"stacks",endpoint:"http://localhost",port:s.DB_PORT||8000},mysql:{name:s.DB_DATABASE||"stacks",host:s.DB_HOST||"127.0.0.1",port:s.DB_PORT||3306,username:s.DB_USERNAME||"root",password:s.DB_PASSWORD||"",prefix:""},postgres:{name:s.DB_DATABASE||"stacks",host:s.DB_HOST||"127.0.0.1",port:s.DB_PORT||3306,username:s.DB_USERNAME||"",password:s.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"};var xP={a:[{name:s.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]};var cP={from:{name:s.MAIL_FROM_NAME||"Stacks",address:s.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:s.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}};var gP={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 rP={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 _P={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}};var sP={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 uP={logsPath:C7("logs/stacks.log"),deploymentsPath:C7("logs/deployments.log")};var dP={default:"email"};var vP={driver:"stripe"};var mP={frontend:s.PORT??3000,backend:s.PORT_BACKEND??3001,admin:s.PORT_ADMIN??3002,library:s.PORT_LIBRARY??3003,desktop:s.PORT_DESKTOP??3004,email:s.PORT_EMAIL??3005,docs:s.PORT_DOCS??3006,inspect:s.PORT_INSPECT??3007,api:s.PORT_API??3008,systemTray:s.PORT_SYSTEM_TRAY??3009,database:3010};var nP={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}};var lP={driver:"opensearch"};var iP={aws:{accountId:s.AWS_ACCOUNT_ID||"",appId:s.AWS_ACCESS_KEY_ID||"",apiKey:s.AWS_SECRET_ACCESS_KEY||"",region:s.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}};var pP={driver:"s3"};var aP={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 oP={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 L6D={ai:NP,analytics:qP,app:jP,cache:PP,cli:yP,cloud:kP,database:bP,dns:xP,email:cP,errors:gP,git:rP,hashing:_P,library:sP,logging:uP,notification:dP,queue:nP,payment:vP,ports:mP,searchEngine:lP,security:f7,services:iP,storage:pP,team:aP,ui:oP},th=L6D;async function tP(D){if(!D?.port)D={port:3000};return console.log("Creating local tunnel",D.port),"localTunnel"}async function u1(D){return await tP({port:D})}async function R6D({domain:D=RD.app.url||"stacks",type:F="frontend",localhost:E=!1,https:w=void 0,network:$=void 0}={}){let C=D.replace(/\.[^.]+$/,".localhost");switch(F){case"frontend":if($)return await u1(RD.ports?.frontend||3000);if(E)return`http://localhost:${RD.ports?.frontend}`;break;case"backend":if($)return await u1(RD.ports?.backend||3001);if(E)return`http://localhost:${RD.ports?.backend}`;C=`api.${C}`;break;case"admin":if($)return await u1(RD.ports?.admin||3002);if(E)return`http://localhost:${RD.ports?.admin}`;C=`admin.${C}`;break;case"library":if($)return await u1(RD.ports?.library||3003);if(E)return`http://localhost:${RD.ports?.library}`;C=`libs.${C}`;break;case"email":if($)return await u1(RD.ports?.email||3005);if(E)return`http://localhost:${RD.ports?.email}`;C=`email.${C}`;break;case"desktop":if($)return await u1(RD.ports?.desktop||3004);if(E)return`http://localhost:${RD.ports?.desktop}`;C=`desktop.${C}`;break;case"docs":if($)return await u1(RD.ports?.docs||3006);if(E)return`http://localhost:${RD.ports?.docs}`;C=`docs.${C}`;break;case"inspect":if($)return await u1(RD.ports?.inspect||3007);if(E)return`http://localhost:${RD.ports?.inspect}`;C=`inspect.${C}`;break;default:if(E)return`http://localhost:${RD.ports?.frontend}`}if(w)return`https://${C}`;return`http://${C}`}function V6D(D){return D}function N6D(D){return D}function q6D(D){return D}function O6D(D){return D}function j6D(D){return D}function P6D(D){return D}function y6D(D){return D}function k6D(D){return D}function b6D(D){return D}function x6D(D){return D}function c6D(D){return D}function g6D(D){return D}function r6D(D){return D}function _6D(D){return D}function s6D(D){return D}function u6D(D){return D}function d6D(D){return D}function v6D(D){return D}function m6D(D){return D}function n6D(D){return D}function l6D(D){return D}function i6D(D){return D}function p6D(D){return D}function a6D(D){return D}function o6D(D){return D}function t6D(D){return D}function e6D(D){return D}function QFD(){if(G6.env==="local")return"dev";if(G6.env==="development")return"dev";if(G6.env==="staging")return"stage";if(G6.env==="production")return"prod";if(!G6.env)throw new Error("Couldn\'t determine app environment");return G6.env}var ID={...oh,...th},eh=ID.ai,DFD=ID.analytics,G6=ID.app,FFD=ID.cache,EFD=ID.cloud,wFD=ID.cli,$FD=ID.database,fFD=ID.dns,CFD=ID.docs,BFD=ID.email,hFD=ID.errors,UFD=ID.git,AFD=ID.hashing,IFD=ID.library,GFD=ID.logging,MFD=ID.notification,YFD=ID.payment,ZFD=ID.ports,XFD=ID.queue,WFD=ID.security,JFD=ID.searchEngine,zFD=ID.services,TFD=ID.storage,KFD=ID.team,SFD=ID.ui;function h7(D,F){let E;if(eB(D))E=D;else if(D instanceof Error)E=D.message;else if(F instanceof Error)E=F.message;else E=String(D);return x8(`ERROR: ${Y0(E)}`),FU.handle(D,F)}async function x8(D,F){const E=`[${new Date().toISOString()}] ${D}\n`;try{const w=F?.logFile??RD.logging.logsPath??"storage/logs/stacks.log";try{await HFD(w)}catch{console.log("Creating log file directory...",w),await Dy(LFD(w),{recursive:!0})}await eP(w,E)}catch(w){console.error("Failed to write to log file:",w)}}class FU{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(D,F){if(this.shouldExitProcess=F?.shouldExit!==!1,F?.silent!==!0)this.writeErrorToConsole(D);let E;if(F?.message)E=F.message;else if(D instanceof Error)E=D.message;else if(typeof D==="string")E=D;else E=JSON.stringify(D);const w=new Error(E);if(D instanceof Error)Object.assign(w,D);return this.writeErrorToFile(w).catch(($)=>console.error($)),w}static handleError(D,F){return this.handle(D,F),D}static async writeErrorToFile(D){if(!(D instanceof Error)){console.error("Error is not an instance of Error:",D);return}const F=`[${new Date().toISOString()}] ${D.name}: ${D.message}\n`,E=DU("stacks.log")??DU("errors.log");try{await Dy(Fy(E),{recursive:!0}),await eP(E,F)}catch(w){console.error("Failed to write to error file:",w)}}static writeErrorToConsole(D){console.error(D);const F=typeof D==="string"?D:D instanceof Error?D.message:JSON.stringify(D);if(F.includes("bunx --bun cdk destroy")||F===`Failed to execute command: ${M6("bunx --bun eslint . --fix")}`||F===`Failed to execute command: ${M6("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)RFD.exit(1)}}function RF(D,F,E,w){function $(C){return C instanceof E?C:new E(function(f){f(C)})}return new(E||(E=Promise))(function(C,f){function B(I){try{U(w.next(I))}catch(A){f(A)}}function h(I){try{U(w.throw(I))}catch(A){f(A)}}function U(I){I.done?C(I.value):$(I.value).then(B,h)}U((w=w.apply(D,[])).next())})}function Ey(D){var F=typeof Symbol==="function"&&Symbol.iterator,E=F&&D[F],w=0;if(E)return E.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&w>=D.length)D=void 0;return{value:D&&D[w++],done:!D}}};throw new TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")}function Y6(D){return this instanceof Y6?(this.v=D,this):new Y6(D)}function qFD(D,F,E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var w=E.apply(D,F||[]),$,C=[];return $={},f("next"),f("throw"),f("return"),$[Symbol.asyncIterator]=function(){return this},$;function f(Y){if(w[Y])$[Y]=function(G){return new Promise(function(Z,z){C.push([Y,G,Z,z])>1||B(Y,G)})}}function B(Y,G){try{h(w[Y](G))}catch(Z){A(C[0][3],Z)}}function h(Y){Y.value instanceof Y6?Promise.resolve(Y.value.v).then(U,I):A(C[0][2],Y)}function U(Y){B("next",Y)}function I(Y){B("throw",Y)}function A(Y,G){if(Y(G),C.shift(),C.length)B(C[0][0],C[0][1])}}function OFD(D){var F,E;return F={},w("next"),w("throw",function($){throw $}),w("return"),F[Symbol.iterator]=function(){return this},F;function w($,C){F[$]=D[$]?function(f){return(E=!E)?{value:Y6(D[$](f)),done:$==="return"}:C?C(f):f}:C}}function jFD(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var F=D[Symbol.asyncIterator],E;return F?F.call(D):(D=typeof Ey==="function"?Ey(D):D[Symbol.iterator](),E={},w("next"),w("throw"),w("return"),E[Symbol.asyncIterator]=function(){return this},E);function w(C){E[C]=D[C]&&function(f){return new Promise(function(B,h){f=D[C](f),$(B,h,f.done,f.value)})}}function $(C,f,B,h){Promise.resolve(h).then(function(U){C({value:U,done:B})},f)}}function H2(D){return new B2(D)}var NFD={withStackTrace:!1},wy=(D,F,E=NFD)=>{const w=F.isOk()?{type:"Ok",value:F.value}:{type:"Err",value:F.error},$=E.withStackTrace?new Error().stack:void 0;return{data:w,message:D,stack:$}};class sD{constructor(D){this._promise=D}static fromSafePromise(D){const F=D.then((E)=>new Q2(E));return new sD(F)}static fromPromise(D,F){const E=D.then((w)=>new Q2(w)).catch((w)=>new B2(F(w)));return new sD(E)}static fromThrowable(D,F){return(...E)=>{return new sD((()=>RF(this,void 0,void 0,function*(){try{return new Q2(yield D(...E))}catch(w){return new B2(F?F(w):w)}}))())}}static combine(D){return kFD(D)}static combineWithAllErrors(D){return bFD(D)}map(D){return new sD(this._promise.then((F)=>RF(this,void 0,void 0,function*(){if(F.isErr())return new B2(F.error);return new Q2(yield D(F.value))})))}andThrough(D){return new sD(this._promise.then((F)=>RF(this,void 0,void 0,function*(){if(F.isErr())return new B2(F.error);const E=yield D(F.value);if(E.isErr())return new B2(E.error);return new Q2(F.value)})))}andTee(D){return new sD(this._promise.then((F)=>RF(this,void 0,void 0,function*(){if(F.isErr())return new B2(F.error);try{yield D(F.value)}catch(E){}return new Q2(F.value)})))}mapErr(D){return new sD(this._promise.then((F)=>RF(this,void 0,void 0,function*(){if(F.isOk())return new Q2(F.value);return new B2(yield D(F.error))})))}andThen(D){return new sD(this._promise.then((F)=>{if(F.isErr())return new B2(F.error);const E=D(F.value);return E instanceof sD?E._promise:E}))}orElse(D){return new sD(this._promise.then((F)=>RF(this,void 0,void 0,function*(){if(F.isErr())return D(F.error);return new Q2(F.value)})))}match(D,F){return this._promise.then((E)=>E.match(D,F))}unwrapOr(D){return this._promise.then((F)=>F.unwrapOr(D))}safeUnwrap(){return qFD(this,arguments,function*D(){return yield Y6(yield Y6(yield*OFD(jFD(yield Y6(this._promise.then((F)=>F.safeUnwrap()))))))})}then(D,F){return this._promise.then(D,F)}}var U7=(D)=>new sD(Promise.resolve(new B2(D))),PFD=sD.fromPromise,yFD=sD.fromSafePromise,gkD=sD.fromThrowable,$y=(D)=>{let F=d1([]);for(let E of D)if(E.isErr()){F=H2(E.error);break}else F.map((w)=>w.push(E.value));return F},kFD=(D)=>sD.fromSafePromise(Promise.all(D)).andThen($y),fy=(D)=>{let F=d1([]);for(let E of D)if(E.isErr()&&F.isErr())F.error.push(E.error);else if(E.isErr()&&F.isOk())F=H2([E.error]);else if(E.isOk()&&F.isOk())F.value.push(E.value);return F},bFD=(D)=>sD.fromSafePromise(Promise.all(D)).andThen(fy),A7;(function(D){function F($,C){return(...f)=>{try{const B=$(...f);return d1(B)}catch(B){return H2(C?C(B):B)}}}D.fromThrowable=F;function E($){return $y($)}D.combine=E;function w($){return fy($)}D.combineWithAllErrors=w})(A7||(A7={}));var d1=(D)=>new Q2(D);class Q2{constructor(D){this.value=D}isOk(){return!0}isErr(){return!this.isOk()}map(D){return d1(D(this.value))}mapErr(D){return d1(this.value)}andThen(D){return D(this.value)}andThrough(D){return D(this.value).map((F)=>this.value)}andTee(D){try{D(this.value)}catch(F){}return d1(this.value)}orElse(D){return d1(this.value)}asyncAndThen(D){return D(this.value)}asyncAndThrough(D){return D(this.value).map(()=>this.value)}asyncMap(D){return sD.fromSafePromise(D(this.value))}unwrapOr(D){return this.value}match(D,F){return D(this.value)}safeUnwrap(){const D=this.value;return function*(){return D}()}_unsafeUnwrap(D){return this.value}_unsafeUnwrapErr(D){throw wy("Called `_unsafeUnwrapErr` on an Ok",this,D)}}class B2{constructor(D){this.error=D}isOk(){return!1}isErr(){return!this.isOk()}map(D){return H2(this.error)}mapErr(D){return H2(D(this.error))}andThrough(D){return H2(this.error)}andTee(D){return H2(this.error)}andThen(D){return H2(this.error)}orElse(D){return D(this.error)}asyncAndThen(D){return U7(this.error)}asyncAndThrough(D){return U7(this.error)}asyncMap(D){return U7(this.error)}unwrapOr(D){return D}match(D,F){return F(this.error)}safeUnwrap(){const D=this.error;return function*(){throw yield H2(D),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(D){throw wy("Called `_unsafeUnwrap` on an Err",this,D)}_unsafeUnwrapErr(D){return this.error}}var xFD=A7.fromThrowable;QU();I7();M7();CE();function $ED(){const D=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,F=RU();if(D.test(F))return 4;return 3}var IE={...T7({level:$ED()}),warning:(D)=>console.warn(D),dump:(...D)=>console.log(...D),dd:(...D)=>{console.log(...D),K7.exit(1)},echo:(D)=>console.log(D)};var m1={info:async(D,F)=>{if(F?.styled===!1)console.log(D);else IE.info(D);await x8(`INFO: ${Y0(D)}`)},success:async(D,F)=>{if(F?.styled===!1)console.log(D);else IE.success(D);await x8(`SUCCESS: ${Y0(D)}`)},warn:async(D,F)=>{if(F?.styled===!1)console.log(D);else IE.warn(D);await x8(`WARN: ${Y0(D)}`)},warning:async(D,F)=>{if(F?.styled===!1)console.log(D);else IE.warn(D);await x8(`WARN: ${Y0(D)}`)},error:async(D,F)=>{h7(D,F)},debug:async(...D)=>{const E=`DEBUG: ${D.map((w)=>typeof w==="object"?JSON.stringify(w,null,2):w).join(" ")}`;if(K7.env.APP_ENV==="production"||K7.env.APP_ENV==="prod")return x8(E);IE.debug(E),await x8(Y0(E))},dump:(...D)=>D.forEach((F)=>console.log(F)),dd:(...D)=>{D.forEach((F)=>console.log(F)),K7.exit(1)},echo:(...D)=>console.log(...D)};function RP(D){return $7(`database/${D||""}`)}function CED(D){return $7(`app/${D||""}`)}function VP(D){return CED(`Commands/${D||""}`)}function DU(D){return C7(`logs/${D||""}`)}function $7(D="",F){let E=sy.cwd();while(E.includes("storage"))E=_y(E,"..");const w=_y(E,D);if(F?.relative)return fED(sy.cwd(),w);return w}function C7(D){return $7(`storage/${D||""}`)}var I4D=Q(ec(),1);import G4D from"process";function eU(D){if(Array.isArray(D))return[...D];return{...D}}function Dg(D){if(Array.isArray(D))return D;return[D]}function _7(D,...F){Dg(F).forEach((E)=>{delete D[E]})}function K1(D){return typeof D==="object"&&!Array.isArray(D)&&D!==null}var e1=(D)=>Array.isArray(D),Z0=(D)=>typeof D==="function";function W6(D,F){try{return F.split(".").reduce((E,w)=>E[w],D)}catch(E){return D}}function PF(D){if(Array.isArray(D))return[...D];if("all"in D&&typeof D.all==="function")return D.all();return Object.values(D)}function Fg(D){return new BD(D)}function Y4D(){let D=-1;return{next:()=>{return D+=1,{value:this.items[D],done:D>=this.items.length}}}}class BD{items;constructor(D=[]){this.items=D}[Symbol.iterator]=Y4D;toJSON(){return this.items}all(){return this.items}average(D){if(D===void 0)return this.sum()/Number(this.items.length);if(Z0(D))return Number(new this.constructor(this.items).sum(D))/Number(this.items.length);return Number(new this.constructor(this.items).pluck(D).sum())/Number(this.items.length)}avg=this.average;chunk(D){const F=[],E=Array.isArray(this.items)?this.items:Object.values(this.items);for(let w=0;w<E.length;w+=D)F.push(E.slice(w,w+D));return new BD(F)}collapse(){return new this.constructor([].concat(...this.items))}combine(D){if(typeof D==="string")D=[D];if(!Array.isArray(D))throw new TypeError("The values must be an array or a string");const F={};return(Array.isArray(this.items)?this.items:Object.keys(this.items)).forEach((w,$)=>{if(D[$]!==void 0)F[w]=D[$]}),new BD(F)}concat(D){let F=D;if(D instanceof this.constructor)F=D.all();else if(typeof D==="object")F=[],Object.keys(D).forEach((w)=>{F.push(D[w])});const E=eU(this.items);return F.forEach((w)=>{if(typeof w==="object")Object.keys(w).forEach(($)=>E.push(w[$]));else E.push(w)}),new this.constructor(E)}contains(D,F){if(typeof D==="function")return this.items.some(D);if(Array.isArray(this.items))return this.items.includes(D);if(F!==void 0){if(Array.isArray(this.items))return this.items.some((E)=>E[D]!==void 0&&E[D]===F);return D in this.items&&this.items[D]===F}if(Array.isArray(this.items))return this.items.includes(D);return Object.values(this.items).includes(D)}containsOneItem(){if(typeof this.items==="string")return!0;return Object.keys(this.items).length===1}count(D){if(D)return this.filter(D).count();return Object.keys(this.items).length}countBy(D){const F={};return this.each((E)=>{const w=D?D(E):E;F[w]=(F[w]||0)+1}),new BD(F)}crossJoin(...D){function F(E,w,$){let C=$[0];if(C instanceof BD)C=C.all();const f=$.slice(1),B=!f.length;let h=[];for(let U=0;U<C.length;U+=1){const I=E.slice();if(I.push(C[U]),B)h.push(I);else h=h.concat(F(I,w,f))}return h}return new this.constructor(F([],this.constructor,[].concat([this.items],D)))}dd(){console.log(JSON.stringify(this.all(),null,2)),G4D.exit()}diff(D){let F;if(D instanceof this.constructor)F=D.all();else F=D;const E=this.items.filter((w)=>!F.includes(w));return new this.constructor(E)}diffAssoc(D){let F=D;if(D instanceof this.constructor)F=D.all();const E={};return Object.keys(this.items).forEach((w)=>{if(F[w]===void 0||F[w]!==this.items[w])E[w]=this.items[w]}),new this.constructor(E)}diffKeys(D){let F;if(D instanceof this.constructor)F=D.all();else F=D;const E=Object.keys(F),w=Object.keys(this.items).filter(($)=>!E.includes($));return new this.constructor(this.items).only(w)}diffUsing(D,F){if(console.log("Original collection:",this.items),console.log("Array to compare:",D),D===null)return new BD(this.items);const E=this.items.filter((w)=>{return D.findIndex((C)=>{return F(w,C)===0})===-1});return new BD(E)}doesntContain(D,F){if(console.log("doesntContain called with:",{key:D,value:F}),typeof D==="function")return console.log("Function branch"),!this.contains(D);if(F!==void 0)return console.log("Key-value pair branch"),!this.contains((E)=>{return console.log("Comparing:",E[D],"with",F),E[D]===F});return console.log("Single value branch"),!this.contains(D)}dump(){return console.log(this.items),this}duplicates(){const D=[],F={},E=(w)=>{if(Array.isArray(w)||typeof w==="object")return JSON.stringify(w);return w};if(Array.isArray(this.items))this.items.forEach((w,$)=>{const C=E(w);if(!D.includes(C))D.push(C);else F[$]=w});else if(typeof this.items==="object")Object.keys(this.items).forEach((w)=>{const $=E(this.items[w]);if(!D.includes($))D.push($);else F[w]=this.items[w]});return new this.constructor(F)}each(D){let F=!1;if(Array.isArray(this.items)){const{length:E}=this.items;for(let w=0;w<E&&!F;w+=1)F=D(this.items[w],w,this.items)===!1}else{const E=Object.keys(this.items),{length:w}=E;for(let $=0;$<w&&!F;$+=1){const C=E[$];F=D(this.items[C],C,this.items)===!1}}return this}eachSpread(D){return this.each((F,E)=>{D(...F,E)}),this}every(D){return PF(this.items).every(D)}except(D){const F={...this.items};return(Array.isArray(D)?D:[D]).forEach((w)=>delete F[w]),new BD(F)}filter(D){if(console.log("Filter method called with callback:",D),console.log("Current items:",this.items),typeof D!=="function"){console.log("No callback provided, removing falsy values");const E=this.items.filter((w)=>{return console.log("Filtering item:",w),Boolean(w)});return console.log("Filtered items:",E),new BD(E)}const F=this.items.filter((E,w)=>{return console.log("Filtering item:",E,"at index:",w),D(E,w)});return console.log("Filtered items:",F),new BD(F)}first(D,F){if(Z0(D)){const E=Object.keys(this.items);for(let w=0;w<E.length;w+=1){const $=E[w],C=this.items[$];if(D(C,$))return C}if(Z0(F))return F();return F}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];const E=Object.keys(this.items)[0];return this.items[E]}if(Z0(F))return F();return F}firstOrFail(D){const F=this.items.find(D||(()=>!0));if(F===void 0)throw new Error("Item not found.");return F}firstWhere(D,F,E){return this.where(D,F,E).first()||null}flatMap(D){return this.map(D).collapse()}flatten(D=Number.POSITIVE_INFINITY){const F=(E,w)=>{if(!Array.isArray(E)&&typeof E!=="object")return[E];return w>0?Object.values(E).reduce(($,C)=>$.concat(Array.isArray(C)||typeof C==="object"?F(C,w-1):C),[]):Array.isArray(E)?[...E]:[E]};return new BD(F(this.items,D))}flip(){const D={};if(Array.isArray(this.items))this.items.forEach((F,E)=>{D[F]=E});else Object.entries(this.items).forEach(([F,E])=>{D[E]=F});return new this.constructor(D)}forPage(D,F){let E={};if(Array.isArray(this.items))E=this.items.slice(D*F-F,D*F);else Object.keys(this.items).slice(D*F-F,D*F).forEach((w)=>{E[w]=this.items[w]});return new this.constructor(E)}forget(D){if(Array.isArray(this.items))this.items=this.items.filter((F,E)=>E!==Number.parseInt(D,10));else if(typeof this.items==="object"&&this.items!==null)delete this.items[D];return this}get(D,F=null){if(Array.isArray(this.items))return this.items[D]??F;return this.items[D]??F}groupBy(D){const F={};return this.each((E,w)=>{const $=typeof D==="function"?D(E):E[D];if(!($ in F))F[$]=new BD;F[$].push(E)}),new BD(F)}has(D){if(Array.isArray(this.items))return D in this.items;return D in this.items}implode(D,F){if(F===void 0)return this.items.join(D);return new this.constructor(this.items).pluck(D).all().join(F)}includes(D){if(Array.isArray(this.items))return this.items.includes(D);return Object.values(this.items).includes(D)}intersect(D){let F=D;if(D instanceof this.constructor)F=D.all();const E=this.items.filter((w)=>F.includes(w));return new this.constructor(E)}intersectByKeys(D){let F=Object.keys(D);if(D instanceof this.constructor)F=Object.keys(D.all());const E={};return Object.keys(this.items).forEach((w)=>{if(F.includes(w))E[w]=this.items[w]}),new this.constructor(E)}isEmpty(){return this.count()===0}isNotEmpty(){return!this.isEmpty()}join(D,F){const E=this.values();if(F===void 0)return E.implode(D);const w=E.count();if(w===0)return"";if(w===1)return E.last();const $=E.pop();return E.implode(D)+F+$}keyBy(D){const F={};if(Z0(D))this.items.forEach((E)=>{F[D(E)]=E});else this.items.forEach((E)=>{const w=W6(E,D);F[w||""]=E});return new this.constructor(F)}keys(){return new BD(Object.keys(this.items))}last(D,F){let{items:E}=this;if(Z0(D))E=this.filter(D).all();if(Array.isArray(E)&&!E.length||!Object.keys(E).length){if(Z0(F))return F();return F}if(Array.isArray(E))return E[E.length-1];const w=Object.keys(E);return E[w[w.length-1]]}macro(D,F){this.constructor.prototype[D]=F}make(D=[]){return new this.constructor(D)}map(D){if(Array.isArray(this.items))return new this.constructor(this.items.map(D));const F={};return Object.keys(this.items).forEach((E)=>{F[E]=D(this.items[E],Number(E))}),new this.constructor(F)}mapSpread(D){return this.map((F,E)=>D(...F,E))}mapToDictionary(D){const F={};return this.items.forEach((E,w)=>{const[$,C]=D(E,w);if(F[$]===void 0)F[$]=[C];else F[$].push(C)}),new this.constructor(F)}mapInto(D){return this.map((F,E)=>new D(F,E))}mapToGroups(D){const F={};return this.items.forEach((E,w)=>{const[$,C]=D(E,w);if(F[$]===void 0)F[$]=[C];else F[$].push(C)}),new this.constructor(F)}mapWithKeys(D){const F={};if(Array.isArray(this.items))this.items.forEach((E,w)=>{const[$,C]=D(E,w);F[$]=C});else Object.keys(this.items).forEach((E)=>{const[w,$]=D(this.items[E],Number(E));F[w]=$});return new this.constructor(F)}max(D){if(typeof D==="string"){const F=this.items.filter((E)=>E[D]!==void 0);return Math.max(...F.map((E)=>E[D]))}return Math.max(...this.items)}median(D){const{length:F}=this.items;if(D===void 0){if(F%2===0)return(this.items[F/2-1]+this.items[F/2])/2;return this.items[Math.floor(F/2)]}if(F%2===0)return(this.items[F/2-1][D]+this.items[F/2][D])/2;return this.items[Math.floor(F/2)][D]}merge(D){const F={...this.items,...D};return new BD(F)}mergeRecursive(D){const F=(E,w)=>{const $={};return Object.keys({...E,...w}).forEach((f)=>{if(E[f]===void 0&&w[f]!==void 0)$[f]=w[f];else if(E[f]!==void 0&&w[f]===void 0)$[f]=E[f];else if(E[f]!==void 0&&w[f]!==void 0)if(E[f]===w[f])$[f]=E[f];else if(!Array.isArray(E[f])&&typeof E[f]==="object"&&!Array.isArray(w[f])&&typeof w[f]==="object")$[f]=F(E[f],w[f]);else $[f]=[].concat(E[f],w[f])}),$};if(!D)return this;if(D.constructor.name==="Collection")return new this.constructor(F(this.items,D.all()));return new this.constructor(F(this.items,D))}min(D){if(D!==void 0){const F=this.items.filter((E)=>E[D]!==void 0);return Math.min(...F.map((E)=>E[D]))}return Math.min(...this.items)}mode(D){const F=[];let E=1;if(!this.items.length)return null;return this.items.forEach((w)=>{const $=F.filter((C)=>{if(D!==void 0)return C.key===w[D];return C.key===w});if(!$.length)if(D!==void 0)F.push({key:w[D],count:1});else F.push({key:w,count:1});else{$[0].count+=1;const{count:C}=$[0];if(C>E)E=C}}),F.filter((w)=>w.count===E).map((w)=>w.key)}nth(D,F=0){const w=PF(this.items).slice(F).filter(($,C)=>C%D===0);return new this.constructor(w)}only(D){const F={};return D.forEach((E)=>{if(E in this.items)F[E]=this.items[E]}),new BD(F)}pad(D,F){const E=Math.abs(D),w=this.count();if(E<=w)return this;let $=E-w;const C=eU(this.items),f=Array.isArray(this.items),B=D<0;for(let h=0;h<$;){if(!f)if(C[h]!==void 0)$+=1;else C[h]=F;else if(B)C.unshift(F);else C.push(F);h+=1}return new this.constructor(C)}partition(D){let F;if(Array.isArray(this.items))F=[new this.constructor([]),new this.constructor([])],this.items.forEach((E)=>{if(D(E)===!0)F[0].push(E);else F[1].push(E)});else F=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach((E)=>{const w=this.items[E];if(D(w)===!0)F[0].put(E,w);else F[1].put(E,w)});return new this.constructor(F)}pipe(D){return D(this)}pluck(D,F){if(D.includes("*")){const E=M4D(this.items),w=[];if(F!==void 0){const B=new RegExp(`0.${F}`,"g"),h=`0.${F}`.split(".").length;Object.keys(E).forEach((U)=>{const I=U.match(B);if(I){const A=I[0];if(A.split(".").length===h)w.push(E[A])}})}const $=[],C=new RegExp(`0.${D}`,"g"),f=`0.${D}`.split(".").length;if(Object.keys(E).forEach((B)=>{const h=B.match(C);if(h){const U=h[0];if(U.split(".").length===f)$.push(E[U])}}),F!==void 0){const B={};return this.items.forEach((h,U)=>{B[w[U]||""]=$}),new this.constructor(B)}return new this.constructor([$])}if(F!==void 0){const E={};return this.items.forEach((w)=>{if(W6(w,D)!==void 0)E[w[F]||""]=W6(w,D);else E[w[F]||""]=null}),new this.constructor(E)}return this.map((E)=>{if(W6(E,D)!==void 0)return W6(E,D);return null})}pop(D=1){if(this.isEmpty())return null;if(e1(this.items)){if(D===1)return this.items.pop();return new this.constructor(this.items.splice(-D))}if(K1(this.items)){const F=Object.keys(this.items);if(D===1){const $=F[F.length-1],C=this.items[$];return _7(this.items,$),C}const E=F.slice(-D),w=E.reduce(($,C)=>{return $[C]=this.items[C],$},{});return _7(this.items,E),new this.constructor(w)}return null}prepend(D,F){if(F!==void 0)return this.put(F,D);return this.items.unshift(D),this}pull(D,F=null){if(Array.isArray(this.items)){const w=Number(D);if(Number.isNaN(w))return F;const $=this.items[w];return this.items.splice(w,1),$??F}const E=this.items[D];return delete this.items[D],E??F}push(...D){return this.items=[...this.items,...D],this}put(D,F){return this.items[D]=F,this}random(D=null){const F=PF(this.items),E=new this.constructor(F).shuffle();if(D!==Number.parseInt(D,10))return E.first();return E.take(D)}reduce(D,F){let E=null;if(F!==void 0)E=F;if(Array.isArray(this.items))this.items.forEach((w)=>{E=D(E,w)});else Object.keys(this.items).forEach((w)=>{E=D(E,this.items[w],w)});return E}reject(D){return new this.constructor(this.items).filter((F)=>!D(F))}replace(D){if(!D)return this;if(Array.isArray(D)){const E=this.items.map((w,$)=>D[$]||w);return new this.constructor(E)}if(D.constructor.name==="Collection"){const E={...this.items,...D.all()};return new this.constructor(E)}const F={...this.items,...D};return new this.constructor(F)}replaceRecursive(D){const F=(E,w)=>{const $={...E};return Object.keys({...E,...w}).forEach((f)=>{if(!Array.isArray(w[f])&&typeof w[f]==="object")$[f]=F(E[f],w[f]);else if(E[f]===void 0&&w[f]!==void 0)if(typeof E[f]==="object")$[f]={...w[f]};else $[f]=w[f];else if(E[f]!==void 0&&w[f]===void 0)if(typeof E[f]==="object")$[f]={...E[f]};else $[f]=E[f];else if(E[f]!==void 0&&w[f]!==void 0)if(typeof w[f]==="object")$[f]={...w[f]};else $[f]=w[f]}),$};if(!D)return this;if(!Array.isArray(D)&&typeof D!=="object")return new this.constructor(F(this.items,[D]));if(D.constructor.name==="Collection")return new this.constructor(F(this.items,D.all()));return new this.constructor(F(this.items,D))}reverse(){const D=[].concat(this.items).reverse();return new this.constructor(D)}search(D,F){let E;const w=($,C)=>{if(Z0(D))return D(this.items[C],C);if(F)return this.items[C]===D;return this.items[C]==D};if(e1(this.items))E=this.items.findIndex(w);else if(K1(this.items))E=Object.keys(this.items).find(($)=>w(this.items[$],$));if(E===void 0||E<0)return!1;return E}shift(D=1){if(this.isEmpty())return null;if(e1(this.items)){if(D===1)return this.items.shift();return new this.constructor(this.items.splice(0,D))}if(K1(this.items)){if(D===1){const $=Object.keys(this.items)[0],C=this.items[$];return delete this.items[$],C}const E=Object.keys(this.items).slice(0,D),w=E.reduce(($,C)=>{return $[C]=this.items[C],$},{});return _7(this.items,E),new this.constructor(w)}return null}shuffle(){const D=PF(this.items);let F,E,w;for(w=D.length;w;w-=1)F=Math.floor(Math.random()*w),E=D[w-1],D[w-1]=D[F],D[F]=E;return this.items=D,this}skip(D){if(K1(this.items))return new this.constructor(Object.keys(this.items).reduce((F,E,w)=>{if(w+1>D)F[E]=this.items[E];return F},{}));return new this.constructor(this.items.slice(D))}skipUntil(D){let F=null,E,w=($)=>$===D;if(Z0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!0)F=w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!0)F=w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}skipWhile(D){let F=null,E,w=($)=>$===D;if(Z0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!0)F=!w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!0)F=!w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}slice(D,F){let E=this.items.slice(D);if(F!==void 0)E=E.slice(0,F);return new this.constructor(E)}sole(){if(this.items.length!==1)throw new Error("Collection does not contain exactly one item.");return this.items[0]}some(D){return this.items.some((F)=>F.hasOwnProperty(D))}sort(D){const F=[].concat(this.items);if(D===void 0)if(this.every((E)=>typeof E==="number"))F.sort((E,w)=>E-w);else F.sort();else F.sort(D);return new this.constructor(F)}sortDesc(){return this.sort().reverse()}sortBy(D){const F=[].concat(this.items),E=(w)=>{if(Z0(D))return D(w);return W6(w,D)};return F.sort((w,$)=>{const C=E(w),f=E($);if(C===null||C===void 0)return 1;if(f===null||f===void 0)return-1;if(C<f)return-1;if(C>f)return 1;return 0}),new this.constructor(F)}sortByDesc(D){return this.sortBy(D).reverse()}sortKeys(){const D={};return Object.keys(this.items).sort().forEach((F)=>{D[F]=this.items[F]}),new this.constructor(D)}sortKeysDesc(){const D={};return Object.keys(this.items).sort().reverse().forEach((F)=>{D[F]=this.items[F]}),new this.constructor(D)}splice(D,F,E){const w=this.slice(D,F);if(this.items=this.diff(w.all()).all(),Array.isArray(E))for(let $=0,{length:C}=E;$<C;$+=1)this.items.splice(D+$,0,E[$]);return w}split(D){const F=this.toArray(),E=[],w=Math.ceil(F.length/D);for(let $=0;$<F.length;$+=w)E.push(F.slice($,$+w));return new BD(E)}sum(D){const F=PF(this.items);let E=0;if(D===void 0)for(let w=0,{length:$}=F;w<$;w+=1)E+=Number.parseFloat(F[w]);else if(Z0(D))for(let w=0,{length:$}=F;w<$;w+=1)E+=Number.parseFloat(D(F[w]));else for(let w=0,{length:$}=F;w<$;w+=1)E+=Number.parseFloat(F[w][D]);return Number.parseFloat(E.toPrecision(12))}take(D){if(!Array.isArray(this.items)&&typeof this.items==="object"){const F=Object.keys(this.items);let E;if(D<0)E=F.slice(D);else E=F.slice(0,D);const w={};return F.forEach(($)=>{if(E.includes($))w[$]=this.items[$]}),new this.constructor(w)}if(D<0)return new this.constructor(this.items.slice(D));return new this.constructor(this.items.slice(0,D))}takeUntil(D){let F=null,E,w=($)=>$===D;if(Z0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!1)F=!w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!1)F=!w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}takeWhile(D){let F=null,E,w=($)=>$===D;if(Z0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!1)F=w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!1)F=w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}tap(D){return D(this),this}times(D,F){for(let E=1;E<=D;E+=1)this.items.push(F(E));return this}toArray(){return Array.isArray(this.items)?this.items:Object.values(this.items)}toJson(){return JSON.stringify(this.items)}transform(D){if(Array.isArray(this.items))this.items=this.items.map(D);else{const F={};Object.keys(this.items).forEach((E)=>{F[E]=D(this.items[E],E)}),this.items=F}return this}undot(){if(Array.isArray(this.items))return this;let D={};return Object.keys(this.items).forEach((F)=>{if(F.includes(".")){const E=D;F.split(".").reduce((w,$,C,f)=>{if(!w[$])w[$]={};if(C===f.length-1)w[$]=this.items[F];return w[$]},E),D={...D,...E}}else D[F]=this.items[F]}),new this.constructor(D)}unless(D,F,E){if(!D)return F(this);if(E)return E();return}unlessEmpty(D){if(!this.isEmpty())D(this);return this}unlessNotEmpty(D){if(this.isEmpty())D(this);return this}union(D){const F=JSON.parse(JSON.stringify(this.items));return Object.keys(D).forEach((E)=>{if(this.items[E]===void 0)F[E]=D[E]}),new this.constructor(F)}unique(){const D=Array.from(new Set(this.items));return new this.constructor(D)}unwrap(){return this.items}values(){return new BD(Object.values(this.items))}when(D,F,E){if(D)F(this,D);else if(E)E();return this}whenEmpty(D,F){if(Array.isArray(this.items)&&!this.items.length)return D(this);if(!Object.keys(this.items).length)return D(this);if(F!==void 0){if(Array.isArray(this.items)&&this.items.length)return F(this);if(Object.keys(this.items).length)return F(this)}return this}whenNotEmpty(D,F){if(Array.isArray(this.items)&&this.items.length)return D(this);if(Object.keys(this.items).length)return D(this);if(F!==void 0){if(Array.isArray(this.items)&&!this.items.length)return F(this);if(!Object.keys(this.items).length)return F(this)}return this}where(D,F,E){if(arguments.length===1)return new BD(this.items.filter(($)=>$[D]!==void 0));if(arguments.length===2)E=F,F="===";const w=($,C,f,B)=>{const h=$[C];switch(B){case"===":return h===f;case"!==":return h!==f;case"<":return h<f;case"<=":return h<=f;case">":return h>f;case">=":return h>=f;default:return h==f}};return new BD(this.items.filter(($)=>w($,D,E,F)))}whereBetween(D,F){return this.filter((E)=>{const w=typeof E==="object"?E[D]:E;return w>=F[0]&&w<=F[1]})}whereIn(D,F){return this.filter((E)=>{const w=typeof E==="object"?E[D]:E;return F.includes(w)})}whereNotBetween(D,F){return this.filter((E)=>{const w=typeof E==="object"?E[D]:E;return w<F[0]||w>F[1]})}whereNotIn(D,F){const E=this.items.filter((w)=>{const $=D.split(".");let C=w;for(let f of $){if(C[f]===void 0)return!0;C=C[f]}return!F.includes(C)});return new BD(E)}getNestedValue(D,F){return F.split(".").reduce((w,$)=>w&&w[$]!==void 0?w[$]:null,D)}whereInstanceOf(D){return this.filter((F)=>F instanceof D)}whereNotNull(D){return this.where(D,"!==",null)}whereNull(D){return this.where(D,"===",null)}static wrap(D){if(D instanceof BD)return D;return new BD(Array.isArray(D)?D:[D])}static unwrap(D){if(D instanceof BD)return D.all();return D}wrap(D){if(D instanceof BD)return D;if(typeof D==="object")return new BD(D);return new BD([D])}zip(...D){const F=D.map((w)=>this.constructor.wrap(w).all()),E=this.items.map((w,$)=>{const C=[w];return F.forEach((f)=>{C.push(f[$])}),new this.constructor(C)});return new this.constructor(E)}}var M4D=function D(F){const E={};return F.forEach((w,$)=>{function C(f,B){if(K1(f))Object.keys(f).forEach((h)=>{C(f[h],`${B}.${h}`)});else if(e1(f))f.forEach((h,U)=>{C(h,`${B}.${U}`)});E[B]=f}C(w,$)}),E};CE();function o(D,F,E=1){const w=`\x1B[${D}m`,$=`\x1B[${F}m`,C=new RegExp(`\\x1b\\[${F}m`,"g");return(f)=>{return Eg.enabled&&Eg.supportLevel>=E?w+(""+f).replace(C,w)+$:""+f}}var J6=!0,yF=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{},QE=0;if(yF.process&&yF.process.env&&yF.process.stdout){const{FORCE_COLOR:D,NODE_DISABLE_COLORS:F,NO_COLOR:E,TERM:w,COLORTERM:$}=yF.process.env;if(F||E||D==="0")J6=!1;else if(D==="1"||D==="2"||D==="3")J6=!0;else if(w==="dumb")J6=!1;else if("CI"in yF.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((C)=>(C in yF.process.env)))J6=!0;else J6=process.stdout.isTTY;if(J6)if(process.platform==="win32")QE=3;else if($&&($==="truecolor"||$==="24bit"))QE=3;else if(w&&(w.endsWith("-256color")||w.endsWith("256")))QE=2;else QE=1}var Eg={enabled:J6,supportLevel:QE},Z4D=o(0,0),wg=o(1,22),$g=o(2,22),M6=o(3,23),X4D=o(4,24),W4D=o(7,27),J4D=o(8,28),z4D=o(9,29),T4D=o(30,39),K4D=o(31,39),fg=o(32,39),S4D=o(33,39),Q4D=o(34,39),H4D=o(35,39),Cg=o(36,39),L4D=o(97,39),Bg=o(90,39),R4D=o(37,39),V4D=o(91,39),N4D=o(92,39),q4D=o(93,39),O4D=o(94,39),j4D=o(95,39),P4D=o(96,39),y4D=o(40,49),k4D=o(41,49),b4D=o(42,49),x4D=o(43,49),c4D=o(44,49),g4D=o(45,49),hg=o(46,49),r4D=o(107,49),_4D=o(100,49),s4D=o(101,49),u4D=o(102,49),d4D=o(103,49),v4D=o(104,49),m4D=o(105,49),n4D=o(106,49),l4D=o(47,49);var tgD=Fg(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don\u2019t let yesterday take up too much of today.","You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.","It\u2019s not whether you get knocked down, it\u2019s whether you get up.","If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can\u2019t, you\u2019re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]);import p4D from"process";function RU(D){if(Array.isArray(D)){if(D=Array.from(new Set(D)),Array.isArray(D)&&D[0]&&!D[0].startsWith("-"))D.shift();return D.join(" ")}if(typeof D==="object"&&D!==null)return Object.entries(D).map(([F,E])=>{if(E===!0)return`--${F}`;return`--${F} ${E}`}).join(" ");return RU(p4D.argv.slice(2))}var Jg=Q(Wg(),1);async function srD(){D7D.env.AWS_REGION="us-east-1";const D=await T2()(),F=eh.models;if(!F)throw new Error("No AI models found. Please set ./config/ai.ts values.");for(let E of F)try{m1.info(`Requesting access to model ${E}`);const w={host:"bedrock.us-east-1.amazonaws.com",method:"POST",path:"/foundation-model-entitlement",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelId:E}),service:"bedrock",region:"us-east-1"},$=Jg.default.sign(w,D),C=Object.fromEntries(Object.entries($.headers||{}).map(([h,U])=>[h,String(U)])),B=await(await fetch(`https://${$.host}${$.path}`,{method:$.method,headers:C,body:$.body})).json();m1.info(`Response for model ${E}:`,B)}catch(w){m1.error(`Error requesting access to model ${E}:`,w)}}export{YqD as summarize,srD as requestModelAccess,vOD as listFoundationModels,IqD as invokeModelWithResponseStream,AqD as invokeModel,dOD as getModelCustomizationJob,uOD as createModelCustomizationJob,p3 as client,ZqD as ask,YF as InvokeModelCommand};
206
+ const NOT_AN_ARRAY = '${D.array}';`}function VO(){let D=0;const F={};return{toJSON(){return F},track(E){D++;const w=`ref://${D}`;return F[w]=E,w},trackValidation(E){return this.track(E)},trackParser(E){return this.track(E)},trackTransformer(E){return this.track(E)},trackConditional(E){return this.track(E)}}}var Y8D=class D{#D="";newLine="\n";writeStatement(F){this.#D=`${this.#D}${this.newLine}${F}`}child(){return new D}toString(){return this.#D}flush(){this.#D=""}},SF=class{#D;#F;field;constructor(D,F,E,w){if(this.#F=w,this.#D=D,this.#F)this.field=this.#F;else F.variablesCounter++,this.field=F.createFieldFor(D,E)}defineField(D){if(!this.#F)D.writeStatement(Z8D({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}))}},J8D=class extends SF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(){const D=this.#F.child(),F={type:"tuple",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((E)=>{this.#E.compileNode(E,D,F)}),D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(fE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=E7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${KO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:this.#D.allowUnknownProperties?`copyProperties(${this.field.variableName}.value)`:"[]"})}${this.#w()}`}),F=TO({variableName:this.field.variableName,guardedCodeSnippet:`${$E({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#F.newLine}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${wE({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},T8D=class extends SF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(){const D=this.#F.child();this.#E.compileNode(this.#D.each,D,{type:"array",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath});const F=this.#F.child();return F.writeStatement(z8D({variableName:this.field.variableName,startingIndex:0,loopCodeSnippet:D.toString()})),D.flush(),F.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(fE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=E7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${KO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"[]"})}${this.#F.newLine}${this.#w()}`}),F=TO({variableName:this.field.variableName,guardedCodeSnippet:`${$E({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#F.newLine}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${wE({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},S8D=class extends SF{#D;#F;#E;#w;constructor(D,F,E,w,$){super(D,E,w,$);this.#F=D,this.#E=F,this.#w=w,this.#D=E}#$(){const D=this.#E.child();if(this.#F.conditions.forEach((F,E)=>{const w=this.#E.child();if("parseFnId"in F.schema)w.writeStatement(K8D({parseFnRefId:F.schema.parseFnId,variableName:this.field.variableName}));this.#D.compileNode(F.schema,w,this.#w,this.field),D.writeStatement(QO({conditional:E===0?"if":"else if",variableName:this.field.variableName,conditionalFnRefId:F.conditionalFnRefId,guardedCodeSnippet:w.toString()})),w.flush()}),this.#F.elseConditionalFnRefId&&this.#F.conditions.length)D.writeStatement(SO({variableName:this.field.variableName,conditionalFnRefId:this.#F.elseConditionalFnRefId}));return D.toString()}compile(){this.defineField(this.#E),this.#E.writeStatement(this.#$())}},H8D=class extends SF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(){const D=this.#F.child(),F=this.#F.child();return this.#E.compileNode(this.#D.each,F,{type:"record",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath}),D.writeStatement(Q8D({variableName:this.field.variableName,loopCodeSnippet:F.toString()})),F.flush(),D.toString()}compile(){this.defineField(this.#F),this.#F.writeStatement(fE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=E7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${LO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#w()}`}),F=HO({variableName:this.field.variableName,guardedCodeSnippet:`${$E({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${this.#F.newLine}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${wE({allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,variableName:this.field.variableName,conditional:"else if"})}`)}},V8D=class extends SF{#D;#F;#E;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F,this.#E=E}#w(D){let F=D.properties.map((w)=>w.fieldName);const E=D.groups.flatMap((w)=>this.#$(w));return F.concat(E)}#$(D){return D.conditions.flatMap((F)=>{return this.#w(F.schema)})}#f(){const D=this.#F.child(),F={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.properties.forEach((E)=>this.#E.compileNode(E,D,F)),D.toString()}#C(){const D=this.#F.child(),F={type:"object",fieldPathExpression:this.field.fieldPathExpression,outputExpression:this.field.outputExpression,variableName:this.field.variableName,wildCardPath:this.field.wildCardPath};return this.#D.groups.forEach((E)=>this.#B(E,D,F)),D.toString()}#B(D,F,E){if(D.conditions.forEach((w,$)=>{const C=F.child();w.schema.properties.forEach((f)=>{this.#E.compileNode(f,C,E)}),w.schema.groups.forEach((f)=>{this.#B(f,C,E)}),F.writeStatement(QO({variableName:this.field.variableName,conditional:$===0?"if":"else if",conditionalFnRefId:w.conditionalFnRefId,guardedCodeSnippet:C.toString()}))}),D.elseConditionalFnRefId&&D.conditions.length)F.writeStatement(SO({variableName:this.field.variableName,conditionalFnRefId:D.elseConditionalFnRefId}))}compile(){this.defineField(this.#F),this.#F.writeStatement(fE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName}));const D=E7({variableName:this.field.variableName,bail:this.#D.bail,guardedCodeSnippet:`${LO({variableName:this.field.variableName,outputExpression:this.field.outputExpression,outputValueExpression:"{}"})}${this.#F.newLine}${this.#f()}${this.#F.newLine}${this.#C()}${this.#F.newLine}${R8D({variableName:this.field.variableName,allowUnknownProperties:this.#D.allowUnknownProperties,fieldsToIgnore:this.#D.allowUnknownProperties?this.#w(this.#D):[]})}`}),F=HO({variableName:this.field.variableName,guardedCodeSnippet:`${$E({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!0})}${D}`});this.#F.writeStatement(`${F}${this.#F.newLine}${wE({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,conditional:"else if"})}`)}},O8D=class extends SF{#D;#F;constructor(D,F,E,w,$){super(D,E,w,$);this.#D=D,this.#F=F}compile(){this.defineField(this.#F),this.#F.writeStatement(fE({allowNull:this.#D.allowNull,isOptional:this.#D.isOptional,variableName:this.field.variableName})),this.#F.writeStatement($E({variableName:this.field.variableName,validations:this.#D.validations,bail:this.#D.bail,dropMissingCheck:!1})),this.#F.writeStatement(`${q8D({variableName:this.field.variableName,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId})}${this.#F.newLine}${wE({variableName:this.field.variableName,allowNull:this.#D.allowNull,outputExpression:this.field.outputExpression,transformFnRefId:this.#D.transformFnId,conditional:"else if"})}`)}},g8D=Object.getPrototypeOf(async function(){}).constructor,RO=class{variablesCounter=0;#D;#F;#E=new Y8D;constructor(D,F){this.#D=D,this.#F=F||{convertEmptyStringsToNull:!1}}#w(){this.#E.writeStatement(c8D({required:"value is required",object:"value is not a valid object",array:"value is not a valid array",...this.#F.messages})),this.#E.writeStatement(x8D(this.#F)),this.#E.writeStatement("let out;")}#$(){this.#E.writeStatement(y8D()),this.#E.writeStatement("return out;")}#f(){this.compileNode(this.#D.schema,this.#E,{type:"root",variableName:"root",outputExpression:"out",fieldPathExpression:"out",wildCardPath:""})}#C(){return new g8D("root","meta","refs","messagesProvider","errorReporter",this.#E.toString())}createFieldFor(D,F){switch(F.type){case"array":return j8D(F);case"root":return N8D(F);case"object":return k8D(D,this.variablesCounter,F);case"tuple":return P8D(D,F);case"record":return b8D(F)}}compileNode(D,F,E,w){switch(D.type){case"literal":return new O8D(D,F,this,E,w).compile();case"array":return new T8D(D,F,this,E,w).compile();case"record":return new H8D(D,F,this,E,w).compile();case"object":return new V8D(D,F,this,E,w).compile();case"tuple":return new J8D(D,F,this,E,w).compile();case"union":return new S8D(D,F,this,E,w).compile()}}compile(){this.#w(),this.#f(),this.#$();const D=this.#C();return this.variablesCounter=0,this.#E.flush(),D}};var vj={};S4(vj,{COTYPE:()=>s8D,IS_OF_TYPE:()=>B2,ITYPE:()=>r8D,OTYPE:()=>_8D,PARSE:()=>ED,UNIQUE_NAME:()=>R0,VALIDATION:()=>I6});var R0=Symbol.for("schema_name"),B2=Symbol.for("is_of_type"),ED=Symbol.for("parse"),r8D=Symbol.for("opaque_input_type"),_8D=Symbol.for("opaque_type"),s8D=Symbol.for("camelcase_opaque_type"),I6=Symbol.for("to_validation"),QF=O((D,F,E)=>{const w=F(E);if(!E.isDefined&&w)E.report(q.required,"required",E)},{implicit:!0}),$7=class extends KF{optional(D){return new d8D(this,D)}nullable(){return new u8D(this)}transform(D){return new v8D(D,this)}},u8D=class D extends $7{#D;constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[ED](F,E,w){const $=this.#D[ED](F,E,w);return $.allowNull=!0,$}},d8D=class D extends $7{#D;validations;constructor(F,E){super();this.#D=F,this.validations=E||[]}cloneValidations(){return this.validations.map((F)=>{return{options:F.options,rule:F.rule}})}compileValidations(F){return this.validations.map((E)=>{return{ruleFnId:F.track({validator:E.rule.validator,options:E.options}),implicit:E.rule.implicit,isAsync:E.rule.isAsync}})}use(F){return this.validations.push(I6 in F?F[I6]():F),this}requiredWhen(F,E,w){if(typeof F==="function")return this.use(QF(F));let $;switch(E){case"=":$=(C)=>C===w;break;case"!=":$=(C)=>C!==w;break;case"in":$=(C)=>w.includes(C);break;case"notIn":$=(C)=>!w.includes(C);break;case">":$=(C)=>C>w;break;case"<":$=(C)=>C<w;break;case">=":$=(C)=>C>=w;break;case"<=":$=(C)=>C<=w}return this.use(QF((C)=>{const f=d.getNestedValue(F,C);return $(f)}))}requiredIfExists(F){const E=Array.isArray(F)?F:[F];return this.use(QF((w)=>{return E.every(($)=>d.exists(d.getNestedValue($,w)))}))}requiredIfAnyExists(F){return this.use(QF((E)=>{return F.some((w)=>d.exists(d.getNestedValue(w,E)))}))}requiredIfMissing(F){const E=Array.isArray(F)?F:[F];return this.use(QF((w)=>{return E.every(($)=>d.isMissing(d.getNestedValue($,w)))}))}requiredIfAnyMissing(F){return this.use(QF((E)=>{return F.some((w)=>d.isMissing(d.getNestedValue(w,E)))}))}clone(){return new D(this.#D.clone(),this.cloneValidations())}[ED](F,E,w){const $=this.#D[ED](F,E,w);return $.isOptional=!0,$.validations=$.validations.concat(this.compileValidations(E)),$}},v8D=class D extends $7{#D;#F;constructor(F,E){super();this.#F=F,this.#D=E}clone(){return new D(this.#F,this.#D.clone())}[ED](F,E,w){const $=this.#D[ED](F,E,w);return $.transformFnId=E.trackTransformer(this.#F),$}},G1=class extends $7{options;validations;constructor(D,F){super();this.options={bail:!0,allowNull:!1,isOptional:!1,...D},this.validations=F||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((F)=>{return{ruleFnId:D.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(I6 in D?D[I6]():D),this}bail(D){return this.options.bail=D,this}[ED](D,F,E){return{type:"literal",fieldName:D,propertyName:E.toCamelCase?tD(D):D,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?F.trackParser(this.options.parse):void 0,validations:this.compileValidations(F)}}},mj=class D extends G1{constructor(F,E){super(F,E)}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},w7=O((D,F,E)=>{const w=typeof F.choices==="function"?F.choices(E):F.choices;if(!w.includes(D))E.report(q.enum,"enum",E,{choices:w})}),HF=class D extends G1{static rules={enum:w7};#D;getChoices(){return this.#D}constructor(F,E,w){super(E,w||[w7({choices:F})]);this.#D=F}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},M6=["YYYY-MM-DD","YYYY-MM-DD HH:mm:ss"];WD.default.extend(pj.default);WD.default.extend(lj.default);WD.default.extend(ij.default);var m8D=O((D,F,E)=>{if(typeof D!=="string"&&typeof D!=="number"){E.report(q.date,"date",E);return}let w=!1,$=F.formats||M6;if(Array.isArray($))$=[...$],w=$.includes("x");else if(typeof $!=="string")$={...$},w=$.format==="x";const C=w?d.asNumber(D):D,f=w&&!Number.isNaN(C)?WD.default(C):WD.default(D,$,!0);if(!f.isValid()){E.report(q.date,"date",E);return}E.meta.$value=f,E.meta.$formats=$,E.mutate(f.toDate(),E)}),NO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||M6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=WD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the equals rule`);if(!C.isSame(B,w))E.report(q["date.equals"],"date.equals",E,{expectedValue:f,compare:w})}),qO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||M6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?WD.default():f==="tomorrow"?WD.default().add(1,"day"):WD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the after rule`);if(!C.isAfter(B,w))E.report(q["date.after"],"date.after",E,{expectedValue:f,compare:w})}),OO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||M6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?WD.default():f==="tomorrow"?WD.default().add(1,"day"):WD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the afterOrEqual rule`);if(!C.isSameOrAfter(B,w))E.report(q["date.afterOrEqual"],"date.afterOrEqual",E,{expectedValue:f,compare:w})}),jO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||M6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?WD.default():f==="yesterday"?WD.default().subtract(1,"day"):WD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the before rule`);if(!C.isBefore(B,w))E.report(q["date.before"],"date.before",E,{expectedValue:f,compare:w})}),PO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=F.format||M6,C=E.meta.$value,f=typeof F.expectedValue==="function"?F.expectedValue(E):F.expectedValue,B=f==="today"?WD.default():f==="yesterday"?WD.default().subtract(1,"day"):WD.default(f,$,!0);if(!B.isValid())throw new Error(`Invalid datetime value "${f}" value provided to the beforeOrEqual rule`);if(!C.isSameOrBefore(B,w))E.report(q["date.beforeOrEqual"],"date.beforeOrEqual",E,{expectedValue:f,compare:w})}),yO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=WD.default(f,C,!0);if(!B.isValid())return;if(!$.isSame(B,w))E.report(q["date.sameAs"],"date.sameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),kO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=WD.default(f,C,!0);if(!B.isValid())return;if($.isSame(B,w))E.report(q["date.notSameAs"],"date.notSameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),bO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=WD.default(f,C,!0);if(!B.isValid())return;if(!$.isAfter(B,w))E.report(q["date.afterField"],"date.afterField",E,{otherField:F.otherField,expectedValue:f,compare:w})}),xO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=WD.default(f,C,!0);if(!B.isValid())return;if(!$.isSameOrAfter(B,w))E.report(q["date.afterOrSameAs"],"date.afterOrSameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),cO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=WD.default(f,C,!0);if(!B.isValid())return;if(!$.isBefore(B,w))E.report(q["date.beforeField"],"date.beforeField",E,{otherField:F.otherField,expectedValue:f,compare:w})}),gO=O((D,F,E)=>{if(!E.meta.$value)return;const w=F.compare||"day",$=E.meta.$value,C=F.format||E.meta.$formats,f=d.getNestedValue(F.otherField,E),B=WD.default(f,C,!0);if(!B.isValid())return;if(!$.isSameOrBefore(B,w))E.report(q["date.beforeOrSameAs"],"date.beforeOrSameAs",E,{otherField:F.otherField,expectedValue:f,compare:w})}),rO=O((D,F,E)=>{if(!E.meta.$value)return;const $=E.meta.$value.day();if($!==0&&$!==6)E.report(q["date.weekend"],"date.weekend",E)}),_O=O((D,F,E)=>{if(!E.meta.$value)return;const $=E.meta.$value.day();if($===0||$===6)E.report(q["date.weekday"],"date.weekday",E)}),ph=class D extends G1{static rules={equals:NO,after:qO,afterOrEqual:OO,before:jO,beforeOrEqual:PO,sameAs:yO,notSameAs:kO,afterField:bO,afterOrSameAs:xO,beforeField:cO,beforeOrSameAs:gO,weekend:rO,weekday:_O};[R0]="vine.date";[B2]=(F)=>{if(typeof F!=="string")return!1;return nj.default(F,this.options.formats||M6,!0).isValid()};constructor(F,E){super(F,E||[m8D(F||{})])}equals(F,E){return this.use(NO({expectedValue:F,...E}))}after(F,E){return this.use(qO({expectedValue:F,...E}))}afterOrEqual(F,E){return this.use(OO({expectedValue:F,...E}))}before(F,E){return this.use(jO({expectedValue:F,...E}))}beforeOrEqual(F,E){return this.use(PO({expectedValue:F,...E}))}sameAs(F,E){return this.use(yO({otherField:F,...E}))}notSameAs(F,E){return this.use(kO({otherField:F,...E}))}afterField(F,E){return this.use(bO({otherField:F,...E}))}afterOrSameAs(F,E){return this.use(xO({otherField:F,...E}))}beforeField(F,E){return this.use(cO({otherField:F,...E}))}beforeOrSameAs(F,E){return this.use(gO({otherField:F,...E}))}weekend(){return this.use(rO())}weekday(){return this.use(_O())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},aj=class D{#D;#F=(F,E)=>{E.report(q.union,"union",E)};constructor(F){this.#D=F}otherwise(F){return this.#F=F,this}clone(){const F=new D(this.#D);return F.otherwise(this.#F),F}[ED](F,E,w){return{type:"union",fieldName:F,propertyName:w.toCamelCase?tD(F):F,elseConditionalFnRefId:E.trackConditional(this.#F),conditions:this.#D.map(($)=>$[ED](F,E,w))}}},oj=class{#D;#F;constructor(D,F){this.#D=F,this.#F=D}[ED](D,F,E){return{conditionalFnRefId:F.trackConditional(this.#F),schema:this.#D[ED](D,F,E)}}};ah.if=function D(F,E){return new oj(F,E)};ah.else=function D(F){return new oj(()=>!0,F)};var CE=class extends KF{optional(){return new l8D(this)}nullable(){return new n8D(this)}},n8D=class D extends CE{#D;constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[ED](F,E,w){const $=this.#D[ED](F,E,w);if($.type!=="union")$.allowNull=!0;return $}},l8D=class D extends CE{#D;constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[ED](F,E,w){const $=this.#D[ED](F,E,w);if($.type!=="union")$.isOptional=!0;return $}},BE=class extends CE{options;validations;constructor(D,F){super();this.options=D||{bail:!0,allowNull:!1,isOptional:!1},this.validations=F||[]}cloneValidations(){return this.validations.map((D)=>{return{options:D.options,rule:D.rule}})}cloneOptions(){return{...this.options}}compileValidations(D){return this.validations.map((F)=>{return{ruleFnId:D.track({validator:F.rule.validator,options:F.options}),implicit:F.rule.implicit,isAsync:F.rule.isAsync}})}parse(D){return this.options.parse=D,this}use(D){return this.validations.push(I6 in D?D[I6]():D),this}bail(D){return this.options.bail=D,this}},tj=class D extends BE{#D;#F=!1;[R0]="vine.array";[B2]=(F)=>{return Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}allowUnknownProperties(){return this.#F=!0,this}clone(){const F=new D(this.#D.map((E)=>E.clone()),this.cloneOptions(),this.cloneValidations());if(this.#F)F.allowUnknownProperties();return F}[ED](F,E,w){return{type:"tuple",fieldName:F,propertyName:w.toCamelCase?tD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,allowUnknownProperties:this.#F,parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,validations:this.compileValidations(E),properties:this.#D.map(($,C)=>$[ED](String(C),E,w))}}},sO=O((D,F,E)=>{if(!E.isValid)return;if(D.length<F.min)E.report(q["array.minLength"],"array.minLength",E,F)}),uO=O((D,F,E)=>{if(!E.isValid)return;if(D.length>F.max)E.report(q["array.maxLength"],"array.maxLength",E,F)}),dO=O((D,F,E)=>{if(!E.isValid)return;if(D.length!==F.size)E.report(q["array.fixedLength"],"array.fixedLength",E,F)}),vO=O((D,F,E)=>{if(!E.isValid)return;if(D.length<=0)E.report(q.notEmpty,"notEmpty",E)}),mO=O((D,F,E)=>{if(!E.isValid)return;if(!d.isDistinct(D,F.fields))E.report(q.distinct,"distinct",E,F)}),nO=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.filter((w)=>d.exists(w)&&w!==""),E)}),ej=class D extends BE{static rules={compact:nO,notEmpty:vO,distinct:mO,minLength:sO,maxLength:uO,fixedLength:dO};#D;[R0]="vine.array";[B2]=(F)=>{return Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}minLength(F){return this.use(sO({min:F}))}maxLength(F){return this.use(uO({max:F}))}fixedLength(F){return this.use(dO({size:F}))}notEmpty(){return this.use(vO())}distinct(F){return this.use(mO({fields:F}))}compact(){return this.use(nO())}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[ED](F,E,w){return{type:"array",fieldName:F,propertyName:w.toCamelCase?tD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[ED]("*",E,w),parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,validations:this.compileValidations(E)}}},i8D=class D extends CE{#D;[R0]="types.object";[B2]=(F)=>{return F!==null&&typeof F==="object"&&!Array.isArray(F)};constructor(F){super();this.#D=F}clone(){return new D(this.#D.clone())}[ED](F,E,w){return w.toCamelCase=!0,this.#D[ED](F,E,w)}},DP=class D extends BE{#D;#F=[];#E=!1;[R0]="vine.object";[B2]=(F)=>{return F!==null&&typeof F==="object"&&!Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}getProperties(){return Object.keys(this.#D).reduce((F,E)=>{return F[E]=this.#D[E].clone(),F},{})}allowUnknownProperties(){return this.#E=!0,this}merge(F){return this.#F.push(F),this}clone(){const F=new D(this.getProperties(),this.cloneOptions(),this.cloneValidations());if(this.#F.forEach((E)=>F.merge(E)),this.#E)F.allowUnknownProperties();return F}toCamelCase(){return new i8D(this)}[ED](F,E,w){return{type:"object",fieldName:F,propertyName:w.toCamelCase?tD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,allowUnknownProperties:this.#E,validations:this.compileValidations(E),properties:Object.keys(this.#D).map(($)=>{return this.#D[$][ED]($,E,w)}),groups:this.#F.map(($)=>{return $[ED](E,w)})}}},lO=O((D,F,E)=>{if(!E.isValid)return;if(Object.keys(D).length<F.min)E.report(q["record.minLength"],"record.minLength",E,F)}),iO=O((D,F,E)=>{if(!E.isValid)return;if(Object.keys(D).length>F.max)E.report(q["record.maxLength"],"record.maxLength",E,F)}),pO=O((D,F,E)=>{if(!E.isValid)return;if(Object.keys(D).length!==F.size)E.report(q["record.fixedLength"],"record.fixedLength",E,F)}),aO=O((D,F,E)=>{if(!E.isValid)return;F(Object.keys(D),E)}),FP=class D extends BE{static rules={maxLength:iO,minLength:lO,fixedLength:pO,validateKeys:aO};#D;[R0]="vine.object";[B2]=(F)=>{return F!==null&&typeof F==="object"&&!Array.isArray(F)};constructor(F,E,w){super(E,w);this.#D=F}minLength(F){return this.use(lO({min:F}))}maxLength(F){return this.use(iO({max:F}))}fixedLength(F){return this.use(pO({size:F}))}validateKeys(...F){return this.use(aO(...F))}clone(){return new D(this.#D.clone(),this.cloneOptions(),this.cloneValidations())}[ED](F,E,w){return{type:"record",fieldName:F,propertyName:w.toCamelCase?tD(F):F,bail:this.options.bail,allowNull:this.options.allowNull,isOptional:this.options.isOptional,each:this.#D[ED]("*",E,w),parseFnId:this.options.parse?E.trackParser(this.options.parse):void 0,validations:this.compileValidations(E)}}},oO=O((D,F,E)=>{if(typeof D!=="string")E.report(q.string,"string",E)}),tO=O((D,F,E)=>{if(!E.isValid)return;if(!d.isEmail(D,F))E.report(q.email,"email",E)}),eO=O((D,F,E)=>{if(!E.isValid)return;const w=F&&typeof F==="function"?F(E):F,$=w?.locale||"any";if(!d.isMobilePhone(D,$,w))E.report(q.mobile,"mobile",E)}),Dj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isIP(D,F?.version))E.report(q.ipAddress,"ipAddress",E)}),Fj=O((D,F,E)=>{if(!E.isValid)return;if(!F.test(D))E.report(q.regex,"regex",E)}),Ej=O((D,F,E)=>{if(!E.isValid)return;if(!d.isHexColor(D))E.report(q.hexCode,"hexCode",E)}),wj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isURL(D,F))E.report(q.url,"url",E)}),$j=O(async(D,F,E)=>{if(!E.isValid)return;if(!await d.isActiveURL(D))E.report(q.activeUrl,"activeUrl",E)}),fj=O((D,F,E)=>{if(!E.isValid)return;let w="a-zA-Z";if(F){if(F.allowSpaces)w+="\\s";if(F.allowDashes)w+="-";if(F.allowUnderscores)w+="_"}if(!new RegExp(`^[${w}]+\$`).test(D))E.report(q.alpha,"alpha",E)}),Cj=O((D,F,E)=>{if(!E.isValid)return;let w="a-zA-Z0-9";if(F){if(F.allowSpaces)w+="\\s";if(F.allowDashes)w+="-";if(F.allowUnderscores)w+="_"}if(!new RegExp(`^[${w}]+\$`).test(D))E.report(q.alphaNumeric,"alphaNumeric",E)}),Bj=O((D,F,E)=>{if(!E.isValid)return;if(D.length<F.min)E.report(q.minLength,"minLength",E,F)}),hj=O((D,F,E)=>{if(!E.isValid)return;if(D.length>F.max)E.report(q.maxLength,"maxLength",E,F)}),Uj=O((D,F,E)=>{if(!E.isValid)return;if(D.length!==F.size)E.report(q.fixedLength,"fixedLength",E,F)}),Aj=O((D,F,E)=>{if(!E.isValid)return;if(!D.endsWith(F.substring))E.report(q.endsWith,"endsWith",E,F)}),Ij=O((D,F,E)=>{if(!E.isValid)return;if(!D.startsWith(F.substring))E.report(q.startsWith,"startsWith",E,F)}),Mj=O((D,F,E)=>{if(!E.isValid)return;if(d.getNestedValue(F.otherField,E)!==D){E.report(q.sameAs,"sameAs",E,F);return}}),Gj=O((D,F,E)=>{if(!E.isValid)return;if(d.getNestedValue(F.otherField,E)===D){E.report(q.notSameAs,"notSameAs",E,F);return}}),Yj=O((D,F,E)=>{if(!E.isValid)return;const w=F?.confirmationField||`${E.name}_confirmation`;if(E.parent[w]!==D){E.report(q.confirmed,"confirmed",E,{otherField:w});return}}),Zj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.trim(),E)}),Wj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(wP.default.default(D,F),E)}),Xj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.toLocaleUpperCase(F),E)}),Jj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(D.toLocaleLowerCase(F),E)}),zj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(tD(D),E)}),Tj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(EP.default.default(D),E)}),Kj=O((D,F,E)=>{if(!E.isValid)return;E.mutate(mh(D,F),E)}),Sj=O((D,F,E)=>{if(!E.isValid)return;if(!(typeof F.choices==="function"?F.choices(E):F.choices).includes(D)){E.report(q.in,"in",E,F);return}}),Qj=O((D,F,E)=>{if(!E.isValid)return;if((typeof F.list==="function"?F.list(E):F.list).includes(D)){E.report(q.notIn,"notIn",E,F);return}}),Hj=O((D,F,E)=>{if(!E.isValid)return;const w=F?typeof F==="function"?F(E)?.provider||[]:F.provider:[];if(!w.length){if(!d.isCreditCard(D))E.report(q.creditCard,"creditCard",E,{providersList:"credit"})}else if(!w.find((C)=>d.isCreditCard(D,{provider:C})))E.report(q.creditCard,"creditCard",E,{providers:w,providersList:w.join("/")})}),Lj=O((D,F,E)=>{if(!E.isValid)return;const w=typeof F==="function"?F(E).countryCode:F.countryCode;if(!w.find((C)=>d.isPassportNumber(D,C)))E.report(q.passport,"passport",E,{countryCodes:w})}),Rj=O((D,F,E)=>{if(!E.isValid)return;const w=F?typeof F==="function"?F(E)?.countryCode||[]:F.countryCode:[];if(!w.length){if(!d.isPostalCode(D,"any"))E.report(q.postalCode,"postalCode",E)}else if(!w.find((C)=>d.isPostalCode(D,C)))E.report(q.postalCode,"postalCode",E,{countryCodes:w})}),Vj=O((D,F,E)=>{if(!E.isValid)return;if(!F||!F.version){if(!d.isUUID(D))E.report(q.uuid,"uuid",E)}else if(!F.version.find(($)=>d.isUUID(D,$)))E.report(q.uuid,"uuid",E,F)}),Nj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isAscii(D))E.report(q.ascii,"ascii",E)}),qj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isIBAN(D))E.report(q.iban,"iban",E)}),Oj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isJWT(D))E.report(q.jwt,"jwt",E)}),jj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isLatLong(D))E.report(q.coordinates,"coordinates",E)}),f7=class D extends G1{static rules={in:Sj,jwt:Oj,url:wj,iban:qj,uuid:Vj,trim:Zj,email:tO,alpha:fj,ascii:Nj,notIn:Qj,regex:Fj,escape:Tj,sameAs:Mj,mobile:eO,string:oO,hexCode:Ej,passport:Lj,endsWith:Aj,confirmed:Yj,activeUrl:$j,minLength:Bj,notSameAs:Gj,maxLength:hj,ipAddress:Dj,creditCard:Hj,postalCode:Rj,startsWith:Ij,toUpperCase:Xj,toLowerCase:Jj,toCamelCase:zj,fixedLength:Uj,coordinates:jj,normalizeUrl:Kj,alphaNumeric:Cj,normalizeEmail:Wj};[R0]="vine.string";[B2]=(F)=>{return typeof F==="string"};constructor(F,E){super(F,E||[oO()])}url(...F){return this.use(wj(...F))}activeUrl(){return this.use($j())}email(...F){return this.use(tO(...F))}mobile(...F){return this.use(eO(...F))}ipAddress(F){return this.use(Dj(F?{version:F}:void 0))}hexCode(){return this.use(Ej())}regex(F){return this.use(Fj(F))}alpha(F){return this.use(fj(F))}alphaNumeric(F){return this.use(Cj(F))}minLength(F){return this.use(Bj({min:F}))}maxLength(F){return this.use(hj({max:F}))}fixedLength(F){return this.use(Uj({size:F}))}confirmed(F){return this.use(Yj(F))}trim(){return this.use(Zj())}normalizeEmail(F){return this.use(Wj(F))}toUpperCase(){return this.use(Xj())}toLowerCase(){return this.use(Jj())}toCamelCase(){return this.use(zj())}escape(){return this.use(Tj())}normalizeUrl(...F){return this.use(Kj(...F))}startsWith(F){return this.use(Ij({substring:F}))}endsWith(F){return this.use(Aj({substring:F}))}sameAs(F){return this.use(Mj({otherField:F}))}notSameAs(F){return this.use(Gj({otherField:F}))}in(F){return this.use(Sj({choices:F}))}notIn(F){return this.use(Qj({list:F}))}creditCard(...F){return this.use(Hj(...F))}passport(...F){return this.use(Lj(...F))}postalCode(...F){return this.use(Rj(...F))}uuid(...F){return this.use(Vj(...F))}ascii(){return this.use(Nj())}iban(){return this.use(qj())}jwt(){return this.use(Oj())}coordinates(){return this.use(jj())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},Pj=O((D,F,E)=>{const w=F.strict?D:d.asNumber(D);if(typeof w!=="number"||Number.isNaN(w)||w===Number.POSITIVE_INFINITY||w===Number.NEGATIVE_INFINITY){E.report(q.number,"number",E);return}E.mutate(w,E)}),yj=O((D,F,E)=>{if(!E.isValid)return;if(D<F.min)E.report(q.min,"min",E,F)}),kj=O((D,F,E)=>{if(!E.isValid)return;if(D>F.max)E.report(q.max,"max",E,F)}),bj=O((D,F,E)=>{if(!E.isValid)return;if(D<F.min||D>F.max)E.report(q.range,"range",E,F)}),xj=O((D,F,E)=>{if(!E.isValid)return;if(D<0)E.report(q.positive,"positive",E)}),cj=O((D,F,E)=>{if(!E.isValid)return;if(D>=0)E.report(q.negative,"negative",E)}),gj=O((D,F,E)=>{if(!E.isValid)return;if(!d.isDecimal(String(D),{force_decimal:F.range[0]!==0,decimal_digits:F.range.join(",")}))E.report(q.decimal,"decimal",E,{digits:F.range.join("-")})}),rj=O((D,F,E)=>{if(!E.isValid)return;if(!Number.isInteger(D))E.report(q.withoutDecimals,"withoutDecimals",E)}),_j=O((D,F,E)=>{if(!E.isValid)return;if(!F.values.includes(D))E.report(q["number.in"],"in",E,F)}),LF=class D extends G1{static rules={in:_j,max:kj,min:yj,range:bj,number:Pj,decimal:gj,negative:cj,positive:xj,withoutDecimals:rj};[R0]="vine.number";[B2]=(F)=>{const E=d.asNumber(F);return!Number.isNaN(E)};constructor(F,E){super(F,E||[Pj(F||{})])}min(F){return this.use(yj({min:F}))}max(F){return this.use(kj({max:F}))}range(F){return this.use(bj({min:F[0],max:F[1]}))}positive(){return this.use(xj())}negative(){return this.use(cj())}decimal(F){return this.use(gj({range:Array.isArray(F)?F:[F]}))}withoutDecimals(){return this.use(rj())}clone(){return new D(this.cloneOptions(),this.cloneValidations())}in(F){return this.use(_j({values:F}))}},sj=O((D,F,E)=>{const w=F.strict===!0?D:d.asBoolean(D);if(typeof w!=="boolean"){E.report(q.boolean,"boolean",E);return}E.mutate(w,E)}),RF=class D extends G1{static rules={boolean:sj};[R0]="vine.boolean";[B2]=(F)=>{return typeof(this.options.strict===!0?F:d.asBoolean(F))==="boolean"};constructor(F,E){super(F,E||[sj(F||{})])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},uj=O((D,F,E)=>{let w=D;if(typeof F.expectedValue==="boolean")w=d.asBoolean(D);else if(typeof F.expectedValue==="number")w=d.asNumber(D);if(w!==F.expectedValue){E.report(q.literal,"literal",E,F);return}E.mutate(w,E)}),$P=class D extends G1{static rules={equals:uj};#D;constructor(F,E,w){super(E,w||[uj({expectedValue:F})]);this.#D=F}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},p8D=["on","1","yes","true",!0,1],dj=O((D,F,E)=>{if(!p8D.includes(D))E.report(q.accepted,"accepted",E)}),fP=class D extends G1{static rules={accepted:dj};constructor(F,E){super(F,E||[dj()])}clone(){return new D(this.cloneOptions(),this.cloneValidations())}},a8D=class D{#D;#F=(F,E)=>{E.report(q.unionGroup,"unionGroup",E)};constructor(F){this.#D=F}clone(){const F=new D(this.#D);return F.otherwise(this.#F),F}otherwise(F){return this.#F=F,this}[ED](F,E){return{type:"group",elseConditionalFnRefId:F.trackConditional(this.#F),conditions:this.#D.map((w)=>w[ED](F,E))}}},CP=class{#D;#F;constructor(D,F){this.#D=F,this.#F=D}[ED](D,F){return{schema:{type:"sub_object",properties:Object.keys(this.#D).map((E)=>{return this.#D[E][ED](E,D,F)}),groups:[]},conditionalFnRefId:D.trackConditional(this.#F)}}};oh.if=function D(F,E){return new CP(F,E)};oh.else=function D(F){return new CP(()=>!0,F)};var o8D=class D extends G1{static rules={enum:w7};#D;constructor(F,E,w){super(E,w||[w7({choices:Object.values(F)})]);this.#D=F}clone(){return new D(this.#D,this.cloneOptions(),this.cloneValidations())}},t8D=class D{#D;#F=(F,E)=>{E.report(q.unionOfTypes,"unionOfTypes",E)};constructor(F){this.#D=F}otherwise(F){return this.#F=F,this}clone(){const F=new D(this.#D);return F.otherwise(this.#F),F}[ED](F,E,w){return{type:"union",fieldName:F,propertyName:w.toCamelCase?tD(F):F,elseConditionalFnRefId:E.trackConditional(this.#F),conditions:this.#D.map(($)=>{return{conditionalFnRefId:E.trackConditional((C,f)=>{return $[B2](C,f)}),schema:$[ED](F,E,w)}})}}},e8D=class extends KF{group=oh;union=ah;string(){return new f7}boolean(D){return new RF(D)}accepted(){return new fP}number(D){return new LF(D)}date(D){return new ph(D)}literal(D){return new $P(D)}object(D){return new DP(D)}array(D){return new ej(D)}tuple(D){return new tj(D)}record(D){return new FP(D)}enum(D){if(Array.isArray(D)||typeof D==="function")return new HF(D);return new o8D(D)}any(){return new mj}unionOfTypes(D){const F=new Set;return D.forEach((E)=>{if(!E[B2]||!E[R0])throw new Error(`Cannot use "${E.constructor.name}". The schema type is not compatible for use with "vine.unionOfTypes"`);if(F.has(E[R0]))throw new Error(`Cannot use duplicate schema "${E[R0]}". "vine.unionOfTypes" needs distinct schema types only`);F.add(E[R0])}),F.clear(),new t8D(D)}},D6D={required:q.required,array:q.array,object:q.object},ih=class{#D;messagesProvider;errorReporter;#F(D){const F=VO();return{compilerNode:{type:"root",schema:D[ED]("",F,{toCamelCase:!1})},refs:F.toJSON()}}constructor(D,F){const{compilerNode:E,refs:w}=this.#F(D);this.#D={schema:E,refs:w};const $=F.metaDataValidator,C=new RO(E,{convertEmptyStringsToNull:F.convertEmptyStringsToNull,messages:D6D}).compile();if(this.errorReporter=F.errorReporter,this.messagesProvider=F.messagesProvider,$)this.validate=(f,B)=>{let h=B??{};const U=h.meta??{},I=h.errorReporter??this.errorReporter,A=h.messagesProvider??this.messagesProvider;return $(U),C(f,U,w,A,I())};else this.validate=(f,B)=>{let h=B??{};const U=h.meta??{},I=h.errorReporter??this.errorReporter,A=h.messagesProvider??this.messagesProvider;return C(f,U,w,A,I())}}async tryValidate(D,...[F]){try{return[null,await this.validate(D,F)]}catch(E){if(E instanceof Ph)return[E,null];throw E}}toJSON(){const{schema:D,refs:F}=this.#D;return{schema:structuredClone(D),refs:F}}},BP=class extends e8D{messagesProvider=new EE(q,iN);errorReporter=()=>new yh;convertEmptyStringsToNull=!1;helpers=d;createRule=O;compile(D){return new ih(D,{convertEmptyStringsToNull:this.convertEmptyStringsToNull,messagesProvider:this.messagesProvider,errorReporter:this.errorReporter})}withMetaData(D){return{compile:(F)=>{return new ih(F,{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)}},F6D=new BP,r=F6D;zU();C7();h7();hE();function HFD(){const D=/--verbose(?!\s*=\s*false|\s+false)(?:\s+|=true)?(?:$|\s)/,F=SU();if(D.test(F))return 4;return 3}var GE={...Z7({level:HFD()}),warning:(D)=>console.warn(D),dump:(...D)=>console.log(...D),dd:(...D)=>{console.log(...D),W7.exit(1)},echo:(D)=>console.log(D)};var d1={info:async(D,F)=>{if(F?.styled===!1)console.log(D);else GE.info(D);await g8(`INFO: ${Z0(D)}`)},success:async(D,F)=>{if(F?.styled===!1)console.log(D);else GE.success(D);await g8(`SUCCESS: ${Z0(D)}`)},warn:async(D,F)=>{if(F?.styled===!1)console.log(D);else GE.warn(D);await g8(`WARN: ${Z0(D)}`)},warning:async(D,F)=>{if(F?.styled===!1)console.log(D);else GE.warn(D);await g8(`WARN: ${Z0(D)}`)},error:async(D,F)=>{YE(D,F)},debug:async(...D)=>{const E=`DEBUG: ${D.map((w)=>typeof w==="object"?JSON.stringify(w,null,2):w).join(" ")}`;if(W7.env.APP_ENV==="production"||W7.env.APP_ENV==="prod")return g8(E);GE.debug(E),await g8(Z0(E))},dump:(...D)=>D.forEach((F)=>console.log(F)),dd:(...D)=>{D.forEach((F)=>console.log(F)),W7.exit(1)},echo:(...D)=>console.log(...D)};function mP(D){return J7(`database/${D||""}`)}function RFD(D){return J7(`app/${D||""}`)}function nP(D){return RFD(`Commands/${D||""}`)}function QU(D){return z7(`logs/${D||""}`)}function J7(D="",F){let E=dP.cwd();while(E.includes("storage"))E=uP(E,"..");const w=uP(E,D);if(F?.relative)return LFD(dP.cwd(),w);return w}function z7(D){return J7(`storage/${D||""}`)}var NFD={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:nP(),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:mP("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"}}}},HU=NFD;var lP={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 iP={driver:"fathom",drivers:{googleAnalytics:{trackingId:"UA-XXXXXXXXX-X"},fathom:{siteId:"WOLZMJDL"}}};import jFD from"process";function yFD(){return typeof Bun!=="undefined"?Bun.env:jFD.env}var pP={APP_NAME:r.string(),APP_ENV:r.enum(["local","dev","stage","prod"]),APP_KEY:r.string(),APP_URL:r.string(),PORT:r.number(),PORT_BACKEND:r.number(),PORT_ADMIN:r.number(),PORT_LIBRARY:r.number(),PORT_DESKTOP:r.number(),PORT_EMAIL:r.number(),PORT_DOCS:r.number(),PORT_INSPECT:r.number(),PORT_API:r.number(),PORT_SYSTEM_TRAY:r.number(),APP_MAINTENANCE:r.boolean(),DEBUG:r.boolean(),API_PREFIX:r.string(),DOCS_PREFIX:r.string(),DB_CONNECTION:r.enum(["mysql","sqlite","postgres"]),DB_HOST:r.string(),DB_PORT:r.number(),DB_DATABASE:r.string(),DB_USERNAME:r.string(),DB_PASSWORD:r.string(),AWS_ACCOUNT_ID:r.string(),AWS_ACCESS_KEY_ID:r.string(),AWS_SECRET_ACCESS_KEY:r.string(),AWS_DEFAULT_REGION:r.string(),AWS_DEFAULT_PASSWORD:r.string(),MAIL_MAILER:r.enum(["ses","sendmail","log","smtp"]),MAIL_HOST:r.string(),MAIL_PORT:r.number(),MAIL_USERNAME:r.string(),MAIL_PASSWORD:r.string(),MAIL_ENCRYPTION:r.string(),MAIL_FROM_NAME:r.string(),MAIL_FROM_ADDRESS:r.string(),SEARCH_ENGINE_DRIVER:r.enum(["meilisearch","algolia","typesense"]),MEILISEARCH_HOST:r.string(),MEILISEARCH_KEY:r.string(),FRONTEND_APP_ENV:r.enum(["development","staging","production"]),FRONTEND_APP_URL:r.string()};var qFD={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"]},OFD=Object.entries(pP).reduce((D,[F,E])=>{let w;switch(typeof E){case"string":w=r.string();break;case"number":w=r.number();break;case"boolean":w=r.boolean();break;default:if(Array.isArray(E)){w=r.enum(E);break}if(typeof E==="object"){const C=Symbol.for("schema_name"),f=E[C];if(f==="vine.string"){w=r.string();break}if(f==="vine.number"){w=r.number();break}if(f==="vine.boolean"){w=r.boolean();break}if(!f){w=r.enum(qFD.APP_ENV);break}console.error("Unknown env value type",typeof E)}throw new Error(`Invalid env value for ${F}`)}const $=F;return D[$]=w,D},{}),rbD=r.object(OFD);var PFD={get:(D,F)=>{const E=D[F];if(typeof E==="string"&&/^\d+$/.test(E)&&F!=="AWS_ACCOUNT_ID")return Number(E);if(typeof E==="string"&&/^true|false$/.test(E))return E==="true";if(E instanceof HF)return D[F];if(E instanceof RF)return!!D[F];if(E instanceof LF)return Number(D[F]);return E}},s=new Proxy(yFD(),PFD);var aP={name:s.APP_NAME??"Stacks",description:"Stacks is a full-stack framework for building modern web applications.",env:s.APP_ENV??"local",url:s.APP_URL??"stacks.localhost",redirectUrls:["stacksjs.com"],debug:s.DEBUG??!1,key:s.APP_KEY,maintenanceMode:s.APP_MAINTENANCE??!1,docMode:!1,timezone:"America/Los_Angeles",locale:"en",fallbackLocale:"en",cipher:"aes-256-cbc"};var oP={driver:"dynamodb",prefix:"stacks",ttl:3600,drivers:{dynamodb:{key:s.AWS_ACCESS_KEY_ID||"",secret:s.AWS_SECRET_ACCESS_KEY||"",region:s.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 tP={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 T7={firewall:{enabled:!0,countryCodes:["RU","IR"],ipAddresses:[],rateLimitPerMinute:1000,useIpReputationLists:!0,useKnownBadInputsRuleSet:!0,queryString:[],httpHeaders:[]}};var eP={type:"serverless",driver:"aws",firewall:T7.firewall,environments:["production","staging","development"],storage:{},api:{prefix:s.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 Dy={default:s.DB_CONNECTION||"sqlite",connections:{sqlite:{database:s.DB_DATABASE||"database/stacks.sqlite",prefix:""},dynamodb:{key:s.AWS_ACCESS_KEY_ID||"",secret:s.AWS_SECRET_ACCESS_KEY||"",region:s.AWS_DEFAULT_REGION||"us-east-1",prefix:s.DB_DATABASE||"stacks",endpoint:"http://localhost",port:s.DB_PORT||8000},mysql:{name:s.DB_DATABASE||"stacks",host:s.DB_HOST||"127.0.0.1",port:s.DB_PORT||3306,username:s.DB_USERNAME||"root",password:s.DB_PASSWORD||"",prefix:""},postgres:{name:s.DB_DATABASE||"stacks",host:s.DB_HOST||"127.0.0.1",port:s.DB_PORT||3306,username:s.DB_USERNAME||"",password:s.DB_PASSWORD||"",prefix:""}},migrations:"migrations",migrationLocks:"migration_locks"};var Fy={a:[{name:s.APP_URL||"",address:"10.0.0.1",ttl:300},{name:"www",address:"@",ttl:300}],aaaa:[],cname:[],mx:[],txt:[],nameservers:[]};var Ey={from:{name:s.MAIL_FROM_NAME||"Stacks",address:s.MAIL_FROM_ADDRESS||"no-reply@stacksjs.org"},mailboxes:["chris@stacksjs.org","blake@stacksjs.org","glenn@stacksjs.org"],url:s.APP_URL||"http://localhost:3000",charset:"UTF-8",server:{scan:!0}};var wy={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 $y={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 fy={driver:"argon2",bcrypt:{rounds:10,cost:4},argon2:{memory:65536,threads:1,time:1}};var Cy={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 By={logsPath:z7("logs/stacks.log"),deploymentsPath:z7("logs/deployments.log")};var hy={default:"email"};var Uy={driver:"stripe"};var Ay={frontend:s.PORT??3000,backend:s.PORT_BACKEND??3001,admin:s.PORT_ADMIN??3002,library:s.PORT_LIBRARY??3003,desktop:s.PORT_DESKTOP??3004,email:s.PORT_EMAIL??3005,docs:s.PORT_DOCS??3006,inspect:s.PORT_INSPECT??3007,api:s.PORT_API??3008,systemTray:s.PORT_SYSTEM_TRAY??3009,database:3010};var Iy={default:"sync",connections:{sync:{driver:"sync"},sqs:{driver:"sqs",key:"",secret:"",prefix:"",suffix:"",queue:"default",region:"us-east-1"}}};var My={driver:"opensearch"};var Gy={aws:{accountId:s.AWS_ACCOUNT_ID||"",appId:s.AWS_ACCESS_KEY_ID||"",apiKey:s.AWS_SECRET_ACCESS_KEY||"",region:s.AWS_DEFAULT_REGION||"us-east-1"},algolia:{appId:"",apiKey:""},meilisearch:{appId:"",apiKey:""},lemonSqueezy:{appId:"",apiKey:""},stripe:{appId:"",apiKey:""}};var Yy={driver:"s3"};var Zy={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 Wy={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 kFD={ai:lP,analytics:iP,app:aP,cache:oP,cli:tP,cloud:eP,database:Dy,dns:Fy,email:Ey,errors:wy,git:$y,hashing:fy,library:Cy,logging:By,notification:hy,queue:Iy,payment:Uy,ports:Ay,searchEngine:My,security:T7,services:Gy,storage:Yy,team:Zy,ui:Wy},LU=kFD;async function Xy(D){if(!D?.port)D={port:3000};return console.log("Creating local tunnel",D.port),"localTunnel"}async function v1(D){return await Xy({port:D})}async function bFD({domain:D=ND.app.url||"stacks",type:F="frontend",localhost:E=!1,https:w=void 0,network:$=void 0}={}){let C=D.replace(/\.[^.]+$/,".localhost");switch(F){case"frontend":if($)return await v1(ND.ports?.frontend||3000);if(E)return`http://localhost:${ND.ports?.frontend}`;break;case"backend":if($)return await v1(ND.ports?.backend||3001);if(E)return`http://localhost:${ND.ports?.backend}`;C=`api.${C}`;break;case"admin":if($)return await v1(ND.ports?.admin||3002);if(E)return`http://localhost:${ND.ports?.admin}`;C=`admin.${C}`;break;case"library":if($)return await v1(ND.ports?.library||3003);if(E)return`http://localhost:${ND.ports?.library}`;C=`libs.${C}`;break;case"email":if($)return await v1(ND.ports?.email||3005);if(E)return`http://localhost:${ND.ports?.email}`;C=`email.${C}`;break;case"desktop":if($)return await v1(ND.ports?.desktop||3004);if(E)return`http://localhost:${ND.ports?.desktop}`;C=`desktop.${C}`;break;case"docs":if($)return await v1(ND.ports?.docs||3006);if(E)return`http://localhost:${ND.ports?.docs}`;C=`docs.${C}`;break;case"inspect":if($)return await v1(ND.ports?.inspect||3007);if(E)return`http://localhost:${ND.ports?.inspect}`;C=`inspect.${C}`;break;default:if(E)return`http://localhost:${ND.ports?.frontend}`}if(w)return`https://${C}`;return`http://${C}`}function xFD(D){return D}function cFD(D){return D}function gFD(D){return D}function rFD(D){return D}function _FD(D){return D}function sFD(D){return D}function uFD(D){return D}function dFD(D){return D}function vFD(D){return D}function mFD(D){return D}function nFD(D){return D}function lFD(D){return D}function iFD(D){return D}function pFD(D){return D}function aFD(D){return D}function oFD(D){return D}function tFD(D){return D}function eFD(D){return D}function D3D(D){return D}function F3D(D){return D}function E3D(D){return D}function w3D(D){return D}function $3D(D){return D}function f3D(D){return D}function C3D(D){return D}function B3D(D){return D}function h3D(D){return D}function P3D(){if(G6.env==="local")return"dev";if(G6.env==="development")return"dev";if(G6.env==="staging")return"stage";if(G6.env==="production")return"prod";if(!G6.env)throw new Error("Couldn\'t determine app environment");return G6.env}var MD={...HU,...LU},RU=MD.ai,U3D=MD.analytics,G6=MD.app,A3D=MD.cache,I3D=MD.cloud,M3D=MD.cli,G3D=MD.database,Y3D=MD.dns,Z3D=MD.docs,W3D=MD.email,X3D=MD.errors,J3D=MD.git,z3D=MD.hashing,T3D=MD.library,K3D=MD.logging,S3D=MD.notification,Q3D=MD.payment,H3D=MD.ports,L3D=MD.queue,R3D=MD.security,V3D=MD.searchEngine,N3D=MD.services,q3D=MD.storage,O3D=MD.team,j3D=MD.ui;function YE(D,F){let E;if(Dh(D))E=D;else if(D instanceof Error)E=D.message;else if(F instanceof Error)E=F.message;else E=String(D);return g8(`ERROR: ${Z0(E)}`),VU.handle(D,F)}async function g8(D,F){const E=`[${new Date().toISOString()}] ${D}\n`;try{const w=F?.logFile??ND.logging.logsPath??"storage/logs/stacks.log";try{await y3D(w)}catch{console.log("Creating log file directory...",w),await zy(k3D(w),{recursive:!0})}await Jy(w,E)}catch(w){console.error("Failed to write to log file:",w)}}class VU{static isTestEnvironment=!1;static shouldExitProcess=!0;static handle(D,F){if(this.shouldExitProcess=F?.shouldExit!==!1,F?.silent!==!0)this.writeErrorToConsole(D);let E;if(F?.message)E=F.message;else if(D instanceof Error)E=D.message;else if(typeof D==="string")E=D;else E=JSON.stringify(D);const w=new Error(E);if(D instanceof Error)Object.assign(w,D);return this.writeErrorToFile(w).catch(($)=>console.error($)),w}static handleError(D,F){return this.handle(D,F),D}static async writeErrorToFile(D){if(!(D instanceof Error)){console.error("Error is not an instance of Error:",D);return}const F=`[${new Date().toISOString()}] ${D.name}: ${D.message}\n`,E=QU("stacks.log")??QU("errors.log");try{await zy(vP(E),{recursive:!0}),await Jy(E,F)}catch(w){console.error("Failed to write to error file:",w)}}static writeErrorToConsole(D){console.error(D);const F=typeof D==="string"?D:D instanceof Error?D.message:JSON.stringify(D);if(F.includes("bunx --bun cdk destroy")||F===`Failed to execute command: ${NF("bunx --bun eslint . --fix")}`||F===`Failed to execute command: ${NF("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)b3D.exit(1)}}function qF(D,F,E,w){function $(C){return C instanceof E?C:new E(function(f){f(C)})}return new(E||(E=Promise))(function(C,f){function B(I){try{U(w.next(I))}catch(A){f(A)}}function h(I){try{U(w.throw(I))}catch(A){f(A)}}function U(I){I.done?C(I.value):$(I.value).then(B,h)}U((w=w.apply(D,[])).next())})}function Ty(D){var F=typeof Symbol==="function"&&Symbol.iterator,E=F&&D[F],w=0;if(E)return E.call(D);if(D&&typeof D.length==="number")return{next:function(){if(D&&w>=D.length)D=void 0;return{value:D&&D[w++],done:!D}}};throw new TypeError(F?"Object is not iterable.":"Symbol.iterator is not defined.")}function Y6(D){return this instanceof Y6?(this.v=D,this):new Y6(D)}function c3D(D,F,E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var w=E.apply(D,F||[]),$,C=[];return $={},f("next"),f("throw"),f("return"),$[Symbol.asyncIterator]=function(){return this},$;function f(Y){if(w[Y])$[Y]=function(M){return new Promise(function(Z,z){C.push([Y,M,Z,z])>1||B(Y,M)})}}function B(Y,M){try{h(w[Y](M))}catch(Z){A(C[0][3],Z)}}function h(Y){Y.value instanceof Y6?Promise.resolve(Y.value.v).then(U,I):A(C[0][2],Y)}function U(Y){B("next",Y)}function I(Y){B("throw",Y)}function A(Y,M){if(Y(M),C.shift(),C.length)B(C[0][0],C[0][1])}}function g3D(D){var F,E;return F={},w("next"),w("throw",function($){throw $}),w("return"),F[Symbol.iterator]=function(){return this},F;function w($,C){F[$]=D[$]?function(f){return(E=!E)?{value:Y6(D[$](f)),done:$==="return"}:C?C(f):f}:C}}function r3D(D){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var F=D[Symbol.asyncIterator],E;return F?F.call(D):(D=typeof Ty==="function"?Ty(D):D[Symbol.iterator](),E={},w("next"),w("throw"),w("return"),E[Symbol.asyncIterator]=function(){return this},E);function w(C){E[C]=D[C]&&function(f){return new Promise(function(B,h){f=D[C](f),$(B,h,f.done,f.value)})}}function $(C,f,B,h){Promise.resolve(h).then(function(U){C({value:U,done:B})},f)}}function V2(D){return new h2(D)}var x3D={withStackTrace:!1},Ky=(D,F,E=x3D)=>{const w=F.isOk()?{type:"Ok",value:F.value}:{type:"Err",value:F.error},$=E.withStackTrace?new Error().stack:void 0;return{data:w,message:D,stack:$}};class uD{constructor(D){this._promise=D}static fromSafePromise(D){const F=D.then((E)=>new R2(E));return new uD(F)}static fromPromise(D,F){const E=D.then((w)=>new R2(w)).catch((w)=>new h2(F(w)));return new uD(E)}static fromThrowable(D,F){return(...E)=>{return new uD((()=>qF(this,void 0,void 0,function*(){try{return new R2(yield D(...E))}catch(w){return new h2(F?F(w):w)}}))())}}static combine(D){return u3D(D)}static combineWithAllErrors(D){return d3D(D)}map(D){return new uD(this._promise.then((F)=>qF(this,void 0,void 0,function*(){if(F.isErr())return new h2(F.error);return new R2(yield D(F.value))})))}andThrough(D){return new uD(this._promise.then((F)=>qF(this,void 0,void 0,function*(){if(F.isErr())return new h2(F.error);const E=yield D(F.value);if(E.isErr())return new h2(E.error);return new R2(F.value)})))}andTee(D){return new uD(this._promise.then((F)=>qF(this,void 0,void 0,function*(){if(F.isErr())return new h2(F.error);try{yield D(F.value)}catch(E){}return new R2(F.value)})))}mapErr(D){return new uD(this._promise.then((F)=>qF(this,void 0,void 0,function*(){if(F.isOk())return new R2(F.value);return new h2(yield D(F.error))})))}andThen(D){return new uD(this._promise.then((F)=>{if(F.isErr())return new h2(F.error);const E=D(F.value);return E instanceof uD?E._promise:E}))}orElse(D){return new uD(this._promise.then((F)=>qF(this,void 0,void 0,function*(){if(F.isErr())return D(F.error);return new R2(F.value)})))}match(D,F){return this._promise.then((E)=>E.match(D,F))}unwrapOr(D){return this._promise.then((F)=>F.unwrapOr(D))}safeUnwrap(){return c3D(this,arguments,function*D(){return yield Y6(yield Y6(yield*g3D(r3D(yield Y6(this._promise.then((F)=>F.safeUnwrap()))))))})}then(D,F){return this._promise.then(D,F)}}var K7=(D)=>new uD(Promise.resolve(new h2(D))),_3D=uD.fromPromise,s3D=uD.fromSafePromise,XcD=uD.fromThrowable,Sy=(D)=>{let F=m1([]);for(let E of D)if(E.isErr()){F=V2(E.error);break}else F.map((w)=>w.push(E.value));return F},u3D=(D)=>uD.fromSafePromise(Promise.all(D)).andThen(Sy),Qy=(D)=>{let F=m1([]);for(let E of D)if(E.isErr()&&F.isErr())F.error.push(E.error);else if(E.isErr()&&F.isOk())F=V2([E.error]);else if(E.isOk()&&F.isOk())F.value.push(E.value);return F},d3D=(D)=>uD.fromSafePromise(Promise.all(D)).andThen(Qy),S7;(function(D){function F($,C){return(...f)=>{try{const B=$(...f);return m1(B)}catch(B){return V2(C?C(B):B)}}}D.fromThrowable=F;function E($){return Sy($)}D.combine=E;function w($){return Qy($)}D.combineWithAllErrors=w})(S7||(S7={}));var m1=(D)=>new R2(D);class R2{constructor(D){this.value=D}isOk(){return!0}isErr(){return!this.isOk()}map(D){return m1(D(this.value))}mapErr(D){return m1(this.value)}andThen(D){return D(this.value)}andThrough(D){return D(this.value).map((F)=>this.value)}andTee(D){try{D(this.value)}catch(F){}return m1(this.value)}orElse(D){return m1(this.value)}asyncAndThen(D){return D(this.value)}asyncAndThrough(D){return D(this.value).map(()=>this.value)}asyncMap(D){return uD.fromSafePromise(D(this.value))}unwrapOr(D){return this.value}match(D,F){return D(this.value)}safeUnwrap(){const D=this.value;return function*(){return D}()}_unsafeUnwrap(D){return this.value}_unsafeUnwrapErr(D){throw Ky("Called `_unsafeUnwrapErr` on an Ok",this,D)}}class h2{constructor(D){this.error=D}isOk(){return!1}isErr(){return!this.isOk()}map(D){return V2(this.error)}mapErr(D){return V2(D(this.error))}andThrough(D){return V2(this.error)}andTee(D){return V2(this.error)}andThen(D){return V2(this.error)}orElse(D){return D(this.error)}asyncAndThen(D){return K7(this.error)}asyncAndThrough(D){return K7(this.error)}asyncMap(D){return K7(this.error)}unwrapOr(D){return D}match(D,F){return F(this.error)}safeUnwrap(){const D=this.error;return function*(){throw yield V2(D),new Error("Do not use this generator out of `safeTry`")}()}_unsafeUnwrap(D){throw Ky("Called `_unsafeUnwrap` on an Err",this,D)}_unsafeUnwrapErr(D){return this.error}}var v3D=S7.fromThrowable;var i$D=L(bc(),1);function t(D,F,E=1){const w=`\x1B[${D}m`,$=`\x1B[${F}m`,C=new RegExp(`\\x1b\\[${F}m`,"g");return(f)=>{return xc.enabled&&xc.supportLevel>=E?w+(""+f).replace(C,w)+$:""+f}}var X6=!0,kF=typeof self!=="undefined"?self:typeof window!=="undefined"?window:typeof global!=="undefined"?global:{},RE=0;if(kF.process&&kF.process.env&&kF.process.stdout){const{FORCE_COLOR:D,NODE_DISABLE_COLORS:F,NO_COLOR:E,TERM:w,COLORTERM:$}=kF.process.env;if(F||E||D==="0")X6=!1;else if(D==="1"||D==="2"||D==="3")X6=!0;else if(w==="dumb")X6=!1;else if("CI"in kF.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some((C)=>(C in kF.process.env)))X6=!0;else X6=process.stdout.isTTY;if(X6)if(process.platform==="win32")RE=3;else if($&&($==="truecolor"||$==="24bit"))RE=3;else if(w&&(w.endsWith("-256color")||w.endsWith("256")))RE=2;else RE=1}var xc={enabled:X6,supportLevel:RE},p$D=t(0,0),cc=t(1,22),gc=t(2,22),NF=t(3,23),a$D=t(4,24),o$D=t(7,27),t$D=t(8,28),e$D=t(9,29),D4D=t(30,39),F4D=t(31,39),rc=t(32,39),E4D=t(33,39),w4D=t(34,39),$4D=t(35,39),_c=t(36,39),f4D=t(97,39),sc=t(90,39),C4D=t(37,39),B4D=t(91,39),h4D=t(92,39),U4D=t(93,39),A4D=t(94,39),I4D=t(95,39),M4D=t(96,39),G4D=t(40,49),Y4D=t(41,49),Z4D=t(42,49),W4D=t(43,49),X4D=t(44,49),J4D=t(45,49),uc=t(46,49),z4D=t(107,49),T4D=t(100,49),K4D=t(101,49),S4D=t(102,49),Q4D=t(103,49),H4D=t(104,49),L4D=t(105,49),R4D=t(106,49),V4D=t(47,49);import q4D from"process";function SU(D){if(Array.isArray(D)){if(D=Array.from(new Set(D)),Array.isArray(D)&&D[0]&&!D[0].startsWith("-"))D.shift();return D.join(" ")}if(typeof D==="object"&&D!==null)return Object.entries(D).map(([F,E])=>{if(E===!0)return`--${F}`;return`--${F} ${E}`}).join(" ");return SU(q4D.argv.slice(2))}import O4D from"process";function DA(D){if(Array.isArray(D))return[...D];return{...D}}function dc(D){if(Array.isArray(D))return D;return[D]}function s7(D,...F){dc(F).forEach((E)=>{delete D[E]})}function K1(D){return typeof D==="object"&&!Array.isArray(D)&&D!==null}var e1=(D)=>Array.isArray(D),W0=(D)=>typeof D==="function";function J6(D,F){try{return F.split(".").reduce((E,w)=>E[w],D)}catch(E){return D}}function bF(D){if(Array.isArray(D))return[...D];if("all"in D&&typeof D.all==="function")return D.all();return Object.values(D)}function vc(D){return new hD(D)}function P4D(){let D=-1;return{next:()=>{return D+=1,{value:this.items[D],done:D>=this.items.length}}}}class hD{items;constructor(D=[]){this.items=D}[Symbol.iterator]=P4D;toJSON(){return this.items}all(){return this.items}average(D){if(D===void 0)return this.sum()/Number(this.items.length);if(W0(D))return Number(new this.constructor(this.items).sum(D))/Number(this.items.length);return Number(new this.constructor(this.items).pluck(D).sum())/Number(this.items.length)}avg=this.average;chunk(D){const F=[],E=Array.isArray(this.items)?this.items:Object.values(this.items);for(let w=0;w<E.length;w+=D)F.push(E.slice(w,w+D));return new hD(F)}collapse(){return new this.constructor([].concat(...this.items))}combine(D){if(typeof D==="string")D=[D];if(!Array.isArray(D))throw new TypeError("The values must be an array or a string");const F={};return(Array.isArray(this.items)?this.items:Object.keys(this.items)).forEach((w,$)=>{if(D[$]!==void 0)F[w]=D[$]}),new hD(F)}concat(D){let F=D;if(D instanceof this.constructor)F=D.all();else if(typeof D==="object")F=[],Object.keys(D).forEach((w)=>{F.push(D[w])});const E=DA(this.items);return F.forEach((w)=>{if(typeof w==="object")Object.keys(w).forEach(($)=>E.push(w[$]));else E.push(w)}),new this.constructor(E)}contains(D,F){if(typeof D==="function")return this.items.some(D);if(Array.isArray(this.items))return this.items.includes(D);if(F!==void 0){if(Array.isArray(this.items))return this.items.some((E)=>E[D]!==void 0&&E[D]===F);return D in this.items&&this.items[D]===F}if(Array.isArray(this.items))return this.items.includes(D);return Object.values(this.items).includes(D)}containsOneItem(){if(typeof this.items==="string")return!0;return Object.keys(this.items).length===1}count(D){if(D)return this.filter(D).count();return Object.keys(this.items).length}countBy(D){const F={};return this.each((E)=>{const w=D?D(E):E;F[w]=(F[w]||0)+1}),new hD(F)}crossJoin(...D){function F(E,w,$){let C=$[0];if(C instanceof hD)C=C.all();const f=$.slice(1),B=!f.length;let h=[];for(let U=0;U<C.length;U+=1){const I=E.slice();if(I.push(C[U]),B)h.push(I);else h=h.concat(F(I,w,f))}return h}return new this.constructor(F([],this.constructor,[].concat([this.items],D)))}dd(){console.log(JSON.stringify(this.all(),null,2)),O4D.exit()}diff(D){let F;if(D instanceof this.constructor)F=D.all();else F=D;const E=this.items.filter((w)=>!F.includes(w));return new this.constructor(E)}diffAssoc(D){let F=D;if(D instanceof this.constructor)F=D.all();const E={};return Object.keys(this.items).forEach((w)=>{if(F[w]===void 0||F[w]!==this.items[w])E[w]=this.items[w]}),new this.constructor(E)}diffKeys(D){let F;if(D instanceof this.constructor)F=D.all();else F=D;const E=Object.keys(F),w=Object.keys(this.items).filter(($)=>!E.includes($));return new this.constructor(this.items).only(w)}diffUsing(D,F){if(console.log("Original collection:",this.items),console.log("Array to compare:",D),D===null)return new hD(this.items);const E=this.items.filter((w)=>{return D.findIndex((C)=>{return F(w,C)===0})===-1});return new hD(E)}doesntContain(D,F){if(console.log("doesntContain called with:",{key:D,value:F}),typeof D==="function")return console.log("Function branch"),!this.contains(D);if(F!==void 0)return console.log("Key-value pair branch"),!this.contains((E)=>{return console.log("Comparing:",E[D],"with",F),E[D]===F});return console.log("Single value branch"),!this.contains(D)}dump(){return console.log(this.items),this}duplicates(){const D=[],F={},E=(w)=>{if(Array.isArray(w)||typeof w==="object")return JSON.stringify(w);return w};if(Array.isArray(this.items))this.items.forEach((w,$)=>{const C=E(w);if(!D.includes(C))D.push(C);else F[$]=w});else if(typeof this.items==="object")Object.keys(this.items).forEach((w)=>{const $=E(this.items[w]);if(!D.includes($))D.push($);else F[w]=this.items[w]});return new this.constructor(F)}each(D){let F=!1;if(Array.isArray(this.items)){const{length:E}=this.items;for(let w=0;w<E&&!F;w+=1)F=D(this.items[w],w,this.items)===!1}else{const E=Object.keys(this.items),{length:w}=E;for(let $=0;$<w&&!F;$+=1){const C=E[$];F=D(this.items[C],C,this.items)===!1}}return this}eachSpread(D){return this.each((F,E)=>{D(...F,E)}),this}every(D){return bF(this.items).every(D)}except(D){const F={...this.items};return(Array.isArray(D)?D:[D]).forEach((w)=>delete F[w]),new hD(F)}filter(D){if(console.log("Filter method called with callback:",D),console.log("Current items:",this.items),typeof D!=="function"){console.log("No callback provided, removing falsy values");const E=this.items.filter((w)=>{return console.log("Filtering item:",w),Boolean(w)});return console.log("Filtered items:",E),new hD(E)}const F=this.items.filter((E,w)=>{return console.log("Filtering item:",E,"at index:",w),D(E,w)});return console.log("Filtered items:",F),new hD(F)}first(D,F){if(W0(D)){const E=Object.keys(this.items);for(let w=0;w<E.length;w+=1){const $=E[w],C=this.items[$];if(D(C,$))return C}if(W0(F))return F();return F}if(Array.isArray(this.items)&&this.items.length||Object.keys(this.items).length){if(Array.isArray(this.items))return this.items[0];const E=Object.keys(this.items)[0];return this.items[E]}if(W0(F))return F();return F}firstOrFail(D){const F=this.items.find(D||(()=>!0));if(F===void 0)throw new Error("Item not found.");return F}firstWhere(D,F,E){return this.where(D,F,E).first()||null}flatMap(D){return this.map(D).collapse()}flatten(D=Number.POSITIVE_INFINITY){const F=(E,w)=>{if(!Array.isArray(E)&&typeof E!=="object")return[E];return w>0?Object.values(E).reduce(($,C)=>$.concat(Array.isArray(C)||typeof C==="object"?F(C,w-1):C),[]):Array.isArray(E)?[...E]:[E]};return new hD(F(this.items,D))}flip(){const D={};if(Array.isArray(this.items))this.items.forEach((F,E)=>{D[F]=E});else Object.entries(this.items).forEach(([F,E])=>{D[E]=F});return new this.constructor(D)}forPage(D,F){let E={};if(Array.isArray(this.items))E=this.items.slice(D*F-F,D*F);else Object.keys(this.items).slice(D*F-F,D*F).forEach((w)=>{E[w]=this.items[w]});return new this.constructor(E)}forget(D){if(Array.isArray(this.items))this.items=this.items.filter((F,E)=>E!==Number.parseInt(D,10));else if(typeof this.items==="object"&&this.items!==null)delete this.items[D];return this}get(D,F=null){if(Array.isArray(this.items))return this.items[D]??F;return this.items[D]??F}groupBy(D){const F={};return this.each((E,w)=>{const $=typeof D==="function"?D(E):E[D];if(!($ in F))F[$]=new hD;F[$].push(E)}),new hD(F)}has(D){if(Array.isArray(this.items))return D in this.items;return D in this.items}implode(D,F){if(F===void 0)return this.items.join(D);return new this.constructor(this.items).pluck(D).all().join(F)}includes(D){if(Array.isArray(this.items))return this.items.includes(D);return Object.values(this.items).includes(D)}intersect(D){let F=D;if(D instanceof this.constructor)F=D.all();const E=this.items.filter((w)=>F.includes(w));return new this.constructor(E)}intersectByKeys(D){let F=Object.keys(D);if(D instanceof this.constructor)F=Object.keys(D.all());const E={};return Object.keys(this.items).forEach((w)=>{if(F.includes(w))E[w]=this.items[w]}),new this.constructor(E)}isEmpty(){return this.count()===0}isNotEmpty(){return!this.isEmpty()}join(D,F){const E=this.values();if(F===void 0)return E.implode(D);const w=E.count();if(w===0)return"";if(w===1)return E.last();const $=E.pop();return E.implode(D)+F+$}keyBy(D){const F={};if(W0(D))this.items.forEach((E)=>{F[D(E)]=E});else this.items.forEach((E)=>{const w=J6(E,D);F[w||""]=E});return new this.constructor(F)}keys(){return new hD(Object.keys(this.items))}last(D,F){let{items:E}=this;if(W0(D))E=this.filter(D).all();if(Array.isArray(E)&&!E.length||!Object.keys(E).length){if(W0(F))return F();return F}if(Array.isArray(E))return E[E.length-1];const w=Object.keys(E);return E[w[w.length-1]]}macro(D,F){this.constructor.prototype[D]=F}make(D=[]){return new this.constructor(D)}map(D){if(Array.isArray(this.items))return new this.constructor(this.items.map(D));const F={};return Object.keys(this.items).forEach((E)=>{F[E]=D(this.items[E],Number(E))}),new this.constructor(F)}mapSpread(D){return this.map((F,E)=>D(...F,E))}mapToDictionary(D){const F={};return this.items.forEach((E,w)=>{const[$,C]=D(E,w);if(F[$]===void 0)F[$]=[C];else F[$].push(C)}),new this.constructor(F)}mapInto(D){return this.map((F,E)=>new D(F,E))}mapToGroups(D){const F={};return this.items.forEach((E,w)=>{const[$,C]=D(E,w);if(F[$]===void 0)F[$]=[C];else F[$].push(C)}),new this.constructor(F)}mapWithKeys(D){const F={};if(Array.isArray(this.items))this.items.forEach((E,w)=>{const[$,C]=D(E,w);F[$]=C});else Object.keys(this.items).forEach((E)=>{const[w,$]=D(this.items[E],Number(E));F[w]=$});return new this.constructor(F)}max(D){if(typeof D==="string"){const F=this.items.filter((E)=>E[D]!==void 0);return Math.max(...F.map((E)=>E[D]))}return Math.max(...this.items)}median(D){const{length:F}=this.items;if(D===void 0){if(F%2===0)return(this.items[F/2-1]+this.items[F/2])/2;return this.items[Math.floor(F/2)]}if(F%2===0)return(this.items[F/2-1][D]+this.items[F/2][D])/2;return this.items[Math.floor(F/2)][D]}merge(D){const F={...this.items,...D};return new hD(F)}mergeRecursive(D){const F=(E,w)=>{const $={};return Object.keys({...E,...w}).forEach((f)=>{if(E[f]===void 0&&w[f]!==void 0)$[f]=w[f];else if(E[f]!==void 0&&w[f]===void 0)$[f]=E[f];else if(E[f]!==void 0&&w[f]!==void 0)if(E[f]===w[f])$[f]=E[f];else if(!Array.isArray(E[f])&&typeof E[f]==="object"&&!Array.isArray(w[f])&&typeof w[f]==="object")$[f]=F(E[f],w[f]);else $[f]=[].concat(E[f],w[f])}),$};if(!D)return this;if(D.constructor.name==="Collection")return new this.constructor(F(this.items,D.all()));return new this.constructor(F(this.items,D))}min(D){if(D!==void 0){const F=this.items.filter((E)=>E[D]!==void 0);return Math.min(...F.map((E)=>E[D]))}return Math.min(...this.items)}mode(D){const F=[];let E=1;if(!this.items.length)return null;return this.items.forEach((w)=>{const $=F.filter((C)=>{if(D!==void 0)return C.key===w[D];return C.key===w});if(!$.length)if(D!==void 0)F.push({key:w[D],count:1});else F.push({key:w,count:1});else{$[0].count+=1;const{count:C}=$[0];if(C>E)E=C}}),F.filter((w)=>w.count===E).map((w)=>w.key)}nth(D,F=0){const w=bF(this.items).slice(F).filter(($,C)=>C%D===0);return new this.constructor(w)}only(D){const F={};return D.forEach((E)=>{if(E in this.items)F[E]=this.items[E]}),new hD(F)}pad(D,F){const E=Math.abs(D),w=this.count();if(E<=w)return this;let $=E-w;const C=DA(this.items),f=Array.isArray(this.items),B=D<0;for(let h=0;h<$;){if(!f)if(C[h]!==void 0)$+=1;else C[h]=F;else if(B)C.unshift(F);else C.push(F);h+=1}return new this.constructor(C)}partition(D){let F;if(Array.isArray(this.items))F=[new this.constructor([]),new this.constructor([])],this.items.forEach((E)=>{if(D(E)===!0)F[0].push(E);else F[1].push(E)});else F=[new this.constructor({}),new this.constructor({})],Object.keys(this.items).forEach((E)=>{const w=this.items[E];if(D(w)===!0)F[0].put(E,w);else F[1].put(E,w)});return new this.constructor(F)}pipe(D){return D(this)}pluck(D,F){if(D.includes("*")){const E=j4D(this.items),w=[];if(F!==void 0){const B=new RegExp(`0.${F}`,"g"),h=`0.${F}`.split(".").length;Object.keys(E).forEach((U)=>{const I=U.match(B);if(I){const A=I[0];if(A.split(".").length===h)w.push(E[A])}})}const $=[],C=new RegExp(`0.${D}`,"g"),f=`0.${D}`.split(".").length;if(Object.keys(E).forEach((B)=>{const h=B.match(C);if(h){const U=h[0];if(U.split(".").length===f)$.push(E[U])}}),F!==void 0){const B={};return this.items.forEach((h,U)=>{B[w[U]||""]=$}),new this.constructor(B)}return new this.constructor([$])}if(F!==void 0){const E={};return this.items.forEach((w)=>{if(J6(w,D)!==void 0)E[w[F]||""]=J6(w,D);else E[w[F]||""]=null}),new this.constructor(E)}return this.map((E)=>{if(J6(E,D)!==void 0)return J6(E,D);return null})}pop(D=1){if(this.isEmpty())return null;if(e1(this.items)){if(D===1)return this.items.pop();return new this.constructor(this.items.splice(-D))}if(K1(this.items)){const F=Object.keys(this.items);if(D===1){const $=F[F.length-1],C=this.items[$];return s7(this.items,$),C}const E=F.slice(-D),w=E.reduce(($,C)=>{return $[C]=this.items[C],$},{});return s7(this.items,E),new this.constructor(w)}return null}prepend(D,F){if(F!==void 0)return this.put(F,D);return this.items.unshift(D),this}pull(D,F=null){if(Array.isArray(this.items)){const w=Number(D);if(Number.isNaN(w))return F;const $=this.items[w];return this.items.splice(w,1),$??F}const E=this.items[D];return delete this.items[D],E??F}push(...D){return this.items=[...this.items,...D],this}put(D,F){return this.items[D]=F,this}random(D=null){const F=bF(this.items),E=new this.constructor(F).shuffle();if(D!==Number.parseInt(D,10))return E.first();return E.take(D)}reduce(D,F){let E=null;if(F!==void 0)E=F;if(Array.isArray(this.items))this.items.forEach((w)=>{E=D(E,w)});else Object.keys(this.items).forEach((w)=>{E=D(E,this.items[w],w)});return E}reject(D){return new this.constructor(this.items).filter((F)=>!D(F))}replace(D){if(!D)return this;if(Array.isArray(D)){const E=this.items.map((w,$)=>D[$]||w);return new this.constructor(E)}if(D.constructor.name==="Collection"){const E={...this.items,...D.all()};return new this.constructor(E)}const F={...this.items,...D};return new this.constructor(F)}replaceRecursive(D){const F=(E,w)=>{const $={...E};return Object.keys({...E,...w}).forEach((f)=>{if(!Array.isArray(w[f])&&typeof w[f]==="object")$[f]=F(E[f],w[f]);else if(E[f]===void 0&&w[f]!==void 0)if(typeof E[f]==="object")$[f]={...w[f]};else $[f]=w[f];else if(E[f]!==void 0&&w[f]===void 0)if(typeof E[f]==="object")$[f]={...E[f]};else $[f]=E[f];else if(E[f]!==void 0&&w[f]!==void 0)if(typeof w[f]==="object")$[f]={...w[f]};else $[f]=w[f]}),$};if(!D)return this;if(!Array.isArray(D)&&typeof D!=="object")return new this.constructor(F(this.items,[D]));if(D.constructor.name==="Collection")return new this.constructor(F(this.items,D.all()));return new this.constructor(F(this.items,D))}reverse(){const D=[].concat(this.items).reverse();return new this.constructor(D)}search(D,F){let E;const w=($,C)=>{if(W0(D))return D(this.items[C],C);if(F)return this.items[C]===D;return this.items[C]==D};if(e1(this.items))E=this.items.findIndex(w);else if(K1(this.items))E=Object.keys(this.items).find(($)=>w(this.items[$],$));if(E===void 0||E<0)return!1;return E}shift(D=1){if(this.isEmpty())return null;if(e1(this.items)){if(D===1)return this.items.shift();return new this.constructor(this.items.splice(0,D))}if(K1(this.items)){if(D===1){const $=Object.keys(this.items)[0],C=this.items[$];return delete this.items[$],C}const E=Object.keys(this.items).slice(0,D),w=E.reduce(($,C)=>{return $[C]=this.items[C],$},{});return s7(this.items,E),new this.constructor(w)}return null}shuffle(){const D=bF(this.items);let F,E,w;for(w=D.length;w;w-=1)F=Math.floor(Math.random()*w),E=D[w-1],D[w-1]=D[F],D[F]=E;return this.items=D,this}skip(D){if(K1(this.items))return new this.constructor(Object.keys(this.items).reduce((F,E,w)=>{if(w+1>D)F[E]=this.items[E];return F},{}));return new this.constructor(this.items.slice(D))}skipUntil(D){let F=null,E,w=($)=>$===D;if(W0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!0)F=w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!0)F=w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}skipWhile(D){let F=null,E,w=($)=>$===D;if(W0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!0)F=!w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!0)F=!w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}slice(D,F){let E=this.items.slice(D);if(F!==void 0)E=E.slice(0,F);return new this.constructor(E)}sole(){if(this.items.length!==1)throw new Error("Collection does not contain exactly one item.");return this.items[0]}some(D){return this.items.some((F)=>F.hasOwnProperty(D))}sort(D){const F=[].concat(this.items);if(D===void 0)if(this.every((E)=>typeof E==="number"))F.sort((E,w)=>E-w);else F.sort();else F.sort(D);return new this.constructor(F)}sortDesc(){return this.sort().reverse()}sortBy(D){const F=[].concat(this.items),E=(w)=>{if(W0(D))return D(w);return J6(w,D)};return F.sort((w,$)=>{const C=E(w),f=E($);if(C===null||C===void 0)return 1;if(f===null||f===void 0)return-1;if(C<f)return-1;if(C>f)return 1;return 0}),new this.constructor(F)}sortByDesc(D){return this.sortBy(D).reverse()}sortKeys(){const D={};return Object.keys(this.items).sort().forEach((F)=>{D[F]=this.items[F]}),new this.constructor(D)}sortKeysDesc(){const D={};return Object.keys(this.items).sort().reverse().forEach((F)=>{D[F]=this.items[F]}),new this.constructor(D)}splice(D,F,E){const w=this.slice(D,F);if(this.items=this.diff(w.all()).all(),Array.isArray(E))for(let $=0,{length:C}=E;$<C;$+=1)this.items.splice(D+$,0,E[$]);return w}split(D){const F=this.toArray(),E=[],w=Math.ceil(F.length/D);for(let $=0;$<F.length;$+=w)E.push(F.slice($,$+w));return new hD(E)}sum(D){const F=bF(this.items);let E=0;if(D===void 0)for(let w=0,{length:$}=F;w<$;w+=1)E+=Number.parseFloat(F[w]);else if(W0(D))for(let w=0,{length:$}=F;w<$;w+=1)E+=Number.parseFloat(D(F[w]));else for(let w=0,{length:$}=F;w<$;w+=1)E+=Number.parseFloat(F[w][D]);return Number.parseFloat(E.toPrecision(12))}take(D){if(!Array.isArray(this.items)&&typeof this.items==="object"){const F=Object.keys(this.items);let E;if(D<0)E=F.slice(D);else E=F.slice(0,D);const w={};return F.forEach(($)=>{if(E.includes($))w[$]=this.items[$]}),new this.constructor(w)}if(D<0)return new this.constructor(this.items.slice(D));return new this.constructor(this.items.slice(0,D))}takeUntil(D){let F=null,E,w=($)=>$===D;if(W0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!1)F=!w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!1)F=!w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}takeWhile(D){let F=null,E,w=($)=>$===D;if(W0(D))w=D;if(e1(this.items))E=this.items.filter(($)=>{if(F!==!1)F=w($);return F});if(K1(this.items))E=Object.keys(this.items).reduce(($,C)=>{if(F!==!1)F=w(this.items[C]);if(F!==!1)$[C]=this.items[C];return $},{});return new this.constructor(E)}tap(D){return D(this),this}times(D,F){for(let E=1;E<=D;E+=1)this.items.push(F(E));return this}toArray(){return Array.isArray(this.items)?this.items:Object.values(this.items)}toJson(){return JSON.stringify(this.items)}transform(D){if(Array.isArray(this.items))this.items=this.items.map(D);else{const F={};Object.keys(this.items).forEach((E)=>{F[E]=D(this.items[E],E)}),this.items=F}return this}undot(){if(Array.isArray(this.items))return this;let D={};return Object.keys(this.items).forEach((F)=>{if(F.includes(".")){const E=D;F.split(".").reduce((w,$,C,f)=>{if(!w[$])w[$]={};if(C===f.length-1)w[$]=this.items[F];return w[$]},E),D={...D,...E}}else D[F]=this.items[F]}),new this.constructor(D)}unless(D,F,E){if(!D)return F(this);if(E)return E();return}unlessEmpty(D){if(!this.isEmpty())D(this);return this}unlessNotEmpty(D){if(this.isEmpty())D(this);return this}union(D){const F=JSON.parse(JSON.stringify(this.items));return Object.keys(D).forEach((E)=>{if(this.items[E]===void 0)F[E]=D[E]}),new this.constructor(F)}unique(){const D=Array.from(new Set(this.items));return new this.constructor(D)}unwrap(){return this.items}values(){return new hD(Object.values(this.items))}when(D,F,E){if(D)F(this,D);else if(E)E();return this}whenEmpty(D,F){if(Array.isArray(this.items)&&!this.items.length)return D(this);if(!Object.keys(this.items).length)return D(this);if(F!==void 0){if(Array.isArray(this.items)&&this.items.length)return F(this);if(Object.keys(this.items).length)return F(this)}return this}whenNotEmpty(D,F){if(Array.isArray(this.items)&&this.items.length)return D(this);if(Object.keys(this.items).length)return D(this);if(F!==void 0){if(Array.isArray(this.items)&&!this.items.length)return F(this);if(!Object.keys(this.items).length)return F(this)}return this}where(D,F,E){if(arguments.length===1)return new hD(this.items.filter(($)=>$[D]!==void 0));if(arguments.length===2)E=F,F="===";const w=($,C,f,B)=>{const h=$[C];switch(B){case"===":return h===f;case"!==":return h!==f;case"<":return h<f;case"<=":return h<=f;case">":return h>f;case">=":return h>=f;default:return h==f}};return new hD(this.items.filter(($)=>w($,D,E,F)))}whereBetween(D,F){return this.filter((E)=>{const w=typeof E==="object"?E[D]:E;return w>=F[0]&&w<=F[1]})}whereIn(D,F){return this.filter((E)=>{const w=typeof E==="object"?E[D]:E;return F.includes(w)})}whereNotBetween(D,F){return this.filter((E)=>{const w=typeof E==="object"?E[D]:E;return w<F[0]||w>F[1]})}whereNotIn(D,F){const E=this.items.filter((w)=>{const $=D.split(".");let C=w;for(let f of $){if(C[f]===void 0)return!0;C=C[f]}return!F.includes(C)});return new hD(E)}getNestedValue(D,F){return F.split(".").reduce((w,$)=>w&&w[$]!==void 0?w[$]:null,D)}whereInstanceOf(D){return this.filter((F)=>F instanceof D)}whereNotNull(D){return this.where(D,"!==",null)}whereNull(D){return this.where(D,"===",null)}static wrap(D){if(D instanceof hD)return D;return new hD(Array.isArray(D)?D:[D])}static unwrap(D){if(D instanceof hD)return D.all();return D}wrap(D){if(D instanceof hD)return D;if(typeof D==="object")return new hD(D);return new hD([D])}zip(...D){const F=D.map((w)=>this.constructor.wrap(w).all()),E=this.items.map((w,$)=>{const C=[w];return F.forEach((f)=>{C.push(f[$])}),new this.constructor(C)});return new this.constructor(E)}}var j4D=function D(F){const E={};return F.forEach((w,$)=>{function C(f,B){if(K1(f))Object.keys(f).forEach((h)=>{C(f[h],`${B}.${h}`)});else if(e1(f))f.forEach((h,U)=>{C(h,`${B}.${U}`)});E[B]=f}C(w,$)}),E};hE();var krD=vc(["The best way to get started is to quit talking and begin doing.","The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.","Don\u2019t let yesterday take up too much of today.","You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.","It\u2019s not whether you get knocked down, it\u2019s whether you get up.","If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.","People who are crazy enough to think they can change the world, are the ones who do.","Failure will never overtake me if my determination to succeed is strong enough.","Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.","We may encounter many defeats but we must not be defeated.","Knowing is not enough; we must apply. Wishing is not enough; we must do.","Imagine your life is perfect in every respect; what would it look like?","We generate fears while we sit. We overcome them by action.","Whether you think you can or think you can\u2019t, you\u2019re right.","Security is mostly a superstition. Life is either a daring adventure or nothing."]);var Dg=L(ec(),1);async function F_D(){c4D.env.AWS_REGION="us-east-1";const D=await K2()(),F=RU.models;if(!F)throw new Error("No AI models found. Please set ./config/ai.ts values.");for(let E of F)try{d1.info(`Requesting access to model ${E}`);const w={host:"bedrock.us-east-1.amazonaws.com",method:"POST",path:"/foundation-model-entitlement",headers:{"Content-Type":"application/json"},body:JSON.stringify({modelId:E}),service:"bedrock",region:"us-east-1"},$=Dg.default.sign(w,D),C=Object.fromEntries(Object.entries($.headers||{}).map(([h,U])=>[h,String(U)])),B=await(await fetch(`https://${$.host}${$.path}`,{method:$.method,headers:C,body:$.body})).json();d1.info(`Response for model ${E}:`,B)}catch(w){d1.error(`Error requesting access to model ${E}:`,w)}}export{KqD as summarize,F_D as requestModelAccess,DjD as listFoundationModels,JqD as invokeModelWithResponseStream,XqD as invokeModel,eOD as getModelCustomizationJob,tOD as createModelCustomizationJob,o3 as client,SqD as ask,ZF as InvokeModelCommand};
207
207
 
208
- //# debugId=360F628C3B46931B64756E2164756E21
208
+ //# debugId=4B8270026C2094EC64756E2164756E21
209
209
  //# sourceMappingURL=index.js.map