gemi 0.4.68 → 0.4.69
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/chunk-1d6e287ca9c14fef.js +1 -1
- package/dist/chunk-22773aec8cc230c6.js +6 -0
- package/dist/chunk-42aa6e3d42149620.js +1 -1
- package/dist/chunk-4b4ea80149bba4e6.js +2 -0
- package/dist/chunk-aaf70ff16705d558.js +2 -0
- package/dist/chunk-bb72c8820407f3a6.js +2 -0
- package/dist/chunk-c6d988f5928a4df1.js +1 -1
- package/dist/chunk-c7b024c7bd4cffc9.js +3 -0
- package/dist/chunk-e0a028ef931a3eb1.js +18 -0
- package/dist/chunk-e8159722d49ad044.js +1 -1
- package/dist/chunk-f256432c3e5819d0.js +2 -0
- package/dist/client/index.js +1 -1
- package/dist/facades/Redirect.d.ts.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/vite/{index-CMpQi8Ml.mjs → index-D9QWnghl.mjs} +1 -2
- package/dist/vite/index.mjs +1 -1
- package/dist/vite/{typescript-DximJlM5.mjs → typescript-DADBvwYC.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as $,u as w,v as z} from"./chunk-74ab9c225bfe0eaa.js";import{pb as q,rb as G,tb as Y} from"./chunk-2db6c9bb69bb27aa.js";import{vb as Z} from"./chunk-82f72dfc6e27be04.js";var H="AWS_EC2_METADATA_DISABLED",Q=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-25dd80c6d9144f89.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-
|
|
1
|
+
import{t as $,u as w,v as z} from"./chunk-74ab9c225bfe0eaa.js";import{pb as q,rb as G,tb as Y} from"./chunk-2db6c9bb69bb27aa.js";import{vb as Z} from"./chunk-82f72dfc6e27be04.js";var H="AWS_EC2_METADATA_DISABLED",Q=async(b)=>{const{ENV_CMDS_FULL_URI:j,ENV_CMDS_RELATIVE_URI:x,fromContainerMetadata:y,fromInstanceMetadata:J}=await import("./chunk-25dd80c6d9144f89.js");if(process.env[x]||process.env[j]){b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:K}=await import("./chunk-22773aec8cc230c6.js");return G(K(b),y(b))}if(process.env[H])return async()=>{throw new q("EC2 Instance Metadata Service access disabled",{logger:b.logger})};return b.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),J(b)};var X=!1,W=(b={})=>Y(G(async()=>{if(b.profile??process.env[Z]){if(process.env[$]&&process.env[w]){if(!X)(b.logger?.warn&&b.logger?.constructor?.name!=="NoOpLogger"?b.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
|
|
2
2
|
Multiple credential sources detected:
|
|
3
3
|
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
4
4
|
This SDK will proceed with the AWS_PROFILE value.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-7ce930fe69575c87.js";import{H as i,U as I,X as y,la as C} from"./chunk-c7b024c7bd4cffc9.js";import"./chunk-c7e2acfd5087fb30.js";import{pb as n} from"./chunk-2db6c9bb69bb27aa.js";import u from"fs/promises";var T="169.254.170.2",x="169.254.170.23",P="[fd00:ec2::23]",d=(e,c)=>{if(e.protocol==="https:")return;if(e.hostname===T||e.hostname===x||e.hostname===P)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;const a=e.hostname.split("."),r=(t)=>{const s=parseInt(t,10);return 0<=s&&s<=255};if(a[0]==="127"&&r(a[1])&&r(a[2])&&r(a[3])&&a.length===4)return}throw new n(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
+
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
+
- ECS container host 169.254.170.2
|
|
5
|
+
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:c})};function S(e){return new i({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((c,[a,r])=>{return c[a]=r,c},{}),fragment:e.hash})}async function g(e,c){const r=await y(e.body).transformToString();if(e.statusCode===200){const t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new n("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:c});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:C(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new n(`Server responded with status: ${e.statusCode}`,{logger:c}),{Code:t.Code,Message:t.Message})}throw new n(`Server responded with status: ${e.statusCode}`,{logger:c})}var w=(e,c,a)=>{return async()=>{for(let r=0;r<c;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,a))}return await e()}};var E="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",R="http://169.254.170.2",p="AWS_CONTAINER_CREDENTIALS_FULL_URI",A="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",O="AWS_CONTAINER_AUTHORIZATION_TOKEN",b=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let c;const a=e.awsContainerCredentialsRelativeUri??process.env[E],r=e.awsContainerCredentialsFullUri??process.env[p],t=e.awsContainerAuthorizationToken??process.env[O],s=e.awsContainerAuthorizationTokenFile??process.env[A],m=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(a&&r)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsFullUri will take precedence.");if(t&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationToken will take precedence.");if(r)c=r;else if(a)c=`${R}${a}`;else throw new n(`No HTTP credential provider host provided.
|
|
6
|
+
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});const h=new URL(c);d(h,e.logger);const K=new I({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return w(async()=>{const o=S(h);if(t)o.headers.Authorization=t;else if(s)o.headers.Authorization=(await u.readFile(s)).toString();try{const f=await K.handle(o);return g(f.response)}catch(f){throw new n(String(f),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{b as fromHttp};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{pb as c,rb as m} from"./chunk-2db6c9bb69bb27aa.js";import{Cb as S,wb as l} from"./chunk-82f72dfc6e27be04.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-
|
|
2
|
+
import"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{pb as c,rb as m} from"./chunk-2db6c9bb69bb27aa.js";import{Cb as S,wb as l} from"./chunk-82f72dfc6e27be04.js";var w=(e,s,r)=>{const i={EcsContainer:async(t)=>{const{fromHttp:n}=await import("./chunk-22773aec8cc230c6.js"),{fromContainerMetadata:d}=await import("./chunk-25dd80c6d9144f89.js");return r?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),m(n(t??{}),d(t))},Ec2InstanceMetadata:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:n}=await import("./chunk-25dd80c6d9144f89.js");return n(t)},Environment:async(t)=>{r?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:n}=await import("./chunk-74ab9c225bfe0eaa.js");return n(t)}};if(e in i)return i[e];else throw new c(`Unsupported credential source in profile ${s}. Got ${e}, `+"expected EcsContainer or Ec2InstanceMetadata or Environment.",{logger:r})};var y=(e,{profile:s="default",logger:r}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(h(e,{profile:s,logger:r})||D(e,{profile:s,logger:r}))},h=(e,{profile:s,logger:r})=>{const i=typeof e.source_profile==="string"&&typeof e.credential_source==="undefined";if(i)r?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return i},D=(e,{profile:s,logger:r})=>{const i=typeof e.credential_source==="string"&&typeof e.source_profile==="undefined";if(i)r?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return i},C=async(e,s,r,i={})=>{r.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const t=s[e];if(!r.roleAssumer){const{getDefaultRoleAssumer:R}=await import("./chunk-f256432c3e5819d0.js");r.roleAssumer=R({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r?.parentClientConfig},r.clientPlugins)}const{source_profile:n}=t;if(n&&n in i)throw new c("Detected a cycle attempting to resolve credentials for profile"+` ${l(r)}. Profiles visited: `+Object.keys(i).join(", "),{logger:r.logger});r.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${n?`source_profile=[${n}]`:`profile=[${e}]`}`);const d=n?o(n,{...s,[n]:{...s[n],role_arn:t.role_arn??s[n].role_arn}},r,{...i,[n]:!0}):(await w(t.credential_source,e,r.logger)(r))(),u={RoleArn:t.role_arn,RoleSessionName:t.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:t.external_id,DurationSeconds:parseInt(t.duration_seconds||"3600",10)},{mfa_serial:f}=t;if(f){if(!r.mfaCodeProvider)throw new c(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:r.logger,tryNextLink:!1});u.SerialNumber=f,u.TokenCode=await r.mfaCodeProvider(f)}const $=await d;return r.roleAssumer($,u)};var P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",v=async(e,s)=>import("./chunk-543013123141745c.js").then(({fromProcess:r})=>r({...e,profile:s})());var x=async(e,s={})=>{const{fromSSO:r}=await import("./chunk-c6d988f5928a4df1.js");return r({profile:e,logger:s.logger})()},b=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var _=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,a=(e,s)=>{return s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}})};var A=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,k=async(e,s)=>import("./chunk-e8159722d49ad044.js").then(({fromTokenFile:r})=>r({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})());var o=async(e,s,r,i={})=>{const t=s[e];if(Object.keys(i).length>0&&_(t))return a(t,r);if(y(t,{profile:e,logger:r.logger}))return C(e,s,r,i);if(_(t))return a(t,r);if(A(t))return k(t,r);if(P(t))return v(r,e);if(b(t))return await x(e,r);throw new c(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:r.logger})};var H=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await S(e);return o(l(e),s,e)};export{H as fromIni};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import"./chunk-74ab9c225bfe0eaa.js";import{y as $} from"./chunk-7ce930fe69575c87.js";import"./chunk-d7c78cd1ab7dc7ed.js";import{$ as v,F as ue,G as er,J as be,K as cr,O as je,P as Fe,R as De,S as qe,U as Je,V as Ve,aa as t,ba as Vr,da as _,ea as b,fa as j,ga as F,ha as h,oa as Sr,pa as a,qa as jr,ra as We,sa as fe,ta as rr,ua as sr,wa as d,xa as o,za as I} from"./chunk-c7b024c7bd4cffc9.js";import{Ba as nr,Ca as or,Da as dr,Ea as yr,Ia as H,Ja as ee,Ka as re,La as tr,Ma as Ie,Na as Re,Oa as Pe,Pa as ar,Qa as Ae,Ra as Ke,Sa as Me,Ta as Be,Ua as mr,Va as wr,Xa as E,Ya as S,Za as kr,_a as Le,ab as Qe,bb as vr,cb as Xe,db as Er,eb as q,fb as Ye,gb as Ze,hb as He,ib as Ne,jb as ir,kb as lr} from"./chunk-e0a028ef931a3eb1.js";import"./chunk-c7e2acfd5087fb30.js";import{mb as R,nb as Ue} from"./chunk-ed589d4e4c575de7.js";import"./chunk-2db6c9bb69bb27aa.js";import{ub as Ce} from"./chunk-1d6e287ca9c14fef.js";import"./chunk-82f72dfc6e27be04.js";var P=$(H(),1);var se=$(q(),1);var Mr=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Mr(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.629.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var _e=$(q(),1);var xe=$(q(),1),ze=$(H(),1);var de={["required"]:!1,type:"String"},ye={["required"]:!0,default:!1,type:"Boolean"},ce={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Lr={version:"1.0",parameters:{Region:de,UseDualStack:ye,UseFIPS:ye,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ce]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ce,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Lr;var Te=(e,s={})=>{return Re($e,{endpointParams:e,logger:s.logger})};Ie.aws=Pe;var Ge=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??je,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Te,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new xe.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ze.NoAuthSigner}],logger:e?.logger??new be,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??Ue,utf8Decoder:e?.utf8Decoder??Fe,utf8Encoder:e?.utf8Encoder??De}};var pe=(e)=>{fe(process.version);const s=Ne(e),r=()=>s().then(We),i=Ge(e);return _e.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??He,credentialDefaultProvider:e?.credentialDefaultProvider??Ce,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ye({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Qe),region:e?.region??R(Me,Be),requestHandler:Je.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Xe,default:async()=>(await r()).retryMode||Le}),sha256:e?.sha256??Ze.bind(null,"sha256"),streamCollector:e?.streamCollector??Ve,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ae),useFipsEndpoint:e?.useFipsEndpoint??R(Ke)}};var ge=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},Oe=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var U=(e)=>e,hr=(e,s)=>{const r={...U(ir(e)),...U(rr(e)),...U(ue(e)),...U(ge(e))};return s.forEach((i)=>i.configure(r)),{...e,...lr(r),...sr(r),...er(r),...Oe(r)}};class N extends cr{constructor(...[e]){const s=pe(e||{}),r=ne(s),i=tr(r),l=vr(i),n=mr(l),T=nr(n),fr=kr(T),Ar=he(fr),u=hr(Ar,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(ar(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(wr(this.config)),this.middlewareStack.use(or(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Kr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Kr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class y extends Sr{constructor(e){super(e);Object.setPrototypeOf(this,y.prototype)}}class x extends y{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends y{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends y{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends y{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends y{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends y{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends y{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends y{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends y{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends y{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends y{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends y{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends y{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends y{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var $r=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Ir=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Rr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Pr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Tr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(q(),1),D=$(H(),1);var Fr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[is]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:c(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Xr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Yr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Zr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Hr(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await Nr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await pr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await gr(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ur(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await es(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await rs(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ss(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await Or(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await _r(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Cr(r,s);default:const l=r.body;return Qr({output:e,parsedBody:l,errorCode:i})}},Qr=jr(y),Xr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:c(e),...r});return a(n,e.body)},Yr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:c(e),...r});return a(n,e.body)},Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:c(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:c(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:c(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:c(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:c(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:c(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:c(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:c(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:c(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:c(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:c(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:c(e),...r});return a(n,e.body)},c=(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"]});var is="aws_iam";class p extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f($r,Ir).ser(Fr).de(xr).build(){}class C extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Rr,Pr).ser(Dr).de(zr).build(){}class g extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,Tr).ser(qr).de(Gr).build(){}class O extends v.classBuilder().ep({...k}).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(br,void 0).ser(Ur).de(Jr).build(){}var ls={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class Wr extends N{}Vr(ls,Wr);export{cr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,br as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,y as SSOOIDCServiceException,N as SSOOIDCClient,Wr as SSOOIDC,Tr as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Pr as CreateTokenWithIAMResponseFilterSensitiveLog,Rr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Ir as CreateTokenResponseFilterSensitiveLog,$r as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{z as L} from"./chunk-7ce930fe69575c87.js";var d=L((h8,p2)=>{var e2=function(q){return typeof q!=="undefined"&&q!==null},s0=function(q){return typeof q==="object"},t0=function(q){return Object.prototype.toString.call(q)==="[object Object]"},i0=function(q){return typeof q==="function"},o0=function(q){return typeof q==="boolean"},q5=function(q){return q instanceof Buffer},J5=function(q){if(e2(q))switch(q.constructor){case Uint8Array:case Uint8ClampedArray:case Int8Array:case Uint16Array:case Int16Array:case Uint32Array:case Int32Array:case Float32Array:case Float64Array:return!0}return!1},$5=function(q){return q instanceof ArrayBuffer},W5=function(q){return typeof q==="string"&&q.length>0},Z5=function(q){return typeof q==="number"&&!Number.isNaN(q)},Q5=function(q){return Number.isInteger(q)},Y5=function(q,J,$){return q>=J&&q<=$},K5=function(q,J){return J.includes(q)},U5=function(q,J,$){return new Error(`Expected ${J} for ${q} but received ${$} of type ${typeof $}`)},B5=function(q,J){return J.message=q.message,J};p2.exports={defined:e2,object:s0,plainObject:t0,fn:i0,bool:o0,buffer:q5,typedArray:J5,arrayBuffer:$5,string:W5,number:Z5,integer:Q5,inRange:Y5,inArray:K5,invalidParameterError:U5,nativeError:B5}});var t=L((g8,n2)=>{var G5=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...q)=>console.error("SEMVER",...q):()=>{};n2.exports=G5});var K2=L((m8,s2)=>{var H5=Number.MAX_SAFE_INTEGER||9007199254740991,I5=["major","premajor","minor","preminor","patch","prepatch","prerelease"];s2.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:H5,RELEASE_TYPES:I5,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var i=L((O,t2)=>{var{MAX_SAFE_COMPONENT_LENGTH:D2,MAX_SAFE_BUILD_LENGTH:F5,MAX_LENGTH:N5}=K2(),X5=t();O=t2.exports={};var V5=O.re=[],A5=O.safeRe=[],F=O.src=[],N=O.t={},P5=0,E2="[a-zA-Z0-9-]",L5=[["\\s",1],["\\d",N5],[E2,F5]],_5=(q)=>{for(let[J,$]of L5)q=q.split(`${J}*`).join(`${J}{0,${$}}`).split(`${J}+`).join(`${J}{1,${$}}`);return q},A=(q,J,$)=>{const W=_5(J),Z=P5++;X5(q,Z,J),N[q]=Z,F[Z]=J,V5[Z]=new RegExp(J,$?"g":void 0),A5[Z]=new RegExp(W,$?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${E2}*`);A("MAINVERSION",`(${F[N.NUMERICIDENTIFIER]})\\.`+`(${F[N.NUMERICIDENTIFIER]})\\.`+`(${F[N.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${F[N.NUMERICIDENTIFIERLOOSE]})\\.`+`(${F[N.NUMERICIDENTIFIERLOOSE]})\\.`+`(${F[N.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${F[N.NUMERICIDENTIFIER]}|${F[N.NONNUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${F[N.NUMERICIDENTIFIERLOOSE]}|${F[N.NONNUMERICIDENTIFIER]})`);A("PRERELEASE",`(?:-(${F[N.PRERELEASEIDENTIFIER]}(?:\\.${F[N.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${F[N.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${F[N.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${E2}+`);A("BUILD",`(?:\\+(${F[N.BUILDIDENTIFIER]}(?:\\.${F[N.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${F[N.MAINVERSION]}${F[N.PRERELEASE]}?${F[N.BUILD]}?`);A("FULL",`^${F[N.FULLPLAIN]}\$`);A("LOOSEPLAIN",`[v=\\s]*${F[N.MAINVERSIONLOOSE]}${F[N.PRERELEASELOOSE]}?${F[N.BUILD]}?`);A("LOOSE",`^${F[N.LOOSEPLAIN]}\$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${F[N.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${F[N.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${F[N.XRANGEIDENTIFIER]})`+`(?:\\.(${F[N.XRANGEIDENTIFIER]})`+`(?:\\.(${F[N.XRANGEIDENTIFIER]})`+`(?:${F[N.PRERELEASE]})?${F[N.BUILD]}?`+")?)?");A("XRANGEPLAINLOOSE",`[v=\\s]*(${F[N.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${F[N.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${F[N.XRANGEIDENTIFIERLOOSE]})`+`(?:${F[N.PRERELEASELOOSE]})?${F[N.BUILD]}?`+")?)?");A("XRANGE",`^${F[N.GTLT]}\\s*${F[N.XRANGEPLAIN]}\$`);A("XRANGELOOSE",`^${F[N.GTLT]}\\s*${F[N.XRANGEPLAINLOOSE]}\$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${D2}})`+`(?:\\.(\\d{1,${D2}}))?`+`(?:\\.(\\d{1,${D2}}))?`);A("COERCE",`${F[N.COERCEPLAIN]}(?:\$|[^\\d])`);A("COERCEFULL",F[N.COERCEPLAIN]+`(?:${F[N.PRERELEASE]})?`+`(?:${F[N.BUILD]})?`+"(?:$|[^\\d])");A("COERCERTL",F[N.COERCE],!0);A("COERCERTLFULL",F[N.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${F[N.LONETILDE]}\\s+`,!0);O.tildeTrimReplace="$1~";A("TILDE",`^${F[N.LONETILDE]}${F[N.XRANGEPLAIN]}\$`);A("TILDELOOSE",`^${F[N.LONETILDE]}${F[N.XRANGEPLAINLOOSE]}\$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${F[N.LONECARET]}\\s+`,!0);O.caretTrimReplace="$1^";A("CARET",`^${F[N.LONECARET]}${F[N.XRANGEPLAIN]}\$`);A("CARETLOOSE",`^${F[N.LONECARET]}${F[N.XRANGEPLAINLOOSE]}\$`);A("COMPARATORLOOSE",`^${F[N.GTLT]}\\s*(${F[N.LOOSEPLAIN]})\$|^\$`);A("COMPARATOR",`^${F[N.GTLT]}\\s*(${F[N.FULLPLAIN]})\$|^\$`);A("COMPARATORTRIM",`(\\s*)${F[N.GTLT]}\\s*(${F[N.LOOSEPLAIN]}|${F[N.XRANGEPLAIN]})`,!0);O.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${F[N.XRANGEPLAIN]})`+"\\s+-\\s+"+`(${F[N.XRANGEPLAIN]})`+"\\s*$");A("HYPHENRANGELOOSE",`^\\s*(${F[N.XRANGEPLAINLOOSE]})`+"\\s+-\\s+"+`(${F[N.XRANGEPLAINLOOSE]})`+"\\s*$");A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var U2=L((u8,i2)=>{var R5=Object.freeze({loose:!0}),j5=Object.freeze({}),z5=(q)=>{if(!q)return j5;if(typeof q!=="object")return R5;return q};i2.exports=z5});var $1=L((l8,J1)=>{var o2=/^[0-9]+$/,q1=(q,J)=>{const $=o2.test(q),W=o2.test(J);if($&&W)q=+q,J=+J;return q===J?0:$&&!W?-1:W&&!$?1:q<J?-1:1},D5=(q,J)=>q1(J,q);J1.exports={compareIdentifiers:q1,rcompareIdentifiers:D5}});var r=L((c8,Y1)=>{var B2=t(),{MAX_LENGTH:W1,MAX_SAFE_INTEGER:G2}=K2(),{safeRe:Z1,t:Q1}=i(),E5=U2(),{compareIdentifiers:a}=$1();class x{constructor(q,J){if(J=E5(J),q instanceof x)if(q.loose===!!J.loose&&q.includePrerelease===!!J.includePrerelease)return q;else q=q.version;else if(typeof q!=="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof q}".`);if(q.length>W1)throw new TypeError(`version is longer than ${W1} characters`);B2("SemVer",q,J),this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease;const $=q.trim().match(J.loose?Z1[Q1.LOOSE]:Z1[Q1.FULL]);if(!$)throw new TypeError(`Invalid Version: ${q}`);if(this.raw=q,this.major=+$[1],this.minor=+$[2],this.patch=+$[3],this.major>G2||this.major<0)throw new TypeError("Invalid major version");if(this.minor>G2||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>G2||this.patch<0)throw new TypeError("Invalid patch version");if(!$[4])this.prerelease=[];else this.prerelease=$[4].split(".").map((W)=>{if(/^[0-9]+$/.test(W)){const Z=+W;if(Z>=0&&Z<G2)return Z}return W});this.build=$[5]?$[5].split("."):[],this.format()}format(){if(this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length)this.version+=`-${this.prerelease.join(".")}`;return this.version}toString(){return this.version}compare(q){if(B2("SemVer.compare",this.version,this.options,q),!(q instanceof x)){if(typeof q==="string"&&q===this.version)return 0;q=new x(q,this.options)}if(q.version===this.version)return 0;return this.compareMain(q)||this.comparePre(q)}compareMain(q){if(!(q instanceof x))q=new x(q,this.options);return a(this.major,q.major)||a(this.minor,q.minor)||a(this.patch,q.patch)}comparePre(q){if(!(q instanceof x))q=new x(q,this.options);if(this.prerelease.length&&!q.prerelease.length)return-1;else if(!this.prerelease.length&&q.prerelease.length)return 1;else if(!this.prerelease.length&&!q.prerelease.length)return 0;let J=0;do{const $=this.prerelease[J],W=q.prerelease[J];if(B2("prerelease compare",J,$,W),$===void 0&&W===void 0)return 0;else if(W===void 0)return 1;else if($===void 0)return-1;else if($===W)continue;else return a($,W)}while(++J)}compareBuild(q){if(!(q instanceof x))q=new x(q,this.options);let J=0;do{const $=this.build[J],W=q.build[J];if(B2("build compare",J,$,W),$===void 0&&W===void 0)return 0;else if(W===void 0)return 1;else if($===void 0)return-1;else if($===W)continue;else return a($,W)}while(++J)}inc(q,J,$){switch(q){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",J,$);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",J,$);break;case"prepatch":this.prerelease.length=0,this.inc("patch",J,$),this.inc("pre",J,$);break;case"prerelease":if(this.prerelease.length===0)this.inc("patch",J,$);this.inc("pre",J,$);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0)this.major++;this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0)this.minor++;this.patch=0,this.prerelease=[];break;case"patch":if(this.prerelease.length===0)this.patch++;this.prerelease=[];break;case"pre":{const W=Number($)?1:0;if(!J&&$===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[W];else{let Z=this.prerelease.length;while(--Z>=0)if(typeof this.prerelease[Z]==="number")this.prerelease[Z]++,Z=-2;if(Z===-1){if(J===this.prerelease.join(".")&&$===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(W)}}if(J){let Z=[J,W];if($===!1)Z=[J];if(a(this.prerelease[0],J)===0){if(isNaN(this.prerelease[1]))this.prerelease=Z}else this.prerelease=Z}break}default:throw new Error(`invalid increment argument: ${q}`)}if(this.raw=this.format(),this.build.length)this.raw+=`+${this.build.join(".")}`;return this}}Y1.exports=x});var B1=L((a8,U1)=>{var K1=r(),T5=(q,J,$=!1)=>{if(q instanceof K1)return q;try{return new K1(q,J)}catch(W){if(!$)return null;throw W}};U1.exports=T5});var H1=L((r8,G1)=>{var y5=r(),w5=B1(),{safeRe:H2,t:I2}=i(),C5=(q,J)=>{if(q instanceof y5)return q;if(typeof q==="number")q=String(q);if(typeof q!=="string")return null;J=J||{};let $=null;if(!J.rtl)$=q.match(J.includePrerelease?H2[I2.COERCEFULL]:H2[I2.COERCE]);else{const H=J.includePrerelease?H2[I2.COERCERTLFULL]:H2[I2.COERCERTL];let I;while((I=H.exec(q))&&(!$||$.index+$[0].length!==q.length)){if(!$||I.index+I[0].length!==$.index+$[0].length)$=I;H.lastIndex=I.index+I[1].length+I[2].length}H.lastIndex=-1}if($===null)return null;const W=$[2],Z=$[3]||"0",Y=$[4]||"0",K=J.includePrerelease&&$[5]?`-${$[5]}`:"",B=J.includePrerelease&&$[6]?`+${$[6]}`:"";return w5(`${W}.${Z}.${Y}${K}${B}`,J)};G1.exports=C5});var u=L((e8,F1)=>{var I1=r(),S5=(q,J,$)=>new I1(q,$).compare(new I1(J,$));F1.exports=S5});var T2=L((p8,N1)=>{var k5=u(),M5=(q,J,$)=>k5(q,J,$)>=0;N1.exports=M5});var A1=L((n8,V1)=>{class X1{constructor(){this.max=1000,this.map=new Map}get(q){const J=this.map.get(q);if(J===void 0)return;else return this.map.delete(q),this.map.set(q,J),J}delete(q){return this.map.delete(q)}set(q,J){if(!this.delete(q)&&J!==void 0){if(this.map.size>=this.max){const W=this.map.keys().next().value;this.delete(W)}this.map.set(q,J)}return this}}V1.exports=X1});var L1=L((s8,P1)=>{var x5=u(),f5=(q,J,$)=>x5(q,J,$)===0;P1.exports=f5});var R1=L((t8,_1)=>{var d5=u(),v5=(q,J,$)=>d5(q,J,$)!==0;_1.exports=v5});var z1=L((i8,j1)=>{var O5=u(),b5=(q,J,$)=>O5(q,J,$)>0;j1.exports=b5});var E1=L((o8,D1)=>{var h5=u(),g5=(q,J,$)=>h5(q,J,$)<0;D1.exports=g5});var y1=L((q9,T1)=>{var m5=u(),u5=(q,J,$)=>m5(q,J,$)<=0;T1.exports=u5});var C1=L((J9,w1)=>{var l5=L1(),c5=R1(),a5=z1(),r5=T2(),e5=E1(),p5=y1(),n5=(q,J,$,W)=>{switch(J){case"===":if(typeof q==="object")q=q.version;if(typeof $==="object")$=$.version;return q===$;case"!==":if(typeof q==="object")q=q.version;if(typeof $==="object")$=$.version;return q!==$;case"":case"=":case"==":return l5(q,$,W);case"!=":return c5(q,$,W);case">":return a5(q,$,W);case">=":return r5(q,$,W);case"<":return e5(q,$,W);case"<=":return p5(q,$,W);default:throw new TypeError(`Invalid operator: ${J}`)}};w1.exports=n5});var v1=L(($9,d1)=>{var o=Symbol("SemVer ANY");class F2{static get ANY(){return o}constructor(q,J){if(J=S1(J),q instanceof F2)if(q.loose===!!J.loose)return q;else q=q.value;if(q=q.trim().split(/\s+/).join(" "),w2("comparator",q,J),this.options=J,this.loose=!!J.loose,this.parse(q),this.semver===o)this.value="";else this.value=this.operator+this.semver.version;w2("comp",this)}parse(q){const J=this.options.loose?k1[M1.COMPARATORLOOSE]:k1[M1.COMPARATOR],$=q.match(J);if(!$)throw new TypeError(`Invalid comparator: ${q}`);if(this.operator=$[1]!==void 0?$[1]:"",this.operator==="=")this.operator="";if(!$[2])this.semver=o;else this.semver=new x1($[2],this.options.loose)}toString(){return this.value}test(q){if(w2("Comparator.test",q,this.options.loose),this.semver===o||q===o)return!0;if(typeof q==="string")try{q=new x1(q,this.options)}catch(J){return!1}return y2(q,this.operator,this.semver,this.options)}intersects(q,J){if(!(q instanceof F2))throw new TypeError("a Comparator is required");if(this.operator===""){if(this.value==="")return!0;return new f1(q.value,J).test(this.value)}else if(q.operator===""){if(q.value==="")return!0;return new f1(this.value,J).test(q.semver)}if(J=S1(J),J.includePrerelease&&(this.value==="<0.0.0-0"||q.value==="<0.0.0-0"))return!1;if(!J.includePrerelease&&(this.value.startsWith("<0.0.0")||q.value.startsWith("<0.0.0")))return!1;if(this.operator.startsWith(">")&&q.operator.startsWith(">"))return!0;if(this.operator.startsWith("<")&&q.operator.startsWith("<"))return!0;if(this.semver.version===q.semver.version&&this.operator.includes("=")&&q.operator.includes("="))return!0;if(y2(this.semver,"<",q.semver,J)&&this.operator.startsWith(">")&&q.operator.startsWith("<"))return!0;if(y2(this.semver,">",q.semver,J)&&this.operator.startsWith("<")&&q.operator.startsWith(">"))return!0;return!1}}d1.exports=F2;var S1=U2(),{safeRe:k1,t:M1}=i(),y2=C1(),w2=t(),x1=r(),f1=C2()});var C2=L((W9,g1)=>{class q2{constructor(q,J){if(J=t5(J),q instanceof q2)if(q.loose===!!J.loose&&q.includePrerelease===!!J.includePrerelease)return q;else return new q2(q.raw,J);if(q instanceof S2)return this.raw=q.value,this.set=[[q]],this.format(),this;if(this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease,this.raw=q.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(($)=>this.parseRange($.trim())).filter(($)=>$.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const $=this.set[0];if(this.set=this.set.filter((W)=>!b1(W[0])),this.set.length===0)this.set=[$];else if(this.set.length>1){for(let W of this.set)if(W.length===1&&Z4(W[0])){this.set=[W];break}}}this.format()}format(){return this.range=this.set.map((q)=>q.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(q){const $=((this.options.includePrerelease&&$4)|(this.options.loose&&W4))+":"+q,W=O1.get($);if(W)return W;const Z=this.options.loose,Y=Z?C[T.HYPHENRANGELOOSE]:C[T.HYPHENRANGE];q=q.replace(Y,N4(this.options.includePrerelease)),R("hyphen replace",q),q=q.replace(C[T.COMPARATORTRIM],o5),R("comparator trim",q),q=q.replace(C[T.TILDETRIM],q4),R("tilde trim",q),q=q.replace(C[T.CARETTRIM],J4),R("caret trim",q);let K=q.split(" ").map((P)=>Q4(P,this.options)).join(" ").split(/\s+/).map((P)=>F4(P,this.options));if(Z)K=K.filter((P)=>{return R("loose invalid filter",P,this.options),!!P.match(C[T.COMPARATORLOOSE])});R("range list",K);const B=new Map,H=K.map((P)=>new S2(P,this.options));for(let P of H){if(b1(P))return[P];B.set(P.value,P)}if(B.size>1&&B.has(""))B.delete("");const I=[...B.values()];return O1.set($,I),I}intersects(q,J){if(!(q instanceof q2))throw new TypeError("a Range is required");return this.set.some(($)=>{return h1($,J)&&q.set.some((W)=>{return h1(W,J)&&$.every((Z)=>{return W.every((Y)=>{return Z.intersects(Y,J)})})})})}test(q){if(!q)return!1;if(typeof q==="string")try{q=new i5(q,this.options)}catch(J){return!1}for(let J=0;J<this.set.length;J++)if(X4(this.set[J],q,this.options))return!0;return!1}}g1.exports=q2;var s5=A1(),O1=new s5,t5=U2(),S2=v1(),R=t(),i5=r(),{safeRe:C,t:T,comparatorTrimReplace:o5,tildeTrimReplace:q4,caretTrimReplace:J4}=i(),{FLAG_INCLUDE_PRERELEASE:$4,FLAG_LOOSE:W4}=K2(),b1=(q)=>q.value==="<0.0.0-0",Z4=(q)=>q.value==="",h1=(q,J)=>{let $=!0;const W=q.slice();let Z=W.pop();while($&&W.length)$=W.every((Y)=>{return Z.intersects(Y,J)}),Z=W.pop();return $},Q4=(q,J)=>{return R("comp",q,J),q=U4(q,J),R("caret",q),q=Y4(q,J),R("tildes",q),q=G4(q,J),R("xrange",q),q=I4(q,J),R("stars",q),q},y=(q)=>!q||q.toLowerCase()==="x"||q==="*",Y4=(q,J)=>{return q.trim().split(/\s+/).map(($)=>K4($,J)).join(" ")},K4=(q,J)=>{const $=J.loose?C[T.TILDELOOSE]:C[T.TILDE];return q.replace($,(W,Z,Y,K,B)=>{R("tilde",q,W,Z,Y,K,B);let H;if(y(Z))H="";else if(y(Y))H=`>=${Z}.0.0 <${+Z+1}.0.0-0`;else if(y(K))H=`>=${Z}.${Y}.0 <${Z}.${+Y+1}.0-0`;else if(B)R("replaceTilde pr",B),H=`>=${Z}.${Y}.${K}-${B} <${Z}.${+Y+1}.0-0`;else H=`>=${Z}.${Y}.${K} <${Z}.${+Y+1}.0-0`;return R("tilde return",H),H})},U4=(q,J)=>{return q.trim().split(/\s+/).map(($)=>B4($,J)).join(" ")},B4=(q,J)=>{R("caret",q,J);const $=J.loose?C[T.CARETLOOSE]:C[T.CARET],W=J.includePrerelease?"-0":"";return q.replace($,(Z,Y,K,B,H)=>{R("caret",q,Z,Y,K,B,H);let I;if(y(Y))I="";else if(y(K))I=`>=${Y}.0.0${W} <${+Y+1}.0.0-0`;else if(y(B))if(Y==="0")I=`>=${Y}.${K}.0${W} <${Y}.${+K+1}.0-0`;else I=`>=${Y}.${K}.0${W} <${+Y+1}.0.0-0`;else if(H)if(R("replaceCaret pr",H),Y==="0")if(K==="0")I=`>=${Y}.${K}.${B}-${H} <${Y}.${K}.${+B+1}-0`;else I=`>=${Y}.${K}.${B}-${H} <${Y}.${+K+1}.0-0`;else I=`>=${Y}.${K}.${B}-${H} <${+Y+1}.0.0-0`;else if(R("no pr"),Y==="0")if(K==="0")I=`>=${Y}.${K}.${B}${W} <${Y}.${K}.${+B+1}-0`;else I=`>=${Y}.${K}.${B}${W} <${Y}.${+K+1}.0-0`;else I=`>=${Y}.${K}.${B} <${+Y+1}.0.0-0`;return R("caret return",I),I})},G4=(q,J)=>{return R("replaceXRanges",q,J),q.split(/\s+/).map(($)=>H4($,J)).join(" ")},H4=(q,J)=>{q=q.trim();const $=J.loose?C[T.XRANGELOOSE]:C[T.XRANGE];return q.replace($,(W,Z,Y,K,B,H)=>{R("xRange",q,W,Z,Y,K,B,H);const I=y(Y),P=I||y(K),z=P||y(B),f=z;if(Z==="="&&f)Z="";if(H=J.includePrerelease?"-0":"",I)if(Z===">"||Z==="<")W="<0.0.0-0";else W="*";else if(Z&&f){if(P)K=0;if(B=0,Z===">")if(Z=">=",P)Y=+Y+1,K=0,B=0;else K=+K+1,B=0;else if(Z==="<=")if(Z="<",P)Y=+Y+1;else K=+K+1;if(Z==="<")H="-0";W=`${Z+Y}.${K}.${B}${H}`}else if(P)W=`>=${Y}.0.0${H} <${+Y+1}.0.0-0`;else if(z)W=`>=${Y}.${K}.0${H} <${Y}.${+K+1}.0-0`;return R("xRange return",W),W})},I4=(q,J)=>{return R("replaceStars",q,J),q.trim().replace(C[T.STAR],"")},F4=(q,J)=>{return R("replaceGTE0",q,J),q.trim().replace(C[J.includePrerelease?T.GTE0PRE:T.GTE0],"")},N4=(q)=>(J,$,W,Z,Y,K,B,H,I,P,z,f)=>{if(y(W))$="";else if(y(Z))$=`>=${W}.0.0${q?"-0":""}`;else if(y(Y))$=`>=${W}.${Z}.0${q?"-0":""}`;else if(K)$=`>=${$}`;else $=`>=${$}${q?"-0":""}`;if(y(I))H="";else if(y(P))H=`<${+I+1}.0.0-0`;else if(y(z))H=`<${I}.${+P+1}.0-0`;else if(f)H=`<=${I}.${P}.${z}-${f}`;else if(q)H=`<${I}.${P}.${+z+1}-0`;else H=`<=${H}`;return`${$} ${H}`.trim()},X4=(q,J,$)=>{for(let W=0;W<q.length;W++)if(!q[W].test(J))return!1;if(J.prerelease.length&&!$.includePrerelease){for(let W=0;W<q.length;W++){if(R(q[W].semver),q[W].semver===S2.ANY)continue;if(q[W].semver.prerelease.length>0){const Z=q[W].semver;if(Z.major===J.major&&Z.minor===J.minor&&Z.patch===J.patch)return!0}}return!1}return!0}});var u1=L((Z9,m1)=>{var V4=C2(),A4=(q,J,$)=>{try{J=new V4(J,$)}catch(W){return!1}return J.test(q)};m1.exports=A4});var k2=L((Q9,P4)=>{P4.exports={name:"sharp",description:"High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images",version:"0.33.4",author:"Lovell Fuller <npm@lovell.info>",homepage:"https://sharp.pixelplumbing.com",contributors:["Pierre Inglebert <pierre.inglebert@gmail.com>","Jonathan Ong <jonathanrichardong@gmail.com>","Chanon Sajjamanochai <chanon.s@gmail.com>","Juliano Julio <julianojulio@gmail.com>","Daniel Gasienica <daniel@gasienica.ch>","Julian Walker <julian@fiftythree.com>","Amit Pitaru <pitaru.amit@gmail.com>","Brandon Aaron <hello.brandon@aaron.sh>","Andreas Lind <andreas@one.com>","Maurus Cuelenaere <mcuelenaere@gmail.com>","Linus Unnebäck <linus@folkdatorn.se>","Victor Mateevitsi <mvictoras@gmail.com>","Alaric Holloway <alaric.holloway@gmail.com>","Bernhard K. Weisshuhn <bkw@codingforce.com>","Chris Riley <criley@primedia.com>","David Carley <dacarley@gmail.com>","John Tobin <john@limelightmobileinc.com>","Kenton Gray <kentongray@gmail.com>","Felix Bünemann <Felix.Buenemann@gmail.com>","Samy Al Zahrani <samyalzahrany@gmail.com>","Chintan Thakkar <lemnisk8@gmail.com>","F. Orlando Galashan <frulo@gmx.de>","Kleis Auke Wolthuizen <info@kleisauke.nl>","Matt Hirsch <mhirsch@media.mit.edu>","Matthias Thoemmes <thoemmes@gmail.com>","Patrick Paskaris <patrick@paskaris.gr>","Jérémy Lal <kapouer@melix.org>","Rahul Nanwani <r.nanwani@gmail.com>","Alice Monday <alice0meta@gmail.com>","Kristo Jorgenson <kristo.jorgenson@gmail.com>","YvesBos <yves_bos@outlook.com>","Guy Maliar <guy@tailorbrands.com>","Nicolas Coden <nicolas@ncoden.fr>","Matt Parrish <matt.r.parrish@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Matthew McEachen <matthew+github@mceachen.org>","Jarda Kotěšovec <jarda.kotesovec@gmail.com>","Kenric D'Souza <kenric.dsouza@gmail.com>","Oleh Aleinyk <oleg.aleynik@gmail.com>","Marcel Bretschneider <marcel.bretschneider@gmail.com>","Andrea Bianco <andrea.bianco@unibas.ch>","Rik Heywood <rik@rik.org>","Thomas Parisot <hi@oncletom.io>","Nathan Graves <nathanrgraves+github@gmail.com>","Tom Lokhorst <tom@lokhorst.eu>","Espen Hovlandsdal <espen@hovlandsdal.com>","Sylvain Dumont <sylvain.dumont35@gmail.com>","Alun Davies <alun.owain.davies@googlemail.com>","Aidan Hoolachan <ajhoolachan21@gmail.com>","Axel Eirola <axel.eirola@iki.fi>","Freezy <freezy@xbmc.org>","Daiz <taneli.vatanen@gmail.com>","Julian Aubourg <j@ubourg.net>","Keith Belovay <keith@picthrive.com>","Michael B. Klein <mbklein@gmail.com>","Jordan Prudhomme <jordan@raboland.fr>","Ilya Ovdin <iovdin@gmail.com>","Andargor <andargor@yahoo.com>","Paul Neave <paul.neave@gmail.com>","Brendan Kennedy <brenwken@gmail.com>","Brychan Bennett-Odlum <git@brychan.io>","Edward Silverton <e.silverton@gmail.com>","Roman Malieiev <aromaleev@gmail.com>","Tomas Szabo <tomas.szabo@deftomat.com>","Robert O'Rourke <robert@o-rourke.org>","Guillermo Alfonso Varela Chouciño <guillevch@gmail.com>","Christian Flintrup <chr@gigahost.dk>","Manan Jadhav <manan@motionden.com>","Leon Radley <leon@radley.se>","alza54 <alza54@thiocod.in>","Jacob Smith <jacob@frende.me>","Michael Nutt <michael@nutt.im>","Brad Parham <baparham@gmail.com>","Taneli Vatanen <taneli.vatanen@gmail.com>","Joris Dugué <zaruike10@gmail.com>","Chris Banks <christopher.bradley.banks@gmail.com>","Ompal Singh <ompal.hitm09@gmail.com>","Brodan <christopher.hranj@gmail.com>","Ankur Parihar <ankur.github@gmail.com>","Brahim Ait elhaj <brahima@gmail.com>","Mart Jansink <m.jansink@gmail.com>","Lachlan Newman <lachnewman007@gmail.com>","Dennis Beatty <dennis@dcbeatty.com>","Ingvar Stepanyan <me@rreverser.com>"],scripts:{install:"node install/check",clean:"rm -rf src/build/ .nyc_output/ coverage/ test/fixtures/output.*",test:"npm run test-lint && npm run test-unit && npm run test-licensing && npm run test-types","test-lint":"semistandard && cpplint","test-unit":"nyc --reporter=lcov --reporter=text --check-coverage --branches=100 mocha","test-licensing":"license-checker --production --summary --onlyAllow=\"Apache-2.0;BSD;ISC;LGPL-3.0-or-later;MIT\"","test-leak":"./test/leak/leak.sh","test-types":"tsd","package-from-local-build":"node npm/from-local-build","package-from-github-release":"node npm/from-github-release","docs-build":"node docs/build && node docs/search-index/build","docs-serve":"cd docs && npx serve","docs-publish":"cd docs && npx firebase-tools deploy --project pixelplumbing --only hosting:pixelplumbing-sharp"},type:"commonjs",main:"lib/index.js",types:"lib/index.d.ts",files:["install","lib","src/*.{cc,h,gyp}"],repository:{type:"git",url:"git://github.com/lovell/sharp.git"},keywords:["jpeg","png","webp","avif","tiff","gif","svg","jp2","dzi","image","resize","thumbnail","crop","embed","libvips","vips"],dependencies:{color:"^4.2.3","detect-libc":"^2.0.3",semver:"^7.6.0"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.33.4","@img/sharp-darwin-x64":"0.33.4","@img/sharp-libvips-darwin-arm64":"1.0.2","@img/sharp-libvips-darwin-x64":"1.0.2","@img/sharp-libvips-linux-arm":"1.0.2","@img/sharp-libvips-linux-arm64":"1.0.2","@img/sharp-libvips-linux-s390x":"1.0.2","@img/sharp-libvips-linux-x64":"1.0.2","@img/sharp-libvips-linuxmusl-arm64":"1.0.2","@img/sharp-libvips-linuxmusl-x64":"1.0.2","@img/sharp-linux-arm":"0.33.4","@img/sharp-linux-arm64":"0.33.4","@img/sharp-linux-s390x":"0.33.4","@img/sharp-linux-x64":"0.33.4","@img/sharp-linuxmusl-arm64":"0.33.4","@img/sharp-linuxmusl-x64":"0.33.4","@img/sharp-wasm32":"0.33.4","@img/sharp-win32-ia32":"0.33.4","@img/sharp-win32-x64":"0.33.4"},devDependencies:{"@emnapi/runtime":"^1.1.1","@img/sharp-libvips-dev":"1.0.2","@img/sharp-libvips-dev-wasm32":"1.0.3","@img/sharp-libvips-win32-ia32":"1.0.2","@img/sharp-libvips-win32-x64":"1.0.2","@types/node":"*",async:"^3.2.5",cc:"^3.0.1",emnapi:"^1.1.1","exif-reader":"^2.0.1","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^8.0.1","license-checker":"^25.0.1",mocha:"^10.4.0","node-addon-api":"^8.0.0",nyc:"^15.1.0",prebuild:"^13.0.1",semistandard:"^17.0.0","tar-fs":"^3.0.6",tsd:"^0.31.0"},license:"Apache-2.0",engines:{node:"^18.17.0 || ^20.3.0 || >=21.0.0",libvips:">=8.15.2"},funding:{url:"https://opencollective.com/libvips"},binary:{napi_versions:[9]},semistandard:{env:["mocha"]},cc:{linelength:"120",filter:["build/include"]},nyc:{include:["lib"]},tsd:{directory:"test/types/"}}});var f2=L((Y9,i1)=>{var{spawnSync:N2}=import.meta.require("child_process"),{createHash:L4}=import.meta.require("crypto"),a1=H1(),_4=T2(),R4=u1(),l1=import.meta.require("detect-libc"),{engines:x2,optionalDependencies:j4}=k2(),z4=process.env.npm_package_config_libvips||x2.libvips,r1=a1(z4).version,D4=["darwin-arm64","darwin-x64","linux-arm","linux-arm64","linux-s390x","linux-x64","linuxmusl-arm64","linuxmusl-x64","win32-ia32","win32-x64"],X2={encoding:"utf8",shell:!0},e1=(q)=>{if(q instanceof Error)console.error(`sharp: Installation error: ${q.message}`);else console.log(`sharp: ${q}`)},p1=()=>l1.isNonGlibcLinuxSync()?l1.familySync():"",E4=()=>`${process.platform}${p1()}-${process.arch}`,e=()=>{if(n1())return"wasm32";const{npm_config_arch:q,npm_config_platform:J,npm_config_libc:$}=process.env,W=typeof $==="string"?$:p1();return`${J||process.platform}${W}-${q||process.arch}`},T4=()=>{try{return import.meta.require(`@img/sharp-libvips-dev-${e()}/include`)}catch{try{return (()=>{throw new Error(`Cannot require module "@img/sharp-libvips-dev/include"`);})()}catch{}}return""},y4=()=>{try{return (()=>{throw new Error(`Cannot require module "@img/sharp-libvips-dev/cplusplus"`);})()}catch{}return""},w4=()=>{try{return import.meta.require(`@img/sharp-libvips-dev-${e()}/lib`)}catch{try{return import.meta.require(`@img/sharp-libvips-${e()}/lib`)}catch{}}return""},C4=()=>{if(process.release?.name==="node"&&process.versions){if(!R4(process.versions.node,x2.node))return{found:process.versions.node,expected:x2.node}}},n1=()=>{const{CC:q}=process.env;return Boolean(q&&q.endsWith("/emcc"))},S4=()=>{if(process.platform==="darwin"&&process.arch==="x64")return(N2("sysctl sysctl.proc_translated",X2).stdout||"").trim()==="sysctl.proc_translated: 1";return!1},c1=(q)=>L4("sha512").update(q).digest("hex"),k4=()=>{try{const q=c1(`imgsharp-libvips-${e()}`),J=a1(j4[`@img/sharp-libvips-${e()}`]).version;return c1(`${q}npm:${J}`).slice(0,10)}catch{}return""},M4=()=>N2(`node-gyp rebuild --directory=src ${n1()?"--nodedir=emscripten":""}`,{...X2,stdio:"inherit"}).status,s1=()=>{if(process.platform!=="win32")return(N2("pkg-config --modversion vips-cpp",{...X2,env:{...process.env,PKG_CONFIG_PATH:t1()}}).stdout||"").trim();else return""},t1=()=>{if(process.platform!=="win32")return[(N2('which brew >/dev/null 2>&1 && brew environment --plain | grep PKG_CONFIG_LIBDIR | cut -d" " -f2',X2).stdout||"").trim(),process.env.PKG_CONFIG_PATH,"/usr/local/lib/pkgconfig","/usr/lib/pkgconfig","/usr/local/libdata/pkgconfig","/usr/libdata/pkgconfig"].filter(Boolean).join(":");else return""},M2=(q,J)=>{return e1(`Detected ${J}, skipping search for globally-installed libvips`),q},x4=()=>{if(Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)===!0)return M2(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS");if(Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)===!0)return M2(!0,"SHARP_FORCE_GLOBAL_LIBVIPS");if(S4())return M2(!1,"Rosetta");const q=s1();return!!q&&_4(q,r1)};i1.exports={minimumLibvipsVersion:r1,prebuiltPlatforms:D4,buildPlatformArch:e,buildSharpLibvipsIncludeDir:T4,buildSharpLibvipsCPlusPlusDir:y4,buildSharpLibvipsLibDir:w4,isUnsupportedNodeRuntime:C4,runtimePlatformArch:E4,log:e1,yarnLocator:k4,spawnRebuild:M4,globalLibvipsVersion:s1,pkgConfigPath:t1,useGlobalLibvips:x4}});var J2=L((K9,q0)=>{var{familySync:f4,versionSync:d4}=import.meta.require("detect-libc"),{runtimePlatformArch:v4,isUnsupportedNodeRuntime:o1,prebuiltPlatforms:O4,minimumLibvipsVersion:b4}=f2(),l=v4(),h4=[`../src/build/Release/sharp-${l}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${l}/sharp.node`,"@img/sharp-wasm32/sharp.node"],d2,V2=[];for(let q of h4)try{d2=import.meta.require(q);break}catch(J){V2.push(J)}if(d2)q0.exports=d2;else{const[q,J,$]=["linux","darwin","win32"].map((Y)=>l.startsWith(Y)),W=[`Could not load the "sharp" module using the ${l} runtime`];V2.forEach((Y)=>{if(Y.code!=="MODULE_NOT_FOUND")W.push(`${Y.code}: ${Y.message}`)});const Z=V2.map((Y)=>Y.message).join(" ");if(W.push("Possible solutions:"),o1()){const{found:Y,expected:K}=o1();W.push("- Please upgrade Node.js:",` Found ${Y}`,` Requires ${K}`)}else if(O4.includes(l)){const[Y,K]=l.split("-"),B=Y.endsWith("musl")?" --libc=musl":"";W.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp"," yarn add sharp --ignore-engines","- Ensure your package manager supports multi-platform installation:"," See https://sharp.pixelplumbing.com/install#cross-platform","- Add platform-specific dependencies:",` npm install --os=${Y.replace("musl","")}${B} --cpu=${K} sharp`)}else W.push(`- Manually install libvips >= ${b4}`,"- Add experimental WebAssembly-based dependencies:"," npm install --cpu=wasm32 sharp"," npm install @img/sharp-wasm32");if(q&&/(symbol not found|CXXABI_)/i.test(Z))try{const{engines:Y}=import.meta.require(`@img/sharp-libvips-${l}/package`),K=`${f4()} ${d4()}`,B=`${Y.musl?"musl":"glibc"} ${Y.musl||Y.glibc}`;W.push("- Update your OS:",` Found ${K}`,` Requires ${B}`)}catch(Y){}if(q&&/\/snap\/core[0-9]{2}/.test(Z))W.push("- Remove the Node.js Snap, which does not support native modules"," snap remove node");if(J&&/Incompatible library version/.test(Z))W.push("- Update Homebrew:"," brew update && brew upgrade vips");if(V2.some((Y)=>Y.code==="ERR_DLOPEN_DISABLED"))W.push("- Run Node.js without using the --no-addons flag");if($&&/The specified procedure could not be found/.test(Z))W.push("- Using the canvas package on Windows?"," See https://sharp.pixelplumbing.com/install#canvas-and-windows","- Check for outdated versions of sharp in the dependency tree:"," npm ls sharp");throw W.push("- Consult the installation documentation:"," See https://sharp.pixelplumbing.com/install"),new Error(W.join("\n"))}});var $0=L((U9,J0)=>{var l4=function(){const q=this.constructor.call(),{debuglog:J,queueListener:$,...W}=this.options;if(q.options=structuredClone(W),q.options.debuglog=J,q.options.queueListener=$,this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),q.options.input.buffer=this.options.input.buffer,q.emit("finish")});return q},g4=import.meta.require("util"),v2=import.meta.require("stream"),m4=d();J2();var u4=g4.debuglog("sharp"),c=function(q,J){if(arguments.length===1&&!m4.defined(q))throw new Error("Invalid input");if(!(this instanceof c))return new c(q,J);return v2.Duplex.call(this),this.options={topOffsetPre:-1,leftOffsetPre:-1,widthPre:-1,heightPre:-1,topOffsetPost:-1,leftOffsetPost:-1,widthPost:-1,heightPost:-1,width:-1,height:-1,canvas:"crop",position:0,resizeBackground:[0,0,0,255],useExifOrientation:!1,angle:0,rotationAngle:0,rotationBackground:[0,0,0,255],rotateBeforePreExtract:!1,flip:!1,flop:!1,extendTop:0,extendBottom:0,extendLeft:0,extendRight:0,extendBackground:[0,0,0,255],extendWith:"background",withoutEnlargement:!1,withoutReduction:!1,affineMatrix:[],affineBackground:[0,0,0,255],affineIdx:0,affineIdy:0,affineOdx:0,affineOdy:0,affineInterpolator:this.constructor.interpolators.bilinear,kernel:"lanczos3",fastShrinkOnLoad:!0,tint:[-1,0,0,0],flatten:!1,flattenBackground:[0,0,0],unflatten:!1,negate:!1,negateAlpha:!0,medianSize:0,blurSigma:0,sharpenSigma:0,sharpenM1:1,sharpenM2:2,sharpenX1:2,sharpenY2:10,sharpenY3:20,threshold:0,thresholdGrayscale:!0,trimBackground:[],trimThreshold:-1,trimLineArt:!1,gamma:0,gammaOut:0,greyscale:!1,normalise:!1,normaliseLower:1,normaliseUpper:99,claheWidth:0,claheHeight:0,claheMaxSlope:3,brightness:1,saturation:1,hue:0,lightness:0,booleanBufferIn:null,booleanFileIn:"",joinChannelIn:[],extractChannel:-1,removeAlpha:!1,ensureAlpha:-1,colourspace:"srgb",colourspacePipeline:"last",composite:[],fileOut:"",formatOut:"input",streamOut:!1,keepMetadata:0,withMetadataOrientation:-1,withMetadataDensity:0,withIccProfile:"",withExif:{},withExifMerge:!0,resolveWithObject:!1,jpegQuality:80,jpegProgressive:!1,jpegChromaSubsampling:"4:2:0",jpegTrellisQuantisation:!1,jpegOvershootDeringing:!1,jpegOptimiseScans:!1,jpegOptimiseCoding:!0,jpegQuantisationTable:0,pngProgressive:!1,pngCompressionLevel:6,pngAdaptiveFiltering:!1,pngPalette:!1,pngQuality:100,pngEffort:7,pngBitdepth:8,pngDither:1,jp2Quality:80,jp2TileHeight:512,jp2TileWidth:512,jp2Lossless:!1,jp2ChromaSubsampling:"4:4:4",webpQuality:80,webpAlphaQuality:100,webpLossless:!1,webpNearLossless:!1,webpSmartSubsample:!1,webpPreset:"default",webpEffort:4,webpMinSize:!1,webpMixed:!1,gifBitdepth:8,gifEffort:7,gifDither:1,gifInterFrameMaxError:0,gifInterPaletteMaxError:3,gifReuse:!0,gifProgressive:!1,tiffQuality:80,tiffCompression:"jpeg",tiffPredictor:"horizontal",tiffPyramid:!1,tiffMiniswhite:!1,tiffBitdepth:8,tiffTile:!1,tiffTileHeight:256,tiffTileWidth:256,tiffXres:1,tiffYres:1,tiffResolutionUnit:"inch",heifQuality:50,heifLossless:!1,heifCompression:"av1",heifEffort:4,heifChromaSubsampling:"4:4:4",heifBitdepth:8,jxlDistance:1,jxlDecodingTier:0,jxlEffort:7,jxlLossless:!1,rawDepth:"uchar",tileSize:256,tileOverlap:0,tileContainer:"fs",tileLayout:"dz",tileFormat:"last",tileDepth:"last",tileAngle:0,tileSkipBlanks:-1,tileBackground:[255,255,255,255],tileCentre:!1,tileId:"https://example.com/iiif",tileBasename:"",timeoutSeconds:0,linearA:[],linearB:[],debuglog:($)=>{this.emit("warning",$),u4($)},queueListener:function($){c.queue.emit("change",$)}},this.options.input=this._createInputDescriptor(q,J,{allowStream:!0}),this};Object.setPrototypeOf(c.prototype,v2.Duplex.prototype);Object.setPrototypeOf(c,v2.Duplex);Object.assign(c.prototype,{clone:l4});J0.exports=c});var O2=L((B9,W0)=>{W0.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Q0=L((G9,Z0)=>{Z0.exports=function q(J){if(!J||typeof J==="string")return!1;return J instanceof Array||Array.isArray(J)||J.length>=0&&(J.splice instanceof Function||Object.getOwnPropertyDescriptor(J,J.length-1)&&J.constructor.name!=="String")}});var U0=L((H9,K0)=>{var c4=Q0(),a4=Array.prototype.concat,r4=Array.prototype.slice,Y0=K0.exports=function q(J){var $=[];for(var W=0,Z=J.length;W<Z;W++){var Y=J[W];if(c4(Y))$=a4.call($,r4.call(Y));else $.push(Y)}return $};Y0.wrap=function(q){return function(){return q(Y0(arguments))}}});var I0=L((I9,H0)=>{var g=function(q,J,$){return Math.min(Math.max(J,q),$)},P2=function(q){var J=Math.round(q).toString(16).toUpperCase();return J.length<2?"0"+J:J},$2=O2(),W2=U0(),B0=Object.hasOwnProperty,G0=Object.create(null);for(A2 in $2)if(B0.call($2,A2))G0[$2[A2]]=A2;var A2,S=H0.exports={to:{},get:{}};S.get=function(q){var J=q.substring(0,3).toLowerCase(),$,W;switch(J){case"hsl":$=S.get.hsl(q),W="hsl";break;case"hwb":$=S.get.hwb(q),W="hwb";break;default:$=S.get.rgb(q),W="rgb";break}if(!$)return null;return{model:W,value:$}};S.get.rgb=function(q){if(!q)return null;var J=/^#([a-f0-9]{3,4})$/i,$=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,W=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Z=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Y=/^(\w+)$/,K=[0,0,0,1],B,H,I;if(B=q.match($)){I=B[2],B=B[1];for(H=0;H<3;H++){var P=H*2;K[H]=parseInt(B.slice(P,P+2),16)}if(I)K[3]=parseInt(I,16)/255}else if(B=q.match(J)){B=B[1],I=B[3];for(H=0;H<3;H++)K[H]=parseInt(B[H]+B[H],16);if(I)K[3]=parseInt(I+I,16)/255}else if(B=q.match(W)){for(H=0;H<3;H++)K[H]=parseInt(B[H+1],0);if(B[4])if(B[5])K[3]=parseFloat(B[4])*0.01;else K[3]=parseFloat(B[4])}else if(B=q.match(Z)){for(H=0;H<3;H++)K[H]=Math.round(parseFloat(B[H+1])*2.55);if(B[4])if(B[5])K[3]=parseFloat(B[4])*0.01;else K[3]=parseFloat(B[4])}else if(B=q.match(Y)){if(B[1]==="transparent")return[0,0,0,0];if(!B0.call($2,B[1]))return null;return K=$2[B[1]],K[3]=1,K}else return null;for(H=0;H<3;H++)K[H]=g(K[H],0,255);return K[3]=g(K[3],0,1),K};S.get.hsl=function(q){if(!q)return null;var J=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,$=q.match(J);if($){var W=parseFloat($[4]),Z=(parseFloat($[1])%360+360)%360,Y=g(parseFloat($[2]),0,100),K=g(parseFloat($[3]),0,100),B=g(isNaN(W)?1:W,0,1);return[Z,Y,K,B]}return null};S.get.hwb=function(q){if(!q)return null;var J=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,$=q.match(J);if($){var W=parseFloat($[4]),Z=(parseFloat($[1])%360+360)%360,Y=g(parseFloat($[2]),0,100),K=g(parseFloat($[3]),0,100),B=g(isNaN(W)?1:W,0,1);return[Z,Y,K,B]}return null};S.to.hex=function(){var q=W2(arguments);return"#"+P2(q[0])+P2(q[1])+P2(q[2])+(q[3]<1?P2(Math.round(q[3]*255)):"")};S.to.rgb=function(){var q=W2(arguments);return q.length<4||q[3]===1?"rgb("+Math.round(q[0])+", "+Math.round(q[1])+", "+Math.round(q[2])+")":"rgba("+Math.round(q[0])+", "+Math.round(q[1])+", "+Math.round(q[2])+", "+q[3]+")"};S.to.rgb.percent=function(){var q=W2(arguments),J=Math.round(q[0]/255*100),$=Math.round(q[1]/255*100),W=Math.round(q[2]/255*100);return q.length<4||q[3]===1?"rgb("+J+"%, "+$+"%, "+W+"%)":"rgba("+J+"%, "+$+"%, "+W+"%, "+q[3]+")"};S.to.hsl=function(){var q=W2(arguments);return q.length<4||q[3]===1?"hsl("+q[0]+", "+q[1]+"%, "+q[2]+"%)":"hsla("+q[0]+", "+q[1]+"%, "+q[2]+"%, "+q[3]+")"};S.to.hwb=function(){var q=W2(arguments),J="";if(q.length>=4&&q[3]!==1)J=", "+q[3];return"hwb("+q[0]+", "+q[1]+"%, "+q[2]+"%"+J+")"};S.to.keyword=function(q){return G0[q.slice(0,3)]}});var b2=L((F9,N0)=>{var e4=function(q,J){return(q[0]-J[0])**2+(q[1]-J[1])**2+(q[2]-J[2])**2},Z2=O2(),F0={};for(let q of Object.keys(Z2))F0[Z2[q]]=q;var X={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};N0.exports=X;for(let q of Object.keys(X)){if(!("channels"in X[q]))throw new Error("missing channels property: "+q);if(!("labels"in X[q]))throw new Error("missing channel labels property: "+q);if(X[q].labels.length!==X[q].channels)throw new Error("channel and label counts mismatch: "+q);const{channels:J,labels:$}=X[q];delete X[q].channels,delete X[q].labels,Object.defineProperty(X[q],"channels",{value:J}),Object.defineProperty(X[q],"labels",{value:$})}X.rgb.hsl=function(q){const J=q[0]/255,$=q[1]/255,W=q[2]/255,Z=Math.min(J,$,W),Y=Math.max(J,$,W),K=Y-Z;let B,H;if(Y===Z)B=0;else if(J===Y)B=($-W)/K;else if($===Y)B=2+(W-J)/K;else if(W===Y)B=4+(J-$)/K;if(B=Math.min(B*60,360),B<0)B+=360;const I=(Z+Y)/2;if(Y===Z)H=0;else if(I<=0.5)H=K/(Y+Z);else H=K/(2-Y-Z);return[B,H*100,I*100]};X.rgb.hsv=function(q){let J,$,W,Z,Y;const K=q[0]/255,B=q[1]/255,H=q[2]/255,I=Math.max(K,B,H),P=I-Math.min(K,B,H),z=function(f){return(I-f)/6/P+0.5};if(P===0)Z=0,Y=0;else{if(Y=P/I,J=z(K),$=z(B),W=z(H),K===I)Z=W-$;else if(B===I)Z=0.3333333333333333+J-W;else if(H===I)Z=0.6666666666666666+$-J;if(Z<0)Z+=1;else if(Z>1)Z-=1}return[Z*360,Y*100,I*100]};X.rgb.hwb=function(q){const J=q[0],$=q[1];let W=q[2];const Z=X.rgb.hsl(q)[0],Y=0.00392156862745098*Math.min(J,Math.min($,W));return W=1-0.00392156862745098*Math.max(J,Math.max($,W)),[Z,Y*100,W*100]};X.rgb.cmyk=function(q){const J=q[0]/255,$=q[1]/255,W=q[2]/255,Z=Math.min(1-J,1-$,1-W),Y=(1-J-Z)/(1-Z)||0,K=(1-$-Z)/(1-Z)||0,B=(1-W-Z)/(1-Z)||0;return[Y*100,K*100,B*100,Z*100]};X.rgb.keyword=function(q){const J=F0[q];if(J)return J;let $=Infinity,W;for(let Z of Object.keys(Z2)){const Y=Z2[Z],K=e4(q,Y);if(K<$)$=K,W=Z}return W};X.keyword.rgb=function(q){return Z2[q]};X.rgb.xyz=function(q){let J=q[0]/255,$=q[1]/255,W=q[2]/255;J=J>0.04045?((J+0.055)/1.055)**2.4:J/12.92,$=$>0.04045?(($+0.055)/1.055)**2.4:$/12.92,W=W>0.04045?((W+0.055)/1.055)**2.4:W/12.92;const Z=J*0.4124+$*0.3576+W*0.1805,Y=J*0.2126+$*0.7152+W*0.0722,K=J*0.0193+$*0.1192+W*0.9505;return[Z*100,Y*100,K*100]};X.rgb.lab=function(q){const J=X.rgb.xyz(q);let $=J[0],W=J[1],Z=J[2];$/=95.047,W/=100,Z/=108.883,$=$>0.008856?$**0.3333333333333333:7.787*$+0.13793103448275862,W=W>0.008856?W**0.3333333333333333:7.787*W+0.13793103448275862,Z=Z>0.008856?Z**0.3333333333333333:7.787*Z+0.13793103448275862;const Y=116*W-16,K=500*($-W),B=200*(W-Z);return[Y,K,B]};X.hsl.rgb=function(q){const J=q[0]/360,$=q[1]/100,W=q[2]/100;let Z,Y,K;if($===0)return K=W*255,[K,K,K];if(W<0.5)Z=W*(1+$);else Z=W+$-W*$;const B=2*W-Z,H=[0,0,0];for(let I=0;I<3;I++){if(Y=J+0.3333333333333333*-(I-1),Y<0)Y++;if(Y>1)Y--;if(6*Y<1)K=B+(Z-B)*6*Y;else if(2*Y<1)K=Z;else if(3*Y<2)K=B+(Z-B)*(0.6666666666666666-Y)*6;else K=B;H[I]=K*255}return H};X.hsl.hsv=function(q){const J=q[0];let $=q[1]/100,W=q[2]/100,Z=$;const Y=Math.max(W,0.01);W*=2,$*=W<=1?W:2-W,Z*=Y<=1?Y:2-Y;const K=(W+$)/2,B=W===0?2*Z/(Y+Z):2*$/(W+$);return[J,B*100,K*100]};X.hsv.rgb=function(q){const J=q[0]/60,$=q[1]/100;let W=q[2]/100;const Z=Math.floor(J)%6,Y=J-Math.floor(J),K=255*W*(1-$),B=255*W*(1-$*Y),H=255*W*(1-$*(1-Y));switch(W*=255,Z){case 0:return[W,H,K];case 1:return[B,W,K];case 2:return[K,W,H];case 3:return[K,B,W];case 4:return[H,K,W];case 5:return[W,K,B]}};X.hsv.hsl=function(q){const J=q[0],$=q[1]/100,W=q[2]/100,Z=Math.max(W,0.01);let Y,K;K=(2-$)*W;const B=(2-$)*Z;return Y=$*Z,Y/=B<=1?B:2-B,Y=Y||0,K/=2,[J,Y*100,K*100]};X.hwb.rgb=function(q){const J=q[0]/360;let $=q[1]/100,W=q[2]/100;const Z=$+W;let Y;if(Z>1)$/=Z,W/=Z;const K=Math.floor(6*J),B=1-W;if(Y=6*J-K,(K&1)!==0)Y=1-Y;const H=$+Y*(B-$);let I,P,z;switch(K){default:case 6:case 0:I=B,P=H,z=$;break;case 1:I=H,P=B,z=$;break;case 2:I=$,P=B,z=H;break;case 3:I=$,P=H,z=B;break;case 4:I=H,P=$,z=B;break;case 5:I=B,P=$,z=H;break}return[I*255,P*255,z*255]};X.cmyk.rgb=function(q){const J=q[0]/100,$=q[1]/100,W=q[2]/100,Z=q[3]/100,Y=1-Math.min(1,J*(1-Z)+Z),K=1-Math.min(1,$*(1-Z)+Z),B=1-Math.min(1,W*(1-Z)+Z);return[Y*255,K*255,B*255]};X.xyz.rgb=function(q){const J=q[0]/100,$=q[1]/100,W=q[2]/100;let Z,Y,K;return Z=J*3.2406+$*-1.5372+W*-0.4986,Y=J*-0.9689+$*1.8758+W*0.0415,K=J*0.0557+$*-0.204+W*1.057,Z=Z>0.0031308?1.055*Z**0.4166666666666667-0.055:Z*12.92,Y=Y>0.0031308?1.055*Y**0.4166666666666667-0.055:Y*12.92,K=K>0.0031308?1.055*K**0.4166666666666667-0.055:K*12.92,Z=Math.min(Math.max(0,Z),1),Y=Math.min(Math.max(0,Y),1),K=Math.min(Math.max(0,K),1),[Z*255,Y*255,K*255]};X.xyz.lab=function(q){let J=q[0],$=q[1],W=q[2];J/=95.047,$/=100,W/=108.883,J=J>0.008856?J**0.3333333333333333:7.787*J+0.13793103448275862,$=$>0.008856?$**0.3333333333333333:7.787*$+0.13793103448275862,W=W>0.008856?W**0.3333333333333333:7.787*W+0.13793103448275862;const Z=116*$-16,Y=500*(J-$),K=200*($-W);return[Z,Y,K]};X.lab.xyz=function(q){const J=q[0],$=q[1],W=q[2];let Z,Y,K;Y=(J+16)/116,Z=$/500+Y,K=Y-W/200;const B=Y**3,H=Z**3,I=K**3;return Y=B>0.008856?B:(Y-0.13793103448275862)/7.787,Z=H>0.008856?H:(Z-0.13793103448275862)/7.787,K=I>0.008856?I:(K-0.13793103448275862)/7.787,Z*=95.047,Y*=100,K*=108.883,[Z,Y,K]};X.lab.lch=function(q){const J=q[0],$=q[1],W=q[2];let Z;if(Z=Math.atan2(W,$)*360/2/Math.PI,Z<0)Z+=360;const K=Math.sqrt($*$+W*W);return[J,K,Z]};X.lch.lab=function(q){const J=q[0],$=q[1],Z=q[2]/360*2*Math.PI,Y=$*Math.cos(Z),K=$*Math.sin(Z);return[J,Y,K]};X.rgb.ansi16=function(q,J=null){const[$,W,Z]=q;let Y=J===null?X.rgb.hsv(q)[2]:J;if(Y=Math.round(Y/50),Y===0)return 30;let K=30+(Math.round(Z/255)<<2|Math.round(W/255)<<1|Math.round($/255));if(Y===2)K+=60;return K};X.hsv.ansi16=function(q){return X.rgb.ansi16(X.hsv.rgb(q),q[2])};X.rgb.ansi256=function(q){const J=q[0],$=q[1],W=q[2];if(J===$&&$===W){if(J<8)return 16;if(J>248)return 231;return Math.round((J-8)/247*24)+232}return 16+36*Math.round(J/255*5)+6*Math.round($/255*5)+Math.round(W/255*5)};X.ansi16.rgb=function(q){let J=q%10;if(J===0||J===7){if(q>50)J+=3.5;return J=J/10.5*255,[J,J,J]}const $=(~~(q>50)+1)*0.5,W=(J&1)*$*255,Z=(J>>1&1)*$*255,Y=(J>>2&1)*$*255;return[W,Z,Y]};X.ansi256.rgb=function(q){if(q>=232){const Y=(q-232)*10+8;return[Y,Y,Y]}q-=16;let J;const $=Math.floor(q/36)/5*255,W=Math.floor((J=q%36)/6)/5*255,Z=J%6/5*255;return[$,W,Z]};X.rgb.hex=function(q){const $=(((Math.round(q[0])&255)<<16)+((Math.round(q[1])&255)<<8)+(Math.round(q[2])&255)).toString(16).toUpperCase();return"000000".substring($.length)+$};X.hex.rgb=function(q){const J=q.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!J)return[0,0,0];let $=J[0];if(J[0].length===3)$=$.split("").map((B)=>{return B+B}).join("");const W=parseInt($,16),Z=W>>16&255,Y=W>>8&255,K=W&255;return[Z,Y,K]};X.rgb.hcg=function(q){const J=q[0]/255,$=q[1]/255,W=q[2]/255,Z=Math.max(Math.max(J,$),W),Y=Math.min(Math.min(J,$),W),K=Z-Y;let B,H;if(K<1)B=Y/(1-K);else B=0;if(K<=0)H=0;else if(Z===J)H=($-W)/K%6;else if(Z===$)H=2+(W-J)/K;else H=4+(J-$)/K;return H/=6,H%=1,[H*360,K*100,B*100]};X.hsl.hcg=function(q){const J=q[1]/100,$=q[2]/100,W=$<0.5?2*J*$:2*J*(1-$);let Z=0;if(W<1)Z=($-0.5*W)/(1-W);return[q[0],W*100,Z*100]};X.hsv.hcg=function(q){const J=q[1]/100,$=q[2]/100,W=J*$;let Z=0;if(W<1)Z=($-W)/(1-W);return[q[0],W*100,Z*100]};X.hcg.rgb=function(q){const J=q[0]/360,$=q[1]/100,W=q[2]/100;if($===0)return[W*255,W*255,W*255];const Z=[0,0,0],Y=J%1*6,K=Y%1,B=1-K;let H=0;switch(Math.floor(Y)){case 0:Z[0]=1,Z[1]=K,Z[2]=0;break;case 1:Z[0]=B,Z[1]=1,Z[2]=0;break;case 2:Z[0]=0,Z[1]=1,Z[2]=K;break;case 3:Z[0]=0,Z[1]=B,Z[2]=1;break;case 4:Z[0]=K,Z[1]=0,Z[2]=1;break;default:Z[0]=1,Z[1]=0,Z[2]=B}return H=(1-$)*W,[($*Z[0]+H)*255,($*Z[1]+H)*255,($*Z[2]+H)*255]};X.hcg.hsv=function(q){const J=q[1]/100,$=q[2]/100,W=J+$*(1-J);let Z=0;if(W>0)Z=J/W;return[q[0],Z*100,W*100]};X.hcg.hsl=function(q){const J=q[1]/100,W=q[2]/100*(1-J)+0.5*J;let Z=0;if(W>0&&W<0.5)Z=J/(2*W);else if(W>=0.5&&W<1)Z=J/(2*(1-W));return[q[0],Z*100,W*100]};X.hcg.hwb=function(q){const J=q[1]/100,$=q[2]/100,W=J+$*(1-J);return[q[0],(W-J)*100,(1-W)*100]};X.hwb.hcg=function(q){const J=q[1]/100,W=1-q[2]/100,Z=W-J;let Y=0;if(Z<1)Y=(W-Z)/(1-Z);return[q[0],Z*100,Y*100]};X.apple.rgb=function(q){return[q[0]/65535*255,q[1]/65535*255,q[2]/65535*255]};X.rgb.apple=function(q){return[q[0]/255*65535,q[1]/255*65535,q[2]/255*65535]};X.gray.rgb=function(q){return[q[0]/100*255,q[0]/100*255,q[0]/100*255]};X.gray.hsl=function(q){return[0,0,q[0]]};X.gray.hsv=X.gray.hsl;X.gray.hwb=function(q){return[0,100,q[0]]};X.gray.cmyk=function(q){return[0,0,0,q[0]]};X.gray.lab=function(q){return[q[0],0,0]};X.gray.hex=function(q){const J=Math.round(q[0]/100*255)&255,W=((J<<16)+(J<<8)+J).toString(16).toUpperCase();return"000000".substring(W.length)+W};X.rgb.gray=function(q){return[(q[0]+q[1]+q[2])/3/255*100]}});var V0=L((N9,X0)=>{var p4=function(){const q={},J=Object.keys(L2);for(let $=J.length,W=0;W<$;W++)q[J[W]]={distance:-1,parent:null};return q},n4=function(q){const J=p4(),$=[q];J[q].distance=0;while($.length){const W=$.pop(),Z=Object.keys(L2[W]);for(let Y=Z.length,K=0;K<Y;K++){const B=Z[K],H=J[B];if(H.distance===-1)H.distance=J[W].distance+1,H.parent=W,$.unshift(B)}}return J},s4=function(q,J){return function($){return J(q($))}},t4=function(q,J){const $=[J[q].parent,q];let W=L2[J[q].parent][q],Z=J[q].parent;while(J[Z].parent)$.unshift(J[Z].parent),W=s4(L2[J[Z].parent][Z],W),Z=J[Z].parent;return W.conversion=$,W},L2=b2();X0.exports=function(q){const J=n4(q),$={},W=Object.keys(J);for(let Z=W.length,Y=0;Y<Z;Y++){const K=W[Y];if(J[K].parent===null)continue;$[K]=t4(K,J)}return $}});var P0=L((X9,A0)=>{var q3=function(q){const J=function(...$){const W=$[0];if(W===void 0||W===null)return W;if(W.length>1)$=W;return q($)};if("conversion"in q)J.conversion=q.conversion;return J},J3=function(q){const J=function(...$){const W=$[0];if(W===void 0||W===null)return W;if(W.length>1)$=W;const Z=q($);if(typeof Z==="object")for(let Y=Z.length,K=0;K<Y;K++)Z[K]=Math.round(Z[K]);return Z};if("conversion"in q)J.conversion=q.conversion;return J},h2=b2(),i4=V0(),p={},o4=Object.keys(h2);o4.forEach((q)=>{p[q]={},Object.defineProperty(p[q],"channels",{value:h2[q].channels}),Object.defineProperty(p[q],"labels",{value:h2[q].labels});const J=i4(q);Object.keys(J).forEach((W)=>{const Z=J[W];p[q][W]=J3(Z),p[q][W].raw=q3(Z)})});A0.exports=p});var R2=L((V9,_0)=>{var E=function(q,J){if(!(this instanceof E))return new E(q,J);if(J&&J in L0)J=null;if(J&&!(J in k))throw new Error("Unknown model: "+J);let $,W;if(q==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(q instanceof E)this.model=q.model,this.color=[...q.color],this.valpha=q.valpha;else if(typeof q==="string"){const Z=n.get(q);if(Z===null)throw new Error("Unable to parse color from string: "+q);this.model=Z.model,W=k[this.model].channels,this.color=Z.value.slice(0,W),this.valpha=typeof Z.value[W]==="number"?Z.value[W]:1}else if(q.length>0){this.model=J||"rgb",W=k[this.model].channels;const Z=Array.prototype.slice.call(q,0,W);this.color=m2(Z,W),this.valpha=typeof q[W]==="number"?q[W]:1}else if(typeof q==="number")this.model="rgb",this.color=[q>>16&255,q>>8&255,q&255],this.valpha=1;else{this.valpha=1;const Z=Object.keys(q);if("alpha"in q)Z.splice(Z.indexOf("alpha"),1),this.valpha=typeof q.alpha==="number"?q.alpha:0;const Y=Z.sort().join("");if(!(Y in g2))throw new Error("Unable to parse color from object: "+JSON.stringify(q));this.model=g2[Y];const{labels:K}=k[this.model],B=[];for($=0;$<K.length;$++)B.push(q[K[$]]);this.color=m2(B)}if(_2[this.model]){W=k[this.model].channels;for($=0;$<W;$++){const Z=_2[this.model][$];if(Z)this.color[$]=Z(this.color[$])}}if(this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze)Object.freeze(this)},$3=function(q,J){return Number(q.toFixed(J))},W3=function(q){return function(J){return $3(J,q)}},j=function(q,J,$){q=Array.isArray(q)?q:[q];for(let W of q)(_2[W]||(_2[W]=[]))[J]=$;return q=q[0],function(W){let Z;if(W!==void 0){if($)W=$(W);return Z=this[q](),Z.color[J]=W,Z}if(Z=this[q]().color[J],$)Z=$(Z);return Z}},D=function(q){return function(J){return Math.max(0,Math.min(q,J))}},Z3=function(q){return Array.isArray(q)?q:[q]},m2=function(q,J){for(let $=0;$<J;$++)if(typeof q[$]!=="number")q[$]=0;return q},n=I0(),k=P0(),L0=["keyword","gray","hex"],g2={};for(let q of Object.keys(k))g2[[...k[q].labels].sort().join("")]=q;var _2={};E.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(q){let J=this.model in n.to?this:this.rgb();J=J.round(typeof q==="number"?q:1);const $=J.valpha===1?J.color:[...J.color,this.valpha];return n.to[J.model]($)},percentString(q){const J=this.rgb().round(typeof q==="number"?q:1),$=J.valpha===1?J.color:[...J.color,this.valpha];return n.to.rgb.percent($)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const q={},{channels:J}=k[this.model],{labels:$}=k[this.model];for(let W=0;W<J;W++)q[$[W]]=this.color[W];if(this.valpha!==1)q.alpha=this.valpha;return q},unitArray(){const q=this.rgb().color;if(q[0]/=255,q[1]/=255,q[2]/=255,this.valpha!==1)q.push(this.valpha);return q},unitObject(){const q=this.rgb().object();if(q.r/=255,q.g/=255,q.b/=255,this.valpha!==1)q.alpha=this.valpha;return q},round(q){return q=Math.max(q||0,0),new E([...this.color.map(W3(q)),this.valpha],this.model)},alpha(q){if(q!==void 0)return new E([...this.color,Math.max(0,Math.min(1,q))],this.model);return this.valpha},red:j("rgb",0,D(255)),green:j("rgb",1,D(255)),blue:j("rgb",2,D(255)),hue:j(["hsl","hsv","hsl","hwb","hcg"],0,(q)=>(q%360+360)%360),saturationl:j("hsl",1,D(100)),lightness:j("hsl",2,D(100)),saturationv:j("hsv",1,D(100)),value:j("hsv",2,D(100)),chroma:j("hcg",1,D(100)),gray:j("hcg",2,D(100)),white:j("hwb",1,D(100)),wblack:j("hwb",2,D(100)),cyan:j("cmyk",0,D(100)),magenta:j("cmyk",1,D(100)),yellow:j("cmyk",2,D(100)),black:j("cmyk",3,D(100)),x:j("xyz",0,D(95.047)),y:j("xyz",1,D(100)),z:j("xyz",2,D(108.833)),l:j("lab",0,D(100)),a:j("lab",1),b:j("lab",2),keyword(q){if(q!==void 0)return new E(q);return k[this.model].keyword(this.color)},hex(q){if(q!==void 0)return new E(q);return n.to.hex(this.rgb().round().color)},hexa(q){if(q!==void 0)return new E(q);const J=this.rgb().round().color;let $=Math.round(this.valpha*255).toString(16).toUpperCase();if($.length===1)$="0"+$;return n.to.hex(J)+$},rgbNumber(){const q=this.rgb().color;return(q[0]&255)<<16|(q[1]&255)<<8|q[2]&255},luminosity(){const q=this.rgb().color,J=[];for(let[$,W]of q.entries()){const Z=W/255;J[$]=Z<=0.04045?Z/12.92:((Z+0.055)/1.055)**2.4}return 0.2126*J[0]+0.7152*J[1]+0.0722*J[2]},contrast(q){const J=this.luminosity(),$=q.luminosity();if(J>$)return(J+0.05)/($+0.05);return($+0.05)/(J+0.05)},level(q){const J=this.contrast(q);if(J>=7)return"AAA";return J>=4.5?"AA":""},isDark(){const q=this.rgb().color;return(q[0]*2126+q[1]*7152+q[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const q=this.rgb();for(let J=0;J<3;J++)q.color[J]=255-q.color[J];return q},lighten(q){const J=this.hsl();return J.color[2]+=J.color[2]*q,J},darken(q){const J=this.hsl();return J.color[2]-=J.color[2]*q,J},saturate(q){const J=this.hsl();return J.color[1]+=J.color[1]*q,J},desaturate(q){const J=this.hsl();return J.color[1]-=J.color[1]*q,J},whiten(q){const J=this.hwb();return J.color[1]+=J.color[1]*q,J},blacken(q){const J=this.hwb();return J.color[2]+=J.color[2]*q,J},grayscale(){const q=this.rgb().color,J=q[0]*0.3+q[1]*0.59+q[2]*0.11;return E.rgb(J,J,J)},fade(q){return this.alpha(this.valpha-this.valpha*q)},opaquer(q){return this.alpha(this.valpha+this.valpha*q)},rotate(q){const J=this.hsl();let $=J.color[0];return $=($+q)%360,$=$<0?360+$:$,J.color[0]=$,J},mix(q,J){if(!q||!q.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof q);const $=q.rgb(),W=this.rgb(),Z=J===void 0?0.5:J,Y=2*Z-1,K=$.alpha()-W.alpha(),B=((Y*K===-1?Y:(Y+K)/(1+Y*K))+1)/2,H=1-B;return E.rgb(B*$.red()+H*W.red(),B*$.green()+H*W.green(),B*$.blue()+H*W.blue(),$.alpha()*Z+W.alpha()*(1-Z))}};for(let q of Object.keys(k)){if(L0.includes(q))continue;const{channels:J}=k[q];E.prototype[q]=function(...$){if(this.model===q)return new E(this);if($.length>0)return new E($,q);return new E([...Z3(k[this.model][q].raw(this.color)),this.valpha],q)},E[q]=function(...$){let W=$[0];if(typeof W==="number")W=m2($,J);return new E(W,q)}}_0.exports=E});var z0=L((A9,j0)=>{var R0=function(q){const{raw:J,density:$,limitInputPixels:W,ignoreIcc:Z,unlimited:Y,sequentialRead:K,failOn:B,failOnError:H,animated:I,page:P,pages:z,subifd:f}=q;return[J,$,W,Z,Y,K,B,H,I,P,z,f].some(G.defined)?{raw:J,density:$,limitInputPixels:W,ignoreIcc:Z,unlimited:Y,sequentialRead:K,failOn:B,failOnError:H,animated:I,page:P,pages:z,subifd:f}:void 0},K3=function(q,J,$){const W={failOn:"warning",limitInputPixels:Math.pow(16383,2),ignoreIcc:!1,unlimited:!1,sequentialRead:!0};if(G.string(q))W.file=q;else if(G.buffer(q)){if(q.length===0)throw Error("Input Buffer is empty");W.buffer=q}else if(G.arrayBuffer(q)){if(q.byteLength===0)throw Error("Input bit Array is empty");W.buffer=Buffer.from(q,0,q.byteLength)}else if(G.typedArray(q)){if(q.length===0)throw Error("Input Bit Array is empty");W.buffer=Buffer.from(q.buffer,q.byteOffset,q.byteLength)}else if(G.plainObject(q)&&!G.defined(J)){if(J=q,R0(J))W.buffer=[]}else if(!G.defined(q)&&!G.defined(J)&&G.object($)&&$.allowStream)W.buffer=[];else throw new Error(`Unsupported input '${q}' of type ${typeof q}${G.defined(J)?` when also providing options of type ${typeof J}`:""}`);if(G.object(J)){if(G.defined(J.failOnError))if(G.bool(J.failOnError))W.failOn=J.failOnError?"warning":"none";else throw G.invalidParameterError("failOnError","boolean",J.failOnError);if(G.defined(J.failOn))if(G.string(J.failOn)&&G.inArray(J.failOn,["none","truncated","error","warning"]))W.failOn=J.failOn;else throw G.invalidParameterError("failOn","one of: none, truncated, error, warning",J.failOn);if(G.defined(J.density))if(G.inRange(J.density,1,1e5))W.density=J.density;else throw G.invalidParameterError("density","number between 1 and 100000",J.density);if(G.defined(J.ignoreIcc))if(G.bool(J.ignoreIcc))W.ignoreIcc=J.ignoreIcc;else throw G.invalidParameterError("ignoreIcc","boolean",J.ignoreIcc);if(G.defined(J.limitInputPixels))if(G.bool(J.limitInputPixels))W.limitInputPixels=J.limitInputPixels?Math.pow(16383,2):0;else if(G.integer(J.limitInputPixels)&&G.inRange(J.limitInputPixels,0,Number.MAX_SAFE_INTEGER))W.limitInputPixels=J.limitInputPixels;else throw G.invalidParameterError("limitInputPixels","positive integer",J.limitInputPixels);if(G.defined(J.unlimited))if(G.bool(J.unlimited))W.unlimited=J.unlimited;else throw G.invalidParameterError("unlimited","boolean",J.unlimited);if(G.defined(J.sequentialRead))if(G.bool(J.sequentialRead))W.sequentialRead=J.sequentialRead;else throw G.invalidParameterError("sequentialRead","boolean",J.sequentialRead);if(G.defined(J.raw))if(G.object(J.raw)&&G.integer(J.raw.width)&&J.raw.width>0&&G.integer(J.raw.height)&&J.raw.height>0&&G.integer(J.raw.channels)&&G.inRange(J.raw.channels,1,4))switch(W.rawWidth=J.raw.width,W.rawHeight=J.raw.height,W.rawChannels=J.raw.channels,W.rawPremultiplied=!!J.raw.premultiplied,q.constructor){case Uint8Array:case Uint8ClampedArray:W.rawDepth="uchar";break;case Int8Array:W.rawDepth="char";break;case Uint16Array:W.rawDepth="ushort";break;case Int16Array:W.rawDepth="short";break;case Uint32Array:W.rawDepth="uint";break;case Int32Array:W.rawDepth="int";break;case Float32Array:W.rawDepth="float";break;case Float64Array:W.rawDepth="double";break;default:W.rawDepth="uchar";break}else throw new Error("Expected width, height and channels for raw pixel input");if(G.defined(J.animated))if(G.bool(J.animated))W.pages=J.animated?-1:1;else throw G.invalidParameterError("animated","boolean",J.animated);if(G.defined(J.pages))if(G.integer(J.pages)&&G.inRange(J.pages,-1,1e5))W.pages=J.pages;else throw G.invalidParameterError("pages","integer between -1 and 100000",J.pages);if(G.defined(J.page))if(G.integer(J.page)&&G.inRange(J.page,0,1e5))W.page=J.page;else throw G.invalidParameterError("page","integer between 0 and 100000",J.page);if(G.defined(J.level))if(G.integer(J.level)&&G.inRange(J.level,0,256))W.level=J.level;else throw G.invalidParameterError("level","integer between 0 and 256",J.level);if(G.defined(J.subifd))if(G.integer(J.subifd)&&G.inRange(J.subifd,-1,1e5))W.subifd=J.subifd;else throw G.invalidParameterError("subifd","integer between -1 and 100000",J.subifd);if(G.defined(J.create))if(G.object(J.create)&&G.integer(J.create.width)&&J.create.width>0&&G.integer(J.create.height)&&J.create.height>0&&G.integer(J.create.channels)){if(W.createWidth=J.create.width,W.createHeight=J.create.height,W.createChannels=J.create.channels,G.defined(J.create.noise)){if(!G.object(J.create.noise))throw new Error("Expected noise to be an object");if(!G.inArray(J.create.noise.type,["gaussian"]))throw new Error("Only gaussian noise is supported at the moment");if(!G.inRange(J.create.channels,1,4))throw G.invalidParameterError("create.channels","number between 1 and 4",J.create.channels);if(W.createNoiseType=J.create.noise.type,G.number(J.create.noise.mean)&&G.inRange(J.create.noise.mean,0,1e4))W.createNoiseMean=J.create.noise.mean;else throw G.invalidParameterError("create.noise.mean","number between 0 and 10000",J.create.noise.mean);if(G.number(J.create.noise.sigma)&&G.inRange(J.create.noise.sigma,0,1e4))W.createNoiseSigma=J.create.noise.sigma;else throw G.invalidParameterError("create.noise.sigma","number between 0 and 10000",J.create.noise.sigma)}else if(G.defined(J.create.background)){if(!G.inRange(J.create.channels,3,4))throw G.invalidParameterError("create.channels","number between 3 and 4",J.create.channels);const Z=Q3(J.create.background);W.createBackground=[Z.red(),Z.green(),Z.blue(),Math.round(Z.alpha()*255)]}else throw new Error("Expected valid noise or background to create a new input image");delete W.buffer}else throw new Error("Expected valid width, height and channels to create a new input image");if(G.defined(J.text))if(G.object(J.text)&&G.string(J.text.text)){if(W.textValue=J.text.text,G.defined(J.text.height)&&G.defined(J.text.dpi))throw new Error("Expected only one of dpi or height");if(G.defined(J.text.font))if(G.string(J.text.font))W.textFont=J.text.font;else throw G.invalidParameterError("text.font","string",J.text.font);if(G.defined(J.text.fontfile))if(G.string(J.text.fontfile))W.textFontfile=J.text.fontfile;else throw G.invalidParameterError("text.fontfile","string",J.text.fontfile);if(G.defined(J.text.width))if(G.integer(J.text.width)&&J.text.width>0)W.textWidth=J.text.width;else throw G.invalidParameterError("text.width","positive integer",J.text.width);if(G.defined(J.text.height))if(G.integer(J.text.height)&&J.text.height>0)W.textHeight=J.text.height;else throw G.invalidParameterError("text.height","positive integer",J.text.height);if(G.defined(J.text.align))if(G.string(J.text.align)&&G.string(this.constructor.align[J.text.align]))W.textAlign=this.constructor.align[J.text.align];else throw G.invalidParameterError("text.align","valid alignment",J.text.align);if(G.defined(J.text.justify))if(G.bool(J.text.justify))W.textJustify=J.text.justify;else throw G.invalidParameterError("text.justify","boolean",J.text.justify);if(G.defined(J.text.dpi))if(G.integer(J.text.dpi)&&G.inRange(J.text.dpi,1,1e6))W.textDpi=J.text.dpi;else throw G.invalidParameterError("text.dpi","integer between 1 and 1000000",J.text.dpi);if(G.defined(J.text.rgba))if(G.bool(J.text.rgba))W.textRgba=J.text.rgba;else throw G.invalidParameterError("text.rgba","bool",J.text.rgba);if(G.defined(J.text.spacing))if(G.integer(J.text.spacing)&&G.inRange(J.text.spacing,-1e6,1e6))W.textSpacing=J.text.spacing;else throw G.invalidParameterError("text.spacing","integer between -1000000 and 1000000",J.text.spacing);if(G.defined(J.text.wrap))if(G.string(J.text.wrap)&&G.inArray(J.text.wrap,["word","char","word-char","none"]))W.textWrap=J.text.wrap;else throw G.invalidParameterError("text.wrap","one of: word, char, word-char, none",J.text.wrap);delete W.buffer}else throw new Error("Expected a valid string to create an image with text.")}else if(G.defined(J))throw new Error("Invalid input options "+J);return W},U3=function(q,J,$){if(Array.isArray(this.options.input.buffer))if(G.buffer(q)){if(this.options.input.buffer.length===0)this.on("finish",()=>{this.streamInFinished=!0});this.options.input.buffer.push(q),$()}else $(new Error("Non-Buffer data on Writable Stream"));else $(new Error("Unexpected data on Writable Stream"))},B3=function(){if(this._isStreamInput())this.options.input.buffer=Buffer.concat(this.options.input.buffer)},G3=function(){return Array.isArray(this.options.input.buffer)},H3=function(q){const J=Error();if(G.fn(q)){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),m.metadata(this.options,($,W)=>{if($)q(G.nativeError($,J));else q(null,W)})});else m.metadata(this.options,($,W)=>{if($)q(G.nativeError($,J));else q(null,W)});return this}else if(this._isStreamInput())return new Promise(($,W)=>{const Z=()=>{this._flattenBufferIn(),m.metadata(this.options,(Y,K)=>{if(Y)W(G.nativeError(Y,J));else $(K)})};if(this.writableFinished)Z();else this.once("finish",Z)});else return new Promise(($,W)=>{m.metadata(this.options,(Z,Y)=>{if(Z)W(G.nativeError(Z,J));else $(Y)})})},I3=function(q){const J=Error();if(G.fn(q)){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),m.stats(this.options,($,W)=>{if($)q(G.nativeError($,J));else q(null,W)})});else m.stats(this.options,($,W)=>{if($)q(G.nativeError($,J));else q(null,W)});return this}else if(this._isStreamInput())return new Promise(($,W)=>{this.on("finish",function(){this._flattenBufferIn(),m.stats(this.options,(Z,Y)=>{if(Z)W(G.nativeError(Z,J));else $(Y)})})});else return new Promise(($,W)=>{m.stats(this.options,(Z,Y)=>{if(Z)W(G.nativeError(Z,J));else $(Y)})})},Q3=R2(),G=d(),m=J2(),Y3={left:"low",center:"centre",centre:"centre",right:"high"};j0.exports=function(q){Object.assign(q.prototype,{_inputOptionsFromObject:R0,_createInputDescriptor:K3,_write:U3,_flattenBufferIn:B3,_isStreamInput:G3,metadata:H3,stats:I3}),q.align=Y3}});var C0=L((P9,w0)=>{var l2=function(q){return q.angle%360!==0||q.useExifOrientation===!0||q.rotationAngle!==0},j2=function(q){return q.width!==-1||q.height!==-1},X3=function(q,J,$){if(j2(this.options))this.options.debuglog("ignoring previous resize options");if(this.options.widthPost!==-1)this.options.debuglog("operation order will be: extract, resize, extract");if(V.defined(q))if(V.object(q)&&!V.defined($))$=q;else if(V.integer(q)&&q>0)this.options.width=q;else throw V.invalidParameterError("width","positive integer",q);else this.options.width=-1;if(V.defined(J))if(V.integer(J)&&J>0)this.options.height=J;else throw V.invalidParameterError("height","positive integer",J);else this.options.height=-1;if(V.object($)){if(V.defined($.width))if(V.integer($.width)&&$.width>0)this.options.width=$.width;else throw V.invalidParameterError("width","positive integer",$.width);if(V.defined($.height))if(V.integer($.height)&&$.height>0)this.options.height=$.height;else throw V.invalidParameterError("height","positive integer",$.height);if(V.defined($.fit)){const W=N3[$.fit];if(V.string(W))this.options.canvas=W;else throw V.invalidParameterError("fit","valid fit",$.fit)}if(V.defined($.position)){const W=V.integer($.position)?$.position:y0[$.position]||T0[$.position]||E0[$.position];if(V.integer(W)&&(V.inRange(W,0,8)||V.inRange(W,16,17)))this.options.position=W;else throw V.invalidParameterError("position","valid position/gravity/strategy",$.position)}if(this._setBackgroundColourOption("resizeBackground",$.background),V.defined($.kernel))if(V.string(u2[$.kernel]))this.options.kernel=u2[$.kernel];else throw V.invalidParameterError("kernel","valid kernel name",$.kernel);if(V.defined($.withoutEnlargement))this._setBooleanOption("withoutEnlargement",$.withoutEnlargement);if(V.defined($.withoutReduction))this._setBooleanOption("withoutReduction",$.withoutReduction);if(V.defined($.fastShrinkOnLoad))this._setBooleanOption("fastShrinkOnLoad",$.fastShrinkOnLoad)}if(l2(this.options)&&j2(this.options))this.options.rotateBeforePreExtract=!0;return this},V3=function(q){if(V.integer(q)&&q>0)this.options.extendTop=q,this.options.extendBottom=q,this.options.extendLeft=q,this.options.extendRight=q;else if(V.object(q)){if(V.defined(q.top))if(V.integer(q.top)&&q.top>=0)this.options.extendTop=q.top;else throw V.invalidParameterError("top","positive integer",q.top);if(V.defined(q.bottom))if(V.integer(q.bottom)&&q.bottom>=0)this.options.extendBottom=q.bottom;else throw V.invalidParameterError("bottom","positive integer",q.bottom);if(V.defined(q.left))if(V.integer(q.left)&&q.left>=0)this.options.extendLeft=q.left;else throw V.invalidParameterError("left","positive integer",q.left);if(V.defined(q.right))if(V.integer(q.right)&&q.right>=0)this.options.extendRight=q.right;else throw V.invalidParameterError("right","positive integer",q.right);if(this._setBackgroundColourOption("extendBackground",q.background),V.defined(q.extendWith))if(V.string(D0[q.extendWith]))this.options.extendWith=D0[q.extendWith];else throw V.invalidParameterError("extendWith","one of: background, copy, repeat, mirror",q.extendWith)}else throw V.invalidParameterError("extend","integer or object",q);return this},A3=function(q){const J=j2(this.options)||this.options.widthPre!==-1?"Post":"Pre";if(this.options[`width${J}`]!==-1)this.options.debuglog("ignoring previous extract options");if(["left","top","width","height"].forEach(function($){const W=q[$];if(V.integer(W)&&W>=0)this.options[$+($==="left"||$==="top"?"Offset":"")+J]=W;else throw V.invalidParameterError($,"integer",W)},this),l2(this.options)&&!j2(this.options)){if(this.options.widthPre===-1||this.options.widthPost===-1)this.options.rotateBeforePreExtract=!0}return this},P3=function(q){if(this.options.trimThreshold=10,V.defined(q))if(V.object(q)){if(V.defined(q.background))this._setBackgroundColourOption("trimBackground",q.background);if(V.defined(q.threshold))if(V.number(q.threshold)&&q.threshold>=0)this.options.trimThreshold=q.threshold;else throw V.invalidParameterError("threshold","positive number",q.threshold);if(V.defined(q.lineArt))this._setBooleanOption("trimLineArt",q.lineArt)}else throw V.invalidParameterError("trim","object",q);if(l2(this.options))this.options.rotateBeforePreExtract=!0;return this},V=d(),E0={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},T0={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},D0={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},y0={entropy:16,attention:17},u2={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3"},F3={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},N3={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};w0.exports=function(q){Object.assign(q.prototype,{resize:X3,extend:V3,extract:A3,trim:P3}),q.gravity=E0,q.strategy=y0,q.kernel=u2,q.fit=F3,q.position=T0}});var k0=L((L9,S0)=>{var L3=function(q){if(!Array.isArray(q))throw _.invalidParameterError("images to composite","array",q);return this.options.composite=q.map((J)=>{if(!_.object(J))throw _.invalidParameterError("image to composite","object",J);const $=this._inputOptionsFromObject(J),W={input:this._createInputDescriptor(J.input,$,{allowStream:!1}),blend:"over",tile:!1,left:0,top:0,hasOffset:!1,gravity:0,premultiplied:!1};if(_.defined(J.blend))if(_.string(c2[J.blend]))W.blend=c2[J.blend];else throw _.invalidParameterError("blend","valid blend name",J.blend);if(_.defined(J.tile))if(_.bool(J.tile))W.tile=J.tile;else throw _.invalidParameterError("tile","boolean",J.tile);if(_.defined(J.left))if(_.integer(J.left))W.left=J.left;else throw _.invalidParameterError("left","integer",J.left);if(_.defined(J.top))if(_.integer(J.top))W.top=J.top;else throw _.invalidParameterError("top","integer",J.top);if(_.defined(J.top)!==_.defined(J.left))throw new Error("Expected both left and top to be set");else W.hasOffset=_.integer(J.top)&&_.integer(J.left);if(_.defined(J.gravity))if(_.integer(J.gravity)&&_.inRange(J.gravity,0,8))W.gravity=J.gravity;else if(_.string(J.gravity)&&_.integer(this.constructor.gravity[J.gravity]))W.gravity=this.constructor.gravity[J.gravity];else throw _.invalidParameterError("gravity","valid gravity",J.gravity);if(_.defined(J.premultiplied))if(_.bool(J.premultiplied))W.premultiplied=J.premultiplied;else throw _.invalidParameterError("premultiplied","boolean",J.premultiplied);return W}),this},_=d(),c2={clear:"clear",source:"source",over:"over",in:"in",out:"out",atop:"atop",dest:"dest","dest-over":"dest-over","dest-in":"dest-in","dest-out":"dest-out","dest-atop":"dest-atop",xor:"xor",add:"add",saturate:"saturate",multiply:"multiply",screen:"screen",overlay:"overlay",darken:"darken",lighten:"lighten","colour-dodge":"colour-dodge","color-dodge":"colour-dodge","colour-burn":"colour-burn","color-burn":"colour-burn","hard-light":"hard-light","soft-light":"soft-light",difference:"difference",exclusion:"exclusion"};S0.exports=function(q){q.prototype.composite=L3,q.blend=c2}});var x0=L((_9,M0)=>{var R3=function(q,J){if(this.options.useExifOrientation||this.options.angle||this.options.rotationAngle)this.options.debuglog("ignoring previous rotate options");if(!U.defined(q))this.options.useExifOrientation=!0;else if(U.integer(q)&&!(q%90))this.options.angle=q;else if(U.number(q)){if(this.options.rotationAngle=q,U.object(J)&&J.background){const $=_3(J.background);this.options.rotationBackground=[$.red(),$.green(),$.blue(),Math.round($.alpha()*255)]}}else throw U.invalidParameterError("angle","numeric",q);return this},j3=function(q){return this.options.flip=U.bool(q)?q:!0,this},z3=function(q){return this.options.flop=U.bool(q)?q:!0,this},D3=function(q,J){const $=[].concat(...q);if($.length===4&&$.every(U.number))this.options.affineMatrix=$;else throw U.invalidParameterError("matrix","1x4 or 2x2 array",q);if(U.defined(J))if(U.object(J)){if(this._setBackgroundColourOption("affineBackground",J.background),U.defined(J.idx))if(U.number(J.idx))this.options.affineIdx=J.idx;else throw U.invalidParameterError("options.idx","number",J.idx);if(U.defined(J.idy))if(U.number(J.idy))this.options.affineIdy=J.idy;else throw U.invalidParameterError("options.idy","number",J.idy);if(U.defined(J.odx))if(U.number(J.odx))this.options.affineOdx=J.odx;else throw U.invalidParameterError("options.odx","number",J.odx);if(U.defined(J.ody))if(U.number(J.ody))this.options.affineOdy=J.ody;else throw U.invalidParameterError("options.ody","number",J.ody);if(U.defined(J.interpolator))if(U.inArray(J.interpolator,Object.values(this.constructor.interpolators)))this.options.affineInterpolator=J.interpolator;else throw U.invalidParameterError("options.interpolator","valid interpolator name",J.interpolator)}else throw U.invalidParameterError("options","object",J);return this},E3=function(q,J,$){if(!U.defined(q))this.options.sharpenSigma=-1;else if(U.bool(q))this.options.sharpenSigma=q?-1:0;else if(U.number(q)&&U.inRange(q,0.01,1e4)){if(this.options.sharpenSigma=q,U.defined(J))if(U.number(J)&&U.inRange(J,0,1e4))this.options.sharpenM1=J;else throw U.invalidParameterError("flat","number between 0 and 10000",J);if(U.defined($))if(U.number($)&&U.inRange($,0,1e4))this.options.sharpenM2=$;else throw U.invalidParameterError("jagged","number between 0 and 10000",$)}else if(U.plainObject(q)){if(U.number(q.sigma)&&U.inRange(q.sigma,0.000001,10))this.options.sharpenSigma=q.sigma;else throw U.invalidParameterError("options.sigma","number between 0.000001 and 10",q.sigma);if(U.defined(q.m1))if(U.number(q.m1)&&U.inRange(q.m1,0,1e6))this.options.sharpenM1=q.m1;else throw U.invalidParameterError("options.m1","number between 0 and 1000000",q.m1);if(U.defined(q.m2))if(U.number(q.m2)&&U.inRange(q.m2,0,1e6))this.options.sharpenM2=q.m2;else throw U.invalidParameterError("options.m2","number between 0 and 1000000",q.m2);if(U.defined(q.x1))if(U.number(q.x1)&&U.inRange(q.x1,0,1e6))this.options.sharpenX1=q.x1;else throw U.invalidParameterError("options.x1","number between 0 and 1000000",q.x1);if(U.defined(q.y2))if(U.number(q.y2)&&U.inRange(q.y2,0,1e6))this.options.sharpenY2=q.y2;else throw U.invalidParameterError("options.y2","number between 0 and 1000000",q.y2);if(U.defined(q.y3))if(U.number(q.y3)&&U.inRange(q.y3,0,1e6))this.options.sharpenY3=q.y3;else throw U.invalidParameterError("options.y3","number between 0 and 1000000",q.y3)}else throw U.invalidParameterError("sigma","number between 0.01 and 10000",q);return this},T3=function(q){if(!U.defined(q))this.options.medianSize=3;else if(U.integer(q)&&U.inRange(q,1,1000))this.options.medianSize=q;else throw U.invalidParameterError("size","integer between 1 and 1000",q);return this},y3=function(q){if(!U.defined(q))this.options.blurSigma=-1;else if(U.bool(q))this.options.blurSigma=q?-1:0;else if(U.number(q)&&U.inRange(q,0.3,1000))this.options.blurSigma=q;else throw U.invalidParameterError("sigma","number between 0.3 and 1000",q);return this},w3=function(q){if(this.options.flatten=U.bool(q)?q:!0,U.object(q))this._setBackgroundColourOption("flattenBackground",q.background);return this},C3=function(){return this.options.unflatten=!0,this},S3=function(q,J){if(!U.defined(q))this.options.gamma=2.2;else if(U.number(q)&&U.inRange(q,1,3))this.options.gamma=q;else throw U.invalidParameterError("gamma","number between 1.0 and 3.0",q);if(!U.defined(J))this.options.gammaOut=this.options.gamma;else if(U.number(J)&&U.inRange(J,1,3))this.options.gammaOut=J;else throw U.invalidParameterError("gammaOut","number between 1.0 and 3.0",J);return this},k3=function(q){if(this.options.negate=U.bool(q)?q:!0,U.plainObject(q)&&"alpha"in q)if(!U.bool(q.alpha))throw U.invalidParameterError("alpha","should be boolean value",q.alpha);else this.options.negateAlpha=q.alpha;return this},M3=function(q){if(U.plainObject(q)){if(U.defined(q.lower))if(U.number(q.lower)&&U.inRange(q.lower,0,99))this.options.normaliseLower=q.lower;else throw U.invalidParameterError("lower","number between 0 and 99",q.lower);if(U.defined(q.upper))if(U.number(q.upper)&&U.inRange(q.upper,1,100))this.options.normaliseUpper=q.upper;else throw U.invalidParameterError("upper","number between 1 and 100",q.upper)}if(this.options.normaliseLower>=this.options.normaliseUpper)throw U.invalidParameterError("range","lower to be less than upper",`${this.options.normaliseLower} >= ${this.options.normaliseUpper}`);return this.options.normalise=!0,this},x3=function(q){return this.normalise(q)},f3=function(q){if(U.plainObject(q)){if(U.integer(q.width)&&q.width>0)this.options.claheWidth=q.width;else throw U.invalidParameterError("width","integer greater than zero",q.width);if(U.integer(q.height)&&q.height>0)this.options.claheHeight=q.height;else throw U.invalidParameterError("height","integer greater than zero",q.height);if(U.defined(q.maxSlope))if(U.integer(q.maxSlope)&&U.inRange(q.maxSlope,0,100))this.options.claheMaxSlope=q.maxSlope;else throw U.invalidParameterError("maxSlope","integer between 0 and 100",q.maxSlope)}else throw U.invalidParameterError("options","plain object",q);return this},d3=function(q){if(!U.object(q)||!Array.isArray(q.kernel)||!U.integer(q.width)||!U.integer(q.height)||!U.inRange(q.width,3,1001)||!U.inRange(q.height,3,1001)||q.height*q.width!==q.kernel.length)throw new Error("Invalid convolution kernel");if(!U.integer(q.scale))q.scale=q.kernel.reduce(function(J,$){return J+$},0);if(q.scale<1)q.scale=1;if(!U.integer(q.offset))q.offset=0;return this.options.convKernel=q,this},v3=function(q,J){if(!U.defined(q))this.options.threshold=128;else if(U.bool(q))this.options.threshold=q?128:0;else if(U.integer(q)&&U.inRange(q,0,255))this.options.threshold=q;else throw U.invalidParameterError("threshold","integer between 0 and 255",q);if(!U.object(J)||J.greyscale===!0||J.grayscale===!0)this.options.thresholdGrayscale=!0;else this.options.thresholdGrayscale=!1;return this},O3=function(q,J,$){if(this.options.boolean=this._createInputDescriptor(q,$),U.string(J)&&U.inArray(J,["and","or","eor"]))this.options.booleanOp=J;else throw U.invalidParameterError("operator","one of: and, or, eor",J);return this},b3=function(q,J){if(!U.defined(q)&&U.number(J))q=1;else if(U.number(q)&&!U.defined(J))J=0;if(!U.defined(q))this.options.linearA=[];else if(U.number(q))this.options.linearA=[q];else if(Array.isArray(q)&&q.length&&q.every(U.number))this.options.linearA=q;else throw U.invalidParameterError("a","number or array of numbers",q);if(!U.defined(J))this.options.linearB=[];else if(U.number(J))this.options.linearB=[J];else if(Array.isArray(J)&&J.length&&J.every(U.number))this.options.linearB=J;else throw U.invalidParameterError("b","number or array of numbers",J);if(this.options.linearA.length!==this.options.linearB.length)throw new Error("Expected a and b to be arrays of the same length");return this},h3=function(q){if(!Array.isArray(q)||q.length!==3||q[0].length!==3||q[1].length!==3||q[2].length!==3)throw new Error("Invalid recombination matrix");return this.options.recombMatrix=[q[0][0],q[0][1],q[0][2],q[1][0],q[1][1],q[1][2],q[2][0],q[2][1],q[2][2]].map(Number),this},g3=function(q){if(!U.plainObject(q))throw U.invalidParameterError("options","plain object",q);if("brightness"in q)if(U.number(q.brightness)&&q.brightness>=0)this.options.brightness=q.brightness;else throw U.invalidParameterError("brightness","number above zero",q.brightness);if("saturation"in q)if(U.number(q.saturation)&&q.saturation>=0)this.options.saturation=q.saturation;else throw U.invalidParameterError("saturation","number above zero",q.saturation);if("hue"in q)if(U.integer(q.hue))this.options.hue=q.hue%360;else throw U.invalidParameterError("hue","number",q.hue);if("lightness"in q)if(U.number(q.lightness))this.options.lightness=q.lightness;else throw U.invalidParameterError("lightness","number",q.lightness);return this},_3=R2(),U=d();M0.exports=function(q){Object.assign(q.prototype,{rotate:R3,flip:j3,flop:z3,affine:D3,sharpen:E3,median:T3,blur:y3,flatten:w3,unflatten:C3,gamma:S3,negate:k3,normalise:M3,normalize:x3,clahe:f3,convolve:d3,threshold:v3,boolean:O3,linear:b3,recomb:h3,modulate:g3})}});var v0=L((R9,d0)=>{var u3=function(q){return this._setBackgroundColourOption("tint",q),this},l3=function(q){return this.options.greyscale=b.bool(q)?q:!0,this},c3=function(q){return this.greyscale(q)},a3=function(q){if(!b.string(q))throw b.invalidParameterError("colourspace","string",q);return this.options.colourspacePipeline=q,this},r3=function(q){return this.pipelineColourspace(q)},e3=function(q){if(!b.string(q))throw b.invalidParameterError("colourspace","string",q);return this.options.colourspace=q,this},p3=function(q){return this.toColourspace(q)},n3=function(q,J){if(b.defined(J))if(b.object(J)||b.string(J)){const $=m3(J);this.options[q]=[$.red(),$.green(),$.blue(),Math.round($.alpha()*255)]}else throw b.invalidParameterError("background","object or string",J)},m3=R2(),b=d(),f0={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};d0.exports=function(q){Object.assign(q.prototype,{tint:u3,greyscale:l3,grayscale:c3,pipelineColourspace:a3,pipelineColorspace:r3,toColourspace:e3,toColorspace:p3,_setBackgroundColourOption:n3}),q.colourspace=f0,q.colorspace=f0}});var b0=L((j9,O0)=>{var t3=function(){return this.options.removeAlpha=!0,this},i3=function(q){if(v.defined(q))if(v.number(q)&&v.inRange(q,0,1))this.options.ensureAlpha=q;else throw v.invalidParameterError("alpha","number between 0 and 1",q);else this.options.ensureAlpha=1;return this},o3=function(q){const J={red:0,green:1,blue:2,alpha:3};if(Object.keys(J).includes(q))q=J[q];if(v.integer(q)&&v.inRange(q,0,4))this.options.extractChannel=q;else throw v.invalidParameterError("channel","integer or one of: red, green, blue, alpha",q);return this},q8=function(q,J){if(Array.isArray(q))q.forEach(function($){this.options.joinChannelIn.push(this._createInputDescriptor($,J))},this);else this.options.joinChannelIn.push(this._createInputDescriptor(q,J));return this},J8=function(q){if(v.string(q)&&v.inArray(q,["and","or","eor"]))this.options.bandBoolOp=q;else throw v.invalidParameterError("boolOp","one of: and, or, eor",q);return this},v=d(),s3={and:"and",or:"or",eor:"eor"};O0.exports=function(q){Object.assign(q.prototype,{removeAlpha:t3,ensureAlpha:i3,extractChannel:o3,joinChannel:q8,bandbool:J8}),q.bool=s3}});var c0=L((z9,l0)=>{var W8=function(q,J){let $;if(!Q.string(q))$=new Error("Missing output file path");else if(Q.string(this.options.input.file)&&a2.resolve(this.options.input.file)===a2.resolve(q))$=new Error("Cannot use same file for input and output");else if($8.test(a2.extname(q))&&!this.constructor.format.jp2k.output.file)$=g0();if($)if(Q.fn(J))J($);else return Promise.reject($);else{this.options.fileOut=q;const W=Error();return this._pipeline(J,W)}return this},Z8=function(q,J){if(Q.object(q))this._setBooleanOption("resolveWithObject",q.resolveWithObject);else if(this.options.resolveWithObject)this.options.resolveWithObject=!1;this.options.fileOut="";const $=Error();return this._pipeline(Q.fn(q)?q:J,$)},Q8=function(){return this.options.keepMetadata|=1,this},Y8=function(q){if(Q.object(q))for(let[J,$]of Object.entries(q))if(Q.object($))for(let[W,Z]of Object.entries($))if(Q.string(Z))this.options.withExif[`exif-${J.toLowerCase()}-${W}`]=Z;else throw Q.invalidParameterError(`${J}.${W}`,"string",Z);else throw Q.invalidParameterError(J,"object",$);else throw Q.invalidParameterError("exif","object",q);return this.options.withExifMerge=!1,this.keepExif()},K8=function(q){return this.withExif(q),this.options.withExifMerge=!0,this},U8=function(){return this.options.keepMetadata|=8,this},B8=function(q,J){if(Q.string(q))this.options.withIccProfile=q;else throw Q.invalidParameterError("icc","string",q);if(this.keepIccProfile(),Q.object(J)){if(Q.defined(J.attach))if(Q.bool(J.attach)){if(!J.attach)this.options.keepMetadata&=~8}else throw Q.invalidParameterError("attach","boolean",J.attach)}return this},G8=function(){return this.options.keepMetadata=31,this},H8=function(q){if(this.keepMetadata(),this.withIccProfile("srgb"),Q.object(q)){if(Q.defined(q.orientation))if(Q.integer(q.orientation)&&Q.inRange(q.orientation,1,8))this.options.withMetadataOrientation=q.orientation;else throw Q.invalidParameterError("orientation","integer between 1 and 8",q.orientation);if(Q.defined(q.density))if(Q.number(q.density)&&q.density>0)this.options.withMetadataDensity=q.density;else throw Q.invalidParameterError("density","positive number",q.density);if(Q.defined(q.icc))this.withIccProfile(q.icc);if(Q.defined(q.exif))this.withExifMerge(q.exif)}return this},I8=function(q,J){const $=h0.get((Q.object(q)&&Q.string(q.id)?q.id:q).toLowerCase());if(!$)throw Q.invalidParameterError("format",`one of: ${[...h0.keys()].join(", ")}`,q);return this[$](J)},F8=function(q){if(Q.object(q)){if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,1,100))this.options.jpegQuality=q.quality;else throw Q.invalidParameterError("quality","integer between 1 and 100",q.quality);if(Q.defined(q.progressive))this._setBooleanOption("jpegProgressive",q.progressive);if(Q.defined(q.chromaSubsampling))if(Q.string(q.chromaSubsampling)&&Q.inArray(q.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jpegChromaSubsampling=q.chromaSubsampling;else throw Q.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",q.chromaSubsampling);const J=Q.bool(q.optimizeCoding)?q.optimizeCoding:q.optimiseCoding;if(Q.defined(J))this._setBooleanOption("jpegOptimiseCoding",J);if(Q.defined(q.mozjpeg))if(Q.bool(q.mozjpeg)){if(q.mozjpeg)this.options.jpegTrellisQuantisation=!0,this.options.jpegOvershootDeringing=!0,this.options.jpegOptimiseScans=!0,this.options.jpegProgressive=!0,this.options.jpegQuantisationTable=3}else throw Q.invalidParameterError("mozjpeg","boolean",q.mozjpeg);const $=Q.bool(q.trellisQuantization)?q.trellisQuantization:q.trellisQuantisation;if(Q.defined($))this._setBooleanOption("jpegTrellisQuantisation",$);if(Q.defined(q.overshootDeringing))this._setBooleanOption("jpegOvershootDeringing",q.overshootDeringing);const W=Q.bool(q.optimizeScans)?q.optimizeScans:q.optimiseScans;if(Q.defined(W)){if(this._setBooleanOption("jpegOptimiseScans",W),W)this.options.jpegProgressive=!0}const Z=Q.number(q.quantizationTable)?q.quantizationTable:q.quantisationTable;if(Q.defined(Z))if(Q.integer(Z)&&Q.inRange(Z,0,8))this.options.jpegQuantisationTable=Z;else throw Q.invalidParameterError("quantisationTable","integer between 0 and 8",Z)}return this._updateFormatOut("jpeg",q)},N8=function(q){if(Q.object(q)){if(Q.defined(q.progressive))this._setBooleanOption("pngProgressive",q.progressive);if(Q.defined(q.compressionLevel))if(Q.integer(q.compressionLevel)&&Q.inRange(q.compressionLevel,0,9))this.options.pngCompressionLevel=q.compressionLevel;else throw Q.invalidParameterError("compressionLevel","integer between 0 and 9",q.compressionLevel);if(Q.defined(q.adaptiveFiltering))this._setBooleanOption("pngAdaptiveFiltering",q.adaptiveFiltering);const J=q.colours||q.colors;if(Q.defined(J))if(Q.integer(J)&&Q.inRange(J,2,256))this.options.pngBitdepth=m0(J);else throw Q.invalidParameterError("colours","integer between 2 and 256",J);if(Q.defined(q.palette))this._setBooleanOption("pngPalette",q.palette);else if([q.quality,q.effort,q.colours,q.colors,q.dither].some(Q.defined))this._setBooleanOption("pngPalette",!0);if(this.options.pngPalette){if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,0,100))this.options.pngQuality=q.quality;else throw Q.invalidParameterError("quality","integer between 0 and 100",q.quality);if(Q.defined(q.effort))if(Q.integer(q.effort)&&Q.inRange(q.effort,1,10))this.options.pngEffort=q.effort;else throw Q.invalidParameterError("effort","integer between 1 and 10",q.effort);if(Q.defined(q.dither))if(Q.number(q.dither)&&Q.inRange(q.dither,0,1))this.options.pngDither=q.dither;else throw Q.invalidParameterError("dither","number between 0.0 and 1.0",q.dither)}}return this._updateFormatOut("png",q)},X8=function(q){if(Q.object(q)){if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,1,100))this.options.webpQuality=q.quality;else throw Q.invalidParameterError("quality","integer between 1 and 100",q.quality);if(Q.defined(q.alphaQuality))if(Q.integer(q.alphaQuality)&&Q.inRange(q.alphaQuality,0,100))this.options.webpAlphaQuality=q.alphaQuality;else throw Q.invalidParameterError("alphaQuality","integer between 0 and 100",q.alphaQuality);if(Q.defined(q.lossless))this._setBooleanOption("webpLossless",q.lossless);if(Q.defined(q.nearLossless))this._setBooleanOption("webpNearLossless",q.nearLossless);if(Q.defined(q.smartSubsample))this._setBooleanOption("webpSmartSubsample",q.smartSubsample);if(Q.defined(q.preset))if(Q.string(q.preset)&&Q.inArray(q.preset,["default","photo","picture","drawing","icon","text"]))this.options.webpPreset=q.preset;else throw Q.invalidParameterError("preset","one of: default, photo, picture, drawing, icon, text",q.preset);if(Q.defined(q.effort))if(Q.integer(q.effort)&&Q.inRange(q.effort,0,6))this.options.webpEffort=q.effort;else throw Q.invalidParameterError("effort","integer between 0 and 6",q.effort);if(Q.defined(q.minSize))this._setBooleanOption("webpMinSize",q.minSize);if(Q.defined(q.mixed))this._setBooleanOption("webpMixed",q.mixed)}return u0(q,this.options),this._updateFormatOut("webp",q)},V8=function(q){if(Q.object(q)){if(Q.defined(q.reuse))this._setBooleanOption("gifReuse",q.reuse);if(Q.defined(q.progressive))this._setBooleanOption("gifProgressive",q.progressive);const J=q.colours||q.colors;if(Q.defined(J))if(Q.integer(J)&&Q.inRange(J,2,256))this.options.gifBitdepth=m0(J);else throw Q.invalidParameterError("colours","integer between 2 and 256",J);if(Q.defined(q.effort))if(Q.number(q.effort)&&Q.inRange(q.effort,1,10))this.options.gifEffort=q.effort;else throw Q.invalidParameterError("effort","integer between 1 and 10",q.effort);if(Q.defined(q.dither))if(Q.number(q.dither)&&Q.inRange(q.dither,0,1))this.options.gifDither=q.dither;else throw Q.invalidParameterError("dither","number between 0.0 and 1.0",q.dither);if(Q.defined(q.interFrameMaxError))if(Q.number(q.interFrameMaxError)&&Q.inRange(q.interFrameMaxError,0,32))this.options.gifInterFrameMaxError=q.interFrameMaxError;else throw Q.invalidParameterError("interFrameMaxError","number between 0.0 and 32.0",q.interFrameMaxError);if(Q.defined(q.interPaletteMaxError))if(Q.number(q.interPaletteMaxError)&&Q.inRange(q.interPaletteMaxError,0,256))this.options.gifInterPaletteMaxError=q.interPaletteMaxError;else throw Q.invalidParameterError("interPaletteMaxError","number between 0.0 and 256.0",q.interPaletteMaxError)}return u0(q,this.options),this._updateFormatOut("gif",q)},A8=function(q){if(!this.constructor.format.jp2k.output.buffer)throw g0();if(Q.object(q)){if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,1,100))this.options.jp2Quality=q.quality;else throw Q.invalidParameterError("quality","integer between 1 and 100",q.quality);if(Q.defined(q.lossless))if(Q.bool(q.lossless))this.options.jp2Lossless=q.lossless;else throw Q.invalidParameterError("lossless","boolean",q.lossless);if(Q.defined(q.tileWidth))if(Q.integer(q.tileWidth)&&Q.inRange(q.tileWidth,1,32768))this.options.jp2TileWidth=q.tileWidth;else throw Q.invalidParameterError("tileWidth","integer between 1 and 32768",q.tileWidth);if(Q.defined(q.tileHeight))if(Q.integer(q.tileHeight)&&Q.inRange(q.tileHeight,1,32768))this.options.jp2TileHeight=q.tileHeight;else throw Q.invalidParameterError("tileHeight","integer between 1 and 32768",q.tileHeight);if(Q.defined(q.chromaSubsampling))if(Q.string(q.chromaSubsampling)&&Q.inArray(q.chromaSubsampling,["4:2:0","4:4:4"]))this.options.jp2ChromaSubsampling=q.chromaSubsampling;else throw Q.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",q.chromaSubsampling)}return this._updateFormatOut("jp2",q)},u0=function(q,J){if(Q.object(q)&&Q.defined(q.loop))if(Q.integer(q.loop)&&Q.inRange(q.loop,0,65535))J.loop=q.loop;else throw Q.invalidParameterError("loop","integer between 0 and 65535",q.loop);if(Q.object(q)&&Q.defined(q.delay))if(Q.integer(q.delay)&&Q.inRange(q.delay,0,65535))J.delay=[q.delay];else if(Array.isArray(q.delay)&&q.delay.every(Q.integer)&&q.delay.every(($)=>Q.inRange($,0,65535)))J.delay=q.delay;else throw Q.invalidParameterError("delay","integer or an array of integers between 0 and 65535",q.delay)},P8=function(q){if(Q.object(q)){if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,1,100))this.options.tiffQuality=q.quality;else throw Q.invalidParameterError("quality","integer between 1 and 100",q.quality);if(Q.defined(q.bitdepth))if(Q.integer(q.bitdepth)&&Q.inArray(q.bitdepth,[1,2,4,8]))this.options.tiffBitdepth=q.bitdepth;else throw Q.invalidParameterError("bitdepth","1, 2, 4 or 8",q.bitdepth);if(Q.defined(q.tile))this._setBooleanOption("tiffTile",q.tile);if(Q.defined(q.tileWidth))if(Q.integer(q.tileWidth)&&q.tileWidth>0)this.options.tiffTileWidth=q.tileWidth;else throw Q.invalidParameterError("tileWidth","integer greater than zero",q.tileWidth);if(Q.defined(q.tileHeight))if(Q.integer(q.tileHeight)&&q.tileHeight>0)this.options.tiffTileHeight=q.tileHeight;else throw Q.invalidParameterError("tileHeight","integer greater than zero",q.tileHeight);if(Q.defined(q.miniswhite))this._setBooleanOption("tiffMiniswhite",q.miniswhite);if(Q.defined(q.pyramid))this._setBooleanOption("tiffPyramid",q.pyramid);if(Q.defined(q.xres))if(Q.number(q.xres)&&q.xres>0)this.options.tiffXres=q.xres;else throw Q.invalidParameterError("xres","number greater than zero",q.xres);if(Q.defined(q.yres))if(Q.number(q.yres)&&q.yres>0)this.options.tiffYres=q.yres;else throw Q.invalidParameterError("yres","number greater than zero",q.yres);if(Q.defined(q.compression))if(Q.string(q.compression)&&Q.inArray(q.compression,["none","jpeg","deflate","packbits","ccittfax4","lzw","webp","zstd","jp2k"]))this.options.tiffCompression=q.compression;else throw Q.invalidParameterError("compression","one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k",q.compression);if(Q.defined(q.predictor))if(Q.string(q.predictor)&&Q.inArray(q.predictor,["none","horizontal","float"]))this.options.tiffPredictor=q.predictor;else throw Q.invalidParameterError("predictor","one of: none, horizontal, float",q.predictor);if(Q.defined(q.resolutionUnit))if(Q.string(q.resolutionUnit)&&Q.inArray(q.resolutionUnit,["inch","cm"]))this.options.tiffResolutionUnit=q.resolutionUnit;else throw Q.invalidParameterError("resolutionUnit","one of: inch, cm",q.resolutionUnit)}return this._updateFormatOut("tiff",q)},L8=function(q){return this.heif({...q,compression:"av1"})},_8=function(q){if(Q.object(q)){if(Q.string(q.compression)&&Q.inArray(q.compression,["av1","hevc"]))this.options.heifCompression=q.compression;else throw Q.invalidParameterError("compression","one of: av1, hevc",q.compression);if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,1,100))this.options.heifQuality=q.quality;else throw Q.invalidParameterError("quality","integer between 1 and 100",q.quality);if(Q.defined(q.lossless))if(Q.bool(q.lossless))this.options.heifLossless=q.lossless;else throw Q.invalidParameterError("lossless","boolean",q.lossless);if(Q.defined(q.effort))if(Q.integer(q.effort)&&Q.inRange(q.effort,0,9))this.options.heifEffort=q.effort;else throw Q.invalidParameterError("effort","integer between 0 and 9",q.effort);if(Q.defined(q.chromaSubsampling))if(Q.string(q.chromaSubsampling)&&Q.inArray(q.chromaSubsampling,["4:2:0","4:4:4"]))this.options.heifChromaSubsampling=q.chromaSubsampling;else throw Q.invalidParameterError("chromaSubsampling","one of: 4:2:0, 4:4:4",q.chromaSubsampling);if(Q.defined(q.bitdepth))if(Q.integer(q.bitdepth)&&Q.inArray(q.bitdepth,[8,10,12])){if(q.bitdepth!==8&&this.constructor.versions.heif)throw Q.invalidParameterError("bitdepth when using prebuilt binaries",8,q.bitdepth);this.options.heifBitdepth=q.bitdepth}else throw Q.invalidParameterError("bitdepth","8, 10 or 12",q.bitdepth)}else throw Q.invalidParameterError("options","Object",q);return this._updateFormatOut("heif",q)},R8=function(q){if(Q.object(q)){if(Q.defined(q.quality))if(Q.integer(q.quality)&&Q.inRange(q.quality,1,100))this.options.jxlDistance=q.quality>=30?0.1+(100-q.quality)*0.09:0.017666666666666667*q.quality*q.quality-1.15*q.quality+25;else throw Q.invalidParameterError("quality","integer between 1 and 100",q.quality);else if(Q.defined(q.distance))if(Q.number(q.distance)&&Q.inRange(q.distance,0,15))this.options.jxlDistance=q.distance;else throw Q.invalidParameterError("distance","number between 0.0 and 15.0",q.distance);if(Q.defined(q.decodingTier))if(Q.integer(q.decodingTier)&&Q.inRange(q.decodingTier,0,4))this.options.jxlDecodingTier=q.decodingTier;else throw Q.invalidParameterError("decodingTier","integer between 0 and 4",q.decodingTier);if(Q.defined(q.lossless))if(Q.bool(q.lossless))this.options.jxlLossless=q.lossless;else throw Q.invalidParameterError("lossless","boolean",q.lossless);if(Q.defined(q.effort))if(Q.integer(q.effort)&&Q.inRange(q.effort,3,9))this.options.jxlEffort=q.effort;else throw Q.invalidParameterError("effort","integer between 3 and 9",q.effort)}return this._updateFormatOut("jxl",q)},j8=function(q){if(Q.object(q)){if(Q.defined(q.depth))if(Q.string(q.depth)&&Q.inArray(q.depth,["char","uchar","short","ushort","int","uint","float","complex","double","dpcomplex"]))this.options.rawDepth=q.depth;else throw Q.invalidParameterError("depth","one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex",q.depth)}return this._updateFormatOut("raw")},z8=function(q){if(Q.object(q)){if(Q.defined(q.size))if(Q.integer(q.size)&&Q.inRange(q.size,1,8192))this.options.tileSize=q.size;else throw Q.invalidParameterError("size","integer between 1 and 8192",q.size);if(Q.defined(q.overlap))if(Q.integer(q.overlap)&&Q.inRange(q.overlap,0,8192)){if(q.overlap>this.options.tileSize)throw Q.invalidParameterError("overlap",`<= size (${this.options.tileSize})`,q.overlap);this.options.tileOverlap=q.overlap}else throw Q.invalidParameterError("overlap","integer between 0 and 8192",q.overlap);if(Q.defined(q.container))if(Q.string(q.container)&&Q.inArray(q.container,["fs","zip"]))this.options.tileContainer=q.container;else throw Q.invalidParameterError("container","one of: fs, zip",q.container);if(Q.defined(q.layout))if(Q.string(q.layout)&&Q.inArray(q.layout,["dz","google","iiif","iiif3","zoomify"]))this.options.tileLayout=q.layout;else throw Q.invalidParameterError("layout","one of: dz, google, iiif, iiif3, zoomify",q.layout);if(Q.defined(q.angle))if(Q.integer(q.angle)&&!(q.angle%90))this.options.tileAngle=q.angle;else throw Q.invalidParameterError("angle","positive/negative multiple of 90",q.angle);if(this._setBackgroundColourOption("tileBackground",q.background),Q.defined(q.depth))if(Q.string(q.depth)&&Q.inArray(q.depth,["onepixel","onetile","one"]))this.options.tileDepth=q.depth;else throw Q.invalidParameterError("depth","one of: onepixel, onetile, one",q.depth);if(Q.defined(q.skipBlanks))if(Q.integer(q.skipBlanks)&&Q.inRange(q.skipBlanks,-1,65535))this.options.tileSkipBlanks=q.skipBlanks;else throw Q.invalidParameterError("skipBlanks","integer between -1 and 255/65535",q.skipBlanks);else if(Q.defined(q.layout)&&q.layout==="google")this.options.tileSkipBlanks=5;const J=Q.bool(q.center)?q.center:q.centre;if(Q.defined(J))this._setBooleanOption("tileCentre",J);if(Q.defined(q.id))if(Q.string(q.id))this.options.tileId=q.id;else throw Q.invalidParameterError("id","string",q.id);if(Q.defined(q.basename))if(Q.string(q.basename))this.options.tileBasename=q.basename;else throw Q.invalidParameterError("basename","string",q.basename)}if(Q.inArray(this.options.formatOut,["jpeg","png","webp"]))this.options.tileFormat=this.options.formatOut;else if(this.options.formatOut!=="input")throw Q.invalidParameterError("format","one of: jpeg, png, webp",this.options.formatOut);return this._updateFormatOut("dz")},D8=function(q){if(!Q.plainObject(q))throw Q.invalidParameterError("options","object",q);if(Q.integer(q.seconds)&&Q.inRange(q.seconds,0,3600))this.options.timeoutSeconds=q.seconds;else throw Q.invalidParameterError("seconds","integer between 0 and 3600",q.seconds);return this},E8=function(q,J){if(!(Q.object(J)&&J.force===!1))this.options.formatOut=q;return this},T8=function(q,J){if(Q.bool(J))this.options[q]=J;else throw Q.invalidParameterError(q,"boolean",J)},y8=function(){if(!this.options.streamOut){this.options.streamOut=!0;const q=Error();this._pipeline(void 0,q)}},w8=function(q,J){if(typeof q==="function"){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),s.pipeline(this.options,($,W,Z)=>{if($)q(Q.nativeError($,J));else q(null,W,Z)})});else s.pipeline(this.options,($,W,Z)=>{if($)q(Q.nativeError($,J));else q(null,W,Z)});return this}else if(this.options.streamOut){if(this._isStreamInput()){if(this.once("finish",()=>{this._flattenBufferIn(),s.pipeline(this.options,($,W,Z)=>{if($)this.emit("error",Q.nativeError($,J));else this.emit("info",Z),this.push(W);this.push(null),this.on("end",()=>this.emit("close"))})}),this.streamInFinished)this.emit("finish")}else s.pipeline(this.options,($,W,Z)=>{if($)this.emit("error",Q.nativeError($,J));else this.emit("info",Z),this.push(W);this.push(null),this.on("end",()=>this.emit("close"))});return this}else if(this._isStreamInput())return new Promise(($,W)=>{this.once("finish",()=>{this._flattenBufferIn(),s.pipeline(this.options,(Z,Y,K)=>{if(Z)W(Q.nativeError(Z,J));else if(this.options.resolveWithObject)$({data:Y,info:K});else $(Y)})})});else return new Promise(($,W)=>{s.pipeline(this.options,(Z,Y,K)=>{if(Z)W(Q.nativeError(Z,J));else if(this.options.resolveWithObject)$({data:Y,info:K});else $(Y)})})},a2=import.meta.require("path"),Q=d(),s=J2(),h0=new Map([["heic","heif"],["heif","heif"],["avif","avif"],["jpeg","jpeg"],["jpg","jpeg"],["jpe","jpeg"],["tile","tile"],["dz","tile"],["png","png"],["raw","raw"],["tiff","tiff"],["tif","tiff"],["webp","webp"],["gif","gif"],["jp2","jp2"],["jpx","jp2"],["j2k","jp2"],["j2c","jp2"],["jxl","jxl"]]),$8=/\.(jp[2x]|j2[kc])$/i,g0=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),m0=(q)=>1<<31-Math.clz32(Math.ceil(Math.log2(q)));l0.exports=function(q){Object.assign(q.prototype,{toFile:W8,toBuffer:Z8,keepExif:Q8,withExif:Y8,withExifMerge:K8,keepIccProfile:U8,withIccProfile:B8,keepMetadata:G8,withMetadata:H8,toFormat:I8,jpeg:F8,jp2:A8,png:N8,webp:X8,tiff:P8,avif:L8,heif:_8,jxl:R8,gif:V8,raw:j8,tile:z8,timeout:D8,_updateFormatOut:E8,_setBooleanOption:T8,_read:y8,_pipeline:w8})}});var p0=L((D9,e0)=>{var r0=function(q){if(M.bool(q))if(q)return w.cache(50,20,100);else return w.cache(0,0,0);else if(M.object(q))return w.cache(q.memory,q.files,q.items);else return w.cache()},M8=function(q){return w.concurrency(M.integer(q)?q:null)},f8=function(){return w.counters()},d8=function(q){return w.simd(M.bool(q)?q:null)},v8=function(q){if(M.object(q))if(Array.isArray(q.operation)&&q.operation.every(M.string))w.block(q.operation,!0);else throw M.invalidParameterError("operation","Array<string>",q.operation);else throw M.invalidParameterError("options","object",q)},O8=function(q){if(M.object(q))if(Array.isArray(q.operation)&&q.operation.every(M.string))w.block(q.operation,!1);else throw M.invalidParameterError("operation","Array<string>",q.operation);else throw M.invalidParameterError("options","object",q)},C8=import.meta.require("events"),z2=import.meta.require("detect-libc"),M=d(),{runtimePlatformArch:S8}=f2(),w=J2(),a0=S8(),r2=w.libvipsVersion(),Y2=w.format();Y2.heif.output.alias=["avif","heic"];Y2.jpeg.output.alias=["jpe","jpg"];Y2.tiff.output.alias=["tif"];Y2.jp2k.output.alias=["j2c","j2k","jp2","jpx"];var k8={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},Q2={vips:r2.semver};if(!r2.isGlobal)if(!r2.isWasm)try{Q2=import.meta.require(`@img/sharp-${a0}/versions`)}catch(q){try{Q2=import.meta.require(`@img/sharp-libvips-${a0}/versions`)}catch(J){}}else try{Q2=(()=>{throw new Error(`Cannot require module "@img/sharp-wasm32/versions"`);})()}catch(q){}Q2.sharp=k2().version;r0(!0);if(z2.familySync()===z2.GLIBC&&!w._isUsingJemalloc())w.concurrency(1);else if(z2.familySync()===z2.MUSL&&w.concurrency()===1024)w.concurrency(import.meta.require("os").availableParallelism());var x8=new C8.EventEmitter;e0.exports=function(q){q.cache=r0,q.concurrency=M8,q.counters=f8,q.simd=d8,q.format=Y2,q.interpolators=k8,q.versions=Q2,q.queue=x8,q.block=v8,q.unblock=O8}});var b8=L((E9,n0)=>{var h=$0();z0()(h);C0()(h);k0()(h);x0()(h);v0()(h);b0()(h);c0()(h);p0()(h);n0.exports=h});
|
|
2
|
+
export{b8 as Aa};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{y as i} from"./chunk-7ce930fe69575c87.js";import"./chunk-d7c78cd1ab7dc7ed.js";import{$ as ts,F as Fe,G as _e,J as ee,K as Ae,O as se,P as te,R as re,S as ae,U as ie,V as le,aa as k,fa as z,ga as Ve,ha as h,oa as He,pa as u,qa as Ne,ra as pe,sa as ye,ta as $e,ua as Pe,wa as c,xa as y,za as fe} from"./chunk-c7b024c7bd4cffc9.js";import{Ba as Le,Ca as Ce,Da as Me,Ea as We,Ia as B,Ja as _,Ka as $,La as Ke,Ma as V,Na as N,Oa as f,Pa as Qe,Qa as me,Ra as he,Sa as ue,Ta as we,Ua as Xe,Va as Ye,Xa as rs,Ya as as,Za as Ze,_a as be,ab as xe,bb as je,cb as ve,db as Te,eb as x,fb as ke,gb as Re,hb as qe,ib as Ee,jb as Je,kb as Ue} from"./chunk-e0a028ef931a3eb1.js";import"./chunk-c7e2acfd5087fb30.js";import{mb as l,nb as ne} from"./chunk-ed589d4e4c575de7.js";import"./chunk-2db6c9bb69bb27aa.js";import"./chunk-82f72dfc6e27be04.js";var p=i(B(),1);var P=i(x(),1);var cs=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:e.region},propertiesExtractor:(s,t)=>({signingProperties:{config:s,context:t}})}},b=function(e){return{schemeId:"smithy.api#noAuth"}},J=async(e,s,t)=>{return{operation:_(s).operation,region:await $(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},U=(e)=>{const s=[];switch(e.operation){case"GetRoleCredentials":{s.push(b(e));break}case"ListAccountRoles":{s.push(b(e));break}case"ListAccounts":{s.push(b(e));break}case"Logout":{s.push(b(e));break}default:s.push(cs(e))}return s},I=(e)=>{return{...P.resolveAwsSdkSigV4Config(e)}};var L=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},C={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var M={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.629.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}};var Se=i(x(),1);var de=i(x(),1),oe=i(B(),1);var W={["required"]:!1,type:"String"},A={["required"]:!0,default:!1,type:"Boolean"},K={["ref"]:"Endpoint"},T={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},d={},Q={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},O={["ref"]:"PartitionResult"},X={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[O,"supportsDualStack"]}]},Y=[T],Z=[H],j=[{["ref"]:"Region"}],ls={version:"1.0",parameters:{Region:W,UseDualStack:A,UseFIPS:A,Endpoint:W},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K]}],rules:[{conditions:Y,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:Z,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K,properties:d,headers:d},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:j}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:j,assign:"PartitionResult"}],rules:[{conditions:[T,H],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Q]},X],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Y,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Q,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[O,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:d,headers:d},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:Z,rules:[{conditions:[X],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:d,headers:d},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},G=ls;var g=(e,s={})=>{return N(G,{endpointParams:e,logger:s.logger})};V.aws=f;var ce=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??se,base64Encoder:e?.base64Encoder??ae,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??g,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??U,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new de.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new oe.NoAuthSigner}],logger:e?.logger??new ee,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??ne,utf8Decoder:e?.utf8Decoder??te,utf8Encoder:e?.utf8Encoder??re}};var ze=(e)=>{ye(process.version);const s=Ee(e),t=()=>s().then(pe),r=ce(e);return Se.emitWarningIfUnsupportedVersion(process.version),{...r,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??qe,defaultUserAgentProvider:e?.defaultUserAgentProvider??ke({serviceId:r.serviceId,clientVersion:M.version}),maxAttempts:e?.maxAttempts??l(xe),region:e?.region??l(ue,we),requestHandler:ie.create(e?.requestHandler??t),retryMode:e?.retryMode??l({...ve,default:async()=>(await t()).retryMode||be}),sha256:e?.sha256??Re.bind(null,"sha256"),streamCollector:e?.streamCollector??le,useDualstackEndpoint:e?.useDualstackEndpoint??l(me),useFipsEndpoint:e?.useFipsEndpoint??l(he)}};var De=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:t,credentials:r}=e;return{setHttpAuthScheme(a){const n=s.findIndex((D)=>D.schemeId===a.schemeId);if(n===-1)s.push(a);else s.splice(n,1,a)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(a){t=a},httpAuthSchemeProvider(){return t},setCredentials(a){r=a},credentials(){return r}}},Be=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var v=(e)=>e,Ie=(e,s)=>{const t={...v(Je(e)),...v($e(e)),...v(Fe(e)),...v(De(e))};return s.forEach((r)=>r.configure(t)),{...e,...Ue(t),...Pe(t),..._e(t),...Be(t)}};class ps extends Ae{constructor(...[e]){const s=ze(e||{}),t=L(s),r=Ke(t),a=je(r),n=Xe(a),D=Le(n),ns=Ze(D),ds=I(ns),F=Ie(ds,e?.extensions||[]);super(F);this.config=F,this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Te(this.config)),this.middlewareStack.use(Ye(this.config)),this.middlewareStack.use(Ce(this.config)),this.middlewareStack.use(Me(this.config)),this.middlewareStack.use(We(this.config)),this.middlewareStack.use(p.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:J,identityProviderConfigProvider:async(os)=>new p.DefaultIdentityProviderConfig({"aws.auth#sigv4":os.credentials})})),this.middlewareStack.use(p.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class o extends He{constructor(e){super(e);Object.setPrototypeOf(this,o.prototype)}}class R extends o{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,R.prototype)}}class q extends o{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,q.prototype)}}class E extends o{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,E.prototype)}}class S extends o{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,S.prototype)}}var Oe=(e)=>({...e,...e.accessToken&&{accessToken:k}}),ys=(e)=>({...e,...e.secretAccessKey&&{secretAccessKey:k},...e.sessionToken&&{sessionToken:k}}),Ge=(e)=>({...e,...e.roleCredentials&&{roleCredentials:ys(e.roleCredentials)}});var m=i(x(),1),ge=i(B(),1);var es=async(e,s)=>{const t=ge.requestBuilder(e,s),r=c({},vs,{[zs]:e[Rs]});t.bp("/federation/credentials");const a=c({[Ss]:[,z(e[Es],"roleName")],[qs]:[,z(e[ks],"accountId")]});let n;return t.m("GET").h(r).q(a).b(n),t.build()};var ss=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return ms(e,s);const t=c({$metadata:w(e)}),r=z(Ve(await m.parseJsonBody(e.body,s)),"body"),a=y(r,{roleCredentials:fe});return Object.assign(t,a),t};var ms=async(e,s)=>{const t={...e,body:await m.parseJsonErrorBody(e.body,s)},r=m.loadRestJsonErrorCode(e,t.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await us(t,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await ws(t,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await bs(t,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await xs(t,s);default:const a=t.body;return hs({output:e,parsedBody:a,errorCode:r})}},hs=Ne(o),us=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new R({$metadata:w(e),...t});return u(n,e.body)},ws=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new q({$metadata:w(e),...t});return u(n,e.body)},bs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new E({$metadata:w(e),...t});return u(n,e.body)},xs=async(e,s)=>{const t=c({}),r=e.body,a=y(r,{message:h});Object.assign(t,a);const n=new S({$metadata:w(e),...t});return u(n,e.body)},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"]});var vs=(e)=>e!==void 0&&e!==null&&e!==""&&(!Object.getOwnPropertyNames(e).includes("length")||e.length!=0)&&(!Object.getOwnPropertyNames(e).includes("size")||e.size!=0),ks="accountId",Rs="accessToken",qs="account_id";var Es="roleName",Ss="role_name",zs="x-amz-sso_bearer_token";class Ds extends ts.classBuilder().ep({...C}).m(function(e,s,t,r){return[rs(t,this.serialize,this.deserialize),as(t,e.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(Oe,Ge).ser(es).de(ss).build(){}export{ps as SSOClient,Ds as GetRoleCredentialsCommand};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{pb as i,qb as f} from"./chunk-2db6c9bb69bb27aa.js";import{Bb as C,Cb as N,wb as y,xb as K,yb as E} from"./chunk-82f72dfc6e27be04.js";var F=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var L=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var I={},M=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-
|
|
2
|
+
import"./chunk-7ce930fe69575c87.js";import"./chunk-c7e2acfd5087fb30.js";import{pb as i,qb as f} from"./chunk-2db6c9bb69bb27aa.js";import{Bb as C,Cb as N,wb as y,xb as K,yb as E} from"./chunk-82f72dfc6e27be04.js";var F=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var L=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var I={},M=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-4b4ea80149bba4e6.js");if(I[e])return I[e];const s=new r({region:e});return I[e]=s,s};var H=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-4b4ea80149bba4e6.js");return(await M(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var v=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new f(`Token is expired. ${_}`,!1)};var m=(e,r,s=!1)=>{if(typeof r==="undefined")throw new f(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as W} from"fs";var{writeFile:j}=W,b=(e,r)=>{const s=K(e),t=JSON.stringify(r,null,2);return j(s,t)};var G=new Date(0),U=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await N(e),s=y(e),t=r[s];if(!t)throw new f(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new f(`Profile '${s}' is missing required property 'sso_session'.`);const a=t.sso_session,c=(await C(e))[a];if(!c)throw new f(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!c[n])throw new f(`Sso session '${a}' is missing required property '${n}'.`,!1);const{sso_start_url:p,sso_region:S}=c;let o;try{o=await E(a)}catch(n){throw new f(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}m("accessToken",o.accessToken),m("expiresAt",o.expiresAt);const{accessToken:x,expiresAt:u}=o,l={token:x,expiration:new Date(u)};if(l.expiration.getTime()-Date.now()>L)return l;if(Date.now()-G.getTime()<30000)return v(l),l;m("clientId",o.clientId,!0),m("clientSecret",o.clientSecret,!0),m("refreshToken",o.refreshToken,!0);try{G.setTime(Date.now());const n=await H(o,S);m("accessToken",n.accessToken),m("expiresIn",n.expiresIn);const h=new Date(Date.now()+n.expiresIn*1000);try{await b(a,{...o,accessToken:n.accessToken,expiresAt:h.toISOString(),refreshToken:n.refreshToken})}catch(O){}return{token:n.accessToken,expiration:h}}catch(n){return v(l),l}};var T=!1,P=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:d,clientConfig:c,profile:p,logger:S})=>{let o;const x="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const g=await U({profile:p})();o={accessToken:g.token,expiresAt:new Date(g.expiration).toISOString()}}catch(g){throw new i(g.message,{tryNextLink:T,logger:S})}else try{o=await E(e)}catch(g){throw new i("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new i("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S});const{accessToken:u}=o,{SSOClient:l,GetRoleCredentialsCommand:n}=await import("./chunk-bb72c8820407f3a6.js"),h=d||new l(Object.assign({},c??{},{region:c?.region??t}));let O;try{O=await h.send(new n({accountId:s,roleName:a,accessToken:u}))}catch(g){throw new i(g,{tryNextLink:T,logger:S})}const{roleCredentials:{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:D,credentialScope:A,accountId:$}={}}=O;if(!w||!k||!R||!D)throw new i("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:S});return{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:new Date(D),...A&&{credentialScope:A},...$&&{accountId:$}}};var q=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:a,sso_role_name:d}=e;if(!s||!t||!a||!d)throw new i('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoSession:d}=e,{ssoClient:c}=e,p=y(e);if(!r&&!s&&!t&&!a&&!d){const o=(await N(e))[p];if(!o)throw new i(`Profile ${p} was not found.`,{logger:e.logger});if(!F(o))throw new i(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const w=(await C(e))[o.sso_session],k=` configurations in profile ${p} and sso-session ${o.sso_session}`;if(t&&t!==w.sso_region)throw new i("Conflicting SSO region"+k,{tryNextLink:!1,logger:e.logger});if(r&&r!==w.sso_start_url)throw new i("Conflicting SSO start_url"+k,{tryNextLink:!1,logger:e.logger});o.sso_region=w.sso_region,o.sso_start_url=w.sso_start_url}const{sso_start_url:x,sso_account_id:u,sso_region:l,sso_role_name:n,sso_session:h}=q(o,e.logger);return P({ssoStartUrl:x,ssoSession:h,ssoAccountId:u,ssoRegion:l,ssoRoleName:n,ssoClient:c,clientConfig:e.clientConfig,profile:p})}else if(!r||!s||!t||!a)throw new i('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:d,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:c,clientConfig:e.clientConfig,profile:p})};export{q as validateSsoProfile,F as isSsoProfile,Ee as fromSSO};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{y as O,z as wt} from"./chunk-7ce930fe69575c87.js";import{lb as j} from"./chunk-c7e2acfd5087fb30.js";var Me=wt((ho,Ue)=>{var Ie=function(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2){const n=e.slice(r,r+2).toLowerCase();if(n in G)t[r/2]=G[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t},ke=function(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Ae[e[r]];return t},H=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,bt=Object.getOwnPropertyNames,Et=Object.prototype.hasOwnProperty,Ce=(e,t)=>H(e,"name",{value:t,configurable:!0}),Tt=(e,t)=>{for(var r in t)H(e,r,{get:t[r],enumerable:!0})},St=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of bt(t))if(!Et.call(e,o)&&o!==r)H(e,o,{get:()=>t[o],enumerable:!(n=xt(t,o))||n.enumerable})}return e},Ct=(e)=>St(H({},"__esModule",{value:!0}),e),$e={};Tt($e,{fromHex:()=>Ie,toHex:()=>ke});Ue.exports=Ct($e);var Ae={},G={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Ae[e]=t,G[t]=e}Ce(Ie,"fromHex");Ce(ke,"toHex")});var C=(e,t)=>{const r=[];if(e)r.push(e);if(t)for(let n of t)r.push(n);return r},S=(e,t)=>{return`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`},A=()=>{let e=[],t=[],r=!1;const n=new Set,o=(a)=>a.sort((f,h)=>se[h.step]-se[f.step]||ie[h.priority||"normal"]-ie[f.priority||"normal"]),s=(a)=>{let f=!1;const h=(g)=>{const y=C(g.name,g.aliases);if(y.includes(a)){f=!0;for(let p of y)n.delete(p);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},c=(a)=>{let f=!1;const h=(g)=>{if(g.middleware===a){f=!0;for(let y of C(g.name,g.aliases))n.delete(y);return!1}return!0};return e=e.filter(h),t=t.filter(h),f},i=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(w.identifyOnResolve()),a},d=(a)=>{const f=[];return a.before.forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f.push(a),a.after.reverse().forEach((h)=>{if(h.before.length===0&&h.after.length===0)f.push(h);else f.push(...d(h))}),f},l=(a=!1)=>{const f=[],h=[],g={};return e.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;f.push(u)}),t.forEach((p)=>{const u={...p,before:[],after:[]};for(let m of C(u.name,u.aliases))g[m]=u;h.push(u)}),h.forEach((p)=>{if(p.toMiddleware){const u=g[p.toMiddleware];if(u===void 0){if(a)return;throw new Error(`${p.toMiddleware} is not found when adding `+`${S(p.name,p.aliases)} `+`middleware ${p.relation} ${p.toMiddleware}`)}if(p.relation==="after")u.after.push(p);if(p.relation==="before")u.before.push(p)}}),o(f).map(d).reduce((p,u)=>{return p.push(...u),p},[])},w={add:(a,f={})=>{const{name:h,override:g,aliases:y}=f,p={step:"initialize",priority:"normal",middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=e.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=e[E];if(x.step!==p.step||p.priority!==x.priority)throw new Error(`"${S(x.name,x.aliases)}" middleware with `+`${x.priority} priority in ${x.step} step cannot `+`be overridden by "${S(h,y)}" middleware with `+`${p.priority} priority in ${p.step} step.`);e.splice(E,1)}}for(let m of u)n.add(m)}e.push(p)},addRelativeTo:(a,f)=>{const{name:h,override:g,aliases:y}=f,p={middleware:a,...f},u=C(h,y);if(u.length>0){if(u.some((m)=>n.has(m))){if(!g)throw new Error(`Duplicate middleware name '${S(h,y)}'`);for(let m of u){const E=t.findIndex((N)=>N.name===m||N.aliases?.some((W)=>W===m));if(E===-1)continue;const x=t[E];if(x.toMiddleware!==p.toMiddleware||x.relation!==p.relation)throw new Error(`"${S(x.name,x.aliases)}" middleware `+`${x.relation} "${x.toMiddleware}" middleware cannot be overridden `+`by "${S(h,y)}" middleware ${p.relation} `+`"${p.toMiddleware}" middleware.`);t.splice(E,1)}}for(let m of u)n.add(m)}t.push(p)},clone:()=>i(A()),use:(a)=>{a.applyToStack(w)},remove:(a)=>{if(typeof a==="string")return s(a);else return c(a)},removeByTag:(a)=>{let f=!1;const h=(g)=>{const{tags:y,name:p,aliases:u}=g;if(y&&y.includes(a)){const m=C(p,u);for(let E of m)n.delete(E);return f=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),f},concat:(a)=>{const f=i(A());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:i,identify:()=>{return l(!0).map((a)=>{const f=a.step??a.relation+" "+a.toMiddleware;return S(a.name,a.aliases)+" - "+f})},identifyOnResolve(a){if(typeof a==="boolean")r=a;return r},resolve:(a,f)=>{for(let h of l().map((g)=>g.middleware).reverse())a=h(a,f);if(r)console.log(w.identify());return a}};return w},se={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ie={high:3,normal:2,low:1};class tt{constructor(e){this.middlewareStack=A(),this.config=e}send(e,t,r){const n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)s(e).then((c)=>o(null,c.output),(c)=>o(c)).catch(()=>{});else return s(e).then((c)=>c.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var ce=O(j(),1);class ae{constructor(){this.middlewareStack=A()}static classBuilder(){return new fe}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:d,additionalContext:l,CommandCtor:w}){for(let y of n.bind(this)(w,e,t,r))this.middlewareStack.use(y);const a=e.concat(this.middlewareStack),{logger:f}=t,h={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[ce.SMITHY_CONTEXT_KEY]:{commandInstance:this,...d},...l},{requestHandler:g}=t;return a.resolve((y)=>g.handle(y.request,r||{}),h)}}class fe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(e)=>e,this._outputFilterSensitiveLog=(e)=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=(r)=>r,t=(r)=>r){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends ae{static getEndpointParameterInstructions(){return e._ep}constructor(...[r]){super();this.serialize=e._serializer,this.deserialize=e._deserializer,this.input=r??{},e._init(this)}resolveMiddleware(r,n,o){return this.resolveMiddlewareWithContext(r,n,o,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}var ir=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},cr=(e)=>{return{httpHandler:e.httpHandler()}};var rt=O(j(),1);var nt=function(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})};class _{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 clone(e){const t=new _({...e,headers:{...e.headers}});if(t.query)t.query=nt(t.query);return t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query==="object"&&typeof t.headers==="object"}clone(){return _.clone(this)}}class R{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;const t=e;return typeof t.statusCode==="number"&&typeof t.headers==="object"}}var P=(e)=>encodeURIComponent(e).replace(/[!'()*]/g,ot),ot=(e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function D(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=P(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${P(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${P(n)}`;t.push(o)}}return t.join("&")}import{Agent as me,request as ct} from"http";import{Agent as ye,request as at} from"https";var ue=["ECONNRESET","EPIPE","ETIMEDOUT"];var Y=(e)=>{const t={};for(let r of Object.keys(e)){const n=e[r];t[r]=Array.isArray(n)?n.join(","):n}return t};var de=(e,t,r=0)=>{if(!r)return;const n=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r);e.on("socket",(o)=>{if(o.connecting)o.on("connect",()=>{clearTimeout(n)});else clearTimeout(n)})};var le=(e,{keepAlive:t,keepAliveMsecs:r})=>{if(t!==!0)return;e.on("socket",(n)=>{n.setKeepAlive(t,r||0)})};var he=(e,t,r=0)=>{e.setTimeout(r,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};import{Readable as st} from"stream";async function J(e,t,r=pe){const n=t.headers??{},o=n.Expect||n.expect;let s=-1,c=!1;if(o==="100-continue")await Promise.race([new Promise((i)=>{s=Number(setTimeout(i,Math.max(pe,r)))}),new Promise((i)=>{e.on("continue",()=>{clearTimeout(s),i()}),e.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)it(e,t.body)}var it=function(e,t){if(t instanceof st){t.pipe(e);return}if(t){if(Buffer.isBuffer(t)||typeof t==="string"){e.end(t);return}const r=t;if(typeof r==="object"&&r.buffer&&typeof r.byteOffset==="number"&&typeof r.byteLength==="number"){e.end(Buffer.from(r.buffer,r.byteOffset,r.byteLength));return}e.end(Buffer.from(t));return}e.end()},pe=1000;class V{static create(e){if(typeof e?.handle==="function")return e;return new V(e)}static checkSocketUsage(e,t,r=console){const{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===Infinity)return t;const c=15000;if(Date.now()-c<t)return t;if(n&&o)for(let i in n){const d=n[i]?.length??0,l=o[i]?.length??0;if(d>=s&&l>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${d} and ${l} additional requests are enqueued.
|
|
2
|
+
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
3
|
+
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return t}constructor(e){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((t,r)=>{if(typeof e==="function")e().then((n)=>{t(this.resolveDefaultConfig(n))}).catch(r);else t(this.resolveDefaultConfig(e))})}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:r,socketTimeout:n,httpAgent:o,httpsAgent:s}=e||{};return{connectionTimeout:r,requestTimeout:t??n,httpAgent:(()=>{if(o instanceof me||typeof o?.destroy==="function")return o;return new me({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof ye||typeof s?.destroy==="function")return s;return new ye({keepAlive:!0,maxSockets:50,...s})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){if(!this.config)this.config=await this.configProvider;let r;return new Promise((n,o)=>{let s=void 0;const c=async(u)=>{await s,clearTimeout(r),n(u)},i=async(u)=>{await s,clearTimeout(r),o(u)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const u=new Error("Request aborted");u.name="AbortError",i(u);return}const d=e.protocol==="https:",l=d?this.config.httpsAgent:this.config.httpAgent;r=setTimeout(()=>{this.socketWarningTimestamp=V.checkSocketUsage(l,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const w=D(e.query||{});let a=void 0;if(e.username!=null||e.password!=null){const u=e.username??"",m=e.password??"";a=`${u}:${m}`}let f=e.path;if(w)f+=`?${w}`;if(e.fragment)f+=`#${e.fragment}`;const h={headers:e.headers,host:e.hostname,method:e.method,path:f,port:e.port,agent:l,auth:a},y=(d?at:ct)(h,(u)=>{const m=new R({statusCode:u.statusCode||-1,reason:u.statusMessage,headers:Y(u.headers),body:u});c({response:m})});if(y.on("error",(u)=>{if(ue.includes(u.code))i(Object.assign(u,{name:"TimeoutError"}));else i(u)}),de(y,i,this.config.connectionTimeout),he(y,i,this.config.requestTimeout),t){const u=()=>{y.destroy();const m=new Error("Request aborted");m.name="AbortError",i(m)};if(typeof t.addEventListener==="function"){const m=t;m.addEventListener("abort",u,{once:!0}),y.once("close",()=>m.removeEventListener("abort",u))}else t.onabort=u}const p=h.agent;if(typeof p==="object"&&"keepAlive"in p)le(y,{keepAlive:p.keepAlive,keepAliveMsecs:p.keepAliveMsecs});s=J(y,e,this.config.requestTimeout).catch((u)=>{return clearTimeout(r),o(u)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as ft} from"stream";class Z extends ft{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}async function dt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var ge=(e)=>{if(ut(e))return dt(e);return new Promise((t,r)=>{const n=new Z;e.pipe(n),e.on("error",(o)=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){const o=new Uint8Array(Buffer.concat(this.bufferedBytes));t(o)})})},ut=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;var gn="***SensitiveInformation***";var xn=(e,t)=>{for(let r of Object.keys(e)){const n=e[r],o=async function(c,i,d){const l=new n(c);if(typeof i==="function")this.send(l,i);else if(typeof d==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(l,i||{},d)}else return this.send(l,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[s]=o}};class we extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,we.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}var xe=(e,t={})=>{Object.entries(t).filter(([,n])=>n!==void 0).forEach(([n,o])=>{if(e[n]==null||e[n]==="")e[n]=o});const r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e};class lt{trace(){}debug(){}info(){}warn(){}error(){}}var be=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as Q} from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!be(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return Q.from(e,t,r)},v=(e,t)=>{if(typeof e!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?Q.from(e,t):Q.from(e)};var ht=/^[A-Za-z0-9+/]*={0,2}$/,B=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!ht.exec(e))throw new TypeError("Invalid base64 string.");const t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var k=(e)=>{const t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var Rn=(e)=>{if(typeof e==="string")return k(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var z=(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 I(e.buffer,e.byteOffset,e.byteLength).toString("utf8")};var q=(e)=>{let t;if(typeof e==="string")t=k(e);else t=e;if(typeof t!=="object"||typeof t.byteOffset!=="number"||typeof t.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return I(t.buffer,t.byteOffset,t.byteLength).toString("base64")};function Ee(e,t="utf-8"){if(t==="base64")return q(e);return z(e)}function Te(e,t){if(t==="base64")return T.mutate(B(e));return T.mutate(k(e))}class T extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return Te(e,t);default:throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}}static mutate(e){return Object.setPrototypeOf(e,T.prototype),e}transformToString(e="utf-8"){return Ee(this,e)}}import{Readable as pt} from"stream";var Xn=(e,t)=>{const{base64Encoder:r,bodyLengthChecker:n,checksumAlgorithmFn:o,checksumLocationName:s,streamHasher:c}=t,i=r!==void 0&&o!==void 0&&s!==void 0&&c!==void 0,d=i?c(o,e):void 0,l=new pt({read:()=>{}});return e.on("data",(w)=>{const a=n(w)||0;l.push(`${a.toString(16)}\r\n`),l.push(w),l.push("\r\n")}),e.on("end",async()=>{if(l.push("0\r\n"),i){const w=r(await d);l.push(`${s}:${w}\r\n`),l.push("\r\n")}l.push(null)}),l};import{Readable as K} from"stream";import{TextDecoder as $t} from"util";async function mt(e){const t=await gt(e),r=B(t);return new Uint8Array(r)}async function yt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:d}=await r.read();if(d)t.push(d),o+=d.length;n=i}const s=new Uint8Array(o);let c=0;for(let i of t)s.set(i,c),c+=i.length;return s}var gt=function(e){return new Promise((t,r)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return r(new Error("Reader aborted too early"));const o=n.result??"",s=o.indexOf(","),c=s>-1?s+1:o.length;t(o.substring(c))},n.onabort=()=>r(new Error("Read aborted")),n.onerror=()=>r(n.error),n.readAsDataURL(e)})},Se=(e)=>{if(typeof Blob==="function"&&e instanceof Blob)return mt(e);return yt(e)};var Pe=O(Me(),1);var $=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var Ne="The stream has already been transformed.",Fe=(e)=>{if(!Re(e)&&!$(e)){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Ne);return t=!0,await Se(e)},n=(o)=>{if(typeof o.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return o.stream()};return Object.assign(e,{transformToByteArray:r,transformToString:async(o)=>{const s=await r();if(o==="base64")return q(s);else if(o==="hex")return Pe.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return z(s);else if(typeof TextDecoder==="function")return new TextDecoder(o).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(Ne);if(t=!0,Re(e))return n(e);else if($(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},Re=(e)=>typeof Blob==="function"&&e instanceof Blob;var Le="The stream has already been transformed.",$o=(e)=>{if(!(e instanceof K))try{return Fe(e)}catch(n){const o=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${o}`)}let t=!1;const r=async()=>{if(t)throw new Error(Le);return t=!0,await ge(e)};return Object.assign(e,{transformToByteArray:r,transformToString:async(n)=>{const o=await r();if(n===void 0||Buffer.isEncoding(n))return I(o.buffer,o.byteOffset,o.byteLength).toString(n);else return new $t(n).decode(o)},transformToWebStream:()=>{if(t)throw new Error(Le);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof K.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return t=!0,K.toWeb(e)}})};import{PassThrough as De} from"stream";async function Oe(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}async function No(e){if($(e))return Oe(e);const t=new De,r=new De;return e.pipe(t),e.pipe(r),[t,r]}import{Writable as At} from"stream";async function ve(e,t){let r=0;const n=[],o=e.getReader();let s=!1;while(!s){const{done:d,value:l}=await o.read();if(l)n.push(l),r+=l?.byteLength??0;if(r>=t)break;s=d}o.releaseLock();const c=new Uint8Array(Math.min(t,r));let i=0;for(let d of n){if(d.byteLength>c.byteLength-i){c.set(d.subarray(0,c.byteLength-i),i);break}else c.set(d,i);i+=d.length}return c}var Do=(e,t)=>{if($(e))return ve(e,t);return new Promise((r,n)=>{const o=new Be;o.limit=t,e.pipe(o),e.on("error",(s)=>{o.end(),n(s)}),o.on("error",n),o.on("finish",function(){const s=new Uint8Array(Buffer.concat(this.buffers));r(s)})})};class Be extends At{constructor(){super(...arguments);this.buffers=[],this.limit=Infinity,this.bytesBuffered=0}_write(e,t,r){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){const n=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-n),this.emit("finish")}r()}}var Jo=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return T.mutate(e);if(!e)return T.mutate(new Uint8Array);const r=t.streamCollector(e);return T.mutate(await r)};var Zo=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}};var It=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string"){const t=parseFloat(e);if(!Number.isNaN(t)){if(String(t)!==String(e))Je.warn(Ye(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},kt=Math.ceil(340282346638528860000000000000000000000),ze=(e)=>{const t=It(e);if(t!==void 0&&!Number.isNaN(t)&&t!==Infinity&&t!==(-Infinity)){if(Math.abs(t)>kt)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},X=(e)=>{if(e===null||e===void 0)return;if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)};var qe=(e)=>ee(e,32),He=(e)=>ee(e,16),We=(e)=>ee(e,8),ee=(e,t)=>{const r=X(e);if(r!==void 0&&Ut(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ut=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Qo=(e,t)=>{if(e===null||e===void 0){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},Go=(e)=>{if(e===null||e===void 0)return;if(typeof e==="object"&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},Ko=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return Je.warn(Ye(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var je=(e)=>{if(typeof e=="string")return ze(F(e));return ze(e)},Mt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,F=(e)=>{const t=e.match(Mt);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var Xo=(e)=>{if(typeof e==="string")return X(F(e));return X(e)};var es=(e)=>{if(typeof e==="string")return qe(F(e));return qe(e)},U=(e)=>{if(typeof e==="string")return He(F(e));return He(e)},_e=(e)=>{if(typeof e==="string")return We(F(e));return We(e)},Ye=(e)=>{return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},Je={warn:console.warn};function os(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),c=e.getUTCMinutes(),i=e.getUTCSeconds(),d=o<10?`0${o}`:`${o}`,l=s<10?`0${s}`:`${s}`,w=c<10?`0${c}`:`${c}`,a=i<10?`0${i}`:`${i}`;return`${Nt[n]}, ${d} ${re[r]} ${t} ${l}:${w}:${a} GMT`}var Nt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Rt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ss=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Rt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l]=t,w=U(M(n)),a=b(o,"month",1,12),f=b(s,"day",1,31);return L(w,a,f,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})},Pt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),is=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,d,l,w]=t,a=U(M(n)),f=b(o,"month",1,12),h=b(s,"day",1,31),g=L(a,f,h,{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l});if(w.toUpperCase()!="Z")g.setTime(g.getTime()-jt(w));return g},Ft=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Lt=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ot=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),cs=(e)=>{if(e===null||e===void 0)return;if(typeof e!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Ft.exec(e);if(t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(s)),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l})}if(t=Lt.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return Bt(L(Dt(s),te(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:d,fractionalMilliseconds:l}))}if(t=Ot.exec(e),t){const[r,n,o,s,c,i,d,l]=t;return L(U(M(l)),te(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:d})}throw new TypeError("Invalid RFC-7231 date-time value")};var L=(e,t,r,n)=>{const o=t-1;return qt(e,o,r),new Date(Date.UTC(e,o,r,b(n.hours,"hour",0,23),b(n.minutes,"minute",0,59),b(n.seconds,"seconds",0,60),Wt(n.fractionalMilliseconds)))},Dt=(e)=>{const t=(new Date()).getUTCFullYear(),r=Math.floor(t/100)*100+U(M(e));if(r<t)return r+100;return r},vt=1576800000000,Bt=(e)=>{if(e.getTime()-(new Date()).getTime()>vt)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},te=(e)=>{const t=re.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},zt=[31,28,31,30,31,30,31,31,30,31,30,31],qt=(e,t,r)=>{let n=zt[t];if(t===1&&Ht(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${re[t]} in ${e}: ${r}`)},Ht=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},b=(e,t,r,n)=>{const o=_e(M(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},Wt=(e)=>{if(e===null||e===void 0)return 0;return je("0."+e)*1000},jt=(e)=>{const t=e[0];let r=1;if(t=="+")r=1;else if(t=="-")r=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const n=Number(e.substring(1,3)),o=Number(e.substring(4,6));return r*(n*60+o)*60*1000},M=(e)=>{let t=0;while(t<e.length-1&&e.charAt(t)==="0")t++;if(t===0)return e;return e.slice(t)};var _t=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{const o=Yt(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw xe(c,t)},us=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{_t({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},Yt=(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"]});var ls=(e)=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var Ve=!1,ps=(e)=>{if(e&&!Ve&&parseInt(e.substring(1,e.indexOf(".")))<16)Ve=!0};var ne=O(j(),1);var Ze=(e)=>{const t=[];for(let r in ne.AlgorithmId){const n=ne.AlgorithmId[r];if(e[n]===void 0)continue;t.push({algorithmId:()=>n,checksumConstructor:()=>e[n]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(r){this._checksumAlgorithms.push(r)},checksumAlgorithms(){return this._checksumAlgorithms}}},Qe=(e)=>{const t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var Ge=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},Ke=(e)=>{const t={};return t.retryStrategy=e.retryStrategy(),t};var bs=(e)=>{return{...Ze(e),...Ge(e)}};var Es=(e)=>{return{...Qe(e),...Ke(e)}};function Jt(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var oe=function(){const e=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,e.prototype),r};oe.prototype=Object.create(String.prototype,{constructor:{value:oe,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(oe,String);function Vt(e,t,r){let n,o,s;if(typeof t==="undefined"&&typeof r==="undefined")n={},s=e;else if(n=e,typeof t==="function")return o=t,s=r,Zt(n,o,s);else s=t;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}Xe(n,null,s,c)}return n}var Us=(e,t)=>{const r={};for(let n in t)Xe(r,e,t,n);return r},Zt=(e,t,r)=>{return Vt(e,Object.entries(r).reduce((n,[o,s])=>{if(Array.isArray(s))n[o]=s;else if(typeof s==="function")n[o]=[t,s()];else n[o]=[t,s];return n},{}))},Xe=(e,t,r,n)=>{if(t!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=Qt,d=Gt,l=n]=c;if(typeof i==="function"&&i(t[l])||typeof i!=="function"&&!!i)e[n]=d(t[l]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,d=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=c;else if(d)e[n]=s()}else{const c=o===void 0&&s!=null,i=typeof o==="function"&&!!o(s)||typeof o!=="function"&&!!o;if(c||i)e[n]=s}},Qt=(e)=>e!=null,Gt=(e)=>e;var Ps=(e)=>e.toISOString().replace(".000Z","Z");var et=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(et);if(typeof e==="object"){const t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=et(e[r])}return t}return e};export{ir as F,cr as G,_ as H,R as I,lt as J,tt as K,be as L,I as M,v as N,B as O,k as P,Rn as Q,z as R,q as S,Xn as T,V as U,ge as V,Me as W,$o as X,No as Y,Do as Z,Jo as _,ae as $,gn as aa,xn as ba,Zo as ca,X as da,qe as ea,Qo as fa,Go as ga,Ko as ha,Xo as ia,es as ja,os as ka,ss as la,is as ma,cs as na,we as oa,xe as pa,us as qa,ls as ra,ps as sa,bs as ta,Es as ua,Jt as va,Vt as wa,Us as xa,Ps as ya,et as za};
|