flurry-cli 0.0.2 → 0.0.3
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/cli.js +2 -2
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -73,7 +73,7 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
|
|
|
73
73
|
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
74
74
|
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
75
75
|
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
76
|
-
`),Of=!0}throw new io.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0})}return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),Sm.fromEnv(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:a,ssoAccountId:n,ssoRegion:i,ssoRoleName:r,ssoSession:h}=e;if(!a&&!n&&!i&&!r&&!h)throw new io.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:s}=await Promise.resolve().then(()=>Eh(My()));return s(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:a}=await Promise.resolve().then(()=>Eh(vf()));return a(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:a}=await Promise.resolve().then(()=>Eh(im()));return a(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:a}=await Promise.resolve().then(()=>Eh(hm()));return a(e)()},async()=>{return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await BBe(e))()},async()=>{throw new io.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}),Zf,qf),"defaultProvider"),qf=LB((e)=>e?.expiration!==void 0,"credentialsWillNeedRefresh"),Zf=LB((e)=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<300000,"credentialsTreatedAsExpired")});var SJ=G((sJ)=>{Object.defineProperty(sJ,"__esModule",{value:!0});sJ.ruleSet=void 0;var rJ="required",di="fn",yi="argv",Oh="ref",Xf=!0,jf="isSet",Mk="booleanEquals",vh="error",Yh="endpoint",fr="tree",Bm="PartitionResult",cm="getAttr",If={[rJ]:!1,type:"String"},xf={[rJ]:!0,default:!1,type:"Boolean"},_f={[Oh]:"Endpoint"},lJ={[di]:Mk,[yi]:[{[Oh]:"UseFIPS"},!0]},oJ={[di]:Mk,[yi]:[{[Oh]:"UseDualStack"},!0]},gi={},pf={[di]:cm,[yi]:[{[Oh]:Bm},"supportsFIPS"]},hJ={[Oh]:Bm},eJ={[di]:Mk,[yi]:[!0,{[di]:cm,[yi]:[hJ,"supportsDualStack"]}]},aJ=[lJ],nJ=[oJ],iJ=[{[Oh]:"Region"}],MBe={version:"1.0",parameters:{Region:If,UseDualStack:xf,UseFIPS:xf,Endpoint:If},rules:[{conditions:[{[di]:jf,[yi]:[_f]}],rules:[{conditions:aJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:vh},{conditions:nJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:vh},{endpoint:{url:_f,properties:gi,headers:gi},type:Yh}],type:fr},{conditions:[{[di]:jf,[yi]:iJ}],rules:[{conditions:[{[di]:"aws.partition",[yi]:iJ,assign:Bm}],rules:[{conditions:[lJ,oJ],rules:[{conditions:[{[di]:Mk,[yi]:[Xf,pf]},eJ],rules:[{endpoint:{url:"https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:vh}],type:fr},{conditions:aJ,rules:[{conditions:[{[di]:Mk,[yi]:[pf,Xf]}],rules:[{conditions:[{[di]:"stringEquals",[yi]:[{[di]:cm,[yi]:[hJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sqs.{Region}.amazonaws.com",properties:gi,headers:gi},type:Yh},{endpoint:{url:"https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr},{error:"FIPS is enabled but this partition does not support FIPS",type:vh}],type:fr},{conditions:nJ,rules:[{conditions:[eJ],rules:[{endpoint:{url:"https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr},{error:"DualStack is enabled but this partition does not support DualStack",type:vh}],type:fr},{endpoint:{url:"https://sqs.{Region}.{PartitionResult#dnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr}],type:fr},{error:"Invalid Configuration: Missing Region",type:vh}]};sJ.ruleSet=MBe});var cJ=G((uJ)=>{Object.defineProperty(uJ,"__esModule",{value:!0});uJ.defaultEndpointResolver=void 0;var gBe=$l(),Mm=Ql(),dBe=SJ(),yBe=new Mm.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),mBe=(e,a={})=>{return yBe.get(e,()=>Mm.resolveEndpoint(dBe.ruleSet,{endpointParams:e,logger:a.logger}))};uJ.defaultEndpointResolver=mBe;Mm.customEndpointFunctions.aws=gBe.awsEndpointFunctions});var mJ=G((dJ)=>{Object.defineProperty(dJ,"__esModule",{value:!0});dJ.getRuntimeConfig=void 0;var CBe=Na(),zBe=we(),HBe=Dr(),MJ=Mn(),gJ=Qa(),bBe=fd(),GBe=cJ(),DBe=(e)=>{return{apiVersion:"2012-11-05",base64Decoder:e?.base64Decoder??MJ.fromBase64,base64Encoder:e?.base64Encoder??MJ.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??GBe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??bBe.defaultSQSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(a)=>a.getIdentityProvider("aws.auth#sigv4"),signer:new CBe.AwsSdkSigV4Signer}],logger:e?.logger??new zBe.NoOpLogger,serviceId:e?.serviceId??"SQS",urlParser:e?.urlParser??HBe.parseUrl,utf8Decoder:e?.utf8Decoder??gJ.fromUtf8,utf8Encoder:e?.utf8Encoder??gJ.toUtf8}};dJ.getRuntimeConfig=DBe});var LJ=G((DJ)=>{Object.defineProperty(DJ,"__esModule",{value:!0});DJ.getRuntimeConfig=void 0;var KBe=an(),LBe=KBe.__importDefault(at()),CJ=Na(),wBe=um(),zJ=yh(),wB=li(),HJ=mh(),bJ=Ti(),ro=Lr(),GJ=ll(),PBe=Ch(),RBe=_l(),WBe=mJ(),tBe=we(),FBe=Gh(),ABe=we(),TBe=(e)=>{ABe.emitWarningIfUnsupportedVersion(process.version);let a=FBe.resolveDefaultsModeConfig(e),n=()=>a().then(tBe.loadConfigsForDefaultMode),i=WBe.getRuntimeConfig(e);CJ.emitWarningIfUnsupportedVersion(process.version);let r={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:a,authSchemePreference:e?.authSchemePreference??ro.loadConfig(CJ.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,r),bodyLengthChecker:e?.bodyLengthChecker??PBe.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??wBe.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??zJ.createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:LBe.default.version}),maxAttempts:e?.maxAttempts??ro.loadConfig(bJ.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),md5:e?.md5??HJ.Hash.bind(null,"md5"),region:e?.region??ro.loadConfig(wB.NODE_REGION_CONFIG_OPTIONS,{...wB.NODE_REGION_CONFIG_FILE_OPTIONS,...r}),requestHandler:GJ.NodeHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??ro.loadConfig({...bJ.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||RBe.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??HJ.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??GJ.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??ro.loadConfig(wB.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,r),useFipsEndpoint:e?.useFipsEndpoint??ro.loadConfig(wB.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,r),userAgentAppId:e?.userAgentAppId??ro.loadConfig(zJ.NODE_APP_ID_CONFIG_OPTIONS,r)}};DJ.getRuntimeConfig=TBe});var JN=G((nLe,fN)=>{var{defineProperty:PB,getOwnPropertyDescriptor:VBe,getOwnPropertyNames:fBe}=Object,JBe=Object.prototype.hasOwnProperty,w=(e,a)=>PB(e,"name",{value:a,configurable:!0}),NBe=(e,a)=>{for(var n in a)PB(e,n,{get:a[n],enumerable:!0})},EBe=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of fBe(a))if(!JBe.call(e,r)&&r!==n)PB(e,r,{get:()=>a[r],enumerable:!(i=VBe(a,r))||i.enumerable})}return e},vBe=(e)=>EBe(PB({},"__esModule",{value:!0}),e),FJ={};NBe(FJ,{AddPermissionCommand:()=>MN,BatchEntryIdsNotDistinct:()=>OJ,BatchRequestTooLong:()=>oN,CancelMessageMoveTaskCommand:()=>gN,ChangeMessageVisibilityBatchCommand:()=>dN,ChangeMessageVisibilityCommand:()=>yN,CreateQueueCommand:()=>mN,DeleteMessageBatchCommand:()=>CN,DeleteMessageCommand:()=>zN,DeleteQueueCommand:()=>HN,EmptyBatchRequest:()=>QJ,GetQueueAttributesCommand:()=>bN,GetQueueUrlCommand:()=>GN,InvalidAddress:()=>AJ,InvalidAttributeName:()=>ZJ,InvalidAttributeValue:()=>UJ,InvalidBatchEntryId:()=>$J,InvalidIdFormat:()=>IJ,InvalidMessageContents:()=>lN,InvalidSecurity:()=>TJ,KmsAccessDenied:()=>_J,KmsDisabled:()=>pJ,KmsInvalidKeyUsage:()=>eN,KmsInvalidState:()=>aN,KmsNotFound:()=>nN,KmsOptInRequired:()=>iN,KmsThrottled:()=>rN,ListDeadLetterSourceQueuesCommand:()=>dm,ListMessageMoveTasksCommand:()=>DN,ListQueueTagsCommand:()=>KN,ListQueuesCommand:()=>ym,MessageNotInflight:()=>vJ,MessageSystemAttributeName:()=>xBe,MessageSystemAttributeNameForSends:()=>_Be,OverLimit:()=>VJ,PurgeQueueCommand:()=>LN,PurgeQueueInProgress:()=>xJ,QueueAttributeName:()=>IBe,QueueDeletedRecently:()=>XJ,QueueDoesNotExist:()=>fJ,QueueNameExists:()=>jJ,ReceiptHandleIsInvalid:()=>YJ,ReceiveMessageCommand:()=>wN,RemovePermissionCommand:()=>PN,RequestThrottled:()=>JJ,ResourceNotFoundException:()=>EJ,SQS:()=>VN,SQSClient:()=>RB,SQSServiceException:()=>ha,SendMessageBatchCommand:()=>RN,SendMessageCommand:()=>WN,SetQueueAttributesCommand:()=>tN,StartMessageMoveTaskCommand:()=>FN,TagQueueCommand:()=>AN,TooManyEntriesInBatchRequest:()=>qJ,UnsupportedOperation:()=>NJ,UntagQueueCommand:()=>TN,__Client:()=>J.Client,paginateListDeadLetterSourceQueues:()=>Sge,paginateListQueues:()=>uge});fN.exports=vBe(FJ);var wJ=Io(),YBe=xo(),OBe=_o(),dk=PK(),PJ=jl(),QBe=li(),gk=Hn(),$Be=Bh(),La=wr(),RJ=Ti(),WJ=fd(),qBe=w((e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sqs"})},"resolveClientEndpointParameters"),Fa={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ZBe=LJ(),tJ=Dh(),gm=za(),J=we(),UBe=w((e)=>{let{httpAuthSchemes:a,httpAuthSchemeProvider:n,credentials:i}=e;return{setHttpAuthScheme(r){let h=a.findIndex((s)=>s.schemeId===r.schemeId);if(h===-1)a.push(r);else a.splice(h,1,r)},httpAuthSchemes(){return a},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){i=r},credentials(){return i}}},"getHttpAuthExtensionConfiguration"),XBe=w((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),jBe=w((e,a)=>{let n=Object.assign(tJ.getAwsRegionExtensionConfiguration(e),J.getDefaultExtensionConfiguration(e),gm.getHttpHandlerExtensionConfiguration(e),UBe(e));return a.forEach((i)=>i.configure(n)),Object.assign(e,tJ.resolveAwsRegionExtensionConfiguration(n),J.resolveDefaultRuntimeConfig(n),gm.resolveHttpHandlerRuntimeConfig(n),XBe(n))},"resolveRuntimeExtensions"),RB=class extends J.Client{static{w(this,"SQSClient")}config;constructor(...[e]){let a=ZBe.getRuntimeConfig(e||{});super(a);this.initConfig=a;let n=qBe(a),i=PJ.resolveUserAgentConfig(n),r=RJ.resolveRetryConfig(i),h=QBe.resolveRegionConfig(r),s=wJ.resolveHostHeaderConfig(h),S=La.resolveEndpointConfig(s),u=dk.resolveQueueUrlConfig(S),B=WJ.resolveHttpAuthSchemeConfig(u),M=jBe(B,e?.extensions||[]);this.config=M,this.middlewareStack.use(PJ.getUserAgentPlugin(this.config)),this.middlewareStack.use(RJ.getRetryPlugin(this.config)),this.middlewareStack.use($Be.getContentLengthPlugin(this.config)),this.middlewareStack.use(wJ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(YBe.getLoggerPlugin(this.config)),this.middlewareStack.use(OBe.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(dk.getQueueUrlPlugin(this.config)),this.middlewareStack.use(gk.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:WJ.defaultSQSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w(async(C)=>new gk.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(gk.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Aa=br(),x=Na(),ha=class e extends J.ServiceException{static{w(this,"SQSServiceException")}constructor(a){super(a);Object.setPrototypeOf(this,e.prototype)}},AJ=class e extends ha{static{w(this,"InvalidAddress")}name="InvalidAddress";$fault="client";constructor(a){super({name:"InvalidAddress",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},TJ=class e extends ha{static{w(this,"InvalidSecurity")}name="InvalidSecurity";$fault="client";constructor(a){super({name:"InvalidSecurity",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},VJ=class e extends ha{static{w(this,"OverLimit")}name="OverLimit";$fault="client";constructor(a){super({name:"OverLimit",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},fJ=class e extends ha{static{w(this,"QueueDoesNotExist")}name="QueueDoesNotExist";$fault="client";constructor(a){super({name:"QueueDoesNotExist",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},JJ=class e extends ha{static{w(this,"RequestThrottled")}name="RequestThrottled";$fault="client";constructor(a){super({name:"RequestThrottled",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},NJ=class e extends ha{static{w(this,"UnsupportedOperation")}name="UnsupportedOperation";$fault="client";constructor(a){super({name:"UnsupportedOperation",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},EJ=class e extends ha{static{w(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(a){super({name:"ResourceNotFoundException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},vJ=class e extends ha{static{w(this,"MessageNotInflight")}name="MessageNotInflight";$fault="client";constructor(a){super({name:"MessageNotInflight",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},YJ=class e extends ha{static{w(this,"ReceiptHandleIsInvalid")}name="ReceiptHandleIsInvalid";$fault="client";constructor(a){super({name:"ReceiptHandleIsInvalid",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},OJ=class e extends ha{static{w(this,"BatchEntryIdsNotDistinct")}name="BatchEntryIdsNotDistinct";$fault="client";constructor(a){super({name:"BatchEntryIdsNotDistinct",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},QJ=class e extends ha{static{w(this,"EmptyBatchRequest")}name="EmptyBatchRequest";$fault="client";constructor(a){super({name:"EmptyBatchRequest",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},$J=class e extends ha{static{w(this,"InvalidBatchEntryId")}name="InvalidBatchEntryId";$fault="client";constructor(a){super({name:"InvalidBatchEntryId",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},qJ=class e extends ha{static{w(this,"TooManyEntriesInBatchRequest")}name="TooManyEntriesInBatchRequest";$fault="client";constructor(a){super({name:"TooManyEntriesInBatchRequest",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},IBe={All:"All",ApproximateNumberOfMessages:"ApproximateNumberOfMessages",ApproximateNumberOfMessagesDelayed:"ApproximateNumberOfMessagesDelayed",ApproximateNumberOfMessagesNotVisible:"ApproximateNumberOfMessagesNotVisible",ContentBasedDeduplication:"ContentBasedDeduplication",CreatedTimestamp:"CreatedTimestamp",DeduplicationScope:"DeduplicationScope",DelaySeconds:"DelaySeconds",FifoQueue:"FifoQueue",FifoThroughputLimit:"FifoThroughputLimit",KmsDataKeyReusePeriodSeconds:"KmsDataKeyReusePeriodSeconds",KmsMasterKeyId:"KmsMasterKeyId",LastModifiedTimestamp:"LastModifiedTimestamp",MaximumMessageSize:"MaximumMessageSize",MessageRetentionPeriod:"MessageRetentionPeriod",Policy:"Policy",QueueArn:"QueueArn",ReceiveMessageWaitTimeSeconds:"ReceiveMessageWaitTimeSeconds",RedriveAllowPolicy:"RedriveAllowPolicy",RedrivePolicy:"RedrivePolicy",SqsManagedSseEnabled:"SqsManagedSseEnabled",VisibilityTimeout:"VisibilityTimeout"},ZJ=class e extends ha{static{w(this,"InvalidAttributeName")}name="InvalidAttributeName";$fault="client";constructor(a){super({name:"InvalidAttributeName",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},UJ=class e extends ha{static{w(this,"InvalidAttributeValue")}name="InvalidAttributeValue";$fault="client";constructor(a){super({name:"InvalidAttributeValue",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},XJ=class e extends ha{static{w(this,"QueueDeletedRecently")}name="QueueDeletedRecently";$fault="client";constructor(a){super({name:"QueueDeletedRecently",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},jJ=class e extends ha{static{w(this,"QueueNameExists")}name="QueueNameExists";$fault="client";constructor(a){super({name:"QueueNameExists",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},IJ=class e extends ha{static{w(this,"InvalidIdFormat")}name="InvalidIdFormat";$fault="client";constructor(a){super({name:"InvalidIdFormat",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},xJ=class e extends ha{static{w(this,"PurgeQueueInProgress")}name="PurgeQueueInProgress";$fault="client";constructor(a){super({name:"PurgeQueueInProgress",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},_J=class e extends ha{static{w(this,"KmsAccessDenied")}name="KmsAccessDenied";$fault="client";constructor(a){super({name:"KmsAccessDenied",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},pJ=class e extends ha{static{w(this,"KmsDisabled")}name="KmsDisabled";$fault="client";constructor(a){super({name:"KmsDisabled",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},eN=class e extends ha{static{w(this,"KmsInvalidKeyUsage")}name="KmsInvalidKeyUsage";$fault="client";constructor(a){super({name:"KmsInvalidKeyUsage",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},aN=class e extends ha{static{w(this,"KmsInvalidState")}name="KmsInvalidState";$fault="client";constructor(a){super({name:"KmsInvalidState",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},nN=class e extends ha{static{w(this,"KmsNotFound")}name="KmsNotFound";$fault="client";constructor(a){super({name:"KmsNotFound",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},iN=class e extends ha{static{w(this,"KmsOptInRequired")}name="KmsOptInRequired";$fault="client";constructor(a){super({name:"KmsOptInRequired",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},rN=class e extends ha{static{w(this,"KmsThrottled")}name="KmsThrottled";$fault="client";constructor(a){super({name:"KmsThrottled",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},xBe={AWSTraceHeader:"AWSTraceHeader",All:"All",ApproximateFirstReceiveTimestamp:"ApproximateFirstReceiveTimestamp",ApproximateReceiveCount:"ApproximateReceiveCount",DeadLetterQueueSourceArn:"DeadLetterQueueSourceArn",MessageDeduplicationId:"MessageDeduplicationId",MessageGroupId:"MessageGroupId",SenderId:"SenderId",SentTimestamp:"SentTimestamp",SequenceNumber:"SequenceNumber"},lN=class e extends ha{static{w(this,"InvalidMessageContents")}name="InvalidMessageContents";$fault="client";constructor(a){super({name:"InvalidMessageContents",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},_Be={AWSTraceHeader:"AWSTraceHeader"},oN=class e extends ha{static{w(this,"BatchRequestTooLong")}name="BatchRequestTooLong";$fault="client";constructor(a){super({name:"BatchRequestTooLong",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},pBe=w(async(e,a)=>{let n=wa("AddPermission"),i;return i=JSON.stringify(zMe(e,a)),Va(a,n,"/",void 0,i)},"se_AddPermissionCommand"),ece=w(async(e,a)=>{let n=wa("CancelMessageMoveTask"),i;return i=JSON.stringify(bMe(e,a)),Va(a,n,"/",void 0,i)},"se_CancelMessageMoveTaskCommand"),ace=w(async(e,a)=>{let n=wa("ChangeMessageVisibility"),i;return i=JSON.stringify(LMe(e,a)),Va(a,n,"/",void 0,i)},"se_ChangeMessageVisibilityCommand"),nce=w(async(e,a)=>{let n=wa("ChangeMessageVisibilityBatch"),i;return i=JSON.stringify(GMe(e,a)),Va(a,n,"/",void 0,i)},"se_ChangeMessageVisibilityBatchCommand"),ice=w(async(e,a)=>{let n=wa("CreateQueue"),i;return i=JSON.stringify(wMe(e,a)),Va(a,n,"/",void 0,i)},"se_CreateQueueCommand"),rce=w(async(e,a)=>{let n=wa("DeleteMessage"),i;return i=JSON.stringify(tMe(e,a)),Va(a,n,"/",void 0,i)},"se_DeleteMessageCommand"),lce=w(async(e,a)=>{let n=wa("DeleteMessageBatch"),i;return i=JSON.stringify(PMe(e,a)),Va(a,n,"/",void 0,i)},"se_DeleteMessageBatchCommand"),oce=w(async(e,a)=>{let n=wa("DeleteQueue"),i;return i=JSON.stringify(FMe(e,a)),Va(a,n,"/",void 0,i)},"se_DeleteQueueCommand"),hce=w(async(e,a)=>{let n=wa("GetQueueAttributes"),i;return i=JSON.stringify(AMe(e,a)),Va(a,n,"/",void 0,i)},"se_GetQueueAttributesCommand"),sce=w(async(e,a)=>{let n=wa("GetQueueUrl"),i;return i=JSON.stringify(TMe(e,a)),Va(a,n,"/",void 0,i)},"se_GetQueueUrlCommand"),kce=w(async(e,a)=>{let n=wa("ListDeadLetterSourceQueues"),i;return i=JSON.stringify(VMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListDeadLetterSourceQueuesCommand"),Sce=w(async(e,a)=>{let n=wa("ListMessageMoveTasks"),i;return i=JSON.stringify(fMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListMessageMoveTasksCommand"),uce=w(async(e,a)=>{let n=wa("ListQueues"),i;return i=JSON.stringify(JMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListQueuesCommand"),Bce=w(async(e,a)=>{let n=wa("ListQueueTags"),i;return i=JSON.stringify(NMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListQueueTagsCommand"),cce=w(async(e,a)=>{let n=wa("PurgeQueue"),i;return i=JSON.stringify(QMe(e,a)),Va(a,n,"/",void 0,i)},"se_PurgeQueueCommand"),Mce=w(async(e,a)=>{let n=wa("ReceiveMessage"),i;return i=JSON.stringify($Me(e,a)),Va(a,n,"/",void 0,i)},"se_ReceiveMessageCommand"),gce=w(async(e,a)=>{let n=wa("RemovePermission"),i;return i=JSON.stringify(qMe(e,a)),Va(a,n,"/",void 0,i)},"se_RemovePermissionCommand"),dce=w(async(e,a)=>{let n=wa("SendMessage"),i;return i=JSON.stringify(jMe(e,a)),Va(a,n,"/",void 0,i)},"se_SendMessageCommand"),yce=w(async(e,a)=>{let n=wa("SendMessageBatch"),i;return i=JSON.stringify(ZMe(e,a)),Va(a,n,"/",void 0,i)},"se_SendMessageBatchCommand"),mce=w(async(e,a)=>{let n=wa("SetQueueAttributes"),i;return i=JSON.stringify(IMe(e,a)),Va(a,n,"/",void 0,i)},"se_SetQueueAttributesCommand"),Cce=w(async(e,a)=>{let n=wa("StartMessageMoveTask"),i;return i=JSON.stringify(xMe(e,a)),Va(a,n,"/",void 0,i)},"se_StartMessageMoveTaskCommand"),zce=w(async(e,a)=>{let n=wa("TagQueue"),i;return i=JSON.stringify(pMe(e,a)),Va(a,n,"/",void 0,i)},"se_TagQueueCommand"),Hce=w(async(e,a)=>{let n=wa("UntagQueue"),i;return i=JSON.stringify(ege(e,a)),Va(a,n,"/",void 0,i)},"se_UntagQueueCommand"),bce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_AddPermissionCommand"),Gce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_CancelMessageMoveTaskCommand"),Dce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_ChangeMessageVisibilityCommand"),Kce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ChangeMessageVisibilityBatchCommand"),Lce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_CreateQueueCommand"),wce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_DeleteMessageCommand"),Pce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_DeleteMessageBatchCommand"),Rce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_DeleteQueueCommand"),Wce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_GetQueueAttributesCommand"),tce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_GetQueueUrlCommand"),Fce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListDeadLetterSourceQueuesCommand"),Ace=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListMessageMoveTasksCommand"),Tce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListQueuesCommand"),Vce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListQueueTagsCommand"),fce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_PurgeQueueCommand"),Jce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=oge(n,a),{$metadata:Me(e),...i}},"de_ReceiveMessageCommand"),Nce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_RemovePermissionCommand"),Ece=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_SendMessageCommand"),vce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_SendMessageBatchCommand"),Yce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_SetQueueAttributesCommand"),Oce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_StartMessageMoveTaskCommand"),Qce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_TagQueueCommand"),$ce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_UntagQueueCommand"),Ta=w(async(e,a)=>{let n={...e,body:await x.parseJsonErrorBody(e.body,a)};sge(n,e.headers);let i=x.loadRestJsonErrorCode(e,n.body);switch(i){case"InvalidAddress":case"com.amazonaws.sqs#InvalidAddress":throw await Xce(n,a);case"InvalidSecurity":case"com.amazonaws.sqs#InvalidSecurity":throw await eMe(n,a);case"OverLimit":case"com.amazonaws.sqs#OverLimit":throw await kMe(n,a);case"QueueDoesNotExist":case"com.amazonaws.sqs#QueueDoesNotExist":case"AWS.SimpleQueueService.NonExistentQueue":throw await BMe(n,a);case"RequestThrottled":case"com.amazonaws.sqs#RequestThrottled":throw await gMe(n,a);case"UnsupportedOperation":case"com.amazonaws.sqs#UnsupportedOperation":case"AWS.SimpleQueueService.UnsupportedOperation":throw await mMe(n,a);case"ResourceNotFoundException":case"com.amazonaws.sqs#ResourceNotFoundException":throw await dMe(n,a);case"MessageNotInflight":case"com.amazonaws.sqs#MessageNotInflight":case"AWS.SimpleQueueService.MessageNotInflight":throw await sMe(n,a);case"ReceiptHandleIsInvalid":case"com.amazonaws.sqs#ReceiptHandleIsInvalid":throw await MMe(n,a);case"BatchEntryIdsNotDistinct":case"com.amazonaws.sqs#BatchEntryIdsNotDistinct":case"AWS.SimpleQueueService.BatchEntryIdsNotDistinct":throw await qce(n,a);case"EmptyBatchRequest":case"com.amazonaws.sqs#EmptyBatchRequest":case"AWS.SimpleQueueService.EmptyBatchRequest":throw await Uce(n,a);case"InvalidBatchEntryId":case"com.amazonaws.sqs#InvalidBatchEntryId":case"AWS.SimpleQueueService.InvalidBatchEntryId":throw await xce(n,a);case"TooManyEntriesInBatchRequest":case"com.amazonaws.sqs#TooManyEntriesInBatchRequest":case"AWS.SimpleQueueService.TooManyEntriesInBatchRequest":throw await yMe(n,a);case"InvalidAttributeName":case"com.amazonaws.sqs#InvalidAttributeName":throw await jce(n,a);case"InvalidAttributeValue":case"com.amazonaws.sqs#InvalidAttributeValue":throw await Ice(n,a);case"QueueDeletedRecently":case"com.amazonaws.sqs#QueueDeletedRecently":case"AWS.SimpleQueueService.QueueDeletedRecently":throw await uMe(n,a);case"QueueNameExists":case"com.amazonaws.sqs#QueueNameExists":case"QueueAlreadyExists":throw await cMe(n,a);case"InvalidIdFormat":case"com.amazonaws.sqs#InvalidIdFormat":throw await _ce(n,a);case"PurgeQueueInProgress":case"com.amazonaws.sqs#PurgeQueueInProgress":case"AWS.SimpleQueueService.PurgeQueueInProgress":throw await SMe(n,a);case"KmsAccessDenied":case"com.amazonaws.sqs#KmsAccessDenied":case"KMS.AccessDeniedException":throw await aMe(n,a);case"KmsDisabled":case"com.amazonaws.sqs#KmsDisabled":case"KMS.DisabledException":throw await nMe(n,a);case"KmsInvalidKeyUsage":case"com.amazonaws.sqs#KmsInvalidKeyUsage":case"KMS.InvalidKeyUsageException":throw await iMe(n,a);case"KmsInvalidState":case"com.amazonaws.sqs#KmsInvalidState":case"KMS.InvalidStateException":throw await rMe(n,a);case"KmsNotFound":case"com.amazonaws.sqs#KmsNotFound":case"KMS.NotFoundException":throw await lMe(n,a);case"KmsOptInRequired":case"com.amazonaws.sqs#KmsOptInRequired":case"KMS.OptInRequired":throw await oMe(n,a);case"KmsThrottled":case"com.amazonaws.sqs#KmsThrottled":case"KMS.ThrottlingException":throw await hMe(n,a);case"InvalidMessageContents":case"com.amazonaws.sqs#InvalidMessageContents":throw await pce(n,a);case"BatchRequestTooLong":case"com.amazonaws.sqs#BatchRequestTooLong":case"AWS.SimpleQueueService.BatchRequestTooLong":throw await Zce(n,a);default:let r=n.body;return hge({output:e,parsedBody:r,errorCode:i})}},"de_CommandError"),qce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new OJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_BatchEntryIdsNotDistinctRes"),Zce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new oN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_BatchRequestTooLongRes"),Uce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new QJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_EmptyBatchRequestRes"),Xce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new AJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidAddressRes"),jce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new ZJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidAttributeNameRes"),Ice=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new UJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidAttributeValueRes"),xce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new $J({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidBatchEntryIdRes"),_ce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new IJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidIdFormatRes"),pce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new lN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidMessageContentsRes"),eMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new TJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidSecurityRes"),aMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new _J({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsAccessDeniedRes"),nMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new pJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsDisabledRes"),iMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new eN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsInvalidKeyUsageRes"),rMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new aN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsInvalidStateRes"),lMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new nN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsNotFoundRes"),oMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new iN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsOptInRequiredRes"),hMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new rN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsThrottledRes"),sMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new vJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_MessageNotInflightRes"),kMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new VJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_OverLimitRes"),SMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new xJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_PurgeQueueInProgressRes"),uMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new XJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_QueueDeletedRecentlyRes"),BMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new fJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_QueueDoesNotExistRes"),cMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new jJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_QueueNameExistsRes"),MMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new YJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_ReceiptHandleIsInvalidRes"),gMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new JJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_RequestThrottledRes"),dMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new EJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_ResourceNotFoundExceptionRes"),yMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new qJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_TooManyEntriesInBatchRequestRes"),mMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new NJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_UnsupportedOperationRes"),CMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_ActionNameList"),zMe=w((e,a)=>{return J.take(e,{AWSAccountIds:w((n)=>HMe(n,a),"AWSAccountIds"),Actions:w((n)=>CMe(n,a),"Actions"),Label:x._toStr,QueueUrl:x._toStr})},"se_AddPermissionRequest"),hN=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_AttributeNameList"),HMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_AWSAccountIdList"),sN=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return a.base64Encoder(n)})},"se_BinaryList"),bMe=w((e,a)=>{return J.take(e,{TaskHandle:x._toStr})},"se_CancelMessageMoveTaskRequest"),GMe=w((e,a)=>{return J.take(e,{Entries:w((n)=>KMe(n,a),"Entries"),QueueUrl:x._toStr})},"se_ChangeMessageVisibilityBatchRequest"),DMe=w((e,a)=>{return J.take(e,{Id:x._toStr,ReceiptHandle:x._toStr,VisibilityTimeout:x._toNum})},"se_ChangeMessageVisibilityBatchRequestEntry"),KMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return DMe(n,a)})},"se_ChangeMessageVisibilityBatchRequestEntryList"),LMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,ReceiptHandle:x._toStr,VisibilityTimeout:x._toNum})},"se_ChangeMessageVisibilityRequest"),wMe=w((e,a)=>{return J.take(e,{Attributes:w((n)=>uN(n,a),"Attributes"),QueueName:x._toStr,tags:w((n)=>cN(n,a),"tags")})},"se_CreateQueueRequest"),PMe=w((e,a)=>{return J.take(e,{Entries:w((n)=>WMe(n,a),"Entries"),QueueUrl:x._toStr})},"se_DeleteMessageBatchRequest"),RMe=w((e,a)=>{return J.take(e,{Id:x._toStr,ReceiptHandle:x._toStr})},"se_DeleteMessageBatchRequestEntry"),WMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return RMe(n,a)})},"se_DeleteMessageBatchRequestEntryList"),tMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,ReceiptHandle:x._toStr})},"se_DeleteMessageRequest"),FMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr})},"se_DeleteQueueRequest"),AMe=w((e,a)=>{return J.take(e,{AttributeNames:w((n)=>hN(n,a),"AttributeNames"),QueueUrl:x._toStr})},"se_GetQueueAttributesRequest"),TMe=w((e,a)=>{return J.take(e,{QueueName:x._toStr,QueueOwnerAWSAccountId:x._toStr})},"se_GetQueueUrlRequest"),VMe=w((e,a)=>{return J.take(e,{MaxResults:x._toNum,NextToken:x._toStr,QueueUrl:x._toStr})},"se_ListDeadLetterSourceQueuesRequest"),fMe=w((e,a)=>{return J.take(e,{MaxResults:x._toNum,SourceArn:x._toStr})},"se_ListMessageMoveTasksRequest"),JMe=w((e,a)=>{return J.take(e,{MaxResults:x._toNum,NextToken:x._toStr,QueueNamePrefix:x._toStr})},"se_ListQueuesRequest"),NMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr})},"se_ListQueueTagsRequest"),EMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_MessageAttributeNameList"),vMe=w((e,a)=>{return J.take(e,{BinaryListValues:w((n)=>sN(n,a),"BinaryListValues"),BinaryValue:a.base64Encoder,DataType:x._toStr,StringListValues:w((n)=>BN(n,a),"StringListValues"),StringValue:x._toStr})},"se_MessageAttributeValue"),kN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=vMe(r,a),n},{})},"se_MessageBodyAttributeMap"),SN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=OMe(r,a),n},{})},"se_MessageBodySystemAttributeMap"),YMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_MessageSystemAttributeList"),OMe=w((e,a)=>{return J.take(e,{BinaryListValues:w((n)=>sN(n,a),"BinaryListValues"),BinaryValue:a.base64Encoder,DataType:x._toStr,StringListValues:w((n)=>BN(n,a),"StringListValues"),StringValue:x._toStr})},"se_MessageSystemAttributeValue"),QMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr})},"se_PurgeQueueRequest"),uN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=x._toStr(r),n},{})},"se_QueueAttributeMap"),$Me=w((e,a)=>{return J.take(e,{AttributeNames:w((n)=>hN(n,a),"AttributeNames"),MaxNumberOfMessages:x._toNum,MessageAttributeNames:w((n)=>EMe(n,a),"MessageAttributeNames"),MessageSystemAttributeNames:w((n)=>YMe(n,a),"MessageSystemAttributeNames"),QueueUrl:x._toStr,ReceiveRequestAttemptId:x._toStr,VisibilityTimeout:x._toNum,WaitTimeSeconds:x._toNum})},"se_ReceiveMessageRequest"),qMe=w((e,a)=>{return J.take(e,{Label:x._toStr,QueueUrl:x._toStr})},"se_RemovePermissionRequest"),ZMe=w((e,a)=>{return J.take(e,{Entries:w((n)=>XMe(n,a),"Entries"),QueueUrl:x._toStr})},"se_SendMessageBatchRequest"),UMe=w((e,a)=>{return J.take(e,{DelaySeconds:x._toNum,Id:x._toStr,MessageAttributes:w((n)=>kN(n,a),"MessageAttributes"),MessageBody:x._toStr,MessageDeduplicationId:x._toStr,MessageGroupId:x._toStr,MessageSystemAttributes:w((n)=>SN(n,a),"MessageSystemAttributes")})},"se_SendMessageBatchRequestEntry"),XMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return UMe(n,a)})},"se_SendMessageBatchRequestEntryList"),jMe=w((e,a)=>{return J.take(e,{DelaySeconds:x._toNum,MessageAttributes:w((n)=>kN(n,a),"MessageAttributes"),MessageBody:x._toStr,MessageDeduplicationId:x._toStr,MessageGroupId:x._toStr,MessageSystemAttributes:w((n)=>SN(n,a),"MessageSystemAttributes"),QueueUrl:x._toStr})},"se_SendMessageRequest"),IMe=w((e,a)=>{return J.take(e,{Attributes:w((n)=>uN(n,a),"Attributes"),QueueUrl:x._toStr})},"se_SetQueueAttributesRequest"),xMe=w((e,a)=>{return J.take(e,{DestinationArn:x._toStr,MaxNumberOfMessagesPerSecond:x._toNum,SourceArn:x._toStr})},"se_StartMessageMoveTaskRequest"),BN=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_StringList"),_Me=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_TagKeyList"),cN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=x._toStr(r),n},{})},"se_TagMap"),pMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,Tags:w((n)=>cN(n,a),"Tags")})},"se_TagQueueRequest"),ege=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,TagKeys:w((n)=>_Me(n,a),"TagKeys")})},"se_UntagQueueRequest"),age=w((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return a.base64Decoder(i)})},"de_BinaryList"),nge=w((e,a)=>{return J.take(e,{Attributes:J._json,Body:J.expectString,MD5OfBody:J.expectString,MD5OfMessageAttributes:J.expectString,MessageAttributes:w((n)=>rge(n,a),"MessageAttributes"),MessageId:J.expectString,ReceiptHandle:J.expectString})},"de_Message"),ige=w((e,a)=>{return J.take(e,{BinaryListValues:w((n)=>age(n,a),"BinaryListValues"),BinaryValue:a.base64Decoder,DataType:J.expectString,StringListValues:J._json,StringValue:J.expectString})},"de_MessageAttributeValue"),rge=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=ige(r,a),n},{})},"de_MessageBodyAttributeMap"),lge=w((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return nge(i,a)})},"de_MessageList"),oge=w((e,a)=>{return J.take(e,{Messages:w((n)=>lge(n,a),"Messages")})},"de_ReceiveMessageResult"),Me=w((e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),"deserializeMetadata"),hge=J.withBaseException(ha),Va=w(async(e,a,n,i,r)=>{let{hostname:h,protocol:s="https",port:S,path:u}=await e.endpoint(),B={protocol:s,hostname:h,port:S,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+n:u+n,headers:a};if(i!==void 0)B.hostname=i;if(r!==void 0)B.body=r;return new gm.HttpRequest(B)},"buildHttpRpcRequest");function wa(e){return{"content-type":"application/x-amz-json-1.0","x-amz-target":`AmazonSQS.${e}`,"x-amzn-query-mode":"true"}}w(wa,"sharedHeaders");var sge=w((e,a)=>{let n=a["x-amzn-query-error"];if(e.body!==void 0&&n!=null){let[i,r]=n.split(";"),h=Object.entries(e.body),s={Type:r,Code:i};Object.assign(e.body,s);for(let[S,u]of h)s[S]=u;delete s.__type,e.body.Error=s}},"populateBodyWithQueryCompatibility"),MN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","AddPermission",{}).n("SQSClient","AddPermissionCommand").f(void 0,void 0).ser(pBe).de(bce).build(){static{w(this,"AddPermissionCommand")}},gN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","CancelMessageMoveTask",{}).n("SQSClient","CancelMessageMoveTaskCommand").f(void 0,void 0).ser(ece).de(Gce).build(){static{w(this,"CancelMessageMoveTaskCommand")}},dN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ChangeMessageVisibilityBatch",{}).n("SQSClient","ChangeMessageVisibilityBatchCommand").f(void 0,void 0).ser(nce).de(Kce).build(){static{w(this,"ChangeMessageVisibilityBatchCommand")}},yN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ChangeMessageVisibility",{}).n("SQSClient","ChangeMessageVisibilityCommand").f(void 0,void 0).ser(ace).de(Dce).build(){static{w(this,"ChangeMessageVisibilityCommand")}},mN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","CreateQueue",{}).n("SQSClient","CreateQueueCommand").f(void 0,void 0).ser(ice).de(Lce).build(){static{w(this,"CreateQueueCommand")}},CN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","DeleteMessageBatch",{}).n("SQSClient","DeleteMessageBatchCommand").f(void 0,void 0).ser(lce).de(Pce).build(){static{w(this,"DeleteMessageBatchCommand")}},zN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","DeleteMessage",{}).n("SQSClient","DeleteMessageCommand").f(void 0,void 0).ser(rce).de(wce).build(){static{w(this,"DeleteMessageCommand")}},HN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","DeleteQueue",{}).n("SQSClient","DeleteQueueCommand").f(void 0,void 0).ser(oce).de(Rce).build(){static{w(this,"DeleteQueueCommand")}},bN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","GetQueueAttributes",{}).n("SQSClient","GetQueueAttributesCommand").f(void 0,void 0).ser(hce).de(Wce).build(){static{w(this,"GetQueueAttributesCommand")}},GN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","GetQueueUrl",{}).n("SQSClient","GetQueueUrlCommand").f(void 0,void 0).ser(sce).de(tce).build(){static{w(this,"GetQueueUrlCommand")}},dm=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListDeadLetterSourceQueues",{}).n("SQSClient","ListDeadLetterSourceQueuesCommand").f(void 0,void 0).ser(kce).de(Fce).build(){static{w(this,"ListDeadLetterSourceQueuesCommand")}},DN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListMessageMoveTasks",{}).n("SQSClient","ListMessageMoveTasksCommand").f(void 0,void 0).ser(Sce).de(Ace).build(){static{w(this,"ListMessageMoveTasksCommand")}},ym=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListQueues",{}).n("SQSClient","ListQueuesCommand").f(void 0,void 0).ser(uce).de(Tce).build(){static{w(this,"ListQueuesCommand")}},KN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListQueueTags",{}).n("SQSClient","ListQueueTagsCommand").f(void 0,void 0).ser(Bce).de(Vce).build(){static{w(this,"ListQueueTagsCommand")}},LN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","PurgeQueue",{}).n("SQSClient","PurgeQueueCommand").f(void 0,void 0).ser(cce).de(fce).build(){static{w(this,"PurgeQueueCommand")}},wN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions()),dk.getReceiveMessagePlugin(n)]}).s("AmazonSQS","ReceiveMessage",{}).n("SQSClient","ReceiveMessageCommand").f(void 0,void 0).ser(Mce).de(Jce).build(){static{w(this,"ReceiveMessageCommand")}},PN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","RemovePermission",{}).n("SQSClient","RemovePermissionCommand").f(void 0,void 0).ser(gce).de(Nce).build(){static{w(this,"RemovePermissionCommand")}},RN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions()),dk.getSendMessageBatchPlugin(n)]}).s("AmazonSQS","SendMessageBatch",{}).n("SQSClient","SendMessageBatchCommand").f(void 0,void 0).ser(yce).de(vce).build(){static{w(this,"SendMessageBatchCommand")}},WN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions()),dk.getSendMessagePlugin(n)]}).s("AmazonSQS","SendMessage",{}).n("SQSClient","SendMessageCommand").f(void 0,void 0).ser(dce).de(Ece).build(){static{w(this,"SendMessageCommand")}},tN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","SetQueueAttributes",{}).n("SQSClient","SetQueueAttributesCommand").f(void 0,void 0).ser(mce).de(Yce).build(){static{w(this,"SetQueueAttributesCommand")}},FN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","StartMessageMoveTask",{}).n("SQSClient","StartMessageMoveTaskCommand").f(void 0,void 0).ser(Cce).de(Oce).build(){static{w(this,"StartMessageMoveTaskCommand")}},AN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","TagQueue",{}).n("SQSClient","TagQueueCommand").f(void 0,void 0).ser(zce).de(Qce).build(){static{w(this,"TagQueueCommand")}},TN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","UntagQueue",{}).n("SQSClient","UntagQueueCommand").f(void 0,void 0).ser(Hce).de($ce).build(){static{w(this,"UntagQueueCommand")}},kge={AddPermissionCommand:MN,CancelMessageMoveTaskCommand:gN,ChangeMessageVisibilityCommand:yN,ChangeMessageVisibilityBatchCommand:dN,CreateQueueCommand:mN,DeleteMessageCommand:zN,DeleteMessageBatchCommand:CN,DeleteQueueCommand:HN,GetQueueAttributesCommand:bN,GetQueueUrlCommand:GN,ListDeadLetterSourceQueuesCommand:dm,ListMessageMoveTasksCommand:DN,ListQueuesCommand:ym,ListQueueTagsCommand:KN,PurgeQueueCommand:LN,ReceiveMessageCommand:wN,RemovePermissionCommand:PN,SendMessageCommand:WN,SendMessageBatchCommand:RN,SetQueueAttributesCommand:tN,StartMessageMoveTaskCommand:FN,TagQueueCommand:AN,UntagQueueCommand:TN},VN=class extends RB{static{w(this,"SQS")}};J.createAggregatedClient(kge,VN);var Sge=gk.createPaginator(RB,dm,"NextToken","NextToken","MaxResults"),uge=gk.createPaginator(RB,ym,"NextToken","NextToken","MaxResults")});var QN=G((OLe,ON)=>{var{defineProperty:tB,getOwnPropertyDescriptor:cge,getOwnPropertyNames:Mge}=Object,gge=Object.prototype.hasOwnProperty,dge=(e,a)=>tB(e,"name",{value:a,configurable:!0}),yge=(e,a)=>{for(var n in a)tB(e,n,{get:a[n],enumerable:!0})},mge=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Mge(a))if(!gge.call(e,r)&&r!==n)tB(e,r,{get:()=>a[r],enumerable:!(i=cge(a,r))||i.enumerable})}return e},Cge=(e)=>mge(tB({},"__esModule",{value:!0}),e),YN={};yge(YN,{resolveEventStreamSerdeConfig:()=>zge});ON.exports=Cge(YN);var zge=dge((e)=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),"resolveEventStreamSerdeConfig")});var bm=G(($N)=>{Object.defineProperty($N,"__esModule",{value:!0});$N.resolveHttpAuthSchemeConfig=$N.defaultKinesisHttpAuthSchemeProvider=$N.defaultKinesisHttpAuthSchemeParametersProvider=void 0;var Hge=Na(),Hm=vn(),bge=async(e,a,n)=>{return{operation:Hm.getSmithyContext(a).operation,region:await Hm.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};$N.defaultKinesisHttpAuthSchemeParametersProvider=bge;function Gge(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"kinesis",region:e.region},propertiesExtractor:(a,n)=>({signingProperties:{config:a,context:n}})}}var Dge=(e)=>{let a=[];switch(e.operation){default:a.push(Gge(e))}return a};$N.defaultKinesisHttpAuthSchemeProvider=Dge;var Kge=(e)=>{let a=Hge.resolveAwsSdkSigV4Config(e);return Object.assign(a,{authSchemePreference:Hm.normalizeProvider(e.authSchemePreference??[])})};$N.resolveHttpAuthSchemeConfig=Kge});var ZN=G(($Le,Pge)=>{Pge.exports={name:"@aws-sdk/client-kinesis",description:"AWS SDK for JavaScript Kinesis Client for Node.js, Browser and React Native",version:"3.848.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-kinesis","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 kinesis","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts --mode development","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts"},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.846.0","@aws-sdk/credential-provider-node":"3.848.0","@aws-sdk/middleware-host-header":"3.840.0","@aws-sdk/middleware-logger":"3.840.0","@aws-sdk/middleware-recursion-detection":"3.840.0","@aws-sdk/middleware-user-agent":"3.848.0","@aws-sdk/region-config-resolver":"3.840.0","@aws-sdk/types":"3.840.0","@aws-sdk/util-endpoints":"3.848.0","@aws-sdk/util-user-agent-browser":"3.840.0","@aws-sdk/util-user-agent-node":"3.848.0","@smithy/config-resolver":"^4.1.4","@smithy/core":"^3.7.0","@smithy/eventstream-serde-browser":"^4.0.4","@smithy/eventstream-serde-config-resolver":"^4.1.2","@smithy/eventstream-serde-node":"^4.0.4","@smithy/fetch-http-handler":"^5.1.0","@smithy/hash-node":"^4.0.4","@smithy/invalid-dependency":"^4.0.4","@smithy/middleware-content-length":"^4.0.4","@smithy/middleware-endpoint":"^4.1.15","@smithy/middleware-retry":"^4.1.16","@smithy/middleware-serde":"^4.0.8","@smithy/middleware-stack":"^4.0.4","@smithy/node-config-provider":"^4.1.3","@smithy/node-http-handler":"^4.1.0","@smithy/protocol-http":"^5.1.2","@smithy/smithy-client":"^4.4.7","@smithy/types":"^4.3.1","@smithy/url-parser":"^4.0.4","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.23","@smithy/util-defaults-mode-node":"^4.0.23","@smithy/util-endpoints":"^3.0.6","@smithy/util-middleware":"^4.0.4","@smithy/util-retry":"^4.0.6","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.6",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.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-kinesis",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-kinesis"}}});var jN=G((qLe,XN)=>{var{defineProperty:FB,getOwnPropertyDescriptor:Rge,getOwnPropertyNames:Wge}=Object,tge=Object.prototype.hasOwnProperty,Fge=(e,a)=>FB(e,"name",{value:a,configurable:!0}),Age=(e,a)=>{for(var n in a)FB(e,n,{get:a[n],enumerable:!0})},Tge=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Wge(a))if(!tge.call(e,r)&&r!==n)FB(e,r,{get:()=>a[r],enumerable:!(i=Rge(a,r))||i.enumerable})}return e},Vge=(e)=>Tge(FB({},"__esModule",{value:!0}),e),UN={};Age(UN,{isArrayBuffer:()=>fge});XN.exports=Vge(UN);var fge=Fge((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var pN=G((ZLe,_N)=>{var{defineProperty:AB,getOwnPropertyDescriptor:Jge,getOwnPropertyNames:Nge}=Object,Ege=Object.prototype.hasOwnProperty,IN=(e,a)=>AB(e,"name",{value:a,configurable:!0}),vge=(e,a)=>{for(var n in a)AB(e,n,{get:a[n],enumerable:!0})},Yge=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Nge(a))if(!Ege.call(e,r)&&r!==n)AB(e,r,{get:()=>a[r],enumerable:!(i=Jge(a,r))||i.enumerable})}return e},Oge=(e)=>Yge(AB({},"__esModule",{value:!0}),e),xN={};vge(xN,{fromArrayBuffer:()=>$ge,fromString:()=>qge});_N.exports=Oge(xN);var Qge=jN(),Gm=De("buffer"),$ge=IN((e,a=0,n=e.byteLength-a)=>{if(!Qge.isArrayBuffer(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Gm.Buffer.from(e,a,n)},"fromArrayBuffer"),qge=IN((e,a)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return a?Gm.Buffer.from(e,a):Gm.Buffer.from(e)},"fromString")});var rE=G((ULe,iE)=>{var{defineProperty:TB,getOwnPropertyDescriptor:Zge,getOwnPropertyNames:Uge}=Object,Xge=Object.prototype.hasOwnProperty,Dm=(e,a)=>TB(e,"name",{value:a,configurable:!0}),jge=(e,a)=>{for(var n in a)TB(e,n,{get:a[n],enumerable:!0})},Ige=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Uge(a))if(!Xge.call(e,r)&&r!==n)TB(e,r,{get:()=>a[r],enumerable:!(i=Zge(a,r))||i.enumerable})}return e},xge=(e)=>Ige(TB({},"__esModule",{value:!0}),e),eE={};jge(eE,{fromUtf8:()=>nE,toUint8Array:()=>_ge,toUtf8:()=>pge});iE.exports=xge(eE);var aE=pN(),nE=Dm((e)=>{let a=aE.fromString(e,"utf8");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),_ge=Dm((e)=>{if(typeof e==="string")return nE(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),pge=Dm((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return aE.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var hE=G((lE)=>{Object.defineProperty(lE,"__esModule",{value:!0});lE.convertToBuffer=void 0;var ede=rE(),ade=typeof Buffer!=="undefined"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ede.fromUtf8;function nde(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return ade(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}lE.convertToBuffer=nde});var SE=G((sE)=>{Object.defineProperty(sE,"__esModule",{value:!0});sE.isEmptyData=void 0;function ide(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}sE.isEmptyData=ide});var cE=G((uE)=>{Object.defineProperty(uE,"__esModule",{value:!0});uE.numToUint8=void 0;function rde(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}uE.numToUint8=rde});var dE=G((ME)=>{Object.defineProperty(ME,"__esModule",{value:!0});ME.uint32ArrayFrom=void 0;function lde(e){if(!Uint32Array.from){var a=new Uint32Array(e.length),n=0;while(n<e.length)a[n]=e[n],n+=1;return a}return Uint32Array.from(e)}ME.uint32ArrayFrom=lde});var Km=G(($h)=>{Object.defineProperty($h,"__esModule",{value:!0});$h.uint32ArrayFrom=$h.numToUint8=$h.isEmptyData=$h.convertToBuffer=void 0;var ode=hE();Object.defineProperty($h,"convertToBuffer",{enumerable:!0,get:function(){return ode.convertToBuffer}});var hde=SE();Object.defineProperty($h,"isEmptyData",{enumerable:!0,get:function(){return hde.isEmptyData}});var sde=cE();Object.defineProperty($h,"numToUint8",{enumerable:!0,get:function(){return sde.numToUint8}});var kde=dE();Object.defineProperty($h,"uint32ArrayFrom",{enumerable:!0,get:function(){return kde.uint32ArrayFrom}})});var HE=G((CE)=>{Object.defineProperty(CE,"__esModule",{value:!0});CE.AwsCrc32=void 0;var yE=an(),Lm=Km(),mE=VB(),ude=function(){function e(){this.crc32=new mE.Crc32}return e.prototype.update=function(a){if(Lm.isEmptyData(a))return;this.crc32.update(Lm.convertToBuffer(a))},e.prototype.digest=function(){return yE.__awaiter(this,void 0,void 0,function(){return yE.__generator(this,function(a){return[2,Lm.numToUint8(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new mE.Crc32},e}();CE.AwsCrc32=ude});var VB=G((wm)=>{Object.defineProperty(wm,"__esModule",{value:!0});wm.AwsCrc32=wm.Crc32=wm.crc32=void 0;var Bde=an(),cde=Km();function Mde(e){return new bE().update(e).digest()}wm.crc32=Mde;var bE=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(a){var n,i;try{for(var r=Bde.__values(a),h=r.next();!h.done;h=r.next()){var s=h.value;this.checksum=this.checksum>>>8^dde[(this.checksum^s)&255]}}catch(S){n={error:S}}finally{try{if(h&&!h.done&&(i=r.return))i.call(r)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}();wm.Crc32=bE;var gde=[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],dde=cde.uint32ArrayFrom(gde),yde=HE();Object.defineProperty(wm,"AwsCrc32",{enumerable:!0,get:function(){return yde.AwsCrc32}})});var RE=G((rwe,PE)=>{var{defineProperty:JB,getOwnPropertyDescriptor:Hde,getOwnPropertyNames:bde}=Object,Gde=Object.prototype.hasOwnProperty,Jr=(e,a)=>JB(e,"name",{value:a,configurable:!0}),Dde=(e,a)=>{for(var n in a)JB(e,n,{get:a[n],enumerable:!0})},Kde=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of bde(a))if(!Gde.call(e,r)&&r!==n)JB(e,r,{get:()=>a[r],enumerable:!(i=Hde(a,r))||i.enumerable})}return e},Lde=(e)=>Kde(JB({},"__esModule",{value:!0}),e),DE={};Dde(DE,{EventStreamCodec:()=>Ede,HeaderMarshaller:()=>KE,Int64:()=>fB,MessageDecoderStream:()=>vde,MessageEncoderStream:()=>Yde,SmithyMessageDecoderStream:()=>Ode,SmithyMessageEncoderStream:()=>Qde});PE.exports=Lde(DE);var wde=VB(),lo=ts(),fB=class e{constructor(a){if(this.bytes=a,a.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{Jr(this,"Int64")}static fromNumber(a){if(a>9223372036854776000||a<-9223372036854776000)throw new Error(`${a} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let i=7,r=Math.abs(Math.round(a));i>-1&&r>0;i--,r/=256)n[i]=r;if(a<0)Pm(n);return new e(n)}valueOf(){let a=this.bytes.slice(0),n=a[0]&128;if(n)Pm(a);return parseInt(lo.toHex(a),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function Pm(e){for(let a=0;a<8;a++)e[a]^=255;for(let a=7;a>-1;a--)if(e[a]++,e[a]!==0)break}Jr(Pm,"negate");var KE=class{constructor(e,a){this.toUtf8=e,this.fromUtf8=a}static{Jr(this,"HeaderMarshaller")}format(e){let a=[];for(let r of Object.keys(e)){let h=this.fromUtf8(r);a.push(Uint8Array.from([h.byteLength]),h,this.formatHeaderValue(e[r]))}let n=new Uint8Array(a.reduce((r,h)=>r+h.byteLength,0)),i=0;for(let r of a)n.set(r,i),i+=r.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let a=new DataView(new ArrayBuffer(3));return a.setUint8(0,3),a.setInt16(1,e.value,!1),new Uint8Array(a.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":let i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":let r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);let h=new Uint8Array(r.buffer);return h.set(e.value,3),h;case"string":let s=this.fromUtf8(e.value),S=new DataView(new ArrayBuffer(3+s.byteLength));S.setUint8(0,7),S.setUint16(1,s.byteLength,!1);let u=new Uint8Array(S.buffer);return u.set(s,3),u;case"timestamp":let B=new Uint8Array(9);return B[0]=8,B.set(fB.fromNumber(e.value.valueOf()).bytes,1),B;case"uuid":if(!fde.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);let M=new Uint8Array(17);return M[0]=9,M.set(lo.fromHex(e.value.replace(/\-/g,"")),1),M}}parse(e){let a={},n=0;while(n<e.byteLength){let i=e.getUint8(n++),r=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,i));switch(n+=i,e.getUint8(n++)){case 0:a[r]={type:GE,value:!0};break;case 1:a[r]={type:GE,value:!1};break;case 2:a[r]={type:Pde,value:e.getInt8(n++)};break;case 3:a[r]={type:Rde,value:e.getInt16(n,!1)},n+=2;break;case 4:a[r]={type:Wde,value:e.getInt32(n,!1)},n+=4;break;case 5:a[r]={type:tde,value:new fB(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:let h=e.getUint16(n,!1);n+=2,a[r]={type:Fde,value:new Uint8Array(e.buffer,e.byteOffset+n,h)},n+=h;break;case 7:let s=e.getUint16(n,!1);n+=2,a[r]={type:Ade,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:a[r]={type:Tde,value:new Date(new fB(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:let S=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,a[r]={type:Vde,value:`${lo.toHex(S.subarray(0,4))}-${lo.toHex(S.subarray(4,6))}-${lo.toHex(S.subarray(6,8))}-${lo.toHex(S.subarray(8,10))}-${lo.toHex(S.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return a}},GE="boolean",Pde="byte",Rde="short",Wde="integer",tde="long",Fde="binary",Ade="string",Tde="timestamp",Vde="uuid",fde=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Jde=VB(),LE=4,ml=LE*2,oo=4,Nde=ml+oo*2;function wE({byteLength:e,byteOffset:a,buffer:n}){if(e<Nde)throw new Error("Provided message too short to accommodate event stream message overhead");let i=new DataView(n,a,e),r=i.getUint32(0,!1);if(e!==r)throw new Error("Reported message length does not match received message length");let h=i.getUint32(LE,!1),s=i.getUint32(ml,!1),S=i.getUint32(e-oo,!1),u=new Jde.Crc32().update(new Uint8Array(n,a,ml));if(s!==u.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${u.digest()})`);if(u.update(new Uint8Array(n,a+ml,e-(ml+oo))),S!==u.digest())throw new Error(`The message checksum (${u.digest()}) did not match the expected value of ${S}`);return{headers:new DataView(n,a+ml+oo,h),body:new Uint8Array(n,a+ml+oo+h,r-h-(ml+oo+oo))}}Jr(wE,"splitMessage");var Ede=class{static{Jr(this,"EventStreamCodec")}constructor(e,a){this.headerMarshaller=new KE(e,a),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),a=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return a}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let a=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return a}}}encode({headers:e,body:a}){let n=this.headerMarshaller.format(e),i=n.byteLength+a.byteLength+16,r=new Uint8Array(i),h=new DataView(r.buffer,r.byteOffset,r.byteLength),s=new wde.Crc32;return h.setUint32(0,i,!1),h.setUint32(4,n.byteLength,!1),h.setUint32(8,s.update(r.subarray(0,8)).digest(),!1),r.set(n,12),r.set(a,n.byteLength+12),h.setUint32(i-4,s.update(r.subarray(8,i-4)).digest(),!1),r}decode(e){let{headers:a,body:n}=wE(e);return{headers:this.headerMarshaller.parse(a),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}},vde=class{constructor(e){this.options=e}static{Jr(this,"MessageDecoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}},Yde=class{constructor(e){this.options=e}static{Jr(this,"MessageEncoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);if(this.options.includeEndFrame)yield new Uint8Array(0)}},Ode=class{constructor(e){this.options=e}static{Jr(this,"SmithyMessageDecoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let a=await this.options.deserializer(e);if(a===void 0)continue;yield a}}},Qde=class{constructor(e){this.options=e}static{Jr(this,"SmithyMessageEncoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}}});var VE=G((uwe,TE)=>{var{defineProperty:NB,getOwnPropertyDescriptor:$de,getOwnPropertyNames:qde}=Object,Zde=Object.prototype.hasOwnProperty,qh=(e,a)=>NB(e,"name",{value:a,configurable:!0}),Ude=(e,a)=>{for(var n in a)NB(e,n,{get:a[n],enumerable:!0})},Xde=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of qde(a))if(!Zde.call(e,r)&&r!==n)NB(e,r,{get:()=>a[r],enumerable:!(i=$de(a,r))||i.enumerable})}return e},jde=(e)=>Xde(NB({},"__esModule",{value:!0}),e),WE={};Ude(WE,{EventStreamMarshaller:()=>AE,eventStreamSerdeProvider:()=>Ide});TE.exports=jde(WE);var yk=RE();function tE(e){let a=0,n=0,i=null,r=null,h=qh((S)=>{if(typeof S!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+S);a=S,n=4,i=new Uint8Array(S),new DataView(i.buffer).setUint32(0,S,!1)},"allocateMessage"),s=qh(async function*(){let S=e[Symbol.asyncIterator]();while(!0){let{value:u,done:B}=await S.next();if(B){if(!a)return;else if(a===n)yield i;else throw new Error("Truncated event message received.");return}let M=u.length,C=0;while(C<M){if(!i){let R=M-C;if(!r)r=new Uint8Array(4);let W=Math.min(4-n,R);if(r.set(u.slice(C,C+W),n),n+=W,C+=W,n<4)break;h(new DataView(r.buffer).getUint32(0,!1)),r=null}let H=Math.min(a-n,M-C);if(i.set(u.slice(C,C+H),n),n+=H,C+=H,a&&a===n)yield i,i=null,a=0,n=0}}},"iterator");return{[Symbol.asyncIterator]:s}}qh(tE,"getChunkedStream");function FE(e,a){return async function(n){let{value:i}=n.headers[":message-type"];if(i==="error"){let r=new Error(n.headers[":error-message"].value||"UnknownError");throw r.name=n.headers[":error-code"].value,r}else if(i==="exception"){let r=n.headers[":exception-type"].value,h={[r]:n},s=await e(h);if(s.$unknown){let S=new Error(a(n.body));throw S.name=r,S}throw s[r]}else if(i==="event"){let r={[n.headers[":event-type"].value]:n},h=await e(r);if(h.$unknown)return;return h}else throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}qh(FE,"getMessageUnmarshaller");var AE=class{static{qh(this,"EventStreamMarshaller")}constructor({utf8Encoder:e,utf8Decoder:a}){this.eventStreamCodec=new yk.EventStreamCodec(e,a),this.utfEncoder=e}deserialize(e,a){let n=tE(e);return new yk.SmithyMessageDecoderStream({messageStream:new yk.MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:FE(a,this.utfEncoder)})}serialize(e,a){return new yk.MessageEncoderStream({messageStream:new yk.SmithyMessageEncoderStream({inputStream:e,serializer:a}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},Ide=qh((e)=>new AE(e),"eventStreamSerdeProvider")});var vE=G((cwe,EE)=>{var{defineProperty:EB,getOwnPropertyDescriptor:xde,getOwnPropertyNames:_de}=Object,pde=Object.prototype.hasOwnProperty,Rm=(e,a)=>EB(e,"name",{value:a,configurable:!0}),eye=(e,a)=>{for(var n in a)EB(e,n,{get:a[n],enumerable:!0})},aye=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of _de(a))if(!pde.call(e,r)&&r!==n)EB(e,r,{get:()=>a[r],enumerable:!(i=xde(a,r))||i.enumerable})}return e},nye=(e)=>aye(EB({},"__esModule",{value:!0}),e),fE={};eye(fE,{EventStreamMarshaller:()=>NE,eventStreamSerdeProvider:()=>lye});EE.exports=nye(fE);var iye=VE(),rye=De("stream");async function*JE(e){let a=!1,n=!1,i=new Array;e.on("error",(r)=>{if(!a)a=!0;if(r)throw r}),e.on("data",(r)=>{i.push(r)}),e.on("end",()=>{a=!0});while(!n){let r=await new Promise((h)=>setTimeout(()=>h(i.shift()),0));if(r)yield r;n=a&&i.length===0}}Rm(JE,"readabletoIterable");var NE=class{static{Rm(this,"EventStreamMarshaller")}constructor({utf8Encoder:e,utf8Decoder:a}){this.universalMarshaller=new iye.EventStreamMarshaller({utf8Decoder:a,utf8Encoder:e})}deserialize(e,a){let n=typeof e[Symbol.asyncIterator]==="function"?e:JE(e);return this.universalMarshaller.deserialize(n,a)}serialize(e,a){return rye.Readable.from(this.universalMarshaller.serialize(e,a))}},lye=Rm((e)=>new NE(e),"eventStreamSerdeProvider")});var e0=G((_E)=>{Object.defineProperty(_E,"__esModule",{value:!0});_E.ruleSet=void 0;var XE="required",ue="type",sa="rules",na="conditions",Ce="fn",ze="argv",ga="ref",mk="assign",er="url",ar="properties",nr="headers",oye=!0,ko="isSet",ho="stringEquals",Wm="aws.parseArn",so="arn",Gn="booleanEquals",tn="endpoint",Ba="tree",Ma="error",Zh={[XE]:!1,[ue]:"String"},YE={[XE]:!0,default:!1,[ue]:"Boolean"},tm={[Ce]:"not",[ze]:[{[Ce]:ko,[ze]:[{[ga]:"Endpoint"}]}]},jE={[ga]:"Endpoint"},vB={[Ce]:ko,[ze]:[{[ga]:"Region"}]},YB={[Ce]:"aws.partition",[ze]:[{[ga]:"Region"}],[mk]:"PartitionResult"},Fm={[Ce]:"not",[ze]:[{[Ce]:ho,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"name"]},"aws-iso"]}]},fm={[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"name"]},Am={[Ce]:"not",[ze]:[{[Ce]:ho,[ze]:[fm,"aws-iso-b"]}]},OB={[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsFIPS"]},mi={},IE={[Ma]:"FIPS is enabled but this partition does not support FIPS",[ue]:Ma},xE={[Ma]:"DualStack is enabled but this partition does not support DualStack",[ue]:Ma},Tm={[Ma]:"Invalid ARN: Failed to parse ARN.",[ue]:Ma},OE={[Ce]:Gn,[ze]:[!0,{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsDualStack"]}]},QE=[{[ga]:"StreamARN"}],hye=[{[Ce]:ko,[ze]:[jE]}],Vm=[{[na]:[{[Ce]:"isValidHostLabel",[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"accountId"]},!1]}],[sa]:[{[na]:[{[Ce]:"isValidHostLabel",[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"region"]},!1]}],[sa]:[{[na]:[{[Ce]:ho,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"service"]},"kinesis"]}],[sa]:[{[na]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"resourceId[0]"],[mk]:"arnType"},{[Ce]:"not",[ze]:[{[Ce]:ho,[ze]:[{[ga]:"arnType"},""]}]}],[sa]:[{[na]:[{[Ce]:ho,[ze]:[{[ga]:"arnType"},"stream"]}],[sa]:[{[na]:[{[Ce]:ho,[ze]:[fm,"{arn#partition}"]}],[sa]:[{[na]:[{[Ce]:ko,[ze]:[{[ga]:"OperationType"}]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]},{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[OB,!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsDualStack"]},!0]}],[sa]:[{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},{[Ma]:"DualStack is enabled, but this partition does not support DualStack.",[ue]:Ma}],[ue]:Ba},{[Ma]:"FIPS is enabled, but this partition does not support FIPS.",[ue]:Ma}],[ue]:Ba},{[na]:[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[OB,!0]}],[sa]:[{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},IE],[ue]:Ba},{[na]:[{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsDualStack"]},!0]}],[sa]:[{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},xE],[ue]:Ba},{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},{[Ma]:"Operation Type is not set. Please contact service team for resolution.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: No ARN type specified",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: Invalid region.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: Invalid account id.",[ue]:Ma}],sye=[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]},{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],kye=[{[Ce]:Gn,[ze]:[OB,!0]}],$E=[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]}],qE=[{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],ZE=[{[ga]:"ConsumerARN"}],UE=[{[ga]:"ResourceARN"}],Sye={version:"1.0",parameters:{Region:Zh,UseDualStack:YE,UseFIPS:YE,Endpoint:Zh,StreamARN:Zh,OperationType:Zh,ConsumerARN:Zh,ResourceARN:Zh},[sa]:[{[na]:[{[Ce]:ko,[ze]:QE},tm,vB,YB,Fm,Am],[sa]:[{[na]:[{[Ce]:Wm,[ze]:QE,[mk]:so}],[sa]:Vm,[ue]:Ba},Tm],[ue]:Ba},{[na]:[{[Ce]:ko,[ze]:ZE},tm,vB,YB,Fm,Am],[sa]:[{[na]:[{[Ce]:Wm,[ze]:ZE,[mk]:so}],[sa]:Vm,[ue]:Ba},Tm],[ue]:Ba},{[na]:[{[Ce]:ko,[ze]:UE},tm,vB,YB,Fm,Am],[sa]:[{[na]:[{[Ce]:Wm,[ze]:UE,[mk]:so}],[sa]:Vm,[ue]:Ba},Tm],[ue]:Ba},{[na]:hye,[sa]:[{[na]:$E,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[ue]:Ma},{[na]:qE,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[ue]:Ma},{endpoint:{[er]:jE,[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},{[na]:[vB],[sa]:[{[na]:[YB],[sa]:[{[na]:sye,[sa]:[{[na]:[{[Ce]:Gn,[ze]:[oye,OB]},OE],[sa]:[{endpoint:{[er]:"https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[ue]:Ma}],[ue]:Ba},{[na]:$E,[sa]:[{[na]:kye,[sa]:[{[na]:[{[Ce]:ho,[ze]:[fm,"aws-us-gov"]}],endpoint:{[er]:"https://kinesis.{Region}.amazonaws.com",[ar]:mi,[nr]:mi},[ue]:tn},{endpoint:{[er]:"https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},IE],[ue]:Ba},{[na]:qE,[sa]:[{[na]:[OE],[sa]:[{endpoint:{[er]:"https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},xE],[ue]:Ba},{endpoint:{[er]:"https://kinesis.{Region}.{PartitionResult#dnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba}],[ue]:Ba},{error:"Invalid Configuration: Missing Region",[ue]:Ma}]};_E.ruleSet=Sye});var i0=G((a0)=>{Object.defineProperty(a0,"__esModule",{value:!0});a0.defaultEndpointResolver=void 0;var uye=$l(),Jm=Ql(),Bye=e0(),cye=new Jm.EndpointCache({size:50,params:["ConsumerARN","Endpoint","OperationType","Region","ResourceARN","StreamARN","UseDualStack","UseFIPS"]}),Mye=(e,a={})=>{return cye.get(e,()=>Jm.resolveEndpoint(Bye.ruleSet,{endpointParams:e,logger:a.logger}))};a0.defaultEndpointResolver=Mye;Jm.customEndpointFunctions.aws=uye.awsEndpointFunctions});var s0=G((o0)=>{Object.defineProperty(o0,"__esModule",{value:!0});o0.getRuntimeConfig=void 0;var gye=Na(),dye=we(),yye=Dr(),r0=Mn(),l0=Qa(),mye=bm(),Cye=i0(),zye=(e)=>{return{apiVersion:"2013-12-02",base64Decoder:e?.base64Decoder??r0.fromBase64,base64Encoder:e?.base64Encoder??r0.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Cye.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??mye.defaultKinesisHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(a)=>a.getIdentityProvider("aws.auth#sigv4"),signer:new gye.AwsSdkSigV4Signer}],logger:e?.logger??new dye.NoOpLogger,serviceId:e?.serviceId??"Kinesis",urlParser:e?.urlParser??yye.parseUrl,utf8Decoder:e?.utf8Decoder??l0.fromUtf8,utf8Encoder:e?.utf8Encoder??l0.toUtf8}};o0.getRuntimeConfig=zye});var g0=G((c0)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.getRuntimeConfig=void 0;var Hye=an(),bye=Hye.__importDefault(ZN()),k0=Na(),Gye=um(),S0=yh(),QB=li(),Dye=vE(),Kye=mh(),u0=Ti(),So=Lr(),B0=ll(),Lye=Ch(),wye=_l(),Pye=s0(),Rye=we(),Wye=Gh(),tye=we(),Fye=(e)=>{tye.emitWarningIfUnsupportedVersion(process.version);let a=Wye.resolveDefaultsModeConfig(e),n=()=>a().then(Rye.loadConfigsForDefaultMode),i=Pye.getRuntimeConfig(e);k0.emitWarningIfUnsupportedVersion(process.version);let r={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:a,authSchemePreference:e?.authSchemePreference??So.loadConfig(k0.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,r),bodyLengthChecker:e?.bodyLengthChecker??Lye.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??Gye.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??S0.createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:bye.default.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Dye.eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??So.loadConfig(u0.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??So.loadConfig(QB.NODE_REGION_CONFIG_OPTIONS,{...QB.NODE_REGION_CONFIG_FILE_OPTIONS,...r}),requestHandler:B0.NodeHttp2Handler.create(e?.requestHandler??(async()=>({...await n(),disableConcurrentStreams:!0}))),retryMode:e?.retryMode??So.loadConfig({...u0.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||wye.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Kye.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??B0.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??So.loadConfig(QB.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,r),useFipsEndpoint:e?.useFipsEndpoint??So.loadConfig(QB.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,r),userAgentAppId:e?.userAgentAppId??So.loadConfig(S0.NODE_APP_ID_CONFIG_OPTIONS,r)}};c0.getRuntimeConfig=Fye});var b0=G((Cwe,H0)=>{var{defineProperty:$B,getOwnPropertyDescriptor:Aye,getOwnPropertyNames:Tye}=Object,Vye=Object.prototype.hasOwnProperty,ir=(e,a)=>$B(e,"name",{value:a,configurable:!0}),fye=(e,a)=>{for(var n in a)$B(e,n,{get:a[n],enumerable:!0})},Jye=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Tye(a))if(!Vye.call(e,r)&&r!==n)$B(e,r,{get:()=>a[r],enumerable:!(i=Aye(a,r))||i.enumerable})}return e},Nye=(e)=>Jye($B({},"__esModule",{value:!0}),e),m0={};fye(m0,{WaiterState:()=>z0,checkExceptions:()=>vye,createWaiter:()=>qye,waiterServiceDefaults:()=>C0});H0.exports=Nye(m0);var Eye=ir((e)=>{return new Promise((a)=>setTimeout(a,e*1000))},"sleep"),C0={minDelay:2,maxDelay:120},z0=((e)=>{return e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT",e})(z0||{}),vye=ir((e)=>{if(e.state==="ABORTED"){let a=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw a.name="AbortError",a}else if(e.state==="TIMEOUT"){let a=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw a.name="TimeoutError",a}else if(e.state!=="SUCCESS")throw new Error(`${JSON.stringify(e)}`);return e},"checkExceptions"),Yye=ir((e,a,n,i)=>{if(i>n)return a;let r=e*2**(i-1);return Oye(e,r)},"exponentialBackoffWithJitter"),Oye=ir((e,a)=>e+Math.random()*(a-e),"randomInRange"),Qye=ir(async({minDelay:e,maxDelay:a,maxWaitTime:n,abortController:i,client:r,abortSignal:h},s,S)=>{let u={},{state:B,reason:M}=await S(r,s);if(M){let W=d0(M);u[W]|=0,u[W]+=1}if(B!=="RETRY")return{state:B,reason:M,observedResponses:u};let C=1,H=Date.now()+n*1000,R=Math.log(a/e)/Math.log(2)+1;while(!0){if(i?.signal?.aborted||h?.aborted)return u["AbortController signal aborted."]|=0,u["AbortController signal aborted."]+=1,{state:"ABORTED",observedResponses:u};let W=Yye(e,a,R,C);if(Date.now()+W*1000>H)return{state:"TIMEOUT",observedResponses:u};await Eye(W);let{state:A,reason:Y}=await S(r,s);if(Y){let N=d0(Y);u[N]|=0,u[N]+=1}if(A!=="RETRY")return{state:A,reason:Y,observedResponses:u};C+=1}},"runPolling"),d0=ir((e)=>{if(e?.$responseBodyText)return`Deserialization error for body: ${e.$responseBodyText}`;if(e?.$metadata?.httpStatusCode){if(e.$response||e.message)return`${e.$response.statusCode??e.$metadata.httpStatusCode??"Unknown"}: ${e.message}`;return`${e.$metadata.httpStatusCode}: OK`}return String(e?.message??JSON.stringify(e)??"Unknown")},"createMessageFromResponse"),$ye=ir((e)=>{if(e.maxWaitTime<=0)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");else if(e.minDelay<=0)throw new Error("WaiterConfiguration.minDelay must be greater than 0");else if(e.maxDelay<=0)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");else if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);else if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)},"validateWaiterOptions"),y0=ir((e)=>{let a,n=new Promise((i)=>{if(a=ir(()=>i({state:"ABORTED"}),"onAbort"),typeof e.addEventListener==="function")e.addEventListener("abort",a);else e.onabort=a});return{clearListener(){if(typeof e.removeEventListener==="function")e.removeEventListener("abort",a)},aborted:n}},"abortTimeout"),qye=ir(async(e,a,n)=>{let i={...C0,...e};$ye(i);let r=[Qye(i,a,n)],h=[];if(e.abortSignal){let{aborted:s,clearListener:S}=y0(e.abortSignal);h.push(S),r.push(s)}if(e.abortController?.signal){let{aborted:s,clearListener:S}=y0(e.abortController.signal);h.push(S),r.push(s)}return Promise.race(r).then((s)=>{for(let S of h)S();return s})},"createWaiter")});var E1=G((zwe,N1)=>{var{defineProperty:qB,getOwnPropertyDescriptor:Zye,getOwnPropertyNames:Uye}=Object,Xye=Object.prototype.hasOwnProperty,D=(e,a)=>qB(e,"name",{value:a,configurable:!0}),jye=(e,a)=>{for(var n in a)qB(e,n,{get:a[n],enumerable:!0})},Iye=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Uye(a))if(!Xye.call(e,r)&&r!==n)qB(e,r,{get:()=>a[r],enumerable:!(i=Zye(a,r))||i.enumerable})}return e},xye=(e)=>Iye(qB({},"__esModule",{value:!0}),e),P0={};jye(P0,{AccessDeniedException:()=>R0,AddTagsToStreamCommand:()=>i1,ConsumerStatus:()=>sme,CreateStreamCommand:()=>r1,DecreaseStreamRetentionPeriodCommand:()=>l1,DeleteResourcePolicyCommand:()=>o1,DeleteStreamCommand:()=>h1,DeregisterStreamConsumerCommand:()=>s1,DescribeLimitsCommand:()=>k1,DescribeStreamCommand:()=>UB,DescribeStreamConsumerCommand:()=>S1,DescribeStreamSummaryCommand:()=>u1,DisableEnhancedMonitoringCommand:()=>B1,EnableEnhancedMonitoringCommand:()=>c1,EncryptionType:()=>Sme,ExpiredIteratorException:()=>T0,ExpiredNextTokenException:()=>V0,GetRecordsCommand:()=>M1,GetResourcePolicyCommand:()=>g1,GetShardIteratorCommand:()=>d1,IncreaseStreamRetentionPeriodCommand:()=>y1,InternalFailureException:()=>f0,InvalidArgumentException:()=>W0,KMSAccessDeniedException:()=>J0,KMSDisabledException:()=>N0,KMSInvalidStateException:()=>E0,KMSNotFoundException:()=>v0,KMSOptInRequired:()=>Y0,KMSThrottlingException:()=>O0,Kinesis:()=>V1,KinesisClient:()=>ZB,KinesisServiceException:()=>ln,LimitExceededException:()=>t0,ListShardsCommand:()=>m1,ListStreamConsumersCommand:()=>vm,ListStreamsCommand:()=>Ym,ListTagsForResourceCommand:()=>C1,ListTagsForStreamCommand:()=>z1,MergeShardsCommand:()=>H1,MetricsName:()=>ume,ProvisionedThroughputExceededException:()=>Q0,PutRecordCommand:()=>b1,PutRecordsCommand:()=>G1,PutResourcePolicyCommand:()=>D1,RegisterStreamConsumerCommand:()=>K1,RemoveTagsFromStreamCommand:()=>L1,ResourceInUseException:()=>F0,ResourceNotFoundException:()=>A0,ScalingType:()=>gme,ShardFilterType:()=>Mme,ShardIteratorType:()=>cme,SplitShardCommand:()=>w1,StartStreamEncryptionCommand:()=>P1,StopStreamEncryptionCommand:()=>R1,StreamMode:()=>kme,StreamStatus:()=>Bme,SubscribeToShardCommand:()=>W1,SubscribeToShardEventStream:()=>Em,SubscribeToShardEventStreamFilterSensitiveLog:()=>dme,SubscribeToShardOutputFilterSensitiveLog:()=>q0,TagResourceCommand:()=>t1,UntagResourceCommand:()=>F1,UpdateShardCountCommand:()=>A1,UpdateStreamModeCommand:()=>T1,ValidationException:()=>$0,__Client:()=>L.Client,paginateListStreamConsumers:()=>Dze,paginateListStreams:()=>Kze,waitForStreamExists:()=>Lze,waitForStreamNotExists:()=>Pze,waitUntilStreamExists:()=>wze,waitUntilStreamNotExists:()=>Rze});N1.exports=xye(P0);var G0=Io(),_ye=xo(),pye=_o(),D0=jl(),eme=li(),Ck=Hn(),ame=QN(),nme=Bh(),Ye=wr(),K0=Ti(),L0=bm(),ime=D((e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"kinesis"})},"resolveClientEndpointParameters"),qe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rme=g0(),w0=Dh(),Nm=za(),L=we(),lme=D((e)=>{let{httpAuthSchemes:a,httpAuthSchemeProvider:n,credentials:i}=e;return{setHttpAuthScheme(r){let h=a.findIndex((s)=>s.schemeId===r.schemeId);if(h===-1)a.push(r);else a.splice(h,1,r)},httpAuthSchemes(){return a},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){i=r},credentials(){return i}}},"getHttpAuthExtensionConfiguration"),ome=D((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),hme=D((e,a)=>{let n=Object.assign(w0.getAwsRegionExtensionConfiguration(e),L.getDefaultExtensionConfiguration(e),Nm.getHttpHandlerExtensionConfiguration(e),lme(e));return a.forEach((i)=>i.configure(n)),Object.assign(e,w0.resolveAwsRegionExtensionConfiguration(n),L.resolveDefaultRuntimeConfig(n),Nm.resolveHttpHandlerRuntimeConfig(n),ome(n))},"resolveRuntimeExtensions"),ZB=class extends L.Client{static{D(this,"KinesisClient")}config;constructor(...[e]){let a=rme.getRuntimeConfig(e||{});super(a);this.initConfig=a;let n=ime(a),i=D0.resolveUserAgentConfig(n),r=K0.resolveRetryConfig(i),h=eme.resolveRegionConfig(r),s=G0.resolveHostHeaderConfig(h),S=Ye.resolveEndpointConfig(s),u=ame.resolveEventStreamSerdeConfig(S),B=L0.resolveHttpAuthSchemeConfig(u),M=hme(B,e?.extensions||[]);this.config=M,this.middlewareStack.use(D0.getUserAgentPlugin(this.config)),this.middlewareStack.use(K0.getRetryPlugin(this.config)),this.middlewareStack.use(nme.getContentLengthPlugin(this.config)),this.middlewareStack.use(G0.getHostHeaderPlugin(this.config)),this.middlewareStack.use(_ye.getLoggerPlugin(this.config)),this.middlewareStack.use(pye.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(Ck.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:L0.defaultKinesisHttpAuthSchemeParametersProvider,identityProviderConfigProvider:D(async(C)=>new Ck.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Ck.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Ze=br(),ka=Na(),ln=class e extends L.ServiceException{static{D(this,"KinesisServiceException")}constructor(a){super(a);Object.setPrototypeOf(this,e.prototype)}},R0=class e extends ln{static{D(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";constructor(a){super({name:"AccessDeniedException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},W0=class e extends ln{static{D(this,"InvalidArgumentException")}name="InvalidArgumentException";$fault="client";constructor(a){super({name:"InvalidArgumentException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},t0=class e extends ln{static{D(this,"LimitExceededException")}name="LimitExceededException";$fault="client";constructor(a){super({name:"LimitExceededException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},F0=class e extends ln{static{D(this,"ResourceInUseException")}name="ResourceInUseException";$fault="client";constructor(a){super({name:"ResourceInUseException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},A0=class e extends ln{static{D(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(a){super({name:"ResourceNotFoundException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},sme={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING"},kme={ON_DEMAND:"ON_DEMAND",PROVISIONED:"PROVISIONED"},Sme={KMS:"KMS",NONE:"NONE"},ume={ALL:"ALL",INCOMING_BYTES:"IncomingBytes",INCOMING_RECORDS:"IncomingRecords",ITERATOR_AGE_MILLISECONDS:"IteratorAgeMilliseconds",OUTGOING_BYTES:"OutgoingBytes",OUTGOING_RECORDS:"OutgoingRecords",READ_PROVISIONED_THROUGHPUT_EXCEEDED:"ReadProvisionedThroughputExceeded",WRITE_PROVISIONED_THROUGHPUT_EXCEEDED:"WriteProvisionedThroughputExceeded"},Bme={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING",UPDATING:"UPDATING"},T0=class e extends ln{static{D(this,"ExpiredIteratorException")}name="ExpiredIteratorException";$fault="client";constructor(a){super({name:"ExpiredIteratorException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},V0=class e extends ln{static{D(this,"ExpiredNextTokenException")}name="ExpiredNextTokenException";$fault="client";constructor(a){super({name:"ExpiredNextTokenException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},f0=class e extends ln{static{D(this,"InternalFailureException")}name="InternalFailureException";$fault="server";constructor(a){super({name:"InternalFailureException",$fault:"server",...a});Object.setPrototypeOf(this,e.prototype)}},J0=class e extends ln{static{D(this,"KMSAccessDeniedException")}name="KMSAccessDeniedException";$fault="client";constructor(a){super({name:"KMSAccessDeniedException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},N0=class e extends ln{static{D(this,"KMSDisabledException")}name="KMSDisabledException";$fault="client";constructor(a){super({name:"KMSDisabledException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},E0=class e extends ln{static{D(this,"KMSInvalidStateException")}name="KMSInvalidStateException";$fault="client";constructor(a){super({name:"KMSInvalidStateException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},v0=class e extends ln{static{D(this,"KMSNotFoundException")}name="KMSNotFoundException";$fault="client";constructor(a){super({name:"KMSNotFoundException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},Y0=class e extends ln{static{D(this,"KMSOptInRequired")}name="KMSOptInRequired";$fault="client";constructor(a){super({name:"KMSOptInRequired",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},O0=class e extends ln{static{D(this,"KMSThrottlingException")}name="KMSThrottlingException";$fault="client";constructor(a){super({name:"KMSThrottlingException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},Q0=class e extends ln{static{D(this,"ProvisionedThroughputExceededException")}name="ProvisionedThroughputExceededException";$fault="client";constructor(a){super({name:"ProvisionedThroughputExceededException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},cme={AFTER_SEQUENCE_NUMBER:"AFTER_SEQUENCE_NUMBER",AT_SEQUENCE_NUMBER:"AT_SEQUENCE_NUMBER",AT_TIMESTAMP:"AT_TIMESTAMP",LATEST:"LATEST",TRIM_HORIZON:"TRIM_HORIZON"},Mme={AFTER_SHARD_ID:"AFTER_SHARD_ID",AT_LATEST:"AT_LATEST",AT_TIMESTAMP:"AT_TIMESTAMP",AT_TRIM_HORIZON:"AT_TRIM_HORIZON",FROM_TIMESTAMP:"FROM_TIMESTAMP",FROM_TRIM_HORIZON:"FROM_TRIM_HORIZON"},$0=class e extends ln{static{D(this,"ValidationException")}name="ValidationException";$fault="client";constructor(a){super({name:"ValidationException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},Em;((e)=>{e.visit=D((a,n)=>{if(a.SubscribeToShardEvent!==void 0)return n.SubscribeToShardEvent(a.SubscribeToShardEvent);if(a.ResourceNotFoundException!==void 0)return n.ResourceNotFoundException(a.ResourceNotFoundException);if(a.ResourceInUseException!==void 0)return n.ResourceInUseException(a.ResourceInUseException);if(a.KMSDisabledException!==void 0)return n.KMSDisabledException(a.KMSDisabledException);if(a.KMSInvalidStateException!==void 0)return n.KMSInvalidStateException(a.KMSInvalidStateException);if(a.KMSAccessDeniedException!==void 0)return n.KMSAccessDeniedException(a.KMSAccessDeniedException);if(a.KMSNotFoundException!==void 0)return n.KMSNotFoundException(a.KMSNotFoundException);if(a.KMSOptInRequired!==void 0)return n.KMSOptInRequired(a.KMSOptInRequired);if(a.KMSThrottlingException!==void 0)return n.KMSThrottlingException(a.KMSThrottlingException);if(a.InternalFailureException!==void 0)return n.InternalFailureException(a.InternalFailureException);return n._(a.$unknown[0],a.$unknown[1])},"visit")})(Em||(Em={}));var gme={UNIFORM_SCALING:"UNIFORM_SCALING"},dme=D((e)=>{if(e.SubscribeToShardEvent!==void 0)return{SubscribeToShardEvent:e.SubscribeToShardEvent};if(e.ResourceNotFoundException!==void 0)return{ResourceNotFoundException:e.ResourceNotFoundException};if(e.ResourceInUseException!==void 0)return{ResourceInUseException:e.ResourceInUseException};if(e.KMSDisabledException!==void 0)return{KMSDisabledException:e.KMSDisabledException};if(e.KMSInvalidStateException!==void 0)return{KMSInvalidStateException:e.KMSInvalidStateException};if(e.KMSAccessDeniedException!==void 0)return{KMSAccessDeniedException:e.KMSAccessDeniedException};if(e.KMSNotFoundException!==void 0)return{KMSNotFoundException:e.KMSNotFoundException};if(e.KMSOptInRequired!==void 0)return{KMSOptInRequired:e.KMSOptInRequired};if(e.KMSThrottlingException!==void 0)return{KMSThrottlingException:e.KMSThrottlingException};if(e.InternalFailureException!==void 0)return{InternalFailureException:e.InternalFailureException};if(e.$unknown!==void 0)return{[e.$unknown[0]]:"UNKNOWN"}},"SubscribeToShardEventStreamFilterSensitiveLog"),q0=D((e)=>({...e,...e.EventStream&&{EventStream:"STREAMING_CONTENT"}}),"SubscribeToShardOutputFilterSensitiveLog"),yme=D(async(e,a)=>{let n=Oe("AddTagsToStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_AddTagsToStreamCommand"),mme=D(async(e,a)=>{let n=Oe("CreateStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_CreateStreamCommand"),Cme=D(async(e,a)=>{let n=Oe("DecreaseStreamRetentionPeriod"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DecreaseStreamRetentionPeriodCommand"),zme=D(async(e,a)=>{let n=Oe("DeleteResourcePolicy"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DeleteResourcePolicyCommand"),Hme=D(async(e,a)=>{let n=Oe("DeleteStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DeleteStreamCommand"),bme=D(async(e,a)=>{let n=Oe("DeregisterStreamConsumer"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DeregisterStreamConsumerCommand"),Gme=D(async(e,a)=>{let n=Oe("DescribeLimits"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeLimitsCommand"),Dme=D(async(e,a)=>{let n=Oe("DescribeStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeStreamCommand"),Kme=D(async(e,a)=>{let n=Oe("DescribeStreamConsumer"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeStreamConsumerCommand"),Lme=D(async(e,a)=>{let n=Oe("DescribeStreamSummary"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeStreamSummaryCommand"),wme=D(async(e,a)=>{let n=Oe("DisableEnhancedMonitoring"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DisableEnhancedMonitoringCommand"),Pme=D(async(e,a)=>{let n=Oe("EnableEnhancedMonitoring"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_EnableEnhancedMonitoringCommand"),Rme=D(async(e,a)=>{let n=Oe("GetRecords"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_GetRecordsCommand"),Wme=D(async(e,a)=>{let n=Oe("GetResourcePolicy"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_GetResourcePolicyCommand"),tme=D(async(e,a)=>{let n=Oe("GetShardIterator"),i;return i=JSON.stringify(xCe(e,a)),Xe(a,n,"/",void 0,i)},"se_GetShardIteratorCommand"),Fme=D(async(e,a)=>{let n=Oe("IncreaseStreamRetentionPeriod"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_IncreaseStreamRetentionPeriodCommand"),Ame=D(async(e,a)=>{let n=Oe("ListShards"),i;return i=JSON.stringify(_Ce(e,a)),Xe(a,n,"/",void 0,i)},"se_ListShardsCommand"),Tme=D(async(e,a)=>{let n=Oe("ListStreamConsumers"),i;return i=JSON.stringify(pCe(e,a)),Xe(a,n,"/",void 0,i)},"se_ListStreamConsumersCommand"),Vme=D(async(e,a)=>{let n=Oe("ListStreams"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_ListStreamsCommand"),fme=D(async(e,a)=>{let n=Oe("ListTagsForResource"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_ListTagsForResourceCommand"),Jme=D(async(e,a)=>{let n=Oe("ListTagsForStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_ListTagsForStreamCommand"),Nme=D(async(e,a)=>{let n=Oe("MergeShards"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_MergeShardsCommand"),Eme=D(async(e,a)=>{let n=Oe("PutRecord"),i;return i=JSON.stringify(eze(e,a)),Xe(a,n,"/",void 0,i)},"se_PutRecordCommand"),vme=D(async(e,a)=>{let n=Oe("PutRecords"),i;return i=JSON.stringify(aze(e,a)),Xe(a,n,"/",void 0,i)},"se_PutRecordsCommand"),Yme=D(async(e,a)=>{let n=Oe("PutResourcePolicy"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_PutResourcePolicyCommand"),Ome=D(async(e,a)=>{let n=Oe("RegisterStreamConsumer"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_RegisterStreamConsumerCommand"),Qme=D(async(e,a)=>{let n=Oe("RemoveTagsFromStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_RemoveTagsFromStreamCommand"),$me=D(async(e,a)=>{let n=Oe("SplitShard"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_SplitShardCommand"),qme=D(async(e,a)=>{let n=Oe("StartStreamEncryption"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_StartStreamEncryptionCommand"),Zme=D(async(e,a)=>{let n=Oe("StopStreamEncryption"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_StopStreamEncryptionCommand"),Ume=D(async(e,a)=>{let n=Oe("SubscribeToShard"),i;return i=JSON.stringify(oze(e,a)),Xe(a,n,"/",void 0,i)},"se_SubscribeToShardCommand"),Xme=D(async(e,a)=>{let n=Oe("TagResource"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_TagResourceCommand"),jme=D(async(e,a)=>{let n=Oe("UntagResource"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_UntagResourceCommand"),Ime=D(async(e,a)=>{let n=Oe("UpdateShardCount"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_UpdateShardCountCommand"),xme=D(async(e,a)=>{let n=Oe("UpdateStreamMode"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_UpdateStreamModeCommand"),_me=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_AddTagsToStreamCommand"),pme=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_CreateStreamCommand"),eCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DecreaseStreamRetentionPeriodCommand"),aCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DeleteResourcePolicyCommand"),nCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DeleteStreamCommand"),iCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DeregisterStreamConsumerCommand"),rCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_DescribeLimitsCommand"),lCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=Sze(n,a),{$metadata:ge(e),...i}},"de_DescribeStreamCommand"),oCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=kze(n,a),{$metadata:ge(e),...i}},"de_DescribeStreamConsumerCommand"),hCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=uze(n,a),{$metadata:ge(e),...i}},"de_DescribeStreamSummaryCommand"),sCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_DisableEnhancedMonitoringCommand"),kCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_EnableEnhancedMonitoringCommand"),SCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=Bze(n,a),{$metadata:ge(e),...i}},"de_GetRecordsCommand"),uCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_GetResourcePolicyCommand"),BCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_GetShardIteratorCommand"),cCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_IncreaseStreamRetentionPeriodCommand"),MCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_ListShardsCommand"),gCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=cze(n,a),{$metadata:ge(e),...i}},"de_ListStreamConsumersCommand"),dCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=Mze(n,a),{$metadata:ge(e),...i}},"de_ListStreamsCommand"),yCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_ListTagsForResourceCommand"),mCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_ListTagsForStreamCommand"),CCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_MergeShardsCommand"),zCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_PutRecordCommand"),HCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_PutRecordsCommand"),bCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_PutResourcePolicyCommand"),GCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=dze(n,a),{$metadata:ge(e),...i}},"de_RegisterStreamConsumerCommand"),DCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_RemoveTagsFromStreamCommand"),KCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_SplitShardCommand"),LCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_StartStreamEncryptionCommand"),wCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_StopStreamEncryptionCommand"),PCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n={EventStream:vCe(e.body,a)};return{$metadata:ge(e),...n}},"de_SubscribeToShardCommand"),RCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_TagResourceCommand"),WCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_UntagResourceCommand"),tCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_UpdateShardCountCommand"),FCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_UpdateStreamModeCommand"),Ue=D(async(e,a)=>{let n={...e,body:await ka.parseJsonErrorBody(e.body,a)},i=ka.loadRestJsonErrorCode(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.kinesis#AccessDeniedException":throw await ACe(n,a);case"InvalidArgumentException":case"com.amazonaws.kinesis#InvalidArgumentException":throw await fCe(n,a);case"LimitExceededException":case"com.amazonaws.kinesis#LimitExceededException":throw await JCe(n,a);case"ResourceInUseException":case"com.amazonaws.kinesis#ResourceInUseException":throw await p0(n,a);case"ResourceNotFoundException":case"com.amazonaws.kinesis#ResourceNotFoundException":throw await e1(n,a);case"ExpiredIteratorException":case"com.amazonaws.kinesis#ExpiredIteratorException":throw await TCe(n,a);case"InternalFailureException":case"com.amazonaws.kinesis#InternalFailureException":throw await Z0(n,a);case"KMSAccessDeniedException":case"com.amazonaws.kinesis#KMSAccessDeniedException":throw await U0(n,a);case"KMSDisabledException":case"com.amazonaws.kinesis#KMSDisabledException":throw await X0(n,a);case"KMSInvalidStateException":case"com.amazonaws.kinesis#KMSInvalidStateException":throw await j0(n,a);case"KMSNotFoundException":case"com.amazonaws.kinesis#KMSNotFoundException":throw await I0(n,a);case"KMSOptInRequired":case"com.amazonaws.kinesis#KMSOptInRequired":throw await x0(n,a);case"KMSThrottlingException":case"com.amazonaws.kinesis#KMSThrottlingException":throw await _0(n,a);case"ProvisionedThroughputExceededException":case"com.amazonaws.kinesis#ProvisionedThroughputExceededException":throw await NCe(n,a);case"ExpiredNextTokenException":case"com.amazonaws.kinesis#ExpiredNextTokenException":throw await VCe(n,a);case"ValidationException":case"com.amazonaws.kinesis#ValidationException":throw await ECe(n,a);default:let r=n.body;return bze({output:e,parsedBody:r,errorCode:i})}},"de_CommandError"),ACe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new R0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_AccessDeniedExceptionRes"),TCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new T0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ExpiredIteratorExceptionRes"),VCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new V0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ExpiredNextTokenExceptionRes"),Z0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new f0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_InternalFailureExceptionRes"),fCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new W0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_InvalidArgumentExceptionRes"),U0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new J0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSAccessDeniedExceptionRes"),X0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new N0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSDisabledExceptionRes"),j0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new E0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSInvalidStateExceptionRes"),I0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new v0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSNotFoundExceptionRes"),x0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new Y0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSOptInRequiredRes"),_0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new O0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSThrottlingExceptionRes"),JCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new t0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_LimitExceededExceptionRes"),NCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new Q0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ProvisionedThroughputExceededExceptionRes"),p0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new F0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ResourceInUseExceptionRes"),e1=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new A0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ResourceNotFoundExceptionRes"),ECe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new $0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ValidationExceptionRes"),vCe=D((e,a)=>{return a.eventStreamMarshaller.deserialize(e,async(n)=>{if(n.SubscribeToShardEvent!=null)return{SubscribeToShardEvent:await ICe(n.SubscribeToShardEvent,a)};if(n.ResourceNotFoundException!=null)return{ResourceNotFoundException:await jCe(n.ResourceNotFoundException,a)};if(n.ResourceInUseException!=null)return{ResourceInUseException:await XCe(n.ResourceInUseException,a)};if(n.KMSDisabledException!=null)return{KMSDisabledException:await QCe(n.KMSDisabledException,a)};if(n.KMSInvalidStateException!=null)return{KMSInvalidStateException:await $Ce(n.KMSInvalidStateException,a)};if(n.KMSAccessDeniedException!=null)return{KMSAccessDeniedException:await OCe(n.KMSAccessDeniedException,a)};if(n.KMSNotFoundException!=null)return{KMSNotFoundException:await qCe(n.KMSNotFoundException,a)};if(n.KMSOptInRequired!=null)return{KMSOptInRequired:await ZCe(n.KMSOptInRequired,a)};if(n.KMSThrottlingException!=null)return{KMSThrottlingException:await UCe(n.KMSThrottlingException,a)};if(n.InternalFailureException!=null)return{InternalFailureException:await YCe(n.InternalFailureException,a)};return{$unknown:n}})},"de_SubscribeToShardEventStream"),YCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return Z0(n,a)},"de_InternalFailureException_event"),OCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return U0(n,a)},"de_KMSAccessDeniedException_event"),QCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return X0(n,a)},"de_KMSDisabledException_event"),$Ce=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return j0(n,a)},"de_KMSInvalidStateException_event"),qCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return I0(n,a)},"de_KMSNotFoundException_event"),ZCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return x0(n,a)},"de_KMSOptInRequired_event"),UCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return _0(n,a)},"de_KMSThrottlingException_event"),XCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return p0(n,a)},"de_ResourceInUseException_event"),jCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return e1(n,a)},"de_ResourceNotFoundException_event"),ICe=D(async(e,a)=>{let n={},i=await ka.parseJsonBody(e.body,a);return Object.assign(n,Hze(i,a)),n},"de_SubscribeToShardEvent_event"),xCe=D((e,a)=>{return L.take(e,{ShardId:[],ShardIteratorType:[],StartingSequenceNumber:[],StreamARN:[],StreamName:[],Timestamp:D((n)=>n.getTime()/1000,"Timestamp")})},"se_GetShardIteratorInput"),_Ce=D((e,a)=>{return L.take(e,{ExclusiveStartShardId:[],MaxResults:[],NextToken:[],ShardFilter:D((n)=>rze(n,a),"ShardFilter"),StreamARN:[],StreamCreationTimestamp:D((n)=>n.getTime()/1000,"StreamCreationTimestamp"),StreamName:[]})},"se_ListShardsInput"),pCe=D((e,a)=>{return L.take(e,{MaxResults:[],NextToken:[],StreamARN:[],StreamCreationTimestamp:D((n)=>n.getTime()/1000,"StreamCreationTimestamp")})},"se_ListStreamConsumersInput"),eze=D((e,a)=>{return L.take(e,{Data:a.base64Encoder,ExplicitHashKey:[],PartitionKey:[],SequenceNumberForOrdering:[],StreamARN:[],StreamName:[]})},"se_PutRecordInput"),aze=D((e,a)=>{return L.take(e,{Records:D((n)=>ize(n,a),"Records"),StreamARN:[],StreamName:[]})},"se_PutRecordsInput"),nze=D((e,a)=>{return L.take(e,{Data:a.base64Encoder,ExplicitHashKey:[],PartitionKey:[]})},"se_PutRecordsRequestEntry"),ize=D((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return nze(n,a)})},"se_PutRecordsRequestEntryList"),rze=D((e,a)=>{return L.take(e,{ShardId:[],Timestamp:D((n)=>n.getTime()/1000,"Timestamp"),Type:[]})},"se_ShardFilter"),lze=D((e,a)=>{return L.take(e,{SequenceNumber:[],Timestamp:D((n)=>n.getTime()/1000,"Timestamp"),Type:[]})},"se_StartingPosition"),oze=D((e,a)=>{return L.take(e,{ConsumerARN:[],ShardId:[],StartingPosition:D((n)=>lze(n,a),"StartingPosition")})},"se_SubscribeToShardInput"),a1=D((e,a)=>{return L.take(e,{ConsumerARN:L.expectString,ConsumerCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"ConsumerCreationTimestamp"),ConsumerName:L.expectString,ConsumerStatus:L.expectString})},"de_Consumer"),hze=D((e,a)=>{return L.take(e,{ConsumerARN:L.expectString,ConsumerCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"ConsumerCreationTimestamp"),ConsumerName:L.expectString,ConsumerStatus:L.expectString,StreamARN:L.expectString})},"de_ConsumerDescription"),sze=D((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return a1(i,a)})},"de_ConsumerList"),kze=D((e,a)=>{return L.take(e,{ConsumerDescription:D((n)=>hze(n,a),"ConsumerDescription")})},"de_DescribeStreamConsumerOutput"),Sze=D((e,a)=>{return L.take(e,{StreamDescription:D((n)=>yze(n,a),"StreamDescription")})},"de_DescribeStreamOutput"),uze=D((e,a)=>{return L.take(e,{StreamDescriptionSummary:D((n)=>mze(n,a),"StreamDescriptionSummary")})},"de_DescribeStreamSummaryOutput"),Bze=D((e,a)=>{return L.take(e,{ChildShards:L._json,MillisBehindLatest:L.expectLong,NextShardIterator:L.expectString,Records:D((n)=>n1(n,a),"Records")})},"de_GetRecordsOutput"),cze=D((e,a)=>{return L.take(e,{Consumers:D((n)=>sze(n,a),"Consumers"),NextToken:L.expectString})},"de_ListStreamConsumersOutput"),Mze=D((e,a)=>{return L.take(e,{HasMoreStreams:L.expectBoolean,NextToken:L.expectString,StreamNames:L._json,StreamSummaries:D((n)=>zze(n,a),"StreamSummaries")})},"de_ListStreamsOutput"),gze=D((e,a)=>{return L.take(e,{ApproximateArrivalTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"ApproximateArrivalTimestamp"),Data:a.base64Decoder,EncryptionType:L.expectString,PartitionKey:L.expectString,SequenceNumber:L.expectString})},"de__Record"),n1=D((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return gze(i,a)})},"de_RecordList"),dze=D((e,a)=>{return L.take(e,{Consumer:D((n)=>a1(n,a),"Consumer")})},"de_RegisterStreamConsumerOutput"),yze=D((e,a)=>{return L.take(e,{EncryptionType:L.expectString,EnhancedMonitoring:L._json,HasMoreShards:L.expectBoolean,KeyId:L.expectString,RetentionPeriodHours:L.expectInt32,Shards:L._json,StreamARN:L.expectString,StreamCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"StreamCreationTimestamp"),StreamModeDetails:L._json,StreamName:L.expectString,StreamStatus:L.expectString})},"de_StreamDescription"),mze=D((e,a)=>{return L.take(e,{ConsumerCount:L.expectInt32,EncryptionType:L.expectString,EnhancedMonitoring:L._json,KeyId:L.expectString,OpenShardCount:L.expectInt32,RetentionPeriodHours:L.expectInt32,StreamARN:L.expectString,StreamCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"StreamCreationTimestamp"),StreamModeDetails:L._json,StreamName:L.expectString,StreamStatus:L.expectString})},"de_StreamDescriptionSummary"),Cze=D((e,a)=>{return L.take(e,{StreamARN:L.expectString,StreamCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"StreamCreationTimestamp"),StreamModeDetails:L._json,StreamName:L.expectString,StreamStatus:L.expectString})},"de_StreamSummary"),zze=D((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return Cze(i,a)})},"de_StreamSummaryList"),Hze=D((e,a)=>{return L.take(e,{ChildShards:L._json,ContinuationSequenceNumber:L.expectString,MillisBehindLatest:L.expectLong,Records:D((n)=>n1(n,a),"Records")})},"de_SubscribeToShardEvent"),ge=D((e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),"deserializeMetadata"),bze=L.withBaseException(ln),Xe=D(async(e,a,n,i,r)=>{let{hostname:h,protocol:s="https",port:S,path:u}=await e.endpoint(),B={protocol:s,hostname:h,port:S,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+n:u+n,headers:a};if(i!==void 0)B.hostname=i;if(r!==void 0)B.body=r;return new Nm.HttpRequest(B)},"buildHttpRpcRequest");function Oe(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Kinesis_20131202.${e}`}}D(Oe,"sharedHeaders");var i1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","AddTagsToStream",{}).n("KinesisClient","AddTagsToStreamCommand").f(void 0,void 0).ser(yme).de(_me).build(){static{D(this,"AddTagsToStreamCommand")}},r1=class extends L.Command.classBuilder().ep(qe).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","CreateStream",{}).n("KinesisClient","CreateStreamCommand").f(void 0,void 0).ser(mme).de(pme).build(){static{D(this,"CreateStreamCommand")}},l1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DecreaseStreamRetentionPeriod",{}).n("KinesisClient","DecreaseStreamRetentionPeriodCommand").f(void 0,void 0).ser(Cme).de(eCe).build(){static{D(this,"DecreaseStreamRetentionPeriodCommand")}},o1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DeleteResourcePolicy",{}).n("KinesisClient","DeleteResourcePolicyCommand").f(void 0,void 0).ser(zme).de(aCe).build(){static{D(this,"DeleteResourcePolicyCommand")}},h1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DeleteStream",{}).n("KinesisClient","DeleteStreamCommand").f(void 0,void 0).ser(Hme).de(nCe).build(){static{D(this,"DeleteStreamCommand")}},s1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ConsumerARN:{type:"contextParams",name:"ConsumerARN"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DeregisterStreamConsumer",{}).n("KinesisClient","DeregisterStreamConsumerCommand").f(void 0,void 0).ser(bme).de(iCe).build(){static{D(this,"DeregisterStreamConsumerCommand")}},k1=class extends L.Command.classBuilder().ep(qe).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeLimits",{}).n("KinesisClient","DescribeLimitsCommand").f(void 0,void 0).ser(Gme).de(rCe).build(){static{D(this,"DescribeLimitsCommand")}},UB=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeStream",{}).n("KinesisClient","DescribeStreamCommand").f(void 0,void 0).ser(Dme).de(lCe).build(){static{D(this,"DescribeStreamCommand")}},S1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ConsumerARN:{type:"contextParams",name:"ConsumerARN"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeStreamConsumer",{}).n("KinesisClient","DescribeStreamConsumerCommand").f(void 0,void 0).ser(Kme).de(oCe).build(){static{D(this,"DescribeStreamConsumerCommand")}},u1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeStreamSummary",{}).n("KinesisClient","DescribeStreamSummaryCommand").f(void 0,void 0).ser(Lme).de(hCe).build(){static{D(this,"DescribeStreamSummaryCommand")}},B1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DisableEnhancedMonitoring",{}).n("KinesisClient","DisableEnhancedMonitoringCommand").f(void 0,void 0).ser(wme).de(sCe).build(){static{D(this,"DisableEnhancedMonitoringCommand")}},c1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","EnableEnhancedMonitoring",{}).n("KinesisClient","EnableEnhancedMonitoringCommand").f(void 0,void 0).ser(Pme).de(kCe).build(){static{D(this,"EnableEnhancedMonitoringCommand")}},M1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","GetRecords",{}).n("KinesisClient","GetRecordsCommand").f(void 0,void 0).ser(Rme).de(SCe).build(){static{D(this,"GetRecordsCommand")}},g1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","GetResourcePolicy",{}).n("KinesisClient","GetResourcePolicyCommand").f(void 0,void 0).ser(Wme).de(uCe).build(){static{D(this,"GetResourcePolicyCommand")}},d1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","GetShardIterator",{}).n("KinesisClient","GetShardIteratorCommand").f(void 0,void 0).ser(tme).de(BCe).build(){static{D(this,"GetShardIteratorCommand")}},y1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","IncreaseStreamRetentionPeriod",{}).n("KinesisClient","IncreaseStreamRetentionPeriodCommand").f(void 0,void 0).ser(Fme).de(cCe).build(){static{D(this,"IncreaseStreamRetentionPeriodCommand")}},m1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListShards",{}).n("KinesisClient","ListShardsCommand").f(void 0,void 0).ser(Ame).de(MCe).build(){static{D(this,"ListShardsCommand")}},vm=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListStreamConsumers",{}).n("KinesisClient","ListStreamConsumersCommand").f(void 0,void 0).ser(Tme).de(gCe).build(){static{D(this,"ListStreamConsumersCommand")}},Ym=class extends L.Command.classBuilder().ep(qe).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListStreams",{}).n("KinesisClient","ListStreamsCommand").f(void 0,void 0).ser(Vme).de(dCe).build(){static{D(this,"ListStreamsCommand")}},C1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListTagsForResource",{}).n("KinesisClient","ListTagsForResourceCommand").f(void 0,void 0).ser(fme).de(yCe).build(){static{D(this,"ListTagsForResourceCommand")}},z1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListTagsForStream",{}).n("KinesisClient","ListTagsForStreamCommand").f(void 0,void 0).ser(Jme).de(mCe).build(){static{D(this,"ListTagsForStreamCommand")}},H1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","MergeShards",{}).n("KinesisClient","MergeShardsCommand").f(void 0,void 0).ser(Nme).de(CCe).build(){static{D(this,"MergeShardsCommand")}},b1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutRecord",{}).n("KinesisClient","PutRecordCommand").f(void 0,void 0).ser(Eme).de(zCe).build(){static{D(this,"PutRecordCommand")}},G1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutRecords",{}).n("KinesisClient","PutRecordsCommand").f(void 0,void 0).ser(vme).de(HCe).build(){static{D(this,"PutRecordsCommand")}},D1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutResourcePolicy",{}).n("KinesisClient","PutResourcePolicyCommand").f(void 0,void 0).ser(Yme).de(bCe).build(){static{D(this,"PutResourcePolicyCommand")}},K1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","RegisterStreamConsumer",{}).n("KinesisClient","RegisterStreamConsumerCommand").f(void 0,void 0).ser(Ome).de(GCe).build(){static{D(this,"RegisterStreamConsumerCommand")}},L1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","RemoveTagsFromStream",{}).n("KinesisClient","RemoveTagsFromStreamCommand").f(void 0,void 0).ser(Qme).de(DCe).build(){static{D(this,"RemoveTagsFromStreamCommand")}},w1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","SplitShard",{}).n("KinesisClient","SplitShardCommand").f(void 0,void 0).ser($me).de(KCe).build(){static{D(this,"SplitShardCommand")}},P1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","StartStreamEncryption",{}).n("KinesisClient","StartStreamEncryptionCommand").f(void 0,void 0).ser(qme).de(LCe).build(){static{D(this,"StartStreamEncryptionCommand")}},R1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","StopStreamEncryption",{}).n("KinesisClient","StopStreamEncryptionCommand").f(void 0,void 0).ser(Zme).de(wCe).build(){static{D(this,"StopStreamEncryptionCommand")}},W1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},ConsumerARN:{type:"contextParams",name:"ConsumerARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","SubscribeToShard",{eventStream:{output:!0}}).n("KinesisClient","SubscribeToShardCommand").f(void 0,q0).ser(Ume).de(PCe).build(){static{D(this,"SubscribeToShardCommand")}},t1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","TagResource",{}).n("KinesisClient","TagResourceCommand").f(void 0,void 0).ser(Xme).de(RCe).build(){static{D(this,"TagResourceCommand")}},F1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","UntagResource",{}).n("KinesisClient","UntagResourceCommand").f(void 0,void 0).ser(jme).de(WCe).build(){static{D(this,"UntagResourceCommand")}},A1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","UpdateShardCount",{}).n("KinesisClient","UpdateShardCountCommand").f(void 0,void 0).ser(Ime).de(tCe).build(){static{D(this,"UpdateShardCountCommand")}},T1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","UpdateStreamMode",{}).n("KinesisClient","UpdateStreamModeCommand").f(void 0,void 0).ser(xme).de(FCe).build(){static{D(this,"UpdateStreamModeCommand")}},Gze={AddTagsToStreamCommand:i1,CreateStreamCommand:r1,DecreaseStreamRetentionPeriodCommand:l1,DeleteResourcePolicyCommand:o1,DeleteStreamCommand:h1,DeregisterStreamConsumerCommand:s1,DescribeLimitsCommand:k1,DescribeStreamCommand:UB,DescribeStreamConsumerCommand:S1,DescribeStreamSummaryCommand:u1,DisableEnhancedMonitoringCommand:B1,EnableEnhancedMonitoringCommand:c1,GetRecordsCommand:M1,GetResourcePolicyCommand:g1,GetShardIteratorCommand:d1,IncreaseStreamRetentionPeriodCommand:y1,ListShardsCommand:m1,ListStreamConsumersCommand:vm,ListStreamsCommand:Ym,ListTagsForResourceCommand:C1,ListTagsForStreamCommand:z1,MergeShardsCommand:H1,PutRecordCommand:b1,PutRecordsCommand:G1,PutResourcePolicyCommand:D1,RegisterStreamConsumerCommand:K1,RemoveTagsFromStreamCommand:L1,SplitShardCommand:w1,StartStreamEncryptionCommand:P1,StopStreamEncryptionCommand:R1,SubscribeToShardCommand:W1,TagResourceCommand:t1,UntagResourceCommand:F1,UpdateShardCountCommand:A1,UpdateStreamModeCommand:T1},V1=class extends ZB{static{D(this,"Kinesis")}};L.createAggregatedClient(Gze,V1);var Dze=Ck.createPaginator(ZB,vm,"NextToken","NextToken","MaxResults"),Kze=Ck.createPaginator(ZB,Ym,"NextToken","NextToken","Limit"),rr=b0(),f1=D(async(e,a)=>{let n;try{let i=await e.send(new UB(a));n=i;try{if(D(()=>{return i.StreamDescription.StreamStatus},"returnComparator")()==="ACTIVE")return{state:rr.WaiterState.SUCCESS,reason:n}}catch(r){}}catch(i){n=i}return{state:rr.WaiterState.RETRY,reason:n}},"checkState"),Lze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120};return rr.createWaiter({...n,...e},a,f1)},"waitForStreamExists"),wze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120},i=await rr.createWaiter({...n,...e},a,f1);return rr.checkExceptions(i)},"waitUntilStreamExists"),J1=D(async(e,a)=>{let n;try{n=await e.send(new UB(a))}catch(i){if(n=i,i.name&&i.name=="ResourceNotFoundException")return{state:rr.WaiterState.SUCCESS,reason:n}}return{state:rr.WaiterState.RETRY,reason:n}},"checkState"),Pze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120};return rr.createWaiter({...n,...e},a,J1)},"waitForStreamNotExists"),Rze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120},i=await rr.createWaiter({...n,...e},a,J1);return rr.checkExceptions(i)},"waitUntilStreamNotExists")});var Y1=G((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0})});var Q1=G((O1)=>{Object.defineProperty(O1,"__esModule",{value:!0});O1.HttpAuthLocation=void 0;var Wze;(function(e){e.HEADER="header",e.QUERY="query"})(Wze=O1.HttpAuthLocation||(O1.HttpAuthLocation={}))});var q1=G(($1)=>{Object.defineProperty($1,"__esModule",{value:!0})});var U1=G((Z1)=>{Object.defineProperty(Z1,"__esModule",{value:!0})});var j1=G((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0})});var x1=G((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0})});var p1=G((_1)=>{Object.defineProperty(_1,"__esModule",{value:!0})});var av=G((ev)=>{Object.defineProperty(ev,"__esModule",{value:!0})});var rv=G((iv)=>{Object.defineProperty(iv,"__esModule",{value:!0})});var lv=G((zk)=>{Object.defineProperty(zk,"__esModule",{value:!0});var Qm=an();Qm.__exportStar(p1(),zk);Qm.__exportStar(av(),zk);Qm.__exportStar(rv(),zk)});var hv=G((ov)=>{Object.defineProperty(ov,"__esModule",{value:!0})});var kv=G((sv)=>{Object.defineProperty(sv,"__esModule",{value:!0})});var uv=G((Sv)=>{Object.defineProperty(Sv,"__esModule",{value:!0});Sv.EndpointURLScheme=void 0;var tze;(function(e){e.HTTP="http",e.HTTPS="https"})(tze=Sv.EndpointURLScheme||(Sv.EndpointURLScheme={}))});var cv=G((Bv)=>{Object.defineProperty(Bv,"__esModule",{value:!0})});var gv=G((Mv)=>{Object.defineProperty(Mv,"__esModule",{value:!0})});var yv=G((dv)=>{Object.defineProperty(dv,"__esModule",{value:!0})});var Cv=G((mv)=>{Object.defineProperty(mv,"__esModule",{value:!0})});var Hv=G((zv)=>{Object.defineProperty(zv,"__esModule",{value:!0})});var bv=G((uo)=>{Object.defineProperty(uo,"__esModule",{value:!0});var Hk=an();Hk.__exportStar(cv(),uo);Hk.__exportStar(gv(),uo);Hk.__exportStar(yv(),uo);Hk.__exportStar(Cv(),uo);Hk.__exportStar(Hv(),uo)});var Dv=G((Gv)=>{Object.defineProperty(Gv,"__esModule",{value:!0})});var Lv=G((Kv)=>{Object.defineProperty(Kv,"__esModule",{value:!0});Kv.FieldPosition=void 0;var Fze;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(Fze=Kv.FieldPosition||(Kv.FieldPosition={}))});var Pv=G((wv)=>{Object.defineProperty(wv,"__esModule",{value:!0})});var Wv=G((Rv)=>{Object.defineProperty(Rv,"__esModule",{value:!0})});var Fv=G((XB)=>{Object.defineProperty(XB,"__esModule",{value:!0});var tv=an();tv.__exportStar(Pv(),XB);tv.__exportStar(Wv(),XB)});var Tv=G((Av)=>{Object.defineProperty(Av,"__esModule",{value:!0})});var fv=G((Vv)=>{Object.defineProperty(Vv,"__esModule",{value:!0})});var Nv=G((Jv)=>{Object.defineProperty(Jv,"__esModule",{value:!0})});var vv=G((Ev)=>{Object.defineProperty(Ev,"__esModule",{value:!0})});var Ov=G((Yv)=>{Object.defineProperty(Yv,"__esModule",{value:!0})});var $v=G((Qv)=>{Object.defineProperty(Qv,"__esModule",{value:!0})});var Zv=G((qv)=>{Object.defineProperty(qv,"__esModule",{value:!0})});var Xv=G((Uv)=>{Object.defineProperty(Uv,"__esModule",{value:!0})});var Iv=G((jv)=>{Object.defineProperty(jv,"__esModule",{value:!0})});var _v=G((xv)=>{Object.defineProperty(xv,"__esModule",{value:!0})});var eY=G((pv)=>{Object.defineProperty(pv,"__esModule",{value:!0})});var nY=G((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0})});var rY=G((iY)=>{Object.defineProperty(iY,"__esModule",{value:!0})});var oY=G((lY)=>{Object.defineProperty(lY,"__esModule",{value:!0});lY.RequestHandlerProtocol=void 0;var Aze;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(Aze=lY.RequestHandlerProtocol||(lY.RequestHandlerProtocol={}))});var sY=G((hY)=>{Object.defineProperty(hY,"__esModule",{value:!0})});var SY=G((kY)=>{Object.defineProperty(kY,"__esModule",{value:!0})});var BY=G((uY)=>{Object.defineProperty(uY,"__esModule",{value:!0})});var MY=G((cY)=>{Object.defineProperty(cY,"__esModule",{value:!0})});var dY=G((gY)=>{Object.defineProperty(gY,"__esModule",{value:!0})});var yY=G((je)=>{Object.defineProperty(je,"__esModule",{value:!0});var pe=an();pe.__exportStar(Y1(),je);pe.__exportStar(Q1(),je);pe.__exportStar(q1(),je);pe.__exportStar(U1(),je);pe.__exportStar(j1(),je);pe.__exportStar(x1(),je);pe.__exportStar(lv(),je);pe.__exportStar(hv(),je);pe.__exportStar(kv(),je);pe.__exportStar(uv(),je);pe.__exportStar(bv(),je);pe.__exportStar(Dv(),je);pe.__exportStar(Lv(),je);pe.__exportStar(Fv(),je);pe.__exportStar(Tv(),je);pe.__exportStar(fv(),je);pe.__exportStar(Nv(),je);pe.__exportStar(vv(),je);pe.__exportStar(Ov(),je);pe.__exportStar($v(),je);pe.__exportStar(Zv(),je);pe.__exportStar(Xv(),je);pe.__exportStar(Iv(),je);pe.__exportStar(_v(),je);pe.__exportStar(eY(),je);pe.__exportStar(nY(),je);pe.__exportStar(rY(),je);pe.__exportStar(oY(),je);pe.__exportStar(sY(),je);pe.__exportStar(SY(),je);pe.__exportStar(BY(),je);pe.__exportStar(MY(),je);pe.__exportStar(dY(),je)});var HY=G((CY)=>{Object.defineProperty(CY,"__esModule",{value:!0});CY.Field=void 0;var Tze=yY();class mY{constructor({name:e,kind:a=Tze.FieldPosition.HEADER,values:n=[]}){this.name=e,this.kind=a,this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((a)=>a!==e)}toString(){return this.values.map((e)=>e.includes(",")||e.includes(" ")?`"${e}"`:e).join(", ")}get(){return this.values}}CY.Field=mY});var KY=G((GY)=>{Object.defineProperty(GY,"__esModule",{value:!0});GY.Fields=void 0;class bY{constructor({fields:e=[],encoding:a="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=a}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((a)=>a.kind===e)}}GY.Fields=bY});var wY=G((LY)=>{Object.defineProperty(LY,"__esModule",{value:!0})});var WY=G((PY)=>{Object.defineProperty(PY,"__esModule",{value:!0});PY.HttpRequest=void 0;class Um{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){if(!e)return!1;let a=e;return"method"in a&&"protocol"in a&&"hostname"in a&&"path"in a&&typeof a.query==="object"&&typeof a.headers==="object"}clone(){let e=new Um({...this,headers:{...this.headers}});if(e.query)e.query=Vze(e.query);return e}}PY.HttpRequest=Um;function Vze(e){return Object.keys(e).reduce((a,n)=>{let i=e[n];return{...a,[n]:Array.isArray(i)?[...i]:i}},{})}});var TY=G((FY)=>{Object.defineProperty(FY,"__esModule",{value:!0});FY.HttpResponse=void 0;class tY{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let a=e;return typeof a.statusCode==="number"&&typeof a.headers==="object"}}FY.HttpResponse=tY});var JY=G((VY)=>{Object.defineProperty(VY,"__esModule",{value:!0});VY.isValidHostname=void 0;function fze(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}VY.isValidHostname=fze});var EY=G((NY)=>{Object.defineProperty(NY,"__esModule",{value:!0})});var Xm=G((Nr)=>{Object.defineProperty(Nr,"__esModule",{value:!0});var Bo=an();Bo.__exportStar(HY(),Nr);Bo.__exportStar(KY(),Nr);Bo.__exportStar(wY(),Nr);Bo.__exportStar(WY(),Nr);Bo.__exportStar(TY(),Nr);Bo.__exportStar(JY(),Nr);Bo.__exportStar(EY(),Nr)});var jm=G((vY)=>{Object.defineProperty(vY,"__esModule",{value:!0});vY.escapeUri=void 0;var Jze=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,Nze);vY.escapeUri=Jze;var Nze=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`});var $Y=G((OY)=>{Object.defineProperty(OY,"__esModule",{value:!0});OY.escapeUriPath=void 0;var Eze=jm(),vze=(e)=>e.split("/").map(Eze.escapeUri).join("/");OY.escapeUriPath=vze});var ZY=G((jB)=>{Object.defineProperty(jB,"__esModule",{value:!0});var qY=an();qY.__exportStar(jm(),jB);qY.__exportStar($Y(),jB)});var xm=G((UY)=>{Object.defineProperty(UY,"__esModule",{value:!0});UY.buildQueryString=void 0;var Im=ZY();function Yze(e){let a=[];for(let n of Object.keys(e).sort()){let i=e[n];if(n=Im.escapeUri(n),Array.isArray(i))for(let r=0,h=i.length;r<h;r++)a.push(`${n}=${Im.escapeUri(i[r])}`);else{let r=n;if(i||typeof i==="string")r+=`=${Im.escapeUri(i)}`;a.push(r)}}return a.join("&")}UY.buildQueryString=Yze});var xY=G((jY)=>{Object.defineProperty(jY,"__esModule",{value:!0});jY.NODEJS_TIMEOUT_ERROR_CODES=void 0;jY.NODEJS_TIMEOUT_ERROR_CODES=["ECONNRESET","EPIPE","ETIMEDOUT"]});var _m=G((_Y)=>{Object.defineProperty(_Y,"__esModule",{value:!0});_Y.getTransformedHeaders=void 0;var Oze=(e)=>{let a={};for(let n of Object.keys(e)){let i=e[n];a[n]=Array.isArray(i)?i.join(","):i}return a};_Y.getTransformedHeaders=Oze});var nO=G((eO)=>{Object.defineProperty(eO,"__esModule",{value:!0});eO.setConnectionTimeout=void 0;var Qze=(e,a,n=0)=>{if(!n)return;let i=setTimeout(()=>{e.destroy(),a(Object.assign(new Error(`Socket timed out without establishing a connection within ${n} ms`),{name:"TimeoutError"}))},n);e.on("socket",(r)=>{if(r.connecting)r.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)})};eO.setConnectionTimeout=Qze});var lO=G((iO)=>{Object.defineProperty(iO,"__esModule",{value:!0});iO.setSocketKeepAlive=void 0;var $ze=(e,{keepAlive:a,keepAliveMsecs:n})=>{if(a!==!0)return;e.on("socket",(i)=>{i.setKeepAlive(a,n||0)})};iO.setSocketKeepAlive=$ze});var sO=G((oO)=>{Object.defineProperty(oO,"__esModule",{value:!0});oO.setSocketTimeout=void 0;var qze=(e,a,n=0)=>{e.setTimeout(n,()=>{e.destroy(),a(Object.assign(new Error(`Connection timed out after ${n} ms`),{name:"TimeoutError"}))})};oO.setSocketTimeout=qze});var pm=G((SO)=>{Object.defineProperty(SO,"__esModule",{value:!0});SO.writeRequestBody=void 0;var Zze=De("stream"),kO=1000;async function Uze(e,a,n=kO){var i;let r=(i=a.headers)!==null&&i!==void 0?i:{},h=r.Expect||r.expect,s=-1,S=!1;if(h==="100-continue")await Promise.race([new Promise((u)=>{s=Number(setTimeout(u,Math.max(kO,n)))}),new Promise((u)=>{e.on("continue",()=>{clearTimeout(s),u()}),e.on("error",()=>{S=!0,clearTimeout(s),u()})})]);if(!S)Xze(e,a.body)}SO.writeRequestBody=Uze;function Xze(e,a){if(a instanceof Zze.Readable)a.pipe(e);else if(a)e.end(Buffer.from(a));else e.end()}});var yO=G((gO)=>{Object.defineProperty(gO,"__esModule",{value:!0});gO.NodeHttpHandler=gO.DEFAULT_REQUEST_TIMEOUT=void 0;var jze=Xm(),Ize=xm(),BO=De("http"),cO=De("https"),xze=xY(),_ze=_m(),pze=nO(),eHe=lO(),aHe=sO(),nHe=pm();gO.DEFAULT_REQUEST_TIMEOUT=0;class MO{constructor(e){this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((a,n)=>{if(typeof e==="function")e().then((i)=>{a(this.resolveDefaultConfig(i))}).catch(n);else a(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){let{requestTimeout:a,connectionTimeout:n,socketTimeout:i,httpAgent:r,httpsAgent:h}=e||{},s=!0,S=50;return{connectionTimeout:n,requestTimeout:a!==null&&a!==void 0?a:i,httpAgent:r||new BO.Agent({keepAlive:!0,maxSockets:50}),httpsAgent:h||new cO.Agent({keepAlive:!0,maxSockets:50})}}destroy(){var e,a,n,i;(a=(e=this.config)===null||e===void 0?void 0:e.httpAgent)===null||a===void 0||a.destroy(),(i=(n=this.config)===null||n===void 0?void 0:n.httpsAgent)===null||i===void 0||i.destroy()}async handle(e,{abortSignal:a}={}){if(!this.config)this.config=await this.configProvider;return new Promise((n,i)=>{var r,h;let s=void 0,S=async(N)=>{await s,n(N)},u=async(N)=>{await s,i(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(a===null||a===void 0?void 0:a.aborted){let N=new Error("Request aborted");N.name="AbortError",u(N);return}let B=e.protocol==="https:",M=Ize.buildQueryString(e.query||{}),C=void 0;if(e.username!=null||e.password!=null){let N=(r=e.username)!==null&&r!==void 0?r:"",Z=(h=e.password)!==null&&h!==void 0?h:"";C=`${N}:${Z}`}let H=e.path;if(M)H+=`?${M}`;if(e.fragment)H+=`#${e.fragment}`;let R={headers:e.headers,host:e.hostname,method:e.method,path:H,port:e.port,agent:B?this.config.httpsAgent:this.config.httpAgent,auth:C},A=(B?cO.request:BO.request)(R,(N)=>{let Z=new jze.HttpResponse({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:_ze.getTransformedHeaders(N.headers),body:N});S({response:Z})});if(A.on("error",(N)=>{if(xze.NODEJS_TIMEOUT_ERROR_CODES.includes(N.code))u(Object.assign(N,{name:"TimeoutError"}));else u(N)}),pze.setConnectionTimeout(A,u,this.config.connectionTimeout),aHe.setSocketTimeout(A,u,this.config.requestTimeout),a)a.onabort=()=>{A.abort();let N=new Error("Request aborted");N.name="AbortError",u(N)};let Y=R.agent;if(typeof Y==="object"&&"keepAlive"in Y)eHe.setSocketKeepAlive(A,{keepAlive:Y.keepAlive,keepAliveMsecs:Y.keepAliveMsecs});s=nHe.writeRequestBody(A,e,this.config.requestTimeout).catch(i)})}}gO.NodeHttpHandler=MO});var HO=G((CO)=>{Object.defineProperty(CO,"__esModule",{value:!0});CO.NodeHttp2ConnectionPool=void 0;class mO{constructor(e){this.sessions=[],this.sessions=e!==null&&e!==void 0?e:[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter((a)=>a!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(let a of this.sessions)if(a===e){if(!a.destroyed)a.destroy()}}}CO.NodeHttp2ConnectionPool=mO});var KO=G((GO)=>{Object.defineProperty(GO,"__esModule",{value:!0});GO.NodeHttp2ConnectionManager=void 0;var rHe=an(),lHe=rHe.__importDefault(De("http2")),oHe=HO();class bO{constructor(e){if(this.sessionCache=new Map,this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(e,a){let n=this.getUrlString(e),i=this.sessionCache.get(n);if(i){let S=i.poll();if(S&&!this.config.disableConcurrency)return S}let r=lHe.default.connect(n);if(this.config.maxConcurrency)r.settings({maxConcurrentStreams:this.config.maxConcurrency},(S)=>{if(S)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});r.unref();let h=()=>{r.destroy(),this.deleteSession(n,r)};if(r.on("goaway",h),r.on("error",h),r.on("frameError",h),r.on("close",()=>this.deleteSession(n,r)),a.requestTimeout)r.setTimeout(a.requestTimeout,h);let s=this.sessionCache.get(n)||new oHe.NodeHttp2ConnectionPool;return s.offerLast(r),this.sessionCache.set(n,s),r}deleteSession(e,a){let n=this.sessionCache.get(e);if(!n)return;if(!n.contains(a))return;n.remove(a),this.sessionCache.set(e,n)}release(e,a){var n;let i=this.getUrlString(e);(n=this.sessionCache.get(i))===null||n===void 0||n.offerLast(a)}destroy(){for(let[e,a]of this.sessionCache){for(let n of a){if(!n.destroyed)n.destroy();a.remove(n)}this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}}GO.NodeHttp2ConnectionManager=bO});var WO=G((PO)=>{Object.defineProperty(PO,"__esModule",{value:!0});PO.NodeHttp2Handler=void 0;var hHe=Xm(),sHe=xm(),LO=De("http2"),kHe=_m(),SHe=KO(),uHe=pm();class wO{constructor(e){this.metadata={handlerProtocol:"h2"},this.connectionManager=new SHe.NodeHttp2ConnectionManager({}),this.configProvider=new Promise((a,n)=>{if(typeof e==="function")e().then((i)=>{a(i||{})}).catch(n);else a(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:a}={}){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)}let{requestTimeout:n,disableConcurrentStreams:i}=this.config;return new Promise((r,h)=>{var s,S,u;let B=!1,M=void 0,C=async(He)=>{await M,r(He)},H=async(He)=>{await M,h(He)};if(a===null||a===void 0?void 0:a.aborted){B=!0;let He=new Error("Request aborted");He.name="AbortError",H(He);return}let{hostname:R,method:W,port:A,protocol:Y,query:N}=e,Z="";if(e.username!=null||e.password!=null){let He=(s=e.username)!==null&&s!==void 0?s:"",va=(S=e.password)!==null&&S!==void 0?S:"";Z=`${He}:${va}@`}let I=`${Y}//${Z}${R}${A?`:${A}`:""}`,oe={destination:new URL(I)},_=this.connectionManager.lease(oe,{requestTimeout:(u=this.config)===null||u===void 0?void 0:u.sessionTimeout,disableConcurrentStreams:i||!1}),Be=(He)=>{if(i)this.destroySession(_);B=!0,H(He)},ca=sHe.buildQueryString(N||{}),Ia=e.path;if(ca)Ia+=`?${ca}`;if(e.fragment)Ia+=`#${e.fragment}`;let Qe=_.request({...e.headers,[LO.constants.HTTP2_HEADER_PATH]:Ia,[LO.constants.HTTP2_HEADER_METHOD]:W});if(_.ref(),Qe.on("response",(He)=>{let va=new hHe.HttpResponse({statusCode:He[":status"]||-1,headers:kHe.getTransformedHeaders(He),body:Qe});if(B=!0,C({response:va}),i)_.close(),this.connectionManager.deleteSession(I,_)}),n)Qe.setTimeout(n,()=>{Qe.close();let He=new Error(`Stream timed out because of no activity for ${n} ms`);He.name="TimeoutError",Be(He)});if(a)a.onabort=()=>{Qe.close();let He=new Error("Request aborted");He.name="AbortError",Be(He)};Qe.on("frameError",(He,va,zi)=>{Be(new Error(`Frame type id ${He} in stream id ${zi} has failed with code ${va}.`))}),Qe.on("error",Be),Qe.on("aborted",()=>{Be(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Qe.rstCode}.`))}),Qe.on("close",()=>{if(_.unref(),i)_.destroy();if(!B)Be(new Error("Unexpected error: http2 request did not get a response"))}),M=uHe.writeRequestBody(Qe,e,n)})}destroySession(e){if(!e.destroyed)e.destroy()}}PO.NodeHttp2Handler=wO});var TO=G((FO)=>{Object.defineProperty(FO,"__esModule",{value:!0});FO.Collector=void 0;var BHe=De("stream");class tO extends BHe.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,a,n){this.bufferedBytes.push(e),n()}}FO.Collector=tO});var JO=G((VO)=>{Object.defineProperty(VO,"__esModule",{value:!0});VO.streamCollector=void 0;var cHe=TO(),MHe=(e)=>new Promise((a,n)=>{let i=new cHe.Collector;e.pipe(i),e.on("error",(r)=>{i.end(),n(r)}),i.on("error",n),i.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.bufferedBytes));a(r)})});VO.streamCollector=MHe});var NO=G((bk)=>{Object.defineProperty(bk,"__esModule",{value:!0});var eC=an();eC.__exportStar(yO(),bk);eC.__exportStar(WO(),bk);eC.__exportStar(JO(),bk)});var EO=G((aC)=>{Object.defineProperty(aC,"__esModule",{value:!0});var gHe=an();gHe.__exportStar(NO(),aC)});var Ie;(function(e){e.assertEqual=(r)=>r;function a(r){}e.assertIs=a;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=(r)=>{let h={};for(let s of r)h[s]=s;return h},e.getValidEnumValues=(r)=>{let h=e.objectKeys(r).filter((S)=>typeof r[r[S]]!=="number"),s={};for(let S of h)s[S]=r[S];return e.objectValues(s)},e.objectValues=(r)=>{return e.objectKeys(r).map(function(h){return r[h]})},e.objectKeys=typeof Object.keys==="function"?(r)=>Object.keys(r):(r)=>{let h=[];for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s))h.push(s);return h},e.find=(r,h)=>{for(let s of r)if(h(s))return s;return},e.isInteger=typeof Number.isInteger==="function"?(r)=>Number.isInteger(r):(r)=>typeof r==="number"&&isFinite(r)&&Math.floor(r)===r;function i(r,h=" | "){return r.map((s)=>typeof s==="string"?`'${s}'`:s).join(h)}e.joinValues=i,e.jsonStringifyReplacer=(r,h)=>{if(typeof h==="bigint")return h.toString();return h}})(Ie||(Ie={}));var dM;(function(e){e.mergeShapes=(a,n)=>{return{...a,...n}}})(dM||(dM={}));var ne=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xr=(e)=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":if(Array.isArray(e))return ne.array;if(e===null)return ne.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return ne.promise;if(typeof Map!=="undefined"&&e instanceof Map)return ne.map;if(typeof Set!=="undefined"&&e instanceof Set)return ne.set;if(typeof Date!=="undefined"&&e instanceof Date)return ne.date;return ne.object;default:return ne.unknown}},j=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),KU=(e)=>{return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")};class En extends Error{constructor(e){super();this.issues=[],this.addIssue=(n)=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let a=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,a);else this.__proto__=a;this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let a=e||function(r){return r.message},n={_errors:[]},i=(r)=>{for(let h of r.issues)if(h.code==="invalid_union")h.unionErrors.map(i);else if(h.code==="invalid_return_type")i(h.returnTypeError);else if(h.code==="invalid_arguments")i(h.argumentsError);else if(h.path.length===0)n._errors.push(a(h));else{let s=n,S=0;while(S<h.path.length){let u=h.path[S];if(S!==h.path.length-1)s[u]=s[u]||{_errors:[]};else s[u]=s[u]||{_errors:[]},s[u]._errors.push(a(h));s=s[u],S++}}};return i(this),n}static assert(e){if(!(e instanceof En))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(a)=>a.message){let a={},n=[];for(let i of this.issues)if(i.path.length>0)a[i.path[0]]=a[i.path[0]]||[],a[i.path[0]].push(e(i));else n.push(e(i));return{formErrors:n,fieldErrors:a}}get formErrors(){return this.flatten()}}En.create=(e)=>{return new En(e)};var Jo=(e,a)=>{let n;switch(e.code){case j.invalid_type:if(e.received===ne.undefined)n="Required";else n=`Expected ${e.expected}, received ${e.received}`;break;case j.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case j.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case j.invalid_union:n="Invalid input";break;case j.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case j.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case j.invalid_arguments:n="Invalid function arguments";break;case j.invalid_return_type:n="Invalid function return type";break;case j.invalid_date:n="Invalid date";break;case j.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")n=`${n} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)n=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)n=`Invalid input: must end with "${e.validation.endsWith}"`;else Ie.assertNever(e.validation);else if(e.validation!=="regex")n=`Invalid ${e.validation}`;else n="Invalid";break;case j.too_small:if(e.type==="array")n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else n="Invalid input";break;case j.too_big:if(e.type==="array")n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else n="Invalid input";break;case j.custom:n="Invalid input";break;case j.invalid_intersection_types:n="Intersection results could not be merged";break;case j.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case j.not_finite:n="Number must be finite";break;default:n=a.defaultError,Ie.assertNever(e)}return{message:n}},JH=Jo;function LU(e){JH=e}function mS(){return JH}var CS=(e)=>{let{data:a,path:n,errorMaps:i,issueData:r}=e,h=[...n,...r.path||[]],s={...r,path:h};if(r.message!==void 0)return{...r,path:h,message:r.message};let S="",u=i.filter((B)=>!!B).slice().reverse();for(let B of u)S=B(s,{data:a,defaultError:S}).message;return{...r,path:h,message:S}},wU=[];function ae(e,a){let n=mS(),i=CS({issueData:a,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Jo?void 0:Jo].filter((r)=>!!r)});e.common.issues.push(i)}class cn{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,a){let n=[];for(let i of a){if(i.status==="aborted")return Ge;if(i.status==="dirty")e.dirty();n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,a){let n=[];for(let i of a){let r=await i.key,h=await i.value;n.push({key:r,value:h})}return cn.mergeObjectSync(e,n)}static mergeObjectSync(e,a){let n={};for(let i of a){let{key:r,value:h}=i;if(r.status==="aborted")return Ge;if(h.status==="aborted")return Ge;if(r.status==="dirty")e.dirty();if(h.status==="dirty")e.dirty();if(r.value!=="__proto__"&&(typeof h.value!=="undefined"||i.alwaysSet))n[r.value]=h.value}return{status:e.value,value:n}}}var Ge=Object.freeze({status:"aborted"}),Vo=(e)=>({status:"dirty",value:e}),Cn=(e)=>({status:"valid",value:e}),yM=(e)=>e.status==="aborted",mM=(e)=>e.status==="dirty",ms=(e)=>e.status==="valid",Cs=(e)=>typeof Promise!=="undefined"&&e instanceof Promise;function zS(e,a,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof a==="function"?e!==a||!i:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:a.get(e)}function NH(e,a,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof a==="function"?e!==a||!r:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:a.set(e,n),n}var Se;(function(e){e.errToObj=(a)=>typeof a==="string"?{message:a}:a||{},e.toString=(a)=>typeof a==="string"?a:a===null||a===void 0?void 0:a.message})(Se||(Se={}));var ds,ys;class Ri{constructor(e,a,n,i){this._cachedPath=[],this.parent=e,this.data=a,this._path=n,this._key=i}get path(){if(!this._cachedPath.length)if(this._key instanceof Array)this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var VH=(e,a)=>{if(ms(a))return{success:!0,data:a.value};else{if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new En(e.common.issues);return this._error=n,this._error}}}};function Pe(e){if(!e)return{};let{errorMap:a,invalid_type_error:n,required_error:i,description:r}=e;if(a&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(a)return{errorMap:a,description:r};return{errorMap:(s,S)=>{var u,B;let{message:M}=e;if(s.code==="invalid_enum_value")return{message:M!==null&&M!==void 0?M:S.defaultError};if(typeof S.data==="undefined")return{message:(u=M!==null&&M!==void 0?M:i)!==null&&u!==void 0?u:S.defaultError};if(s.code!=="invalid_type")return{message:S.defaultError};return{message:(B=M!==null&&M!==void 0?M:n)!==null&&B!==void 0?B:S.defaultError}},description:r}}class te{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return xr(e.data)}_getOrReturnCtx(e,a){return a||{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new cn,ctx:{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let a=this._parse(e);if(Cs(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(e){let a=this._parse(e);return Promise.resolve(a)}parse(e,a){let n=this.safeParse(e,a);if(n.success)return n.data;throw n.error}safeParse(e,a){var n;let i={common:{issues:[],async:(n=a===null||a===void 0?void 0:a.async)!==null&&n!==void 0?n:!1,contextualErrorMap:a===null||a===void 0?void 0:a.errorMap},path:(a===null||a===void 0?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},r=this._parseSync({data:e,path:i.path,parent:i});return VH(i,r)}async parseAsync(e,a){let n=await this.safeParseAsync(e,a);if(n.success)return n.data;throw n.error}async safeParseAsync(e,a){let n={common:{issues:[],contextualErrorMap:a===null||a===void 0?void 0:a.errorMap,async:!0},path:(a===null||a===void 0?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(Cs(i)?i:Promise.resolve(i));return VH(n,r)}refine(e,a){let n=(i)=>{if(typeof a==="string"||typeof a==="undefined")return{message:a};else if(typeof a==="function")return a(i);else return a};return this._refinement((i,r)=>{let h=e(i),s=()=>r.addIssue({code:j.custom,...n(i)});if(typeof Promise!=="undefined"&&h instanceof Promise)return h.then((S)=>{if(!S)return s(),!1;else return!0});if(!h)return s(),!1;else return!0})}refinement(e,a){return this._refinement((n,i)=>{if(!e(n))return i.addIssue(typeof a==="function"?a(n,i):a),!1;else return!0})}_refinement(e){return new ni({schema:this,typeName:me.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Pi.create(this,this._def)}nullable(){return mr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wi.create(this,this._def)}promise(){return Nl.create(this,this._def)}or(e){return Yo.create([this,e],this._def)}and(e){return Oo.create(this,e,this._def)}transform(e){return new ni({...Pe(this._def),schema:this,typeName:me.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let a=typeof e==="function"?e:()=>e;return new Zo({...Pe(this._def),innerType:this,defaultValue:a,typeName:me.ZodDefault})}brand(){return new bS({typeName:me.ZodBranded,type:this,...Pe(this._def)})}catch(e){let a=typeof e==="function"?e:()=>e;return new Uo({...Pe(this._def),innerType:this,catchValue:a,typeName:me.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return Ks.create(this,e)}readonly(){return Xo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var PU=/^c[^\s-]{8,}$/i,RU=/^[0-9a-z]+$/,WU=/^[0-9A-HJKMNP-TV-Z]{26}$/,tU=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FU=/^[a-z0-9_-]{21}$/i,AU=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gM,fU=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,JU=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,NU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,EH="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",EU=new RegExp(`^${EH}$`);function vH(e){let a="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";if(e.precision)a=`${a}\\.\\d{${e.precision}}`;else if(e.precision==null)a=`${a}(\\.\\d+)?`;return a}function vU(e){return new RegExp(`^${vH(e)}$`)}function YH(e){let a=`${EH}T${vH(e)}`,n=[];if(n.push(e.local?"Z?":"Z"),e.offset)n.push("([+-]\\d{2}:?\\d{2})");return a=`${a}(${n.join("|")})`,new RegExp(`^${a}$`)}function YU(e,a){if((a==="v4"||!a)&&fU.test(e))return!0;if((a==="v6"||!a)&&JU.test(e))return!0;return!1}class Li extends te{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==ne.string){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.string,received:r.parsedType}),Ge}let n=new cn,i=void 0;for(let r of this._def.checks)if(r.kind==="min"){if(e.data.length<r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty()}else if(r.kind==="max"){if(e.data.length>r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty()}else if(r.kind==="length"){let h=e.data.length>r.value,s=e.data.length<r.value;if(h||s){if(i=this._getOrReturnCtx(e,i),h)ae(i,{code:j.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message});else if(s)ae(i,{code:j.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message});n.dirty()}}else if(r.kind==="email"){if(!TU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"email",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="emoji"){if(!gM)gM=new RegExp(VU,"u");if(!gM.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"emoji",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="uuid"){if(!tU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"uuid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="nanoid"){if(!FU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"nanoid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="cuid"){if(!PU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"cuid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="cuid2"){if(!RU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"cuid2",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="ulid"){if(!WU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"ulid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="url")try{new URL(e.data)}catch(h){i=this._getOrReturnCtx(e,i),ae(i,{validation:"url",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="regex"){if(r.regex.lastIndex=0,!r.regex.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"regex",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="trim")e.data=e.data.trim();else if(r.kind==="includes"){if(!e.data.includes(r.value,r.position))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),n.dirty()}else if(r.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(r.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(r.kind==="startsWith"){if(!e.data.startsWith(r.value))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:{startsWith:r.value},message:r.message}),n.dirty()}else if(r.kind==="endsWith"){if(!e.data.endsWith(r.value))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:{endsWith:r.value},message:r.message}),n.dirty()}else if(r.kind==="datetime"){if(!YH(r).test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:"datetime",message:r.message}),n.dirty()}else if(r.kind==="date"){if(!EU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:"date",message:r.message}),n.dirty()}else if(r.kind==="time"){if(!vU(r).test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:"time",message:r.message}),n.dirty()}else if(r.kind==="duration"){if(!AU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"duration",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="ip"){if(!YU(e.data,r.version))i=this._getOrReturnCtx(e,i),ae(i,{validation:"ip",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="base64"){if(!NU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"base64",code:j.invalid_string,message:r.message}),n.dirty()}else Ie.assertNever(r);return{status:n.value,value:e.data}}_regex(e,a,n){return this.refinement((i)=>e.test(i),{validation:a,code:j.invalid_string,...Se.errToObj(n)})}_addCheck(e){return new Li({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Se.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Se.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Se.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Se.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Se.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Se.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Se.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Se.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Se.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Se.errToObj(e)})}datetime(e){var a,n;if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,offset:(a=e===null||e===void 0?void 0:e.offset)!==null&&a!==void 0?a:!1,local:(n=e===null||e===void 0?void 0:e.local)!==null&&n!==void 0?n:!1,...Se.errToObj(e===null||e===void 0?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,...Se.errToObj(e===null||e===void 0?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Se.errToObj(e)})}regex(e,a){return this._addCheck({kind:"regex",regex:e,...Se.errToObj(a)})}includes(e,a){return this._addCheck({kind:"includes",value:e,position:a===null||a===void 0?void 0:a.position,...Se.errToObj(a===null||a===void 0?void 0:a.message)})}startsWith(e,a){return this._addCheck({kind:"startsWith",value:e,...Se.errToObj(a)})}endsWith(e,a){return this._addCheck({kind:"endsWith",value:e,...Se.errToObj(a)})}min(e,a){return this._addCheck({kind:"min",value:e,...Se.errToObj(a)})}max(e,a){return this._addCheck({kind:"max",value:e,...Se.errToObj(a)})}length(e,a){return this._addCheck({kind:"length",value:e,...Se.errToObj(a)})}nonempty(e){return this.min(1,Se.errToObj(e))}trim(){return new Li({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Li({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Li({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get minLength(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e}get maxLength(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e}}Li.create=(e)=>{var a;return new Li({checks:[],typeName:me.ZodString,coerce:(a=e===null||e===void 0?void 0:e.coerce)!==null&&a!==void 0?a:!1,...Pe(e)})};function OU(e,a){let n=(e.toString().split(".")[1]||"").length,i=(a.toString().split(".")[1]||"").length,r=n>i?n:i,h=parseInt(e.toFixed(r).replace(".","")),s=parseInt(a.toFixed(r).replace(".",""));return h%s/Math.pow(10,r)}class pr extends te{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==ne.number){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.number,received:r.parsedType}),Ge}let n=void 0,i=new cn;for(let r of this._def.checks)if(r.kind==="int"){if(!Ie.isInteger(e.data))n=this._getOrReturnCtx(e,n),ae(n,{code:j.invalid_type,expected:"integer",received:"float",message:r.message}),i.dirty()}else if(r.kind==="min"){if(r.inclusive?e.data<r.value:e.data<=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()}else if(r.kind==="max"){if(r.inclusive?e.data>r.value:e.data>=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()}else if(r.kind==="multipleOf"){if(OU(e.data,r.value)!==0)n=this._getOrReturnCtx(e,n),ae(n,{code:j.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()}else if(r.kind==="finite"){if(!Number.isFinite(e.data))n=this._getOrReturnCtx(e,n),ae(n,{code:j.not_finite,message:r.message}),i.dirty()}else Ie.assertNever(r);return{status:i.value,value:e.data}}gte(e,a){return this.setLimit("min",e,!0,Se.toString(a))}gt(e,a){return this.setLimit("min",e,!1,Se.toString(a))}lte(e,a){return this.setLimit("max",e,!0,Se.toString(a))}lt(e,a){return this.setLimit("max",e,!1,Se.toString(a))}setLimit(e,a,n,i){return new pr({...this._def,checks:[...this._def.checks,{kind:e,value:a,inclusive:n,message:Se.toString(i)}]})}_addCheck(e){return new pr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Se.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(e)})}multipleOf(e,a){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(a)})}finite(e){return this._addCheck({kind:"finite",message:Se.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(e)})}get minValue(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e}get maxValue(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&Ie.isInteger(e.value))}get isFinite(){let e=null,a=null;for(let n of this._def.checks)if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;else if(n.kind==="min"){if(a===null||n.value>a)a=n.value}else if(n.kind==="max"){if(e===null||n.value<e)e=n.value}return Number.isFinite(a)&&Number.isFinite(e)}}pr.create=(e)=>{return new pr({checks:[],typeName:me.ZodNumber,coerce:(e===null||e===void 0?void 0:e.coerce)||!1,...Pe(e)})};class el extends te{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)e.data=BigInt(e.data);if(this._getType(e)!==ne.bigint){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.bigint,received:r.parsedType}),Ge}let n=void 0,i=new cn;for(let r of this._def.checks)if(r.kind==="min"){if(r.inclusive?e.data<r.value:e.data<=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()}else if(r.kind==="max"){if(r.inclusive?e.data>r.value:e.data>=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()}else if(r.kind==="multipleOf"){if(e.data%r.value!==BigInt(0))n=this._getOrReturnCtx(e,n),ae(n,{code:j.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()}else Ie.assertNever(r);return{status:i.value,value:e.data}}gte(e,a){return this.setLimit("min",e,!0,Se.toString(a))}gt(e,a){return this.setLimit("min",e,!1,Se.toString(a))}lte(e,a){return this.setLimit("max",e,!0,Se.toString(a))}lt(e,a){return this.setLimit("max",e,!1,Se.toString(a))}setLimit(e,a,n,i){return new el({...this._def,checks:[...this._def.checks,{kind:e,value:a,inclusive:n,message:Se.toString(i)}]})}_addCheck(e){return new el({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}multipleOf(e,a){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(a)})}get minValue(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e}get maxValue(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e}}el.create=(e)=>{var a;return new el({checks:[],typeName:me.ZodBigInt,coerce:(a=e===null||e===void 0?void 0:e.coerce)!==null&&a!==void 0?a:!1,...Pe(e)})};class No extends te{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==ne.boolean){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.boolean,received:n.parsedType}),Ge}return Cn(e.data)}}No.create=(e)=>{return new No({typeName:me.ZodBoolean,coerce:(e===null||e===void 0?void 0:e.coerce)||!1,...Pe(e)})};class Vl extends te{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==ne.date){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.date,received:r.parsedType}),Ge}if(isNaN(e.data.getTime())){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_date}),Ge}let n=new cn,i=void 0;for(let r of this._def.checks)if(r.kind==="min"){if(e.data.getTime()<r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()}else if(r.kind==="max"){if(e.data.getTime()>r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()}else Ie.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}min(e,a){return this._addCheck({kind:"min",value:e.getTime(),message:Se.toString(a)})}max(e,a){return this._addCheck({kind:"max",value:e.getTime(),message:Se.toString(a)})}get minDate(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e!=null?new Date(e):null}}Vl.create=(e)=>{return new Vl({checks:[],coerce:(e===null||e===void 0?void 0:e.coerce)||!1,typeName:me.ZodDate,...Pe(e)})};class zs extends te{_parse(e){if(this._getType(e)!==ne.symbol){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.symbol,received:n.parsedType}),Ge}return Cn(e.data)}}zs.create=(e)=>{return new zs({typeName:me.ZodSymbol,...Pe(e)})};class Eo extends te{_parse(e){if(this._getType(e)!==ne.undefined){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.undefined,received:n.parsedType}),Ge}return Cn(e.data)}}Eo.create=(e)=>{return new Eo({typeName:me.ZodUndefined,...Pe(e)})};class vo extends te{_parse(e){if(this._getType(e)!==ne.null){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.null,received:n.parsedType}),Ge}return Cn(e.data)}}vo.create=(e)=>{return new vo({typeName:me.ZodNull,...Pe(e)})};class fl extends te{constructor(){super(...arguments);this._any=!0}_parse(e){return Cn(e.data)}}fl.create=(e)=>{return new fl({typeName:me.ZodAny,...Pe(e)})};class _r extends te{constructor(){super(...arguments);this._unknown=!0}_parse(e){return Cn(e.data)}}_r.create=(e)=>{return new _r({typeName:me.ZodUnknown,...Pe(e)})};class Oi extends te{_parse(e){let a=this._getOrReturnCtx(e);return ae(a,{code:j.invalid_type,expected:ne.never,received:a.parsedType}),Ge}}Oi.create=(e)=>{return new Oi({typeName:me.ZodNever,...Pe(e)})};class Hs extends te{_parse(e){if(this._getType(e)!==ne.undefined){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.void,received:n.parsedType}),Ge}return Cn(e.data)}}Hs.create=(e)=>{return new Hs({typeName:me.ZodVoid,...Pe(e)})};class wi extends te{_parse(e){let{ctx:a,status:n}=this._processInputParams(e),i=this._def;if(a.parsedType!==ne.array)return ae(a,{code:j.invalid_type,expected:ne.array,received:a.parsedType}),Ge;if(i.exactLength!==null){let h=a.data.length>i.exactLength.value,s=a.data.length<i.exactLength.value;if(h||s)ae(a,{code:h?j.too_big:j.too_small,minimum:s?i.exactLength.value:void 0,maximum:h?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty()}if(i.minLength!==null){if(a.data.length<i.minLength.value)ae(a,{code:j.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()}if(i.maxLength!==null){if(a.data.length>i.maxLength.value)ae(a,{code:j.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()}if(a.common.async)return Promise.all([...a.data].map((h,s)=>{return i.type._parseAsync(new Ri(a,h,a.path,s))})).then((h)=>{return cn.mergeArray(n,h)});let r=[...a.data].map((h,s)=>{return i.type._parseSync(new Ri(a,h,a.path,s))});return cn.mergeArray(n,r)}get element(){return this._def.type}min(e,a){return new wi({...this._def,minLength:{value:e,message:Se.toString(a)}})}max(e,a){return new wi({...this._def,maxLength:{value:e,message:Se.toString(a)}})}length(e,a){return new wi({...this._def,exactLength:{value:e,message:Se.toString(a)}})}nonempty(e){return this.min(1,e)}}wi.create=(e,a)=>{return new wi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:me.ZodArray,...Pe(a)})};function To(e){if(e instanceof Wa){let a={};for(let n in e.shape){let i=e.shape[n];a[n]=Pi.create(To(i))}return new Wa({...e._def,shape:()=>a})}else if(e instanceof wi)return new wi({...e._def,type:To(e.element)});else if(e instanceof Pi)return Pi.create(To(e.unwrap()));else if(e instanceof mr)return mr.create(To(e.unwrap()));else if(e instanceof Qi)return Qi.create(e.items.map((a)=>To(a)));else return e}class Wa extends te{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),a=Ie.objectKeys(e);return this._cached={shape:e,keys:a}}_parse(e){if(this._getType(e)!==ne.object){let u=this._getOrReturnCtx(e);return ae(u,{code:j.invalid_type,expected:ne.object,received:u.parsedType}),Ge}let{status:n,ctx:i}=this._processInputParams(e),{shape:r,keys:h}=this._getCached(),s=[];if(!(this._def.catchall instanceof Oi&&this._def.unknownKeys==="strip")){for(let u in i.data)if(!h.includes(u))s.push(u)}let S=[];for(let u of h){let B=r[u],M=i.data[u];S.push({key:{status:"valid",value:u},value:B._parse(new Ri(i,M,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Oi){let u=this._def.unknownKeys;if(u==="passthrough")for(let B of s)S.push({key:{status:"valid",value:B},value:{status:"valid",value:i.data[B]}});else if(u==="strict"){if(s.length>0)ae(i,{code:j.unrecognized_keys,keys:s}),n.dirty()}else if(u==="strip");else throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let B of s){let M=i.data[B];S.push({key:{status:"valid",value:B},value:u._parse(new Ri(i,M,i.path,B)),alwaysSet:B in i.data})}}if(i.common.async)return Promise.resolve().then(async()=>{let u=[];for(let B of S){let M=await B.key,C=await B.value;u.push({key:M,value:C,alwaysSet:B.alwaysSet})}return u}).then((u)=>{return cn.mergeObjectSync(n,u)});else return cn.mergeObjectSync(n,S)}get shape(){return this._def.shape()}strict(e){return Se.errToObj,new Wa({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(a,n)=>{var i,r,h,s;let S=(h=(r=(i=this._def).errorMap)===null||r===void 0?void 0:r.call(i,a,n).message)!==null&&h!==void 0?h:n.defaultError;if(a.code==="unrecognized_keys")return{message:(s=Se.errToObj(e).message)!==null&&s!==void 0?s:S};return{message:S}}}:{}})}strip(){return new Wa({...this._def,unknownKeys:"strip"})}passthrough(){return new Wa({...this._def,unknownKeys:"passthrough"})}extend(e){return new Wa({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Wa({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:me.ZodObject})}setKey(e,a){return this.augment({[e]:a})}catchall(e){return new Wa({...this._def,catchall:e})}pick(e){let a={};return Ie.objectKeys(e).forEach((n)=>{if(e[n]&&this.shape[n])a[n]=this.shape[n]}),new Wa({...this._def,shape:()=>a})}omit(e){let a={};return Ie.objectKeys(this.shape).forEach((n)=>{if(!e[n])a[n]=this.shape[n]}),new Wa({...this._def,shape:()=>a})}deepPartial(){return To(this)}partial(e){let a={};return Ie.objectKeys(this.shape).forEach((n)=>{let i=this.shape[n];if(e&&!e[n])a[n]=i;else a[n]=i.optional()}),new Wa({...this._def,shape:()=>a})}required(e){let a={};return Ie.objectKeys(this.shape).forEach((n)=>{if(e&&!e[n])a[n]=this.shape[n];else{let r=this.shape[n];while(r instanceof Pi)r=r._def.innerType;a[n]=r}}),new Wa({...this._def,shape:()=>a})}keyof(){return OH(Ie.objectKeys(this.shape))}}Wa.create=(e,a)=>{return new Wa({shape:()=>e,unknownKeys:"strip",catchall:Oi.create(),typeName:me.ZodObject,...Pe(a)})};Wa.strictCreate=(e,a)=>{return new Wa({shape:()=>e,unknownKeys:"strict",catchall:Oi.create(),typeName:me.ZodObject,...Pe(a)})};Wa.lazycreate=(e,a)=>{return new Wa({shape:e,unknownKeys:"strip",catchall:Oi.create(),typeName:me.ZodObject,...Pe(a)})};class Yo extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n=this._def.options;function i(r){for(let s of r)if(s.result.status==="valid")return s.result;for(let s of r)if(s.result.status==="dirty")return a.common.issues.push(...s.ctx.common.issues),s.result;let h=r.map((s)=>new En(s.ctx.common.issues));return ae(a,{code:j.invalid_union,unionErrors:h}),Ge}if(a.common.async)return Promise.all(n.map(async(r)=>{let h={...a,common:{...a.common,issues:[]},parent:null};return{result:await r._parseAsync({data:a.data,path:a.path,parent:h}),ctx:h}})).then(i);else{let r=void 0,h=[];for(let S of n){let u={...a,common:{...a.common,issues:[]},parent:null},B=S._parseSync({data:a.data,path:a.path,parent:u});if(B.status==="valid")return B;else if(B.status==="dirty"&&!r)r={result:B,ctx:u};if(u.common.issues.length)h.push(u.common.issues)}if(r)return a.common.issues.push(...r.ctx.common.issues),r.result;let s=h.map((S)=>new En(S));return ae(a,{code:j.invalid_union,unionErrors:s}),Ge}}get options(){return this._def.options}}Yo.create=(e,a)=>{return new Yo({options:e,typeName:me.ZodUnion,...Pe(a)})};var yr=(e)=>{if(e instanceof Qo)return yr(e.schema);else if(e instanceof ni)return yr(e.innerType());else if(e instanceof $o)return[e.value];else if(e instanceof al)return e.options;else if(e instanceof qo)return Ie.objectValues(e.enum);else if(e instanceof Zo)return yr(e._def.innerType);else if(e instanceof Eo)return[void 0];else if(e instanceof vo)return[null];else if(e instanceof Pi)return[void 0,...yr(e.unwrap())];else if(e instanceof mr)return[null,...yr(e.unwrap())];else if(e instanceof bS)return yr(e.unwrap());else if(e instanceof Xo)return yr(e.unwrap());else if(e instanceof Uo)return yr(e._def.innerType);else return[]};class HS extends te{_parse(e){let{ctx:a}=this._processInputParams(e);if(a.parsedType!==ne.object)return ae(a,{code:j.invalid_type,expected:ne.object,received:a.parsedType}),Ge;let n=this.discriminator,i=a.data[n],r=this.optionsMap.get(i);if(!r)return ae(a,{code:j.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ge;if(a.common.async)return r._parseAsync({data:a.data,path:a.path,parent:a});else return r._parseSync({data:a.data,path:a.path,parent:a})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,a,n){let i=new Map;for(let r of a){let h=yr(r.shape[e]);if(!h.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of h){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,r)}}return new HS({typeName:me.ZodDiscriminatedUnion,discriminator:e,options:a,optionsMap:i,...Pe(n)})}}function CM(e,a){let n=xr(e),i=xr(a);if(e===a)return{valid:!0,data:e};else if(n===ne.object&&i===ne.object){let r=Ie.objectKeys(a),h=Ie.objectKeys(e).filter((S)=>r.indexOf(S)!==-1),s={...e,...a};for(let S of h){let u=CM(e[S],a[S]);if(!u.valid)return{valid:!1};s[S]=u.data}return{valid:!0,data:s}}else if(n===ne.array&&i===ne.array){if(e.length!==a.length)return{valid:!1};let r=[];for(let h=0;h<e.length;h++){let s=e[h],S=a[h],u=CM(s,S);if(!u.valid)return{valid:!1};r.push(u.data)}return{valid:!0,data:r}}else if(n===ne.date&&i===ne.date&&+e===+a)return{valid:!0,data:e};else return{valid:!1}}class Oo extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e),i=(r,h)=>{if(yM(r)||yM(h))return Ge;let s=CM(r.value,h.value);if(!s.valid)return ae(n,{code:j.invalid_intersection_types}),Ge;if(mM(r)||mM(h))a.dirty();return{status:a.value,value:s.data}};if(n.common.async)return Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([r,h])=>i(r,h));else return i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Oo.create=(e,a,n)=>{return new Oo({left:e,right:a,typeName:me.ZodIntersection,...Pe(n)})};class Qi extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.array)return ae(n,{code:j.invalid_type,expected:ne.array,received:n.parsedType}),Ge;if(n.data.length<this._def.items.length)return ae(n,{code:j.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ge;if(!this._def.rest&&n.data.length>this._def.items.length)ae(n,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty();let r=[...n.data].map((h,s)=>{let S=this._def.items[s]||this._def.rest;if(!S)return null;return S._parse(new Ri(n,h,n.path,s))}).filter((h)=>!!h);if(n.common.async)return Promise.all(r).then((h)=>{return cn.mergeArray(a,h)});else return cn.mergeArray(a,r)}get items(){return this._def.items}rest(e){return new Qi({...this._def,rest:e})}}Qi.create=(e,a)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qi({items:e,typeName:me.ZodTuple,rest:null,...Pe(a)})};class bs extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.object)return ae(n,{code:j.invalid_type,expected:ne.object,received:n.parsedType}),Ge;let i=[],r=this._def.keyType,h=this._def.valueType;for(let s in n.data)i.push({key:r._parse(new Ri(n,s,n.path,s)),value:h._parse(new Ri(n,n.data[s],n.path,s)),alwaysSet:s in n.data});if(n.common.async)return cn.mergeObjectAsync(a,i);else return cn.mergeObjectSync(a,i)}get element(){return this._def.valueType}static create(e,a,n){if(a instanceof te)return new bs({keyType:e,valueType:a,typeName:me.ZodRecord,...Pe(n)});return new bs({keyType:Li.create(),valueType:e,typeName:me.ZodRecord,...Pe(a)})}}class Gs extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.map)return ae(n,{code:j.invalid_type,expected:ne.map,received:n.parsedType}),Ge;let i=this._def.keyType,r=this._def.valueType,h=[...n.data.entries()].map(([s,S],u)=>{return{key:i._parse(new Ri(n,s,n.path,[u,"key"])),value:r._parse(new Ri(n,S,n.path,[u,"value"]))}});if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let S of h){let u=await S.key,B=await S.value;if(u.status==="aborted"||B.status==="aborted")return Ge;if(u.status==="dirty"||B.status==="dirty")a.dirty();s.set(u.value,B.value)}return{status:a.value,value:s}})}else{let s=new Map;for(let S of h){let{key:u,value:B}=S;if(u.status==="aborted"||B.status==="aborted")return Ge;if(u.status==="dirty"||B.status==="dirty")a.dirty();s.set(u.value,B.value)}return{status:a.value,value:s}}}}Gs.create=(e,a,n)=>{return new Gs({valueType:a,keyType:e,typeName:me.ZodMap,...Pe(n)})};class Jl extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.set)return ae(n,{code:j.invalid_type,expected:ne.set,received:n.parsedType}),Ge;let i=this._def;if(i.minSize!==null){if(n.data.size<i.minSize.value)ae(n,{code:j.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),a.dirty()}if(i.maxSize!==null){if(n.data.size>i.maxSize.value)ae(n,{code:j.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),a.dirty()}let r=this._def.valueType;function h(S){let u=new Set;for(let B of S){if(B.status==="aborted")return Ge;if(B.status==="dirty")a.dirty();u.add(B.value)}return{status:a.value,value:u}}let s=[...n.data.values()].map((S,u)=>r._parse(new Ri(n,S,n.path,u)));if(n.common.async)return Promise.all(s).then((S)=>h(S));else return h(s)}min(e,a){return new Jl({...this._def,minSize:{value:e,message:Se.toString(a)}})}max(e,a){return new Jl({...this._def,maxSize:{value:e,message:Se.toString(a)}})}size(e,a){return this.min(e,a).max(e,a)}nonempty(e){return this.min(1,e)}}Jl.create=(e,a)=>{return new Jl({valueType:e,minSize:null,maxSize:null,typeName:me.ZodSet,...Pe(a)})};class fo extends te{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:a}=this._processInputParams(e);if(a.parsedType!==ne.function)return ae(a,{code:j.invalid_type,expected:ne.function,received:a.parsedType}),Ge;function n(s,S){return CS({data:s,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,mS(),Jo].filter((u)=>!!u),issueData:{code:j.invalid_arguments,argumentsError:S}})}function i(s,S){return CS({data:s,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,mS(),Jo].filter((u)=>!!u),issueData:{code:j.invalid_return_type,returnTypeError:S}})}let r={errorMap:a.common.contextualErrorMap},h=a.data;if(this._def.returns instanceof Nl){let s=this;return Cn(async function(...S){let u=new En([]),B=await s._def.args.parseAsync(S,r).catch((H)=>{throw u.addIssue(n(S,H)),u}),M=await Reflect.apply(h,this,B);return await s._def.returns._def.type.parseAsync(M,r).catch((H)=>{throw u.addIssue(i(M,H)),u})})}else{let s=this;return Cn(function(...S){let u=s._def.args.safeParse(S,r);if(!u.success)throw new En([n(S,u.error)]);let B=Reflect.apply(h,this,u.data),M=s._def.returns.safeParse(B,r);if(!M.success)throw new En([i(B,M.error)]);return M.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new fo({...this._def,args:Qi.create(e).rest(_r.create())})}returns(e){return new fo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,a,n){return new fo({args:e?e:Qi.create([]).rest(_r.create()),returns:a||_r.create(),typeName:me.ZodFunction,...Pe(n)})}}class Qo extends te{get schema(){return this._def.getter()}_parse(e){let{ctx:a}=this._processInputParams(e);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Qo.create=(e,a)=>{return new Qo({getter:e,typeName:me.ZodLazy,...Pe(a)})};class $o extends te{_parse(e){if(e.data!==this._def.value){let a=this._getOrReturnCtx(e);return ae(a,{received:a.data,code:j.invalid_literal,expected:this._def.value}),Ge}return{status:"valid",value:e.data}}get value(){return this._def.value}}$o.create=(e,a)=>{return new $o({value:e,typeName:me.ZodLiteral,...Pe(a)})};function OH(e,a){return new al({values:e,typeName:me.ZodEnum,...Pe(a)})}class al extends te{constructor(){super(...arguments);ds.set(this,void 0)}_parse(e){if(typeof e.data!=="string"){let a=this._getOrReturnCtx(e),n=this._def.values;return ae(a,{expected:Ie.joinValues(n),received:a.parsedType,code:j.invalid_type}),Ge}if(!zS(this,ds,"f"))NH(this,ds,new Set(this._def.values),"f");if(!zS(this,ds,"f").has(e.data)){let a=this._getOrReturnCtx(e),n=this._def.values;return ae(a,{received:a.data,code:j.invalid_enum_value,options:n}),Ge}return Cn(e.data)}get options(){return this._def.values}get enum(){let e={};for(let a of this._def.values)e[a]=a;return e}get Values(){let e={};for(let a of this._def.values)e[a]=a;return e}get Enum(){let e={};for(let a of this._def.values)e[a]=a;return e}extract(e,a=this._def){return al.create(e,{...this._def,...a})}exclude(e,a=this._def){return al.create(this.options.filter((n)=>!e.includes(n)),{...this._def,...a})}}ds=new WeakMap;al.create=OH;class qo extends te{constructor(){super(...arguments);ys.set(this,void 0)}_parse(e){let a=Ie.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ne.string&&n.parsedType!==ne.number){let i=Ie.objectValues(a);return ae(n,{expected:Ie.joinValues(i),received:n.parsedType,code:j.invalid_type}),Ge}if(!zS(this,ys,"f"))NH(this,ys,new Set(Ie.getValidEnumValues(this._def.values)),"f");if(!zS(this,ys,"f").has(e.data)){let i=Ie.objectValues(a);return ae(n,{received:n.data,code:j.invalid_enum_value,options:i}),Ge}return Cn(e.data)}get enum(){return this._def.values}}ys=new WeakMap;qo.create=(e,a)=>{return new qo({values:e,typeName:me.ZodNativeEnum,...Pe(a)})};class Nl extends te{unwrap(){return this._def.type}_parse(e){let{ctx:a}=this._processInputParams(e);if(a.parsedType!==ne.promise&&a.common.async===!1)return ae(a,{code:j.invalid_type,expected:ne.promise,received:a.parsedType}),Ge;let n=a.parsedType===ne.promise?a.data:Promise.resolve(a.data);return Cn(n.then((i)=>{return this._def.type.parseAsync(i,{path:a.path,errorMap:a.common.contextualErrorMap})}))}}Nl.create=(e,a)=>{return new Nl({type:e,typeName:me.ZodPromise,...Pe(a)})};class ni extends te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:a,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:(h)=>{if(ae(n,h),h.fatal)a.abort();else a.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),i.type==="preprocess"){let h=i.transform(n.data,r);if(n.common.async)return Promise.resolve(h).then(async(s)=>{if(a.value==="aborted")return Ge;let S=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});if(S.status==="aborted")return Ge;if(S.status==="dirty")return Vo(S.value);if(a.value==="dirty")return Vo(S.value);return S});else{if(a.value==="aborted")return Ge;let s=this._def.schema._parseSync({data:h,path:n.path,parent:n});if(s.status==="aborted")return Ge;if(s.status==="dirty")return Vo(s.value);if(a.value==="dirty")return Vo(s.value);return s}}if(i.type==="refinement"){let h=(s)=>{let S=i.refinement(s,r);if(n.common.async)return Promise.resolve(S);if(S instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(s.status==="aborted")return Ge;if(s.status==="dirty")a.dirty();return h(s.value),{status:a.value,value:s.value}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((s)=>{if(s.status==="aborted")return Ge;if(s.status==="dirty")a.dirty();return h(s.value).then(()=>{return{status:a.value,value:s.value}})})}if(i.type==="transform")if(n.common.async===!1){let h=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ms(h))return h;let s=i.transform(h.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((h)=>{if(!ms(h))return h;return Promise.resolve(i.transform(h.value,r)).then((s)=>({status:a.value,value:s}))});Ie.assertNever(i)}}ni.create=(e,a,n)=>{return new ni({schema:e,typeName:me.ZodEffects,effect:a,...Pe(n)})};ni.createWithPreprocess=(e,a,n)=>{return new ni({schema:a,effect:{type:"preprocess",transform:e},typeName:me.ZodEffects,...Pe(n)})};class Pi extends te{_parse(e){if(this._getType(e)===ne.undefined)return Cn(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pi.create=(e,a)=>{return new Pi({innerType:e,typeName:me.ZodOptional,...Pe(a)})};class mr extends te{_parse(e){if(this._getType(e)===ne.null)return Cn(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}mr.create=(e,a)=>{return new mr({innerType:e,typeName:me.ZodNullable,...Pe(a)})};class Zo extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n=a.data;if(a.parsedType===ne.undefined)n=this._def.defaultValue();return this._def.innerType._parse({data:n,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}Zo.create=(e,a)=>{return new Zo({innerType:e,typeName:me.ZodDefault,defaultValue:typeof a.default==="function"?a.default:()=>a.default,...Pe(a)})};class Uo extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n={...a,common:{...a.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});if(Cs(i))return i.then((r)=>{return{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new En(n.common.issues)},input:n.data})}});else return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new En(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Uo.create=(e,a)=>{return new Uo({innerType:e,typeName:me.ZodCatch,catchValue:typeof a.catch==="function"?a.catch:()=>a.catch,...Pe(a)})};class Ds extends te{_parse(e){if(this._getType(e)!==ne.nan){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.nan,received:n.parsedType}),Ge}return{status:"valid",value:e.data}}}Ds.create=(e)=>{return new Ds({typeName:me.ZodNaN,...Pe(e)})};var QU=Symbol("zod_brand");class bS extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n=a.data;return this._def.type._parse({data:n,path:a.path,parent:a})}unwrap(){return this._def.type}}class Ks extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let r=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});if(r.status==="aborted")return Ge;if(r.status==="dirty")return a.dirty(),Vo(r.value);else return this._def.out._parseAsync({data:r.value,path:n.path,parent:n})})();else{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});if(i.status==="aborted")return Ge;if(i.status==="dirty")return a.dirty(),{status:"dirty",value:i.value};else return this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,a){return new Ks({in:e,out:a,typeName:me.ZodPipeline})}}class Xo extends te{_parse(e){let a=this._def.innerType._parse(e),n=(i)=>{if(ms(i))i.value=Object.freeze(i.value);return i};return Cs(a)?a.then((i)=>n(i)):n(a)}unwrap(){return this._def.innerType}}Xo.create=(e,a)=>{return new Xo({innerType:e,typeName:me.ZodReadonly,...Pe(a)})};function QH(e,a={},n){if(e)return fl.create().superRefine((i,r)=>{var h,s;if(!e(i)){let S=typeof a==="function"?a(i):typeof a==="string"?{message:a}:a,u=(s=(h=S.fatal)!==null&&h!==void 0?h:n)!==null&&s!==void 0?s:!0,B=typeof S==="string"?{message:S}:S;r.addIssue({code:"custom",...B,fatal:u})}});return fl.create()}var $U={object:Wa.lazycreate},me;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(me||(me={}));var qU=(e,a={message:`Input not instance of ${e.name}`})=>QH((n)=>n instanceof e,a),$H=Li.create,qH=pr.create,ZU=Ds.create,UU=el.create,ZH=No.create,XU=Vl.create,jU=zs.create,IU=Eo.create,xU=vo.create,_U=fl.create,pU=_r.create,e5=Oi.create,a5=Hs.create,n5=wi.create,i5=Wa.create,r5=Wa.strictCreate,l5=Yo.create,o5=HS.create,h5=Oo.create,s5=Qi.create,k5=bs.create,S5=Gs.create,u5=Jl.create,B5=fo.create,c5=Qo.create,M5=$o.create,g5=al.create,d5=qo.create,y5=Nl.create,fH=ni.create,m5=Pi.create,C5=mr.create,z5=ni.createWithPreprocess,H5=Ks.create,b5=()=>$H().optional(),G5=()=>qH().optional(),D5=()=>ZH().optional(),K5={string:(e)=>Li.create({...e,coerce:!0}),number:(e)=>pr.create({...e,coerce:!0}),boolean:(e)=>No.create({...e,coerce:!0}),bigint:(e)=>el.create({...e,coerce:!0}),date:(e)=>Vl.create({...e,coerce:!0})},L5=Ge,zn=Object.freeze({__proto__:null,defaultErrorMap:Jo,setErrorMap:LU,getErrorMap:mS,makeIssue:CS,EMPTY_PATH:wU,addIssueToContext:ae,ParseStatus:cn,INVALID:Ge,DIRTY:Vo,OK:Cn,isAborted:yM,isDirty:mM,isValid:ms,isAsync:Cs,get util(){return Ie},get objectUtil(){return dM},ZodParsedType:ne,getParsedType:xr,ZodType:te,datetimeRegex:YH,ZodString:Li,ZodNumber:pr,ZodBigInt:el,ZodBoolean:No,ZodDate:Vl,ZodSymbol:zs,ZodUndefined:Eo,ZodNull:vo,ZodAny:fl,ZodUnknown:_r,ZodNever:Oi,ZodVoid:Hs,ZodArray:wi,ZodObject:Wa,ZodUnion:Yo,ZodDiscriminatedUnion:HS,ZodIntersection:Oo,ZodTuple:Qi,ZodRecord:bs,ZodMap:Gs,ZodSet:Jl,ZodFunction:fo,ZodLazy:Qo,ZodLiteral:$o,ZodEnum:al,ZodNativeEnum:qo,ZodPromise:Nl,ZodEffects:ni,ZodTransformer:ni,ZodOptional:Pi,ZodNullable:mr,ZodDefault:Zo,ZodCatch:Uo,ZodNaN:Ds,BRAND:QU,ZodBranded:bS,ZodPipeline:Ks,ZodReadonly:Xo,custom:QH,Schema:te,ZodSchema:te,late:$U,get ZodFirstPartyTypeKind(){return me},coerce:K5,any:_U,array:n5,bigint:UU,boolean:ZH,date:XU,discriminatedUnion:o5,effect:fH,enum:g5,function:B5,instanceof:qU,intersection:h5,lazy:c5,literal:M5,map:S5,nan:ZU,nativeEnum:d5,never:e5,null:xU,nullable:C5,number:qH,object:i5,oboolean:D5,onumber:G5,optional:m5,ostring:b5,pipeline:H5,preprocess:z5,promise:y5,record:k5,set:u5,strictObject:r5,string:$H,symbol:jU,transformer:fH,tuple:s5,undefined:IU,union:l5,unknown:pU,void:a5,NEVER:L5,ZodIssueCode:j,quotelessJson:KU,ZodError:En});var GS;((h)=>{h.RUNNER="RUNNER";h.COLLECTION="COLLECTION";h.FLOW="FLOW";h.REQUEST="REQUEST";h.CALLBACK_EVENT="CALLBACK_EVENT"})(GS||={});var DS;((Re)=>{Re.FETCHING_EVENTS_FROM_EVENT_QUEUE="FETCHING_EVENTS_FROM_EVENT_QUEUE";Re.EVENTS_RECEIVED_FROM_EVENT_QUEUE="EVENTS_RECEIVED_FROM_EVENT_QUEUE";Re.CALLBACK_TASK_MATCHED_TO_EVENT="CALLBACK_TASK_MATCHED_TO_EVENT";Re.CALLBACK_TASK_ASSERTION_COMPLETED="CALLBACK_TASK_ASSERTION_COMPLETED";Re.TERMINAL_CALLBACK_TASK_TIMEOUT="TERMINAL_CALLBACK_TASK_TIMEOUT";Re.FETCHING_EVENTS_FROM_KINESIS="FETCHING_EVENTS_FROM_KINESIS";Re.POLLING_KINESIS="POLLING_KINESIS";Re.KINESIS_EVENT_MATCHED_TO_RECORD="KINESIS_EVENT_MATCHED_TO_RECORD";Re.TERMINAL_KINESIS_TASK_TIMEOUT="TERMINAL_KINESIS_TASK_TIMEOUT";Re.COLLECTION_RUN_STARTED="COLLECTION_RUN_STARTED";Re.COLLECTION_RUN_FINISHED="COLLECTION_RUN_FINISHED";Re.COLLECTION_IS_EMPTY="COLLECTION_IS_EMPTY";Re.COLLECTION_ERROR="COLLECTION_ERROR";Re.FLOW_STARTED="FLOW_STARTED";Re.FLOW_FINISHED="FLOW_FINISHED";Re.FLOW_IS_EMPTY="FLOW_IS_EMPTY";Re.FLOW_REQUEST_NOT_FOUND="FLOW_REQUEST_NOT_FOUND";Re.FLOW_ERROR="FLOW_ERROR";Re.TASK_GROUP_STARTED="TASK_GROUP_STARTED";Re.TASK_GROUP_FINISHED="TASK_GROUP_FINISHED";Re.REQUEST_COMPLETED="REQUEST_COMPLETED";Re.REQUEST_ERROR="REQUEST_ERROR";Re.REQUEST_ERROR_POLLING_CONDITIONS_FAILED="REQUEST_ERROR_POLLING_CONDITIONS_FAILED";Re.TERMINAL_POLLING_CONDITIONS_FAILED="TERMINAL_POLLING_CONDITIONS_FAILED";Re.REQUEST_POLLING_STARTED="REQUEST_POLLING_STARTED";Re.REQUEST_PRE_REQUEST_SCRIPT_ERROR="REQUEST_PRE_REQUEST_SCRIPT_ERROR";Re.REQUEST_POST_REQUEST_SCRIPT_ERROR="REQUEST_POST_REQUEST_SCRIPT_ERROR";Re.REQUEST_ASSERTIONS_STARTED="REQUEST_ASSERTIONS_STARTED";Re.REQUEST_ASSERTION_SCRIPT_ERROR="REQUEST_ASSERTION_SCRIPT_ERROR";Re.REQUEST_ASSERTION_COMPLETED="REQUEST_ASSERTION_COMPLETED";Re.REQUEST_ASSERTIONS_OVERALL_COMPLETE="REQUEST_ASSERTIONS_OVERALL_COMPLETE";Re.DONE="DONE";Re.SYSTEM_ERROR="SYSTEM_ERROR";Re.ERROR_INVALID_COMMAND="ERROR_INVALID_COMMAND"})(DS||={});var w5=zn.object({assertionType:zn.string().optional(),entityId:zn.string().optional(),entityName:zn.string().optional(),wasSuccessful:zn.boolean().optional(),statusText:zn.string().optional(),statusCode:zn.string().optional(),data:zn.record(zn.string(),zn.any()).optional()}).optional(),fHe=zn.object({source:zn.nativeEnum(GS).optional(),type:zn.nativeEnum(DS).optional(),detail:w5.optional(),createdAt:zn.string().optional()});class zM{observer;constructor(e){this.observer=e}notify(e,a,n){this.observer.notify({source:e,type:a,detail:n})}notifyCollectionStart(e){this.notify("COLLECTION","COLLECTION_RUN_STARTED",{entityId:e})}notifyCollectionEmpty(){this.notify("COLLECTION","COLLECTION_IS_EMPTY")}notifyCollectionFinished(){this.notify("RUNNER","COLLECTION_RUN_FINISHED")}notifyFlowStart(e,a,n){this.notify("FLOW","FLOW_STARTED",{entityId:e,entityName:a,data:{description:n}})}notifyFlowEmpty(e,a,n){this.notify("FLOW","FLOW_IS_EMPTY",{entityId:e,entityName:a,data:{description:n}})}notifyFlowFinished(e,a,n){this.notify("FLOW","FLOW_FINISHED",{entityId:e,entityName:a,data:{description:n}})}notifyFlowError(e,a,n){this.notify("FLOW","FLOW_ERROR",{entityId:e,entityName:a,wasSuccessful:!1,statusText:"error",data:{description:`Flow error: ${n}`}})}notifyTaskGroupStart(e,a,n){this.notify("FLOW","TASK_GROUP_STARTED",{entityId:e,entityName:a||"(Task Group)",data:{description:n}})}notifyTaskGroupFinished(e,a,n){this.notify("FLOW","TASK_GROUP_FINISHED",{entityId:e,entityName:a||"(Task Group)",data:{description:n}})}notifyRequestCompleted(e,a,n,i,r,h){this.notify("REQUEST","REQUEST_COMPLETED",{entityId:e,entityName:a,statusText:i,statusCode:n,wasSuccessful:!0,data:{headers:r,body:h}})}notifyRequestPollingStarted(e,a,n,i,r){this.notify("REQUEST","REQUEST_POLLING_STARTED",{entityId:e,entityName:a,data:{timeout:n,interval:i,successConditions:r}})}notifyPollingConditionsFailed(e,a,n,i,r,h,s){let S=s?"TERMINAL_POLLING_CONDITIONS_FAILED":"REQUEST_ERROR_POLLING_CONDITIONS_FAILED";this.notify("REQUEST",S,{entityId:e,entityName:a,statusText:i,statusCode:n,wasSuccessful:!1,data:{headers:r,body:h}})}notifyCallbackTaskMatched(e,a,n){this.notify("FLOW","CALLBACK_TASK_MATCHED_TO_EVENT",{entityId:e,entityName:a,wasSuccessful:!0,data:{body:n}})}notifyCallbackTaskTimeout(e,a){this.notify("RUNNER","TERMINAL_CALLBACK_TASK_TIMEOUT",{entityId:e,entityName:a,wasSuccessful:!0})}notifyFetchingEventsFromQueue(){this.notify("RUNNER","FETCHING_EVENTS_FROM_EVENT_QUEUE")}notifyEventsReceived(e,a,n,i){this.notify("RUNNER","EVENTS_RECEIVED_FROM_EVENT_QUEUE",{entityId:e,entityName:a,data:{events:n,nrOfEvents:i}})}notifyFetchingEventsFromKinesis(){this.notify("RUNNER","FETCHING_EVENTS_FROM_KINESIS")}notifyKinesisPolling(){this.notify("RUNNER","POLLING_KINESIS")}notifyKinesisEventMatched(e,a,n,i,r,h,s,S){this.notify("FLOW","KINESIS_EVENT_MATCHED_TO_RECORD",{entityId:e,entityName:a,wasSuccessful:!0,data:{streamName:n,shardId:i||"unknown",partitionKey:r,sequenceNumber:h,approximateArrivalTimestamp:s,data:S}})}notifyKinesisTaskTimeout(e,a){this.notify("RUNNER","TERMINAL_KINESIS_TASK_TIMEOUT",{entityId:e,entityName:a,wasSuccessful:!1,data:{description:"Timed out waiting for matching Kinesis records"}})}notifyAssertionCompleted(e,a,n,i,r,h,s,S,u,B=!1){let M=B?"CALLBACK_TASK_ASSERTION_COMPLETED":"REQUEST_ASSERTION_COMPLETED";this.notify("REQUEST",M,{entityId:e,entityName:a,wasSuccessful:n,assertionType:i,data:{taskId:r,taskName:h,expectedValue:i!=="exists"?s:"(to exist)",actualValue:S,path:u}})}}function HM(e,a){let n=a.match(/[^.[\]]+/g)||[],i=[];function r(h,s,S){if(s===n.length){i.push(S.join("."));return}let u=n[s];if(u==="*"){if(Array.isArray(h))h.forEach((B,M)=>{r(B,s+1,[...S,`${M}`])})}else if(/^\d+$/.test(u)){if(Array.isArray(h)&&h[parseInt(u,10)]!==void 0)r(h[parseInt(u,10)],s+1,[...S,`${u}`])}else if(h&&h.hasOwnProperty(u))r(h[u],s+1,[...S,u])}if(Array.isArray(e)&&n.length>0&&/^\d+$/.test(n[0]||"")){let h=parseInt(n[0]);if(e[h]!==void 0)r(e[h],1,[`${h}`])}else if(Array.isArray(e)&&n[0]==="*")e.forEach((h,s)=>{r(h,1,[`${s}`])});else r(e,0,[]);return i.length>0?i:void 0}function P5(e){let a=["fetch(","console.","process.","require(","child_process.","fs.","http.","https.","net.","os.","exec(","spawn(","localStorage"];for(let n of a)if(e.includes(n))throw new Error(`Script contains forbidden keyword: ${n}`)}async function UH(e,a,n,i=new Map){try{P5(e);let r={};return i.forEach((S,u)=>{r[u]=S}),await n(e,{data:a,variables:r})}catch(r){return console.error("Error executing user script:",r),{passed:!1,errorMessage:"Error executing user script: "+r}}}function jo(e,a,n){if(e===null||e===void 0||a===null||a===void 0)return!0;let i=typeof e,r=typeof a;if(!n)return!0;switch(n){case"string":return i==="string";case"number":return i==="number";case"boolean":return i==="boolean";default:return!0}}var Cr=(e,a)=>{if(a.rules.type==="equal"||a.rules.type==="notEqual"||a.rules.type==="greaterThan"||a.rules.type==="lessThan"||a.rules.type==="greaterThanOrEqual"||a.rules.type==="lessThanOrEqual"){if(a.rules.dataType==="string")return String(e);if(a.rules.dataType==="number")return Number(e);if(a.rules.dataType==="boolean")return e==="true"?!0:!1}if(a.rules.type==="length")return Number(e);return e};async function XH(e,a,n,i=new Map){let r=!1,h=void 0;switch(a.rules.type==="equal"&&a.rules.dataType,a.rules.type){case"equal":let s=Cr(a.rules.value,a);if(!jo(e,s,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e===s;break;case"notEqual":let S=Cr(a.rules.value,a);if(!jo(e,S,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e!==S;break;case"greaterThan":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let u=Cr(a.rules.value,a);if(!jo(e,u,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e>u;break;case"lessThan":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let B=Cr(a.rules.value,a);if(!jo(e,B,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e<B;break;case"greaterThanOrEqual":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let M=Cr(a.rules.value,a);if(!jo(e,M,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e>=M;break;case"lessThanOrEqual":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let C=Cr(a.rules.value,a);if(!jo(e,C,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e<=C;break;case"length":let H=Cr(a.rules.value,a);if(typeof e==="string"||Array.isArray(e)){r=e.length===H;break}r=!1;break;case"exists":r=e!==void 0;break;case"script":try{let R=await UH(a.rules.value,e,n,i);if(r=R.passed,h=R.errorMessage,R.setVariables){let W=R.setVariables instanceof Map?R.setVariables:new Map(Object.entries(R.setVariables));return{passed:r,error:h,setVariables:W}}}catch(R){r=!1,console.error("error",R),h="Error executing user script"}break;default:break}return{passed:r,error:h}}class bM{async executeAssertion(e,a,n,i=new Map){try{if(this.shouldSkipAssertion(e))return{assertionId:e.id,passed:!1,expectedValue:"N/A (skipped)",actualValue:"N/A (skipped)",assertion:e,error:"Assertion skipped due to invalid configuration"};let r=this.extractValueFromSource(e,a),h=await XH(r,e,n,i),s=e.rules.type!=="exists"?Cr(e.rules.value,e):"(to exist)",S=r;if(e.rules.type==="length"){if(typeof r==="string"||Array.isArray(r))S=r.length}if(e.rules.type==="script"&&h.error)S=h.error;return{assertionId:e.id,passed:h.passed,expectedValue:s,actualValue:S,assertion:e,error:h.error,setVariables:h.setVariables}}catch(r){return{assertionId:e.id,passed:!1,expectedValue:"N/A",actualValue:"N/A",assertion:e,error:r instanceof Error?r.message:String(r)}}}async executeAssertions(e,a,n,i=new Map){if(!e||e.length===0)return{overallPassed:!0,results:[]};let r=[],h=!0;for(let s of e){let S=await this.executeAssertion(s,a,n,i);if(r.push(S),!S.passed)h=!1}return{overallPassed:h,results:r}}extractValueFromSource(e,a){switch(e.source||"body"){case"body":return this.getValueByPath(a.data,e.path);case"headers":if(!a.headers)return;return a.headers[e.path];case"response":if(!a.response)return;return this.extractFromResponse(a.response,e.path);default:return this.getValueByPath(a.data,e.path)}}extractFromResponse(e,a){if(!e)return;switch(a.toLowerCase()){case"status":return e.status;case"statustext":return e.statusText;case"ok":return e.ok;default:return e[a]}}getValueByPath(e,a){if(!a)return e;let n=a.match(/[^.[\]]+|\[\d+\]/g)||[],i=e;for(let r of n){if(i===null||i===void 0)return;if(r.startsWith("[")&&r.endsWith("]")){let h=parseInt(r.slice(1,-1),10);if(Array.isArray(i)&&!isNaN(h))i=i[h];else return}else i=i[r]}return i}shouldSkipAssertion(e){if(e.rules.type==="script"||e.rules.type==="exists")return!1;if(e.rules.type==="length"){let n=e.rules.value;return n===void 0||n===null||n===""}let a=e.rules.value;if(!a)return!0;if(e.rules.dataType==="boolean")return a!=="true"&&a!=="false";return!1}}function GM(e,a){if(!a||!e)return[a];if(!a.includes("[*]"))return[a];let n=[],i=a.split("[*]");if(i.length!==2)return[a];let[r,h]=i,s=e;if(r){let S=r.split(".").filter(Boolean);for(let u of S)if(s&&typeof s==="object")s=s[u];else return[a]}if(Array.isArray(s))for(let S=0;S<s.length;S++){let u=`${r}[${S}]${h}`;n.push(u)}else return[a];return n}var Ls=async(userScript,context)=>{try{let userFunction=eval("("+userScript+")"),result=userFunction(context);if(typeof result==="boolean")return{passed:result};else if(typeof result==="object"&&result!==null){if(result.setVariables&&typeof result.setVariables==="object"&&!(result.setVariables instanceof Map))result.setVariables=new Map(Object.entries(result.setVariables));return result}else return{passed:!1,errorMessage:"Script must return boolean or valid result object"}}catch(e){return{passed:!1,errorMessage:e instanceof Error?e.message:String(e)}}};class DM{notificationService;variableService;sharedService=new bM;constructor(e,a){this.notificationService=e,this.variableService=a}getVariablesAsMap(){let e=new Map,a=this.variableService.getVariables();for(let n of a)e.set(n.key,n.value);return e}async assertObject(e,a,n,i,r,h=!1){let s=!1;for(let S of e){if(!S&&n.rules.type!=="script")continue;let u={...n,path:S},B={data:a},M=this.getVariablesAsMap(),C=await this.sharedService.executeAssertion(u,B,Ls,M);if(C.setVariables)C.setVariables.forEach((R,W)=>{this.variableService.setVariable(W,R)});let H=n.rules.type==="script";if(this.notificationService.notifyAssertionCompleted(n.id,n.name||"(Unnamed Assertion)",C.passed,n.rules.type,i,r,H?`${n.rules.name||"Script"} (script)`:C.expectedValue,H?C.error||(C.passed?"Passed":"Failed"):C.actualValue,n.path,h),C.passed){s=!0;break}}return s}async runHttpRequestAssertions(e,a,n){if(!e.assertions||e.assertions.length===0)return!0;let i=!0;for(let r of e.assertions){let h=r.source||"body";if(h==="body"||r.path.startsWith("body")){let s=h==="body"?r.path:r.path.split("body")[1];if(!s&&r.rules.type!=="script"){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path),i=!1;continue}let S=r.rules.type==="script"&&!s?"":s||"",u;if(typeof a==="object"&&S.includes("[*]"))u=GM(a,S);else if(typeof a==="object"){let M=HM(a,S);if(r.rules.type==="script"&&S==="")u=[""];else u=M?.filter(Boolean)||[S]}else u=[S];if(!u||u.length===0){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path),i=!1;continue}if(!await this.assertObject(u,a,r,e.id,e.name))i=!1}else{let s={data:a,headers:this.convertHeaders(n.headers),response:{status:n.status,statusText:n.statusText,ok:n.ok}},S=this.getVariablesAsMap(),u=await this.sharedService.executeAssertion(r,s,Ls,S);if(u.setVariables)u.setVariables.forEach((M,C)=>{this.variableService.setVariable(C,M)});let B=r.rules.type==="script";if(this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",u.passed,r.rules.type,e.id,e.name,B?`${r.rules.name||"Script"} (script)`:u.expectedValue,B?u.error||(u.passed?"Passed":"Failed"):u.actualValue,r.path),!u.passed)i=!1}}return i}async runCallbackAssertions(e,a,n){if(!e.assertions||e.assertions.length===0)return!0;let i=!0;for(let r of e.assertions){let h=r.source||"body";if(h==="body"||r.path.startsWith("body")){let s=h==="body"?r.path:r.path.split("body")[1];if(!s&&r.rules.type!=="script"){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path,!0),i=!1;continue}let S=r.rules.type==="script"&&!s?"":s||"",u;if(typeof a==="object"&&S.includes("[*]"))u=GM(a,S);else if(typeof a==="object"){let M=HM(a,S);if(r.rules.type==="script"&&S==="")u=[""];else u=M?.filter(Boolean)||[S]}else u=[S];if(!u||u.length===0){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path,!0),i=!1;continue}if(!await this.assertObject(u,a,r,e.id,e.name,!0))i=!1}else{let s={data:a,headers:n},S=this.getVariablesAsMap(),u=await this.sharedService.executeAssertion(r,s,Ls,S);if(u.setVariables)u.setVariables.forEach((M,C)=>{this.variableService.setVariable(C,M)});let B=r.rules.type==="script";if(this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",u.passed,r.rules.type,e.id,e.name,B?`${r.rules.name||"Script"} (script)`:u.expectedValue,B?u.error||(u.passed?"Passed":"Failed"):u.actualValue,r.path,!0),!u.passed)i=!1}}return i}async runKinesisAssertions(e,a){return this.runCallbackAssertions(e,a)}async checkPollingConditions(e,a){if(!e||e.length===0)return!0;let n={data:a};for(let i of e){let r=this.getVariablesAsMap(),h=await this.sharedService.executeAssertion(i,n,Ls,r);if(h.setVariables)h.setVariables.forEach((s,S)=>{this.variableService.setVariable(S,s)});if(!h.passed)return!1}return!0}convertHeaders(e){let a={};return e.forEach((n,i)=>{a[i]=n}),a}}var PS=Tl(KS(),1);var wS=Tl(ib(),1);class LM{constructor(){}parse(e,a){let n=e;return a.forEach((i)=>{i.value=String(i.value).replace(/\\/g,""),n=n.replace(`{{${i.key}}}`,i.value)}),n=n.replace(/{{util:random-uuid}}/g,crypto.randomUUID()),n=n.replace(/{{util:random-full-name}}/g,wS.default()),n=n.replace(/{{util:random-first-name}}/g,wS.default({first:!0,last:!1})),n=n.replace(/{{util:random-last-name}}/g,wS.default({first:!1,last:!0})),n}}class wM{environmentVariables;variableParser;constructor(e){this.environmentVariables=e||[],this.variableParser=new LM}parseString(e){if(!e)return"";return this.variableParser.parse(e,this.environmentVariables)}getVariables(){return this.environmentVariables}setVariable(e,a){if(!e)return;let n=this.environmentVariables.findIndex((i)=>i.key===e);if(n===-1)this.environmentVariables.push({id:crypto.randomUUID(),key:e,value:a,type:"variable"});else this.environmentVariables[n]={...this.environmentVariables[n],value:a}}async runScripts(e,a,n,i){if(!e)return;for(let r of e)if(r.type==="setVariableScriptUtil"){if(r.source==="utilRandomUuid"){let S=crypto.randomUUID();this.setVariable(r.variableName,S);continue}let h,s=this.parseString(r.path||"");switch(r.source){case"body":h=PS.default.get(a,s);break;case"headers":if(n)h=n[s];break;case"response":if(i)switch(s.toLowerCase()){case"status":h=i.status;break;case"statustext":h=i.statusText;break;case"ok":h=i.ok;break;default:h=PS.default.get(i,s);break}break;default:h=PS.default.get(a,s);break}this.setVariable(r.variableName,h)}}}class PM{variableService;assertionService;notificationService;constructor(e,a,n){this.variableService=e,this.assertionService=a,this.notificationService=n}async sendRequest(e){let a=this.variableService.parseString(e.url),n="";if(e.body)n=this.variableService.parseString(e.body);if(!a.startsWith("http://")&&!a.startsWith("https://"))return new Response(JSON.stringify({error:"Invalid URL"}),{status:400,statusText:"Bad Request",headers:new Headers({"Content-Type":"application/json"})});try{let i;try{let u={method:e.method},B=new Headers;if(B.append("Content-Type","application/json"),e.headers&&typeof e.headers==="object")Object.entries(e.headers).forEach(([M,C])=>{if(M&&C&&typeof C==="string")B.append(M,C)});if(u.headers=B,!["GET","HEAD"].includes(e.method)&&n)u.body=n;i=await fetch(a,u)}catch(u){console.error("Fetch error:",u),i=new Response(JSON.stringify({message:"This is a mock response for testing",url:a}),{status:200,statusText:"OK",headers:new Headers({"Content-Type":"application/json"})})}let r="{}",h=new Headers({"Content-Type":"application/json"}),s=200,S="OK";if(i){if(s=i.status||200,S=i.statusText||"OK",i.headers)h=i.headers;try{if(typeof i.clone==="function"){let u=i.clone();if(typeof u.text==="function")r=await u.text()}}catch(u){console.error("Error cloning or reading response:",u),r=JSON.stringify({message:"Error reading response"})}}return new Response(r,{status:s,statusText:S,headers:h})}catch(i){return console.error("Error in sendRequest:",i),new Response(JSON.stringify({error:"Request failed"}),{status:500,statusText:"Error",headers:new Headers({"Content-Type":"application/json"})})}}async handleDelay(e){if(e)await new Promise((a)=>setTimeout(a,e))}async handlePolling(e,a,n){let i=e.config?.polling;if(!i?.enabled)return a;this.notificationService.notifyRequestPollingStarted(e.id,e.name||"Unnamed Request",i.timeoutMilliseconds,i.intervalMilliseconds,i.successConditions);let r=1,h=!1,s=a.clone();if(i.successConditions?.length)h=await this.assertionService.checkPollingConditions(i.successConditions,s);let S=n+(i.timeoutMilliseconds??1e4);while(!h&&new Date().getTime()<S)if(await new Promise((u)=>setTimeout(u,i.intervalMilliseconds??1000)),r++,s=await this.sendRequest(e),i.successConditions?.length)h=await this.assertionService.checkPollingConditions(i.successConditions,s);else{h=!0;break}if(!h)this.notificationService.notifyPollingConditionsFailed(e.id,e.name||"Unnamed Request",String(s.status),s.statusText||"No status text",JSON.stringify(s.headers),s.body,i.stopOnFailure||!1);return s}async runAssertions(e,a){let n={};try{let r=a.clone(),h=r.headers.get("Content-Type");if(h&&h.includes("application/json"))try{let s=await r.text();n=JSON.parse(s)}catch(s){n={textContent:await r.text()}}else n={textContent:await r.text()}}catch(r){console.error("Error parsing response body:",r),n={error:"Failed to parse response body"}}let i={id:e.id,name:e.name||"Unnamed Request",assertions:e.assertions};return this.assertionService.runHttpRequestAssertions(i,n,a)}async handleTask(e){await this.handleDelay(e.config?.delay);let a=new Date().getTime(),n=await this.sendRequest(e),i=n;if(e.config?.polling?.enabled)i=await this.handlePolling(e,n,a);let r=i.clone(),h=i.clone(),s=i.clone(),S=await r.text(),u={};r.headers.forEach((M,C)=>{u[C]=M}),this.notificationService.notifyRequestCompleted(e.id,e.name||"Unnamed Request",String(i.status),i.statusText,JSON.stringify(u),{body:S});let B=await s.text();if(this.variableService.setVariable(e.id,B),e.assertions)await this.runAssertions(e,h);if(e.postRequestScripts)try{let M;try{M=JSON.parse(S)}catch(H){M=S}let C=i.clone();await this.variableService.runScripts(e.postRequestScripts,M,u,C)}catch(M){console.error("Error running post request scripts:",M)}return i}}var Rs=Tl(KS(),1);import{Buffer as V5}from"node:buffer";function rb(e,a,n){if(n==="JSON"){if(a==="BASE64")return JSON.parse(V5.from(e,"base64").toString("utf-8"));return JSON.parse(e)}else return e}class RS{collectionId;flowId;flowName;eventQueueFetcher;variableService;assertionService;notificationService;receivedEvents=[];collectionRunStartTime;environment;constructor(e,a,n,i,r,h,s,S,u){this.collectionId=e,this.flowId=a,this.flowName=n,this.eventQueueFetcher=i,this.variableService=r,this.assertionService=h,this.notificationService=s,this.collectionRunStartTime=S,this.environment=u}async fetchEvents(){this.notificationService.notifyFetchingEventsFromQueue();let e=await this.eventQueueFetcher.fetch(this.collectionId,this.environment,this.collectionRunStartTime);if(e===void 0)return;this.receivedEvents.push(...e),this.notificationService.notifyEventsReceived(this.flowId,this.flowName,e,e.length)}async processCallbackTask(e){let a=this.receivedEvents.find((r)=>{let h=rb(r.body,e.selectBodyEncoding,e.bodyFormat);return e.matchOnFields.reduce((s,S)=>{let u;if(S.source==="body")u=Rs.default.get(h,S.path);else if(S.source==="headers"){let M={};if(r.headers)for(let C of r.headers)M[C.key]=C.value;u=Rs.default.get(M,S.path)}else if(S.source==="response")u=Rs.default.get(r,S.path);else u=Rs.default.get(h,S.path);let B;if(S.rules.type!=="exists")B=u===S.rules.value;else B=u!==void 0;return B&&s},!0)});if(!a)return!1;this.receivedEvents=this.receivedEvents.filter((r)=>r.internalId!==a.internalId),e.taskComplete=!0,this.notificationService.notifyCallbackTaskMatched(e.id,e.name||"Unnamed Callback Task",a.body);let n=rb(a.body,e.selectBodyEncoding,e.bodyFormat),i={};if(a.headers)for(let r of a.headers)i[r.key]=r.value;if(await this.variableService.runScripts(e.postCallbackScripts,n,i),e.assertions&&e.assertions.length>0){let r={id:e.id,name:e.name||"Unnamed Callback Task",assertions:e.assertions},h={};if(a.headers)for(let s of a.headers)h[s.key]=s.value;await this.assertionService.runCallbackAssertions(r,n,h)}return!0}async handleTask(e){let{callbackTasks:a,taskGroup:n}=e,i=new Date().getTime(),r=a.length,h=20000;while(new Date().getTime()-i<h&&r>0){await this.fetchEvents();for(let s of a){if(s.taskComplete)continue;if(await this.processCallbackTask(s))r--}if(r===0)break;await new Promise((s)=>setTimeout(s,2000))}if(r>0)this.notificationService.notifyCallbackTaskTimeout(n.id,n.name||"Unnamed Task Group")}}var RM=Tl(KS(),1);import{Buffer as lb}from"node:buffer";class WS{kinesisEventFetcher;variableService;assertionService;notificationService;collectionId;flowId;flowName;collectionRunStartTime;environmentName;constructor(e,a,n,i,r,h,s,S,u){this.collectionId=e,this.flowId=a,this.flowName=n,this.kinesisEventFetcher=i,this.variableService=r,this.assertionService=h,this.notificationService=s,this.collectionRunStartTime=S,this.environmentName=u}async processKinesisRecord(e,a){let n={};try{if(a.Data)if(e.selectBodyEncoding==="BASE64")n=JSON.parse(lb.from(a.Data).toString("base64"));else n=JSON.parse(lb.from(a.Data).toString("utf-8"))}catch(h){return console.error(`Error parsing record data: ${h}`),!1}let i=[];if(!e.matchOnFields.reduce((h,s)=>{let S;if(s.source==="body"||s.source==="response"||!s.source)S=RM.default.get(n,s.path);else S=RM.default.get(n,s.path);let u=!1;if(s.rules.type!=="exists")u=S===s.rules.value;else u=S!==void 0;return i.push({path:s.path,matched:u}),u&&h},!0))return!1;if(e.taskComplete=!0,this.notificationService.notifyKinesisEventMatched(e.id,e.name||"Unnamed Kinesis Task",e.streamName,e.shardId||"unknown",a.PartitionKey,a.SequenceNumber,a.ApproximateArrivalTimestamp?.toString(),n),e.postEventScripts&&e.postEventScripts.length>0)await this.variableService.runScripts(e.postEventScripts,n);if(e.assertions&&e.assertions.length>0){let h={id:e.id,name:e.name||"Unnamed Kinesis Task",assertions:e.assertions};await this.assertionService.runKinesisAssertions(h,n)}return!0}async handleTask(e){let{kinesisTasks:a,taskGroup:n}=e;this.notificationService.notifyFetchingEventsFromKinesis();let i=new Date().getTime(),r=a.length,h=a[0]?.config?.timeoutSeconds?a[0].config.timeoutSeconds*1000:20000;while(new Date().getTime()-i<h&&r>0){for(let s of a){if(s.taskComplete)continue;try{let S=s.config?.region||"us-east-1",u=await this.kinesisEventFetcher.fetchRecords(s.streamName,s.shardId,S,s.config?.awsAuthId,100);if(!u||u.length===0)continue;for(let B of u)if(await this.processKinesisRecord(s,B)){r--;break}}catch(S){console.error(`Error processing Kinesis stream: ${S}`),this.notificationService.notifyFlowError(s.id,s.name||"Unnamed Kinesis Task",`Error processing Kinesis stream: ${S}`),s.taskComplete=!0,r--}await new Promise((S)=>setTimeout(S,100))}if(r===0)break;this.notificationService.notifyKinesisPolling(),await new Promise((s)=>setTimeout(s,3000))}if(r>0)this.notificationService.notifyKinesisTaskTimeout(n.id,n.name||"Unnamed Task Group")}}var Qh=Tl(JN(),1);class WB{static getClient(e,a){let n={region:e};if(a||process.env.LOCAL_AWS==="true")n.endpoint="http://localhost:4566",n.credentials={accessKeyId:"test",secretAccessKey:"test"};return new Qh.SQSClient(n)}static async sendMessage(e,a,n,i){if(!a||a.trim()==="")throw new Error("Queue name is required and cannot be empty");let r=new Qh.GetQueueUrlCommand({QueueName:a}),s={QueueUrl:(await e.send(r)).QueueUrl,MessageBody:n};if(i?.messageGroupId)s.MessageGroupId=i.messageGroupId;if(i?.messageDeduplicationId)s.MessageDeduplicationId=i.messageDeduplicationId;if(i?.delaySeconds!==void 0)s.DelaySeconds=i.delaySeconds;try{let S=new Qh.SendMessageCommand(s);return(await e.send(S)).MessageId||""}catch(S){throw console.error("Error sending SQS message:",S),S}}}import Bge from"node:process";class mm{variableService;assertionService;notificationService;useLocalStack;constructor(e,a,n){this.variableService=e,this.assertionService=a,this.notificationService=n,this.useLocalStack=Bge.env.LOCAL_AWS==="true"}async handleTask(e){let{sqsTasks:a}=e;for(let n of a)await this.handleSingleSqsTask(n)}async handleSingleSqsTask(e){let{id:a,name:n,queueName:i,region:r,messageGroupId:h,messageDeduplicationId:s,delaySeconds:S,body:u}=e;try{let B=this.variableService.parseString(i),M=this.variableService.parseString(u);if(!B||B.trim()==="")throw new Error("Queue name is required and cannot be empty after variable resolution");let C=typeof B==="string"&&B.endsWith(".fifo"),H=Date.now(),R=await this.sendWithSqsClient(r||"us-east-1",B,M,{messageGroupId:C?h||"default":void 0,messageDeduplicationId:C?s:void 0,delaySeconds:S}),A=Date.now()-H,Y={messageId:R,queueName:B,region:r||"us-east-1",isFifo:C,success:!0,responseTime:A};this.notificationService.notify("REQUEST","REQUEST_COMPLETED",{entityId:a,entityName:n||"(Unnamed SQS Task)",statusCode:"200",statusText:"OK",data:{body:JSON.stringify(Y),headers:JSON.stringify({"Content-Type":"application/json"})}})}catch(B){console.error(`Error sending SQS message: ${B}`);let M={error:String(B),queueName:i,region:r||"us-east-1",success:!1};this.notificationService.notify("REQUEST","REQUEST_COMPLETED",{entityId:a,entityName:n||"(Unnamed SQS Task)",statusCode:"500",statusText:"Error",data:{body:JSON.stringify(M),headers:JSON.stringify({"Content-Type":"application/json"})}}),this.notificationService.notifyFlowError(a,n||"(Unnamed SQS Task)",`Error sending SQS message: ${B}`)}}async sendWithSqsClient(e,a,n,i){try{let r=WB.getClient(e,this.useLocalStack),h={messageGroupId:i?.messageGroupId?this.variableService.parseString(i.messageGroupId):void 0,messageDeduplicationId:i?.messageDeduplicationId?this.variableService.parseString(i.messageDeduplicationId):void 0,delaySeconds:i?.delaySeconds};return await WB.sendMessage(r,a,n,h)}catch(r){throw console.error(`Error sending SQS message: ${r}`),r}}}function NN(e){return e.type==="request"}function EN(e){return e.type==="sqs-dispatch"}function vN(e){return e.type==="kinesis-event"}class Cm{collection;environmentName;currentFlow;eventQueueFetcher;kinesisEventFetcher;collectionRunStarted;collectionRunStartedTimestamp;notificationService;assertionService;variableService;requestHandler;callbackHandler;kinesisHandler;sqsHandler;get environmentVariables(){return this.variableService.getVariables()}constructor(e,a,n,i,r){this.collection=e,this.environmentName=a,this.eventQueueFetcher=n,this.kinesisEventFetcher=i,this.collectionRunStarted=new Date,this.collectionRunStartedTimestamp=this.collectionRunStarted.getTime();let h=e.environments?.find((S)=>S.name===this.environmentName);if(!h){let S=e.environments?.map((u)=>u.name)||[];throw new Error(`Environment "${this.environmentName}" not found in collection. Available environments: ${S.join(", ")}`)}let s=h?.variables||[];this.notificationService=new zM(r),this.variableService=new wM(s),this.assertionService=new DM(this.notificationService,this.variableService),this.requestHandler=new PM(this.variableService,this.assertionService,this.notificationService),this.sqsHandler=new mm(this.variableService,this.assertionService,this.notificationService),this.callbackHandler=new RS(this.collection.id,"","",this.eventQueueFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName||""),this.kinesisHandler=new WS(this.collection.id,"","",this.kinesisEventFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName)}async run(){return await this.runner()}async runSingleFlow(e){return this.collection.flows=this.collection.flows.filter((a)=>a.id===e),await this.runner()}async runner(){if(this.collection.flows.length===0)return this.notificationService.notifyCollectionEmpty(),this.collection;this.notificationService.notifyCollectionStart(this.collection.id),this.collection.flows=this.collection.flows.filter((e)=>e.active);for(let e of this.collection.flows)await this.handleFlowRun(e);return this.notificationService.notifyCollectionFinished(),this.collection}async handleFlowRun(e){let a=e.id,n=e.name||"(Unnamed Flow)",i=e.description;if(this.notificationService.notifyFlowStart(a,n,i),this.currentFlow=e,e.tasks.length===0){this.notificationService.notifyFlowEmpty(a,n,i);return}this.callbackHandler=new RS(this.collection.id,a,n,this.eventQueueFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName||""),this.kinesisHandler=new WS(this.collection.id,a,n,this.kinesisEventFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName);for(let r of e.tasks)if(r.isGroup)await this.handleTaskGroup(r);else await this.handleTaskReference(r);this.notificationService.notifyFlowFinished(a,n,i)}async handleTaskGroup(e){let a=e.id,n=e.name||"(Task Group)";this.notificationService.notifyTaskGroupStart(a,n,e.description);let i=[],r=[],h=[],s=[];for(let S of e.tasks){let u=this.collection.tasks.find((B)=>S.refId===B.id);if(!u){let B=this.currentFlow?.id||"",M=this.currentFlow?.name||"(Unnamed Flow)";this.notificationService.notifyFlowError(B,M,"Task not found in the collection");continue}if(u.type==="request"&&NN(u))i.push(this.requestHandler.handleTask(u));else if(u.type==="sqs-dispatch"&&EN(u))s.push(u);else if(u.type==="callback")r.push(u);else if(u.type==="kinesis-event"&&vN(u))h.push(u)}if(await Promise.all(i),s.length>0)await this.sqsHandler.handleTask({sqsTasks:s,taskGroup:e});if(r.length>0)await this.callbackHandler.handleTask({callbackTasks:r,taskGroup:e});if(h.length>0)await this.kinesisHandler.handleTask({kinesisTasks:h,taskGroup:e});this.notificationService.notifyTaskGroupFinished(a,n,e.description)}async handleTaskReference(e){let a=this.collection.tasks.find((i)=>e.refId===i.id);if(!a){let i=this.currentFlow?.id||"",r=this.currentFlow?.name||"(Unnamed Flow)";this.notificationService.notifyFlowError(i,r,"Task not found in the collection");return}let n={id:a.id,name:a.name||"(Single Task)",description:a.description};if(a.type==="request"&&NN(a))await this.requestHandler.handleTask(a);else if(a.type==="sqs-dispatch"&&EN(a))await this.sqsHandler.handleTask({sqsTasks:[a],taskGroup:n});else if(a.type==="callback")await this.callbackHandler.handleTask({callbackTasks:[a],taskGroup:n});else if(a.type==="kinesis-event"&&vN(a))await this.kinesisHandler.handleTask({kinesisTasks:[a],taskGroup:n})}}class zm{apiBaseUrl;receivedEvents=[];constructor(e){this.apiBaseUrl=e}fetch=async(e,a,n)=>{try{let i=new URL(`${this.apiBaseUrl}/callback/get-events`);i.searchParams.set("collectionId",e),i.searchParams.set("environment",a),i.searchParams.set("cutoffTimestamp",n.toString());let r=await fetch(i.toString(),{method:"GET",headers:{"Content-Type":"application/json"}});if(!r.ok){console.error(`Failed to fetch events: ${r.status} ${r.statusText}`);return}let h=await r.json();if(!h.success){console.error(`API returned error: ${h.error}`);return}let s=h.events||[];if(s.length===0)return;return this.receivedEvents.push(...s),console.log(`Retrieved ${s.length} new events for ${e}_${a} after timestamp ${n}`),s}catch(i){console.error("Error fetching events from API:",i);return}}}var Cl=Tl(E1(),1),YO=Tl(EO(),1);import vO from"node:process";class nC{processedSequenceNumbers=new Set;shardIterators=new Map;getClient(e){let a={region:e};if(vO.env.LOCAL_AWS==="true")a.endpoint="http://localhost:4566",a.credentials={accessKeyId:"test",secretAccessKey:"test"},a.requestHandler=new YO.NodeHttpHandler({httpAgent:void 0,httpsAgent:void 0,connectionTimeout:5000,socketTimeout:5000});return new Cl.KinesisClient(a)}async getAllShardIds(e,a){try{let n=await e.send(new Cl.ListShardsCommand({StreamName:a}));if(n.Shards&&n.Shards.length>0)return n.Shards.map((r)=>r.ShardId).filter((r)=>r!==void 0);return console.error(`No shards found for stream: ${a}`),[]}catch(n){throw console.error(`Error listing shards for stream ${a}:`,n),n}}async fetchRecordsFromShard(e,a,n,i,r){try{let h=`${a}:${n}`,s=this.shardIterators.get(h);if(!s){let M=await e.send(new Cl.GetShardIteratorCommand({StreamName:a,ShardId:n,ShardIteratorType:"LATEST"}));if(!M.ShardIterator)return console.error(`Failed to get shard iterator for stream: ${a}, shard: ${n}`),[];s=M.ShardIterator}let S=await e.send(new Cl.GetRecordsCommand({ShardIterator:s,Limit:r}));if(S.NextShardIterator)this.shardIterators.set(h,S.NextShardIterator);else this.shardIterators.delete(h);return(S.Records||[]).filter((M)=>{if(!M.SequenceNumber)return!0;let C=!this.processedSequenceNumbers.has(M.SequenceNumber);if(C)this.processedSequenceNumbers.add(M.SequenceNumber);return C})}catch(h){return console.error(`Error fetching records from shard ${n}:`,h),[]}}async fetchRecords(e,a,n,i,r=100){let h=this.getClient(n),s=vO.env.LOCAL_AWS==="true";try{let S=[];if(a)S=[a];else S=await this.getAllShardIds(h,e);if(S.length===0)return;let u=S.map((C)=>this.fetchRecordsFromShard(h,e,C,s,Math.floor(r/S.length)||1));return(await Promise.all(u)).flat()}catch(S){throw console.error(`Error fetching records from Kinesis stream ${e}:`,S),S}}}var OO=(e=0)=>(a)=>`\x1B[${a+e}m`,QO=(e=0)=>(a)=>`\x1B[${38+e};5;${a}m`,$O=(e=0)=>(a,n,i)=>`\x1B[${38+e};2;${a};${n};${i}m`,Pa={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]}},bRe=Object.keys(Pa.modifier),dHe=Object.keys(Pa.color),yHe=Object.keys(Pa.bgColor),GRe=[...dHe,...yHe];function mHe(){let e=new Map;for(let[a,n]of Object.entries(Pa)){for(let[i,r]of Object.entries(n))Pa[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=Pa[i],e.set(r[0],r[1]);Object.defineProperty(Pa,a,{value:n,enumerable:!1})}return Object.defineProperty(Pa,"codes",{value:e,enumerable:!1}),Pa.color.close="\x1B[39m",Pa.bgColor.close="\x1B[49m",Pa.color.ansi=OO(),Pa.color.ansi256=QO(),Pa.color.ansi16m=$O(),Pa.bgColor.ansi=OO(10),Pa.bgColor.ansi256=QO(10),Pa.bgColor.ansi16m=$O(10),Object.defineProperties(Pa,{rgbToAnsi256:{value(a,n,i){if(a===n&&n===i){if(a<8)return 16;if(a>248)return 231;return Math.round((a-8)/247*24)+232}return 16+36*Math.round(a/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(a){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(a.toString(16));if(!n)return[0,0,0];let[i]=n;if(i.length===3)i=[...i].map((h)=>h+h).join("");let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:(a)=>Pa.rgbToAnsi256(...Pa.hexToRgb(a)),enumerable:!1},ansi256ToAnsi:{value(a){if(a<8)return 30+a;if(a<16)return 90+(a-8);let n,i,r;if(a>=232)n=((a-232)*10+8)/255,i=n,r=n;else{a-=16;let S=a%36;n=Math.floor(a/36)/5,i=Math.floor(S/6)/5,r=S%6/5}let h=Math.max(n,i,r)*2;if(h===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));if(h===2)s+=60;return s},enumerable:!1},rgbToAnsi:{value:(a,n,i)=>Pa.ansi256ToAnsi(Pa.rgbToAnsi256(a,n,i)),enumerable:!1},hexToAnsi:{value:(a)=>Pa.ansi256ToAnsi(Pa.hexToAnsi256(a)),enumerable:!1}}),Pa}var CHe=mHe(),fi=CHe;import iC from"node:process";import zHe from"node:os";import qO from"node:tty";function Ci(e,a=globalThis.Deno?globalThis.Deno.args:iC.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=a.indexOf(n+e),r=a.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:Ea}=iC,IB;if(Ci("no-color")||Ci("no-colors")||Ci("color=false")||Ci("color=never"))IB=0;else if(Ci("color")||Ci("colors")||Ci("color=true")||Ci("color=always"))IB=1;function HHe(){if("FORCE_COLOR"in Ea){if(Ea.FORCE_COLOR==="true")return 1;if(Ea.FORCE_COLOR==="false")return 0;return Ea.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Ea.FORCE_COLOR,10),3)}}function bHe(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function GHe(e,{streamIsTTY:a,sniffFlags:n=!0}={}){let i=HHe();if(i!==void 0)IB=i;let r=n?IB:i;if(r===0)return 0;if(n){if(Ci("color=16m")||Ci("color=full")||Ci("color=truecolor"))return 3;if(Ci("color=256"))return 2}if("TF_BUILD"in Ea&&"AGENT_NAME"in Ea)return 1;if(e&&!a&&r===void 0)return 0;let h=r||0;if(Ea.TERM==="dumb")return h;if(iC.platform==="win32"){let s=zHe.release().split(".");if(Number(s[0])>=10&&Number(s[2])>=10586)return Number(s[2])>=14931?3:2;return 1}if("CI"in Ea){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((s)=>(s in Ea)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((s)=>(s in Ea))||Ea.CI_NAME==="codeship")return 1;return h}if("TEAMCITY_VERSION"in Ea)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ea.TEAMCITY_VERSION)?1:0;if(Ea.COLORTERM==="truecolor")return 3;if(Ea.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Ea){let s=Number.parseInt((Ea.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ea.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Ea.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ea.TERM))return 1;if("COLORTERM"in Ea)return 1;return h}function ZO(e,a={}){let n=GHe(e,{streamIsTTY:e&&e.isTTY,...a});return bHe(n)}var DHe={stdout:ZO({isTTY:qO.isatty(1)}),stderr:ZO({isTTY:qO.isatty(2)})},UO=DHe;function XO(e,a,n){let i=e.indexOf(a);if(i===-1)return e;let r=a.length,h=0,s="";do s+=e.slice(h,i)+a+n,h=i+r,i=e.indexOf(a,h);while(i!==-1);return s+=e.slice(h),s}function jO(e,a,n,i){let r=0,h="";do{let s=e[i-1]==="\r";h+=e.slice(r,s?i-1:i)+a+(s?`\r
|
|
76
|
+
`),Of=!0}throw new io.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:e.logger,tryNextLink:!0})}return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),Sm.fromEnv(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:a,ssoAccountId:n,ssoRegion:i,ssoRoleName:r,ssoSession:h}=e;if(!a&&!n&&!i&&!r&&!h)throw new io.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:e.logger});let{fromSSO:s}=await Promise.resolve().then(()=>Eh(My()));return s(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:a}=await Promise.resolve().then(()=>Eh(vf()));return a(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:a}=await Promise.resolve().then(()=>Eh(im()));return a(e)()},async()=>{e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:a}=await Promise.resolve().then(()=>Eh(hm()));return a(e)()},async()=>{return e.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await BBe(e))()},async()=>{throw new io.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:e.logger})}),Zf,qf),"defaultProvider"),qf=LB((e)=>e?.expiration!==void 0,"credentialsWillNeedRefresh"),Zf=LB((e)=>e?.expiration!==void 0&&e.expiration.getTime()-Date.now()<300000,"credentialsTreatedAsExpired")});var SJ=G((sJ)=>{Object.defineProperty(sJ,"__esModule",{value:!0});sJ.ruleSet=void 0;var rJ="required",di="fn",yi="argv",Oh="ref",Xf=!0,jf="isSet",Mk="booleanEquals",vh="error",Yh="endpoint",fr="tree",Bm="PartitionResult",cm="getAttr",If={[rJ]:!1,type:"String"},xf={[rJ]:!0,default:!1,type:"Boolean"},_f={[Oh]:"Endpoint"},lJ={[di]:Mk,[yi]:[{[Oh]:"UseFIPS"},!0]},oJ={[di]:Mk,[yi]:[{[Oh]:"UseDualStack"},!0]},gi={},pf={[di]:cm,[yi]:[{[Oh]:Bm},"supportsFIPS"]},hJ={[Oh]:Bm},eJ={[di]:Mk,[yi]:[!0,{[di]:cm,[yi]:[hJ,"supportsDualStack"]}]},aJ=[lJ],nJ=[oJ],iJ=[{[Oh]:"Region"}],MBe={version:"1.0",parameters:{Region:If,UseDualStack:xf,UseFIPS:xf,Endpoint:If},rules:[{conditions:[{[di]:jf,[yi]:[_f]}],rules:[{conditions:aJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:vh},{conditions:nJ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:vh},{endpoint:{url:_f,properties:gi,headers:gi},type:Yh}],type:fr},{conditions:[{[di]:jf,[yi]:iJ}],rules:[{conditions:[{[di]:"aws.partition",[yi]:iJ,assign:Bm}],rules:[{conditions:[lJ,oJ],rules:[{conditions:[{[di]:Mk,[yi]:[Xf,pf]},eJ],rules:[{endpoint:{url:"https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:vh}],type:fr},{conditions:aJ,rules:[{conditions:[{[di]:Mk,[yi]:[pf,Xf]}],rules:[{conditions:[{[di]:"stringEquals",[yi]:[{[di]:cm,[yi]:[hJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sqs.{Region}.amazonaws.com",properties:gi,headers:gi},type:Yh},{endpoint:{url:"https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr},{error:"FIPS is enabled but this partition does not support FIPS",type:vh}],type:fr},{conditions:nJ,rules:[{conditions:[eJ],rules:[{endpoint:{url:"https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr},{error:"DualStack is enabled but this partition does not support DualStack",type:vh}],type:fr},{endpoint:{url:"https://sqs.{Region}.{PartitionResult#dnsSuffix}",properties:gi,headers:gi},type:Yh}],type:fr}],type:fr},{error:"Invalid Configuration: Missing Region",type:vh}]};sJ.ruleSet=MBe});var cJ=G((uJ)=>{Object.defineProperty(uJ,"__esModule",{value:!0});uJ.defaultEndpointResolver=void 0;var gBe=$l(),Mm=Ql(),dBe=SJ(),yBe=new Mm.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),mBe=(e,a={})=>{return yBe.get(e,()=>Mm.resolveEndpoint(dBe.ruleSet,{endpointParams:e,logger:a.logger}))};uJ.defaultEndpointResolver=mBe;Mm.customEndpointFunctions.aws=gBe.awsEndpointFunctions});var mJ=G((dJ)=>{Object.defineProperty(dJ,"__esModule",{value:!0});dJ.getRuntimeConfig=void 0;var CBe=Na(),zBe=we(),HBe=Dr(),MJ=Mn(),gJ=Qa(),bBe=fd(),GBe=cJ(),DBe=(e)=>{return{apiVersion:"2012-11-05",base64Decoder:e?.base64Decoder??MJ.fromBase64,base64Encoder:e?.base64Encoder??MJ.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??GBe.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??bBe.defaultSQSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(a)=>a.getIdentityProvider("aws.auth#sigv4"),signer:new CBe.AwsSdkSigV4Signer}],logger:e?.logger??new zBe.NoOpLogger,serviceId:e?.serviceId??"SQS",urlParser:e?.urlParser??HBe.parseUrl,utf8Decoder:e?.utf8Decoder??gJ.fromUtf8,utf8Encoder:e?.utf8Encoder??gJ.toUtf8}};dJ.getRuntimeConfig=DBe});var LJ=G((DJ)=>{Object.defineProperty(DJ,"__esModule",{value:!0});DJ.getRuntimeConfig=void 0;var KBe=an(),LBe=KBe.__importDefault(at()),CJ=Na(),wBe=um(),zJ=yh(),wB=li(),HJ=mh(),bJ=Ti(),ro=Lr(),GJ=ll(),PBe=Ch(),RBe=_l(),WBe=mJ(),tBe=we(),FBe=Gh(),ABe=we(),TBe=(e)=>{ABe.emitWarningIfUnsupportedVersion(process.version);let a=FBe.resolveDefaultsModeConfig(e),n=()=>a().then(tBe.loadConfigsForDefaultMode),i=WBe.getRuntimeConfig(e);CJ.emitWarningIfUnsupportedVersion(process.version);let r={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:a,authSchemePreference:e?.authSchemePreference??ro.loadConfig(CJ.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,r),bodyLengthChecker:e?.bodyLengthChecker??PBe.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??wBe.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??zJ.createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:LBe.default.version}),maxAttempts:e?.maxAttempts??ro.loadConfig(bJ.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),md5:e?.md5??HJ.Hash.bind(null,"md5"),region:e?.region??ro.loadConfig(wB.NODE_REGION_CONFIG_OPTIONS,{...wB.NODE_REGION_CONFIG_FILE_OPTIONS,...r}),requestHandler:GJ.NodeHttpHandler.create(e?.requestHandler??n),retryMode:e?.retryMode??ro.loadConfig({...bJ.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||RBe.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??HJ.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??GJ.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??ro.loadConfig(wB.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,r),useFipsEndpoint:e?.useFipsEndpoint??ro.loadConfig(wB.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,r),userAgentAppId:e?.userAgentAppId??ro.loadConfig(zJ.NODE_APP_ID_CONFIG_OPTIONS,r)}};DJ.getRuntimeConfig=TBe});var JN=G((nLe,fN)=>{var{defineProperty:PB,getOwnPropertyDescriptor:VBe,getOwnPropertyNames:fBe}=Object,JBe=Object.prototype.hasOwnProperty,w=(e,a)=>PB(e,"name",{value:a,configurable:!0}),NBe=(e,a)=>{for(var n in a)PB(e,n,{get:a[n],enumerable:!0})},EBe=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of fBe(a))if(!JBe.call(e,r)&&r!==n)PB(e,r,{get:()=>a[r],enumerable:!(i=VBe(a,r))||i.enumerable})}return e},vBe=(e)=>EBe(PB({},"__esModule",{value:!0}),e),FJ={};NBe(FJ,{AddPermissionCommand:()=>MN,BatchEntryIdsNotDistinct:()=>OJ,BatchRequestTooLong:()=>oN,CancelMessageMoveTaskCommand:()=>gN,ChangeMessageVisibilityBatchCommand:()=>dN,ChangeMessageVisibilityCommand:()=>yN,CreateQueueCommand:()=>mN,DeleteMessageBatchCommand:()=>CN,DeleteMessageCommand:()=>zN,DeleteQueueCommand:()=>HN,EmptyBatchRequest:()=>QJ,GetQueueAttributesCommand:()=>bN,GetQueueUrlCommand:()=>GN,InvalidAddress:()=>AJ,InvalidAttributeName:()=>ZJ,InvalidAttributeValue:()=>UJ,InvalidBatchEntryId:()=>$J,InvalidIdFormat:()=>IJ,InvalidMessageContents:()=>lN,InvalidSecurity:()=>TJ,KmsAccessDenied:()=>_J,KmsDisabled:()=>pJ,KmsInvalidKeyUsage:()=>eN,KmsInvalidState:()=>aN,KmsNotFound:()=>nN,KmsOptInRequired:()=>iN,KmsThrottled:()=>rN,ListDeadLetterSourceQueuesCommand:()=>dm,ListMessageMoveTasksCommand:()=>DN,ListQueueTagsCommand:()=>KN,ListQueuesCommand:()=>ym,MessageNotInflight:()=>vJ,MessageSystemAttributeName:()=>xBe,MessageSystemAttributeNameForSends:()=>_Be,OverLimit:()=>VJ,PurgeQueueCommand:()=>LN,PurgeQueueInProgress:()=>xJ,QueueAttributeName:()=>IBe,QueueDeletedRecently:()=>XJ,QueueDoesNotExist:()=>fJ,QueueNameExists:()=>jJ,ReceiptHandleIsInvalid:()=>YJ,ReceiveMessageCommand:()=>wN,RemovePermissionCommand:()=>PN,RequestThrottled:()=>JJ,ResourceNotFoundException:()=>EJ,SQS:()=>VN,SQSClient:()=>RB,SQSServiceException:()=>ha,SendMessageBatchCommand:()=>RN,SendMessageCommand:()=>WN,SetQueueAttributesCommand:()=>tN,StartMessageMoveTaskCommand:()=>FN,TagQueueCommand:()=>AN,TooManyEntriesInBatchRequest:()=>qJ,UnsupportedOperation:()=>NJ,UntagQueueCommand:()=>TN,__Client:()=>J.Client,paginateListDeadLetterSourceQueues:()=>Sge,paginateListQueues:()=>uge});fN.exports=vBe(FJ);var wJ=Io(),YBe=xo(),OBe=_o(),dk=PK(),PJ=jl(),QBe=li(),gk=Hn(),$Be=Bh(),La=wr(),RJ=Ti(),WJ=fd(),qBe=w((e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sqs"})},"resolveClientEndpointParameters"),Fa={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},ZBe=LJ(),tJ=Dh(),gm=za(),J=we(),UBe=w((e)=>{let{httpAuthSchemes:a,httpAuthSchemeProvider:n,credentials:i}=e;return{setHttpAuthScheme(r){let h=a.findIndex((s)=>s.schemeId===r.schemeId);if(h===-1)a.push(r);else a.splice(h,1,r)},httpAuthSchemes(){return a},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){i=r},credentials(){return i}}},"getHttpAuthExtensionConfiguration"),XBe=w((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),jBe=w((e,a)=>{let n=Object.assign(tJ.getAwsRegionExtensionConfiguration(e),J.getDefaultExtensionConfiguration(e),gm.getHttpHandlerExtensionConfiguration(e),UBe(e));return a.forEach((i)=>i.configure(n)),Object.assign(e,tJ.resolveAwsRegionExtensionConfiguration(n),J.resolveDefaultRuntimeConfig(n),gm.resolveHttpHandlerRuntimeConfig(n),XBe(n))},"resolveRuntimeExtensions"),RB=class extends J.Client{static{w(this,"SQSClient")}config;constructor(...[e]){let a=ZBe.getRuntimeConfig(e||{});super(a);this.initConfig=a;let n=qBe(a),i=PJ.resolveUserAgentConfig(n),r=RJ.resolveRetryConfig(i),h=QBe.resolveRegionConfig(r),s=wJ.resolveHostHeaderConfig(h),S=La.resolveEndpointConfig(s),u=dk.resolveQueueUrlConfig(S),B=WJ.resolveHttpAuthSchemeConfig(u),M=jBe(B,e?.extensions||[]);this.config=M,this.middlewareStack.use(PJ.getUserAgentPlugin(this.config)),this.middlewareStack.use(RJ.getRetryPlugin(this.config)),this.middlewareStack.use($Be.getContentLengthPlugin(this.config)),this.middlewareStack.use(wJ.getHostHeaderPlugin(this.config)),this.middlewareStack.use(YBe.getLoggerPlugin(this.config)),this.middlewareStack.use(OBe.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(dk.getQueueUrlPlugin(this.config)),this.middlewareStack.use(gk.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:WJ.defaultSQSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:w(async(C)=>new gk.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(gk.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Aa=br(),x=Na(),ha=class e extends J.ServiceException{static{w(this,"SQSServiceException")}constructor(a){super(a);Object.setPrototypeOf(this,e.prototype)}},AJ=class e extends ha{static{w(this,"InvalidAddress")}name="InvalidAddress";$fault="client";constructor(a){super({name:"InvalidAddress",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},TJ=class e extends ha{static{w(this,"InvalidSecurity")}name="InvalidSecurity";$fault="client";constructor(a){super({name:"InvalidSecurity",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},VJ=class e extends ha{static{w(this,"OverLimit")}name="OverLimit";$fault="client";constructor(a){super({name:"OverLimit",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},fJ=class e extends ha{static{w(this,"QueueDoesNotExist")}name="QueueDoesNotExist";$fault="client";constructor(a){super({name:"QueueDoesNotExist",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},JJ=class e extends ha{static{w(this,"RequestThrottled")}name="RequestThrottled";$fault="client";constructor(a){super({name:"RequestThrottled",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},NJ=class e extends ha{static{w(this,"UnsupportedOperation")}name="UnsupportedOperation";$fault="client";constructor(a){super({name:"UnsupportedOperation",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},EJ=class e extends ha{static{w(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(a){super({name:"ResourceNotFoundException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},vJ=class e extends ha{static{w(this,"MessageNotInflight")}name="MessageNotInflight";$fault="client";constructor(a){super({name:"MessageNotInflight",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},YJ=class e extends ha{static{w(this,"ReceiptHandleIsInvalid")}name="ReceiptHandleIsInvalid";$fault="client";constructor(a){super({name:"ReceiptHandleIsInvalid",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},OJ=class e extends ha{static{w(this,"BatchEntryIdsNotDistinct")}name="BatchEntryIdsNotDistinct";$fault="client";constructor(a){super({name:"BatchEntryIdsNotDistinct",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},QJ=class e extends ha{static{w(this,"EmptyBatchRequest")}name="EmptyBatchRequest";$fault="client";constructor(a){super({name:"EmptyBatchRequest",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},$J=class e extends ha{static{w(this,"InvalidBatchEntryId")}name="InvalidBatchEntryId";$fault="client";constructor(a){super({name:"InvalidBatchEntryId",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},qJ=class e extends ha{static{w(this,"TooManyEntriesInBatchRequest")}name="TooManyEntriesInBatchRequest";$fault="client";constructor(a){super({name:"TooManyEntriesInBatchRequest",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},IBe={All:"All",ApproximateNumberOfMessages:"ApproximateNumberOfMessages",ApproximateNumberOfMessagesDelayed:"ApproximateNumberOfMessagesDelayed",ApproximateNumberOfMessagesNotVisible:"ApproximateNumberOfMessagesNotVisible",ContentBasedDeduplication:"ContentBasedDeduplication",CreatedTimestamp:"CreatedTimestamp",DeduplicationScope:"DeduplicationScope",DelaySeconds:"DelaySeconds",FifoQueue:"FifoQueue",FifoThroughputLimit:"FifoThroughputLimit",KmsDataKeyReusePeriodSeconds:"KmsDataKeyReusePeriodSeconds",KmsMasterKeyId:"KmsMasterKeyId",LastModifiedTimestamp:"LastModifiedTimestamp",MaximumMessageSize:"MaximumMessageSize",MessageRetentionPeriod:"MessageRetentionPeriod",Policy:"Policy",QueueArn:"QueueArn",ReceiveMessageWaitTimeSeconds:"ReceiveMessageWaitTimeSeconds",RedriveAllowPolicy:"RedriveAllowPolicy",RedrivePolicy:"RedrivePolicy",SqsManagedSseEnabled:"SqsManagedSseEnabled",VisibilityTimeout:"VisibilityTimeout"},ZJ=class e extends ha{static{w(this,"InvalidAttributeName")}name="InvalidAttributeName";$fault="client";constructor(a){super({name:"InvalidAttributeName",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},UJ=class e extends ha{static{w(this,"InvalidAttributeValue")}name="InvalidAttributeValue";$fault="client";constructor(a){super({name:"InvalidAttributeValue",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},XJ=class e extends ha{static{w(this,"QueueDeletedRecently")}name="QueueDeletedRecently";$fault="client";constructor(a){super({name:"QueueDeletedRecently",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},jJ=class e extends ha{static{w(this,"QueueNameExists")}name="QueueNameExists";$fault="client";constructor(a){super({name:"QueueNameExists",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},IJ=class e extends ha{static{w(this,"InvalidIdFormat")}name="InvalidIdFormat";$fault="client";constructor(a){super({name:"InvalidIdFormat",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},xJ=class e extends ha{static{w(this,"PurgeQueueInProgress")}name="PurgeQueueInProgress";$fault="client";constructor(a){super({name:"PurgeQueueInProgress",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},_J=class e extends ha{static{w(this,"KmsAccessDenied")}name="KmsAccessDenied";$fault="client";constructor(a){super({name:"KmsAccessDenied",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},pJ=class e extends ha{static{w(this,"KmsDisabled")}name="KmsDisabled";$fault="client";constructor(a){super({name:"KmsDisabled",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},eN=class e extends ha{static{w(this,"KmsInvalidKeyUsage")}name="KmsInvalidKeyUsage";$fault="client";constructor(a){super({name:"KmsInvalidKeyUsage",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},aN=class e extends ha{static{w(this,"KmsInvalidState")}name="KmsInvalidState";$fault="client";constructor(a){super({name:"KmsInvalidState",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},nN=class e extends ha{static{w(this,"KmsNotFound")}name="KmsNotFound";$fault="client";constructor(a){super({name:"KmsNotFound",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},iN=class e extends ha{static{w(this,"KmsOptInRequired")}name="KmsOptInRequired";$fault="client";constructor(a){super({name:"KmsOptInRequired",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},rN=class e extends ha{static{w(this,"KmsThrottled")}name="KmsThrottled";$fault="client";constructor(a){super({name:"KmsThrottled",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},xBe={AWSTraceHeader:"AWSTraceHeader",All:"All",ApproximateFirstReceiveTimestamp:"ApproximateFirstReceiveTimestamp",ApproximateReceiveCount:"ApproximateReceiveCount",DeadLetterQueueSourceArn:"DeadLetterQueueSourceArn",MessageDeduplicationId:"MessageDeduplicationId",MessageGroupId:"MessageGroupId",SenderId:"SenderId",SentTimestamp:"SentTimestamp",SequenceNumber:"SequenceNumber"},lN=class e extends ha{static{w(this,"InvalidMessageContents")}name="InvalidMessageContents";$fault="client";constructor(a){super({name:"InvalidMessageContents",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},_Be={AWSTraceHeader:"AWSTraceHeader"},oN=class e extends ha{static{w(this,"BatchRequestTooLong")}name="BatchRequestTooLong";$fault="client";constructor(a){super({name:"BatchRequestTooLong",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},pBe=w(async(e,a)=>{let n=wa("AddPermission"),i;return i=JSON.stringify(zMe(e,a)),Va(a,n,"/",void 0,i)},"se_AddPermissionCommand"),ece=w(async(e,a)=>{let n=wa("CancelMessageMoveTask"),i;return i=JSON.stringify(bMe(e,a)),Va(a,n,"/",void 0,i)},"se_CancelMessageMoveTaskCommand"),ace=w(async(e,a)=>{let n=wa("ChangeMessageVisibility"),i;return i=JSON.stringify(LMe(e,a)),Va(a,n,"/",void 0,i)},"se_ChangeMessageVisibilityCommand"),nce=w(async(e,a)=>{let n=wa("ChangeMessageVisibilityBatch"),i;return i=JSON.stringify(GMe(e,a)),Va(a,n,"/",void 0,i)},"se_ChangeMessageVisibilityBatchCommand"),ice=w(async(e,a)=>{let n=wa("CreateQueue"),i;return i=JSON.stringify(wMe(e,a)),Va(a,n,"/",void 0,i)},"se_CreateQueueCommand"),rce=w(async(e,a)=>{let n=wa("DeleteMessage"),i;return i=JSON.stringify(tMe(e,a)),Va(a,n,"/",void 0,i)},"se_DeleteMessageCommand"),lce=w(async(e,a)=>{let n=wa("DeleteMessageBatch"),i;return i=JSON.stringify(PMe(e,a)),Va(a,n,"/",void 0,i)},"se_DeleteMessageBatchCommand"),oce=w(async(e,a)=>{let n=wa("DeleteQueue"),i;return i=JSON.stringify(FMe(e,a)),Va(a,n,"/",void 0,i)},"se_DeleteQueueCommand"),hce=w(async(e,a)=>{let n=wa("GetQueueAttributes"),i;return i=JSON.stringify(AMe(e,a)),Va(a,n,"/",void 0,i)},"se_GetQueueAttributesCommand"),sce=w(async(e,a)=>{let n=wa("GetQueueUrl"),i;return i=JSON.stringify(TMe(e,a)),Va(a,n,"/",void 0,i)},"se_GetQueueUrlCommand"),kce=w(async(e,a)=>{let n=wa("ListDeadLetterSourceQueues"),i;return i=JSON.stringify(VMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListDeadLetterSourceQueuesCommand"),Sce=w(async(e,a)=>{let n=wa("ListMessageMoveTasks"),i;return i=JSON.stringify(fMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListMessageMoveTasksCommand"),uce=w(async(e,a)=>{let n=wa("ListQueues"),i;return i=JSON.stringify(JMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListQueuesCommand"),Bce=w(async(e,a)=>{let n=wa("ListQueueTags"),i;return i=JSON.stringify(NMe(e,a)),Va(a,n,"/",void 0,i)},"se_ListQueueTagsCommand"),cce=w(async(e,a)=>{let n=wa("PurgeQueue"),i;return i=JSON.stringify(QMe(e,a)),Va(a,n,"/",void 0,i)},"se_PurgeQueueCommand"),Mce=w(async(e,a)=>{let n=wa("ReceiveMessage"),i;return i=JSON.stringify($Me(e,a)),Va(a,n,"/",void 0,i)},"se_ReceiveMessageCommand"),gce=w(async(e,a)=>{let n=wa("RemovePermission"),i;return i=JSON.stringify(qMe(e,a)),Va(a,n,"/",void 0,i)},"se_RemovePermissionCommand"),dce=w(async(e,a)=>{let n=wa("SendMessage"),i;return i=JSON.stringify(jMe(e,a)),Va(a,n,"/",void 0,i)},"se_SendMessageCommand"),yce=w(async(e,a)=>{let n=wa("SendMessageBatch"),i;return i=JSON.stringify(ZMe(e,a)),Va(a,n,"/",void 0,i)},"se_SendMessageBatchCommand"),mce=w(async(e,a)=>{let n=wa("SetQueueAttributes"),i;return i=JSON.stringify(IMe(e,a)),Va(a,n,"/",void 0,i)},"se_SetQueueAttributesCommand"),Cce=w(async(e,a)=>{let n=wa("StartMessageMoveTask"),i;return i=JSON.stringify(xMe(e,a)),Va(a,n,"/",void 0,i)},"se_StartMessageMoveTaskCommand"),zce=w(async(e,a)=>{let n=wa("TagQueue"),i;return i=JSON.stringify(pMe(e,a)),Va(a,n,"/",void 0,i)},"se_TagQueueCommand"),Hce=w(async(e,a)=>{let n=wa("UntagQueue"),i;return i=JSON.stringify(ege(e,a)),Va(a,n,"/",void 0,i)},"se_UntagQueueCommand"),bce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_AddPermissionCommand"),Gce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_CancelMessageMoveTaskCommand"),Dce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_ChangeMessageVisibilityCommand"),Kce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ChangeMessageVisibilityBatchCommand"),Lce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_CreateQueueCommand"),wce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_DeleteMessageCommand"),Pce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_DeleteMessageBatchCommand"),Rce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_DeleteQueueCommand"),Wce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_GetQueueAttributesCommand"),tce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_GetQueueUrlCommand"),Fce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListDeadLetterSourceQueuesCommand"),Ace=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListMessageMoveTasksCommand"),Tce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListQueuesCommand"),Vce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_ListQueueTagsCommand"),fce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_PurgeQueueCommand"),Jce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=oge(n,a),{$metadata:Me(e),...i}},"de_ReceiveMessageCommand"),Nce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_RemovePermissionCommand"),Ece=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_SendMessageCommand"),vce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_SendMessageBatchCommand"),Yce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_SetQueueAttributesCommand"),Oce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);let n=await x.parseJsonBody(e.body,a),i={};return i=J._json(n),{$metadata:Me(e),...i}},"de_StartMessageMoveTaskCommand"),Qce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_TagQueueCommand"),$ce=w(async(e,a)=>{if(e.statusCode>=300)return Ta(e,a);return await J.collectBody(e.body,a),{$metadata:Me(e)}},"de_UntagQueueCommand"),Ta=w(async(e,a)=>{let n={...e,body:await x.parseJsonErrorBody(e.body,a)};sge(n,e.headers);let i=x.loadRestJsonErrorCode(e,n.body);switch(i){case"InvalidAddress":case"com.amazonaws.sqs#InvalidAddress":throw await Xce(n,a);case"InvalidSecurity":case"com.amazonaws.sqs#InvalidSecurity":throw await eMe(n,a);case"OverLimit":case"com.amazonaws.sqs#OverLimit":throw await kMe(n,a);case"QueueDoesNotExist":case"com.amazonaws.sqs#QueueDoesNotExist":case"AWS.SimpleQueueService.NonExistentQueue":throw await BMe(n,a);case"RequestThrottled":case"com.amazonaws.sqs#RequestThrottled":throw await gMe(n,a);case"UnsupportedOperation":case"com.amazonaws.sqs#UnsupportedOperation":case"AWS.SimpleQueueService.UnsupportedOperation":throw await mMe(n,a);case"ResourceNotFoundException":case"com.amazonaws.sqs#ResourceNotFoundException":throw await dMe(n,a);case"MessageNotInflight":case"com.amazonaws.sqs#MessageNotInflight":case"AWS.SimpleQueueService.MessageNotInflight":throw await sMe(n,a);case"ReceiptHandleIsInvalid":case"com.amazonaws.sqs#ReceiptHandleIsInvalid":throw await MMe(n,a);case"BatchEntryIdsNotDistinct":case"com.amazonaws.sqs#BatchEntryIdsNotDistinct":case"AWS.SimpleQueueService.BatchEntryIdsNotDistinct":throw await qce(n,a);case"EmptyBatchRequest":case"com.amazonaws.sqs#EmptyBatchRequest":case"AWS.SimpleQueueService.EmptyBatchRequest":throw await Uce(n,a);case"InvalidBatchEntryId":case"com.amazonaws.sqs#InvalidBatchEntryId":case"AWS.SimpleQueueService.InvalidBatchEntryId":throw await xce(n,a);case"TooManyEntriesInBatchRequest":case"com.amazonaws.sqs#TooManyEntriesInBatchRequest":case"AWS.SimpleQueueService.TooManyEntriesInBatchRequest":throw await yMe(n,a);case"InvalidAttributeName":case"com.amazonaws.sqs#InvalidAttributeName":throw await jce(n,a);case"InvalidAttributeValue":case"com.amazonaws.sqs#InvalidAttributeValue":throw await Ice(n,a);case"QueueDeletedRecently":case"com.amazonaws.sqs#QueueDeletedRecently":case"AWS.SimpleQueueService.QueueDeletedRecently":throw await uMe(n,a);case"QueueNameExists":case"com.amazonaws.sqs#QueueNameExists":case"QueueAlreadyExists":throw await cMe(n,a);case"InvalidIdFormat":case"com.amazonaws.sqs#InvalidIdFormat":throw await _ce(n,a);case"PurgeQueueInProgress":case"com.amazonaws.sqs#PurgeQueueInProgress":case"AWS.SimpleQueueService.PurgeQueueInProgress":throw await SMe(n,a);case"KmsAccessDenied":case"com.amazonaws.sqs#KmsAccessDenied":case"KMS.AccessDeniedException":throw await aMe(n,a);case"KmsDisabled":case"com.amazonaws.sqs#KmsDisabled":case"KMS.DisabledException":throw await nMe(n,a);case"KmsInvalidKeyUsage":case"com.amazonaws.sqs#KmsInvalidKeyUsage":case"KMS.InvalidKeyUsageException":throw await iMe(n,a);case"KmsInvalidState":case"com.amazonaws.sqs#KmsInvalidState":case"KMS.InvalidStateException":throw await rMe(n,a);case"KmsNotFound":case"com.amazonaws.sqs#KmsNotFound":case"KMS.NotFoundException":throw await lMe(n,a);case"KmsOptInRequired":case"com.amazonaws.sqs#KmsOptInRequired":case"KMS.OptInRequired":throw await oMe(n,a);case"KmsThrottled":case"com.amazonaws.sqs#KmsThrottled":case"KMS.ThrottlingException":throw await hMe(n,a);case"InvalidMessageContents":case"com.amazonaws.sqs#InvalidMessageContents":throw await pce(n,a);case"BatchRequestTooLong":case"com.amazonaws.sqs#BatchRequestTooLong":case"AWS.SimpleQueueService.BatchRequestTooLong":throw await Zce(n,a);default:let r=n.body;return hge({output:e,parsedBody:r,errorCode:i})}},"de_CommandError"),qce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new OJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_BatchEntryIdsNotDistinctRes"),Zce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new oN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_BatchRequestTooLongRes"),Uce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new QJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_EmptyBatchRequestRes"),Xce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new AJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidAddressRes"),jce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new ZJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidAttributeNameRes"),Ice=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new UJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidAttributeValueRes"),xce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new $J({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidBatchEntryIdRes"),_ce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new IJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidIdFormatRes"),pce=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new lN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidMessageContentsRes"),eMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new TJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_InvalidSecurityRes"),aMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new _J({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsAccessDeniedRes"),nMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new pJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsDisabledRes"),iMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new eN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsInvalidKeyUsageRes"),rMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new aN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsInvalidStateRes"),lMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new nN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsNotFoundRes"),oMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new iN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsOptInRequiredRes"),hMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new rN({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_KmsThrottledRes"),sMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new vJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_MessageNotInflightRes"),kMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new VJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_OverLimitRes"),SMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new xJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_PurgeQueueInProgressRes"),uMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new XJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_QueueDeletedRecentlyRes"),BMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new fJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_QueueDoesNotExistRes"),cMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new jJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_QueueNameExistsRes"),MMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new YJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_ReceiptHandleIsInvalidRes"),gMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new JJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_RequestThrottledRes"),dMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new EJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_ResourceNotFoundExceptionRes"),yMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new qJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_TooManyEntriesInBatchRequestRes"),mMe=w(async(e,a)=>{let n=e.body,i=J._json(n),r=new NJ({$metadata:Me(e),...i});return J.decorateServiceException(r,n)},"de_UnsupportedOperationRes"),CMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_ActionNameList"),zMe=w((e,a)=>{return J.take(e,{AWSAccountIds:w((n)=>HMe(n,a),"AWSAccountIds"),Actions:w((n)=>CMe(n,a),"Actions"),Label:x._toStr,QueueUrl:x._toStr})},"se_AddPermissionRequest"),hN=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_AttributeNameList"),HMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_AWSAccountIdList"),sN=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return a.base64Encoder(n)})},"se_BinaryList"),bMe=w((e,a)=>{return J.take(e,{TaskHandle:x._toStr})},"se_CancelMessageMoveTaskRequest"),GMe=w((e,a)=>{return J.take(e,{Entries:w((n)=>KMe(n,a),"Entries"),QueueUrl:x._toStr})},"se_ChangeMessageVisibilityBatchRequest"),DMe=w((e,a)=>{return J.take(e,{Id:x._toStr,ReceiptHandle:x._toStr,VisibilityTimeout:x._toNum})},"se_ChangeMessageVisibilityBatchRequestEntry"),KMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return DMe(n,a)})},"se_ChangeMessageVisibilityBatchRequestEntryList"),LMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,ReceiptHandle:x._toStr,VisibilityTimeout:x._toNum})},"se_ChangeMessageVisibilityRequest"),wMe=w((e,a)=>{return J.take(e,{Attributes:w((n)=>uN(n,a),"Attributes"),QueueName:x._toStr,tags:w((n)=>cN(n,a),"tags")})},"se_CreateQueueRequest"),PMe=w((e,a)=>{return J.take(e,{Entries:w((n)=>WMe(n,a),"Entries"),QueueUrl:x._toStr})},"se_DeleteMessageBatchRequest"),RMe=w((e,a)=>{return J.take(e,{Id:x._toStr,ReceiptHandle:x._toStr})},"se_DeleteMessageBatchRequestEntry"),WMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return RMe(n,a)})},"se_DeleteMessageBatchRequestEntryList"),tMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,ReceiptHandle:x._toStr})},"se_DeleteMessageRequest"),FMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr})},"se_DeleteQueueRequest"),AMe=w((e,a)=>{return J.take(e,{AttributeNames:w((n)=>hN(n,a),"AttributeNames"),QueueUrl:x._toStr})},"se_GetQueueAttributesRequest"),TMe=w((e,a)=>{return J.take(e,{QueueName:x._toStr,QueueOwnerAWSAccountId:x._toStr})},"se_GetQueueUrlRequest"),VMe=w((e,a)=>{return J.take(e,{MaxResults:x._toNum,NextToken:x._toStr,QueueUrl:x._toStr})},"se_ListDeadLetterSourceQueuesRequest"),fMe=w((e,a)=>{return J.take(e,{MaxResults:x._toNum,SourceArn:x._toStr})},"se_ListMessageMoveTasksRequest"),JMe=w((e,a)=>{return J.take(e,{MaxResults:x._toNum,NextToken:x._toStr,QueueNamePrefix:x._toStr})},"se_ListQueuesRequest"),NMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr})},"se_ListQueueTagsRequest"),EMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_MessageAttributeNameList"),vMe=w((e,a)=>{return J.take(e,{BinaryListValues:w((n)=>sN(n,a),"BinaryListValues"),BinaryValue:a.base64Encoder,DataType:x._toStr,StringListValues:w((n)=>BN(n,a),"StringListValues"),StringValue:x._toStr})},"se_MessageAttributeValue"),kN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=vMe(r,a),n},{})},"se_MessageBodyAttributeMap"),SN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=OMe(r,a),n},{})},"se_MessageBodySystemAttributeMap"),YMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_MessageSystemAttributeList"),OMe=w((e,a)=>{return J.take(e,{BinaryListValues:w((n)=>sN(n,a),"BinaryListValues"),BinaryValue:a.base64Encoder,DataType:x._toStr,StringListValues:w((n)=>BN(n,a),"StringListValues"),StringValue:x._toStr})},"se_MessageSystemAttributeValue"),QMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr})},"se_PurgeQueueRequest"),uN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=x._toStr(r),n},{})},"se_QueueAttributeMap"),$Me=w((e,a)=>{return J.take(e,{AttributeNames:w((n)=>hN(n,a),"AttributeNames"),MaxNumberOfMessages:x._toNum,MessageAttributeNames:w((n)=>EMe(n,a),"MessageAttributeNames"),MessageSystemAttributeNames:w((n)=>YMe(n,a),"MessageSystemAttributeNames"),QueueUrl:x._toStr,ReceiveRequestAttemptId:x._toStr,VisibilityTimeout:x._toNum,WaitTimeSeconds:x._toNum})},"se_ReceiveMessageRequest"),qMe=w((e,a)=>{return J.take(e,{Label:x._toStr,QueueUrl:x._toStr})},"se_RemovePermissionRequest"),ZMe=w((e,a)=>{return J.take(e,{Entries:w((n)=>XMe(n,a),"Entries"),QueueUrl:x._toStr})},"se_SendMessageBatchRequest"),UMe=w((e,a)=>{return J.take(e,{DelaySeconds:x._toNum,Id:x._toStr,MessageAttributes:w((n)=>kN(n,a),"MessageAttributes"),MessageBody:x._toStr,MessageDeduplicationId:x._toStr,MessageGroupId:x._toStr,MessageSystemAttributes:w((n)=>SN(n,a),"MessageSystemAttributes")})},"se_SendMessageBatchRequestEntry"),XMe=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return UMe(n,a)})},"se_SendMessageBatchRequestEntryList"),jMe=w((e,a)=>{return J.take(e,{DelaySeconds:x._toNum,MessageAttributes:w((n)=>kN(n,a),"MessageAttributes"),MessageBody:x._toStr,MessageDeduplicationId:x._toStr,MessageGroupId:x._toStr,MessageSystemAttributes:w((n)=>SN(n,a),"MessageSystemAttributes"),QueueUrl:x._toStr})},"se_SendMessageRequest"),IMe=w((e,a)=>{return J.take(e,{Attributes:w((n)=>uN(n,a),"Attributes"),QueueUrl:x._toStr})},"se_SetQueueAttributesRequest"),xMe=w((e,a)=>{return J.take(e,{DestinationArn:x._toStr,MaxNumberOfMessagesPerSecond:x._toNum,SourceArn:x._toStr})},"se_StartMessageMoveTaskRequest"),BN=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_StringList"),_Me=w((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return x._toStr(n)})},"se_TagKeyList"),cN=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=x._toStr(r),n},{})},"se_TagMap"),pMe=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,Tags:w((n)=>cN(n,a),"Tags")})},"se_TagQueueRequest"),ege=w((e,a)=>{return J.take(e,{QueueUrl:x._toStr,TagKeys:w((n)=>_Me(n,a),"TagKeys")})},"se_UntagQueueRequest"),age=w((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return a.base64Decoder(i)})},"de_BinaryList"),nge=w((e,a)=>{return J.take(e,{Attributes:J._json,Body:J.expectString,MD5OfBody:J.expectString,MD5OfMessageAttributes:J.expectString,MessageAttributes:w((n)=>rge(n,a),"MessageAttributes"),MessageId:J.expectString,ReceiptHandle:J.expectString})},"de_Message"),ige=w((e,a)=>{return J.take(e,{BinaryListValues:w((n)=>age(n,a),"BinaryListValues"),BinaryValue:a.base64Decoder,DataType:J.expectString,StringListValues:J._json,StringValue:J.expectString})},"de_MessageAttributeValue"),rge=w((e,a)=>{return Object.entries(e).reduce((n,[i,r])=>{if(r===null)return n;return n[i]=ige(r,a),n},{})},"de_MessageBodyAttributeMap"),lge=w((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return nge(i,a)})},"de_MessageList"),oge=w((e,a)=>{return J.take(e,{Messages:w((n)=>lge(n,a),"Messages")})},"de_ReceiveMessageResult"),Me=w((e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),"deserializeMetadata"),hge=J.withBaseException(ha),Va=w(async(e,a,n,i,r)=>{let{hostname:h,protocol:s="https",port:S,path:u}=await e.endpoint(),B={protocol:s,hostname:h,port:S,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+n:u+n,headers:a};if(i!==void 0)B.hostname=i;if(r!==void 0)B.body=r;return new gm.HttpRequest(B)},"buildHttpRpcRequest");function wa(e){return{"content-type":"application/x-amz-json-1.0","x-amz-target":`AmazonSQS.${e}`,"x-amzn-query-mode":"true"}}w(wa,"sharedHeaders");var sge=w((e,a)=>{let n=a["x-amzn-query-error"];if(e.body!==void 0&&n!=null){let[i,r]=n.split(";"),h=Object.entries(e.body),s={Type:r,Code:i};Object.assign(e.body,s);for(let[S,u]of h)s[S]=u;delete s.__type,e.body.Error=s}},"populateBodyWithQueryCompatibility"),MN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","AddPermission",{}).n("SQSClient","AddPermissionCommand").f(void 0,void 0).ser(pBe).de(bce).build(){static{w(this,"AddPermissionCommand")}},gN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","CancelMessageMoveTask",{}).n("SQSClient","CancelMessageMoveTaskCommand").f(void 0,void 0).ser(ece).de(Gce).build(){static{w(this,"CancelMessageMoveTaskCommand")}},dN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ChangeMessageVisibilityBatch",{}).n("SQSClient","ChangeMessageVisibilityBatchCommand").f(void 0,void 0).ser(nce).de(Kce).build(){static{w(this,"ChangeMessageVisibilityBatchCommand")}},yN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ChangeMessageVisibility",{}).n("SQSClient","ChangeMessageVisibilityCommand").f(void 0,void 0).ser(ace).de(Dce).build(){static{w(this,"ChangeMessageVisibilityCommand")}},mN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","CreateQueue",{}).n("SQSClient","CreateQueueCommand").f(void 0,void 0).ser(ice).de(Lce).build(){static{w(this,"CreateQueueCommand")}},CN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","DeleteMessageBatch",{}).n("SQSClient","DeleteMessageBatchCommand").f(void 0,void 0).ser(lce).de(Pce).build(){static{w(this,"DeleteMessageBatchCommand")}},zN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","DeleteMessage",{}).n("SQSClient","DeleteMessageCommand").f(void 0,void 0).ser(rce).de(wce).build(){static{w(this,"DeleteMessageCommand")}},HN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","DeleteQueue",{}).n("SQSClient","DeleteQueueCommand").f(void 0,void 0).ser(oce).de(Rce).build(){static{w(this,"DeleteQueueCommand")}},bN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","GetQueueAttributes",{}).n("SQSClient","GetQueueAttributesCommand").f(void 0,void 0).ser(hce).de(Wce).build(){static{w(this,"GetQueueAttributesCommand")}},GN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","GetQueueUrl",{}).n("SQSClient","GetQueueUrlCommand").f(void 0,void 0).ser(sce).de(tce).build(){static{w(this,"GetQueueUrlCommand")}},dm=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListDeadLetterSourceQueues",{}).n("SQSClient","ListDeadLetterSourceQueuesCommand").f(void 0,void 0).ser(kce).de(Fce).build(){static{w(this,"ListDeadLetterSourceQueuesCommand")}},DN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListMessageMoveTasks",{}).n("SQSClient","ListMessageMoveTasksCommand").f(void 0,void 0).ser(Sce).de(Ace).build(){static{w(this,"ListMessageMoveTasksCommand")}},ym=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListQueues",{}).n("SQSClient","ListQueuesCommand").f(void 0,void 0).ser(uce).de(Tce).build(){static{w(this,"ListQueuesCommand")}},KN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","ListQueueTags",{}).n("SQSClient","ListQueueTagsCommand").f(void 0,void 0).ser(Bce).de(Vce).build(){static{w(this,"ListQueueTagsCommand")}},LN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","PurgeQueue",{}).n("SQSClient","PurgeQueueCommand").f(void 0,void 0).ser(cce).de(fce).build(){static{w(this,"PurgeQueueCommand")}},wN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions()),dk.getReceiveMessagePlugin(n)]}).s("AmazonSQS","ReceiveMessage",{}).n("SQSClient","ReceiveMessageCommand").f(void 0,void 0).ser(Mce).de(Jce).build(){static{w(this,"ReceiveMessageCommand")}},PN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","RemovePermission",{}).n("SQSClient","RemovePermissionCommand").f(void 0,void 0).ser(gce).de(Nce).build(){static{w(this,"RemovePermissionCommand")}},RN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions()),dk.getSendMessageBatchPlugin(n)]}).s("AmazonSQS","SendMessageBatch",{}).n("SQSClient","SendMessageBatchCommand").f(void 0,void 0).ser(yce).de(vce).build(){static{w(this,"SendMessageBatchCommand")}},WN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions()),dk.getSendMessagePlugin(n)]}).s("AmazonSQS","SendMessage",{}).n("SQSClient","SendMessageCommand").f(void 0,void 0).ser(dce).de(Ece).build(){static{w(this,"SendMessageCommand")}},tN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","SetQueueAttributes",{}).n("SQSClient","SetQueueAttributesCommand").f(void 0,void 0).ser(mce).de(Yce).build(){static{w(this,"SetQueueAttributesCommand")}},FN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","StartMessageMoveTask",{}).n("SQSClient","StartMessageMoveTaskCommand").f(void 0,void 0).ser(Cce).de(Oce).build(){static{w(this,"StartMessageMoveTaskCommand")}},AN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","TagQueue",{}).n("SQSClient","TagQueueCommand").f(void 0,void 0).ser(zce).de(Qce).build(){static{w(this,"TagQueueCommand")}},TN=class extends J.Command.classBuilder().ep(Fa).m(function(e,a,n,i){return[Aa.getSerdePlugin(n,this.serialize,this.deserialize),La.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("AmazonSQS","UntagQueue",{}).n("SQSClient","UntagQueueCommand").f(void 0,void 0).ser(Hce).de($ce).build(){static{w(this,"UntagQueueCommand")}},kge={AddPermissionCommand:MN,CancelMessageMoveTaskCommand:gN,ChangeMessageVisibilityCommand:yN,ChangeMessageVisibilityBatchCommand:dN,CreateQueueCommand:mN,DeleteMessageCommand:zN,DeleteMessageBatchCommand:CN,DeleteQueueCommand:HN,GetQueueAttributesCommand:bN,GetQueueUrlCommand:GN,ListDeadLetterSourceQueuesCommand:dm,ListMessageMoveTasksCommand:DN,ListQueuesCommand:ym,ListQueueTagsCommand:KN,PurgeQueueCommand:LN,ReceiveMessageCommand:wN,RemovePermissionCommand:PN,SendMessageCommand:WN,SendMessageBatchCommand:RN,SetQueueAttributesCommand:tN,StartMessageMoveTaskCommand:FN,TagQueueCommand:AN,UntagQueueCommand:TN},VN=class extends RB{static{w(this,"SQS")}};J.createAggregatedClient(kge,VN);var Sge=gk.createPaginator(RB,dm,"NextToken","NextToken","MaxResults"),uge=gk.createPaginator(RB,ym,"NextToken","NextToken","MaxResults")});var QN=G((OLe,ON)=>{var{defineProperty:tB,getOwnPropertyDescriptor:cge,getOwnPropertyNames:Mge}=Object,gge=Object.prototype.hasOwnProperty,dge=(e,a)=>tB(e,"name",{value:a,configurable:!0}),yge=(e,a)=>{for(var n in a)tB(e,n,{get:a[n],enumerable:!0})},mge=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Mge(a))if(!gge.call(e,r)&&r!==n)tB(e,r,{get:()=>a[r],enumerable:!(i=cge(a,r))||i.enumerable})}return e},Cge=(e)=>mge(tB({},"__esModule",{value:!0}),e),YN={};yge(YN,{resolveEventStreamSerdeConfig:()=>zge});ON.exports=Cge(YN);var zge=dge((e)=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),"resolveEventStreamSerdeConfig")});var bm=G(($N)=>{Object.defineProperty($N,"__esModule",{value:!0});$N.resolveHttpAuthSchemeConfig=$N.defaultKinesisHttpAuthSchemeProvider=$N.defaultKinesisHttpAuthSchemeParametersProvider=void 0;var Hge=Na(),Hm=vn(),bge=async(e,a,n)=>{return{operation:Hm.getSmithyContext(a).operation,region:await Hm.normalizeProvider(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};$N.defaultKinesisHttpAuthSchemeParametersProvider=bge;function Gge(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"kinesis",region:e.region},propertiesExtractor:(a,n)=>({signingProperties:{config:a,context:n}})}}var Dge=(e)=>{let a=[];switch(e.operation){default:a.push(Gge(e))}return a};$N.defaultKinesisHttpAuthSchemeProvider=Dge;var Kge=(e)=>{let a=Hge.resolveAwsSdkSigV4Config(e);return Object.assign(a,{authSchemePreference:Hm.normalizeProvider(e.authSchemePreference??[])})};$N.resolveHttpAuthSchemeConfig=Kge});var ZN=G(($Le,Pge)=>{Pge.exports={name:"@aws-sdk/client-kinesis",description:"AWS SDK for JavaScript Kinesis Client for Node.js, Browser and React Native",version:"3.848.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-kinesis","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 kinesis","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts --mode development","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts"},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.846.0","@aws-sdk/credential-provider-node":"3.848.0","@aws-sdk/middleware-host-header":"3.840.0","@aws-sdk/middleware-logger":"3.840.0","@aws-sdk/middleware-recursion-detection":"3.840.0","@aws-sdk/middleware-user-agent":"3.848.0","@aws-sdk/region-config-resolver":"3.840.0","@aws-sdk/types":"3.840.0","@aws-sdk/util-endpoints":"3.848.0","@aws-sdk/util-user-agent-browser":"3.840.0","@aws-sdk/util-user-agent-node":"3.848.0","@smithy/config-resolver":"^4.1.4","@smithy/core":"^3.7.0","@smithy/eventstream-serde-browser":"^4.0.4","@smithy/eventstream-serde-config-resolver":"^4.1.2","@smithy/eventstream-serde-node":"^4.0.4","@smithy/fetch-http-handler":"^5.1.0","@smithy/hash-node":"^4.0.4","@smithy/invalid-dependency":"^4.0.4","@smithy/middleware-content-length":"^4.0.4","@smithy/middleware-endpoint":"^4.1.15","@smithy/middleware-retry":"^4.1.16","@smithy/middleware-serde":"^4.0.8","@smithy/middleware-stack":"^4.0.4","@smithy/node-config-provider":"^4.1.3","@smithy/node-http-handler":"^4.1.0","@smithy/protocol-http":"^5.1.2","@smithy/smithy-client":"^4.4.7","@smithy/types":"^4.3.1","@smithy/url-parser":"^4.0.4","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.23","@smithy/util-defaults-mode-node":"^4.0.23","@smithy/util-endpoints":"^3.0.6","@smithy/util-middleware":"^4.0.4","@smithy/util-retry":"^4.0.6","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.6",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},engines:{node:">=18.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-kinesis",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-kinesis"}}});var jN=G((qLe,XN)=>{var{defineProperty:FB,getOwnPropertyDescriptor:Rge,getOwnPropertyNames:Wge}=Object,tge=Object.prototype.hasOwnProperty,Fge=(e,a)=>FB(e,"name",{value:a,configurable:!0}),Age=(e,a)=>{for(var n in a)FB(e,n,{get:a[n],enumerable:!0})},Tge=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Wge(a))if(!tge.call(e,r)&&r!==n)FB(e,r,{get:()=>a[r],enumerable:!(i=Rge(a,r))||i.enumerable})}return e},Vge=(e)=>Tge(FB({},"__esModule",{value:!0}),e),UN={};Age(UN,{isArrayBuffer:()=>fge});XN.exports=Vge(UN);var fge=Fge((e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]","isArrayBuffer")});var pN=G((ZLe,_N)=>{var{defineProperty:AB,getOwnPropertyDescriptor:Jge,getOwnPropertyNames:Nge}=Object,Ege=Object.prototype.hasOwnProperty,IN=(e,a)=>AB(e,"name",{value:a,configurable:!0}),vge=(e,a)=>{for(var n in a)AB(e,n,{get:a[n],enumerable:!0})},Yge=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Nge(a))if(!Ege.call(e,r)&&r!==n)AB(e,r,{get:()=>a[r],enumerable:!(i=Jge(a,r))||i.enumerable})}return e},Oge=(e)=>Yge(AB({},"__esModule",{value:!0}),e),xN={};vge(xN,{fromArrayBuffer:()=>$ge,fromString:()=>qge});_N.exports=Oge(xN);var Qge=jN(),Gm=De("buffer"),$ge=IN((e,a=0,n=e.byteLength-a)=>{if(!Qge.isArrayBuffer(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Gm.Buffer.from(e,a,n)},"fromArrayBuffer"),qge=IN((e,a)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return a?Gm.Buffer.from(e,a):Gm.Buffer.from(e)},"fromString")});var rE=G((ULe,iE)=>{var{defineProperty:TB,getOwnPropertyDescriptor:Zge,getOwnPropertyNames:Uge}=Object,Xge=Object.prototype.hasOwnProperty,Dm=(e,a)=>TB(e,"name",{value:a,configurable:!0}),jge=(e,a)=>{for(var n in a)TB(e,n,{get:a[n],enumerable:!0})},Ige=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Uge(a))if(!Xge.call(e,r)&&r!==n)TB(e,r,{get:()=>a[r],enumerable:!(i=Zge(a,r))||i.enumerable})}return e},xge=(e)=>Ige(TB({},"__esModule",{value:!0}),e),eE={};jge(eE,{fromUtf8:()=>nE,toUint8Array:()=>_ge,toUtf8:()=>pge});iE.exports=xge(eE);var aE=pN(),nE=Dm((e)=>{let a=aE.fromString(e,"utf8");return new Uint8Array(a.buffer,a.byteOffset,a.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),_ge=Dm((e)=>{if(typeof e==="string")return nE(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)},"toUint8Array"),pge=Dm((e)=>{if(typeof e==="string")return e;if(typeof e!=="object"||typeof e.byteOffset!=="number"||typeof e.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return aE.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")},"toUtf8")});var hE=G((lE)=>{Object.defineProperty(lE,"__esModule",{value:!0});lE.convertToBuffer=void 0;var ede=rE(),ade=typeof Buffer!=="undefined"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:ede.fromUtf8;function nde(e){if(e instanceof Uint8Array)return e;if(typeof e==="string")return ade(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)}lE.convertToBuffer=nde});var SE=G((sE)=>{Object.defineProperty(sE,"__esModule",{value:!0});sE.isEmptyData=void 0;function ide(e){if(typeof e==="string")return e.length===0;return e.byteLength===0}sE.isEmptyData=ide});var cE=G((uE)=>{Object.defineProperty(uE,"__esModule",{value:!0});uE.numToUint8=void 0;function rde(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}uE.numToUint8=rde});var dE=G((ME)=>{Object.defineProperty(ME,"__esModule",{value:!0});ME.uint32ArrayFrom=void 0;function lde(e){if(!Uint32Array.from){var a=new Uint32Array(e.length),n=0;while(n<e.length)a[n]=e[n],n+=1;return a}return Uint32Array.from(e)}ME.uint32ArrayFrom=lde});var Km=G(($h)=>{Object.defineProperty($h,"__esModule",{value:!0});$h.uint32ArrayFrom=$h.numToUint8=$h.isEmptyData=$h.convertToBuffer=void 0;var ode=hE();Object.defineProperty($h,"convertToBuffer",{enumerable:!0,get:function(){return ode.convertToBuffer}});var hde=SE();Object.defineProperty($h,"isEmptyData",{enumerable:!0,get:function(){return hde.isEmptyData}});var sde=cE();Object.defineProperty($h,"numToUint8",{enumerable:!0,get:function(){return sde.numToUint8}});var kde=dE();Object.defineProperty($h,"uint32ArrayFrom",{enumerable:!0,get:function(){return kde.uint32ArrayFrom}})});var HE=G((CE)=>{Object.defineProperty(CE,"__esModule",{value:!0});CE.AwsCrc32=void 0;var yE=an(),Lm=Km(),mE=VB(),ude=function(){function e(){this.crc32=new mE.Crc32}return e.prototype.update=function(a){if(Lm.isEmptyData(a))return;this.crc32.update(Lm.convertToBuffer(a))},e.prototype.digest=function(){return yE.__awaiter(this,void 0,void 0,function(){return yE.__generator(this,function(a){return[2,Lm.numToUint8(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new mE.Crc32},e}();CE.AwsCrc32=ude});var VB=G((wm)=>{Object.defineProperty(wm,"__esModule",{value:!0});wm.AwsCrc32=wm.Crc32=wm.crc32=void 0;var Bde=an(),cde=Km();function Mde(e){return new bE().update(e).digest()}wm.crc32=Mde;var bE=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(a){var n,i;try{for(var r=Bde.__values(a),h=r.next();!h.done;h=r.next()){var s=h.value;this.checksum=this.checksum>>>8^dde[(this.checksum^s)&255]}}catch(S){n={error:S}}finally{try{if(h&&!h.done&&(i=r.return))i.call(r)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e}();wm.Crc32=bE;var gde=[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],dde=cde.uint32ArrayFrom(gde),yde=HE();Object.defineProperty(wm,"AwsCrc32",{enumerable:!0,get:function(){return yde.AwsCrc32}})});var RE=G((rwe,PE)=>{var{defineProperty:JB,getOwnPropertyDescriptor:Hde,getOwnPropertyNames:bde}=Object,Gde=Object.prototype.hasOwnProperty,Jr=(e,a)=>JB(e,"name",{value:a,configurable:!0}),Dde=(e,a)=>{for(var n in a)JB(e,n,{get:a[n],enumerable:!0})},Kde=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of bde(a))if(!Gde.call(e,r)&&r!==n)JB(e,r,{get:()=>a[r],enumerable:!(i=Hde(a,r))||i.enumerable})}return e},Lde=(e)=>Kde(JB({},"__esModule",{value:!0}),e),DE={};Dde(DE,{EventStreamCodec:()=>Ede,HeaderMarshaller:()=>KE,Int64:()=>fB,MessageDecoderStream:()=>vde,MessageEncoderStream:()=>Yde,SmithyMessageDecoderStream:()=>Ode,SmithyMessageEncoderStream:()=>Qde});PE.exports=Lde(DE);var wde=VB(),lo=ts(),fB=class e{constructor(a){if(this.bytes=a,a.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static{Jr(this,"Int64")}static fromNumber(a){if(a>9223372036854776000||a<-9223372036854776000)throw new Error(`${a} is too large (or, if negative, too small) to represent as an Int64`);let n=new Uint8Array(8);for(let i=7,r=Math.abs(Math.round(a));i>-1&&r>0;i--,r/=256)n[i]=r;if(a<0)Pm(n);return new e(n)}valueOf(){let a=this.bytes.slice(0),n=a[0]&128;if(n)Pm(a);return parseInt(lo.toHex(a),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function Pm(e){for(let a=0;a<8;a++)e[a]^=255;for(let a=7;a>-1;a--)if(e[a]++,e[a]!==0)break}Jr(Pm,"negate");var KE=class{constructor(e,a){this.toUtf8=e,this.fromUtf8=a}static{Jr(this,"HeaderMarshaller")}format(e){let a=[];for(let r of Object.keys(e)){let h=this.fromUtf8(r);a.push(Uint8Array.from([h.byteLength]),h,this.formatHeaderValue(e[r]))}let n=new Uint8Array(a.reduce((r,h)=>r+h.byteLength,0)),i=0;for(let r of a)n.set(r,i),i+=r.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":let a=new DataView(new ArrayBuffer(3));return a.setUint8(0,3),a.setInt16(1,e.value,!1),new Uint8Array(a.buffer);case"integer":let n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":let i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":let r=new DataView(new ArrayBuffer(3+e.value.byteLength));r.setUint8(0,6),r.setUint16(1,e.value.byteLength,!1);let h=new Uint8Array(r.buffer);return h.set(e.value,3),h;case"string":let s=this.fromUtf8(e.value),S=new DataView(new ArrayBuffer(3+s.byteLength));S.setUint8(0,7),S.setUint16(1,s.byteLength,!1);let u=new Uint8Array(S.buffer);return u.set(s,3),u;case"timestamp":let B=new Uint8Array(9);return B[0]=8,B.set(fB.fromNumber(e.value.valueOf()).bytes,1),B;case"uuid":if(!fde.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);let M=new Uint8Array(17);return M[0]=9,M.set(lo.fromHex(e.value.replace(/\-/g,"")),1),M}}parse(e){let a={},n=0;while(n<e.byteLength){let i=e.getUint8(n++),r=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,i));switch(n+=i,e.getUint8(n++)){case 0:a[r]={type:GE,value:!0};break;case 1:a[r]={type:GE,value:!1};break;case 2:a[r]={type:Pde,value:e.getInt8(n++)};break;case 3:a[r]={type:Rde,value:e.getInt16(n,!1)},n+=2;break;case 4:a[r]={type:Wde,value:e.getInt32(n,!1)},n+=4;break;case 5:a[r]={type:tde,value:new fB(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:let h=e.getUint16(n,!1);n+=2,a[r]={type:Fde,value:new Uint8Array(e.buffer,e.byteOffset+n,h)},n+=h;break;case 7:let s=e.getUint16(n,!1);n+=2,a[r]={type:Ade,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,s))},n+=s;break;case 8:a[r]={type:Tde,value:new Date(new fB(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:let S=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,a[r]={type:Vde,value:`${lo.toHex(S.subarray(0,4))}-${lo.toHex(S.subarray(4,6))}-${lo.toHex(S.subarray(6,8))}-${lo.toHex(S.subarray(8,10))}-${lo.toHex(S.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return a}},GE="boolean",Pde="byte",Rde="short",Wde="integer",tde="long",Fde="binary",Ade="string",Tde="timestamp",Vde="uuid",fde=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,Jde=VB(),LE=4,ml=LE*2,oo=4,Nde=ml+oo*2;function wE({byteLength:e,byteOffset:a,buffer:n}){if(e<Nde)throw new Error("Provided message too short to accommodate event stream message overhead");let i=new DataView(n,a,e),r=i.getUint32(0,!1);if(e!==r)throw new Error("Reported message length does not match received message length");let h=i.getUint32(LE,!1),s=i.getUint32(ml,!1),S=i.getUint32(e-oo,!1),u=new Jde.Crc32().update(new Uint8Array(n,a,ml));if(s!==u.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${u.digest()})`);if(u.update(new Uint8Array(n,a+ml,e-(ml+oo))),S!==u.digest())throw new Error(`The message checksum (${u.digest()}) did not match the expected value of ${S}`);return{headers:new DataView(n,a+ml+oo,h),body:new Uint8Array(n,a+ml+oo+h,r-h-(ml+oo+oo))}}Jr(wE,"splitMessage");var Ede=class{static{Jr(this,"EventStreamCodec")}constructor(e,a){this.headerMarshaller=new KE(e,a),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){let e=this.messageBuffer.pop(),a=this.isEndOfStream;return{getMessage(){return e},isEndOfStream(){return a}}}getAvailableMessages(){let e=this.messageBuffer;this.messageBuffer=[];let a=this.isEndOfStream;return{getMessages(){return e},isEndOfStream(){return a}}}encode({headers:e,body:a}){let n=this.headerMarshaller.format(e),i=n.byteLength+a.byteLength+16,r=new Uint8Array(i),h=new DataView(r.buffer,r.byteOffset,r.byteLength),s=new wde.Crc32;return h.setUint32(0,i,!1),h.setUint32(4,n.byteLength,!1),h.setUint32(8,s.update(r.subarray(0,8)).digest(),!1),r.set(n,12),r.set(a,n.byteLength+12),h.setUint32(i-4,s.update(r.subarray(8,i-4)).digest(),!1),r}decode(e){let{headers:a,body:n}=wE(e);return{headers:this.headerMarshaller.parse(a),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}},vde=class{constructor(e){this.options=e}static{Jr(this,"MessageDecoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.decoder.decode(e)}},Yde=class{constructor(e){this.options=e}static{Jr(this,"MessageEncoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream)yield this.options.encoder.encode(e);if(this.options.includeEndFrame)yield new Uint8Array(0)}},Ode=class{constructor(e){this.options=e}static{Jr(this,"SmithyMessageDecoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.messageStream){let a=await this.options.deserializer(e);if(a===void 0)continue;yield a}}},Qde=class{constructor(e){this.options=e}static{Jr(this,"SmithyMessageEncoderStream")}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let e of this.options.inputStream)yield this.options.serializer(e)}}});var VE=G((uwe,TE)=>{var{defineProperty:NB,getOwnPropertyDescriptor:$de,getOwnPropertyNames:qde}=Object,Zde=Object.prototype.hasOwnProperty,qh=(e,a)=>NB(e,"name",{value:a,configurable:!0}),Ude=(e,a)=>{for(var n in a)NB(e,n,{get:a[n],enumerable:!0})},Xde=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of qde(a))if(!Zde.call(e,r)&&r!==n)NB(e,r,{get:()=>a[r],enumerable:!(i=$de(a,r))||i.enumerable})}return e},jde=(e)=>Xde(NB({},"__esModule",{value:!0}),e),WE={};Ude(WE,{EventStreamMarshaller:()=>AE,eventStreamSerdeProvider:()=>Ide});TE.exports=jde(WE);var yk=RE();function tE(e){let a=0,n=0,i=null,r=null,h=qh((S)=>{if(typeof S!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+S);a=S,n=4,i=new Uint8Array(S),new DataView(i.buffer).setUint32(0,S,!1)},"allocateMessage"),s=qh(async function*(){let S=e[Symbol.asyncIterator]();while(!0){let{value:u,done:B}=await S.next();if(B){if(!a)return;else if(a===n)yield i;else throw new Error("Truncated event message received.");return}let M=u.length,C=0;while(C<M){if(!i){let R=M-C;if(!r)r=new Uint8Array(4);let W=Math.min(4-n,R);if(r.set(u.slice(C,C+W),n),n+=W,C+=W,n<4)break;h(new DataView(r.buffer).getUint32(0,!1)),r=null}let H=Math.min(a-n,M-C);if(i.set(u.slice(C,C+H),n),n+=H,C+=H,a&&a===n)yield i,i=null,a=0,n=0}}},"iterator");return{[Symbol.asyncIterator]:s}}qh(tE,"getChunkedStream");function FE(e,a){return async function(n){let{value:i}=n.headers[":message-type"];if(i==="error"){let r=new Error(n.headers[":error-message"].value||"UnknownError");throw r.name=n.headers[":error-code"].value,r}else if(i==="exception"){let r=n.headers[":exception-type"].value,h={[r]:n},s=await e(h);if(s.$unknown){let S=new Error(a(n.body));throw S.name=r,S}throw s[r]}else if(i==="event"){let r={[n.headers[":event-type"].value]:n},h=await e(r);if(h.$unknown)return;return h}else throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}qh(FE,"getMessageUnmarshaller");var AE=class{static{qh(this,"EventStreamMarshaller")}constructor({utf8Encoder:e,utf8Decoder:a}){this.eventStreamCodec=new yk.EventStreamCodec(e,a),this.utfEncoder=e}deserialize(e,a){let n=tE(e);return new yk.SmithyMessageDecoderStream({messageStream:new yk.MessageDecoderStream({inputStream:n,decoder:this.eventStreamCodec}),deserializer:FE(a,this.utfEncoder)})}serialize(e,a){return new yk.MessageEncoderStream({messageStream:new yk.SmithyMessageEncoderStream({inputStream:e,serializer:a}),encoder:this.eventStreamCodec,includeEndFrame:!0})}},Ide=qh((e)=>new AE(e),"eventStreamSerdeProvider")});var vE=G((cwe,EE)=>{var{defineProperty:EB,getOwnPropertyDescriptor:xde,getOwnPropertyNames:_de}=Object,pde=Object.prototype.hasOwnProperty,Rm=(e,a)=>EB(e,"name",{value:a,configurable:!0}),eye=(e,a)=>{for(var n in a)EB(e,n,{get:a[n],enumerable:!0})},aye=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of _de(a))if(!pde.call(e,r)&&r!==n)EB(e,r,{get:()=>a[r],enumerable:!(i=xde(a,r))||i.enumerable})}return e},nye=(e)=>aye(EB({},"__esModule",{value:!0}),e),fE={};eye(fE,{EventStreamMarshaller:()=>NE,eventStreamSerdeProvider:()=>lye});EE.exports=nye(fE);var iye=VE(),rye=De("stream");async function*JE(e){let a=!1,n=!1,i=new Array;e.on("error",(r)=>{if(!a)a=!0;if(r)throw r}),e.on("data",(r)=>{i.push(r)}),e.on("end",()=>{a=!0});while(!n){let r=await new Promise((h)=>setTimeout(()=>h(i.shift()),0));if(r)yield r;n=a&&i.length===0}}Rm(JE,"readabletoIterable");var NE=class{static{Rm(this,"EventStreamMarshaller")}constructor({utf8Encoder:e,utf8Decoder:a}){this.universalMarshaller=new iye.EventStreamMarshaller({utf8Decoder:a,utf8Encoder:e})}deserialize(e,a){let n=typeof e[Symbol.asyncIterator]==="function"?e:JE(e);return this.universalMarshaller.deserialize(n,a)}serialize(e,a){return rye.Readable.from(this.universalMarshaller.serialize(e,a))}},lye=Rm((e)=>new NE(e),"eventStreamSerdeProvider")});var e0=G((_E)=>{Object.defineProperty(_E,"__esModule",{value:!0});_E.ruleSet=void 0;var XE="required",ue="type",sa="rules",na="conditions",Ce="fn",ze="argv",ga="ref",mk="assign",er="url",ar="properties",nr="headers",oye=!0,ko="isSet",ho="stringEquals",Wm="aws.parseArn",so="arn",Gn="booleanEquals",tn="endpoint",Ba="tree",Ma="error",Zh={[XE]:!1,[ue]:"String"},YE={[XE]:!0,default:!1,[ue]:"Boolean"},tm={[Ce]:"not",[ze]:[{[Ce]:ko,[ze]:[{[ga]:"Endpoint"}]}]},jE={[ga]:"Endpoint"},vB={[Ce]:ko,[ze]:[{[ga]:"Region"}]},YB={[Ce]:"aws.partition",[ze]:[{[ga]:"Region"}],[mk]:"PartitionResult"},Fm={[Ce]:"not",[ze]:[{[Ce]:ho,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"name"]},"aws-iso"]}]},fm={[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"name"]},Am={[Ce]:"not",[ze]:[{[Ce]:ho,[ze]:[fm,"aws-iso-b"]}]},OB={[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsFIPS"]},mi={},IE={[Ma]:"FIPS is enabled but this partition does not support FIPS",[ue]:Ma},xE={[Ma]:"DualStack is enabled but this partition does not support DualStack",[ue]:Ma},Tm={[Ma]:"Invalid ARN: Failed to parse ARN.",[ue]:Ma},OE={[Ce]:Gn,[ze]:[!0,{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsDualStack"]}]},QE=[{[ga]:"StreamARN"}],hye=[{[Ce]:ko,[ze]:[jE]}],Vm=[{[na]:[{[Ce]:"isValidHostLabel",[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"accountId"]},!1]}],[sa]:[{[na]:[{[Ce]:"isValidHostLabel",[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"region"]},!1]}],[sa]:[{[na]:[{[Ce]:ho,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"service"]},"kinesis"]}],[sa]:[{[na]:[{[Ce]:"getAttr",[ze]:[{[ga]:so},"resourceId[0]"],[mk]:"arnType"},{[Ce]:"not",[ze]:[{[Ce]:ho,[ze]:[{[ga]:"arnType"},""]}]}],[sa]:[{[na]:[{[Ce]:ho,[ze]:[{[ga]:"arnType"},"stream"]}],[sa]:[{[na]:[{[Ce]:ho,[ze]:[fm,"{arn#partition}"]}],[sa]:[{[na]:[{[Ce]:ko,[ze]:[{[ga]:"OperationType"}]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]},{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[OB,!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsDualStack"]},!0]}],[sa]:[{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},{[Ma]:"DualStack is enabled, but this partition does not support DualStack.",[ue]:Ma}],[ue]:Ba},{[Ma]:"FIPS is enabled, but this partition does not support FIPS.",[ue]:Ma}],[ue]:Ba},{[na]:[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[OB,!0]}],[sa]:[{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},IE],[ue]:Ba},{[na]:[{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],[sa]:[{[na]:[{[Ce]:Gn,[ze]:[{[Ce]:"getAttr",[ze]:[{[ga]:"PartitionResult"},"supportsDualStack"]},!0]}],[sa]:[{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},xE],[ue]:Ba},{[tn]:{[er]:"https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}",[ar]:{},[nr]:{}},[ue]:tn}],[ue]:Ba},{[Ma]:"Operation Type is not set. Please contact service team for resolution.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: No ARN type specified",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: Invalid region.",[ue]:Ma}],[ue]:Ba},{[Ma]:"Invalid ARN: Invalid account id.",[ue]:Ma}],sye=[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]},{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],kye=[{[Ce]:Gn,[ze]:[OB,!0]}],$E=[{[Ce]:Gn,[ze]:[{[ga]:"UseFIPS"},!0]}],qE=[{[Ce]:Gn,[ze]:[{[ga]:"UseDualStack"},!0]}],ZE=[{[ga]:"ConsumerARN"}],UE=[{[ga]:"ResourceARN"}],Sye={version:"1.0",parameters:{Region:Zh,UseDualStack:YE,UseFIPS:YE,Endpoint:Zh,StreamARN:Zh,OperationType:Zh,ConsumerARN:Zh,ResourceARN:Zh},[sa]:[{[na]:[{[Ce]:ko,[ze]:QE},tm,vB,YB,Fm,Am],[sa]:[{[na]:[{[Ce]:Wm,[ze]:QE,[mk]:so}],[sa]:Vm,[ue]:Ba},Tm],[ue]:Ba},{[na]:[{[Ce]:ko,[ze]:ZE},tm,vB,YB,Fm,Am],[sa]:[{[na]:[{[Ce]:Wm,[ze]:ZE,[mk]:so}],[sa]:Vm,[ue]:Ba},Tm],[ue]:Ba},{[na]:[{[Ce]:ko,[ze]:UE},tm,vB,YB,Fm,Am],[sa]:[{[na]:[{[Ce]:Wm,[ze]:UE,[mk]:so}],[sa]:Vm,[ue]:Ba},Tm],[ue]:Ba},{[na]:hye,[sa]:[{[na]:$E,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[ue]:Ma},{[na]:qE,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[ue]:Ma},{endpoint:{[er]:jE,[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},{[na]:[vB],[sa]:[{[na]:[YB],[sa]:[{[na]:sye,[sa]:[{[na]:[{[Ce]:Gn,[ze]:[oye,OB]},OE],[sa]:[{endpoint:{[er]:"https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[ue]:Ma}],[ue]:Ba},{[na]:$E,[sa]:[{[na]:kye,[sa]:[{[na]:[{[Ce]:ho,[ze]:[fm,"aws-us-gov"]}],endpoint:{[er]:"https://kinesis.{Region}.amazonaws.com",[ar]:mi,[nr]:mi},[ue]:tn},{endpoint:{[er]:"https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},IE],[ue]:Ba},{[na]:qE,[sa]:[{[na]:[OE],[sa]:[{endpoint:{[er]:"https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba},xE],[ue]:Ba},{endpoint:{[er]:"https://kinesis.{Region}.{PartitionResult#dnsSuffix}",[ar]:mi,[nr]:mi},[ue]:tn}],[ue]:Ba}],[ue]:Ba},{error:"Invalid Configuration: Missing Region",[ue]:Ma}]};_E.ruleSet=Sye});var i0=G((a0)=>{Object.defineProperty(a0,"__esModule",{value:!0});a0.defaultEndpointResolver=void 0;var uye=$l(),Jm=Ql(),Bye=e0(),cye=new Jm.EndpointCache({size:50,params:["ConsumerARN","Endpoint","OperationType","Region","ResourceARN","StreamARN","UseDualStack","UseFIPS"]}),Mye=(e,a={})=>{return cye.get(e,()=>Jm.resolveEndpoint(Bye.ruleSet,{endpointParams:e,logger:a.logger}))};a0.defaultEndpointResolver=Mye;Jm.customEndpointFunctions.aws=uye.awsEndpointFunctions});var s0=G((o0)=>{Object.defineProperty(o0,"__esModule",{value:!0});o0.getRuntimeConfig=void 0;var gye=Na(),dye=we(),yye=Dr(),r0=Mn(),l0=Qa(),mye=bm(),Cye=i0(),zye=(e)=>{return{apiVersion:"2013-12-02",base64Decoder:e?.base64Decoder??r0.fromBase64,base64Encoder:e?.base64Encoder??r0.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Cye.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??mye.defaultKinesisHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(a)=>a.getIdentityProvider("aws.auth#sigv4"),signer:new gye.AwsSdkSigV4Signer}],logger:e?.logger??new dye.NoOpLogger,serviceId:e?.serviceId??"Kinesis",urlParser:e?.urlParser??yye.parseUrl,utf8Decoder:e?.utf8Decoder??l0.fromUtf8,utf8Encoder:e?.utf8Encoder??l0.toUtf8}};o0.getRuntimeConfig=zye});var g0=G((c0)=>{Object.defineProperty(c0,"__esModule",{value:!0});c0.getRuntimeConfig=void 0;var Hye=an(),bye=Hye.__importDefault(ZN()),k0=Na(),Gye=um(),S0=yh(),QB=li(),Dye=vE(),Kye=mh(),u0=Ti(),So=Lr(),B0=ll(),Lye=Ch(),wye=_l(),Pye=s0(),Rye=we(),Wye=Gh(),tye=we(),Fye=(e)=>{tye.emitWarningIfUnsupportedVersion(process.version);let a=Wye.resolveDefaultsModeConfig(e),n=()=>a().then(Rye.loadConfigsForDefaultMode),i=Pye.getRuntimeConfig(e);k0.emitWarningIfUnsupportedVersion(process.version);let r={profile:e?.profile,logger:i.logger};return{...i,...e,runtime:"node",defaultsMode:a,authSchemePreference:e?.authSchemePreference??So.loadConfig(k0.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,r),bodyLengthChecker:e?.bodyLengthChecker??Lye.calculateBodyLength,credentialDefaultProvider:e?.credentialDefaultProvider??Gye.defaultProvider,defaultUserAgentProvider:e?.defaultUserAgentProvider??S0.createDefaultUserAgentProvider({serviceId:i.serviceId,clientVersion:bye.default.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??Dye.eventStreamSerdeProvider,maxAttempts:e?.maxAttempts??So.loadConfig(u0.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??So.loadConfig(QB.NODE_REGION_CONFIG_OPTIONS,{...QB.NODE_REGION_CONFIG_FILE_OPTIONS,...r}),requestHandler:B0.NodeHttp2Handler.create(e?.requestHandler??(async()=>({...await n(),disableConcurrentStreams:!0}))),retryMode:e?.retryMode??So.loadConfig({...u0.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await n()).retryMode||wye.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Kye.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??B0.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??So.loadConfig(QB.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,r),useFipsEndpoint:e?.useFipsEndpoint??So.loadConfig(QB.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,r),userAgentAppId:e?.userAgentAppId??So.loadConfig(S0.NODE_APP_ID_CONFIG_OPTIONS,r)}};c0.getRuntimeConfig=Fye});var b0=G((Cwe,H0)=>{var{defineProperty:$B,getOwnPropertyDescriptor:Aye,getOwnPropertyNames:Tye}=Object,Vye=Object.prototype.hasOwnProperty,ir=(e,a)=>$B(e,"name",{value:a,configurable:!0}),fye=(e,a)=>{for(var n in a)$B(e,n,{get:a[n],enumerable:!0})},Jye=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Tye(a))if(!Vye.call(e,r)&&r!==n)$B(e,r,{get:()=>a[r],enumerable:!(i=Aye(a,r))||i.enumerable})}return e},Nye=(e)=>Jye($B({},"__esModule",{value:!0}),e),m0={};fye(m0,{WaiterState:()=>z0,checkExceptions:()=>vye,createWaiter:()=>qye,waiterServiceDefaults:()=>C0});H0.exports=Nye(m0);var Eye=ir((e)=>{return new Promise((a)=>setTimeout(a,e*1000))},"sleep"),C0={minDelay:2,maxDelay:120},z0=((e)=>{return e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT",e})(z0||{}),vye=ir((e)=>{if(e.state==="ABORTED"){let a=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw a.name="AbortError",a}else if(e.state==="TIMEOUT"){let a=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw a.name="TimeoutError",a}else if(e.state!=="SUCCESS")throw new Error(`${JSON.stringify(e)}`);return e},"checkExceptions"),Yye=ir((e,a,n,i)=>{if(i>n)return a;let r=e*2**(i-1);return Oye(e,r)},"exponentialBackoffWithJitter"),Oye=ir((e,a)=>e+Math.random()*(a-e),"randomInRange"),Qye=ir(async({minDelay:e,maxDelay:a,maxWaitTime:n,abortController:i,client:r,abortSignal:h},s,S)=>{let u={},{state:B,reason:M}=await S(r,s);if(M){let W=d0(M);u[W]|=0,u[W]+=1}if(B!=="RETRY")return{state:B,reason:M,observedResponses:u};let C=1,H=Date.now()+n*1000,R=Math.log(a/e)/Math.log(2)+1;while(!0){if(i?.signal?.aborted||h?.aborted)return u["AbortController signal aborted."]|=0,u["AbortController signal aborted."]+=1,{state:"ABORTED",observedResponses:u};let W=Yye(e,a,R,C);if(Date.now()+W*1000>H)return{state:"TIMEOUT",observedResponses:u};await Eye(W);let{state:A,reason:Y}=await S(r,s);if(Y){let N=d0(Y);u[N]|=0,u[N]+=1}if(A!=="RETRY")return{state:A,reason:Y,observedResponses:u};C+=1}},"runPolling"),d0=ir((e)=>{if(e?.$responseBodyText)return`Deserialization error for body: ${e.$responseBodyText}`;if(e?.$metadata?.httpStatusCode){if(e.$response||e.message)return`${e.$response.statusCode??e.$metadata.httpStatusCode??"Unknown"}: ${e.message}`;return`${e.$metadata.httpStatusCode}: OK`}return String(e?.message??JSON.stringify(e)??"Unknown")},"createMessageFromResponse"),$ye=ir((e)=>{if(e.maxWaitTime<=0)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");else if(e.minDelay<=0)throw new Error("WaiterConfiguration.minDelay must be greater than 0");else if(e.maxDelay<=0)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");else if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);else if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)},"validateWaiterOptions"),y0=ir((e)=>{let a,n=new Promise((i)=>{if(a=ir(()=>i({state:"ABORTED"}),"onAbort"),typeof e.addEventListener==="function")e.addEventListener("abort",a);else e.onabort=a});return{clearListener(){if(typeof e.removeEventListener==="function")e.removeEventListener("abort",a)},aborted:n}},"abortTimeout"),qye=ir(async(e,a,n)=>{let i={...C0,...e};$ye(i);let r=[Qye(i,a,n)],h=[];if(e.abortSignal){let{aborted:s,clearListener:S}=y0(e.abortSignal);h.push(S),r.push(s)}if(e.abortController?.signal){let{aborted:s,clearListener:S}=y0(e.abortController.signal);h.push(S),r.push(s)}return Promise.race(r).then((s)=>{for(let S of h)S();return s})},"createWaiter")});var E1=G((zwe,N1)=>{var{defineProperty:qB,getOwnPropertyDescriptor:Zye,getOwnPropertyNames:Uye}=Object,Xye=Object.prototype.hasOwnProperty,D=(e,a)=>qB(e,"name",{value:a,configurable:!0}),jye=(e,a)=>{for(var n in a)qB(e,n,{get:a[n],enumerable:!0})},Iye=(e,a,n,i)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let r of Uye(a))if(!Xye.call(e,r)&&r!==n)qB(e,r,{get:()=>a[r],enumerable:!(i=Zye(a,r))||i.enumerable})}return e},xye=(e)=>Iye(qB({},"__esModule",{value:!0}),e),P0={};jye(P0,{AccessDeniedException:()=>R0,AddTagsToStreamCommand:()=>i1,ConsumerStatus:()=>sme,CreateStreamCommand:()=>r1,DecreaseStreamRetentionPeriodCommand:()=>l1,DeleteResourcePolicyCommand:()=>o1,DeleteStreamCommand:()=>h1,DeregisterStreamConsumerCommand:()=>s1,DescribeLimitsCommand:()=>k1,DescribeStreamCommand:()=>UB,DescribeStreamConsumerCommand:()=>S1,DescribeStreamSummaryCommand:()=>u1,DisableEnhancedMonitoringCommand:()=>B1,EnableEnhancedMonitoringCommand:()=>c1,EncryptionType:()=>Sme,ExpiredIteratorException:()=>T0,ExpiredNextTokenException:()=>V0,GetRecordsCommand:()=>M1,GetResourcePolicyCommand:()=>g1,GetShardIteratorCommand:()=>d1,IncreaseStreamRetentionPeriodCommand:()=>y1,InternalFailureException:()=>f0,InvalidArgumentException:()=>W0,KMSAccessDeniedException:()=>J0,KMSDisabledException:()=>N0,KMSInvalidStateException:()=>E0,KMSNotFoundException:()=>v0,KMSOptInRequired:()=>Y0,KMSThrottlingException:()=>O0,Kinesis:()=>V1,KinesisClient:()=>ZB,KinesisServiceException:()=>ln,LimitExceededException:()=>t0,ListShardsCommand:()=>m1,ListStreamConsumersCommand:()=>vm,ListStreamsCommand:()=>Ym,ListTagsForResourceCommand:()=>C1,ListTagsForStreamCommand:()=>z1,MergeShardsCommand:()=>H1,MetricsName:()=>ume,ProvisionedThroughputExceededException:()=>Q0,PutRecordCommand:()=>b1,PutRecordsCommand:()=>G1,PutResourcePolicyCommand:()=>D1,RegisterStreamConsumerCommand:()=>K1,RemoveTagsFromStreamCommand:()=>L1,ResourceInUseException:()=>F0,ResourceNotFoundException:()=>A0,ScalingType:()=>gme,ShardFilterType:()=>Mme,ShardIteratorType:()=>cme,SplitShardCommand:()=>w1,StartStreamEncryptionCommand:()=>P1,StopStreamEncryptionCommand:()=>R1,StreamMode:()=>kme,StreamStatus:()=>Bme,SubscribeToShardCommand:()=>W1,SubscribeToShardEventStream:()=>Em,SubscribeToShardEventStreamFilterSensitiveLog:()=>dme,SubscribeToShardOutputFilterSensitiveLog:()=>q0,TagResourceCommand:()=>t1,UntagResourceCommand:()=>F1,UpdateShardCountCommand:()=>A1,UpdateStreamModeCommand:()=>T1,ValidationException:()=>$0,__Client:()=>L.Client,paginateListStreamConsumers:()=>Dze,paginateListStreams:()=>Kze,waitForStreamExists:()=>Lze,waitForStreamNotExists:()=>Pze,waitUntilStreamExists:()=>wze,waitUntilStreamNotExists:()=>Rze});N1.exports=xye(P0);var G0=Io(),_ye=xo(),pye=_o(),D0=jl(),eme=li(),Ck=Hn(),ame=QN(),nme=Bh(),Ye=wr(),K0=Ti(),L0=bm(),ime=D((e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"kinesis"})},"resolveClientEndpointParameters"),qe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},rme=g0(),w0=Dh(),Nm=za(),L=we(),lme=D((e)=>{let{httpAuthSchemes:a,httpAuthSchemeProvider:n,credentials:i}=e;return{setHttpAuthScheme(r){let h=a.findIndex((s)=>s.schemeId===r.schemeId);if(h===-1)a.push(r);else a.splice(h,1,r)},httpAuthSchemes(){return a},setHttpAuthSchemeProvider(r){n=r},httpAuthSchemeProvider(){return n},setCredentials(r){i=r},credentials(){return i}}},"getHttpAuthExtensionConfiguration"),ome=D((e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}},"resolveHttpAuthRuntimeConfig"),hme=D((e,a)=>{let n=Object.assign(w0.getAwsRegionExtensionConfiguration(e),L.getDefaultExtensionConfiguration(e),Nm.getHttpHandlerExtensionConfiguration(e),lme(e));return a.forEach((i)=>i.configure(n)),Object.assign(e,w0.resolveAwsRegionExtensionConfiguration(n),L.resolveDefaultRuntimeConfig(n),Nm.resolveHttpHandlerRuntimeConfig(n),ome(n))},"resolveRuntimeExtensions"),ZB=class extends L.Client{static{D(this,"KinesisClient")}config;constructor(...[e]){let a=rme.getRuntimeConfig(e||{});super(a);this.initConfig=a;let n=ime(a),i=D0.resolveUserAgentConfig(n),r=K0.resolveRetryConfig(i),h=eme.resolveRegionConfig(r),s=G0.resolveHostHeaderConfig(h),S=Ye.resolveEndpointConfig(s),u=ame.resolveEventStreamSerdeConfig(S),B=L0.resolveHttpAuthSchemeConfig(u),M=hme(B,e?.extensions||[]);this.config=M,this.middlewareStack.use(D0.getUserAgentPlugin(this.config)),this.middlewareStack.use(K0.getRetryPlugin(this.config)),this.middlewareStack.use(nme.getContentLengthPlugin(this.config)),this.middlewareStack.use(G0.getHostHeaderPlugin(this.config)),this.middlewareStack.use(_ye.getLoggerPlugin(this.config)),this.middlewareStack.use(pye.getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(Ck.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:L0.defaultKinesisHttpAuthSchemeParametersProvider,identityProviderConfigProvider:D(async(C)=>new Ck.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials}),"identityProviderConfigProvider")})),this.middlewareStack.use(Ck.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},Ze=br(),ka=Na(),ln=class e extends L.ServiceException{static{D(this,"KinesisServiceException")}constructor(a){super(a);Object.setPrototypeOf(this,e.prototype)}},R0=class e extends ln{static{D(this,"AccessDeniedException")}name="AccessDeniedException";$fault="client";constructor(a){super({name:"AccessDeniedException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},W0=class e extends ln{static{D(this,"InvalidArgumentException")}name="InvalidArgumentException";$fault="client";constructor(a){super({name:"InvalidArgumentException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},t0=class e extends ln{static{D(this,"LimitExceededException")}name="LimitExceededException";$fault="client";constructor(a){super({name:"LimitExceededException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},F0=class e extends ln{static{D(this,"ResourceInUseException")}name="ResourceInUseException";$fault="client";constructor(a){super({name:"ResourceInUseException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},A0=class e extends ln{static{D(this,"ResourceNotFoundException")}name="ResourceNotFoundException";$fault="client";constructor(a){super({name:"ResourceNotFoundException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},sme={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING"},kme={ON_DEMAND:"ON_DEMAND",PROVISIONED:"PROVISIONED"},Sme={KMS:"KMS",NONE:"NONE"},ume={ALL:"ALL",INCOMING_BYTES:"IncomingBytes",INCOMING_RECORDS:"IncomingRecords",ITERATOR_AGE_MILLISECONDS:"IteratorAgeMilliseconds",OUTGOING_BYTES:"OutgoingBytes",OUTGOING_RECORDS:"OutgoingRecords",READ_PROVISIONED_THROUGHPUT_EXCEEDED:"ReadProvisionedThroughputExceeded",WRITE_PROVISIONED_THROUGHPUT_EXCEEDED:"WriteProvisionedThroughputExceeded"},Bme={ACTIVE:"ACTIVE",CREATING:"CREATING",DELETING:"DELETING",UPDATING:"UPDATING"},T0=class e extends ln{static{D(this,"ExpiredIteratorException")}name="ExpiredIteratorException";$fault="client";constructor(a){super({name:"ExpiredIteratorException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},V0=class e extends ln{static{D(this,"ExpiredNextTokenException")}name="ExpiredNextTokenException";$fault="client";constructor(a){super({name:"ExpiredNextTokenException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},f0=class e extends ln{static{D(this,"InternalFailureException")}name="InternalFailureException";$fault="server";constructor(a){super({name:"InternalFailureException",$fault:"server",...a});Object.setPrototypeOf(this,e.prototype)}},J0=class e extends ln{static{D(this,"KMSAccessDeniedException")}name="KMSAccessDeniedException";$fault="client";constructor(a){super({name:"KMSAccessDeniedException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},N0=class e extends ln{static{D(this,"KMSDisabledException")}name="KMSDisabledException";$fault="client";constructor(a){super({name:"KMSDisabledException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},E0=class e extends ln{static{D(this,"KMSInvalidStateException")}name="KMSInvalidStateException";$fault="client";constructor(a){super({name:"KMSInvalidStateException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},v0=class e extends ln{static{D(this,"KMSNotFoundException")}name="KMSNotFoundException";$fault="client";constructor(a){super({name:"KMSNotFoundException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},Y0=class e extends ln{static{D(this,"KMSOptInRequired")}name="KMSOptInRequired";$fault="client";constructor(a){super({name:"KMSOptInRequired",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},O0=class e extends ln{static{D(this,"KMSThrottlingException")}name="KMSThrottlingException";$fault="client";constructor(a){super({name:"KMSThrottlingException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},Q0=class e extends ln{static{D(this,"ProvisionedThroughputExceededException")}name="ProvisionedThroughputExceededException";$fault="client";constructor(a){super({name:"ProvisionedThroughputExceededException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},cme={AFTER_SEQUENCE_NUMBER:"AFTER_SEQUENCE_NUMBER",AT_SEQUENCE_NUMBER:"AT_SEQUENCE_NUMBER",AT_TIMESTAMP:"AT_TIMESTAMP",LATEST:"LATEST",TRIM_HORIZON:"TRIM_HORIZON"},Mme={AFTER_SHARD_ID:"AFTER_SHARD_ID",AT_LATEST:"AT_LATEST",AT_TIMESTAMP:"AT_TIMESTAMP",AT_TRIM_HORIZON:"AT_TRIM_HORIZON",FROM_TIMESTAMP:"FROM_TIMESTAMP",FROM_TRIM_HORIZON:"FROM_TRIM_HORIZON"},$0=class e extends ln{static{D(this,"ValidationException")}name="ValidationException";$fault="client";constructor(a){super({name:"ValidationException",$fault:"client",...a});Object.setPrototypeOf(this,e.prototype)}},Em;((e)=>{e.visit=D((a,n)=>{if(a.SubscribeToShardEvent!==void 0)return n.SubscribeToShardEvent(a.SubscribeToShardEvent);if(a.ResourceNotFoundException!==void 0)return n.ResourceNotFoundException(a.ResourceNotFoundException);if(a.ResourceInUseException!==void 0)return n.ResourceInUseException(a.ResourceInUseException);if(a.KMSDisabledException!==void 0)return n.KMSDisabledException(a.KMSDisabledException);if(a.KMSInvalidStateException!==void 0)return n.KMSInvalidStateException(a.KMSInvalidStateException);if(a.KMSAccessDeniedException!==void 0)return n.KMSAccessDeniedException(a.KMSAccessDeniedException);if(a.KMSNotFoundException!==void 0)return n.KMSNotFoundException(a.KMSNotFoundException);if(a.KMSOptInRequired!==void 0)return n.KMSOptInRequired(a.KMSOptInRequired);if(a.KMSThrottlingException!==void 0)return n.KMSThrottlingException(a.KMSThrottlingException);if(a.InternalFailureException!==void 0)return n.InternalFailureException(a.InternalFailureException);return n._(a.$unknown[0],a.$unknown[1])},"visit")})(Em||(Em={}));var gme={UNIFORM_SCALING:"UNIFORM_SCALING"},dme=D((e)=>{if(e.SubscribeToShardEvent!==void 0)return{SubscribeToShardEvent:e.SubscribeToShardEvent};if(e.ResourceNotFoundException!==void 0)return{ResourceNotFoundException:e.ResourceNotFoundException};if(e.ResourceInUseException!==void 0)return{ResourceInUseException:e.ResourceInUseException};if(e.KMSDisabledException!==void 0)return{KMSDisabledException:e.KMSDisabledException};if(e.KMSInvalidStateException!==void 0)return{KMSInvalidStateException:e.KMSInvalidStateException};if(e.KMSAccessDeniedException!==void 0)return{KMSAccessDeniedException:e.KMSAccessDeniedException};if(e.KMSNotFoundException!==void 0)return{KMSNotFoundException:e.KMSNotFoundException};if(e.KMSOptInRequired!==void 0)return{KMSOptInRequired:e.KMSOptInRequired};if(e.KMSThrottlingException!==void 0)return{KMSThrottlingException:e.KMSThrottlingException};if(e.InternalFailureException!==void 0)return{InternalFailureException:e.InternalFailureException};if(e.$unknown!==void 0)return{[e.$unknown[0]]:"UNKNOWN"}},"SubscribeToShardEventStreamFilterSensitiveLog"),q0=D((e)=>({...e,...e.EventStream&&{EventStream:"STREAMING_CONTENT"}}),"SubscribeToShardOutputFilterSensitiveLog"),yme=D(async(e,a)=>{let n=Oe("AddTagsToStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_AddTagsToStreamCommand"),mme=D(async(e,a)=>{let n=Oe("CreateStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_CreateStreamCommand"),Cme=D(async(e,a)=>{let n=Oe("DecreaseStreamRetentionPeriod"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DecreaseStreamRetentionPeriodCommand"),zme=D(async(e,a)=>{let n=Oe("DeleteResourcePolicy"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DeleteResourcePolicyCommand"),Hme=D(async(e,a)=>{let n=Oe("DeleteStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DeleteStreamCommand"),bme=D(async(e,a)=>{let n=Oe("DeregisterStreamConsumer"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DeregisterStreamConsumerCommand"),Gme=D(async(e,a)=>{let n=Oe("DescribeLimits"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeLimitsCommand"),Dme=D(async(e,a)=>{let n=Oe("DescribeStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeStreamCommand"),Kme=D(async(e,a)=>{let n=Oe("DescribeStreamConsumer"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeStreamConsumerCommand"),Lme=D(async(e,a)=>{let n=Oe("DescribeStreamSummary"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DescribeStreamSummaryCommand"),wme=D(async(e,a)=>{let n=Oe("DisableEnhancedMonitoring"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_DisableEnhancedMonitoringCommand"),Pme=D(async(e,a)=>{let n=Oe("EnableEnhancedMonitoring"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_EnableEnhancedMonitoringCommand"),Rme=D(async(e,a)=>{let n=Oe("GetRecords"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_GetRecordsCommand"),Wme=D(async(e,a)=>{let n=Oe("GetResourcePolicy"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_GetResourcePolicyCommand"),tme=D(async(e,a)=>{let n=Oe("GetShardIterator"),i;return i=JSON.stringify(xCe(e,a)),Xe(a,n,"/",void 0,i)},"se_GetShardIteratorCommand"),Fme=D(async(e,a)=>{let n=Oe("IncreaseStreamRetentionPeriod"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_IncreaseStreamRetentionPeriodCommand"),Ame=D(async(e,a)=>{let n=Oe("ListShards"),i;return i=JSON.stringify(_Ce(e,a)),Xe(a,n,"/",void 0,i)},"se_ListShardsCommand"),Tme=D(async(e,a)=>{let n=Oe("ListStreamConsumers"),i;return i=JSON.stringify(pCe(e,a)),Xe(a,n,"/",void 0,i)},"se_ListStreamConsumersCommand"),Vme=D(async(e,a)=>{let n=Oe("ListStreams"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_ListStreamsCommand"),fme=D(async(e,a)=>{let n=Oe("ListTagsForResource"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_ListTagsForResourceCommand"),Jme=D(async(e,a)=>{let n=Oe("ListTagsForStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_ListTagsForStreamCommand"),Nme=D(async(e,a)=>{let n=Oe("MergeShards"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_MergeShardsCommand"),Eme=D(async(e,a)=>{let n=Oe("PutRecord"),i;return i=JSON.stringify(eze(e,a)),Xe(a,n,"/",void 0,i)},"se_PutRecordCommand"),vme=D(async(e,a)=>{let n=Oe("PutRecords"),i;return i=JSON.stringify(aze(e,a)),Xe(a,n,"/",void 0,i)},"se_PutRecordsCommand"),Yme=D(async(e,a)=>{let n=Oe("PutResourcePolicy"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_PutResourcePolicyCommand"),Ome=D(async(e,a)=>{let n=Oe("RegisterStreamConsumer"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_RegisterStreamConsumerCommand"),Qme=D(async(e,a)=>{let n=Oe("RemoveTagsFromStream"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_RemoveTagsFromStreamCommand"),$me=D(async(e,a)=>{let n=Oe("SplitShard"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_SplitShardCommand"),qme=D(async(e,a)=>{let n=Oe("StartStreamEncryption"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_StartStreamEncryptionCommand"),Zme=D(async(e,a)=>{let n=Oe("StopStreamEncryption"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_StopStreamEncryptionCommand"),Ume=D(async(e,a)=>{let n=Oe("SubscribeToShard"),i;return i=JSON.stringify(oze(e,a)),Xe(a,n,"/",void 0,i)},"se_SubscribeToShardCommand"),Xme=D(async(e,a)=>{let n=Oe("TagResource"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_TagResourceCommand"),jme=D(async(e,a)=>{let n=Oe("UntagResource"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_UntagResourceCommand"),Ime=D(async(e,a)=>{let n=Oe("UpdateShardCount"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_UpdateShardCountCommand"),xme=D(async(e,a)=>{let n=Oe("UpdateStreamMode"),i;return i=JSON.stringify(L._json(e)),Xe(a,n,"/",void 0,i)},"se_UpdateStreamModeCommand"),_me=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_AddTagsToStreamCommand"),pme=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_CreateStreamCommand"),eCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DecreaseStreamRetentionPeriodCommand"),aCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DeleteResourcePolicyCommand"),nCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DeleteStreamCommand"),iCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_DeregisterStreamConsumerCommand"),rCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_DescribeLimitsCommand"),lCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=Sze(n,a),{$metadata:ge(e),...i}},"de_DescribeStreamCommand"),oCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=kze(n,a),{$metadata:ge(e),...i}},"de_DescribeStreamConsumerCommand"),hCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=uze(n,a),{$metadata:ge(e),...i}},"de_DescribeStreamSummaryCommand"),sCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_DisableEnhancedMonitoringCommand"),kCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_EnableEnhancedMonitoringCommand"),SCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=Bze(n,a),{$metadata:ge(e),...i}},"de_GetRecordsCommand"),uCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_GetResourcePolicyCommand"),BCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_GetShardIteratorCommand"),cCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_IncreaseStreamRetentionPeriodCommand"),MCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_ListShardsCommand"),gCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=cze(n,a),{$metadata:ge(e),...i}},"de_ListStreamConsumersCommand"),dCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=Mze(n,a),{$metadata:ge(e),...i}},"de_ListStreamsCommand"),yCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_ListTagsForResourceCommand"),mCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_ListTagsForStreamCommand"),CCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_MergeShardsCommand"),zCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_PutRecordCommand"),HCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_PutRecordsCommand"),bCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_PutResourcePolicyCommand"),GCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=dze(n,a),{$metadata:ge(e),...i}},"de_RegisterStreamConsumerCommand"),DCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_RemoveTagsFromStreamCommand"),KCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_SplitShardCommand"),LCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_StartStreamEncryptionCommand"),wCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_StopStreamEncryptionCommand"),PCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n={EventStream:vCe(e.body,a)};return{$metadata:ge(e),...n}},"de_SubscribeToShardCommand"),RCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_TagResourceCommand"),WCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_UntagResourceCommand"),tCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);let n=await ka.parseJsonBody(e.body,a),i={};return i=L._json(n),{$metadata:ge(e),...i}},"de_UpdateShardCountCommand"),FCe=D(async(e,a)=>{if(e.statusCode>=300)return Ue(e,a);return await L.collectBody(e.body,a),{$metadata:ge(e)}},"de_UpdateStreamModeCommand"),Ue=D(async(e,a)=>{let n={...e,body:await ka.parseJsonErrorBody(e.body,a)},i=ka.loadRestJsonErrorCode(e,n.body);switch(i){case"AccessDeniedException":case"com.amazonaws.kinesis#AccessDeniedException":throw await ACe(n,a);case"InvalidArgumentException":case"com.amazonaws.kinesis#InvalidArgumentException":throw await fCe(n,a);case"LimitExceededException":case"com.amazonaws.kinesis#LimitExceededException":throw await JCe(n,a);case"ResourceInUseException":case"com.amazonaws.kinesis#ResourceInUseException":throw await p0(n,a);case"ResourceNotFoundException":case"com.amazonaws.kinesis#ResourceNotFoundException":throw await e1(n,a);case"ExpiredIteratorException":case"com.amazonaws.kinesis#ExpiredIteratorException":throw await TCe(n,a);case"InternalFailureException":case"com.amazonaws.kinesis#InternalFailureException":throw await Z0(n,a);case"KMSAccessDeniedException":case"com.amazonaws.kinesis#KMSAccessDeniedException":throw await U0(n,a);case"KMSDisabledException":case"com.amazonaws.kinesis#KMSDisabledException":throw await X0(n,a);case"KMSInvalidStateException":case"com.amazonaws.kinesis#KMSInvalidStateException":throw await j0(n,a);case"KMSNotFoundException":case"com.amazonaws.kinesis#KMSNotFoundException":throw await I0(n,a);case"KMSOptInRequired":case"com.amazonaws.kinesis#KMSOptInRequired":throw await x0(n,a);case"KMSThrottlingException":case"com.amazonaws.kinesis#KMSThrottlingException":throw await _0(n,a);case"ProvisionedThroughputExceededException":case"com.amazonaws.kinesis#ProvisionedThroughputExceededException":throw await NCe(n,a);case"ExpiredNextTokenException":case"com.amazonaws.kinesis#ExpiredNextTokenException":throw await VCe(n,a);case"ValidationException":case"com.amazonaws.kinesis#ValidationException":throw await ECe(n,a);default:let r=n.body;return bze({output:e,parsedBody:r,errorCode:i})}},"de_CommandError"),ACe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new R0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_AccessDeniedExceptionRes"),TCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new T0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ExpiredIteratorExceptionRes"),VCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new V0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ExpiredNextTokenExceptionRes"),Z0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new f0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_InternalFailureExceptionRes"),fCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new W0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_InvalidArgumentExceptionRes"),U0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new J0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSAccessDeniedExceptionRes"),X0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new N0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSDisabledExceptionRes"),j0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new E0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSInvalidStateExceptionRes"),I0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new v0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSNotFoundExceptionRes"),x0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new Y0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSOptInRequiredRes"),_0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new O0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_KMSThrottlingExceptionRes"),JCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new t0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_LimitExceededExceptionRes"),NCe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new Q0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ProvisionedThroughputExceededExceptionRes"),p0=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new F0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ResourceInUseExceptionRes"),e1=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new A0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ResourceNotFoundExceptionRes"),ECe=D(async(e,a)=>{let n=e.body,i=L._json(n),r=new $0({$metadata:ge(e),...i});return L.decorateServiceException(r,n)},"de_ValidationExceptionRes"),vCe=D((e,a)=>{return a.eventStreamMarshaller.deserialize(e,async(n)=>{if(n.SubscribeToShardEvent!=null)return{SubscribeToShardEvent:await ICe(n.SubscribeToShardEvent,a)};if(n.ResourceNotFoundException!=null)return{ResourceNotFoundException:await jCe(n.ResourceNotFoundException,a)};if(n.ResourceInUseException!=null)return{ResourceInUseException:await XCe(n.ResourceInUseException,a)};if(n.KMSDisabledException!=null)return{KMSDisabledException:await QCe(n.KMSDisabledException,a)};if(n.KMSInvalidStateException!=null)return{KMSInvalidStateException:await $Ce(n.KMSInvalidStateException,a)};if(n.KMSAccessDeniedException!=null)return{KMSAccessDeniedException:await OCe(n.KMSAccessDeniedException,a)};if(n.KMSNotFoundException!=null)return{KMSNotFoundException:await qCe(n.KMSNotFoundException,a)};if(n.KMSOptInRequired!=null)return{KMSOptInRequired:await ZCe(n.KMSOptInRequired,a)};if(n.KMSThrottlingException!=null)return{KMSThrottlingException:await UCe(n.KMSThrottlingException,a)};if(n.InternalFailureException!=null)return{InternalFailureException:await YCe(n.InternalFailureException,a)};return{$unknown:n}})},"de_SubscribeToShardEventStream"),YCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return Z0(n,a)},"de_InternalFailureException_event"),OCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return U0(n,a)},"de_KMSAccessDeniedException_event"),QCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return X0(n,a)},"de_KMSDisabledException_event"),$Ce=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return j0(n,a)},"de_KMSInvalidStateException_event"),qCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return I0(n,a)},"de_KMSNotFoundException_event"),ZCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return x0(n,a)},"de_KMSOptInRequired_event"),UCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return _0(n,a)},"de_KMSThrottlingException_event"),XCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return p0(n,a)},"de_ResourceInUseException_event"),jCe=D(async(e,a)=>{let n={...e,body:await ka.parseJsonBody(e.body,a)};return e1(n,a)},"de_ResourceNotFoundException_event"),ICe=D(async(e,a)=>{let n={},i=await ka.parseJsonBody(e.body,a);return Object.assign(n,Hze(i,a)),n},"de_SubscribeToShardEvent_event"),xCe=D((e,a)=>{return L.take(e,{ShardId:[],ShardIteratorType:[],StartingSequenceNumber:[],StreamARN:[],StreamName:[],Timestamp:D((n)=>n.getTime()/1000,"Timestamp")})},"se_GetShardIteratorInput"),_Ce=D((e,a)=>{return L.take(e,{ExclusiveStartShardId:[],MaxResults:[],NextToken:[],ShardFilter:D((n)=>rze(n,a),"ShardFilter"),StreamARN:[],StreamCreationTimestamp:D((n)=>n.getTime()/1000,"StreamCreationTimestamp"),StreamName:[]})},"se_ListShardsInput"),pCe=D((e,a)=>{return L.take(e,{MaxResults:[],NextToken:[],StreamARN:[],StreamCreationTimestamp:D((n)=>n.getTime()/1000,"StreamCreationTimestamp")})},"se_ListStreamConsumersInput"),eze=D((e,a)=>{return L.take(e,{Data:a.base64Encoder,ExplicitHashKey:[],PartitionKey:[],SequenceNumberForOrdering:[],StreamARN:[],StreamName:[]})},"se_PutRecordInput"),aze=D((e,a)=>{return L.take(e,{Records:D((n)=>ize(n,a),"Records"),StreamARN:[],StreamName:[]})},"se_PutRecordsInput"),nze=D((e,a)=>{return L.take(e,{Data:a.base64Encoder,ExplicitHashKey:[],PartitionKey:[]})},"se_PutRecordsRequestEntry"),ize=D((e,a)=>{return e.filter((n)=>n!=null).map((n)=>{return nze(n,a)})},"se_PutRecordsRequestEntryList"),rze=D((e,a)=>{return L.take(e,{ShardId:[],Timestamp:D((n)=>n.getTime()/1000,"Timestamp"),Type:[]})},"se_ShardFilter"),lze=D((e,a)=>{return L.take(e,{SequenceNumber:[],Timestamp:D((n)=>n.getTime()/1000,"Timestamp"),Type:[]})},"se_StartingPosition"),oze=D((e,a)=>{return L.take(e,{ConsumerARN:[],ShardId:[],StartingPosition:D((n)=>lze(n,a),"StartingPosition")})},"se_SubscribeToShardInput"),a1=D((e,a)=>{return L.take(e,{ConsumerARN:L.expectString,ConsumerCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"ConsumerCreationTimestamp"),ConsumerName:L.expectString,ConsumerStatus:L.expectString})},"de_Consumer"),hze=D((e,a)=>{return L.take(e,{ConsumerARN:L.expectString,ConsumerCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"ConsumerCreationTimestamp"),ConsumerName:L.expectString,ConsumerStatus:L.expectString,StreamARN:L.expectString})},"de_ConsumerDescription"),sze=D((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return a1(i,a)})},"de_ConsumerList"),kze=D((e,a)=>{return L.take(e,{ConsumerDescription:D((n)=>hze(n,a),"ConsumerDescription")})},"de_DescribeStreamConsumerOutput"),Sze=D((e,a)=>{return L.take(e,{StreamDescription:D((n)=>yze(n,a),"StreamDescription")})},"de_DescribeStreamOutput"),uze=D((e,a)=>{return L.take(e,{StreamDescriptionSummary:D((n)=>mze(n,a),"StreamDescriptionSummary")})},"de_DescribeStreamSummaryOutput"),Bze=D((e,a)=>{return L.take(e,{ChildShards:L._json,MillisBehindLatest:L.expectLong,NextShardIterator:L.expectString,Records:D((n)=>n1(n,a),"Records")})},"de_GetRecordsOutput"),cze=D((e,a)=>{return L.take(e,{Consumers:D((n)=>sze(n,a),"Consumers"),NextToken:L.expectString})},"de_ListStreamConsumersOutput"),Mze=D((e,a)=>{return L.take(e,{HasMoreStreams:L.expectBoolean,NextToken:L.expectString,StreamNames:L._json,StreamSummaries:D((n)=>zze(n,a),"StreamSummaries")})},"de_ListStreamsOutput"),gze=D((e,a)=>{return L.take(e,{ApproximateArrivalTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"ApproximateArrivalTimestamp"),Data:a.base64Decoder,EncryptionType:L.expectString,PartitionKey:L.expectString,SequenceNumber:L.expectString})},"de__Record"),n1=D((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return gze(i,a)})},"de_RecordList"),dze=D((e,a)=>{return L.take(e,{Consumer:D((n)=>a1(n,a),"Consumer")})},"de_RegisterStreamConsumerOutput"),yze=D((e,a)=>{return L.take(e,{EncryptionType:L.expectString,EnhancedMonitoring:L._json,HasMoreShards:L.expectBoolean,KeyId:L.expectString,RetentionPeriodHours:L.expectInt32,Shards:L._json,StreamARN:L.expectString,StreamCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"StreamCreationTimestamp"),StreamModeDetails:L._json,StreamName:L.expectString,StreamStatus:L.expectString})},"de_StreamDescription"),mze=D((e,a)=>{return L.take(e,{ConsumerCount:L.expectInt32,EncryptionType:L.expectString,EnhancedMonitoring:L._json,KeyId:L.expectString,OpenShardCount:L.expectInt32,RetentionPeriodHours:L.expectInt32,StreamARN:L.expectString,StreamCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"StreamCreationTimestamp"),StreamModeDetails:L._json,StreamName:L.expectString,StreamStatus:L.expectString})},"de_StreamDescriptionSummary"),Cze=D((e,a)=>{return L.take(e,{StreamARN:L.expectString,StreamCreationTimestamp:D((n)=>L.expectNonNull(L.parseEpochTimestamp(L.expectNumber(n))),"StreamCreationTimestamp"),StreamModeDetails:L._json,StreamName:L.expectString,StreamStatus:L.expectString})},"de_StreamSummary"),zze=D((e,a)=>{return(e||[]).filter((i)=>i!=null).map((i)=>{return Cze(i,a)})},"de_StreamSummaryList"),Hze=D((e,a)=>{return L.take(e,{ChildShards:L._json,ContinuationSequenceNumber:L.expectString,MillisBehindLatest:L.expectLong,Records:D((n)=>n1(n,a),"Records")})},"de_SubscribeToShardEvent"),ge=D((e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),"deserializeMetadata"),bze=L.withBaseException(ln),Xe=D(async(e,a,n,i,r)=>{let{hostname:h,protocol:s="https",port:S,path:u}=await e.endpoint(),B={protocol:s,hostname:h,port:S,method:"POST",path:u.endsWith("/")?u.slice(0,-1)+n:u+n,headers:a};if(i!==void 0)B.hostname=i;if(r!==void 0)B.body=r;return new Nm.HttpRequest(B)},"buildHttpRpcRequest");function Oe(e){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Kinesis_20131202.${e}`}}D(Oe,"sharedHeaders");var i1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","AddTagsToStream",{}).n("KinesisClient","AddTagsToStreamCommand").f(void 0,void 0).ser(yme).de(_me).build(){static{D(this,"AddTagsToStreamCommand")}},r1=class extends L.Command.classBuilder().ep(qe).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","CreateStream",{}).n("KinesisClient","CreateStreamCommand").f(void 0,void 0).ser(mme).de(pme).build(){static{D(this,"CreateStreamCommand")}},l1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DecreaseStreamRetentionPeriod",{}).n("KinesisClient","DecreaseStreamRetentionPeriodCommand").f(void 0,void 0).ser(Cme).de(eCe).build(){static{D(this,"DecreaseStreamRetentionPeriodCommand")}},o1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DeleteResourcePolicy",{}).n("KinesisClient","DeleteResourcePolicyCommand").f(void 0,void 0).ser(zme).de(aCe).build(){static{D(this,"DeleteResourcePolicyCommand")}},h1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DeleteStream",{}).n("KinesisClient","DeleteStreamCommand").f(void 0,void 0).ser(Hme).de(nCe).build(){static{D(this,"DeleteStreamCommand")}},s1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ConsumerARN:{type:"contextParams",name:"ConsumerARN"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DeregisterStreamConsumer",{}).n("KinesisClient","DeregisterStreamConsumerCommand").f(void 0,void 0).ser(bme).de(iCe).build(){static{D(this,"DeregisterStreamConsumerCommand")}},k1=class extends L.Command.classBuilder().ep(qe).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeLimits",{}).n("KinesisClient","DescribeLimitsCommand").f(void 0,void 0).ser(Gme).de(rCe).build(){static{D(this,"DescribeLimitsCommand")}},UB=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeStream",{}).n("KinesisClient","DescribeStreamCommand").f(void 0,void 0).ser(Dme).de(lCe).build(){static{D(this,"DescribeStreamCommand")}},S1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ConsumerARN:{type:"contextParams",name:"ConsumerARN"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeStreamConsumer",{}).n("KinesisClient","DescribeStreamConsumerCommand").f(void 0,void 0).ser(Kme).de(oCe).build(){static{D(this,"DescribeStreamConsumerCommand")}},u1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DescribeStreamSummary",{}).n("KinesisClient","DescribeStreamSummaryCommand").f(void 0,void 0).ser(Lme).de(hCe).build(){static{D(this,"DescribeStreamSummaryCommand")}},B1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","DisableEnhancedMonitoring",{}).n("KinesisClient","DisableEnhancedMonitoringCommand").f(void 0,void 0).ser(wme).de(sCe).build(){static{D(this,"DisableEnhancedMonitoringCommand")}},c1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","EnableEnhancedMonitoring",{}).n("KinesisClient","EnableEnhancedMonitoringCommand").f(void 0,void 0).ser(Pme).de(kCe).build(){static{D(this,"EnableEnhancedMonitoringCommand")}},M1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","GetRecords",{}).n("KinesisClient","GetRecordsCommand").f(void 0,void 0).ser(Rme).de(SCe).build(){static{D(this,"GetRecordsCommand")}},g1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","GetResourcePolicy",{}).n("KinesisClient","GetResourcePolicyCommand").f(void 0,void 0).ser(Wme).de(uCe).build(){static{D(this,"GetResourcePolicyCommand")}},d1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","GetShardIterator",{}).n("KinesisClient","GetShardIteratorCommand").f(void 0,void 0).ser(tme).de(BCe).build(){static{D(this,"GetShardIteratorCommand")}},y1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","IncreaseStreamRetentionPeriod",{}).n("KinesisClient","IncreaseStreamRetentionPeriodCommand").f(void 0,void 0).ser(Fme).de(cCe).build(){static{D(this,"IncreaseStreamRetentionPeriodCommand")}},m1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListShards",{}).n("KinesisClient","ListShardsCommand").f(void 0,void 0).ser(Ame).de(MCe).build(){static{D(this,"ListShardsCommand")}},vm=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListStreamConsumers",{}).n("KinesisClient","ListStreamConsumersCommand").f(void 0,void 0).ser(Tme).de(gCe).build(){static{D(this,"ListStreamConsumersCommand")}},Ym=class extends L.Command.classBuilder().ep(qe).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListStreams",{}).n("KinesisClient","ListStreamsCommand").f(void 0,void 0).ser(Vme).de(dCe).build(){static{D(this,"ListStreamsCommand")}},C1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListTagsForResource",{}).n("KinesisClient","ListTagsForResourceCommand").f(void 0,void 0).ser(fme).de(yCe).build(){static{D(this,"ListTagsForResourceCommand")}},z1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","ListTagsForStream",{}).n("KinesisClient","ListTagsForStreamCommand").f(void 0,void 0).ser(Jme).de(mCe).build(){static{D(this,"ListTagsForStreamCommand")}},H1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","MergeShards",{}).n("KinesisClient","MergeShardsCommand").f(void 0,void 0).ser(Nme).de(CCe).build(){static{D(this,"MergeShardsCommand")}},b1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutRecord",{}).n("KinesisClient","PutRecordCommand").f(void 0,void 0).ser(Eme).de(zCe).build(){static{D(this,"PutRecordCommand")}},G1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutRecords",{}).n("KinesisClient","PutRecordsCommand").f(void 0,void 0).ser(vme).de(HCe).build(){static{D(this,"PutRecordsCommand")}},D1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","PutResourcePolicy",{}).n("KinesisClient","PutResourcePolicyCommand").f(void 0,void 0).ser(Yme).de(bCe).build(){static{D(this,"PutResourcePolicyCommand")}},K1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","RegisterStreamConsumer",{}).n("KinesisClient","RegisterStreamConsumerCommand").f(void 0,void 0).ser(Ome).de(GCe).build(){static{D(this,"RegisterStreamConsumerCommand")}},L1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","RemoveTagsFromStream",{}).n("KinesisClient","RemoveTagsFromStreamCommand").f(void 0,void 0).ser(Qme).de(DCe).build(){static{D(this,"RemoveTagsFromStreamCommand")}},w1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","SplitShard",{}).n("KinesisClient","SplitShardCommand").f(void 0,void 0).ser($me).de(KCe).build(){static{D(this,"SplitShardCommand")}},P1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","StartStreamEncryption",{}).n("KinesisClient","StartStreamEncryptionCommand").f(void 0,void 0).ser(qme).de(LCe).build(){static{D(this,"StartStreamEncryptionCommand")}},R1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","StopStreamEncryption",{}).n("KinesisClient","StopStreamEncryptionCommand").f(void 0,void 0).ser(Zme).de(wCe).build(){static{D(this,"StopStreamEncryptionCommand")}},W1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"data"},ConsumerARN:{type:"contextParams",name:"ConsumerARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","SubscribeToShard",{eventStream:{output:!0}}).n("KinesisClient","SubscribeToShardCommand").f(void 0,q0).ser(Ume).de(PCe).build(){static{D(this,"SubscribeToShardCommand")}},t1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","TagResource",{}).n("KinesisClient","TagResourceCommand").f(void 0,void 0).ser(Xme).de(RCe).build(){static{D(this,"TagResourceCommand")}},F1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},ResourceARN:{type:"contextParams",name:"ResourceARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","UntagResource",{}).n("KinesisClient","UntagResourceCommand").f(void 0,void 0).ser(jme).de(WCe).build(){static{D(this,"UntagResourceCommand")}},A1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","UpdateShardCount",{}).n("KinesisClient","UpdateShardCountCommand").f(void 0,void 0).ser(Ime).de(tCe).build(){static{D(this,"UpdateShardCountCommand")}},T1=class extends L.Command.classBuilder().ep({...qe,OperationType:{type:"staticContextParams",value:"control"},StreamARN:{type:"contextParams",name:"StreamARN"}}).m(function(e,a,n,i){return[Ze.getSerdePlugin(n,this.serialize,this.deserialize),Ye.getEndpointPlugin(n,e.getEndpointParameterInstructions())]}).s("Kinesis_20131202","UpdateStreamMode",{}).n("KinesisClient","UpdateStreamModeCommand").f(void 0,void 0).ser(xme).de(FCe).build(){static{D(this,"UpdateStreamModeCommand")}},Gze={AddTagsToStreamCommand:i1,CreateStreamCommand:r1,DecreaseStreamRetentionPeriodCommand:l1,DeleteResourcePolicyCommand:o1,DeleteStreamCommand:h1,DeregisterStreamConsumerCommand:s1,DescribeLimitsCommand:k1,DescribeStreamCommand:UB,DescribeStreamConsumerCommand:S1,DescribeStreamSummaryCommand:u1,DisableEnhancedMonitoringCommand:B1,EnableEnhancedMonitoringCommand:c1,GetRecordsCommand:M1,GetResourcePolicyCommand:g1,GetShardIteratorCommand:d1,IncreaseStreamRetentionPeriodCommand:y1,ListShardsCommand:m1,ListStreamConsumersCommand:vm,ListStreamsCommand:Ym,ListTagsForResourceCommand:C1,ListTagsForStreamCommand:z1,MergeShardsCommand:H1,PutRecordCommand:b1,PutRecordsCommand:G1,PutResourcePolicyCommand:D1,RegisterStreamConsumerCommand:K1,RemoveTagsFromStreamCommand:L1,SplitShardCommand:w1,StartStreamEncryptionCommand:P1,StopStreamEncryptionCommand:R1,SubscribeToShardCommand:W1,TagResourceCommand:t1,UntagResourceCommand:F1,UpdateShardCountCommand:A1,UpdateStreamModeCommand:T1},V1=class extends ZB{static{D(this,"Kinesis")}};L.createAggregatedClient(Gze,V1);var Dze=Ck.createPaginator(ZB,vm,"NextToken","NextToken","MaxResults"),Kze=Ck.createPaginator(ZB,Ym,"NextToken","NextToken","Limit"),rr=b0(),f1=D(async(e,a)=>{let n;try{let i=await e.send(new UB(a));n=i;try{if(D(()=>{return i.StreamDescription.StreamStatus},"returnComparator")()==="ACTIVE")return{state:rr.WaiterState.SUCCESS,reason:n}}catch(r){}}catch(i){n=i}return{state:rr.WaiterState.RETRY,reason:n}},"checkState"),Lze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120};return rr.createWaiter({...n,...e},a,f1)},"waitForStreamExists"),wze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120},i=await rr.createWaiter({...n,...e},a,f1);return rr.checkExceptions(i)},"waitUntilStreamExists"),J1=D(async(e,a)=>{let n;try{n=await e.send(new UB(a))}catch(i){if(n=i,i.name&&i.name=="ResourceNotFoundException")return{state:rr.WaiterState.SUCCESS,reason:n}}return{state:rr.WaiterState.RETRY,reason:n}},"checkState"),Pze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120};return rr.createWaiter({...n,...e},a,J1)},"waitForStreamNotExists"),Rze=D(async(e,a)=>{let n={minDelay:10,maxDelay:120},i=await rr.createWaiter({...n,...e},a,J1);return rr.checkExceptions(i)},"waitUntilStreamNotExists")});var Y1=G((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0})});var Q1=G((O1)=>{Object.defineProperty(O1,"__esModule",{value:!0});O1.HttpAuthLocation=void 0;var Wze;(function(e){e.HEADER="header",e.QUERY="query"})(Wze=O1.HttpAuthLocation||(O1.HttpAuthLocation={}))});var q1=G(($1)=>{Object.defineProperty($1,"__esModule",{value:!0})});var U1=G((Z1)=>{Object.defineProperty(Z1,"__esModule",{value:!0})});var j1=G((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0})});var x1=G((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0})});var p1=G((_1)=>{Object.defineProperty(_1,"__esModule",{value:!0})});var av=G((ev)=>{Object.defineProperty(ev,"__esModule",{value:!0})});var rv=G((iv)=>{Object.defineProperty(iv,"__esModule",{value:!0})});var lv=G((zk)=>{Object.defineProperty(zk,"__esModule",{value:!0});var Qm=an();Qm.__exportStar(p1(),zk);Qm.__exportStar(av(),zk);Qm.__exportStar(rv(),zk)});var hv=G((ov)=>{Object.defineProperty(ov,"__esModule",{value:!0})});var kv=G((sv)=>{Object.defineProperty(sv,"__esModule",{value:!0})});var uv=G((Sv)=>{Object.defineProperty(Sv,"__esModule",{value:!0});Sv.EndpointURLScheme=void 0;var tze;(function(e){e.HTTP="http",e.HTTPS="https"})(tze=Sv.EndpointURLScheme||(Sv.EndpointURLScheme={}))});var cv=G((Bv)=>{Object.defineProperty(Bv,"__esModule",{value:!0})});var gv=G((Mv)=>{Object.defineProperty(Mv,"__esModule",{value:!0})});var yv=G((dv)=>{Object.defineProperty(dv,"__esModule",{value:!0})});var Cv=G((mv)=>{Object.defineProperty(mv,"__esModule",{value:!0})});var Hv=G((zv)=>{Object.defineProperty(zv,"__esModule",{value:!0})});var bv=G((uo)=>{Object.defineProperty(uo,"__esModule",{value:!0});var Hk=an();Hk.__exportStar(cv(),uo);Hk.__exportStar(gv(),uo);Hk.__exportStar(yv(),uo);Hk.__exportStar(Cv(),uo);Hk.__exportStar(Hv(),uo)});var Dv=G((Gv)=>{Object.defineProperty(Gv,"__esModule",{value:!0})});var Lv=G((Kv)=>{Object.defineProperty(Kv,"__esModule",{value:!0});Kv.FieldPosition=void 0;var Fze;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(Fze=Kv.FieldPosition||(Kv.FieldPosition={}))});var Pv=G((wv)=>{Object.defineProperty(wv,"__esModule",{value:!0})});var Wv=G((Rv)=>{Object.defineProperty(Rv,"__esModule",{value:!0})});var Fv=G((XB)=>{Object.defineProperty(XB,"__esModule",{value:!0});var tv=an();tv.__exportStar(Pv(),XB);tv.__exportStar(Wv(),XB)});var Tv=G((Av)=>{Object.defineProperty(Av,"__esModule",{value:!0})});var fv=G((Vv)=>{Object.defineProperty(Vv,"__esModule",{value:!0})});var Nv=G((Jv)=>{Object.defineProperty(Jv,"__esModule",{value:!0})});var vv=G((Ev)=>{Object.defineProperty(Ev,"__esModule",{value:!0})});var Ov=G((Yv)=>{Object.defineProperty(Yv,"__esModule",{value:!0})});var $v=G((Qv)=>{Object.defineProperty(Qv,"__esModule",{value:!0})});var Zv=G((qv)=>{Object.defineProperty(qv,"__esModule",{value:!0})});var Xv=G((Uv)=>{Object.defineProperty(Uv,"__esModule",{value:!0})});var Iv=G((jv)=>{Object.defineProperty(jv,"__esModule",{value:!0})});var _v=G((xv)=>{Object.defineProperty(xv,"__esModule",{value:!0})});var eY=G((pv)=>{Object.defineProperty(pv,"__esModule",{value:!0})});var nY=G((aY)=>{Object.defineProperty(aY,"__esModule",{value:!0})});var rY=G((iY)=>{Object.defineProperty(iY,"__esModule",{value:!0})});var oY=G((lY)=>{Object.defineProperty(lY,"__esModule",{value:!0});lY.RequestHandlerProtocol=void 0;var Aze;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(Aze=lY.RequestHandlerProtocol||(lY.RequestHandlerProtocol={}))});var sY=G((hY)=>{Object.defineProperty(hY,"__esModule",{value:!0})});var SY=G((kY)=>{Object.defineProperty(kY,"__esModule",{value:!0})});var BY=G((uY)=>{Object.defineProperty(uY,"__esModule",{value:!0})});var MY=G((cY)=>{Object.defineProperty(cY,"__esModule",{value:!0})});var dY=G((gY)=>{Object.defineProperty(gY,"__esModule",{value:!0})});var yY=G((je)=>{Object.defineProperty(je,"__esModule",{value:!0});var pe=an();pe.__exportStar(Y1(),je);pe.__exportStar(Q1(),je);pe.__exportStar(q1(),je);pe.__exportStar(U1(),je);pe.__exportStar(j1(),je);pe.__exportStar(x1(),je);pe.__exportStar(lv(),je);pe.__exportStar(hv(),je);pe.__exportStar(kv(),je);pe.__exportStar(uv(),je);pe.__exportStar(bv(),je);pe.__exportStar(Dv(),je);pe.__exportStar(Lv(),je);pe.__exportStar(Fv(),je);pe.__exportStar(Tv(),je);pe.__exportStar(fv(),je);pe.__exportStar(Nv(),je);pe.__exportStar(vv(),je);pe.__exportStar(Ov(),je);pe.__exportStar($v(),je);pe.__exportStar(Zv(),je);pe.__exportStar(Xv(),je);pe.__exportStar(Iv(),je);pe.__exportStar(_v(),je);pe.__exportStar(eY(),je);pe.__exportStar(nY(),je);pe.__exportStar(rY(),je);pe.__exportStar(oY(),je);pe.__exportStar(sY(),je);pe.__exportStar(SY(),je);pe.__exportStar(BY(),je);pe.__exportStar(MY(),je);pe.__exportStar(dY(),je)});var HY=G((CY)=>{Object.defineProperty(CY,"__esModule",{value:!0});CY.Field=void 0;var Tze=yY();class mY{constructor({name:e,kind:a=Tze.FieldPosition.HEADER,values:n=[]}){this.name=e,this.kind=a,this.values=n}add(e){this.values.push(e)}set(e){this.values=e}remove(e){this.values=this.values.filter((a)=>a!==e)}toString(){return this.values.map((e)=>e.includes(",")||e.includes(" ")?`"${e}"`:e).join(", ")}get(){return this.values}}CY.Field=mY});var KY=G((GY)=>{Object.defineProperty(GY,"__esModule",{value:!0});GY.Fields=void 0;class bY{constructor({fields:e=[],encoding:a="utf-8"}){this.entries={},e.forEach(this.setField.bind(this)),this.encoding=a}setField(e){this.entries[e.name.toLowerCase()]=e}getField(e){return this.entries[e.toLowerCase()]}removeField(e){delete this.entries[e.toLowerCase()]}getByType(e){return Object.values(this.entries).filter((a)=>a.kind===e)}}GY.Fields=bY});var wY=G((LY)=>{Object.defineProperty(LY,"__esModule",{value:!0})});var WY=G((PY)=>{Object.defineProperty(PY,"__esModule",{value:!0});PY.HttpRequest=void 0;class Um{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){if(!e)return!1;let a=e;return"method"in a&&"protocol"in a&&"hostname"in a&&"path"in a&&typeof a.query==="object"&&typeof a.headers==="object"}clone(){let e=new Um({...this,headers:{...this.headers}});if(e.query)e.query=Vze(e.query);return e}}PY.HttpRequest=Um;function Vze(e){return Object.keys(e).reduce((a,n)=>{let i=e[n];return{...a,[n]:Array.isArray(i)?[...i]:i}},{})}});var TY=G((FY)=>{Object.defineProperty(FY,"__esModule",{value:!0});FY.HttpResponse=void 0;class tY{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;let a=e;return typeof a.statusCode==="number"&&typeof a.headers==="object"}}FY.HttpResponse=tY});var JY=G((VY)=>{Object.defineProperty(VY,"__esModule",{value:!0});VY.isValidHostname=void 0;function fze(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}VY.isValidHostname=fze});var EY=G((NY)=>{Object.defineProperty(NY,"__esModule",{value:!0})});var Xm=G((Nr)=>{Object.defineProperty(Nr,"__esModule",{value:!0});var Bo=an();Bo.__exportStar(HY(),Nr);Bo.__exportStar(KY(),Nr);Bo.__exportStar(wY(),Nr);Bo.__exportStar(WY(),Nr);Bo.__exportStar(TY(),Nr);Bo.__exportStar(JY(),Nr);Bo.__exportStar(EY(),Nr)});var jm=G((vY)=>{Object.defineProperty(vY,"__esModule",{value:!0});vY.escapeUri=void 0;var Jze=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,Nze);vY.escapeUri=Jze;var Nze=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`});var $Y=G((OY)=>{Object.defineProperty(OY,"__esModule",{value:!0});OY.escapeUriPath=void 0;var Eze=jm(),vze=(e)=>e.split("/").map(Eze.escapeUri).join("/");OY.escapeUriPath=vze});var ZY=G((jB)=>{Object.defineProperty(jB,"__esModule",{value:!0});var qY=an();qY.__exportStar(jm(),jB);qY.__exportStar($Y(),jB)});var xm=G((UY)=>{Object.defineProperty(UY,"__esModule",{value:!0});UY.buildQueryString=void 0;var Im=ZY();function Yze(e){let a=[];for(let n of Object.keys(e).sort()){let i=e[n];if(n=Im.escapeUri(n),Array.isArray(i))for(let r=0,h=i.length;r<h;r++)a.push(`${n}=${Im.escapeUri(i[r])}`);else{let r=n;if(i||typeof i==="string")r+=`=${Im.escapeUri(i)}`;a.push(r)}}return a.join("&")}UY.buildQueryString=Yze});var xY=G((jY)=>{Object.defineProperty(jY,"__esModule",{value:!0});jY.NODEJS_TIMEOUT_ERROR_CODES=void 0;jY.NODEJS_TIMEOUT_ERROR_CODES=["ECONNRESET","EPIPE","ETIMEDOUT"]});var _m=G((_Y)=>{Object.defineProperty(_Y,"__esModule",{value:!0});_Y.getTransformedHeaders=void 0;var Oze=(e)=>{let a={};for(let n of Object.keys(e)){let i=e[n];a[n]=Array.isArray(i)?i.join(","):i}return a};_Y.getTransformedHeaders=Oze});var nO=G((eO)=>{Object.defineProperty(eO,"__esModule",{value:!0});eO.setConnectionTimeout=void 0;var Qze=(e,a,n=0)=>{if(!n)return;let i=setTimeout(()=>{e.destroy(),a(Object.assign(new Error(`Socket timed out without establishing a connection within ${n} ms`),{name:"TimeoutError"}))},n);e.on("socket",(r)=>{if(r.connecting)r.on("connect",()=>{clearTimeout(i)});else clearTimeout(i)})};eO.setConnectionTimeout=Qze});var lO=G((iO)=>{Object.defineProperty(iO,"__esModule",{value:!0});iO.setSocketKeepAlive=void 0;var $ze=(e,{keepAlive:a,keepAliveMsecs:n})=>{if(a!==!0)return;e.on("socket",(i)=>{i.setKeepAlive(a,n||0)})};iO.setSocketKeepAlive=$ze});var sO=G((oO)=>{Object.defineProperty(oO,"__esModule",{value:!0});oO.setSocketTimeout=void 0;var qze=(e,a,n=0)=>{e.setTimeout(n,()=>{e.destroy(),a(Object.assign(new Error(`Connection timed out after ${n} ms`),{name:"TimeoutError"}))})};oO.setSocketTimeout=qze});var pm=G((SO)=>{Object.defineProperty(SO,"__esModule",{value:!0});SO.writeRequestBody=void 0;var Zze=De("stream"),kO=1000;async function Uze(e,a,n=kO){var i;let r=(i=a.headers)!==null&&i!==void 0?i:{},h=r.Expect||r.expect,s=-1,S=!1;if(h==="100-continue")await Promise.race([new Promise((u)=>{s=Number(setTimeout(u,Math.max(kO,n)))}),new Promise((u)=>{e.on("continue",()=>{clearTimeout(s),u()}),e.on("error",()=>{S=!0,clearTimeout(s),u()})})]);if(!S)Xze(e,a.body)}SO.writeRequestBody=Uze;function Xze(e,a){if(a instanceof Zze.Readable)a.pipe(e);else if(a)e.end(Buffer.from(a));else e.end()}});var yO=G((gO)=>{Object.defineProperty(gO,"__esModule",{value:!0});gO.NodeHttpHandler=gO.DEFAULT_REQUEST_TIMEOUT=void 0;var jze=Xm(),Ize=xm(),BO=De("http"),cO=De("https"),xze=xY(),_ze=_m(),pze=nO(),eHe=lO(),aHe=sO(),nHe=pm();gO.DEFAULT_REQUEST_TIMEOUT=0;class MO{constructor(e){this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((a,n)=>{if(typeof e==="function")e().then((i)=>{a(this.resolveDefaultConfig(i))}).catch(n);else a(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){let{requestTimeout:a,connectionTimeout:n,socketTimeout:i,httpAgent:r,httpsAgent:h}=e||{},s=!0,S=50;return{connectionTimeout:n,requestTimeout:a!==null&&a!==void 0?a:i,httpAgent:r||new BO.Agent({keepAlive:!0,maxSockets:50}),httpsAgent:h||new cO.Agent({keepAlive:!0,maxSockets:50})}}destroy(){var e,a,n,i;(a=(e=this.config)===null||e===void 0?void 0:e.httpAgent)===null||a===void 0||a.destroy(),(i=(n=this.config)===null||n===void 0?void 0:n.httpsAgent)===null||i===void 0||i.destroy()}async handle(e,{abortSignal:a}={}){if(!this.config)this.config=await this.configProvider;return new Promise((n,i)=>{var r,h;let s=void 0,S=async(N)=>{await s,n(N)},u=async(N)=>{await s,i(N)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(a===null||a===void 0?void 0:a.aborted){let N=new Error("Request aborted");N.name="AbortError",u(N);return}let B=e.protocol==="https:",M=Ize.buildQueryString(e.query||{}),C=void 0;if(e.username!=null||e.password!=null){let N=(r=e.username)!==null&&r!==void 0?r:"",Z=(h=e.password)!==null&&h!==void 0?h:"";C=`${N}:${Z}`}let H=e.path;if(M)H+=`?${M}`;if(e.fragment)H+=`#${e.fragment}`;let R={headers:e.headers,host:e.hostname,method:e.method,path:H,port:e.port,agent:B?this.config.httpsAgent:this.config.httpAgent,auth:C},A=(B?cO.request:BO.request)(R,(N)=>{let Z=new jze.HttpResponse({statusCode:N.statusCode||-1,reason:N.statusMessage,headers:_ze.getTransformedHeaders(N.headers),body:N});S({response:Z})});if(A.on("error",(N)=>{if(xze.NODEJS_TIMEOUT_ERROR_CODES.includes(N.code))u(Object.assign(N,{name:"TimeoutError"}));else u(N)}),pze.setConnectionTimeout(A,u,this.config.connectionTimeout),aHe.setSocketTimeout(A,u,this.config.requestTimeout),a)a.onabort=()=>{A.abort();let N=new Error("Request aborted");N.name="AbortError",u(N)};let Y=R.agent;if(typeof Y==="object"&&"keepAlive"in Y)eHe.setSocketKeepAlive(A,{keepAlive:Y.keepAlive,keepAliveMsecs:Y.keepAliveMsecs});s=nHe.writeRequestBody(A,e,this.config.requestTimeout).catch(i)})}}gO.NodeHttpHandler=MO});var HO=G((CO)=>{Object.defineProperty(CO,"__esModule",{value:!0});CO.NodeHttp2ConnectionPool=void 0;class mO{constructor(e){this.sessions=[],this.sessions=e!==null&&e!==void 0?e:[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter((a)=>a!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(let a of this.sessions)if(a===e){if(!a.destroyed)a.destroy()}}}CO.NodeHttp2ConnectionPool=mO});var KO=G((GO)=>{Object.defineProperty(GO,"__esModule",{value:!0});GO.NodeHttp2ConnectionManager=void 0;var rHe=an(),lHe=rHe.__importDefault(De("http2")),oHe=HO();class bO{constructor(e){if(this.sessionCache=new Map,this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(e,a){let n=this.getUrlString(e),i=this.sessionCache.get(n);if(i){let S=i.poll();if(S&&!this.config.disableConcurrency)return S}let r=lHe.default.connect(n);if(this.config.maxConcurrency)r.settings({maxConcurrentStreams:this.config.maxConcurrency},(S)=>{if(S)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())});r.unref();let h=()=>{r.destroy(),this.deleteSession(n,r)};if(r.on("goaway",h),r.on("error",h),r.on("frameError",h),r.on("close",()=>this.deleteSession(n,r)),a.requestTimeout)r.setTimeout(a.requestTimeout,h);let s=this.sessionCache.get(n)||new oHe.NodeHttp2ConnectionPool;return s.offerLast(r),this.sessionCache.set(n,s),r}deleteSession(e,a){let n=this.sessionCache.get(e);if(!n)return;if(!n.contains(a))return;n.remove(a),this.sessionCache.set(e,n)}release(e,a){var n;let i=this.getUrlString(e);(n=this.sessionCache.get(i))===null||n===void 0||n.offerLast(a)}destroy(){for(let[e,a]of this.sessionCache){for(let n of a){if(!n.destroyed)n.destroy();a.remove(n)}this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}}GO.NodeHttp2ConnectionManager=bO});var WO=G((PO)=>{Object.defineProperty(PO,"__esModule",{value:!0});PO.NodeHttp2Handler=void 0;var hHe=Xm(),sHe=xm(),LO=De("http2"),kHe=_m(),SHe=KO(),uHe=pm();class wO{constructor(e){this.metadata={handlerProtocol:"h2"},this.connectionManager=new SHe.NodeHttp2ConnectionManager({}),this.configProvider=new Promise((a,n)=>{if(typeof e==="function")e().then((i)=>{a(i||{})}).catch(n);else a(e||{})})}destroy(){this.connectionManager.destroy()}async handle(e,{abortSignal:a}={}){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)}let{requestTimeout:n,disableConcurrentStreams:i}=this.config;return new Promise((r,h)=>{var s,S,u;let B=!1,M=void 0,C=async(He)=>{await M,r(He)},H=async(He)=>{await M,h(He)};if(a===null||a===void 0?void 0:a.aborted){B=!0;let He=new Error("Request aborted");He.name="AbortError",H(He);return}let{hostname:R,method:W,port:A,protocol:Y,query:N}=e,Z="";if(e.username!=null||e.password!=null){let He=(s=e.username)!==null&&s!==void 0?s:"",va=(S=e.password)!==null&&S!==void 0?S:"";Z=`${He}:${va}@`}let I=`${Y}//${Z}${R}${A?`:${A}`:""}`,oe={destination:new URL(I)},_=this.connectionManager.lease(oe,{requestTimeout:(u=this.config)===null||u===void 0?void 0:u.sessionTimeout,disableConcurrentStreams:i||!1}),Be=(He)=>{if(i)this.destroySession(_);B=!0,H(He)},ca=sHe.buildQueryString(N||{}),Ia=e.path;if(ca)Ia+=`?${ca}`;if(e.fragment)Ia+=`#${e.fragment}`;let Qe=_.request({...e.headers,[LO.constants.HTTP2_HEADER_PATH]:Ia,[LO.constants.HTTP2_HEADER_METHOD]:W});if(_.ref(),Qe.on("response",(He)=>{let va=new hHe.HttpResponse({statusCode:He[":status"]||-1,headers:kHe.getTransformedHeaders(He),body:Qe});if(B=!0,C({response:va}),i)_.close(),this.connectionManager.deleteSession(I,_)}),n)Qe.setTimeout(n,()=>{Qe.close();let He=new Error(`Stream timed out because of no activity for ${n} ms`);He.name="TimeoutError",Be(He)});if(a)a.onabort=()=>{Qe.close();let He=new Error("Request aborted");He.name="AbortError",Be(He)};Qe.on("frameError",(He,va,zi)=>{Be(new Error(`Frame type id ${He} in stream id ${zi} has failed with code ${va}.`))}),Qe.on("error",Be),Qe.on("aborted",()=>{Be(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Qe.rstCode}.`))}),Qe.on("close",()=>{if(_.unref(),i)_.destroy();if(!B)Be(new Error("Unexpected error: http2 request did not get a response"))}),M=uHe.writeRequestBody(Qe,e,n)})}destroySession(e){if(!e.destroyed)e.destroy()}}PO.NodeHttp2Handler=wO});var TO=G((FO)=>{Object.defineProperty(FO,"__esModule",{value:!0});FO.Collector=void 0;var BHe=De("stream");class tO extends BHe.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,a,n){this.bufferedBytes.push(e),n()}}FO.Collector=tO});var JO=G((VO)=>{Object.defineProperty(VO,"__esModule",{value:!0});VO.streamCollector=void 0;var cHe=TO(),MHe=(e)=>new Promise((a,n)=>{let i=new cHe.Collector;e.pipe(i),e.on("error",(r)=>{i.end(),n(r)}),i.on("error",n),i.on("finish",function(){let r=new Uint8Array(Buffer.concat(this.bufferedBytes));a(r)})});VO.streamCollector=MHe});var NO=G((bk)=>{Object.defineProperty(bk,"__esModule",{value:!0});var eC=an();eC.__exportStar(yO(),bk);eC.__exportStar(WO(),bk);eC.__exportStar(JO(),bk)});var EO=G((aC)=>{Object.defineProperty(aC,"__esModule",{value:!0});var gHe=an();gHe.__exportStar(NO(),aC)});var Ie;(function(e){e.assertEqual=(r)=>r;function a(r){}e.assertIs=a;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=(r)=>{let h={};for(let s of r)h[s]=s;return h},e.getValidEnumValues=(r)=>{let h=e.objectKeys(r).filter((S)=>typeof r[r[S]]!=="number"),s={};for(let S of h)s[S]=r[S];return e.objectValues(s)},e.objectValues=(r)=>{return e.objectKeys(r).map(function(h){return r[h]})},e.objectKeys=typeof Object.keys==="function"?(r)=>Object.keys(r):(r)=>{let h=[];for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s))h.push(s);return h},e.find=(r,h)=>{for(let s of r)if(h(s))return s;return},e.isInteger=typeof Number.isInteger==="function"?(r)=>Number.isInteger(r):(r)=>typeof r==="number"&&isFinite(r)&&Math.floor(r)===r;function i(r,h=" | "){return r.map((s)=>typeof s==="string"?`'${s}'`:s).join(h)}e.joinValues=i,e.jsonStringifyReplacer=(r,h)=>{if(typeof h==="bigint")return h.toString();return h}})(Ie||(Ie={}));var dM;(function(e){e.mergeShapes=(a,n)=>{return{...a,...n}}})(dM||(dM={}));var ne=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xr=(e)=>{switch(typeof e){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return isNaN(e)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":if(Array.isArray(e))return ne.array;if(e===null)return ne.null;if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return ne.promise;if(typeof Map!=="undefined"&&e instanceof Map)return ne.map;if(typeof Set!=="undefined"&&e instanceof Set)return ne.set;if(typeof Date!=="undefined"&&e instanceof Date)return ne.date;return ne.object;default:return ne.unknown}},j=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),KU=(e)=>{return JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:")};class En extends Error{constructor(e){super();this.issues=[],this.addIssue=(n)=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let a=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,a);else this.__proto__=a;this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let a=e||function(r){return r.message},n={_errors:[]},i=(r)=>{for(let h of r.issues)if(h.code==="invalid_union")h.unionErrors.map(i);else if(h.code==="invalid_return_type")i(h.returnTypeError);else if(h.code==="invalid_arguments")i(h.argumentsError);else if(h.path.length===0)n._errors.push(a(h));else{let s=n,S=0;while(S<h.path.length){let u=h.path[S];if(S!==h.path.length-1)s[u]=s[u]||{_errors:[]};else s[u]=s[u]||{_errors:[]},s[u]._errors.push(a(h));s=s[u],S++}}};return i(this),n}static assert(e){if(!(e instanceof En))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=(a)=>a.message){let a={},n=[];for(let i of this.issues)if(i.path.length>0)a[i.path[0]]=a[i.path[0]]||[],a[i.path[0]].push(e(i));else n.push(e(i));return{formErrors:n,fieldErrors:a}}get formErrors(){return this.flatten()}}En.create=(e)=>{return new En(e)};var Jo=(e,a)=>{let n;switch(e.code){case j.invalid_type:if(e.received===ne.undefined)n="Required";else n=`Expected ${e.expected}, received ${e.received}`;break;case j.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ie.jsonStringifyReplacer)}`;break;case j.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ie.joinValues(e.keys,", ")}`;break;case j.invalid_union:n="Invalid input";break;case j.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ie.joinValues(e.options)}`;break;case j.invalid_enum_value:n=`Invalid enum value. Expected ${Ie.joinValues(e.options)}, received '${e.received}'`;break;case j.invalid_arguments:n="Invalid function arguments";break;case j.invalid_return_type:n="Invalid function return type";break;case j.invalid_date:n="Invalid date";break;case j.invalid_string:if(typeof e.validation==="object")if("includes"in e.validation){if(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==="number")n=`${n} at one or more positions greater than or equal to ${e.validation.position}`}else if("startsWith"in e.validation)n=`Invalid input: must start with "${e.validation.startsWith}"`;else if("endsWith"in e.validation)n=`Invalid input: must end with "${e.validation.endsWith}"`;else Ie.assertNever(e.validation);else if(e.validation!=="regex")n=`Invalid ${e.validation}`;else n="Invalid";break;case j.too_small:if(e.type==="array")n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`;else if(e.type==="string")n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`;else if(e.type==="number")n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`;else if(e.type==="date")n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`;else n="Invalid input";break;case j.too_big:if(e.type==="array")n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`;else if(e.type==="string")n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`;else if(e.type==="number")n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="bigint")n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`;else if(e.type==="date")n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`;else n="Invalid input";break;case j.custom:n="Invalid input";break;case j.invalid_intersection_types:n="Intersection results could not be merged";break;case j.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case j.not_finite:n="Number must be finite";break;default:n=a.defaultError,Ie.assertNever(e)}return{message:n}},JH=Jo;function LU(e){JH=e}function mS(){return JH}var CS=(e)=>{let{data:a,path:n,errorMaps:i,issueData:r}=e,h=[...n,...r.path||[]],s={...r,path:h};if(r.message!==void 0)return{...r,path:h,message:r.message};let S="",u=i.filter((B)=>!!B).slice().reverse();for(let B of u)S=B(s,{data:a,defaultError:S}).message;return{...r,path:h,message:S}},wU=[];function ae(e,a){let n=mS(),i=CS({issueData:a,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Jo?void 0:Jo].filter((r)=>!!r)});e.common.issues.push(i)}class cn{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(e,a){let n=[];for(let i of a){if(i.status==="aborted")return Ge;if(i.status==="dirty")e.dirty();n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,a){let n=[];for(let i of a){let r=await i.key,h=await i.value;n.push({key:r,value:h})}return cn.mergeObjectSync(e,n)}static mergeObjectSync(e,a){let n={};for(let i of a){let{key:r,value:h}=i;if(r.status==="aborted")return Ge;if(h.status==="aborted")return Ge;if(r.status==="dirty")e.dirty();if(h.status==="dirty")e.dirty();if(r.value!=="__proto__"&&(typeof h.value!=="undefined"||i.alwaysSet))n[r.value]=h.value}return{status:e.value,value:n}}}var Ge=Object.freeze({status:"aborted"}),Vo=(e)=>({status:"dirty",value:e}),Cn=(e)=>({status:"valid",value:e}),yM=(e)=>e.status==="aborted",mM=(e)=>e.status==="dirty",ms=(e)=>e.status==="valid",Cs=(e)=>typeof Promise!=="undefined"&&e instanceof Promise;function zS(e,a,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof a==="function"?e!==a||!i:!a.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(e):i?i.value:a.get(e)}function NH(e,a,n,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof a==="function"?e!==a||!r:!a.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,n):r?r.value=n:a.set(e,n),n}var Se;(function(e){e.errToObj=(a)=>typeof a==="string"?{message:a}:a||{},e.toString=(a)=>typeof a==="string"?a:a===null||a===void 0?void 0:a.message})(Se||(Se={}));var ds,ys;class Ri{constructor(e,a,n,i){this._cachedPath=[],this.parent=e,this.data=a,this._path=n,this._key=i}get path(){if(!this._cachedPath.length)if(this._key instanceof Array)this._cachedPath.push(...this._path,...this._key);else this._cachedPath.push(...this._path,this._key);return this._cachedPath}}var VH=(e,a)=>{if(ms(a))return{success:!0,data:a.value};else{if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new En(e.common.issues);return this._error=n,this._error}}}};function Pe(e){if(!e)return{};let{errorMap:a,invalid_type_error:n,required_error:i,description:r}=e;if(a&&(n||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if(a)return{errorMap:a,description:r};return{errorMap:(s,S)=>{var u,B;let{message:M}=e;if(s.code==="invalid_enum_value")return{message:M!==null&&M!==void 0?M:S.defaultError};if(typeof S.data==="undefined")return{message:(u=M!==null&&M!==void 0?M:i)!==null&&u!==void 0?u:S.defaultError};if(s.code!=="invalid_type")return{message:S.defaultError};return{message:(B=M!==null&&M!==void 0?M:n)!==null&&B!==void 0?B:S.defaultError}},description:r}}class te{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return xr(e.data)}_getOrReturnCtx(e,a){return a||{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new cn,ctx:{common:e.parent.common,data:e.data,parsedType:xr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let a=this._parse(e);if(Cs(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(e){let a=this._parse(e);return Promise.resolve(a)}parse(e,a){let n=this.safeParse(e,a);if(n.success)return n.data;throw n.error}safeParse(e,a){var n;let i={common:{issues:[],async:(n=a===null||a===void 0?void 0:a.async)!==null&&n!==void 0?n:!1,contextualErrorMap:a===null||a===void 0?void 0:a.errorMap},path:(a===null||a===void 0?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},r=this._parseSync({data:e,path:i.path,parent:i});return VH(i,r)}async parseAsync(e,a){let n=await this.safeParseAsync(e,a);if(n.success)return n.data;throw n.error}async safeParseAsync(e,a){let n={common:{issues:[],contextualErrorMap:a===null||a===void 0?void 0:a.errorMap,async:!0},path:(a===null||a===void 0?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xr(e)},i=this._parse({data:e,path:n.path,parent:n}),r=await(Cs(i)?i:Promise.resolve(i));return VH(n,r)}refine(e,a){let n=(i)=>{if(typeof a==="string"||typeof a==="undefined")return{message:a};else if(typeof a==="function")return a(i);else return a};return this._refinement((i,r)=>{let h=e(i),s=()=>r.addIssue({code:j.custom,...n(i)});if(typeof Promise!=="undefined"&&h instanceof Promise)return h.then((S)=>{if(!S)return s(),!1;else return!0});if(!h)return s(),!1;else return!0})}refinement(e,a){return this._refinement((n,i)=>{if(!e(n))return i.addIssue(typeof a==="function"?a(n,i):a),!1;else return!0})}_refinement(e){return new ni({schema:this,typeName:me.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Pi.create(this,this._def)}nullable(){return mr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wi.create(this,this._def)}promise(){return Nl.create(this,this._def)}or(e){return Yo.create([this,e],this._def)}and(e){return Oo.create(this,e,this._def)}transform(e){return new ni({...Pe(this._def),schema:this,typeName:me.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let a=typeof e==="function"?e:()=>e;return new Zo({...Pe(this._def),innerType:this,defaultValue:a,typeName:me.ZodDefault})}brand(){return new bS({typeName:me.ZodBranded,type:this,...Pe(this._def)})}catch(e){let a=typeof e==="function"?e:()=>e;return new Uo({...Pe(this._def),innerType:this,catchValue:a,typeName:me.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return Ks.create(this,e)}readonly(){return Xo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var PU=/^c[^\s-]{8,}$/i,RU=/^[0-9a-z]+$/,WU=/^[0-9A-HJKMNP-TV-Z]{26}$/,tU=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FU=/^[a-z0-9_-]{21}$/i,AU=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,TU=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",gM,fU=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,JU=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,NU=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,EH="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",EU=new RegExp(`^${EH}$`);function vH(e){let a="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";if(e.precision)a=`${a}\\.\\d{${e.precision}}`;else if(e.precision==null)a=`${a}(\\.\\d+)?`;return a}function vU(e){return new RegExp(`^${vH(e)}$`)}function YH(e){let a=`${EH}T${vH(e)}`,n=[];if(n.push(e.local?"Z?":"Z"),e.offset)n.push("([+-]\\d{2}:?\\d{2})");return a=`${a}(${n.join("|")})`,new RegExp(`^${a}$`)}function YU(e,a){if((a==="v4"||!a)&&fU.test(e))return!0;if((a==="v6"||!a)&&JU.test(e))return!0;return!1}class Li extends te{_parse(e){if(this._def.coerce)e.data=String(e.data);if(this._getType(e)!==ne.string){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.string,received:r.parsedType}),Ge}let n=new cn,i=void 0;for(let r of this._def.checks)if(r.kind==="min"){if(e.data.length<r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty()}else if(r.kind==="max"){if(e.data.length>r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty()}else if(r.kind==="length"){let h=e.data.length>r.value,s=e.data.length<r.value;if(h||s){if(i=this._getOrReturnCtx(e,i),h)ae(i,{code:j.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message});else if(s)ae(i,{code:j.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message});n.dirty()}}else if(r.kind==="email"){if(!TU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"email",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="emoji"){if(!gM)gM=new RegExp(VU,"u");if(!gM.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"emoji",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="uuid"){if(!tU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"uuid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="nanoid"){if(!FU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"nanoid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="cuid"){if(!PU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"cuid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="cuid2"){if(!RU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"cuid2",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="ulid"){if(!WU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"ulid",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="url")try{new URL(e.data)}catch(h){i=this._getOrReturnCtx(e,i),ae(i,{validation:"url",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="regex"){if(r.regex.lastIndex=0,!r.regex.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"regex",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="trim")e.data=e.data.trim();else if(r.kind==="includes"){if(!e.data.includes(r.value,r.position))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),n.dirty()}else if(r.kind==="toLowerCase")e.data=e.data.toLowerCase();else if(r.kind==="toUpperCase")e.data=e.data.toUpperCase();else if(r.kind==="startsWith"){if(!e.data.startsWith(r.value))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:{startsWith:r.value},message:r.message}),n.dirty()}else if(r.kind==="endsWith"){if(!e.data.endsWith(r.value))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:{endsWith:r.value},message:r.message}),n.dirty()}else if(r.kind==="datetime"){if(!YH(r).test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:"datetime",message:r.message}),n.dirty()}else if(r.kind==="date"){if(!EU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:"date",message:r.message}),n.dirty()}else if(r.kind==="time"){if(!vU(r).test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{code:j.invalid_string,validation:"time",message:r.message}),n.dirty()}else if(r.kind==="duration"){if(!AU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"duration",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="ip"){if(!YU(e.data,r.version))i=this._getOrReturnCtx(e,i),ae(i,{validation:"ip",code:j.invalid_string,message:r.message}),n.dirty()}else if(r.kind==="base64"){if(!NU.test(e.data))i=this._getOrReturnCtx(e,i),ae(i,{validation:"base64",code:j.invalid_string,message:r.message}),n.dirty()}else Ie.assertNever(r);return{status:n.value,value:e.data}}_regex(e,a,n){return this.refinement((i)=>e.test(i),{validation:a,code:j.invalid_string,...Se.errToObj(n)})}_addCheck(e){return new Li({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Se.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Se.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Se.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Se.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Se.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Se.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Se.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Se.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Se.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Se.errToObj(e)})}datetime(e){var a,n;if(typeof e==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e});return this._addCheck({kind:"datetime",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,offset:(a=e===null||e===void 0?void 0:e.offset)!==null&&a!==void 0?a:!1,local:(n=e===null||e===void 0?void 0:e.local)!==null&&n!==void 0?n:!1,...Se.errToObj(e===null||e===void 0?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){if(typeof e==="string")return this._addCheck({kind:"time",precision:null,message:e});return this._addCheck({kind:"time",precision:typeof(e===null||e===void 0?void 0:e.precision)==="undefined"?null:e===null||e===void 0?void 0:e.precision,...Se.errToObj(e===null||e===void 0?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Se.errToObj(e)})}regex(e,a){return this._addCheck({kind:"regex",regex:e,...Se.errToObj(a)})}includes(e,a){return this._addCheck({kind:"includes",value:e,position:a===null||a===void 0?void 0:a.position,...Se.errToObj(a===null||a===void 0?void 0:a.message)})}startsWith(e,a){return this._addCheck({kind:"startsWith",value:e,...Se.errToObj(a)})}endsWith(e,a){return this._addCheck({kind:"endsWith",value:e,...Se.errToObj(a)})}min(e,a){return this._addCheck({kind:"min",value:e,...Se.errToObj(a)})}max(e,a){return this._addCheck({kind:"max",value:e,...Se.errToObj(a)})}length(e,a){return this._addCheck({kind:"length",value:e,...Se.errToObj(a)})}nonempty(e){return this.min(1,Se.errToObj(e))}trim(){return new Li({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Li({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Li({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e)=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find((e)=>e.kind==="date")}get isTime(){return!!this._def.checks.find((e)=>e.kind==="time")}get isDuration(){return!!this._def.checks.find((e)=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find((e)=>e.kind==="email")}get isURL(){return!!this._def.checks.find((e)=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find((e)=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find((e)=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((e)=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((e)=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((e)=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find((e)=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find((e)=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find((e)=>e.kind==="base64")}get minLength(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e}get maxLength(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e}}Li.create=(e)=>{var a;return new Li({checks:[],typeName:me.ZodString,coerce:(a=e===null||e===void 0?void 0:e.coerce)!==null&&a!==void 0?a:!1,...Pe(e)})};function OU(e,a){let n=(e.toString().split(".")[1]||"").length,i=(a.toString().split(".")[1]||"").length,r=n>i?n:i,h=parseInt(e.toFixed(r).replace(".","")),s=parseInt(a.toFixed(r).replace(".",""));return h%s/Math.pow(10,r)}class pr extends te{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce)e.data=Number(e.data);if(this._getType(e)!==ne.number){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.number,received:r.parsedType}),Ge}let n=void 0,i=new cn;for(let r of this._def.checks)if(r.kind==="int"){if(!Ie.isInteger(e.data))n=this._getOrReturnCtx(e,n),ae(n,{code:j.invalid_type,expected:"integer",received:"float",message:r.message}),i.dirty()}else if(r.kind==="min"){if(r.inclusive?e.data<r.value:e.data<=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()}else if(r.kind==="max"){if(r.inclusive?e.data>r.value:e.data>=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),i.dirty()}else if(r.kind==="multipleOf"){if(OU(e.data,r.value)!==0)n=this._getOrReturnCtx(e,n),ae(n,{code:j.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()}else if(r.kind==="finite"){if(!Number.isFinite(e.data))n=this._getOrReturnCtx(e,n),ae(n,{code:j.not_finite,message:r.message}),i.dirty()}else Ie.assertNever(r);return{status:i.value,value:e.data}}gte(e,a){return this.setLimit("min",e,!0,Se.toString(a))}gt(e,a){return this.setLimit("min",e,!1,Se.toString(a))}lte(e,a){return this.setLimit("max",e,!0,Se.toString(a))}lt(e,a){return this.setLimit("max",e,!1,Se.toString(a))}setLimit(e,a,n,i){return new pr({...this._def,checks:[...this._def.checks,{kind:e,value:a,inclusive:n,message:Se.toString(i)}]})}_addCheck(e){return new pr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Se.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(e)})}multipleOf(e,a){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(a)})}finite(e){return this._addCheck({kind:"finite",message:Se.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(e)})}get minValue(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e}get maxValue(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e}get isInt(){return!!this._def.checks.find((e)=>e.kind==="int"||e.kind==="multipleOf"&&Ie.isInteger(e.value))}get isFinite(){let e=null,a=null;for(let n of this._def.checks)if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;else if(n.kind==="min"){if(a===null||n.value>a)a=n.value}else if(n.kind==="max"){if(e===null||n.value<e)e=n.value}return Number.isFinite(a)&&Number.isFinite(e)}}pr.create=(e)=>{return new pr({checks:[],typeName:me.ZodNumber,coerce:(e===null||e===void 0?void 0:e.coerce)||!1,...Pe(e)})};class el extends te{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)e.data=BigInt(e.data);if(this._getType(e)!==ne.bigint){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.bigint,received:r.parsedType}),Ge}let n=void 0,i=new cn;for(let r of this._def.checks)if(r.kind==="min"){if(r.inclusive?e.data<r.value:e.data<=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()}else if(r.kind==="max"){if(r.inclusive?e.data>r.value:e.data>=r.value)n=this._getOrReturnCtx(e,n),ae(n,{code:j.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),i.dirty()}else if(r.kind==="multipleOf"){if(e.data%r.value!==BigInt(0))n=this._getOrReturnCtx(e,n),ae(n,{code:j.not_multiple_of,multipleOf:r.value,message:r.message}),i.dirty()}else Ie.assertNever(r);return{status:i.value,value:e.data}}gte(e,a){return this.setLimit("min",e,!0,Se.toString(a))}gt(e,a){return this.setLimit("min",e,!1,Se.toString(a))}lte(e,a){return this.setLimit("max",e,!0,Se.toString(a))}lt(e,a){return this.setLimit("max",e,!1,Se.toString(a))}setLimit(e,a,n,i){return new el({...this._def,checks:[...this._def.checks,{kind:e,value:a,inclusive:n,message:Se.toString(i)}]})}_addCheck(e){return new el({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(e)})}multipleOf(e,a){return this._addCheck({kind:"multipleOf",value:e,message:Se.toString(a)})}get minValue(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e}get maxValue(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e}}el.create=(e)=>{var a;return new el({checks:[],typeName:me.ZodBigInt,coerce:(a=e===null||e===void 0?void 0:e.coerce)!==null&&a!==void 0?a:!1,...Pe(e)})};class No extends te{_parse(e){if(this._def.coerce)e.data=Boolean(e.data);if(this._getType(e)!==ne.boolean){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.boolean,received:n.parsedType}),Ge}return Cn(e.data)}}No.create=(e)=>{return new No({typeName:me.ZodBoolean,coerce:(e===null||e===void 0?void 0:e.coerce)||!1,...Pe(e)})};class Vl extends te{_parse(e){if(this._def.coerce)e.data=new Date(e.data);if(this._getType(e)!==ne.date){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_type,expected:ne.date,received:r.parsedType}),Ge}if(isNaN(e.data.getTime())){let r=this._getOrReturnCtx(e);return ae(r,{code:j.invalid_date}),Ge}let n=new cn,i=void 0;for(let r of this._def.checks)if(r.kind==="min"){if(e.data.getTime()<r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()}else if(r.kind==="max"){if(e.data.getTime()>r.value)i=this._getOrReturnCtx(e,i),ae(i,{code:j.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()}else Ie.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Vl({...this._def,checks:[...this._def.checks,e]})}min(e,a){return this._addCheck({kind:"min",value:e.getTime(),message:Se.toString(a)})}max(e,a){return this._addCheck({kind:"max",value:e.getTime(),message:Se.toString(a)})}get minDate(){let e=null;for(let a of this._def.checks)if(a.kind==="min"){if(e===null||a.value>e)e=a.value}return e!=null?new Date(e):null}get maxDate(){let e=null;for(let a of this._def.checks)if(a.kind==="max"){if(e===null||a.value<e)e=a.value}return e!=null?new Date(e):null}}Vl.create=(e)=>{return new Vl({checks:[],coerce:(e===null||e===void 0?void 0:e.coerce)||!1,typeName:me.ZodDate,...Pe(e)})};class zs extends te{_parse(e){if(this._getType(e)!==ne.symbol){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.symbol,received:n.parsedType}),Ge}return Cn(e.data)}}zs.create=(e)=>{return new zs({typeName:me.ZodSymbol,...Pe(e)})};class Eo extends te{_parse(e){if(this._getType(e)!==ne.undefined){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.undefined,received:n.parsedType}),Ge}return Cn(e.data)}}Eo.create=(e)=>{return new Eo({typeName:me.ZodUndefined,...Pe(e)})};class vo extends te{_parse(e){if(this._getType(e)!==ne.null){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.null,received:n.parsedType}),Ge}return Cn(e.data)}}vo.create=(e)=>{return new vo({typeName:me.ZodNull,...Pe(e)})};class fl extends te{constructor(){super(...arguments);this._any=!0}_parse(e){return Cn(e.data)}}fl.create=(e)=>{return new fl({typeName:me.ZodAny,...Pe(e)})};class _r extends te{constructor(){super(...arguments);this._unknown=!0}_parse(e){return Cn(e.data)}}_r.create=(e)=>{return new _r({typeName:me.ZodUnknown,...Pe(e)})};class Oi extends te{_parse(e){let a=this._getOrReturnCtx(e);return ae(a,{code:j.invalid_type,expected:ne.never,received:a.parsedType}),Ge}}Oi.create=(e)=>{return new Oi({typeName:me.ZodNever,...Pe(e)})};class Hs extends te{_parse(e){if(this._getType(e)!==ne.undefined){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.void,received:n.parsedType}),Ge}return Cn(e.data)}}Hs.create=(e)=>{return new Hs({typeName:me.ZodVoid,...Pe(e)})};class wi extends te{_parse(e){let{ctx:a,status:n}=this._processInputParams(e),i=this._def;if(a.parsedType!==ne.array)return ae(a,{code:j.invalid_type,expected:ne.array,received:a.parsedType}),Ge;if(i.exactLength!==null){let h=a.data.length>i.exactLength.value,s=a.data.length<i.exactLength.value;if(h||s)ae(a,{code:h?j.too_big:j.too_small,minimum:s?i.exactLength.value:void 0,maximum:h?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty()}if(i.minLength!==null){if(a.data.length<i.minLength.value)ae(a,{code:j.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()}if(i.maxLength!==null){if(a.data.length>i.maxLength.value)ae(a,{code:j.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()}if(a.common.async)return Promise.all([...a.data].map((h,s)=>{return i.type._parseAsync(new Ri(a,h,a.path,s))})).then((h)=>{return cn.mergeArray(n,h)});let r=[...a.data].map((h,s)=>{return i.type._parseSync(new Ri(a,h,a.path,s))});return cn.mergeArray(n,r)}get element(){return this._def.type}min(e,a){return new wi({...this._def,minLength:{value:e,message:Se.toString(a)}})}max(e,a){return new wi({...this._def,maxLength:{value:e,message:Se.toString(a)}})}length(e,a){return new wi({...this._def,exactLength:{value:e,message:Se.toString(a)}})}nonempty(e){return this.min(1,e)}}wi.create=(e,a)=>{return new wi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:me.ZodArray,...Pe(a)})};function To(e){if(e instanceof Wa){let a={};for(let n in e.shape){let i=e.shape[n];a[n]=Pi.create(To(i))}return new Wa({...e._def,shape:()=>a})}else if(e instanceof wi)return new wi({...e._def,type:To(e.element)});else if(e instanceof Pi)return Pi.create(To(e.unwrap()));else if(e instanceof mr)return mr.create(To(e.unwrap()));else if(e instanceof Qi)return Qi.create(e.items.map((a)=>To(a)));else return e}class Wa extends te{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),a=Ie.objectKeys(e);return this._cached={shape:e,keys:a}}_parse(e){if(this._getType(e)!==ne.object){let u=this._getOrReturnCtx(e);return ae(u,{code:j.invalid_type,expected:ne.object,received:u.parsedType}),Ge}let{status:n,ctx:i}=this._processInputParams(e),{shape:r,keys:h}=this._getCached(),s=[];if(!(this._def.catchall instanceof Oi&&this._def.unknownKeys==="strip")){for(let u in i.data)if(!h.includes(u))s.push(u)}let S=[];for(let u of h){let B=r[u],M=i.data[u];S.push({key:{status:"valid",value:u},value:B._parse(new Ri(i,M,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Oi){let u=this._def.unknownKeys;if(u==="passthrough")for(let B of s)S.push({key:{status:"valid",value:B},value:{status:"valid",value:i.data[B]}});else if(u==="strict"){if(s.length>0)ae(i,{code:j.unrecognized_keys,keys:s}),n.dirty()}else if(u==="strip");else throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let B of s){let M=i.data[B];S.push({key:{status:"valid",value:B},value:u._parse(new Ri(i,M,i.path,B)),alwaysSet:B in i.data})}}if(i.common.async)return Promise.resolve().then(async()=>{let u=[];for(let B of S){let M=await B.key,C=await B.value;u.push({key:M,value:C,alwaysSet:B.alwaysSet})}return u}).then((u)=>{return cn.mergeObjectSync(n,u)});else return cn.mergeObjectSync(n,S)}get shape(){return this._def.shape()}strict(e){return Se.errToObj,new Wa({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(a,n)=>{var i,r,h,s;let S=(h=(r=(i=this._def).errorMap)===null||r===void 0?void 0:r.call(i,a,n).message)!==null&&h!==void 0?h:n.defaultError;if(a.code==="unrecognized_keys")return{message:(s=Se.errToObj(e).message)!==null&&s!==void 0?s:S};return{message:S}}}:{}})}strip(){return new Wa({...this._def,unknownKeys:"strip"})}passthrough(){return new Wa({...this._def,unknownKeys:"passthrough"})}extend(e){return new Wa({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Wa({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:me.ZodObject})}setKey(e,a){return this.augment({[e]:a})}catchall(e){return new Wa({...this._def,catchall:e})}pick(e){let a={};return Ie.objectKeys(e).forEach((n)=>{if(e[n]&&this.shape[n])a[n]=this.shape[n]}),new Wa({...this._def,shape:()=>a})}omit(e){let a={};return Ie.objectKeys(this.shape).forEach((n)=>{if(!e[n])a[n]=this.shape[n]}),new Wa({...this._def,shape:()=>a})}deepPartial(){return To(this)}partial(e){let a={};return Ie.objectKeys(this.shape).forEach((n)=>{let i=this.shape[n];if(e&&!e[n])a[n]=i;else a[n]=i.optional()}),new Wa({...this._def,shape:()=>a})}required(e){let a={};return Ie.objectKeys(this.shape).forEach((n)=>{if(e&&!e[n])a[n]=this.shape[n];else{let r=this.shape[n];while(r instanceof Pi)r=r._def.innerType;a[n]=r}}),new Wa({...this._def,shape:()=>a})}keyof(){return OH(Ie.objectKeys(this.shape))}}Wa.create=(e,a)=>{return new Wa({shape:()=>e,unknownKeys:"strip",catchall:Oi.create(),typeName:me.ZodObject,...Pe(a)})};Wa.strictCreate=(e,a)=>{return new Wa({shape:()=>e,unknownKeys:"strict",catchall:Oi.create(),typeName:me.ZodObject,...Pe(a)})};Wa.lazycreate=(e,a)=>{return new Wa({shape:e,unknownKeys:"strip",catchall:Oi.create(),typeName:me.ZodObject,...Pe(a)})};class Yo extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n=this._def.options;function i(r){for(let s of r)if(s.result.status==="valid")return s.result;for(let s of r)if(s.result.status==="dirty")return a.common.issues.push(...s.ctx.common.issues),s.result;let h=r.map((s)=>new En(s.ctx.common.issues));return ae(a,{code:j.invalid_union,unionErrors:h}),Ge}if(a.common.async)return Promise.all(n.map(async(r)=>{let h={...a,common:{...a.common,issues:[]},parent:null};return{result:await r._parseAsync({data:a.data,path:a.path,parent:h}),ctx:h}})).then(i);else{let r=void 0,h=[];for(let S of n){let u={...a,common:{...a.common,issues:[]},parent:null},B=S._parseSync({data:a.data,path:a.path,parent:u});if(B.status==="valid")return B;else if(B.status==="dirty"&&!r)r={result:B,ctx:u};if(u.common.issues.length)h.push(u.common.issues)}if(r)return a.common.issues.push(...r.ctx.common.issues),r.result;let s=h.map((S)=>new En(S));return ae(a,{code:j.invalid_union,unionErrors:s}),Ge}}get options(){return this._def.options}}Yo.create=(e,a)=>{return new Yo({options:e,typeName:me.ZodUnion,...Pe(a)})};var yr=(e)=>{if(e instanceof Qo)return yr(e.schema);else if(e instanceof ni)return yr(e.innerType());else if(e instanceof $o)return[e.value];else if(e instanceof al)return e.options;else if(e instanceof qo)return Ie.objectValues(e.enum);else if(e instanceof Zo)return yr(e._def.innerType);else if(e instanceof Eo)return[void 0];else if(e instanceof vo)return[null];else if(e instanceof Pi)return[void 0,...yr(e.unwrap())];else if(e instanceof mr)return[null,...yr(e.unwrap())];else if(e instanceof bS)return yr(e.unwrap());else if(e instanceof Xo)return yr(e.unwrap());else if(e instanceof Uo)return yr(e._def.innerType);else return[]};class HS extends te{_parse(e){let{ctx:a}=this._processInputParams(e);if(a.parsedType!==ne.object)return ae(a,{code:j.invalid_type,expected:ne.object,received:a.parsedType}),Ge;let n=this.discriminator,i=a.data[n],r=this.optionsMap.get(i);if(!r)return ae(a,{code:j.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Ge;if(a.common.async)return r._parseAsync({data:a.data,path:a.path,parent:a});else return r._parseSync({data:a.data,path:a.path,parent:a})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,a,n){let i=new Map;for(let r of a){let h=yr(r.shape[e]);if(!h.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of h){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,r)}}return new HS({typeName:me.ZodDiscriminatedUnion,discriminator:e,options:a,optionsMap:i,...Pe(n)})}}function CM(e,a){let n=xr(e),i=xr(a);if(e===a)return{valid:!0,data:e};else if(n===ne.object&&i===ne.object){let r=Ie.objectKeys(a),h=Ie.objectKeys(e).filter((S)=>r.indexOf(S)!==-1),s={...e,...a};for(let S of h){let u=CM(e[S],a[S]);if(!u.valid)return{valid:!1};s[S]=u.data}return{valid:!0,data:s}}else if(n===ne.array&&i===ne.array){if(e.length!==a.length)return{valid:!1};let r=[];for(let h=0;h<e.length;h++){let s=e[h],S=a[h],u=CM(s,S);if(!u.valid)return{valid:!1};r.push(u.data)}return{valid:!0,data:r}}else if(n===ne.date&&i===ne.date&&+e===+a)return{valid:!0,data:e};else return{valid:!1}}class Oo extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e),i=(r,h)=>{if(yM(r)||yM(h))return Ge;let s=CM(r.value,h.value);if(!s.valid)return ae(n,{code:j.invalid_intersection_types}),Ge;if(mM(r)||mM(h))a.dirty();return{status:a.value,value:s.data}};if(n.common.async)return Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([r,h])=>i(r,h));else return i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Oo.create=(e,a,n)=>{return new Oo({left:e,right:a,typeName:me.ZodIntersection,...Pe(n)})};class Qi extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.array)return ae(n,{code:j.invalid_type,expected:ne.array,received:n.parsedType}),Ge;if(n.data.length<this._def.items.length)return ae(n,{code:j.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ge;if(!this._def.rest&&n.data.length>this._def.items.length)ae(n,{code:j.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty();let r=[...n.data].map((h,s)=>{let S=this._def.items[s]||this._def.rest;if(!S)return null;return S._parse(new Ri(n,h,n.path,s))}).filter((h)=>!!h);if(n.common.async)return Promise.all(r).then((h)=>{return cn.mergeArray(a,h)});else return cn.mergeArray(a,r)}get items(){return this._def.items}rest(e){return new Qi({...this._def,rest:e})}}Qi.create=(e,a)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qi({items:e,typeName:me.ZodTuple,rest:null,...Pe(a)})};class bs extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.object)return ae(n,{code:j.invalid_type,expected:ne.object,received:n.parsedType}),Ge;let i=[],r=this._def.keyType,h=this._def.valueType;for(let s in n.data)i.push({key:r._parse(new Ri(n,s,n.path,s)),value:h._parse(new Ri(n,n.data[s],n.path,s)),alwaysSet:s in n.data});if(n.common.async)return cn.mergeObjectAsync(a,i);else return cn.mergeObjectSync(a,i)}get element(){return this._def.valueType}static create(e,a,n){if(a instanceof te)return new bs({keyType:e,valueType:a,typeName:me.ZodRecord,...Pe(n)});return new bs({keyType:Li.create(),valueType:e,typeName:me.ZodRecord,...Pe(a)})}}class Gs extends te{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.map)return ae(n,{code:j.invalid_type,expected:ne.map,received:n.parsedType}),Ge;let i=this._def.keyType,r=this._def.valueType,h=[...n.data.entries()].map(([s,S],u)=>{return{key:i._parse(new Ri(n,s,n.path,[u,"key"])),value:r._parse(new Ri(n,S,n.path,[u,"value"]))}});if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let S of h){let u=await S.key,B=await S.value;if(u.status==="aborted"||B.status==="aborted")return Ge;if(u.status==="dirty"||B.status==="dirty")a.dirty();s.set(u.value,B.value)}return{status:a.value,value:s}})}else{let s=new Map;for(let S of h){let{key:u,value:B}=S;if(u.status==="aborted"||B.status==="aborted")return Ge;if(u.status==="dirty"||B.status==="dirty")a.dirty();s.set(u.value,B.value)}return{status:a.value,value:s}}}}Gs.create=(e,a,n)=>{return new Gs({valueType:a,keyType:e,typeName:me.ZodMap,...Pe(n)})};class Jl extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.set)return ae(n,{code:j.invalid_type,expected:ne.set,received:n.parsedType}),Ge;let i=this._def;if(i.minSize!==null){if(n.data.size<i.minSize.value)ae(n,{code:j.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),a.dirty()}if(i.maxSize!==null){if(n.data.size>i.maxSize.value)ae(n,{code:j.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),a.dirty()}let r=this._def.valueType;function h(S){let u=new Set;for(let B of S){if(B.status==="aborted")return Ge;if(B.status==="dirty")a.dirty();u.add(B.value)}return{status:a.value,value:u}}let s=[...n.data.values()].map((S,u)=>r._parse(new Ri(n,S,n.path,u)));if(n.common.async)return Promise.all(s).then((S)=>h(S));else return h(s)}min(e,a){return new Jl({...this._def,minSize:{value:e,message:Se.toString(a)}})}max(e,a){return new Jl({...this._def,maxSize:{value:e,message:Se.toString(a)}})}size(e,a){return this.min(e,a).max(e,a)}nonempty(e){return this.min(1,e)}}Jl.create=(e,a)=>{return new Jl({valueType:e,minSize:null,maxSize:null,typeName:me.ZodSet,...Pe(a)})};class fo extends te{constructor(){super(...arguments);this.validate=this.implement}_parse(e){let{ctx:a}=this._processInputParams(e);if(a.parsedType!==ne.function)return ae(a,{code:j.invalid_type,expected:ne.function,received:a.parsedType}),Ge;function n(s,S){return CS({data:s,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,mS(),Jo].filter((u)=>!!u),issueData:{code:j.invalid_arguments,argumentsError:S}})}function i(s,S){return CS({data:s,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,mS(),Jo].filter((u)=>!!u),issueData:{code:j.invalid_return_type,returnTypeError:S}})}let r={errorMap:a.common.contextualErrorMap},h=a.data;if(this._def.returns instanceof Nl){let s=this;return Cn(async function(...S){let u=new En([]),B=await s._def.args.parseAsync(S,r).catch((H)=>{throw u.addIssue(n(S,H)),u}),M=await Reflect.apply(h,this,B);return await s._def.returns._def.type.parseAsync(M,r).catch((H)=>{throw u.addIssue(i(M,H)),u})})}else{let s=this;return Cn(function(...S){let u=s._def.args.safeParse(S,r);if(!u.success)throw new En([n(S,u.error)]);let B=Reflect.apply(h,this,u.data),M=s._def.returns.safeParse(B,r);if(!M.success)throw new En([i(B,M.error)]);return M.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new fo({...this._def,args:Qi.create(e).rest(_r.create())})}returns(e){return new fo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,a,n){return new fo({args:e?e:Qi.create([]).rest(_r.create()),returns:a||_r.create(),typeName:me.ZodFunction,...Pe(n)})}}class Qo extends te{get schema(){return this._def.getter()}_parse(e){let{ctx:a}=this._processInputParams(e);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Qo.create=(e,a)=>{return new Qo({getter:e,typeName:me.ZodLazy,...Pe(a)})};class $o extends te{_parse(e){if(e.data!==this._def.value){let a=this._getOrReturnCtx(e);return ae(a,{received:a.data,code:j.invalid_literal,expected:this._def.value}),Ge}return{status:"valid",value:e.data}}get value(){return this._def.value}}$o.create=(e,a)=>{return new $o({value:e,typeName:me.ZodLiteral,...Pe(a)})};function OH(e,a){return new al({values:e,typeName:me.ZodEnum,...Pe(a)})}class al extends te{constructor(){super(...arguments);ds.set(this,void 0)}_parse(e){if(typeof e.data!=="string"){let a=this._getOrReturnCtx(e),n=this._def.values;return ae(a,{expected:Ie.joinValues(n),received:a.parsedType,code:j.invalid_type}),Ge}if(!zS(this,ds,"f"))NH(this,ds,new Set(this._def.values),"f");if(!zS(this,ds,"f").has(e.data)){let a=this._getOrReturnCtx(e),n=this._def.values;return ae(a,{received:a.data,code:j.invalid_enum_value,options:n}),Ge}return Cn(e.data)}get options(){return this._def.values}get enum(){let e={};for(let a of this._def.values)e[a]=a;return e}get Values(){let e={};for(let a of this._def.values)e[a]=a;return e}get Enum(){let e={};for(let a of this._def.values)e[a]=a;return e}extract(e,a=this._def){return al.create(e,{...this._def,...a})}exclude(e,a=this._def){return al.create(this.options.filter((n)=>!e.includes(n)),{...this._def,...a})}}ds=new WeakMap;al.create=OH;class qo extends te{constructor(){super(...arguments);ys.set(this,void 0)}_parse(e){let a=Ie.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ne.string&&n.parsedType!==ne.number){let i=Ie.objectValues(a);return ae(n,{expected:Ie.joinValues(i),received:n.parsedType,code:j.invalid_type}),Ge}if(!zS(this,ys,"f"))NH(this,ys,new Set(Ie.getValidEnumValues(this._def.values)),"f");if(!zS(this,ys,"f").has(e.data)){let i=Ie.objectValues(a);return ae(n,{received:n.data,code:j.invalid_enum_value,options:i}),Ge}return Cn(e.data)}get enum(){return this._def.values}}ys=new WeakMap;qo.create=(e,a)=>{return new qo({values:e,typeName:me.ZodNativeEnum,...Pe(a)})};class Nl extends te{unwrap(){return this._def.type}_parse(e){let{ctx:a}=this._processInputParams(e);if(a.parsedType!==ne.promise&&a.common.async===!1)return ae(a,{code:j.invalid_type,expected:ne.promise,received:a.parsedType}),Ge;let n=a.parsedType===ne.promise?a.data:Promise.resolve(a.data);return Cn(n.then((i)=>{return this._def.type.parseAsync(i,{path:a.path,errorMap:a.common.contextualErrorMap})}))}}Nl.create=(e,a)=>{return new Nl({type:e,typeName:me.ZodPromise,...Pe(a)})};class ni extends te{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:a,ctx:n}=this._processInputParams(e),i=this._def.effect||null,r={addIssue:(h)=>{if(ae(n,h),h.fatal)a.abort();else a.dirty()},get path(){return n.path}};if(r.addIssue=r.addIssue.bind(r),i.type==="preprocess"){let h=i.transform(n.data,r);if(n.common.async)return Promise.resolve(h).then(async(s)=>{if(a.value==="aborted")return Ge;let S=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});if(S.status==="aborted")return Ge;if(S.status==="dirty")return Vo(S.value);if(a.value==="dirty")return Vo(S.value);return S});else{if(a.value==="aborted")return Ge;let s=this._def.schema._parseSync({data:h,path:n.path,parent:n});if(s.status==="aborted")return Ge;if(s.status==="dirty")return Vo(s.value);if(a.value==="dirty")return Vo(s.value);return s}}if(i.type==="refinement"){let h=(s)=>{let S=i.refinement(s,r);if(n.common.async)return Promise.resolve(S);if(S instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(s.status==="aborted")return Ge;if(s.status==="dirty")a.dirty();return h(s.value),{status:a.value,value:s.value}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((s)=>{if(s.status==="aborted")return Ge;if(s.status==="dirty")a.dirty();return h(s.value).then(()=>{return{status:a.value,value:s.value}})})}if(i.type==="transform")if(n.common.async===!1){let h=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ms(h))return h;let s=i.transform(h.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((h)=>{if(!ms(h))return h;return Promise.resolve(i.transform(h.value,r)).then((s)=>({status:a.value,value:s}))});Ie.assertNever(i)}}ni.create=(e,a,n)=>{return new ni({schema:e,typeName:me.ZodEffects,effect:a,...Pe(n)})};ni.createWithPreprocess=(e,a,n)=>{return new ni({schema:a,effect:{type:"preprocess",transform:e},typeName:me.ZodEffects,...Pe(n)})};class Pi extends te{_parse(e){if(this._getType(e)===ne.undefined)return Cn(void 0);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Pi.create=(e,a)=>{return new Pi({innerType:e,typeName:me.ZodOptional,...Pe(a)})};class mr extends te{_parse(e){if(this._getType(e)===ne.null)return Cn(null);return this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}mr.create=(e,a)=>{return new mr({innerType:e,typeName:me.ZodNullable,...Pe(a)})};class Zo extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n=a.data;if(a.parsedType===ne.undefined)n=this._def.defaultValue();return this._def.innerType._parse({data:n,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}Zo.create=(e,a)=>{return new Zo({innerType:e,typeName:me.ZodDefault,defaultValue:typeof a.default==="function"?a.default:()=>a.default,...Pe(a)})};class Uo extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n={...a,common:{...a.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});if(Cs(i))return i.then((r)=>{return{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new En(n.common.issues)},input:n.data})}});else return{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new En(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Uo.create=(e,a)=>{return new Uo({innerType:e,typeName:me.ZodCatch,catchValue:typeof a.catch==="function"?a.catch:()=>a.catch,...Pe(a)})};class Ds extends te{_parse(e){if(this._getType(e)!==ne.nan){let n=this._getOrReturnCtx(e);return ae(n,{code:j.invalid_type,expected:ne.nan,received:n.parsedType}),Ge}return{status:"valid",value:e.data}}}Ds.create=(e)=>{return new Ds({typeName:me.ZodNaN,...Pe(e)})};var QU=Symbol("zod_brand");class bS extends te{_parse(e){let{ctx:a}=this._processInputParams(e),n=a.data;return this._def.type._parse({data:n,path:a.path,parent:a})}unwrap(){return this._def.type}}class Ks extends te{_parse(e){let{status:a,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let r=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});if(r.status==="aborted")return Ge;if(r.status==="dirty")return a.dirty(),Vo(r.value);else return this._def.out._parseAsync({data:r.value,path:n.path,parent:n})})();else{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});if(i.status==="aborted")return Ge;if(i.status==="dirty")return a.dirty(),{status:"dirty",value:i.value};else return this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,a){return new Ks({in:e,out:a,typeName:me.ZodPipeline})}}class Xo extends te{_parse(e){let a=this._def.innerType._parse(e),n=(i)=>{if(ms(i))i.value=Object.freeze(i.value);return i};return Cs(a)?a.then((i)=>n(i)):n(a)}unwrap(){return this._def.innerType}}Xo.create=(e,a)=>{return new Xo({innerType:e,typeName:me.ZodReadonly,...Pe(a)})};function QH(e,a={},n){if(e)return fl.create().superRefine((i,r)=>{var h,s;if(!e(i)){let S=typeof a==="function"?a(i):typeof a==="string"?{message:a}:a,u=(s=(h=S.fatal)!==null&&h!==void 0?h:n)!==null&&s!==void 0?s:!0,B=typeof S==="string"?{message:S}:S;r.addIssue({code:"custom",...B,fatal:u})}});return fl.create()}var $U={object:Wa.lazycreate},me;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(me||(me={}));var qU=(e,a={message:`Input not instance of ${e.name}`})=>QH((n)=>n instanceof e,a),$H=Li.create,qH=pr.create,ZU=Ds.create,UU=el.create,ZH=No.create,XU=Vl.create,jU=zs.create,IU=Eo.create,xU=vo.create,_U=fl.create,pU=_r.create,e5=Oi.create,a5=Hs.create,n5=wi.create,i5=Wa.create,r5=Wa.strictCreate,l5=Yo.create,o5=HS.create,h5=Oo.create,s5=Qi.create,k5=bs.create,S5=Gs.create,u5=Jl.create,B5=fo.create,c5=Qo.create,M5=$o.create,g5=al.create,d5=qo.create,y5=Nl.create,fH=ni.create,m5=Pi.create,C5=mr.create,z5=ni.createWithPreprocess,H5=Ks.create,b5=()=>$H().optional(),G5=()=>qH().optional(),D5=()=>ZH().optional(),K5={string:(e)=>Li.create({...e,coerce:!0}),number:(e)=>pr.create({...e,coerce:!0}),boolean:(e)=>No.create({...e,coerce:!0}),bigint:(e)=>el.create({...e,coerce:!0}),date:(e)=>Vl.create({...e,coerce:!0})},L5=Ge,zn=Object.freeze({__proto__:null,defaultErrorMap:Jo,setErrorMap:LU,getErrorMap:mS,makeIssue:CS,EMPTY_PATH:wU,addIssueToContext:ae,ParseStatus:cn,INVALID:Ge,DIRTY:Vo,OK:Cn,isAborted:yM,isDirty:mM,isValid:ms,isAsync:Cs,get util(){return Ie},get objectUtil(){return dM},ZodParsedType:ne,getParsedType:xr,ZodType:te,datetimeRegex:YH,ZodString:Li,ZodNumber:pr,ZodBigInt:el,ZodBoolean:No,ZodDate:Vl,ZodSymbol:zs,ZodUndefined:Eo,ZodNull:vo,ZodAny:fl,ZodUnknown:_r,ZodNever:Oi,ZodVoid:Hs,ZodArray:wi,ZodObject:Wa,ZodUnion:Yo,ZodDiscriminatedUnion:HS,ZodIntersection:Oo,ZodTuple:Qi,ZodRecord:bs,ZodMap:Gs,ZodSet:Jl,ZodFunction:fo,ZodLazy:Qo,ZodLiteral:$o,ZodEnum:al,ZodNativeEnum:qo,ZodPromise:Nl,ZodEffects:ni,ZodTransformer:ni,ZodOptional:Pi,ZodNullable:mr,ZodDefault:Zo,ZodCatch:Uo,ZodNaN:Ds,BRAND:QU,ZodBranded:bS,ZodPipeline:Ks,ZodReadonly:Xo,custom:QH,Schema:te,ZodSchema:te,late:$U,get ZodFirstPartyTypeKind(){return me},coerce:K5,any:_U,array:n5,bigint:UU,boolean:ZH,date:XU,discriminatedUnion:o5,effect:fH,enum:g5,function:B5,instanceof:qU,intersection:h5,lazy:c5,literal:M5,map:S5,nan:ZU,nativeEnum:d5,never:e5,null:xU,nullable:C5,number:qH,object:i5,oboolean:D5,onumber:G5,optional:m5,ostring:b5,pipeline:H5,preprocess:z5,promise:y5,record:k5,set:u5,strictObject:r5,string:$H,symbol:jU,transformer:fH,tuple:s5,undefined:IU,union:l5,unknown:pU,void:a5,NEVER:L5,ZodIssueCode:j,quotelessJson:KU,ZodError:En});var GS;((h)=>{h.RUNNER="RUNNER";h.COLLECTION="COLLECTION";h.FLOW="FLOW";h.REQUEST="REQUEST";h.CALLBACK_EVENT="CALLBACK_EVENT"})(GS||={});var DS;((Re)=>{Re.FETCHING_EVENTS_FROM_EVENT_QUEUE="FETCHING_EVENTS_FROM_EVENT_QUEUE";Re.EVENTS_RECEIVED_FROM_EVENT_QUEUE="EVENTS_RECEIVED_FROM_EVENT_QUEUE";Re.CALLBACK_TASK_MATCHED_TO_EVENT="CALLBACK_TASK_MATCHED_TO_EVENT";Re.CALLBACK_TASK_ASSERTION_COMPLETED="CALLBACK_TASK_ASSERTION_COMPLETED";Re.TERMINAL_CALLBACK_TASK_TIMEOUT="TERMINAL_CALLBACK_TASK_TIMEOUT";Re.FETCHING_EVENTS_FROM_KINESIS="FETCHING_EVENTS_FROM_KINESIS";Re.POLLING_KINESIS="POLLING_KINESIS";Re.KINESIS_EVENT_MATCHED_TO_RECORD="KINESIS_EVENT_MATCHED_TO_RECORD";Re.TERMINAL_KINESIS_TASK_TIMEOUT="TERMINAL_KINESIS_TASK_TIMEOUT";Re.COLLECTION_RUN_STARTED="COLLECTION_RUN_STARTED";Re.COLLECTION_RUN_FINISHED="COLLECTION_RUN_FINISHED";Re.COLLECTION_IS_EMPTY="COLLECTION_IS_EMPTY";Re.COLLECTION_ERROR="COLLECTION_ERROR";Re.FLOW_STARTED="FLOW_STARTED";Re.FLOW_FINISHED="FLOW_FINISHED";Re.FLOW_IS_EMPTY="FLOW_IS_EMPTY";Re.FLOW_REQUEST_NOT_FOUND="FLOW_REQUEST_NOT_FOUND";Re.FLOW_ERROR="FLOW_ERROR";Re.TASK_GROUP_STARTED="TASK_GROUP_STARTED";Re.TASK_GROUP_FINISHED="TASK_GROUP_FINISHED";Re.REQUEST_COMPLETED="REQUEST_COMPLETED";Re.REQUEST_ERROR="REQUEST_ERROR";Re.REQUEST_ERROR_POLLING_CONDITIONS_FAILED="REQUEST_ERROR_POLLING_CONDITIONS_FAILED";Re.TERMINAL_POLLING_CONDITIONS_FAILED="TERMINAL_POLLING_CONDITIONS_FAILED";Re.REQUEST_POLLING_STARTED="REQUEST_POLLING_STARTED";Re.REQUEST_PRE_REQUEST_SCRIPT_ERROR="REQUEST_PRE_REQUEST_SCRIPT_ERROR";Re.REQUEST_POST_REQUEST_SCRIPT_ERROR="REQUEST_POST_REQUEST_SCRIPT_ERROR";Re.REQUEST_ASSERTIONS_STARTED="REQUEST_ASSERTIONS_STARTED";Re.REQUEST_ASSERTION_SCRIPT_ERROR="REQUEST_ASSERTION_SCRIPT_ERROR";Re.REQUEST_ASSERTION_COMPLETED="REQUEST_ASSERTION_COMPLETED";Re.REQUEST_ASSERTIONS_OVERALL_COMPLETE="REQUEST_ASSERTIONS_OVERALL_COMPLETE";Re.DONE="DONE";Re.SYSTEM_ERROR="SYSTEM_ERROR";Re.ERROR_INVALID_COMMAND="ERROR_INVALID_COMMAND"})(DS||={});var w5=zn.object({assertionType:zn.string().optional(),entityId:zn.string().optional(),entityName:zn.string().optional(),wasSuccessful:zn.boolean().optional(),statusText:zn.string().optional(),statusCode:zn.string().optional(),data:zn.record(zn.string(),zn.any()).optional()}).optional(),fHe=zn.object({source:zn.nativeEnum(GS).optional(),type:zn.nativeEnum(DS).optional(),detail:w5.optional(),createdAt:zn.string().optional()});class zM{observer;constructor(e){this.observer=e}notify(e,a,n){this.observer.notify({source:e,type:a,detail:n})}notifyCollectionStart(e){this.notify("COLLECTION","COLLECTION_RUN_STARTED",{entityId:e})}notifyCollectionEmpty(){this.notify("COLLECTION","COLLECTION_IS_EMPTY")}notifyCollectionFinished(){this.notify("RUNNER","COLLECTION_RUN_FINISHED")}notifyFlowStart(e,a,n){this.notify("FLOW","FLOW_STARTED",{entityId:e,entityName:a,data:{description:n}})}notifyFlowEmpty(e,a,n){this.notify("FLOW","FLOW_IS_EMPTY",{entityId:e,entityName:a,data:{description:n}})}notifyFlowFinished(e,a,n){this.notify("FLOW","FLOW_FINISHED",{entityId:e,entityName:a,data:{description:n}})}notifyFlowError(e,a,n){this.notify("FLOW","FLOW_ERROR",{entityId:e,entityName:a,wasSuccessful:!1,statusText:"error",data:{description:`Flow error: ${n}`}})}notifyTaskGroupStart(e,a,n){this.notify("FLOW","TASK_GROUP_STARTED",{entityId:e,entityName:a||"(Task Group)",data:{description:n}})}notifyTaskGroupFinished(e,a,n){this.notify("FLOW","TASK_GROUP_FINISHED",{entityId:e,entityName:a||"(Task Group)",data:{description:n}})}notifyRequestCompleted(e,a,n,i,r,h){this.notify("REQUEST","REQUEST_COMPLETED",{entityId:e,entityName:a,statusText:i,statusCode:n,wasSuccessful:!0,data:{headers:r,body:h}})}notifyRequestPollingStarted(e,a,n,i,r){this.notify("REQUEST","REQUEST_POLLING_STARTED",{entityId:e,entityName:a,data:{timeout:n,interval:i,successConditions:r}})}notifyPollingConditionsFailed(e,a,n,i,r,h,s){let S=s?"TERMINAL_POLLING_CONDITIONS_FAILED":"REQUEST_ERROR_POLLING_CONDITIONS_FAILED";this.notify("REQUEST",S,{entityId:e,entityName:a,statusText:i,statusCode:n,wasSuccessful:!1,data:{headers:r,body:h}})}notifyCallbackTaskMatched(e,a,n){this.notify("FLOW","CALLBACK_TASK_MATCHED_TO_EVENT",{entityId:e,entityName:a,wasSuccessful:!0,data:{body:n}})}notifyCallbackTaskTimeout(e,a){this.notify("RUNNER","TERMINAL_CALLBACK_TASK_TIMEOUT",{entityId:e,entityName:a,wasSuccessful:!0})}notifyFetchingEventsFromQueue(){this.notify("RUNNER","FETCHING_EVENTS_FROM_EVENT_QUEUE")}notifyEventsReceived(e,a,n,i){this.notify("RUNNER","EVENTS_RECEIVED_FROM_EVENT_QUEUE",{entityId:e,entityName:a,data:{events:n,nrOfEvents:i}})}notifyFetchingEventsFromKinesis(){this.notify("RUNNER","FETCHING_EVENTS_FROM_KINESIS")}notifyKinesisPolling(){this.notify("RUNNER","POLLING_KINESIS")}notifyKinesisEventMatched(e,a,n,i,r,h,s,S){this.notify("FLOW","KINESIS_EVENT_MATCHED_TO_RECORD",{entityId:e,entityName:a,wasSuccessful:!0,data:{streamName:n,shardId:i||"unknown",partitionKey:r,sequenceNumber:h,approximateArrivalTimestamp:s,data:S}})}notifyKinesisTaskTimeout(e,a){this.notify("RUNNER","TERMINAL_KINESIS_TASK_TIMEOUT",{entityId:e,entityName:a,wasSuccessful:!1,data:{description:"Timed out waiting for matching Kinesis records"}})}notifyAssertionCompleted(e,a,n,i,r,h,s,S,u,B=!1){let M=B?"CALLBACK_TASK_ASSERTION_COMPLETED":"REQUEST_ASSERTION_COMPLETED";this.notify("REQUEST",M,{entityId:e,entityName:a,wasSuccessful:n,assertionType:i,data:{taskId:r,taskName:h,expectedValue:i!=="exists"?s:"(to exist)",actualValue:S,path:u}})}}function HM(e,a){let n=a.match(/[^.[\]]+/g)||[],i=[];function r(h,s,S){if(s===n.length){i.push(S.join("."));return}let u=n[s];if(u==="*"){if(Array.isArray(h))h.forEach((B,M)=>{r(B,s+1,[...S,`${M}`])})}else if(/^\d+$/.test(u)){if(Array.isArray(h)&&h[parseInt(u,10)]!==void 0)r(h[parseInt(u,10)],s+1,[...S,`${u}`])}else if(h&&h.hasOwnProperty(u))r(h[u],s+1,[...S,u])}if(Array.isArray(e)&&n.length>0&&/^\d+$/.test(n[0]||"")){let h=parseInt(n[0]);if(e[h]!==void 0)r(e[h],1,[`${h}`])}else if(Array.isArray(e)&&n[0]==="*")e.forEach((h,s)=>{r(h,1,[`${s}`])});else r(e,0,[]);return i.length>0?i:void 0}function P5(e){let a=["fetch(","console.","process.","require(","child_process.","fs.","http.","https.","net.","os.","exec(","spawn(","localStorage"];for(let n of a)if(e.includes(n))throw new Error(`Script contains forbidden keyword: ${n}`)}async function UH(e,a,n,i=new Map){try{P5(e);let r={};return i.forEach((S,u)=>{r[u]=S}),await n(e,{data:a,variables:r})}catch(r){return console.error("Error executing user script:",r),{passed:!1,errorMessage:"Error executing user script: "+r}}}function jo(e,a,n){if(e===null||e===void 0||a===null||a===void 0)return!0;let i=typeof e,r=typeof a;if(!n)return!0;switch(n){case"string":return i==="string";case"number":return i==="number";case"boolean":return i==="boolean";default:return!0}}var Cr=(e,a)=>{if(a.rules.type==="equal"||a.rules.type==="notEqual"||a.rules.type==="greaterThan"||a.rules.type==="lessThan"||a.rules.type==="greaterThanOrEqual"||a.rules.type==="lessThanOrEqual"){if(a.rules.dataType==="string")return String(e);if(a.rules.dataType==="number")return Number(e);if(a.rules.dataType==="boolean")return e==="true"?!0:!1}if(a.rules.type==="length")return Number(e);return e};async function XH(e,a,n,i=new Map){let r=!1,h=void 0;switch(a.rules.type==="equal"&&a.rules.dataType,a.rules.type){case"equal":let s=Cr(a.rules.value,a);if(!jo(e,s,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e===s;break;case"notEqual":let S=Cr(a.rules.value,a);if(!jo(e,S,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e!==S;break;case"greaterThan":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let u=Cr(a.rules.value,a);if(!jo(e,u,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e>u;break;case"lessThan":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let B=Cr(a.rules.value,a);if(!jo(e,B,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e<B;break;case"greaterThanOrEqual":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let M=Cr(a.rules.value,a);if(!jo(e,M,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e>=M;break;case"lessThanOrEqual":if(e===void 0||e===null||a.rules.value===void 0||a.rules.value===null){r=!1;break}let C=Cr(a.rules.value,a);if(!jo(e,C,a.rules.dataType)){r=!1,h=`Type mismatch: cannot compare ${typeof e} with ${a.rules.dataType}`;break}r=e<=C;break;case"length":let H=Cr(a.rules.value,a);if(typeof e==="string"||Array.isArray(e)){r=e.length===H;break}r=!1;break;case"exists":r=e!==void 0;break;case"script":try{let R=await UH(a.rules.value,e,n,i);if(r=R.passed,h=R.errorMessage,R.setVariables){let W=R.setVariables instanceof Map?R.setVariables:new Map(Object.entries(R.setVariables));return{passed:r,error:h,setVariables:W}}}catch(R){r=!1,console.error("error",R),h="Error executing user script"}break;default:break}return{passed:r,error:h}}class bM{async executeAssertion(e,a,n,i=new Map){try{if(this.shouldSkipAssertion(e))return{assertionId:e.id,passed:!1,expectedValue:"N/A (skipped)",actualValue:"N/A (skipped)",assertion:e,error:"Assertion skipped due to invalid configuration"};let r=this.extractValueFromSource(e,a),h=await XH(r,e,n,i),s=e.rules.type!=="exists"?Cr(e.rules.value,e):"(to exist)",S=r;if(e.rules.type==="length"){if(typeof r==="string"||Array.isArray(r))S=r.length}if(e.rules.type==="script"&&h.error)S=h.error;return{assertionId:e.id,passed:h.passed,expectedValue:s,actualValue:S,assertion:e,error:h.error,setVariables:h.setVariables}}catch(r){return{assertionId:e.id,passed:!1,expectedValue:"N/A",actualValue:"N/A",assertion:e,error:r instanceof Error?r.message:String(r)}}}async executeAssertions(e,a,n,i=new Map){if(!e||e.length===0)return{overallPassed:!0,results:[]};let r=[],h=!0;for(let s of e){let S=await this.executeAssertion(s,a,n,i);if(r.push(S),!S.passed)h=!1}return{overallPassed:h,results:r}}extractValueFromSource(e,a){switch(e.source||"body"){case"body":return this.getValueByPath(a.data,e.path);case"headers":if(!a.headers)return;return a.headers[e.path];case"response":if(!a.response)return;return this.extractFromResponse(a.response,e.path);default:return this.getValueByPath(a.data,e.path)}}extractFromResponse(e,a){if(!e)return;switch(a.toLowerCase()){case"status":return e.status;case"statustext":return e.statusText;case"ok":return e.ok;default:return e[a]}}getValueByPath(e,a){if(!a)return e;let n=a.match(/[^.[\]]+|\[\d+\]/g)||[],i=e;for(let r of n){if(i===null||i===void 0)return;if(r.startsWith("[")&&r.endsWith("]")){let h=parseInt(r.slice(1,-1),10);if(Array.isArray(i)&&!isNaN(h))i=i[h];else return}else i=i[r]}return i}shouldSkipAssertion(e){if(e.rules.type==="script"||e.rules.type==="exists")return!1;if(e.rules.type==="length"){let n=e.rules.value;return n===void 0||n===null||n===""}let a=e.rules.value;if(!a)return!0;if(e.rules.dataType==="boolean")return a!=="true"&&a!=="false";return!1}}function GM(e,a){if(!a||!e)return[a];if(!a.includes("[*]"))return[a];let n=[],i=a.split("[*]");if(i.length!==2)return[a];let[r,h]=i,s=e;if(r){let S=r.split(".").filter(Boolean);for(let u of S)if(s&&typeof s==="object")s=s[u];else return[a]}if(Array.isArray(s))for(let S=0;S<s.length;S++){let u=`${r}[${S}]${h}`;n.push(u)}else return[a];return n}var Ls=async(userScript,context)=>{try{let userFunction=eval("("+userScript+")"),result=userFunction(context);if(typeof result==="boolean")return{passed:result};else if(typeof result==="object"&&result!==null){if(result.setVariables&&typeof result.setVariables==="object"&&!(result.setVariables instanceof Map))result.setVariables=new Map(Object.entries(result.setVariables));return result}else return{passed:!1,errorMessage:"Script must return boolean or valid result object"}}catch(e){return{passed:!1,errorMessage:e instanceof Error?e.message:String(e)}}};class DM{notificationService;variableService;sharedService=new bM;constructor(e,a){this.notificationService=e,this.variableService=a}getVariablesAsMap(){let e=new Map,a=this.variableService.getVariables();for(let n of a)e.set(n.key,n.value);return e}async assertObject(e,a,n,i,r,h=!1){let s=!1;for(let S of e){if(!S&&n.rules.type!=="script")continue;let u={...n,path:S},B={data:a},M=this.getVariablesAsMap(),C=await this.sharedService.executeAssertion(u,B,Ls,M);if(C.setVariables)C.setVariables.forEach((R,W)=>{this.variableService.setVariable(W,R)});let H=n.rules.type==="script";if(this.notificationService.notifyAssertionCompleted(n.id,n.name||"(Unnamed Assertion)",C.passed,n.rules.type,i,r,H?`${n.rules.name||"Script"} (script)`:C.expectedValue,H?C.error||(C.passed?"Passed":"Failed"):C.actualValue,n.path,h),C.passed){s=!0;break}}return s}async runHttpRequestAssertions(e,a,n){if(!e.assertions||e.assertions.length===0)return!0;let i=!0;for(let r of e.assertions){let h=r.source||"body";if(h==="body"||r.path.startsWith("body")){let s=h==="body"?r.path:r.path.split("body")[1];if(!s&&r.rules.type!=="script"){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path),i=!1;continue}let S=r.rules.type==="script"&&!s?"":s||"",u;if(typeof a==="object"&&S.includes("[*]"))u=GM(a,S);else if(typeof a==="object"){let M=HM(a,S);if(r.rules.type==="script"&&S==="")u=[""];else u=M?.filter(Boolean)||[S]}else u=[S];if(!u||u.length===0){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path),i=!1;continue}if(!await this.assertObject(u,a,r,e.id,e.name))i=!1}else{let s={data:a,headers:this.convertHeaders(n.headers),response:{status:n.status,statusText:n.statusText,ok:n.ok}},S=this.getVariablesAsMap(),u=await this.sharedService.executeAssertion(r,s,Ls,S);if(u.setVariables)u.setVariables.forEach((M,C)=>{this.variableService.setVariable(C,M)});let B=r.rules.type==="script";if(this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",u.passed,r.rules.type,e.id,e.name,B?`${r.rules.name||"Script"} (script)`:u.expectedValue,B?u.error||(u.passed?"Passed":"Failed"):u.actualValue,r.path),!u.passed)i=!1}}return i}async runCallbackAssertions(e,a,n){if(!e.assertions||e.assertions.length===0)return!0;let i=!0;for(let r of e.assertions){let h=r.source||"body";if(h==="body"||r.path.startsWith("body")){let s=h==="body"?r.path:r.path.split("body")[1];if(!s&&r.rules.type!=="script"){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path,!0),i=!1;continue}let S=r.rules.type==="script"&&!s?"":s||"",u;if(typeof a==="object"&&S.includes("[*]"))u=GM(a,S);else if(typeof a==="object"){let M=HM(a,S);if(r.rules.type==="script"&&S==="")u=[""];else u=M?.filter(Boolean)||[S]}else u=[S];if(!u||u.length===0){let M=r.rules.type==="script";this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",!1,r.rules.type,e.id,e.name,M?`${r.rules.name||"Script"} (script)`:r.rules.type!=="exists"?r.rules.value:"(to exist)",M?"Script Error":void 0,r.path,!0),i=!1;continue}if(!await this.assertObject(u,a,r,e.id,e.name,!0))i=!1}else{let s={data:a,headers:n},S=this.getVariablesAsMap(),u=await this.sharedService.executeAssertion(r,s,Ls,S);if(u.setVariables)u.setVariables.forEach((M,C)=>{this.variableService.setVariable(C,M)});let B=r.rules.type==="script";if(this.notificationService.notifyAssertionCompleted(r.id,r.name||"(Unnamed Assertion)",u.passed,r.rules.type,e.id,e.name,B?`${r.rules.name||"Script"} (script)`:u.expectedValue,B?u.error||(u.passed?"Passed":"Failed"):u.actualValue,r.path,!0),!u.passed)i=!1}}return i}async runKinesisAssertions(e,a){return this.runCallbackAssertions(e,a)}async checkPollingConditions(e,a){if(!e||e.length===0)return!0;let n={data:a};for(let i of e){let r=this.getVariablesAsMap(),h=await this.sharedService.executeAssertion(i,n,Ls,r);if(h.setVariables)h.setVariables.forEach((s,S)=>{this.variableService.setVariable(S,s)});if(!h.passed)return!1}return!0}convertHeaders(e){let a={};return e.forEach((n,i)=>{a[i]=n}),a}}var PS=Tl(KS(),1);var wS=Tl(ib(),1);class LM{constructor(){}parse(e,a){let n=e;return a.forEach((i)=>{i.value=String(i.value).replace(/\\/g,""),n=n.replace(`{{${i.key}}}`,i.value)}),n=n.replace(/{{util:random-uuid}}/g,crypto.randomUUID()),n=n.replace(/{{util:random-full-name}}/g,wS.default()),n=n.replace(/{{util:random-first-name}}/g,wS.default({first:!0,last:!1})),n=n.replace(/{{util:random-last-name}}/g,wS.default({first:!1,last:!0})),n}}class wM{environmentVariables;variableParser;constructor(e){this.environmentVariables=e||[],this.variableParser=new LM}parseString(e){if(!e)return"";return this.variableParser.parse(e,this.environmentVariables)}getVariables(){return this.environmentVariables}setVariable(e,a){if(!e)return;let n=this.environmentVariables.findIndex((i)=>i.key===e);if(n===-1)this.environmentVariables.push({id:crypto.randomUUID(),key:e,value:a,type:"variable"});else this.environmentVariables[n]={...this.environmentVariables[n],value:a}}async runScripts(e,a,n,i){if(!e)return;for(let r of e)if(r.type==="setVariableScriptUtil"){if(r.source==="utilRandomUuid"){let S=crypto.randomUUID();this.setVariable(r.variableName,S);continue}let h,s=this.parseString(r.path||"");switch(r.source){case"body":h=PS.default.get(a,s);break;case"headers":if(n)h=n[s];break;case"response":if(i)switch(s.toLowerCase()){case"status":h=i.status;break;case"statustext":h=i.statusText;break;case"ok":h=i.ok;break;default:h=PS.default.get(i,s);break}break;default:h=PS.default.get(a,s);break}this.setVariable(r.variableName,h)}}}class PM{variableService;assertionService;notificationService;constructor(e,a,n){this.variableService=e,this.assertionService=a,this.notificationService=n}async sendRequest(e){let a=this.variableService.parseString(e.url),n="";if(e.body)n=this.variableService.parseString(e.body);if(!a.startsWith("http://")&&!a.startsWith("https://"))return new Response(JSON.stringify({error:"Invalid URL"}),{status:400,statusText:"Bad Request",headers:new Headers({"Content-Type":"application/json"})});try{let i;try{let u={method:e.method},B=new Headers;if(B.append("Content-Type","application/json"),e.headers&&typeof e.headers==="object")Object.entries(e.headers).forEach(([M,C])=>{if(M&&C&&typeof C==="string")B.append(M,C)});if(u.headers=B,!["GET","HEAD"].includes(e.method)&&n)u.body=n;i=await fetch(a,u)}catch(u){console.error("Fetch error:",u),i=new Response(JSON.stringify({message:"This is a mock response for testing",url:a}),{status:200,statusText:"OK",headers:new Headers({"Content-Type":"application/json"})})}let r="{}",h=new Headers({"Content-Type":"application/json"}),s=200,S="OK";if(i){if(s=i.status||200,S=i.statusText||"OK",i.headers)h=i.headers;try{if(typeof i.clone==="function"){let u=i.clone();if(typeof u.text==="function")r=await u.text()}}catch(u){console.error("Error cloning or reading response:",u),r=JSON.stringify({message:"Error reading response"})}}return new Response(r,{status:s,statusText:S,headers:h})}catch(i){return console.error("Error in sendRequest:",i),new Response(JSON.stringify({error:"Request failed"}),{status:500,statusText:"Error",headers:new Headers({"Content-Type":"application/json"})})}}async handleDelay(e){if(e)await new Promise((a)=>setTimeout(a,e))}async handlePolling(e,a,n){let i=e.config?.polling;if(!i?.enabled)return a;this.notificationService.notifyRequestPollingStarted(e.id,e.name||"Unnamed Request",i.timeoutMilliseconds,i.intervalMilliseconds,i.successConditions);let r=1,h=!1,s=a.clone();if(i.successConditions?.length)h=await this.assertionService.checkPollingConditions(i.successConditions,s);let S=n+(i.timeoutMilliseconds??1e4);while(!h&&new Date().getTime()<S)if(await new Promise((u)=>setTimeout(u,i.intervalMilliseconds??1000)),r++,s=await this.sendRequest(e),i.successConditions?.length)h=await this.assertionService.checkPollingConditions(i.successConditions,s);else{h=!0;break}if(!h)this.notificationService.notifyPollingConditionsFailed(e.id,e.name||"Unnamed Request",String(s.status),s.statusText||"No status text",JSON.stringify(s.headers),s.body,i.stopOnFailure||!1);return s}async runAssertions(e,a){let n={};try{let r=a.clone(),h=r.headers.get("Content-Type");if(h&&h.includes("application/json"))try{let s=await r.text();n=JSON.parse(s)}catch(s){n={textContent:await r.text()}}else n={textContent:await r.text()}}catch(r){console.error("Error parsing response body:",r),n={error:"Failed to parse response body"}}let i={id:e.id,name:e.name||"Unnamed Request",assertions:e.assertions};return this.assertionService.runHttpRequestAssertions(i,n,a)}async handleTask(e){await this.handleDelay(e.config?.delay);let a=new Date().getTime(),n=await this.sendRequest(e),i=n;if(e.config?.polling?.enabled)i=await this.handlePolling(e,n,a);let r=i.clone(),h=i.clone(),s=i.clone(),S=await r.text(),u={};r.headers.forEach((M,C)=>{u[C]=M}),this.notificationService.notifyRequestCompleted(e.id,e.name||"Unnamed Request",String(i.status),i.statusText,JSON.stringify(u),{body:S});let B=await s.text();if(this.variableService.setVariable(e.id,B),e.assertions)await this.runAssertions(e,h);if(e.postRequestScripts)try{let M;try{M=JSON.parse(S)}catch(H){M=S}let C=i.clone();await this.variableService.runScripts(e.postRequestScripts,M,u,C)}catch(M){console.error("Error running post request scripts:",M)}return i}}var Rs=Tl(KS(),1);import{Buffer as V5}from"node:buffer";function rb(e,a,n){if(n==="JSON"){if(a==="BASE64")return JSON.parse(V5.from(e,"base64").toString("utf-8"));return JSON.parse(e)}else return e}class RS{collectionId;flowId;flowName;eventQueueFetcher;variableService;assertionService;notificationService;receivedEvents=[];collectionRunStartTime;environment;apiKey;constructor(e,a,n,i,r,h,s,S,u,B){this.collectionId=e,this.flowId=a,this.flowName=n,this.eventQueueFetcher=i,this.variableService=r,this.assertionService=h,this.notificationService=s,this.collectionRunStartTime=S,this.environment=u,this.apiKey=B}async fetchEvents(){this.notificationService.notifyFetchingEventsFromQueue();let e=await this.eventQueueFetcher.fetch(this.collectionId,this.environment,this.collectionRunStartTime,this.apiKey||"");if(e===void 0)return;this.receivedEvents.push(...e),this.notificationService.notifyEventsReceived(this.flowId,this.flowName,e,e.length)}async processCallbackTask(e){let a=this.receivedEvents.find((r)=>{let h=rb(r.body,e.selectBodyEncoding,e.bodyFormat);return e.matchOnFields.reduce((s,S)=>{let u;if(S.source==="body")u=Rs.default.get(h,S.path);else if(S.source==="headers"){let M={};if(r.headers)for(let C of r.headers)M[C.key]=C.value;u=Rs.default.get(M,S.path)}else if(S.source==="response")u=Rs.default.get(r,S.path);else u=Rs.default.get(h,S.path);let B;if(S.rules.type!=="exists")B=u===S.rules.value;else B=u!==void 0;return B&&s},!0)});if(!a)return!1;this.receivedEvents=this.receivedEvents.filter((r)=>r.internalId!==a.internalId),e.taskComplete=!0,this.notificationService.notifyCallbackTaskMatched(e.id,e.name||"Unnamed Callback Task",a.body);let n=rb(a.body,e.selectBodyEncoding,e.bodyFormat),i={};if(a.headers)for(let r of a.headers)i[r.key]=r.value;if(await this.variableService.runScripts(e.postCallbackScripts,n,i),e.assertions&&e.assertions.length>0){let r={id:e.id,name:e.name||"Unnamed Callback Task",assertions:e.assertions},h={};if(a.headers)for(let s of a.headers)h[s.key]=s.value;await this.assertionService.runCallbackAssertions(r,n,h)}return!0}async handleTask(e){let{callbackTasks:a,taskGroup:n}=e,i=new Date().getTime(),r=a.length,h=20000;while(new Date().getTime()-i<h&&r>0){await this.fetchEvents();for(let s of a){if(s.taskComplete)continue;if(await this.processCallbackTask(s))r--}if(r===0)break;await new Promise((s)=>setTimeout(s,2000))}if(r>0)this.notificationService.notifyCallbackTaskTimeout(n.id,n.name||"Unnamed Task Group")}}var RM=Tl(KS(),1);import{Buffer as lb}from"node:buffer";class WS{kinesisEventFetcher;variableService;assertionService;notificationService;collectionId;flowId;flowName;collectionRunStartTime;environmentName;constructor(e,a,n,i,r,h,s,S,u){this.collectionId=e,this.flowId=a,this.flowName=n,this.kinesisEventFetcher=i,this.variableService=r,this.assertionService=h,this.notificationService=s,this.collectionRunStartTime=S,this.environmentName=u}async processKinesisRecord(e,a){let n={};try{if(a.Data)if(e.selectBodyEncoding==="BASE64")n=JSON.parse(lb.from(a.Data).toString("base64"));else n=JSON.parse(lb.from(a.Data).toString("utf-8"))}catch(h){return console.error(`Error parsing record data: ${h}`),!1}let i=[];if(!e.matchOnFields.reduce((h,s)=>{let S;if(s.source==="body"||s.source==="response"||!s.source)S=RM.default.get(n,s.path);else S=RM.default.get(n,s.path);let u=!1;if(s.rules.type!=="exists")u=S===s.rules.value;else u=S!==void 0;return i.push({path:s.path,matched:u}),u&&h},!0))return!1;if(e.taskComplete=!0,this.notificationService.notifyKinesisEventMatched(e.id,e.name||"Unnamed Kinesis Task",e.streamName,e.shardId||"unknown",a.PartitionKey,a.SequenceNumber,a.ApproximateArrivalTimestamp?.toString(),n),e.postEventScripts&&e.postEventScripts.length>0)await this.variableService.runScripts(e.postEventScripts,n);if(e.assertions&&e.assertions.length>0){let h={id:e.id,name:e.name||"Unnamed Kinesis Task",assertions:e.assertions};await this.assertionService.runKinesisAssertions(h,n)}return!0}async handleTask(e){let{kinesisTasks:a,taskGroup:n}=e;this.notificationService.notifyFetchingEventsFromKinesis();let i=new Date().getTime(),r=a.length,h=a[0]?.config?.timeoutSeconds?a[0].config.timeoutSeconds*1000:20000;while(new Date().getTime()-i<h&&r>0){for(let s of a){if(s.taskComplete)continue;try{let S=s.config?.region||"us-east-1",u=await this.kinesisEventFetcher.fetchRecords(s.streamName,s.shardId,S,s.config?.awsAuthId,100);if(!u||u.length===0)continue;for(let B of u)if(await this.processKinesisRecord(s,B)){r--;break}}catch(S){console.error(`Error processing Kinesis stream: ${S}`),this.notificationService.notifyFlowError(s.id,s.name||"Unnamed Kinesis Task",`Error processing Kinesis stream: ${S}`),s.taskComplete=!0,r--}await new Promise((S)=>setTimeout(S,100))}if(r===0)break;this.notificationService.notifyKinesisPolling(),await new Promise((s)=>setTimeout(s,3000))}if(r>0)this.notificationService.notifyKinesisTaskTimeout(n.id,n.name||"Unnamed Task Group")}}var Qh=Tl(JN(),1);class WB{static getClient(e,a){let n={region:e};if(a||process.env.LOCAL_AWS==="true")n.endpoint="http://localhost:4566",n.credentials={accessKeyId:"test",secretAccessKey:"test"};return new Qh.SQSClient(n)}static async sendMessage(e,a,n,i){if(!a||a.trim()==="")throw new Error("Queue name is required and cannot be empty");let r=new Qh.GetQueueUrlCommand({QueueName:a}),s={QueueUrl:(await e.send(r)).QueueUrl,MessageBody:n};if(i?.messageGroupId)s.MessageGroupId=i.messageGroupId;if(i?.messageDeduplicationId)s.MessageDeduplicationId=i.messageDeduplicationId;if(i?.delaySeconds!==void 0)s.DelaySeconds=i.delaySeconds;try{let S=new Qh.SendMessageCommand(s);return(await e.send(S)).MessageId||""}catch(S){throw console.error("Error sending SQS message:",S),S}}}import Bge from"node:process";class mm{variableService;assertionService;notificationService;useLocalStack;constructor(e,a,n){this.variableService=e,this.assertionService=a,this.notificationService=n,this.useLocalStack=Bge.env.LOCAL_AWS==="true"}async handleTask(e){let{sqsTasks:a}=e;for(let n of a)await this.handleSingleSqsTask(n)}async handleSingleSqsTask(e){let{id:a,name:n,queueName:i,region:r,messageGroupId:h,messageDeduplicationId:s,delaySeconds:S,body:u}=e;try{let B=this.variableService.parseString(i),M=this.variableService.parseString(u);if(!B||B.trim()==="")throw new Error("Queue name is required and cannot be empty after variable resolution");let C=typeof B==="string"&&B.endsWith(".fifo"),H=Date.now(),R=await this.sendWithSqsClient(r||"us-east-1",B,M,{messageGroupId:C?h||"default":void 0,messageDeduplicationId:C?s:void 0,delaySeconds:S}),A=Date.now()-H,Y={messageId:R,queueName:B,region:r||"us-east-1",isFifo:C,success:!0,responseTime:A};this.notificationService.notify("REQUEST","REQUEST_COMPLETED",{entityId:a,entityName:n||"(Unnamed SQS Task)",statusCode:"200",statusText:"OK",data:{body:JSON.stringify(Y),headers:JSON.stringify({"Content-Type":"application/json"})}})}catch(B){console.error(`Error sending SQS message: ${B}`);let M={error:String(B),queueName:i,region:r||"us-east-1",success:!1};this.notificationService.notify("REQUEST","REQUEST_COMPLETED",{entityId:a,entityName:n||"(Unnamed SQS Task)",statusCode:"500",statusText:"Error",data:{body:JSON.stringify(M),headers:JSON.stringify({"Content-Type":"application/json"})}}),this.notificationService.notifyFlowError(a,n||"(Unnamed SQS Task)",`Error sending SQS message: ${B}`)}}async sendWithSqsClient(e,a,n,i){try{let r=WB.getClient(e,this.useLocalStack),h={messageGroupId:i?.messageGroupId?this.variableService.parseString(i.messageGroupId):void 0,messageDeduplicationId:i?.messageDeduplicationId?this.variableService.parseString(i.messageDeduplicationId):void 0,delaySeconds:i?.delaySeconds};return await WB.sendMessage(r,a,n,h)}catch(r){throw console.error(`Error sending SQS message: ${r}`),r}}}function NN(e){return e.type==="request"}function EN(e){return e.type==="sqs-dispatch"}function vN(e){return e.type==="kinesis-event"}class Cm{collection;environmentName;currentFlow;eventQueueFetcher;kinesisEventFetcher;collectionRunStarted;collectionRunStartedTimestamp;notificationService;assertionService;variableService;requestHandler;callbackHandler;kinesisHandler;sqsHandler;apiKey;get environmentVariables(){return this.variableService.getVariables()}constructor(e,a,n,i,r,h){this.collection=e,this.environmentName=a,this.eventQueueFetcher=n,this.kinesisEventFetcher=i,this.collectionRunStarted=new Date,this.collectionRunStartedTimestamp=this.collectionRunStarted.getTime(),this.apiKey=h;let s=e.environments?.find((u)=>u.name===this.environmentName);if(!s){let u=e.environments?.map((B)=>B.name)||[];throw new Error(`Environment "${this.environmentName}" not found in collection. Available environments: ${u.join(", ")}`)}let S=s?.variables||[];this.notificationService=new zM(r),this.variableService=new wM(S),this.assertionService=new DM(this.notificationService,this.variableService),this.requestHandler=new PM(this.variableService,this.assertionService,this.notificationService),this.sqsHandler=new mm(this.variableService,this.assertionService,this.notificationService),this.callbackHandler=new RS(this.collection.id,"","",this.eventQueueFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName||"",this.apiKey),this.kinesisHandler=new WS(this.collection.id,"","",this.kinesisEventFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName)}async run(){return await this.runner()}async runSingleFlow(e){return this.collection.flows=this.collection.flows.filter((a)=>a.id===e),await this.runner()}async runner(){if(this.collection.flows.length===0)return this.notificationService.notifyCollectionEmpty(),this.collection;this.notificationService.notifyCollectionStart(this.collection.id),this.collection.flows=this.collection.flows.filter((e)=>e.active);for(let e of this.collection.flows)await this.handleFlowRun(e);return this.notificationService.notifyCollectionFinished(),this.collection}async handleFlowRun(e){let a=e.id,n=e.name||"(Unnamed Flow)",i=e.description;if(this.notificationService.notifyFlowStart(a,n,i),this.currentFlow=e,e.tasks.length===0){this.notificationService.notifyFlowEmpty(a,n,i);return}this.callbackHandler=new RS(this.collection.id,a,n,this.eventQueueFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName||"",this.apiKey),this.kinesisHandler=new WS(this.collection.id,a,n,this.kinesisEventFetcher,this.variableService,this.assertionService,this.notificationService,this.collectionRunStartedTimestamp,this.environmentName);for(let r of e.tasks)if(r.isGroup)await this.handleTaskGroup(r);else await this.handleTaskReference(r);this.notificationService.notifyFlowFinished(a,n,i)}async handleTaskGroup(e){let a=e.id,n=e.name||"(Task Group)";this.notificationService.notifyTaskGroupStart(a,n,e.description);let i=[],r=[],h=[],s=[];for(let S of e.tasks){let u=this.collection.tasks.find((B)=>S.refId===B.id);if(!u){let B=this.currentFlow?.id||"",M=this.currentFlow?.name||"(Unnamed Flow)";this.notificationService.notifyFlowError(B,M,"Task not found in the collection");continue}if(u.type==="request"&&NN(u))i.push(this.requestHandler.handleTask(u));else if(u.type==="sqs-dispatch"&&EN(u))s.push(u);else if(u.type==="callback")r.push(u);else if(u.type==="kinesis-event"&&vN(u))h.push(u)}if(await Promise.all(i),s.length>0)await this.sqsHandler.handleTask({sqsTasks:s,taskGroup:e});if(r.length>0)await this.callbackHandler.handleTask({callbackTasks:r,taskGroup:e});if(h.length>0)await this.kinesisHandler.handleTask({kinesisTasks:h,taskGroup:e});this.notificationService.notifyTaskGroupFinished(a,n,e.description)}async handleTaskReference(e){let a=this.collection.tasks.find((i)=>e.refId===i.id);if(!a){let i=this.currentFlow?.id||"",r=this.currentFlow?.name||"(Unnamed Flow)";this.notificationService.notifyFlowError(i,r,"Task not found in the collection");return}let n={id:a.id,name:a.name||"(Single Task)",description:a.description};if(a.type==="request"&&NN(a))await this.requestHandler.handleTask(a);else if(a.type==="sqs-dispatch"&&EN(a))await this.sqsHandler.handleTask({sqsTasks:[a],taskGroup:n});else if(a.type==="callback")await this.callbackHandler.handleTask({callbackTasks:[a],taskGroup:n});else if(a.type==="kinesis-event"&&vN(a))await this.kinesisHandler.handleTask({kinesisTasks:[a],taskGroup:n})}}class zm{apiBaseUrl;receivedEvents=[];constructor(e){this.apiBaseUrl=e}fetch=async(e,a,n,i)=>{try{let r=new URL(`${this.apiBaseUrl}/callback/get-events`);r.searchParams.set("collectionId",e),r.searchParams.set("environment",a),r.searchParams.set("cutoffTimestamp",n.toString());let h=await fetch(r.toString(),{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`}});if(!h.ok){console.error(`Failed to fetch events: ${h.status} ${h.statusText}`);return}let s=await h.json();if(!s.success){console.error(`API returned error: ${s.error}`);return}let S=s.events||[];if(S.length===0)return;return this.receivedEvents.push(...S),S}catch(r){console.error("Error fetching events from API:",r);return}}}var Cl=Tl(E1(),1),YO=Tl(EO(),1);import vO from"node:process";class nC{processedSequenceNumbers=new Set;shardIterators=new Map;getClient(e){let a={region:e};if(vO.env.LOCAL_AWS==="true")a.endpoint="http://localhost:4566",a.credentials={accessKeyId:"test",secretAccessKey:"test"},a.requestHandler=new YO.NodeHttpHandler({httpAgent:void 0,httpsAgent:void 0,connectionTimeout:5000,socketTimeout:5000});return new Cl.KinesisClient(a)}async getAllShardIds(e,a){try{let n=await e.send(new Cl.ListShardsCommand({StreamName:a}));if(n.Shards&&n.Shards.length>0)return n.Shards.map((r)=>r.ShardId).filter((r)=>r!==void 0);return console.error(`No shards found for stream: ${a}`),[]}catch(n){throw console.error(`Error listing shards for stream ${a}:`,n),n}}async fetchRecordsFromShard(e,a,n,i,r){try{let h=`${a}:${n}`,s=this.shardIterators.get(h);if(!s){let M=await e.send(new Cl.GetShardIteratorCommand({StreamName:a,ShardId:n,ShardIteratorType:"LATEST"}));if(!M.ShardIterator)return console.error(`Failed to get shard iterator for stream: ${a}, shard: ${n}`),[];s=M.ShardIterator}let S=await e.send(new Cl.GetRecordsCommand({ShardIterator:s,Limit:r}));if(S.NextShardIterator)this.shardIterators.set(h,S.NextShardIterator);else this.shardIterators.delete(h);return(S.Records||[]).filter((M)=>{if(!M.SequenceNumber)return!0;let C=!this.processedSequenceNumbers.has(M.SequenceNumber);if(C)this.processedSequenceNumbers.add(M.SequenceNumber);return C})}catch(h){return console.error(`Error fetching records from shard ${n}:`,h),[]}}async fetchRecords(e,a,n,i,r=100){let h=this.getClient(n),s=vO.env.LOCAL_AWS==="true";try{let S=[];if(a)S=[a];else S=await this.getAllShardIds(h,e);if(S.length===0)return;let u=S.map((C)=>this.fetchRecordsFromShard(h,e,C,s,Math.floor(r/S.length)||1));return(await Promise.all(u)).flat()}catch(S){throw console.error(`Error fetching records from Kinesis stream ${e}:`,S),S}}}var OO=(e=0)=>(a)=>`\x1B[${a+e}m`,QO=(e=0)=>(a)=>`\x1B[${38+e};5;${a}m`,$O=(e=0)=>(a,n,i)=>`\x1B[${38+e};2;${a};${n};${i}m`,Pa={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]}},bRe=Object.keys(Pa.modifier),dHe=Object.keys(Pa.color),yHe=Object.keys(Pa.bgColor),GRe=[...dHe,...yHe];function mHe(){let e=new Map;for(let[a,n]of Object.entries(Pa)){for(let[i,r]of Object.entries(n))Pa[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=Pa[i],e.set(r[0],r[1]);Object.defineProperty(Pa,a,{value:n,enumerable:!1})}return Object.defineProperty(Pa,"codes",{value:e,enumerable:!1}),Pa.color.close="\x1B[39m",Pa.bgColor.close="\x1B[49m",Pa.color.ansi=OO(),Pa.color.ansi256=QO(),Pa.color.ansi16m=$O(),Pa.bgColor.ansi=OO(10),Pa.bgColor.ansi256=QO(10),Pa.bgColor.ansi16m=$O(10),Object.defineProperties(Pa,{rgbToAnsi256:{value(a,n,i){if(a===n&&n===i){if(a<8)return 16;if(a>248)return 231;return Math.round((a-8)/247*24)+232}return 16+36*Math.round(a/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(a){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(a.toString(16));if(!n)return[0,0,0];let[i]=n;if(i.length===3)i=[...i].map((h)=>h+h).join("");let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:(a)=>Pa.rgbToAnsi256(...Pa.hexToRgb(a)),enumerable:!1},ansi256ToAnsi:{value(a){if(a<8)return 30+a;if(a<16)return 90+(a-8);let n,i,r;if(a>=232)n=((a-232)*10+8)/255,i=n,r=n;else{a-=16;let S=a%36;n=Math.floor(a/36)/5,i=Math.floor(S/6)/5,r=S%6/5}let h=Math.max(n,i,r)*2;if(h===0)return 30;let s=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));if(h===2)s+=60;return s},enumerable:!1},rgbToAnsi:{value:(a,n,i)=>Pa.ansi256ToAnsi(Pa.rgbToAnsi256(a,n,i)),enumerable:!1},hexToAnsi:{value:(a)=>Pa.ansi256ToAnsi(Pa.hexToAnsi256(a)),enumerable:!1}}),Pa}var CHe=mHe(),fi=CHe;import iC from"node:process";import zHe from"node:os";import qO from"node:tty";function Ci(e,a=globalThis.Deno?globalThis.Deno.args:iC.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=a.indexOf(n+e),r=a.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:Ea}=iC,IB;if(Ci("no-color")||Ci("no-colors")||Ci("color=false")||Ci("color=never"))IB=0;else if(Ci("color")||Ci("colors")||Ci("color=true")||Ci("color=always"))IB=1;function HHe(){if("FORCE_COLOR"in Ea){if(Ea.FORCE_COLOR==="true")return 1;if(Ea.FORCE_COLOR==="false")return 0;return Ea.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Ea.FORCE_COLOR,10),3)}}function bHe(e){if(e===0)return!1;return{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function GHe(e,{streamIsTTY:a,sniffFlags:n=!0}={}){let i=HHe();if(i!==void 0)IB=i;let r=n?IB:i;if(r===0)return 0;if(n){if(Ci("color=16m")||Ci("color=full")||Ci("color=truecolor"))return 3;if(Ci("color=256"))return 2}if("TF_BUILD"in Ea&&"AGENT_NAME"in Ea)return 1;if(e&&!a&&r===void 0)return 0;let h=r||0;if(Ea.TERM==="dumb")return h;if(iC.platform==="win32"){let s=zHe.release().split(".");if(Number(s[0])>=10&&Number(s[2])>=10586)return Number(s[2])>=14931?3:2;return 1}if("CI"in Ea){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((s)=>(s in Ea)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((s)=>(s in Ea))||Ea.CI_NAME==="codeship")return 1;return h}if("TEAMCITY_VERSION"in Ea)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ea.TEAMCITY_VERSION)?1:0;if(Ea.COLORTERM==="truecolor")return 3;if(Ea.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Ea){let s=Number.parseInt((Ea.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ea.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(Ea.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ea.TERM))return 1;if("COLORTERM"in Ea)return 1;return h}function ZO(e,a={}){let n=GHe(e,{streamIsTTY:e&&e.isTTY,...a});return bHe(n)}var DHe={stdout:ZO({isTTY:qO.isatty(1)}),stderr:ZO({isTTY:qO.isatty(2)})},UO=DHe;function XO(e,a,n){let i=e.indexOf(a);if(i===-1)return e;let r=a.length,h=0,s="";do s+=e.slice(h,i)+a+n,h=i+r,i=e.indexOf(a,h);while(i!==-1);return s+=e.slice(h),s}function jO(e,a,n,i){let r=0,h="";do{let s=e[i-1]==="\r";h+=e.slice(r,s?i-1:i)+a+(s?`\r
|
|
77
77
|
`:`
|
|
78
78
|
`)+n,r=i+1,i=e.indexOf(`
|
|
79
79
|
`,r)}while(i!==-1);return h+=e.slice(r),h}var{stdout:IO,stderr:xO}=UO,rC=Symbol("GENERATOR"),Uh=Symbol("STYLER"),Gk=Symbol("IS_EMPTY"),_O=["ansi","ansi","ansi256","ansi16m"],Xh=Object.create(null),KHe=(e,a={})=>{if(a.level&&!(Number.isInteger(a.level)&&a.level>=0&&a.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=IO?IO.level:0;e.level=a.level===void 0?n:a.level};var LHe=(e)=>{let a=(...n)=>n.join(" ");return KHe(a,e),Object.setPrototypeOf(a,Dk.prototype),a};function Dk(e){return LHe(e)}Object.setPrototypeOf(Dk.prototype,Function.prototype);for(let[e,a]of Object.entries(fi))Xh[e]={get(){let n=xB(this,oC(a.open,a.close,this[Uh]),this[Gk]);return Object.defineProperty(this,e,{value:n}),n}};Xh.visible={get(){let e=xB(this,this[Uh],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var lC=(e,a,n,...i)=>{if(e==="rgb"){if(a==="ansi16m")return fi[n].ansi16m(...i);if(a==="ansi256")return fi[n].ansi256(fi.rgbToAnsi256(...i));return fi[n].ansi(fi.rgbToAnsi(...i))}if(e==="hex")return lC("rgb",a,n,...fi.hexToRgb(...i));return fi[n][e](...i)},wHe=["rgb","hex","ansi256"];for(let e of wHe){Xh[e]={get(){let{level:n}=this;return function(...i){let r=oC(lC(e,_O[n],"color",...i),fi.color.close,this[Uh]);return xB(this,r,this[Gk])}}};let a="bg"+e[0].toUpperCase()+e.slice(1);Xh[a]={get(){let{level:n}=this;return function(...i){let r=oC(lC(e,_O[n],"bgColor",...i),fi.bgColor.close,this[Uh]);return xB(this,r,this[Gk])}}}}var PHe=Object.defineProperties(()=>{},{...Xh,level:{enumerable:!0,get(){return this[rC].level},set(e){this[rC].level=e}}}),oC=(e,a,n)=>{let i,r;if(n===void 0)i=e,r=a;else i=n.openAll+e,r=a+n.closeAll;return{open:e,close:a,openAll:i,closeAll:r,parent:n}},xB=(e,a,n)=>{let i=(...r)=>RHe(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,PHe),i[rC]=e,i[Uh]=a,i[Gk]=n,i},RHe=(e,a)=>{if(e.level<=0||!a)return e[Gk]?"":a;let n=e[Uh];if(n===void 0)return a;let{openAll:i,closeAll:r}=n;if(a.includes("\x1B"))while(n!==void 0)a=XO(a,n.close,n.open),n=n.parent;let h=a.indexOf(`
|
|
@@ -102,5 +102,5 @@ Options:
|
|
|
102
102
|
--fail-fast Stop immediately on first assertion failure (default: true). Set to false to continue running all tests.
|
|
103
103
|
--help, -h Show this help message and exit
|
|
104
104
|
`),process.exit(0);let a=co(e,"--collection-id"),n=co(e,"--run-flow-id"),i=co(e,"--api-key"),r=co(e,"--environment"),h=co(e,"--core-api-url")||"https://api.flurrytest.com/api/v1",s=co(e,"--verbose")==="true",S=co(e,"--fail-fast"),u=S===void 0?!0:S!=="false";if(!a||!i||!r)console.error("Missing required arguments. Required: collectionId, apiKey, environment"),console.error("Usage: deno run cli_deno.ts --collection-id=<id> --api-key=<key> --environment=<env> [--run-flow-id=<flowId>] [--verbose=true] [--fail-fast=false]"),console.error("Available arguments:",{collectionId:a,apiKey:"***",environment:r,runFlowId:n,verbose:s,failFast:u}),process.exit(1);if(console.log(""),console.log(ma.gray("--------------------------------")),console.log(ma.gray("Flurry CLI")),console.log(ma.gray("--------------------------------")),s)console.log("Running with parameters:",{collectionId:a,apiKey:"***",environment:r,runFlowId:n,coreApiUrl:h,verbose:s});try{console.log(""),console.log(`Starting collection runner...
|
|
105
|
-
`);let B=`${h}/collections/${a}`,M=await fetch(B,{headers:{Authorization:`Bearer ${i}`}});if(M.status!==200){let N=await M.text();console.error("Failed to fetch collection: "+N),process.exit(1)}let C=await M.json();console.log(ma.gray(`Collection loaded: ${C.name}`));let H=C.environments?.map((N)=>N.name)||[];if(H.length===0||!H.includes(r))console.error(ma.red(`Environment "${r}" not found in collection`)),console.error("Available environments:",H),process.exit(1);console.log(ma.gray(`Using environment: ${r}`));let R=new zm(h),W=new nC,A=new hC(s,u),Y=new Cm(C,r,R,W,A);if(console.log(""),console.log(ma.gray("--------------------------------")),console.info(ma.green(`
|
|
105
|
+
`);let B=`${h}/collections/${a}`,M=await fetch(B,{headers:{Authorization:`Bearer ${i}`}});if(M.status!==200){let N=await M.text();console.error("Failed to fetch collection: "+N),process.exit(1)}let C=await M.json();console.log(ma.gray(`Collection loaded: ${C.name}`));let H=C.environments?.map((N)=>N.name)||[];if(H.length===0||!H.includes(r))console.error(ma.red(`Environment "${r}" not found in collection`)),console.error("Available environments:",H),process.exit(1);console.log(ma.gray(`Using environment: ${r}`));let R=new zm(h),W=new nC,A=new hC(s,u),Y=new Cm(C,r,R,W,A,i);if(console.log(""),console.log(ma.gray("--------------------------------")),console.info(ma.green(`
|
|
106
106
|
Starting the test run...`)),n)await Y.runSingleFlow(n);else await Y.run();A.displaySummary()}catch(B){console.error("An error occurred:"),console.error(B),process.exit(1)}}if(De.main==De.module)tHe().catch((e)=>{console.error("Fatal error:",e),process.exit(1)});
|