gemi 0.4.124 → 0.4.126
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/app/App.d.ts +3 -0
- package/dist/app/App.d.ts.map +1 -1
- package/dist/app/index.js +2 -2
- package/dist/app/index.js.map +3 -3
- package/dist/auth/AuthenticationServiceProvider.d.ts +2 -0
- package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
- package/dist/bin/index.js +430 -430
- package/dist/broadcasting/index.d.ts +2 -0
- package/dist/broadcasting/index.d.ts.map +1 -0
- package/dist/broadcasting/index.js +1 -1
- package/dist/chunk-1qw2v7pp.js +20 -0
- package/dist/{chunk-m1838202.js.map → chunk-1qw2v7pp.js.map} +8 -11
- package/dist/chunk-2h3dg6ak.js +4 -0
- package/dist/{chunk-5bsvn385.js.map → chunk-2h3dg6ak.js.map} +2 -2
- package/dist/chunk-2srb036m.js +4 -0
- package/dist/{chunk-6wj5qxwf.js.map → chunk-2srb036m.js.map} +1 -1
- package/dist/chunk-3sgwee0d.js +4 -0
- package/dist/{chunk-9vb54d71.js.map → chunk-3sgwee0d.js.map} +2 -2
- package/dist/chunk-49eas1md.js +4 -0
- package/dist/{chunk-93r4rez6.js.map → chunk-49eas1md.js.map} +2 -2
- package/dist/chunk-4rgtv394.js +4 -0
- package/dist/{chunk-j618jvh4.js.map → chunk-4rgtv394.js.map} +4 -4
- package/dist/chunk-5e4ahq43.js +4 -0
- package/dist/{chunk-cw23pjra.js.map → chunk-5e4ahq43.js.map} +6 -6
- package/dist/chunk-5vx2z0tr.js +4 -0
- package/dist/{chunk-t6cspqr4.js.map → chunk-5vx2z0tr.js.map} +2 -2
- package/dist/chunk-716jpkxk.js +22 -0
- package/dist/chunk-716jpkxk.js.map +10 -0
- package/dist/chunk-75wm7ysh.js +11 -0
- package/dist/{chunk-hddz9z7a.js.map → chunk-75wm7ysh.js.map} +5 -5
- package/dist/chunk-7sn2drtt.js +5 -0
- package/dist/chunk-7sn2drtt.js.map +64 -0
- package/dist/chunk-7vggss3r.js +4 -0
- package/dist/{chunk-kqyj62v4.js.map → chunk-7vggss3r.js.map} +2 -2
- package/dist/chunk-99h5xbnm.js +4 -0
- package/dist/{chunk-gz4h6jsy.js.map → chunk-99h5xbnm.js.map} +2 -2
- package/dist/chunk-a0zzg1ga.js +3 -0
- package/dist/chunk-a0zzg1ga.js.map +16 -0
- package/dist/chunk-cqn3123n.js +3 -0
- package/dist/{chunk-1we4kcb2.js.map → chunk-cqn3123n.js.map} +2 -2
- package/dist/chunk-h64zrvbm.js +4 -0
- package/dist/chunk-h64zrvbm.js.map +10 -0
- package/dist/chunk-hxntatg7.js +4 -0
- package/dist/chunk-hxntatg7.js.map +10 -0
- package/dist/chunk-jtv3vbyw.js +4 -0
- package/dist/{chunk-dq276gmc.js.map → chunk-jtv3vbyw.js.map} +2 -2
- package/dist/chunk-mkwkxzth.js +4 -0
- package/dist/{chunk-ksckhxbt.js.map → chunk-mkwkxzth.js.map} +5 -5
- package/dist/chunk-mr2ew71j.js +4 -0
- package/dist/{chunk-m7wq4g1v.js.map → chunk-mr2ew71j.js.map} +6 -6
- package/dist/chunk-qcdwj08x.js +8 -0
- package/dist/{chunk-9xeqzq5a.js.map → chunk-qcdwj08x.js.map} +2 -2
- package/dist/chunk-qf0qr76c.js +4 -0
- package/dist/{chunk-8vjfr0mp.js.map → chunk-qf0qr76c.js.map} +2 -2
- package/dist/chunk-sdejryyp.js +4 -0
- package/dist/{chunk-3ynep2h9.js.map → chunk-sdejryyp.js.map} +1 -1
- package/dist/chunk-tmp6k3re.js +4 -0
- package/dist/{chunk-2c4nwgcj.js.map → chunk-tmp6k3re.js.map} +2 -2
- package/dist/chunk-tq3grsay.js +4 -0
- package/dist/chunk-tq3grsay.js.map +14 -0
- package/dist/chunk-w1t51rk3.js +4 -0
- package/dist/{chunk-34x1c2ey.js.map → chunk-w1t51rk3.js.map} +4 -4
- package/dist/chunk-wdx058ey.js +4 -0
- package/dist/{chunk-d7hn6b85.js.map → chunk-wdx058ey.js.map} +2 -2
- package/dist/chunk-yd2678ws.js +4 -0
- package/dist/{chunk-ycz2czq7.js.map → chunk-yd2678ws.js.map} +4 -4
- package/dist/client/index.js.map +1 -1
- package/dist/client/rpc.d.ts +2 -3
- package/dist/client/rpc.d.ts.map +1 -1
- package/dist/client/useRoute.d.ts +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +2 -2
- package/dist/facades/Broadcast.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +11 -11
- package/dist/http/AuthenticationMiddlware.d.ts +1 -1
- package/dist/http/AuthenticationMiddlware.d.ts.map +1 -1
- package/dist/http/CacheMiddleware.d.ts +5 -0
- package/dist/http/CacheMiddleware.d.ts.map +1 -0
- package/dist/http/HttpRequest.d.ts +2 -1
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/I18nServiceContainer.d.ts +1 -0
- package/dist/http/I18nServiceContainer.d.ts.map +1 -1
- package/dist/http/Middleware.d.ts +3 -3
- package/dist/http/Middleware.d.ts.map +1 -1
- package/dist/http/MiddlewareServiceProvider.d.ts +2 -1
- package/dist/http/MiddlewareServiceProvider.d.ts.map +1 -1
- package/dist/http/RateLimitMiddleware.d.ts +1 -2
- package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +9 -8
- package/dist/kernel/Kernel.d.ts +3 -1
- package/dist/kernel/Kernel.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -2
- package/dist/kernel/index.js.map +3 -3
- package/dist/server/index.js +5 -5
- package/dist/server/index.js.map +4 -5
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +12 -3
- package/dist/services/index.js.map +23 -9
- package/dist/services/logging/LoggingRouter.d.ts +1 -0
- package/dist/services/logging/LoggingRouter.d.ts.map +1 -1
- package/dist/services/logging/LoggingServiceContainer.d.ts +1 -1
- package/dist/services/logging/LoggingServiceContainer.d.ts.map +1 -1
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts +2 -2
- package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +1 -1
- package/dist/services/queue/Job.d.ts +11 -0
- package/dist/services/queue/Job.d.ts.map +1 -0
- package/dist/services/queue/QueueServiceContainer.d.ts +24 -0
- package/dist/services/queue/QueueServiceContainer.d.ts.map +1 -0
- package/dist/services/queue/QueueServiceProvider.d.ts +8 -0
- package/dist/services/queue/QueueServiceProvider.d.ts.map +1 -0
- package/dist/services/queue/queueWorker.d.ts +2 -0
- package/dist/services/queue/queueWorker.d.ts.map +1 -0
- package/dist/services/router/ApiRouterServiceContainer.d.ts +2 -1
- package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
- package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
- package/package.json +1 -2
- package/dist/chunk-1we4kcb2.js +0 -3
- package/dist/chunk-2c4nwgcj.js +0 -4
- package/dist/chunk-34x1c2ey.js +0 -4
- package/dist/chunk-39kxd828.js +0 -4
- package/dist/chunk-39kxd828.js.map +0 -10
- package/dist/chunk-3ynep2h9.js +0 -4
- package/dist/chunk-5bsvn385.js +0 -4
- package/dist/chunk-6wj5qxwf.js +0 -4
- package/dist/chunk-8vjfr0mp.js +0 -4
- package/dist/chunk-93r4rez6.js +0 -4
- package/dist/chunk-9vb54d71.js +0 -4
- package/dist/chunk-9xeqzq5a.js +0 -8
- package/dist/chunk-cw23pjra.js +0 -4
- package/dist/chunk-d7hn6b85.js +0 -4
- package/dist/chunk-dq276gmc.js +0 -4
- package/dist/chunk-g290rywa.js +0 -5
- package/dist/chunk-g290rywa.js.map +0 -65
- package/dist/chunk-g31vhvsw.js +0 -3
- package/dist/chunk-g31vhvsw.js.map +0 -15
- package/dist/chunk-gz4h6jsy.js +0 -4
- package/dist/chunk-hddz9z7a.js +0 -11
- package/dist/chunk-j618jvh4.js +0 -4
- package/dist/chunk-k4rg25z3.js +0 -4
- package/dist/chunk-k4rg25z3.js.map +0 -16
- package/dist/chunk-kqyj62v4.js +0 -4
- package/dist/chunk-ksckhxbt.js +0 -4
- package/dist/chunk-m1838202.js +0 -20
- package/dist/chunk-m7wq4g1v.js +0 -4
- package/dist/chunk-t6cspqr4.js +0 -4
- package/dist/chunk-wrm0pxh2.js +0 -4
- package/dist/chunk-wrm0pxh2.js.map +0 -14
- package/dist/chunk-ycz2czq7.js +0 -4
package/dist/chunk-6wj5qxwf.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var g=Object.create;var{getPrototypeOf:h,defineProperty:f,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var k=(a,b,c)=>{c=a!=null?g(h(a)):{};const d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of i(a))if(!j.call(d,e))f(d,e,{get:()=>a[e],enumerable:!0});return d};var l=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);
|
|
2
|
-
export{k as K,l as L};
|
|
3
|
-
|
|
4
|
-
//# debugId=4AD53B4DADD776D464756E2164756E21
|
package/dist/chunk-8vjfr0mp.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{L as D}from"./chunk-6wj5qxwf.js";var S=D((y,w)=>{var{defineProperty:G,getOwnPropertyDescriptor:v,getOwnPropertyNames:O}=Object,x=Object.prototype.hasOwnProperty,Q=(b,j)=>G(b,"name",{value:j,configurable:!0}),U=(b,j)=>{for(var z in j)G(b,z,{get:j[z],enumerable:!0})},K=(b,j,z,V)=>{if(j&&typeof j==="object"||typeof j==="function"){for(let B of O(j))if(!x.call(b,B)&&B!==z)G(b,B,{get:()=>j[B],enumerable:!(V=v(j,B))||V.enumerable})}return b},q=(b)=>K(G({},"__esModule",{value:!0}),b),W={};U(W,{AlgorithmId:()=>J,EndpointURLScheme:()=>X,FieldPosition:()=>M,HttpApiKeyAuthLocation:()=>$,HttpAuthLocation:()=>Z,IniSectionType:()=>N,RequestHandlerProtocol:()=>Y,SMITHY_CONTEXT_KEY:()=>R,getDefaultClientConfiguration:()=>T,resolveDefaultRuntimeConfig:()=>k});w.exports=q(W);var Z=((b)=>{return b.HEADER="header",b.QUERY="query",b})(Z||{}),$=((b)=>{return b.HEADER="header",b.QUERY="query",b})($||{}),X=((b)=>{return b.HTTP="http",b.HTTPS="https",b})(X||{}),J=((b)=>{return b.MD5="md5",b.CRC32="crc32",b.CRC32C="crc32c",b.SHA1="sha1",b.SHA256="sha256",b})(J||{}),E=Q((b)=>{const j=[];if(b.sha256!==void 0)j.push({algorithmId:()=>"sha256",checksumConstructor:()=>b.sha256});if(b.md5!=null)j.push({algorithmId:()=>"md5",checksumConstructor:()=>b.md5});return{_checksumAlgorithms:j,addChecksumAlgorithm(z){this._checksumAlgorithms.push(z)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),F=Q((b)=>{const j={};return b.checksumAlgorithms().forEach((z)=>{j[z.algorithmId()]=z.checksumConstructor()}),j},"resolveChecksumRuntimeConfig"),T=Q((b)=>{return{...E(b)}},"getDefaultClientConfiguration"),k=Q((b)=>{return{...F(b)}},"resolveDefaultRuntimeConfig"),M=((b)=>{return b[b.HEADER=0]="HEADER",b[b.TRAILER=1]="TRAILER",b})(M||{}),R="__smithy_context",N=((b)=>{return b.PROFILE="profile",b.SSO_SESSION="sso-session",b.SERVICES="services",b})(N||{}),Y=((b)=>{return b.HTTP_0_9="http/0.9",b.HTTP_1_0="http/1.0",b.TDS_8_0="tds/8.0",b})(Y||{})});
|
|
2
|
-
export{S as Db};
|
|
3
|
-
|
|
4
|
-
//# debugId=832A4766668E785164756E2164756E21
|
package/dist/chunk-93r4rez6.js
DELETED
package/dist/chunk-9vb54d71.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-6wj5qxwf.js";import{Hb as E}from"./chunk-g31vhvsw.js";var _="AWS_ACCESS_KEY_ID",S="AWS_SECRET_ACCESS_KEY",p="AWS_SESSION_TOKEN",A="AWS_CREDENTIAL_EXPIRATION",C="AWS_CREDENTIAL_SCOPE",N="AWS_ACCOUNT_ID",a=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const o=process.env[_],r=process.env[S],n=process.env[p],s=process.env[A],t=process.env[C],c=process.env[N];if(o&&r)return{accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...c&&{accountId:c}};throw new E("Unable to find environment variable credentials.",{logger:e?.logger})};export{a as fromEnv,p as ENV_SESSION,S as ENV_SECRET,_ as ENV_KEY,A as ENV_EXPIRATION,C as ENV_CREDENTIAL_SCOPE,N as ENV_ACCOUNT_ID};export{_ as E,S as F,a as G};
|
|
3
|
-
|
|
4
|
-
//# debugId=048CA63641DF2C6E64756E2164756E21
|
package/dist/chunk-9xeqzq5a.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-6wj5qxwf.js";import{Ia as i,Wa as I,Za as y,nb as C}from"./chunk-g290rywa.js";import"./chunk-8vjfr0mp.js";import{Hb as n}from"./chunk-g31vhvsw.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};
|
|
7
|
-
|
|
8
|
-
//# debugId=60A162379E95FB2564756E2164756E21
|
package/dist/chunk-cw23pjra.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-6wj5qxwf.js";import"./chunk-8vjfr0mp.js";import{Eb as z,Fb as B}from"./chunk-k4rg25z3.js";import{Gb as K,Hb as y}from"./chunk-g31vhvsw.js";import"./chunk-1we4kcb2.js";import{parse as p}from"url";import{Buffer as M}from"buffer";import{request as k}from"http";function E(c){return new Promise((I,x)=>{const T=k({method:"GET",...c,hostname:c.hostname?.replace(/^\[(.+)\]$/,"$1")});T.on("error",(N)=>{x(Object.assign(new K("Unable to connect to instance metadata service"),N)),T.destroy()}),T.on("timeout",()=>{x(new K("TimeoutError from instance metadata service")),T.destroy()}),T.on("response",(N)=>{const{statusCode:O=400}=N;if(O<200||300<=O)x(Object.assign(new K("Error response received from instance metadata service"),{statusCode:O})),T.destroy();const $=[];N.on("data",(w)=>{$.push(w)}),N.on("end",()=>{I(M.concat($)),T.destroy()})}),T.end()})}var _=(c)=>Boolean(c)&&typeof c==="object"&&typeof c.AccessKeyId==="string"&&typeof c.SecretAccessKey==="string"&&typeof c.Token==="string"&&typeof c.Expiration==="string",D=(c)=>({accessKeyId:c.AccessKeyId,secretAccessKey:c.SecretAccessKey,sessionToken:c.Token,expiration:new Date(c.Expiration),...c.AccountId&&{accountId:c.AccountId}});var hc=1000,Yc=0,G=({maxRetries:c=0,timeout:I=1000})=>({maxRetries:c,timeout:I});var m=(c,I)=>{let x=c();for(let T=0;T<I;T++)x=x.catch(c);return x};var X="AWS_CONTAINER_CREDENTIALS_FULL_URI",Z="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",mc=(c={})=>{const{timeout:I,maxRetries:x}=G(c);return()=>m(async()=>{const T=await s({logger:c.logger}),N=JSON.parse(await C(I,T));if(!_(N))throw new y("Invalid response received from instance metadata service.",{logger:c.logger});return D(N)},x)},C=async(c,I)=>{if(process.env[b])I.headers={...I.headers,Authorization:process.env[b]};return(await E({...I,timeout:c})).toString()},a="169.254.170.2",n={localhost:!0,"127.0.0.1":!0},o={"http:":!0,"https:":!0},s=async({logger:c})=>{if(process.env[Z])return{hostname:a,path:process.env[Z]};if(process.env[X]){const I=p(process.env[X]);if(!I.hostname||!(I.hostname in n))throw new y(`${I.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:c});if(!I.protocol||!(I.protocol in o))throw new y(`${I.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:c});return{...I,port:I.port?parseInt(I.port,10):void 0}}throw new y(`The container metadata credential provider cannot be used unless the ${Z} or ${X} environment variable is set`,{tryNextLink:!1,logger:c})};class Q extends y{constructor(c,I=!0){super(c,I);this.tryNextLink=I,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,Q.prototype)}}var J;(function(c){c.IPv4="http://169.254.169.254",c.IPv6="http://[fd00:ec2::254]"})(J||(J={}));var H={environmentVariableSelector:(c)=>c.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(c)=>c.ec2_metadata_service_endpoint,default:void 0};var u;(function(c){c.IPv4="IPv4",c.IPv6="IPv6"})(u||(u={}));var g="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",l="ec2_metadata_service_endpoint_mode",q={environmentVariableSelector:(c)=>c[g],configFileSelector:(c)=>c[l],default:u.IPv4};var v=async()=>B(await r()||await d()),r=async()=>z(H)(),d=async()=>{const c=await z(q)();switch(c){case u.IPv4:return J.IPv4;case u.IPv6:return J.IPv6;default:throw new Error(`Unsupported endpoint mode: ${c}. Select from ${Object.values(u)}`)}};var L=(c,I)=>{const x=300+Math.floor(Math.random()*300),T=new Date(Date.now()+x*1000);I.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(T)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const N=c.originalExpiration??c.expiration;return{...c,...N?{originalExpiration:N}:{},expiration:T}};var U=(c,I={})=>{const x=I?.logger||console;let T;return async()=>{let N;try{if(N=await c(),N.expiration&&N.expiration.getTime()<Date.now())N=L(N,x)}catch(O){if(T)x.warn("Credential renew failed: ",O),N=L(T,x);else throw O}return T=N,N}};var P="/latest/meta-data/iam/security-credentials/",e="/latest/api/token",W="AWS_EC2_METADATA_V1_DISABLED",t="ec2_metadata_v1_disabled",F="x-aws-ec2-metadata-token",oc=(c={})=>U(i(c),{logger:c.logger}),i=(c={})=>{let I=!1;const{logger:x,profile:T}=c,{timeout:N,maxRetries:O}=G(c),$=async(w,j)=>{if(I||j.headers?.[F]==null){let h=!1,Y=!1;const R=await z({environmentVariableSelector:(S)=>{const A=S[W];if(Y=!!A&&A!=="false",A===void 0)throw new y(`${W} not set in env, checking config file next.`,{logger:c.logger});return Y},configFileSelector:(S)=>{const A=S[t];return h=!!A&&A!=="false",h},default:!1},{profile:T})();if(c.ec2MetadataV1Disabled||R){const S=[];if(c.ec2MetadataV1Disabled)S.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(h)S.push(`config file profile (${t})`);if(Y)S.push(`process environment variable (${W})`);throw new Q(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${S.join(", ")}].`)}}const V=(await m(async()=>{let h;try{h=await Ic(j)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)).trim();return m(async()=>{let h;try{h=await Tc(V,j,c)}catch(Y){if(Y.statusCode===401)I=!1;throw Y}return h},w)};return async()=>{const w=await v();if(I)return x?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(O,{...w,timeout:N});else{let j;try{j=(await cc({...w,timeout:N})).toString()}catch(f){if(f?.statusCode===400)throw Object.assign(f,{message:"EC2 Metadata token request returned error"});else if(f.message==="TimeoutError"||[403,404,405].includes(f.statusCode))I=!0;return x?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(O,{...w,timeout:N})}return $(O,{...w,headers:{[F]:j},timeout:N})}}},cc=async(c)=>E({...c,path:e,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),Ic=async(c)=>(await E({...c,path:P})).toString(),Tc=async(c,I,x)=>{const T=JSON.parse((await E({...I,path:P+c})).toString());if(!_(T))throw new y("Invalid response received from instance metadata service.",{logger:x.logger});return D(T)};export{G as providerConfigFromInit,E as httpRequest,v as getInstanceMetadataEndpoint,oc as fromInstanceMetadata,mc as fromContainerMetadata,J as Endpoint,Z as ENV_CMDS_RELATIVE_URI,X as ENV_CMDS_FULL_URI,b as ENV_CMDS_AUTH_TOKEN,hc as DEFAULT_TIMEOUT,Yc as DEFAULT_MAX_RETRIES};
|
|
3
|
-
|
|
4
|
-
//# debugId=85FE4178BEE980DE64756E2164756E21
|
package/dist/chunk-d7hn6b85.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{L as ee}from"./chunk-6wj5qxwf.js";var te=ee((re,T)=>{var A,I,R,P,N,D,C,F,L,H,M,G,U,S,j,W,V,B,E,Y,K,q,z,Q,J,X,Z,$,g,k,x;(function(f){var O=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(b){f(w(O,w(b)))});else if(typeof T==="object"&&typeof re==="object")f(w(O,w(re)));else f(w(O));function w(b,e){if(b!==O)if(typeof Object.create==="function")Object.defineProperty(b,"__esModule",{value:!0});else b.__esModule=!0;return function(t,r){return b[t]=e?e(t,r):r}}})(function(f){var O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};A=function(e,t){if(typeof t!=="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");O(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e},R=function(e,t){var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0)r[n]=e[n];if(e!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)if(t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o]))r[n[o]]=e[n[o]]}return r},P=function(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,i;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)if(i=e[u])a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a;return o>3&&a&&Object.defineProperty(t,r,a),a},N=function(e,t){return function(r,n){t(r,n,e)}},D=function(e,t,r,n,o,a){function i(v){if(v!==void 0&&typeof v!=="function")throw new TypeError("Function expected");return v}var u=n.kind,_=u==="getter"?"get":u==="setter"?"set":"value",c=!t&&e?n.static?e:e.prototype:null,l=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),y,m=!1;for(var s=r.length-1;s>=0;s--){var p={};for(var d in n)p[d]=d==="access"?{}:n[d];for(var d in n.access)p.access[d]=n.access[d];p.addInitializer=function(v){if(m)throw new TypeError("Cannot add initializers after decoration has completed");a.push(i(v||null))};var h=r[s](u==="accessor"?{get:l.get,set:l.set}:l[_],p);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!=="object")throw new TypeError("Object expected");if(y=i(h.get))l.get=y;if(y=i(h.set))l.set=y;if(y=i(h.init))o.unshift(y)}else if(y=i(h))if(u==="field")o.unshift(y);else l[_]=y}if(c)Object.defineProperty(c,n.name,l);m=!0},C=function(e,t,r){var n=arguments.length>2;for(var o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0},F=function(e){return typeof e==="symbol"?e:"".concat(e)},L=function(e,t,r){if(typeof t==="symbol")t=t.description?"[".concat(t.description,"]"):"";return Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})},H=function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)},M=function(e,t,r,n){function o(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function u(l){try{c(n.next(l))}catch(y){i(y)}}function _(l){try{c(n.throw(l))}catch(y){i(y)}}function c(l){l.done?a(l.value):o(l.value).then(u,_)}c((n=n.apply(e,t||[])).next())})},G=function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,i=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function u(c){return function(l){return _([c,l])}}function _(c){if(n)throw new TypeError("Generator is already executing.");while(i&&(i=0,c[0]&&(r=0)),r)try{if(n=1,o&&(a=c[0]&2?o.return:c[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,c[1])).done)return a;if(o=0,a)c=[c[0]&2,a.value];switch(c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if((a=r.trys,!(a=a.length>0&&a[a.length-1]))&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}if(a[2])r.ops.pop();r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],o=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},U=function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))g(t,e,r)},g=Object.create?function(e,t,r,n){if(n===void 0)n=r;var o=Object.getOwnPropertyDescriptor(t,r);if(!o||("get"in o?!t.__esModule:o.writable||o.configurable))o={enumerable:!0,get:function(){return t[r]}};Object.defineProperty(e,n,o)}:function(e,t,r,n){if(n===void 0)n=r;e[n]=t[r]},S=function(e){var t=typeof Symbol==="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length==="number")return{next:function(){if(e&&n>=e.length)e=void 0;return{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},j=function(e,t){var r=typeof Symbol==="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],i;try{while((t===void 0||t-- >0)&&!(o=n.next()).done)a.push(o.value)}catch(u){i={error:u}}finally{try{if(o&&!o.done&&(r=n.return))r.call(n)}finally{if(i)throw i.error}}return a},W=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(j(arguments[t]));return e},V=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],i=0,u=a.length;i<u;i++,o++)n[o]=a[i];return n},B=function(e,t,r){if(r||arguments.length===2){for(var n=0,o=t.length,a;n<o;n++)if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))},E=function(e){return this instanceof E?(this.v=e,this):new E(e)},Y=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",i),o[Symbol.asyncIterator]=function(){return this},o;function i(s){return function(p){return Promise.resolve(p).then(s,y)}}function u(s,p){if(n[s]){if(o[s]=function(d){return new Promise(function(h,v){a.push([s,d,h,v])>1||_(s,d)})},p)o[s]=p(o[s])}}function _(s,p){try{c(n[s](p))}catch(d){m(a[0][3],d)}}function c(s){s.value instanceof E?Promise.resolve(s.value.v).then(l,y):m(a[0][2],s)}function l(s){_("next",s)}function y(s){_("throw",s)}function m(s,p){if(s(p),a.shift(),a.length)_(a[0][0],a[0][1])}},K=function(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(i){return(r=!r)?{value:E(e[o](i)),done:!1}:a?a(i):i}:a}},q=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof S==="function"?S(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(i){return new Promise(function(u,_){i=e[a](i),o(u,_,i.done,i.value)})}}function o(a,i,u,_){Promise.resolve(_).then(function(c){a({value:c,done:u})},i)}},z=function(e,t){if(Object.defineProperty)Object.defineProperty(e,"raw",{value:t});else e.raw=t;return e};var w=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};Q=function(e){if(e&&e.__esModule)return e;var t={};if(e!=null){for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))g(t,e,r)}return w(t,e),t},J=function(e){return e&&e.__esModule?e:{default:e}},X=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Z=function(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r},$=function(e,t){if(t===null||typeof t!=="object"&&typeof t!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e==="function"?t===e:e.has(t)},k=function(e,t,r){if(t!==null&&t!==void 0){if(typeof t!=="object"&&typeof t!=="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(n=t[Symbol.dispose],r)o=n}if(typeof n!=="function")throw new TypeError("Object not disposable.");if(o)n=function(){try{o.call(this)}catch(a){return Promise.reject(a)}};e.stack.push({value:t,dispose:n,async:r})}else if(r)e.stack.push({async:!0});return t};var b=typeof SuppressedError==="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};x=function(e){function t(a){e.error=e.hasError?new b(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}var r,n=0;function o(){while(r=e.stack.pop())try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(i){return t(i),o()})}else n|=1}catch(i){t(i)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return o()},f("__extends",A),f("__assign",I),f("__rest",R),f("__decorate",P),f("__param",N),f("__esDecorate",D),f("__runInitializers",C),f("__propKey",F),f("__setFunctionName",L),f("__metadata",H),f("__awaiter",M),f("__generator",G),f("__exportStar",U),f("__createBinding",g),f("__values",S),f("__read",j),f("__spread",W),f("__spreadArrays",V),f("__spreadArray",B),f("__await",E),f("__asyncGenerator",Y),f("__asyncDelegator",K),f("__asyncValues",q),f("__makeTemplateObject",z),f("__importStar",Q),f("__importDefault",J),f("__classPrivateFieldGet",X),f("__classPrivateFieldSet",Z),f("__classPrivateFieldIn",$),f("__addDisposableResource",k),f("__disposeResources",x)})});
|
|
2
|
-
export{te as U};
|
|
3
|
-
|
|
4
|
-
//# debugId=5FFB89EA3FF4AFAA64756E2164756E21
|
package/dist/chunk-dq276gmc.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{L}from"./chunk-6wj5qxwf.js";var d=L((u8,e2)=>{var r2=function(q){return typeof q!=="undefined"&&q!==null},s5=function(q){return typeof q==="object"},t5=function(q){return Object.prototype.toString.call(q)==="[object Object]"},i5=function(q){return typeof q==="function"},o5=function(q){return typeof q==="boolean"},q0=function(q){return q instanceof Buffer},J0=function(q){if(r2(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},$0=function(q){return q instanceof ArrayBuffer},W0=function(q){return typeof q==="string"&&q.length>0},Z0=function(q){return typeof q==="number"&&!Number.isNaN(q)},Q0=function(q){return Number.isInteger(q)},Y0=function(q,J,$){return q>=J&&q<=$},K0=function(q,J){return J.includes(q)},U0=function(q,J,$){return new Error(`Expected ${J} for ${q} but received ${$} of type ${typeof $}`)},B0=function(q,J){return J.message=q.message,J};e2.exports={defined:r2,object:s5,plainObject:t5,fn:i5,bool:o5,buffer:q0,typedArray:J0,arrayBuffer:$0,string:W0,number:Z0,integer:Q0,inRange:Y0,inArray:K0,invalidParameterError:U0,nativeError:B0}});var o=L((l8,p2)=>{var G0=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...q)=>console.error("SEMVER",...q):()=>{};p2.exports=G0});var K2=L((c8,n2)=>{var H0=Number.MAX_SAFE_INTEGER||9007199254740991,I0=["major","premajor","minor","preminor","patch","prepatch","prerelease"];n2.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:H0,RELEASE_TYPES:I0,SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var q2=L((O,s2)=>{var{MAX_SAFE_COMPONENT_LENGTH:z2,MAX_SAFE_BUILD_LENGTH:F0,MAX_LENGTH:N0}=K2(),X0=o();O=s2.exports={};var V0=O.re=[],A0=O.safeRe=[],F=O.src=[],N=O.t={},P0=0,E2="[a-zA-Z0-9-]",L0=[["\\s",1],["\\d",N0],[E2,F0]],_0=(q)=>{for(let[J,$]of L0)q=q.split(`${J}*`).join(`${J}{0,${$}}`).split(`${J}+`).join(`${J}{1,${$}}`);return q},A=(q,J,$)=>{const W=_0(J),Z=P0++;X0(q,Z,J),N[q]=Z,F[Z]=J,V0[Z]=new RegExp(J,$?"g":void 0),A0[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,${z2}})(?:\\.(\\d{1,${z2}}))?(?:\\.(\\d{1,${z2}}))?`);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((a8,t2)=>{var R0=Object.freeze({loose:!0}),D0=Object.freeze({}),j0=(q)=>{if(!q)return D0;if(typeof q!=="object")return R0;return q};t2.exports=j0});var J1=L((r8,q1)=>{var i2=/^[0-9]+$/,o2=(q,J)=>{const $=i2.test(q),W=i2.test(J);if($&&W)q=+q,J=+J;return q===J?0:$&&!W?-1:W&&!$?1:q<J?-1:1},z0=(q,J)=>o2(J,q);q1.exports={compareIdentifiers:o2,rcompareIdentifiers:z0}});var e=L((e8,Q1)=>{var B2=o(),{MAX_LENGTH:$1,MAX_SAFE_INTEGER:G2}=K2(),{safeRe:W1,t:Z1}=q2(),E0=U2(),{compareIdentifiers:r}=J1();class x{constructor(q,J){if(J=E0(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>$1)throw new TypeError(`version is longer than ${$1} characters`);B2("SemVer",q,J),this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease;const $=q.trim().match(J.loose?W1[Z1.LOOSE]:W1[Z1.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 r(this.major,q.major)||r(this.minor,q.minor)||r(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 r($,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 r($,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(r(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}}Q1.exports=x});var U1=L((p8,K1)=>{var Y1=e(),T0=(q,J,$=!1)=>{if(q instanceof Y1)return q;try{return new Y1(q,J)}catch(W){if(!$)return null;throw W}};K1.exports=T0});var G1=L((n8,B1)=>{var y0=e(),w0=U1(),{safeRe:H2,t:I2}=q2(),C0=(q,J)=>{if(q instanceof y0)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 w0(`${W}.${Z}.${Y}${K}${B}`,J)};B1.exports=C0});var l=L((s8,I1)=>{var H1=e(),S0=(q,J,$)=>new H1(q,$).compare(new H1(J,$));I1.exports=S0});var T2=L((t8,F1)=>{var k0=l(),M0=(q,J,$)=>k0(q,J,$)>=0;F1.exports=M0});var V1=L((i8,X1)=>{class N1{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}}X1.exports=N1});var P1=L((o8,A1)=>{var x0=l(),f0=(q,J,$)=>x0(q,J,$)===0;A1.exports=f0});var _1=L((q9,L1)=>{var d0=l(),v0=(q,J,$)=>d0(q,J,$)!==0;L1.exports=v0});var D1=L((J9,R1)=>{var O0=l(),b0=(q,J,$)=>O0(q,J,$)>0;R1.exports=b0});var z1=L(($9,j1)=>{var h0=l(),g0=(q,J,$)=>h0(q,J,$)<0;j1.exports=g0});var T1=L((W9,E1)=>{var m0=l(),u0=(q,J,$)=>m0(q,J,$)<=0;E1.exports=u0});var w1=L((Z9,y1)=>{var l0=P1(),c0=_1(),a0=D1(),r0=T2(),e0=z1(),p0=T1(),n0=(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 l0(q,$,W);case"!=":return c0(q,$,W);case">":return a0(q,$,W);case">=":return r0(q,$,W);case"<":return e0(q,$,W);case"<=":return p0(q,$,W);default:throw new TypeError(`Invalid operator: ${J}`)}};y1.exports=n0});var d1=L((Q9,f1)=>{var J2=Symbol("SemVer ANY");class F2{static get ANY(){return J2}constructor(q,J){if(J=C1(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===J2)this.value="";else this.value=this.operator+this.semver.version;w2("comp",this)}parse(q){const J=this.options.loose?S1[k1.COMPARATORLOOSE]:S1[k1.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=J2;else this.semver=new M1($[2],this.options.loose)}toString(){return this.value}test(q){if(w2("Comparator.test",q,this.options.loose),this.semver===J2||q===J2)return!0;if(typeof q==="string")try{q=new M1(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 x1(q.value,J).test(this.value)}else if(q.operator===""){if(q.value==="")return!0;return new x1(this.value,J).test(q.semver)}if(J=C1(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}}f1.exports=F2;var C1=U2(),{safeRe:S1,t:k1}=q2(),y2=w1(),w2=o(),M1=e(),x1=C2()});var C2=L((Y9,h1)=>{var s0=/\s+/g;class $2{constructor(q,J){if(J=i0(J),q instanceof $2)if(q.loose===!!J.loose&&q.includePrerelease===!!J.includePrerelease)return q;else return new $2(q.raw,J);if(q instanceof S2)return this.raw=q.value,this.set=[[q]],this.formatted=void 0,this;if(this.options=J,this.loose=!!J.loose,this.includePrerelease=!!J.includePrerelease,this.raw=q.trim().replace(s0," "),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)=>!O1(W[0])),this.set.length===0)this.set=[$];else if(this.set.length>1){for(let W of this.set)if(W.length===1&&Q4(W[0])){this.set=[W];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let q=0;q<this.set.length;q++){if(q>0)this.formatted+="||";const J=this.set[q];for(let $=0;$<J.length;$++){if($>0)this.formatted+=" ";this.formatted+=J[$].toString().trim()}}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(q){const $=((this.options.includePrerelease&&W4)|(this.options.loose&&Z4))+":"+q,W=v1.get($);if(W)return W;const Z=this.options.loose,Y=Z?C[T.HYPHENRANGELOOSE]:C[T.HYPHENRANGE];q=q.replace(Y,X4(this.options.includePrerelease)),R("hyphen replace",q),q=q.replace(C[T.COMPARATORTRIM],q4),R("comparator trim",q),q=q.replace(C[T.TILDETRIM],J4),R("tilde trim",q),q=q.replace(C[T.CARETTRIM],$4),R("caret trim",q);let K=q.split(" ").map((P)=>Y4(P,this.options)).join(" ").split(/\s+/).map((P)=>N4(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(O1(P))return[P];B.set(P.value,P)}if(B.size>1&&B.has(""))B.delete("");const I=[...B.values()];return v1.set($,I),I}intersects(q,J){if(!(q instanceof $2))throw new TypeError("a Range is required");return this.set.some(($)=>{return b1($,J)&&q.set.some((W)=>{return b1(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 o0(q,this.options)}catch(J){return!1}for(let J=0;J<this.set.length;J++)if(V4(this.set[J],q,this.options))return!0;return!1}}h1.exports=$2;var t0=V1(),v1=new t0,i0=U2(),S2=d1(),R=o(),o0=e(),{safeRe:C,t:T,comparatorTrimReplace:q4,tildeTrimReplace:J4,caretTrimReplace:$4}=q2(),{FLAG_INCLUDE_PRERELEASE:W4,FLAG_LOOSE:Z4}=K2(),O1=(q)=>q.value==="<0.0.0-0",Q4=(q)=>q.value==="",b1=(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 $},Y4=(q,J)=>{return R("comp",q,J),q=B4(q,J),R("caret",q),q=K4(q,J),R("tildes",q),q=H4(q,J),R("xrange",q),q=F4(q,J),R("stars",q),q},y=(q)=>!q||q.toLowerCase()==="x"||q==="*",K4=(q,J)=>{return q.trim().split(/\s+/).map(($)=>U4($,J)).join(" ")},U4=(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})},B4=(q,J)=>{return q.trim().split(/\s+/).map(($)=>G4($,J)).join(" ")},G4=(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})},H4=(q,J)=>{return R("replaceXRanges",q,J),q.split(/\s+/).map(($)=>I4($,J)).join(" ")},I4=(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),j=P||y(B),f=j;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(j)W=`>=${Y}.${K}.0${H} <${Y}.${+K+1}.0-0`;return R("xRange return",W),W})},F4=(q,J)=>{return R("replaceStars",q,J),q.trim().replace(C[T.STAR],"")},N4=(q,J)=>{return R("replaceGTE0",q,J),q.trim().replace(C[J.includePrerelease?T.GTE0PRE:T.GTE0],"")},X4=(q)=>(J,$,W,Z,Y,K,B,H,I,P,j,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(j))H=`<${I}.${+P+1}.0-0`;else if(f)H=`<=${I}.${P}.${j}-${f}`;else if(q)H=`<${I}.${P}.${+j+1}-0`;else H=`<=${H}`;return`${$} ${H}`.trim()},V4=(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 m1=L((K9,g1)=>{var A4=C2(),P4=(q,J,$)=>{try{J=new A4(J,$)}catch(W){return!1}return J.test(q)};g1.exports=P4});var k2=L((U9,L4)=>{L4.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.5",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>","Don Denton <don@happycollision.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.3"},optionalDependencies:{"@img/sharp-darwin-arm64":"0.33.5","@img/sharp-darwin-x64":"0.33.5","@img/sharp-libvips-darwin-arm64":"1.0.4","@img/sharp-libvips-darwin-x64":"1.0.4","@img/sharp-libvips-linux-arm":"1.0.5","@img/sharp-libvips-linux-arm64":"1.0.4","@img/sharp-libvips-linux-s390x":"1.0.4","@img/sharp-libvips-linux-x64":"1.0.4","@img/sharp-libvips-linuxmusl-arm64":"1.0.4","@img/sharp-libvips-linuxmusl-x64":"1.0.4","@img/sharp-linux-arm":"0.33.5","@img/sharp-linux-arm64":"0.33.5","@img/sharp-linux-s390x":"0.33.5","@img/sharp-linux-x64":"0.33.5","@img/sharp-linuxmusl-arm64":"0.33.5","@img/sharp-linuxmusl-x64":"0.33.5","@img/sharp-wasm32":"0.33.5","@img/sharp-win32-ia32":"0.33.5","@img/sharp-win32-x64":"0.33.5"},devDependencies:{"@emnapi/runtime":"^1.2.0","@img/sharp-libvips-dev":"1.0.4","@img/sharp-libvips-dev-wasm32":"1.0.5","@img/sharp-libvips-win32-ia32":"1.0.4","@img/sharp-libvips-win32-x64":"1.0.4","@types/node":"*",async:"^3.2.5",cc:"^3.0.1",emnapi:"^1.2.0","exif-reader":"^2.0.1","extract-zip":"^2.0.1",icc:"^3.0.0","jsdoc-to-markdown":"^8.0.3","license-checker":"^25.0.1",mocha:"^10.7.3","node-addon-api":"^8.1.0",nyc:"^17.0.0",prebuild:"^13.0.1",semistandard:"^17.0.0","tar-fs":"^3.0.6",tsd:"^0.31.1"},license:"Apache-2.0",engines:{node:"^18.17.0 || ^20.3.0 || >=21.0.0"},config:{libvips:">=8.15.3"},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 x2=L((B9,t1)=>{var{spawnSync:N2}=import.meta.require("child_process"),{createHash:_4}=import.meta.require("crypto"),a1=G1(),R4=T2(),D4=m1(),u1=import.meta.require("detect-libc"),{config:j4,engines:l1,optionalDependencies:z4}=k2(),E4=process.env.npm_package_config_libvips||j4.libvips,r1=a1(E4).version,T4=["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},y4=(q)=>{if(q instanceof Error)console.error(`sharp: Installation error: ${q.message}`);else console.log(`sharp: ${q}`)},e1=()=>u1.isNonGlibcLinuxSync()?u1.familySync():"",w4=()=>`${process.platform}${e1()}-${process.arch}`,p=()=>{if(p1())return"wasm32";const{npm_config_arch:q,npm_config_platform:J,npm_config_libc:$}=process.env,W=typeof $==="string"?$:e1();return`${J||process.platform}${W}-${q||process.arch}`},C4=()=>{try{return import.meta.require(`@img/sharp-libvips-dev-${p()}/include`)}catch{try{return (()=>{throw new Error(`Cannot require module "@img/sharp-libvips-dev/include"`);})()}catch{}}return""},S4=()=>{try{return (()=>{throw new Error(`Cannot require module "@img/sharp-libvips-dev/cplusplus"`);})()}catch{}return""},k4=()=>{try{return import.meta.require(`@img/sharp-libvips-dev-${p()}/lib`)}catch{try{return import.meta.require(`@img/sharp-libvips-${p()}/lib`)}catch{}}return""},M4=()=>{if(process.release?.name==="node"&&process.versions){if(!D4(process.versions.node,l1.node))return{found:process.versions.node,expected:l1.node}}},p1=()=>{const{CC:q}=process.env;return Boolean(q&&q.endsWith("/emcc"))},x4=()=>{if(process.platform==="darwin"&&process.arch==="x64")return(N2("sysctl sysctl.proc_translated",X2).stdout||"").trim()==="sysctl.proc_translated: 1";return!1},c1=(q)=>_4("sha512").update(q).digest("hex"),f4=()=>{try{const q=c1(`imgsharp-libvips-${p()}`),J=a1(z4[`@img/sharp-libvips-${p()}`]).version;return c1(`${q}npm:${J}`).slice(0,10)}catch{}return""},d4=()=>N2(`node-gyp rebuild --directory=src ${p1()?"--nodedir=emscripten":""}`,{...X2,stdio:"inherit"}).status,n1=()=>{if(process.platform!=="win32")return(N2("pkg-config --modversion vips-cpp",{...X2,env:{...process.env,PKG_CONFIG_PATH:s1()}}).stdout||"").trim();else return""},s1=()=>{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,$)=>{if($)$(`Detected ${J}, skipping search for globally-installed libvips`);return q},v4=(q)=>{if(Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS)===!0)return M2(!1,"SHARP_IGNORE_GLOBAL_LIBVIPS",q);if(Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS)===!0)return M2(!0,"SHARP_FORCE_GLOBAL_LIBVIPS",q);if(x4())return M2(!1,"Rosetta",q);const J=n1();return!!J&&R4(J,r1)};t1.exports={minimumLibvipsVersion:r1,prebuiltPlatforms:T4,buildPlatformArch:p,buildSharpLibvipsIncludeDir:C4,buildSharpLibvipsCPlusPlusDir:S4,buildSharpLibvipsLibDir:k4,isUnsupportedNodeRuntime:M4,runtimePlatformArch:w4,log:y4,yarnLocator:f4,spawnRebuild:d4,globalLibvipsVersion:n1,pkgConfigPath:s1,useGlobalLibvips:v4}});var W2=L((G9,o1)=>{var{familySync:O4,versionSync:b4}=import.meta.require("detect-libc"),{runtimePlatformArch:h4,isUnsupportedNodeRuntime:i1,prebuiltPlatforms:g4,minimumLibvipsVersion:m4}=x2(),c=h4(),u4=[`../src/build/Release/sharp-${c}.node`,"../src/build/Release/sharp-wasm32.node",`@img/sharp-${c}/sharp.node`,"@img/sharp-wasm32/sharp.node"],f2,V2=[];for(let q of u4)try{f2=import.meta.require(q);break}catch(J){V2.push(J)}if(f2)o1.exports=f2;else{const[q,J,$]=["linux","darwin","win32"].map((Y)=>c.startsWith(Y)),W=[`Could not load the "sharp" module using the ${c} 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:"),i1()){const{found:Y,expected:K}=i1();W.push("- Please upgrade Node.js:",` Found ${Y}`,` Requires ${K}`)}else if(g4.includes(c)){const[Y,K]=c.split("-"),B=Y.endsWith("musl")?" --libc=musl":"";W.push("- Ensure optional dependencies can be installed:"," npm install --include=optional sharp","- 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 >= ${m4}`,"- 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{config:Y}=import.meta.require(`@img/sharp-libvips-${c}/package`),K=`${O4()} ${b4()}`,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 J5=L((H9,q5)=>{function r4(){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}var l4=import.meta.require("util"),d2=import.meta.require("stream"),c4=d();W2();var a4=l4.debuglog("sharp"),a=function(q,J){if(arguments.length===1&&!c4.defined(q))throw new Error("Invalid input");if(!(this instanceof a))return new a(q,J);return d2.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,precision:"integer",minAmpl:0.2,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",$),a4($)},queueListener:function($){a.queue.emit("change",$)}},this.options.input=this._createInputDescriptor(q,J,{allowStream:!0}),this};Object.setPrototypeOf(a.prototype,d2.Duplex.prototype);Object.setPrototypeOf(a,d2.Duplex);Object.assign(a.prototype,{clone:r4});q5.exports=a});var v2=L((I9,$5)=>{$5.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 Z5=L((F9,W5)=>{W5.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 K5=L((N9,Y5)=>{var e4=Z5(),p4=Array.prototype.concat,n4=Array.prototype.slice,Q5=Y5.exports=function q(J){var $=[];for(var W=0,Z=J.length;W<Z;W++){var Y=J[W];if(e4(Y))$=p4.call($,n4.call(Y));else $.push(Y)}return $};Q5.wrap=function(q){return function(){return q(Q5(arguments))}}});var H5=L((X9,G5)=>{function g(q,J,$){return Math.min(Math.max(J,q),$)}function P2(q){var J=Math.round(q).toString(16).toUpperCase();return J.length<2?"0"+J:J}var Z2=v2(),Q2=K5(),U5=Object.hasOwnProperty,B5=Object.create(null);for(A2 in Z2)if(U5.call(Z2,A2))B5[Z2[A2]]=A2;var A2,S=G5.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(!U5.call(Z2,B[1]))return null;return K=Z2[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=Q2(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=Q2(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=Q2(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=Q2(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=Q2(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 B5[q.slice(0,3)]}});var O2=L((V9,F5)=>{function s4(q,J){return(q[0]-J[0])**2+(q[1]-J[1])**2+(q[2]-J[2])**2}var Y2=v2(),I5={};for(let q of Object.keys(Y2))I5[Y2[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"]}};F5.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),j=function(f){return(I-f)/6/P+0.5};if(P===0)Z=0,Y=0;else{if(Y=P/I,J=j(K),$=j(B),W=j(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=I5[q];if(J)return J;let $=1/0,W;for(let Z of Object.keys(Y2)){const Y=Y2[Z],K=s4(q,Y);if(K<$)$=K,W=Z}return W};X.keyword.rgb=function(q){return Y2[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,j;switch(K){default:case 6:case 0:I=B,P=H,j=$;break;case 1:I=H,P=B,j=$;break;case 2:I=$,P=B,j=H;break;case 3:I=$,P=H,j=B;break;case 4:I=H,P=$,j=B;break;case 5:I=B,P=$,j=H;break}return[I*255,P*255,j*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 X5=L((A9,N5)=>{function t4(){const q={},J=Object.keys(L2);for(let $=J.length,W=0;W<$;W++)q[J[W]]={distance:-1,parent:null};return q}function i4(q){const J=t4(),$=[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}function o4(q,J){return function($){return J(q($))}}function q3(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=o4(L2[J[Z].parent][Z],W),Z=J[Z].parent;return W.conversion=$,W}var L2=O2();N5.exports=function(q){const J=i4(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]=q3(K,J)}return $}});var A5=L((P9,V5)=>{function W3(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}function Z3(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}var b2=O2(),J3=X5(),n={},$3=Object.keys(b2);$3.forEach((q)=>{n[q]={},Object.defineProperty(n[q],"channels",{value:b2[q].channels}),Object.defineProperty(n[q],"labels",{value:b2[q].labels});const J=J3(q);Object.keys(J).forEach((W)=>{const Z=J[W];n[q][W]=Z3(Z),n[q][W].raw=W3(Z)})});V5.exports=n});var R2=L((L9,L5)=>{function E(q,J){if(!(this instanceof E))return new E(q,J);if(J&&J in P5)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=s.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=g2(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 h2))throw new Error("Unable to parse color from object: "+JSON.stringify(q));this.model=h2[Y];const{labels:K}=k[this.model],B=[];for($=0;$<K.length;$++)B.push(q[K[$]]);this.color=g2(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)}function Q3(q,J){return Number(q.toFixed(J))}function Y3(q){return function(J){return Q3(J,q)}}function D(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}}function z(q){return function(J){return Math.max(0,Math.min(q,J))}}function K3(q){return Array.isArray(q)?q:[q]}function g2(q,J){for(let $=0;$<J;$++)if(typeof q[$]!=="number")q[$]=0;return q}var s=H5(),k=A5(),P5=["keyword","gray","hex"],h2={};for(let q of Object.keys(k))h2[[...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 s.to?this:this.rgb();J=J.round(typeof q==="number"?q:1);const $=J.valpha===1?J.color:[...J.color,this.valpha];return s.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 s.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(Y3(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:D("rgb",0,z(255)),green:D("rgb",1,z(255)),blue:D("rgb",2,z(255)),hue:D(["hsl","hsv","hsl","hwb","hcg"],0,(q)=>(q%360+360)%360),saturationl:D("hsl",1,z(100)),lightness:D("hsl",2,z(100)),saturationv:D("hsv",1,z(100)),value:D("hsv",2,z(100)),chroma:D("hcg",1,z(100)),gray:D("hcg",2,z(100)),white:D("hwb",1,z(100)),wblack:D("hwb",2,z(100)),cyan:D("cmyk",0,z(100)),magenta:D("cmyk",1,z(100)),yellow:D("cmyk",2,z(100)),black:D("cmyk",3,z(100)),x:D("xyz",0,z(95.047)),y:D("xyz",1,z(100)),z:D("xyz",2,z(108.833)),l:D("lab",0,z(100)),a:D("lab",1),b:D("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 s.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 s.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(P5.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([...K3(k[this.model][q].raw(this.color)),this.valpha],q)},E[q]=function(...$){let W=$[0];if(typeof W==="number")W=g2($,J);return new E(W,q)}}L5.exports=E});var D5=L((_9,R5)=>{function _5(q){const{raw:J,density:$,limitInputPixels:W,ignoreIcc:Z,unlimited:Y,sequentialRead:K,failOn:B,failOnError:H,animated:I,page:P,pages:j,subifd:f}=q;return[J,$,W,Z,Y,K,B,H,I,P,j,f].some(G.defined)?{raw:J,density:$,limitInputPixels:W,ignoreIcc:Z,unlimited:Y,sequentialRead:K,failOn:B,failOnError:H,animated:I,page:P,pages:j,subifd:f}:void 0}function G3(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,_5(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=U3(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}function H3(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"))}function I3(){if(this._isStreamInput())this.options.input.buffer=Buffer.concat(this.options.input.buffer)}function F3(){return Array.isArray(this.options.input.buffer)}function N3(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)})})}function X3(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)})})}var U3=R2(),G=d(),m=W2(),B3={left:"low",center:"centre",centre:"centre",right:"high"};R5.exports=function(q){Object.assign(q.prototype,{_inputOptionsFromObject:_5,_createInputDescriptor:G3,_write:H3,_flattenBufferIn:I3,_isStreamInput:F3,metadata:N3,stats:X3}),q.align=B3}});var w5=L((R9,y5)=>{function u2(q){return q.angle%360!==0||q.useExifOrientation===!0||q.rotationAngle!==0}function D2(q){return q.width!==-1||q.height!==-1}function P3(q,J,$){if(D2(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=A3[$.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:T5[$.position]||E5[$.position]||z5[$.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(m2[$.kernel]))this.options.kernel=m2[$.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(u2(this.options)&&D2(this.options))this.options.rotateBeforePreExtract=!0;return this}function L3(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(j5[q.extendWith]))this.options.extendWith=j5[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}function _3(q){const J=D2(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),u2(this.options)&&!D2(this.options)){if(this.options.widthPre===-1||this.options.widthPost===-1)this.options.rotateBeforePreExtract=!0}return this}function R3(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(u2(this.options))this.options.rotateBeforePreExtract=!0;return this}var V=d(),z5={center:0,centre:0,north:1,east:2,south:3,west:4,northeast:5,southeast:6,southwest:7,northwest:8},E5={top:1,right:2,bottom:3,left:4,"right top":5,"right bottom":6,"left bottom":7,"left top":8},j5={background:"background",copy:"copy",repeat:"repeat",mirror:"mirror"},T5={entropy:16,attention:17},m2={nearest:"nearest",linear:"linear",cubic:"cubic",mitchell:"mitchell",lanczos2:"lanczos2",lanczos3:"lanczos3"},V3={contain:"contain",cover:"cover",fill:"fill",inside:"inside",outside:"outside"},A3={contain:"embed",cover:"crop",fill:"ignore_aspect",inside:"max",outside:"min"};y5.exports=function(q){Object.assign(q.prototype,{resize:P3,extend:L3,extract:_3,trim:R3}),q.gravity=z5,q.strategy=T5,q.kernel=m2,q.fit=V3,q.position=E5}});var S5=L((D9,C5)=>{function D3(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(l2[J.blend]))W.blend=l2[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}var _=d(),l2={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"};C5.exports=function(q){q.prototype.composite=D3,q.blend=l2}});var x5=L((j9,M5)=>{function z3(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 $=j3(J.background);this.options.rotationBackground=[$.red(),$.green(),$.blue(),Math.round($.alpha()*255)]}}else throw U.invalidParameterError("angle","numeric",q);return this}function E3(q){return this.options.flip=U.bool(q)?q:!0,this}function T3(q){return this.options.flop=U.bool(q)?q:!0,this}function y3(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}function w3(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}function C3(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}function S3(q){let J;if(U.number(q))J=q;else if(U.plainObject(q)){if(!U.number(q.sigma))throw U.invalidParameterError("options.sigma","number between 0.3 and 1000",J);if(J=q.sigma,"precision"in q)if(U.string(k5[q.precision]))this.options.precision=k5[q.precision];else throw U.invalidParameterError("precision","one of: integer, float, approximate",q.precision);if("minAmplitude"in q)if(U.number(q.minAmplitude)&&U.inRange(q.minAmplitude,0.001,1))this.options.minAmpl=q.minAmplitude;else throw U.invalidParameterError("minAmplitude","number between 0.001 and 1",q.minAmplitude)}if(!U.defined(q))this.options.blurSigma=-1;else if(U.bool(q))this.options.blurSigma=q?-1:0;else if(U.number(J)&&U.inRange(J,0.3,1000))this.options.blurSigma=J;else throw U.invalidParameterError("sigma","number between 0.3 and 1000",J);return this}function k3(q){if(this.options.flatten=U.bool(q)?q:!0,U.object(q))this._setBackgroundColourOption("flattenBackground",q.background);return this}function M3(){return this.options.unflatten=!0,this}function x3(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}function f3(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}function d3(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}function v3(q){return this.normalise(q)}function O3(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}function b3(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}function h3(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}function g3(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}function m3(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}function u3(q){if(!Array.isArray(q))throw U.invalidParameterError("inputMatrix","array",q);if(q.length!==3&&q.length!==4)throw U.invalidParameterError("inputMatrix","3x3 or 4x4 array",q.length);const J=q.flat().map(Number);if(J.length!==9&&J.length!==16)throw U.invalidParameterError("inputMatrix","cardinality of 9 or 16",J.length);return this.options.recombMatrix=J,this}function l3(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}var j3=R2(),U=d(),k5={integer:"integer",float:"float",approximate:"approximate"};M5.exports=function(q){Object.assign(q.prototype,{rotate:z3,flip:E3,flop:T3,affine:y3,sharpen:w3,median:C3,blur:S3,flatten:k3,unflatten:M3,gamma:x3,negate:f3,normalise:d3,normalize:v3,clahe:O3,convolve:b3,threshold:h3,boolean:g3,linear:m3,recomb:u3,modulate:l3})}});var v5=L((z9,d5)=>{function a3(q){return this._setBackgroundColourOption("tint",q),this}function r3(q){return this.options.greyscale=b.bool(q)?q:!0,this}function e3(q){return this.greyscale(q)}function p3(q){if(!b.string(q))throw b.invalidParameterError("colourspace","string",q);return this.options.colourspacePipeline=q,this}function n3(q){return this.pipelineColourspace(q)}function s3(q){if(!b.string(q))throw b.invalidParameterError("colourspace","string",q);return this.options.colourspace=q,this}function t3(q){return this.toColourspace(q)}function i3(q,J){if(b.defined(J))if(b.object(J)||b.string(J)){const $=c3(J);this.options[q]=[$.red(),$.green(),$.blue(),Math.round($.alpha()*255)]}else throw b.invalidParameterError("background","object or string",J)}var c3=R2(),b=d(),f5={multiband:"multiband","b-w":"b-w",bw:"b-w",cmyk:"cmyk",srgb:"srgb"};d5.exports=function(q){Object.assign(q.prototype,{tint:a3,greyscale:r3,grayscale:e3,pipelineColourspace:p3,pipelineColorspace:n3,toColourspace:s3,toColorspace:t3,_setBackgroundColourOption:i3}),q.colourspace=f5,q.colorspace=f5}});var b5=L((E9,O5)=>{function q8(){return this.options.removeAlpha=!0,this}function J8(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}function $8(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}function W8(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}function Z8(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}var v=d(),o3={and:"and",or:"or",eor:"eor"};O5.exports=function(q){Object.assign(q.prototype,{removeAlpha:q8,ensureAlpha:J8,extractChannel:$8,joinChannel:W8,bandbool:Z8}),q.bool=o3}});var c5=L((T9,l5)=>{function Y8(q,J){let $;if(!Q.string(q))$=new Error("Missing output file path");else if(Q.string(this.options.input.file)&&c2.resolve(this.options.input.file)===c2.resolve(q))$=new Error("Cannot use same file for input and output");else if(Q8.test(c2.extname(q))&&!this.constructor.format.jp2k.output.file)$=g5();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}function K8(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,$)}function U8(){return this.options.keepMetadata|=1,this}function B8(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()}function G8(q){return this.withExif(q),this.options.withExifMerge=!0,this}function H8(){return this.options.keepMetadata|=8,this}function I8(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&=-9}else throw Q.invalidParameterError("attach","boolean",J.attach)}return this}function F8(){return this.options.keepMetadata=31,this}function N8(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}function X8(q,J){const $=h5.get((Q.object(q)&&Q.string(q.id)?q.id:q).toLowerCase());if(!$)throw Q.invalidParameterError("format",`one of: ${[...h5.keys()].join(", ")}`,q);return this[$](J)}function V8(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)}function A8(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=m5(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)}function P8(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 u5(q,this.options),this._updateFormatOut("webp",q)}function L8(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=m5(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 u5(q,this.options),this._updateFormatOut("gif",q)}function _8(q){if(!this.constructor.format.jp2k.output.buffer)throw g5();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)}function u5(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)}function R8(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)}function D8(q){return this.heif({...q,compression:"av1"})}function j8(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)}function z8(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)}function E8(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")}function T8(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")}function y8(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}function w8(q,J){if(!(Q.object(J)&&J.force===!1))this.options.formatOut=q;return this}function C8(q,J){if(Q.bool(J))this.options[q]=J;else throw Q.invalidParameterError(q,"boolean",J)}function S8(){if(!this.options.streamOut){this.options.streamOut=!0;const q=Error();this._pipeline(void 0,q)}}function k8(q,J){if(typeof q==="function"){if(this._isStreamInput())this.on("finish",()=>{this._flattenBufferIn(),t.pipeline(this.options,($,W,Z)=>{if($)q(Q.nativeError($,J));else q(null,W,Z)})});else t.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(),t.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 t.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(),t.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)=>{t.pipeline(this.options,(Z,Y,K)=>{if(Z)W(Q.nativeError(Z,J));else if(this.options.resolveWithObject)$({data:Y,info:K});else $(Y)})})}var c2=import.meta.require("path"),Q=d(),t=W2(),h5=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"]]),Q8=/\.(jp[2x]|j2[kc])$/i,g5=()=>new Error("JP2 output requires libvips with support for OpenJPEG"),m5=(q)=>1<<31-Math.clz32(Math.ceil(Math.log2(q)));l5.exports=function(q){Object.assign(q.prototype,{toFile:Y8,toBuffer:K8,keepExif:U8,withExif:B8,withExifMerge:G8,keepIccProfile:H8,withIccProfile:I8,keepMetadata:F8,withMetadata:N8,toFormat:X8,jpeg:V8,jp2:_8,png:A8,webp:P8,tiff:R8,avif:D8,heif:j8,jxl:z8,gif:L8,raw:E8,tile:T8,timeout:y8,_updateFormatOut:w8,_setBooleanOption:C8,_read:S8,_pipeline:k8})}});var p5=L((y9,e5)=>{function r5(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()}function d8(q){return w.concurrency(M.integer(q)?q:null)}function O8(){return w.counters()}function b8(q){return w.simd(M.bool(q)?q:null)}function h8(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)}function g8(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)}var M8=import.meta.require("events"),j2=import.meta.require("detect-libc"),M=d(),{runtimePlatformArch:x8}=x2(),w=W2(),a5=x8(),a2=w.libvipsVersion(),u=w.format();u.heif.output.alias=["avif","heic"];u.jpeg.output.alias=["jpe","jpg"];u.tiff.output.alias=["tif"];u.jp2k.output.alias=["j2c","j2k","jp2","jpx"];var f8={nearest:"nearest",bilinear:"bilinear",bicubic:"bicubic",locallyBoundedBicubic:"lbb",nohalo:"nohalo",vertexSplitQuadraticBasisSpline:"vsqbs"},i={vips:a2.semver};if(!a2.isGlobal)if(!a2.isWasm)try{i=import.meta.require(`@img/sharp-${a5}/versions`)}catch(q){try{i=import.meta.require(`@img/sharp-libvips-${a5}/versions`)}catch(J){}}else try{i=(()=>{throw new Error(`Cannot require module "@img/sharp-wasm32/versions"`);})()}catch(q){}i.sharp=k2().version;if(i.heif&&u.heif)u.heif.input.fileSuffix=[".avif"],u.heif.output.alias=["avif"];r5(!0);if(j2.familySync()===j2.GLIBC&&!w._isUsingJemalloc())w.concurrency(1);else if(j2.familySync()===j2.MUSL&&w.concurrency()===1024)w.concurrency(import.meta.require("os").availableParallelism());var v8=new M8.EventEmitter;e5.exports=function(q){q.cache=r5,q.concurrency=d8,q.counters=O8,q.simd=b8,q.format=u,q.interpolators=f8,q.versions=i,q.queue=v8,q.block=h8,q.unblock=g8}});var m8=L((w9,n5)=>{var h=J5();D5()(h);w5()(h);S5()(h);x5()(h);v5()(h);b5()(h);c5()(h);p5()(h);n5.exports=h});
|
|
2
|
-
export{m8 as N};
|
|
3
|
-
|
|
4
|
-
//# debugId=C3C33B130796057C64756E2164756E21
|
package/dist/chunk-g290rywa.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{K as F,L as le}from"./chunk-6wj5qxwf.js";import{Db as _}from"./chunk-8vjfr0mp.js";var ye=le((Br,me)=>{var{defineProperty:D,getOwnPropertyDescriptor:dt,getOwnPropertyNames:lt}=Object,ht=Object.prototype.hasOwnProperty,Y=(e,t)=>D(e,"name",{value:t,configurable:!0}),pt=(e,t)=>{for(var r in t)D(e,r,{get:t[r],enumerable:!0})},mt=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of lt(t))if(!ht.call(e,o)&&o!==r)D(e,o,{get:()=>t[o],enumerable:!(n=dt(t,o))||n.enumerable})}return e},yt=(e)=>mt(D({},"__esModule",{value:!0}),e),he={};pt(he,{escapeUri:()=>pe,escapeUriPath:()=>wt});me.exports=yt(he);var pe=Y((e)=>encodeURIComponent(e).replace(/[!'()*]/g,gt),"escapeUri"),gt=Y((e)=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),wt=Y((e)=>e.split("/").map(pe).join("/"),"escapeUriPath")});var Oe=le((xo,De)=>{function Le(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 X)t[r/2]=X[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return t}function Pe(e){let t="";for(let r=0;r<e.byteLength;r++)t+=Ue[e[r]];return t}var{defineProperty:j,getOwnPropertyDescriptor:Ft,getOwnPropertyNames:Ut}=Object,Lt=Object.prototype.hasOwnProperty,ke=(e,t)=>j(e,"name",{value:t,configurable:!0}),Pt=(e,t)=>{for(var r in t)j(e,r,{get:t[r],enumerable:!0})},Dt=(e,t,r,n)=>{if(t&&typeof t==="object"||typeof t==="function"){for(let o of Ut(t))if(!Lt.call(e,o)&&o!==r)j(e,o,{get:()=>t[o],enumerable:!(n=Ft(t,o))||n.enumerable})}return e},Ot=(e)=>Dt(j({},"__esModule",{value:!0}),e),Fe={};Pt(Fe,{fromHex:()=>Le,toHex:()=>Pe});De.exports=Ot(Fe);var Ue={},X={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();if(t.length===1)t=`0${t}`;Ue[e]=t,X[t]=e}ke(Le,"fromHex");ke(Pe,"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,d)=>ce[d.step]-ce[f.step]||ae[d.priority||"normal"]-ae[f.priority||"normal"]),s=(a)=>{let f=!1;const d=(y)=>{const w=C(y.name,y.aliases);if(w.includes(a)){f=!0;for(let p of w)n.delete(p);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},c=(a)=>{let f=!1;const d=(y)=>{if(y.middleware===a){f=!0;for(let w of C(y.name,y.aliases))n.delete(w);return!1}return!0};return e=e.filter(d),t=t.filter(d),f},i=(a)=>{return e.forEach((f)=>{a.add(f.middleware,{...f})}),t.forEach((f)=>{a.addRelativeTo(f.middleware,{...f})}),a.identifyOnResolve?.(g.identifyOnResolve()),a},u=(a)=>{const f=[];return a.before.forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...u(d))}),f.push(a),a.after.reverse().forEach((d)=>{if(d.before.length===0&&d.after.length===0)f.push(d);else f.push(...u(d))}),f},h=(a=!1)=>{const f=[],d=[],y={};return e.forEach((p)=>{const m={...p,before:[],after:[]};for(let l of C(m.name,m.aliases))y[l]=m;f.push(m)}),t.forEach((p)=>{const m={...p,before:[],after:[]};for(let l of C(m.name,m.aliases))y[l]=m;d.push(m)}),d.forEach((p)=>{if(p.toMiddleware){const m=y[p.toMiddleware];if(m===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")m.after.push(p);if(p.relation==="before")m.before.push(p)}}),o(f).map(u).reduce((p,m)=>{return p.push(...m),p},[])},g={add:(a,f={})=>{const{name:d,override:y,aliases:w}=f,p={step:"initialize",priority:"normal",middleware:a,...f},m=C(d,w);if(m.length>0){if(m.some((l)=>n.has(l))){if(!y)throw new Error(`Duplicate middleware name '${S(d,w)}'`);for(let l of m){const E=e.findIndex((k)=>k.name===l||k.aliases?.some((q)=>q===l));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(d,w)}" middleware with ${p.priority} priority in ${p.step} step.`);e.splice(E,1)}}for(let l of m)n.add(l)}e.push(p)},addRelativeTo:(a,f)=>{const{name:d,override:y,aliases:w}=f,p={middleware:a,...f},m=C(d,w);if(m.length>0){if(m.some((l)=>n.has(l))){if(!y)throw new Error(`Duplicate middleware name '${S(d,w)}'`);for(let l of m){const E=t.findIndex((k)=>k.name===l||k.aliases?.some((q)=>q===l));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(d,w)}" middleware ${p.relation} "${p.toMiddleware}" middleware.`);t.splice(E,1)}}for(let l of m)n.add(l)}t.push(p)},clone:()=>i(A()),use:(a)=>{a.applyToStack(g)},remove:(a)=>{if(typeof a==="string")return s(a);else return c(a)},removeByTag:(a)=>{let f=!1;const d=(y)=>{const{tags:w,name:p,aliases:m}=y;if(w&&w.includes(a)){const l=C(p,m);for(let E of l)n.delete(E);return f=!0,!1}return!0};return e=e.filter(d),t=t.filter(d),f},concat:(a)=>{const f=i(A());return f.use(a),f.identifyOnResolve(r||f.identifyOnResolve()||(a.identifyOnResolve?.()??!1)),f},applyToStack:i,identify:()=>{return h(!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 d of h().map((y)=>y.middleware).reverse())a=d(a,f);if(r)console.log(g.identify());return a}};return g},ce={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},ae={high:3,normal:2,low:1};class at{constructor(e){this.config=e,this.middlewareStack=A()}send(e,t,r){const n=typeof t!=="function"?t:void 0,o=typeof t==="function"?t:r,s=n===void 0&&this.config.cacheMiddleware===!0;let c;if(s){if(!this.handlers)this.handlers=new WeakMap;const i=this.handlers;if(i.has(e.constructor))c=i.get(e.constructor);else c=e.resolveMiddleware(this.middlewareStack,this.config,n),i.set(e.constructor,c)}else delete this.handlers,c=e.resolveMiddleware(this.middlewareStack,this.config,n);if(o)c(e).then((i)=>o(null,i.output),(i)=>o(i)).catch(()=>{});else return c(e).then((i)=>i.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var fe=F(_(),1);class ue{constructor(){this.middlewareStack=A()}static classBuilder(){return new de}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,smithyContext:u,additionalContext:h,CommandCtor:g}){for(let w of n.bind(this)(g,e,t,r))this.middlewareStack.use(w);const a=e.concat(this.middlewareStack),{logger:f}=t,d={logger:f,clientName:o,commandName:s,inputFilterSensitiveLog:c,outputFilterSensitiveLog:i,[fe.SMITHY_CONTEXT_KEY]:{commandInstance:this,...u},...h},{requestHandler:y}=t;return a.resolve((w)=>y.handle(w.request,r||{}),d)}}class de{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 ue{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 Er=(e)=>{let t=e.httpHandler;return{setHttpHandler(r){t=r},httpHandler(){return t},updateHttpClientConfig(r,n){t.updateHttpClientConfig(r,n)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},xr=(e)=>{return{httpHandler:e.httpHandler()}};var ft=F(_(),1);function ut(e){return Object.keys(e).reduce((t,r)=>{const n=e[r];return{...t,[r]:Array.isArray(n)?[...n]:n}},{})}class V{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 V({...e,headers:{...e.headers}});if(t.query)t.query=ut(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 V.clone(this)}}class U{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 O=F(ye(),1);function B(e){const t=[];for(let r of Object.keys(e).sort()){const n=e[r];if(r=O.escapeUri(r),Array.isArray(n))for(let o=0,s=n.length;o<s;o++)t.push(`${r}=${O.escapeUri(n[o])}`);else{let o=r;if(n||typeof n==="string")o+=`=${O.escapeUri(n)}`;t.push(o)}}return t.join("&")}import{Agent as Te,request as bt}from"http";import{Agent as Se,request as Tt}from"https";var ge=["ECONNRESET","EPIPE","ETIMEDOUT"];var J=(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 we=(e,t,r=0)=>{if(!r)return-1;const n=(o)=>{const s=setTimeout(()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${r} ms`),{name:"TimeoutError"}))},r-o),c=(i)=>{if(i?.connecting)i.on("connect",()=>{clearTimeout(s)});else clearTimeout(s)};if(e.socket)c(e.socket);else e.on("socket",c)};if(r<2000)return n(0),0;return setTimeout(n.bind(null,1000),1000)};var Ee=(e,{keepAlive:t,keepAliveMsecs:r},n=3000)=>{if(t!==!0)return-1;const o=()=>{if(e.socket)e.socket.setKeepAlive(t,r||0);else e.on("socket",(s)=>{s.setKeepAlive(t,r||0)})};if(n===0)return o(),0;return setTimeout(o,n)};var xe=(e,t,r=0)=>{const n=(o)=>{e.setTimeout(r-o,()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${r} ms`),{name:"TimeoutError"}))})};if(0<r&&r<6000)return n(0),0;return setTimeout(n.bind(null,r===0?0:3000),3000)};import{Readable as Et}from"stream";async function Z(e,t,r=be){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(be,r)))}),new Promise((i)=>{e.on("continue",()=>{clearTimeout(s),i()}),e.on("error",()=>{c=!0,clearTimeout(s),i()})})]);if(!c)xt(e,t.body)}function xt(e,t){if(t instanceof Et){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()}var be=1000;class Q{static create(e){if(typeof e?.handle==="function")return e;return new Q(e)}static checkSocketUsage(e,t,r=console){const{sockets:n,requests:o,maxSockets:s}=e;if(typeof s!=="number"||s===1/0)return t;const c=15000;if(Date.now()-c<t)return t;if(n&&o)for(let i in n){const u=n[i]?.length??0,h=o[i]?.length??0;if(u>=s&&h>=2*s)return r?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${u} and ${h} 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 Te||typeof o?.destroy==="function")return o;return new Te({keepAlive:!0,maxSockets:50,...o})})(),httpsAgent:(()=>{if(s instanceof Se||typeof s?.destroy==="function")return s;return new Se({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;return new Promise((r,n)=>{let o=void 0;const s=[],c=async(l)=>{await o,s.forEach(clearTimeout),r(l)},i=async(l)=>{await o,s.forEach(clearTimeout),n(l)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const l=new Error("Request aborted");l.name="AbortError",i(l);return}const u=e.protocol==="https:",h=u?this.config.httpsAgent:this.config.httpAgent;s.push(setTimeout(()=>{this.socketWarningTimestamp=Q.checkSocketUsage(h,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const g=B(e.query||{});let a=void 0;if(e.username!=null||e.password!=null){const l=e.username??"",E=e.password??"";a=`${l}:${E}`}let f=e.path;if(g)f+=`?${g}`;if(e.fragment)f+=`#${e.fragment}`;let d=e.hostname??"";if(d[0]==="["&&d.endsWith("]"))d=e.hostname.slice(1,-1);else d=e.hostname;const y={headers:e.headers,host:d,method:e.method,path:f,port:e.port,agent:h,auth:a},p=(u?Tt:bt)(y,(l)=>{const E=new U({statusCode:l.statusCode||-1,reason:l.statusMessage,headers:J(l.headers),body:l});c({response:E})});if(p.on("error",(l)=>{if(ge.includes(l.code))i(Object.assign(l,{name:"TimeoutError"}));else i(l)}),t){const l=()=>{p.destroy();const E=new Error("Request aborted");E.name="AbortError",i(E)};if(typeof t.addEventListener==="function"){const E=t;E.addEventListener("abort",l,{once:!0}),p.once("close",()=>E.removeEventListener("abort",l))}else t.onabort=l}s.push(we(p,i,this.config.connectionTimeout)),s.push(xe(p,i,this.config.requestTimeout));const m=y.agent;if(typeof m==="object"&&"keepAlive"in m)s.push(Ee(p,{keepAlive:m.keepAlive,keepAliveMsecs:m.keepAliveMsecs}));o=Z(p,e,this.config.requestTimeout).catch((l)=>{return s.forEach(clearTimeout),n(l)})})}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((r)=>{return{...r,[e]:t}})}httpHandlerConfigs(){return this.config??{}}}import{Writable as St}from"stream";class G extends St{constructor(){super(...arguments);this.bufferedBytes=[]}_write(e,t,r){this.bufferedBytes.push(e),r()}}async function $t(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:u}=await r.read();if(u)t.push(u),o+=u.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 Ce=(e)=>{if(Ct(e))return $t(e);return new Promise((t,r)=>{const n=new G;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)})})},Ct=(e)=>typeof ReadableStream==="function"&&e instanceof ReadableStream;var Cn="***SensitiveInformation***";var An=(e,t)=>{for(let r of Object.keys(e)){const n=e[r],o=async function(c,i,u){const h=new n(c);if(typeof i==="function")this.send(h,i);else if(typeof u==="function"){if(typeof i!=="object")throw new Error(`Expected http options but got ${typeof i}`);this.send(h,i||{},u)}else return this.send(h,i)},s=(r[0].toLowerCase()+r.slice(1)).replace(/Command$/,"");t.prototype[s]=o}};class $e extends Error{constructor(e){super(e.message);Object.setPrototypeOf(this,$e.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}var Ae=(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 At{trace(){}debug(){}info(){}warn(){}error(){}}var Ie=(e)=>typeof ArrayBuffer==="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]";import{Buffer as K}from"buffer";var I=(e,t=0,r=e.byteLength-t)=>{if(!Ie(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return K.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?K.from(e,t):K.from(e)};var It=/^[A-Za-z0-9+/]*={0,2}$/,z=(e)=>{if(e.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!It.exec(e))throw new TypeError("Invalid base64 string.");const t=v(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)};var N=(e)=>{const t=v(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var vn=(e)=>{if(typeof e==="string")return N(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(e)};var W=(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 H=(e)=>{let t;if(typeof e==="string")t=N(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 Ne(e,t="utf-8"){if(t==="base64")return H(e);return W(e)}function Re(e,t){if(t==="base64")return T.mutate(z(e));return T.mutate(N(e))}class T extends Uint8Array{static fromString(e,t="utf-8"){switch(typeof e){case"string":return Re(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 Ne(this,e)}}import{Readable as Nt}from"stream";var io=(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,u=i?c(o,e):void 0,h=new Nt({read:()=>{}});return e.on("data",(g)=>{const a=n(g)||0;h.push(`${a.toString(16)}\r\n`),h.push(g),h.push("\r\n")}),e.on("end",async()=>{if(h.push("0\r\n"),i){const g=r(await u);h.push(`${s}:${g}\r\n`),h.push("\r\n")}h.push(null)}),h};import{Readable as ee}from"stream";import{TextDecoder as Bt}from"util";async function Rt(e){const t=await kt(e),r=z(t);return new Uint8Array(r)}async function Mt(e){const t=[],r=e.getReader();let n=!1,o=0;while(!n){const{done:i,value:u}=await r.read();if(u)t.push(u),o+=u.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}function kt(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)})}var Me=(e)=>{if(typeof Blob==="function"&&e instanceof Blob)return Rt(e);return Mt(e)};var ze=F(Oe(),1);var $=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);var Be="The stream has already been transformed.",We=(e)=>{if(!ve(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(Be);return t=!0,await Me(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 H(s);else if(o==="hex")return ze.toHex(s);else if(o===void 0||o==="utf8"||o==="utf-8")return W(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(Be);if(t=!0,ve(e))return n(e);else if($(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},ve=(e)=>typeof Blob==="function"&&e instanceof Blob;var He="The stream has already been transformed.",Fo=(e)=>{if(!(e instanceof ee))try{return We(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(He);return t=!0,await Ce(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 Bt(n).decode(o)},transformToWebStream:()=>{if(t)throw new Error(He);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof ee.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,ee.toWeb(e)}})};import{PassThrough as qe}from"stream";async function je(e){if(typeof e.stream==="function")e=e.stream();return e.tee()}async function Bo(e){if($(e))return je(e);const t=new qe,r=new qe;return e.pipe(t),e.pipe(r),[t,r]}import{Writable as vt}from"stream";async function _e(e,t){let r=0;const n=[],o=e.getReader();let s=!1;while(!s){const{done:u,value:h}=await o.read();if(h)n.push(h),r+=h?.byteLength??0;if(r>=t)break;s=u}o.releaseLock();const c=new Uint8Array(Math.min(t,r));let i=0;for(let u of n){if(u.byteLength>c.byteLength-i){c.set(u.subarray(0,c.byteLength-i),i);break}else c.set(u,i);i+=u.length}return c}var qo=(e,t)=>{if($(e))return _e(e,t);return new Promise((r,n)=>{const o=new Ve;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 Ve extends vt{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,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 es=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 rs=(e)=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}};var zt=(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))et.warn(Xe(`Expected number but observed string: ${e}`));return t}}if(typeof e==="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)},Wt=Math.ceil(340282346638528860000000000000000000000),Ye=(e)=>{const t=zt(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0){if(Math.abs(t)>Wt)throw new TypeError(`Expected 32-bit float, got ${e}`)}return t},te=(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 Je=(e)=>re(e,32),Ze=(e)=>re(e,16),Qe=(e)=>re(e,8),re=(e,t)=>{const r=te(e);if(r!==void 0&&Ht(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},Ht=(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]}},ns=(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},os=(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}`)},ss=(e)=>{if(e===null||e===void 0)return;if(typeof e==="string")return e;if(["boolean","number","bigint"].includes(typeof e))return et.warn(Xe(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)};var Ge=(e)=>{if(typeof e=="string")return Ye(L(e));return Ye(e)},jt=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,L=(e)=>{const t=e.match(jt);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)};var is=(e)=>{if(typeof e==="string")return te(L(e));return te(e)};var cs=(e)=>{if(typeof e==="string")return Je(L(e));return Je(e)},R=(e)=>{if(typeof e==="string")return Ze(L(e));return Ze(e)},Ke=(e)=>{if(typeof e==="string")return Qe(L(e));return Qe(e)},Xe=(e)=>{return String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((t)=>!t.includes("stackTraceWarning")).join("\n")},et={warn:console.warn};function ds(e){const t=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDay(),o=e.getUTCDate(),s=e.getUTCHours(),c=e.getUTCMinutes(),i=e.getUTCSeconds(),u=o<10?`0${o}`:`${o}`,h=s<10?`0${s}`:`${s}`,g=c<10?`0${c}`:`${c}`,a=i<10?`0${i}`:`${i}`;return`${qt[n]}, ${u} ${oe[r]} ${t} ${h}:${g}:${a} GMT`}var qt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],oe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_t=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),ls=(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=_t.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,u,h]=t,g=R(M(n)),a=b(o,"month",1,12),f=b(s,"day",1,31);return P(g,a,f,{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h})},Vt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),hs=(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=Vt.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[r,n,o,s,c,i,u,h,g]=t,a=R(M(n)),f=b(o,"month",1,12),d=b(s,"day",1,31),y=P(a,f,d,{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h});if(g.toUpperCase()!="Z")y.setTime(y.getTime()-nr(g));return y},Yt=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$/),Jt=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$/),Zt=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})$/),ps=(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=Yt.exec(e);if(t){const[r,n,o,s,c,i,u,h]=t;return P(R(M(s)),ne(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h})}if(t=Jt.exec(e),t){const[r,n,o,s,c,i,u,h]=t;return Kt(P(Qt(s),ne(o),b(n,"day",1,31),{hours:c,minutes:i,seconds:u,fractionalMilliseconds:h}))}if(t=Zt.exec(e),t){const[r,n,o,s,c,i,u,h]=t;return P(R(M(h)),ne(n),b(o.trimLeft(),"day",1,31),{hours:s,minutes:c,seconds:i,fractionalMilliseconds:u})}throw new TypeError("Invalid RFC-7231 date-time value")};var P=(e,t,r,n)=>{const o=t-1;return er(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),rr(n.fractionalMilliseconds)))},Qt=(e)=>{const t=new Date().getUTCFullYear(),r=Math.floor(t/100)*100+R(M(e));if(r<t)return r+100;return r},Gt=1576800000000,Kt=(e)=>{if(e.getTime()-new Date().getTime()>Gt)return new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()));return e},ne=(e)=>{const t=oe.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Xt=[31,28,31,30,31,30,31,31,30,31,30,31],er=(e,t,r)=>{let n=Xt[t];if(t===1&&tr(e))n=29;if(r>n)throw new TypeError(`Invalid day for ${oe[t]} in ${e}: ${r}`)},tr=(e)=>{return e%4===0&&(e%100!==0||e%400===0)},b=(e,t,r,n)=>{const o=Ke(M(e));if(o<r||o>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return o},rr=(e)=>{if(e===null||e===void 0)return 0;return Ge("0."+e)*1000},nr=(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 or=({output:e,parsedBody:t,exceptionCtor:r,errorCode:n})=>{const o=sr(e),s=o.httpStatusCode?o.httpStatusCode+"":void 0,c=new r({name:t?.code||t?.Code||n||s||"UnknownError",$fault:"client",$metadata:o});throw Ae(c,t)},gs=(e)=>{return({output:t,parsedBody:r,errorCode:n})=>{or({output:t,parsedBody:r,exceptionCtor:e,errorCode:n})}},sr=(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 Es=(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 tt=!1,bs=(e)=>{if(e&&!tt&&parseInt(e.substring(1,e.indexOf(".")))<16)tt=!0};var se=F(_(),1);var rt=(e)=>{const t=[];for(let r in se.AlgorithmId){const n=se.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}}},nt=(e)=>{const t={};return e.checksumAlgorithms().forEach((r)=>{t[r.algorithmId()]=r.checksumConstructor()}),t};var ot=(e)=>{let t=e.retryStrategy;return{setRetryStrategy(r){t=r},retryStrategy(){return t}}},st=(e)=>{const t={};return t.retryStrategy=e.retryStrategy(),t};var Is=(e)=>{return{...rt(e),...ot(e)}};var Ns=(e)=>{return{...nt(e),...st(e)}};function ir(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}var Us=(e)=>Array.isArray(e)?e:[e];var ie=function(){const e=Object.getPrototypeOf(this).constructor,r=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(r,e.prototype),r};ie.prototype=Object.create(String.prototype,{constructor:{value:ie,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(ie,String);function cr(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,ar(n,o,s);else s=t;for(let c of Object.keys(s)){if(!Array.isArray(s[c])){n[c]=s[c];continue}it(n,null,s,c)}return n}var Os=(e,t)=>{const r={};for(let n in t)it(r,e,t,n);return r},ar=(e,t,r)=>{return cr(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},{}))},it=(e,t,r,n)=>{if(t!==null){let c=r[n];if(typeof c==="function")c=[,c];const[i=fr,u=ur,h=n]=c;if(typeof i==="function"&&i(t[h])||typeof i!=="function"&&!!i)e[n]=u(t[h]);return}let[o,s]=r[n];if(typeof s==="function"){let c;const i=o===void 0&&(c=s())!=null,u=typeof o==="function"&&!!o(void 0)||typeof o!=="function"&&!!o;if(i)e[n]=c;else if(u)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}},fr=(e)=>e!=null,ur=(e)=>e;var Ws=(e)=>e.toISOString().replace(".000Z","Z");var ct=(e)=>{if(e==null)return{};if(Array.isArray(e))return e.filter((t)=>t!=null).map(ct);if(typeof e==="object"){const t={};for(let r of Object.keys(e)){if(e[r]==null)continue;t[r]=ct(e[r])}return t}return e};export{Er as Ga,xr as Ha,V as Ia,U as Ja,Ie as Ka,I as La,v as Ma,N as Na,vn as Oa,W as Pa,At as Qa,at as Ra,z as Sa,H as Ta,io as Ua,ye as Va,Q as Wa,Ce as Xa,Oe as Ya,Fo as Za,Bo as _a,qo as $a,es as ab,ue as bb,Cn as cb,An as db,rs as eb,te as fb,Je as gb,ns as hb,os as ib,ss as jb,is as kb,cs as lb,ds as mb,ls as nb,hs as ob,ps as pb,$e as qb,Ae as rb,gs as sb,Es as tb,bs as ub,Is as vb,Ns as wb,ir as xb,Us as yb,cr as zb,Os as Ab,Ws as Bb,ct as Cb};
|
|
4
|
-
|
|
5
|
-
//# debugId=4B439DE9E6E0220664756E2164756E21
|