@visulima/email 1.0.0 → 1.0.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## @visulima/email [1.0.1](https://github.com/visulima/visulima/compare/%40visulima%2Femail%401.0.0...%40visulima%2Femail%401.0.1) (2026-07-15)
2
+
3
+
4
+ ### Dependencies
5
+
6
+ * **@visulima/fs:** upgraded to 5.0.1
7
+
1
8
  ## @visulima/email 1.0.0 (2026-07-03)
2
9
 
3
10
  ### ⚠ BREAKING CHANGES
@@ -1 +1 @@
1
- import{arcMessageSignatureBase as m,arcSealBase as i,signArc as a,verifyArc as t}from"../packem_shared/arcMessageSignatureBase-BY4j0TxM.js";import{DkimSigner as c,createDkimSigner as n}from"../packem_shared/DkimSigner-BuSbnos1.js";import{SmimeEncrypter as g,createSmimeEncrypter as p}from"../packem_shared/SmimeEncrypter-C7usORKF.js";import{SmimeSigner as s,createSmimeSigner as x}from"../packem_shared/SmimeSigner-DgAApLPS.js";export{c as DkimSigner,g as SmimeEncrypter,s as SmimeSigner,m as arcMessageSignatureBase,i as arcSealBase,n as createDkimSigner,p as createSmimeEncrypter,x as createSmimeSigner,a as signArc,t as verifyArc};
1
+ import{arcMessageSignatureBase as m,arcSealBase as i,signArc as a,verifyArc as t}from"../packem_shared/arcMessageSignatureBase-DDLEHW2E.js";import{DkimSigner as c,createDkimSigner as n}from"../packem_shared/DkimSigner-CiLBaXrg.js";import{SmimeEncrypter as g,createSmimeEncrypter as p}from"../packem_shared/SmimeEncrypter-DavopRlE.js";import{SmimeSigner as s,createSmimeSigner as x}from"../packem_shared/SmimeSigner-0onWksAv.js";export{c as DkimSigner,g as SmimeEncrypter,s as SmimeSigner,m as arcMessageSignatureBase,i as arcSealBase,n as createDkimSigner,p as createSmimeEncrypter,x as createSmimeSigner,a as signArc,t as verifyArc};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{detectMimeType as a,generateContentId as t,readFileAsBuffer as o}from"./packem_shared/detectMimeType-Dxv4MjZ7.js";import{default as p}from"./packem_shared/DraftMailMessage-BxqGSLMN.js";import{default as m}from"./packem_shared/EmailError-B-sEf3bp.js";import{default as l}from"./packem_shared/RequiredOptionError-DuNNY_a5.js";import{Mail as u,createMail as x}from"./packem_shared/Mail-BEuzrB00.js";import{default as M}from"./packem_shared/MailMessage-D9k5gYrd.js";import{defineProvider as E}from"./packem_shared/defineProvider-C9q-7iwt.js";import{default as g}from"./utils/parse-eml.js";import{isErr as y,isOk as w,mapOk as A,tryAsync as F,unwrap as h,unwrapOr as q}from"./utils/result.js";import{default as B}from"./utils/validation/check-feature-support.js";export{p as DraftMailMessage,m as EmailError,u as Mail,M as MailMessage,l as RequiredOptionError,B as checkFeatureSupport,x as createMail,E as defineProvider,a as detectMimeType,t as generateContentId,y as isErr,w as isOk,A as mapOk,g as parseEml,o as readFileAsBuffer,F as tryAsync,h as unwrap,q as unwrapOr};
1
+ import{detectMimeType as a,generateContentId as t,readFileAsBuffer as o}from"./packem_shared/detectMimeType-DFH3kp6K.js";import{default as p}from"./packem_shared/DraftMailMessage-CGTVuy2z.js";import{default as m}from"./packem_shared/EmailError-B-sEf3bp.js";import{default as l}from"./packem_shared/RequiredOptionError-DuNNY_a5.js";import{Mail as u,createMail as x}from"./packem_shared/Mail-C1zp-fqt.js";import{default as M}from"./packem_shared/MailMessage-DQRgs5Dz.js";import{defineProvider as E}from"./packem_shared/defineProvider-C9q-7iwt.js";import{default as g}from"./utils/parse-eml.js";import{isErr as y,isOk as w,mapOk as A,tryAsync as F,unwrap as h,unwrapOr as q}from"./utils/result.js";import{default as B}from"./utils/validation/check-feature-support.js";export{p as DraftMailMessage,m as EmailError,u as Mail,M as MailMessage,l as RequiredOptionError,B as checkFeatureSupport,x as createMail,E as defineProvider,a as detectMimeType,t as generateContentId,y as isErr,w as isOk,A as mapOk,g as parseEml,o as readFileAsBuffer,F as tryAsync,h as unwrap,q as unwrapOr};
@@ -1,4 +1,4 @@
1
- import{createRequire as j}from"node:module";import{z as M}from"./index-yDU-1zOZ.js";import{s as x}from"./headers-to-record-De1Eg951.js";const b=j(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=o=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[e,t]=p.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return p.getBuiltinModule(o)}return b(o)},{createHash:h,createPrivateKey:w,sign:T,createSign:v}=C("node:crypto"),_=(o,e="simple")=>{const t=[];for(const[s,a]of Object.entries(o)){const n=e==="relaxed"?s.toLowerCase().trim():s,r=e==="relaxed"?a.replaceAll(/\s+/g," ").trim():a;t.push(`${n}:${r}`)}return t.join(`\r
1
+ import{createRequire as j}from"node:module";import{z as M}from"./index-BoZvzveg.js";import{s as x}from"./headers-to-record-De1Eg951.js";const b=j(import.meta.url),p=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,C=o=>{if(typeof p<"u"&&p.versions&&p.versions.node){const[e,t]=p.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return p.getBuiltinModule(o)}return b(o)},{createHash:h,createPrivateKey:w,sign:T,createSign:v}=C("node:crypto"),_=(o,e="simple")=>{const t=[];for(const[s,a]of Object.entries(o)){const n=e==="relaxed"?s.toLowerCase().trim():s,r=e==="relaxed"?a.replaceAll(/\s+/g," ").trim():a;t.push(`${n}:${r}`)}return t.join(`\r
2
2
  `)},z=(o,e="simple")=>{if(e==="simple"){const n=o.replace(/(\r\n|\r|\n)$/,`
3
3
  `);let r=n.length;for(;r>0&&n[r-1]===`
4
4
  `;)r-=1;const l=n.slice(0,r);return l?`${l}
@@ -1 +1 @@
1
- import s from"./MailMessage-D9k5gYrd.js";class r extends s{constructor(){super(),this.header("X-Unsent","1")}}export{r as default};
1
+ import s from"./MailMessage-DQRgs5Dz.js";class r extends s{constructor(){super(),this.header("X-Unsent","1")}}export{r as default};
@@ -1 +1 @@
1
- import h from"./DraftMailMessage-BxqGSLMN.js";import v from"./EmailError-B-sEf3bp.js";import f from"./MailMessage-D9k5gYrd.js";import{composeMiddleware as C}from"./composeMiddleware-BHwLLEzK.js";import{F as w}from"./build-mime-message-B6927SQy.js";import{c as M}from"./create-logger-BQTS3f-I.js";import{s as l}from"./headers-to-record-De1Eg951.js";import T from"../utils/validation/check-feature-support.js";const S=(i,e,r)=>{e.success&&e.data?i&&i.info("Email sent successfully",{messageId:e.data.messageId,provider:e.data.provider}):i&&i.error("Email send failed",{error:e.error,provider:r})},j=async(i,e,r)=>{const s={...i,to:e.to};return e.cc&&(s.cc=e.cc),e.bcc&&(s.bcc=e.bcc),e.replyTo&&(s.replyTo=e.replyTo),e.headers&&(s.headers={...l(i.headers??{}),...l(e.headers)}),s.subject=e.subject??i.subject,r&&e.data&&(s.subject=await r(s.subject,e.data),i.html!==void 0&&(s.html=await r(i.html,e.data)),i.text!==void 0&&(s.text=await r(i.text,e.data))),s};class u{static extractErrorMessages(e){return e instanceof Error?[e.message]:[String(e??"Unknown error")]}provider;logger;loggerInstance;globalConfig;featureCheck;middlewares=[];composedSend;mountedProviders=new Map;constructor(e,r){this.provider=e,this.featureCheck=r?.featureCheck??"error"}setLogger(e){return this.loggerInstance=e,this.logger=M("Mail",e),this}use(e){return this.middlewares.push(e),this.composedSend=void 0,this}mount(e,r){return this.mountedProviders.set(e,r),this}setFrom(e){return this.globalConfig??={},this.globalConfig.from=e,this.logger&&this.logger.debug("Default from address updated",{from:e.email}),this}setReplyTo(e){return this.globalConfig??={},this.globalConfig.replyTo=e,this.logger&&this.logger.debug("Default reply-to address updated",{replyTo:e.email}),this}setHeaders(e){if(this.globalConfig??={},this.globalConfig.headers=e,this.logger){const r=l(e);this.logger.debug("Default headers updated",{count:Object.keys(r).length,headers:Object.keys(r)})}return this}async draft(e){let r=e instanceof f||e instanceof h?await this.buildDraftFromMessage(e):await this.buildDraftFromOptions(e);r=this.applyGlobalConfig(r);const s=r.headers?l(r.headers):{};r.headers={...s,"X-Unsent":"1"};const t=await w(r,{includeBcc:!0});return this.logger&&this.logger.debug("Draft created successfully in EML format",{from:r.from.email,size:t.length,subject:r.subject,to:Array.isArray(r.to)?r.to.length:1}),t}async send(e){if(e instanceof h)throw new TypeError("Cannot send draft messages. Convert to MailMessage first or remove X-Unsent header.");let r;if(e instanceof f)this.logger&&this.logger.debug("Sending MailMessage instance"),this.loggerInstance&&e.setLogger(this.loggerInstance),r=await e.build();else{const o=e;this.logger&&this.logger.debug("Sending email with options",{subject:o.subject,to:Array.isArray(o.to)?o.to.length:1}),r=o}r=this.applyGlobalConfig(r);const s=this.assertFeatureSupport(r);if(s)return{error:s,success:!1};const t=await this.dispatch(r);return S(this.logger,t,this.provider.name??"unknown"),t}sendMany(e,r){const s=Math.max(1,Math.floor(r?.concurrency??1));return s===1?this.sendManySerial(e,r?.signal):this.sendManyConcurrent(e,s,r?.signal)}sendBatch(e,r,s){const t=async function*(){const o=e instanceof f?await e.build():e;for(const a of r)yield await j(o,a,s?.render)};return this.sendMany(t(),{concurrency:s?.concurrency,signal:s?.signal})}async sendOneToReceipt(e){const r=this.provider.name;try{const s=await this.send(e);return s.success&&s.data?{messageId:s.data.messageId,provider:s.data.provider??r,response:s.data.response,successful:!0,timestamp:s.data.timestamp}:{errorMessages:u.extractErrorMessages(s.error),provider:r,successful:!1}}catch(s){return{errorMessages:u.extractErrorMessages(s),provider:r,successful:!1}}}async*sendManySerial(e,r){const s=this.provider.name;let t=0,o=0,a=0;this.logger&&this.logger.debug("Starting batch email send",{provider:s});for await(const n of e){if(n instanceof h)throw new TypeError("Cannot send draft messages. Convert to MailMessage first or remove X-Unsent header.");if(r?.aborted){this.logger&&this.logger.warn("Batch send operation was aborted",{failed:a,processed:t,successful:o}),yield{errorMessages:["Send operation was aborted"],provider:s,successful:!1};return}t+=1;const g=await this.sendOneToReceipt(n);g.successful?o+=1:a+=1,yield g}this.logger&&this.logger.debug("Batch email send completed",{failureCount:a,processedCount:t,provider:s,successCount:o})}async*sendManyConcurrent(e,r,s){const t=this.provider.name;this.logger&&this.logger.debug("Starting concurrent batch email send",{concurrency:r,provider:t});const o=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator](),a=new Map;let n=0,g=!1,p=!1;const m=async()=>{for(;!g&&!p&&a.size<r;){const d=await o.next();if(d.done){g=!0;break}const c=d.value;if(c instanceof h)throw new TypeError("Cannot send draft messages. Convert to MailMessage first or remove X-Unsent header.");const b=n;n+=1,a.set(b,this.sendOneToReceipt(c).then(y=>({id:b,receipt:y})))}};for(await m();a.size>0;){if(s?.aborted){p=!0,yield{errorMessages:["Send operation was aborted"],provider:t,successful:!1};return}const{id:d,receipt:c}=await Promise.race(a.values());a.delete(d),yield c,await m()}this.logger&&this.logger.debug("Concurrent batch email send completed",{processedCount:n,provider:t})}async dispatch(e){return this.middlewares.length===0?await this.resolveProvider(e).sendEmail(e):(this.composedSend??=C(this.middlewares,r=>Promise.resolve(this.resolveProvider(r).sendEmail(r))),await this.composedSend(e))}resolveProvider(e){return e.stream!==void 0?this.mountedProviders.get(e.stream)??this.provider:this.provider}assertFeatureSupport(e){if(this.featureCheck==="off")return;const{supported:r,violations:s}=T(e,this.provider.features);if(r)return;const t=this.provider.name??"unknown",o=s.map(n=>n.field),a=s.map(n=>n.message);if(this.featureCheck==="warn"){this.logger&&this.logger.warn("Message uses capabilities the provider does not support",{fields:o,provider:t});return}return this.logger&&this.logger.error("Message rejected by capability guard",{fields:o,provider:t}),new v(t,`Provider does not support the following message fields: ${o.join(", ")}`,{code:"UNSUPPORTED_FEATURES",hint:a})}async buildDraftFromMessage(e){return this.logger&&this.logger.debug("Creating draft from MailMessage instance"),this.loggerInstance&&e.setLogger(this.loggerInstance),this.applyGlobalConfigToMessage(e),await e.build()}async buildDraftFromOptions(e){return this.logger&&this.logger.debug("Creating draft from email options",{subject:e.subject,to:Array.isArray(e.to)?e.to.length:1}),e}applyGlobalConfigToMessage(e){const r=this.globalConfig?.from;r&&!e.getFrom()&&e.from(r);const s=this.globalConfig?.replyTo;if(s&&!e.getReplyTo()&&e.replyTo(s),this.globalConfig?.headers){const t=l(this.globalConfig.headers);Object.entries(t).forEach(([o,a])=>{e.header(o,a)})}}applyGlobalConfig(e){if(!this.globalConfig)return e;const r={...e};if(!r.from&&this.globalConfig.from&&(r.from=this.globalConfig.from,this.logger&&this.logger.debug("Applied global from address",{from:this.globalConfig.from.email})),!r.replyTo&&this.globalConfig.replyTo&&(r.replyTo=this.globalConfig.replyTo,this.logger&&this.logger.debug("Applied global reply-to address",{replyTo:this.globalConfig.replyTo.email})),this.globalConfig.headers){const s=l(this.globalConfig.headers),t=r.headers?l(r.headers):{};r.headers={...s,...t},this.logger&&this.logger.debug("Merged global headers",{globalCount:Object.keys(s).length,messageCount:Object.keys(t).length})}return r}}const D=(i,e)=>new u(i,e);export{u as Mail,D as createMail};
1
+ import h from"./DraftMailMessage-CGTVuy2z.js";import v from"./EmailError-B-sEf3bp.js";import f from"./MailMessage-DQRgs5Dz.js";import{composeMiddleware as C}from"./composeMiddleware-BHwLLEzK.js";import{F as w}from"./build-mime-message-B6927SQy.js";import{c as M}from"./create-logger-BQTS3f-I.js";import{s as l}from"./headers-to-record-De1Eg951.js";import T from"../utils/validation/check-feature-support.js";const S=(i,e,r)=>{e.success&&e.data?i&&i.info("Email sent successfully",{messageId:e.data.messageId,provider:e.data.provider}):i&&i.error("Email send failed",{error:e.error,provider:r})},j=async(i,e,r)=>{const s={...i,to:e.to};return e.cc&&(s.cc=e.cc),e.bcc&&(s.bcc=e.bcc),e.replyTo&&(s.replyTo=e.replyTo),e.headers&&(s.headers={...l(i.headers??{}),...l(e.headers)}),s.subject=e.subject??i.subject,r&&e.data&&(s.subject=await r(s.subject,e.data),i.html!==void 0&&(s.html=await r(i.html,e.data)),i.text!==void 0&&(s.text=await r(i.text,e.data))),s};class u{static extractErrorMessages(e){return e instanceof Error?[e.message]:[String(e??"Unknown error")]}provider;logger;loggerInstance;globalConfig;featureCheck;middlewares=[];composedSend;mountedProviders=new Map;constructor(e,r){this.provider=e,this.featureCheck=r?.featureCheck??"error"}setLogger(e){return this.loggerInstance=e,this.logger=M("Mail",e),this}use(e){return this.middlewares.push(e),this.composedSend=void 0,this}mount(e,r){return this.mountedProviders.set(e,r),this}setFrom(e){return this.globalConfig??={},this.globalConfig.from=e,this.logger&&this.logger.debug("Default from address updated",{from:e.email}),this}setReplyTo(e){return this.globalConfig??={},this.globalConfig.replyTo=e,this.logger&&this.logger.debug("Default reply-to address updated",{replyTo:e.email}),this}setHeaders(e){if(this.globalConfig??={},this.globalConfig.headers=e,this.logger){const r=l(e);this.logger.debug("Default headers updated",{count:Object.keys(r).length,headers:Object.keys(r)})}return this}async draft(e){let r=e instanceof f||e instanceof h?await this.buildDraftFromMessage(e):await this.buildDraftFromOptions(e);r=this.applyGlobalConfig(r);const s=r.headers?l(r.headers):{};r.headers={...s,"X-Unsent":"1"};const t=await w(r,{includeBcc:!0});return this.logger&&this.logger.debug("Draft created successfully in EML format",{from:r.from.email,size:t.length,subject:r.subject,to:Array.isArray(r.to)?r.to.length:1}),t}async send(e){if(e instanceof h)throw new TypeError("Cannot send draft messages. Convert to MailMessage first or remove X-Unsent header.");let r;if(e instanceof f)this.logger&&this.logger.debug("Sending MailMessage instance"),this.loggerInstance&&e.setLogger(this.loggerInstance),r=await e.build();else{const o=e;this.logger&&this.logger.debug("Sending email with options",{subject:o.subject,to:Array.isArray(o.to)?o.to.length:1}),r=o}r=this.applyGlobalConfig(r);const s=this.assertFeatureSupport(r);if(s)return{error:s,success:!1};const t=await this.dispatch(r);return S(this.logger,t,this.provider.name??"unknown"),t}sendMany(e,r){const s=Math.max(1,Math.floor(r?.concurrency??1));return s===1?this.sendManySerial(e,r?.signal):this.sendManyConcurrent(e,s,r?.signal)}sendBatch(e,r,s){const t=async function*(){const o=e instanceof f?await e.build():e;for(const a of r)yield await j(o,a,s?.render)};return this.sendMany(t(),{concurrency:s?.concurrency,signal:s?.signal})}async sendOneToReceipt(e){const r=this.provider.name;try{const s=await this.send(e);return s.success&&s.data?{messageId:s.data.messageId,provider:s.data.provider??r,response:s.data.response,successful:!0,timestamp:s.data.timestamp}:{errorMessages:u.extractErrorMessages(s.error),provider:r,successful:!1}}catch(s){return{errorMessages:u.extractErrorMessages(s),provider:r,successful:!1}}}async*sendManySerial(e,r){const s=this.provider.name;let t=0,o=0,a=0;this.logger&&this.logger.debug("Starting batch email send",{provider:s});for await(const n of e){if(n instanceof h)throw new TypeError("Cannot send draft messages. Convert to MailMessage first or remove X-Unsent header.");if(r?.aborted){this.logger&&this.logger.warn("Batch send operation was aborted",{failed:a,processed:t,successful:o}),yield{errorMessages:["Send operation was aborted"],provider:s,successful:!1};return}t+=1;const g=await this.sendOneToReceipt(n);g.successful?o+=1:a+=1,yield g}this.logger&&this.logger.debug("Batch email send completed",{failureCount:a,processedCount:t,provider:s,successCount:o})}async*sendManyConcurrent(e,r,s){const t=this.provider.name;this.logger&&this.logger.debug("Starting concurrent batch email send",{concurrency:r,provider:t});const o=Symbol.asyncIterator in e?e[Symbol.asyncIterator]():e[Symbol.iterator](),a=new Map;let n=0,g=!1,p=!1;const m=async()=>{for(;!g&&!p&&a.size<r;){const d=await o.next();if(d.done){g=!0;break}const c=d.value;if(c instanceof h)throw new TypeError("Cannot send draft messages. Convert to MailMessage first or remove X-Unsent header.");const b=n;n+=1,a.set(b,this.sendOneToReceipt(c).then(y=>({id:b,receipt:y})))}};for(await m();a.size>0;){if(s?.aborted){p=!0,yield{errorMessages:["Send operation was aborted"],provider:t,successful:!1};return}const{id:d,receipt:c}=await Promise.race(a.values());a.delete(d),yield c,await m()}this.logger&&this.logger.debug("Concurrent batch email send completed",{processedCount:n,provider:t})}async dispatch(e){return this.middlewares.length===0?await this.resolveProvider(e).sendEmail(e):(this.composedSend??=C(this.middlewares,r=>Promise.resolve(this.resolveProvider(r).sendEmail(r))),await this.composedSend(e))}resolveProvider(e){return e.stream!==void 0?this.mountedProviders.get(e.stream)??this.provider:this.provider}assertFeatureSupport(e){if(this.featureCheck==="off")return;const{supported:r,violations:s}=T(e,this.provider.features);if(r)return;const t=this.provider.name??"unknown",o=s.map(n=>n.field),a=s.map(n=>n.message);if(this.featureCheck==="warn"){this.logger&&this.logger.warn("Message uses capabilities the provider does not support",{fields:o,provider:t});return}return this.logger&&this.logger.error("Message rejected by capability guard",{fields:o,provider:t}),new v(t,`Provider does not support the following message fields: ${o.join(", ")}`,{code:"UNSUPPORTED_FEATURES",hint:a})}async buildDraftFromMessage(e){return this.logger&&this.logger.debug("Creating draft from MailMessage instance"),this.loggerInstance&&e.setLogger(this.loggerInstance),this.applyGlobalConfigToMessage(e),await e.build()}async buildDraftFromOptions(e){return this.logger&&this.logger.debug("Creating draft from email options",{subject:e.subject,to:Array.isArray(e.to)?e.to.length:1}),e}applyGlobalConfigToMessage(e){const r=this.globalConfig?.from;r&&!e.getFrom()&&e.from(r);const s=this.globalConfig?.replyTo;if(s&&!e.getReplyTo()&&e.replyTo(s),this.globalConfig?.headers){const t=l(this.globalConfig.headers);Object.entries(t).forEach(([o,a])=>{e.header(o,a)})}}applyGlobalConfig(e){if(!this.globalConfig)return e;const r={...e};if(!r.from&&this.globalConfig.from&&(r.from=this.globalConfig.from,this.logger&&this.logger.debug("Applied global from address",{from:this.globalConfig.from.email})),!r.replyTo&&this.globalConfig.replyTo&&(r.replyTo=this.globalConfig.replyTo,this.logger&&this.logger.debug("Applied global reply-to address",{replyTo:this.globalConfig.replyTo.email})),this.globalConfig.headers){const s=l(this.globalConfig.headers),t=r.headers?l(r.headers):{};r.headers={...s,...t},this.logger&&this.logger.debug("Merged global headers",{globalCount:Object.keys(s).length,messageCount:Object.keys(t).length})}return r}}const D=(i,e)=>new u(i,e);export{u as Mail,D as createMail};
@@ -1 +1 @@
1
- import{createRequire as f}from"node:module";import{readFileAsBuffer as c,detectMimeType as d,generateContentId as u}from"./detectMimeType-Dxv4MjZ7.js";import{c as b}from"./create-logger-BQTS3f-I.js";import{s as l}from"./headers-to-record-De1Eg951.js";const y=f(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=n=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,e]=o.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return o.getBuiltinModule(n)}return y(n)},{basename:g}=p("node:path"),{fileURLToPath:A}=p("node:url"),m=async()=>(await import("../template-engines/html-to-text.js")).default,T=async()=>(await import("ical-generator")).default,a=n=>Array.isArray(n)?n.map(t=>typeof t=="string"?{email:t}:t):typeof n=="string"?[{email:n}]:[n];class v{fromAddress;toAddresses=[];ccAddresses=[];bccAddresses=[];subjectText="";textContent;textCharset="utf8";autoTextEnabled=!0;htmlContent;htmlCharset="utf8";dateValue;returnPathAddress;senderAddress;headers={};attachments=[];replyToAddress;priorityValue;tagsValue=[];signer;encrypter;logger;icalEventData;icalEventBuilder;from(t){return this.fromAddress=typeof t=="string"?{email:t}:t,this}to(t){return this.toAddresses.length=0,this.toAddresses.push(...a(t)),this}cc(t){return this.ccAddresses.length=0,this.ccAddresses.push(...a(t)),this}bcc(t){return this.bccAddresses.length=0,this.bccAddresses.push(...a(t)),this}subject(t){return this.subjectText=t,this}text(t,e="utf8"){return this.textContent=t,this.textCharset=e,this}html(t,e="utf8"){return this.htmlContent=t,this.htmlCharset=e,this}header(t,e){return this.headers[t]=e,this}setHeaders(t){const e=l(t);return Object.assign(this.headers,e),this}async attachFromPath(t,e){try{const s=await c(t),i=e?.filename??(g(t)||"attachment"),r=e?.contentType??d(i);this.attachments.push({cid:e?.cid,content:s,contentDisposition:e?.contentDisposition??"attachment",contentType:r,encoding:e?.encoding,filename:i,headers:e?.headers}),this.logger&&this.logger.debug(`Attachment added from path: ${t}`,{contentType:r,filename:i})}catch(s){throw this.logger&&this.logger.error(`Failed to attach file from path: ${t}`,s),s}return this}attachData(t,e){const s=e.contentType??d(e.filename);return this.attachments.push({cid:e.cid,content:t,contentDisposition:e.contentDisposition??"attachment",contentType:s,encoding:e.encoding,filename:e.filename,headers:e.headers}),this.logger&&this.logger.debug("Attachment added from data",{contentType:s,filename:e.filename}),this}async embedFromPath(t,e){try{const s=await c(t),i=e?.filename??(g(t)||"inline"),r=e?.contentType??d(i),h=u(i);return this.attachments.push({cid:h,content:s,contentDisposition:"inline",contentType:r,filename:i}),this.logger&&this.logger.debug(`Inline attachment embedded from path: ${t}`,{cid:h,contentType:r,filename:i}),h}catch(s){throw this.logger&&this.logger.error(`Failed to embed file from path: ${t}`,s),s}}embedData(t,e,s){const i=s?.contentType??d(e),r=u(e);return this.attachments.push({cid:r,content:t,contentDisposition:"inline",contentType:i,filename:e}),this.logger&&this.logger.debug("Inline attachment embedded from data",{cid:r,contentType:i,filename:e}),r}replyTo(t){return this.replyToAddress=typeof t=="string"?{email:t}:t,this}date(t){return this.dateValue=typeof t=="string"?new Date(t):t,this.logger&&this.logger.debug("Date header set",{date:this.dateValue.toISOString()}),this}returnPath(t){return this.returnPathAddress=typeof t=="string"?{email:t}:t,this.logger&&this.logger.debug("Return-path address set",{returnPath:this.returnPathAddress.email}),this}sender(t){return this.senderAddress=typeof t=="string"?{email:t}:t,this.logger&&this.logger.debug("Sender address set",{sender:this.senderAddress.email}),this}addTo(t){return this.toAddresses.push(...a(t)),this}addCc(t){return this.ccAddresses.push(...a(t)),this}addBcc(t){return this.bccAddresses.push(...a(t)),this}addReplyTo(t){const e=Array.isArray(t)?t:[t];if(e.length>0){const s=e[0];this.replyToAddress=typeof s=="string"?{email:s}:s}return this}addFrom(t){const e=Array.isArray(t)?t:[t];if(e.length>0){const s=e[0];this.fromAddress=typeof s=="string"?{email:s}:s}return this}priority(t){return this.priorityValue=t,this}tags(t){return this.tagsValue=Array.isArray(t)?t:[t],this}sign(t){return this.signer=t,this.logger&&this.logger.debug("Email signer configured"),this}encrypt(t){return this.encrypter=t,this.logger&&this.logger.debug("Email encrypter configured"),this}setLogger(t){return this.logger=b("MailMessage",t),this}icalEvent(t,e){return typeof t=="function"?(this.icalEventBuilder={build:t,options:e},this.icalEventData=void 0):(this.icalEventBuilder=void 0,this.icalEventData={content:t,...e}),this.logger&&this.logger.debug("Calendar event attached",{method:e?.method}),this}icalEventFromFile(t,e){const s=typeof t=="string"?t:A(t);return this.icalEventData={path:s,...e},this.logger&&this.logger.debug(`Calendar event attached from file: ${s}`,{method:e?.method}),this}icalEventFromUrl(t,e){return this.icalEventData={href:t,...e},this.logger&&this.logger.debug(`Calendar event attached from URL: ${t}`,{method:e?.method}),this}async view(t,e,s,i){try{const r=i?.autoText!==!1;this.autoTextEnabled=r,this.logger&&this.logger.debug("Rendering template",{autoText:r});const h=await t(e,s,i);this.html(h),r&&h&&await this.tryAutoGenerateText(h),this.logger&&this.logger.debug("Template rendered successfully")}catch(r){throw this.logger&&this.logger.error("Failed to render template",r),new Error(`Failed to render template: ${r.message}`)}return this}async viewText(t,e,s,i){try{this.logger&&this.logger.debug("Rendering text template");const r=await t(e,s,i);if(typeof r=="string")this.text(r),this.logger&&this.logger.debug("Text template rendered successfully");else throw new TypeError("Text renderer must return a string")}catch(r){throw this.logger&&this.logger.error("Failed to render text template",r),new Error(`Failed to render text template: ${r.message}`)}return this}async build(){if(this.logger&&this.logger.debug("Building email message"),this.fromAddress||this.throwAndLogError("From address is required","Build failed: from address is required"),this.toAddresses.length===0&&this.throwAndLogError("At least one recipient is required","Build failed: at least one recipient is required"),this.subjectText||this.throwAndLogError("Subject is required","Build failed: subject is required"),this.htmlContent&&!this.textContent&&this.autoTextEnabled)try{const e=await m();this.textContent=e(this.htmlContent),this.logger&&this.logger.debug("Auto-generated text content from HTML")}catch{this.logger&&this.logger.debug("Failed to convert HTML to text; proceeding without text content.")}!this.textContent&&!this.htmlContent&&this.throwAndLogError("Either text or html content is required","Build failed: either text or html content is required");let t={from:this.fromAddress,html:this.htmlContent,subject:this.subjectText,text:this.textContent,to:this.toAddresses.length===1?this.toAddresses[0]:this.toAddresses};if(this.ccAddresses.length>0&&(t.cc=this.ccAddresses.length===1?this.ccAddresses[0]:this.ccAddresses),this.bccAddresses.length>0&&(t.bcc=this.bccAddresses.length===1?this.bccAddresses[0]:this.bccAddresses),Object.keys(this.headers).length>0&&(t.headers=this.headers),this.attachments.length>0&&(t.attachments=this.attachments,this.logger&&this.logger.debug(`Email includes ${this.attachments.length} attachment(s)`)),this.replyToAddress&&(t.replyTo=this.replyToAddress),this.priorityValue&&(t.priority=this.priorityValue),this.tagsValue.length>0&&(t.tags=this.tagsValue),this.icalEventBuilder){const e=(await T())();this.icalEventBuilder.build(e),this.icalEventData={content:e.toString(),...this.icalEventBuilder.options}}return this.icalEventData&&(t.icalEvent=this.icalEventData,this.logger&&this.logger.debug("Email includes calendar event")),this.dateValue&&(t.headers={...l(t.headers??{}),Date:this.dateValue.toUTCString()}),this.returnPathAddress&&(t.headers={...l(t.headers??{}),"Return-Path":this.returnPathAddress.email}),this.senderAddress&&(t.headers={...l(t.headers??{}),Sender:this.senderAddress.email}),this.signer&&(this.logger&&this.logger.debug("Signing email message"),t=await this.signer.sign(t),this.logger&&this.logger.debug("Email message signed successfully")),this.encrypter&&(this.logger&&this.logger.debug("Encrypting email message"),t=await this.encrypter.encrypt(t),this.logger&&this.logger.debug("Email message encrypted successfully")),this.logger&&this.logger.debug("Email message built successfully",{bcc:this.bccAddresses.length,cc:this.ccAddresses.length,hasHtml:!!this.htmlContent,hasText:!!this.textContent,to:this.toAddresses.length}),t}getSubject(){return this.subjectText}getFrom(){return this.fromAddress}getTo(){return[...this.toAddresses]}getCc(){return[...this.ccAddresses]}getBcc(){return[...this.bccAddresses]}getReplyTo(){return this.replyToAddress}getSender(){return this.senderAddress}getReturnPath(){return this.returnPathAddress}getDate(){return this.dateValue}getPriority(){return this.priorityValue}getTextBody(){return this.textContent}getTextCharset(){return this.textCharset}getHtmlBody(){return this.htmlContent}getHtmlCharset(){return this.htmlCharset}getAttachments(){return[...this.attachments]}async tryAutoGenerateText(t){try{const e=(await m())(t);e&&!this.textContent&&this.text(e),this.logger&&this.logger.debug("Auto-generated text content from HTML template")}catch(e){this.logger&&this.logger.warn("Failed to auto-generate text from HTML template",e)}}throwAndLogError(t,e){const s=new Error(t);throw this.logger&&this.logger.error(e??t),s}}export{v as default};
1
+ import{createRequire as f}from"node:module";import{readFileAsBuffer as c,detectMimeType as d,generateContentId as u}from"./detectMimeType-DFH3kp6K.js";import{c as b}from"./create-logger-BQTS3f-I.js";import{s as l}from"./headers-to-record-De1Eg951.js";const y=f(import.meta.url),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,p=n=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,e]=o.versions.node.split(".").map(Number);if(t>22||t===22&&e>=3||t===20&&e>=16)return o.getBuiltinModule(n)}return y(n)},{basename:g}=p("node:path"),{fileURLToPath:A}=p("node:url"),m=async()=>(await import("../template-engines/html-to-text.js")).default,T=async()=>(await import("ical-generator")).default,a=n=>Array.isArray(n)?n.map(t=>typeof t=="string"?{email:t}:t):typeof n=="string"?[{email:n}]:[n];class v{fromAddress;toAddresses=[];ccAddresses=[];bccAddresses=[];subjectText="";textContent;textCharset="utf8";autoTextEnabled=!0;htmlContent;htmlCharset="utf8";dateValue;returnPathAddress;senderAddress;headers={};attachments=[];replyToAddress;priorityValue;tagsValue=[];signer;encrypter;logger;icalEventData;icalEventBuilder;from(t){return this.fromAddress=typeof t=="string"?{email:t}:t,this}to(t){return this.toAddresses.length=0,this.toAddresses.push(...a(t)),this}cc(t){return this.ccAddresses.length=0,this.ccAddresses.push(...a(t)),this}bcc(t){return this.bccAddresses.length=0,this.bccAddresses.push(...a(t)),this}subject(t){return this.subjectText=t,this}text(t,e="utf8"){return this.textContent=t,this.textCharset=e,this}html(t,e="utf8"){return this.htmlContent=t,this.htmlCharset=e,this}header(t,e){return this.headers[t]=e,this}setHeaders(t){const e=l(t);return Object.assign(this.headers,e),this}async attachFromPath(t,e){try{const s=await c(t),i=e?.filename??(g(t)||"attachment"),r=e?.contentType??d(i);this.attachments.push({cid:e?.cid,content:s,contentDisposition:e?.contentDisposition??"attachment",contentType:r,encoding:e?.encoding,filename:i,headers:e?.headers}),this.logger&&this.logger.debug(`Attachment added from path: ${t}`,{contentType:r,filename:i})}catch(s){throw this.logger&&this.logger.error(`Failed to attach file from path: ${t}`,s),s}return this}attachData(t,e){const s=e.contentType??d(e.filename);return this.attachments.push({cid:e.cid,content:t,contentDisposition:e.contentDisposition??"attachment",contentType:s,encoding:e.encoding,filename:e.filename,headers:e.headers}),this.logger&&this.logger.debug("Attachment added from data",{contentType:s,filename:e.filename}),this}async embedFromPath(t,e){try{const s=await c(t),i=e?.filename??(g(t)||"inline"),r=e?.contentType??d(i),h=u(i);return this.attachments.push({cid:h,content:s,contentDisposition:"inline",contentType:r,filename:i}),this.logger&&this.logger.debug(`Inline attachment embedded from path: ${t}`,{cid:h,contentType:r,filename:i}),h}catch(s){throw this.logger&&this.logger.error(`Failed to embed file from path: ${t}`,s),s}}embedData(t,e,s){const i=s?.contentType??d(e),r=u(e);return this.attachments.push({cid:r,content:t,contentDisposition:"inline",contentType:i,filename:e}),this.logger&&this.logger.debug("Inline attachment embedded from data",{cid:r,contentType:i,filename:e}),r}replyTo(t){return this.replyToAddress=typeof t=="string"?{email:t}:t,this}date(t){return this.dateValue=typeof t=="string"?new Date(t):t,this.logger&&this.logger.debug("Date header set",{date:this.dateValue.toISOString()}),this}returnPath(t){return this.returnPathAddress=typeof t=="string"?{email:t}:t,this.logger&&this.logger.debug("Return-path address set",{returnPath:this.returnPathAddress.email}),this}sender(t){return this.senderAddress=typeof t=="string"?{email:t}:t,this.logger&&this.logger.debug("Sender address set",{sender:this.senderAddress.email}),this}addTo(t){return this.toAddresses.push(...a(t)),this}addCc(t){return this.ccAddresses.push(...a(t)),this}addBcc(t){return this.bccAddresses.push(...a(t)),this}addReplyTo(t){const e=Array.isArray(t)?t:[t];if(e.length>0){const s=e[0];this.replyToAddress=typeof s=="string"?{email:s}:s}return this}addFrom(t){const e=Array.isArray(t)?t:[t];if(e.length>0){const s=e[0];this.fromAddress=typeof s=="string"?{email:s}:s}return this}priority(t){return this.priorityValue=t,this}tags(t){return this.tagsValue=Array.isArray(t)?t:[t],this}sign(t){return this.signer=t,this.logger&&this.logger.debug("Email signer configured"),this}encrypt(t){return this.encrypter=t,this.logger&&this.logger.debug("Email encrypter configured"),this}setLogger(t){return this.logger=b("MailMessage",t),this}icalEvent(t,e){return typeof t=="function"?(this.icalEventBuilder={build:t,options:e},this.icalEventData=void 0):(this.icalEventBuilder=void 0,this.icalEventData={content:t,...e}),this.logger&&this.logger.debug("Calendar event attached",{method:e?.method}),this}icalEventFromFile(t,e){const s=typeof t=="string"?t:A(t);return this.icalEventData={path:s,...e},this.logger&&this.logger.debug(`Calendar event attached from file: ${s}`,{method:e?.method}),this}icalEventFromUrl(t,e){return this.icalEventData={href:t,...e},this.logger&&this.logger.debug(`Calendar event attached from URL: ${t}`,{method:e?.method}),this}async view(t,e,s,i){try{const r=i?.autoText!==!1;this.autoTextEnabled=r,this.logger&&this.logger.debug("Rendering template",{autoText:r});const h=await t(e,s,i);this.html(h),r&&h&&await this.tryAutoGenerateText(h),this.logger&&this.logger.debug("Template rendered successfully")}catch(r){throw this.logger&&this.logger.error("Failed to render template",r),new Error(`Failed to render template: ${r.message}`)}return this}async viewText(t,e,s,i){try{this.logger&&this.logger.debug("Rendering text template");const r=await t(e,s,i);if(typeof r=="string")this.text(r),this.logger&&this.logger.debug("Text template rendered successfully");else throw new TypeError("Text renderer must return a string")}catch(r){throw this.logger&&this.logger.error("Failed to render text template",r),new Error(`Failed to render text template: ${r.message}`)}return this}async build(){if(this.logger&&this.logger.debug("Building email message"),this.fromAddress||this.throwAndLogError("From address is required","Build failed: from address is required"),this.toAddresses.length===0&&this.throwAndLogError("At least one recipient is required","Build failed: at least one recipient is required"),this.subjectText||this.throwAndLogError("Subject is required","Build failed: subject is required"),this.htmlContent&&!this.textContent&&this.autoTextEnabled)try{const e=await m();this.textContent=e(this.htmlContent),this.logger&&this.logger.debug("Auto-generated text content from HTML")}catch{this.logger&&this.logger.debug("Failed to convert HTML to text; proceeding without text content.")}!this.textContent&&!this.htmlContent&&this.throwAndLogError("Either text or html content is required","Build failed: either text or html content is required");let t={from:this.fromAddress,html:this.htmlContent,subject:this.subjectText,text:this.textContent,to:this.toAddresses.length===1?this.toAddresses[0]:this.toAddresses};if(this.ccAddresses.length>0&&(t.cc=this.ccAddresses.length===1?this.ccAddresses[0]:this.ccAddresses),this.bccAddresses.length>0&&(t.bcc=this.bccAddresses.length===1?this.bccAddresses[0]:this.bccAddresses),Object.keys(this.headers).length>0&&(t.headers=this.headers),this.attachments.length>0&&(t.attachments=this.attachments,this.logger&&this.logger.debug(`Email includes ${this.attachments.length} attachment(s)`)),this.replyToAddress&&(t.replyTo=this.replyToAddress),this.priorityValue&&(t.priority=this.priorityValue),this.tagsValue.length>0&&(t.tags=this.tagsValue),this.icalEventBuilder){const e=(await T())();this.icalEventBuilder.build(e),this.icalEventData={content:e.toString(),...this.icalEventBuilder.options}}return this.icalEventData&&(t.icalEvent=this.icalEventData,this.logger&&this.logger.debug("Email includes calendar event")),this.dateValue&&(t.headers={...l(t.headers??{}),Date:this.dateValue.toUTCString()}),this.returnPathAddress&&(t.headers={...l(t.headers??{}),"Return-Path":this.returnPathAddress.email}),this.senderAddress&&(t.headers={...l(t.headers??{}),Sender:this.senderAddress.email}),this.signer&&(this.logger&&this.logger.debug("Signing email message"),t=await this.signer.sign(t),this.logger&&this.logger.debug("Email message signed successfully")),this.encrypter&&(this.logger&&this.logger.debug("Encrypting email message"),t=await this.encrypter.encrypt(t),this.logger&&this.logger.debug("Email message encrypted successfully")),this.logger&&this.logger.debug("Email message built successfully",{bcc:this.bccAddresses.length,cc:this.ccAddresses.length,hasHtml:!!this.htmlContent,hasText:!!this.textContent,to:this.toAddresses.length}),t}getSubject(){return this.subjectText}getFrom(){return this.fromAddress}getTo(){return[...this.toAddresses]}getCc(){return[...this.ccAddresses]}getBcc(){return[...this.bccAddresses]}getReplyTo(){return this.replyToAddress}getSender(){return this.senderAddress}getReturnPath(){return this.returnPathAddress}getDate(){return this.dateValue}getPriority(){return this.priorityValue}getTextBody(){return this.textContent}getTextCharset(){return this.textCharset}getHtmlBody(){return this.htmlContent}getHtmlCharset(){return this.htmlCharset}getAttachments(){return[...this.attachments]}async tryAutoGenerateText(t){try{const e=(await m())(t);e&&!this.textContent&&this.text(e),this.logger&&this.logger.debug("Auto-generated text content from HTML template")}catch(e){this.logger&&this.logger.warn("Failed to auto-generate text from HTML template",e)}}throwAndLogError(t,e){const s=new Error(t);throw this.logger&&this.logger.error(e??t),s}}export{v as default};
@@ -1,4 +1,4 @@
1
- import{createRequire as O}from"node:module";import{z as I}from"./index-yDU-1zOZ.js";import{fromBER as B,OctetString as E}from"asn1js";import{Certificate as $,EnvelopedData as L,EncryptedContentInfo as G,id_ContentType_Data as z,RecipientInfo as V,KeyTransRecipientInfo as J,IssuerAndSerialNumber as Q,AlgorithmIdentifier as S,ContentInfo as W,id_ContentType_EnvelopedData as X}from"pkijs";const F=O(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,K=a=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[e,t]=h.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return h.getBuiltinModule(a)}return F(a)},{randomBytes:v,createCipheriv:U,createPublicKey:q,publicEncrypt:H}=K("node:crypto"),b=globalThis.Buffer!==void 0,j=a=>{const e=a.replaceAll(/-----BEGIN[^-]+-----/g,"").replaceAll(/-----END[^-]+-----/g,"").replaceAll(/\s/g,"");if(b)return Buffer.from(e,"base64");const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=t.charCodeAt(r);return n},x=(a,e)=>{let t;if(b)t=Buffer.from(a).toString("base64");else{const r=new Uint8Array(a);let u="";const s=8192;for(let o=0;o<r.length;o+=s){const d=r.subarray(o,Math.min(o+s,r.length));u+=String.fromCharCode(...d)}t=btoa(u)}const n=t.match(/.{1,64}/g)??[];return`-----BEGIN ${e}-----
1
+ import{createRequire as O}from"node:module";import{z as I}from"./index-BoZvzveg.js";import{fromBER as B,OctetString as E}from"asn1js";import{Certificate as $,EnvelopedData as L,EncryptedContentInfo as G,id_ContentType_Data as z,RecipientInfo as V,KeyTransRecipientInfo as J,IssuerAndSerialNumber as Q,AlgorithmIdentifier as S,ContentInfo as W,id_ContentType_EnvelopedData as X}from"pkijs";const F=O(import.meta.url),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,K=a=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[e,t]=h.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return h.getBuiltinModule(a)}return F(a)},{randomBytes:v,createCipheriv:U,createPublicKey:q,publicEncrypt:H}=K("node:crypto"),b=globalThis.Buffer!==void 0,j=a=>{const e=a.replaceAll(/-----BEGIN[^-]+-----/g,"").replaceAll(/-----END[^-]+-----/g,"").replaceAll(/\s/g,"");if(b)return Buffer.from(e,"base64");const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=t.charCodeAt(r);return n},x=(a,e)=>{let t;if(b)t=Buffer.from(a).toString("base64");else{const r=new Uint8Array(a);let u="";const s=8192;for(let o=0;o<r.length;o+=s){const d=r.subarray(o,Math.min(o+s,r.length));u+=String.fromCharCode(...d)}t=btoa(u)}const n=t.match(/.{1,64}/g)??[];return`-----BEGIN ${e}-----
2
2
  ${n.join(`
3
3
  `)}
4
4
  -----END ${e}-----
@@ -1,4 +1,4 @@
1
- import{createRequire as q}from"node:module";import{z as y}from"./index-yDU-1zOZ.js";import{fromBER as I,ObjectIdentifier as Q,OctetString as x,UTCTime as W}from"asn1js";import{Certificate as E,SignedData as X,EncapsulatedContentInfo as Y,id_ContentType_Data as B,SignerInfo as Z,AlgorithmIdentifier as N,IssuerAndSerialNumber as ee,id_sha256 as te,SignedAndUnsignedAttributes as ne,Attribute as w,ContentInfo as re,id_ContentType_SignedData as se}from"pkijs";import{r as oe}from"./generate-boundary-DQbzDiOI.js";const G=q(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=o=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,t]=u.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return u.getBuiltinModule(o)}return G(o)},{createPrivateKey:j,createHash:L,createSign:V,randomBytes:J}=z("node:crypto"),ie="1.2.840.113549.1.9.3",ae="1.2.840.113549.1.9.4",ce="1.2.840.113549.1.9.5",le="1.2.840.113549.1.1.1",pe={v1:1},ue={v1:1},f=globalThis.Buffer!==void 0,D=o=>{const e=o.replaceAll(/-----BEGIN[^-]+-----/g,"").replaceAll(/-----END[^-]+-----/g,"").replaceAll(/\s/g,"");if(f)return Buffer.from(e,"base64");const t=atob(e),s=new Uint8Array(t.length);for(let n=0;n<t.length;n+=1)s[n]=t.codePointAt(n);return s},fe=(o,e)=>{let t;if(f)t=Buffer.from(o).toString("base64");else{const n=new Uint8Array(o);let r="";const a=8192;for(let i=0;i<n.length;i+=a){const d=n.subarray(i,Math.min(i+a,n.length));r+=String.fromCharCode(...d)}t=btoa(r)}const s=t.match(/.{1,64}/g)??[];return`-----BEGIN ${e}-----
1
+ import{createRequire as q}from"node:module";import{z as y}from"./index-BoZvzveg.js";import{fromBER as I,ObjectIdentifier as Q,OctetString as x,UTCTime as W}from"asn1js";import{Certificate as E,SignedData as X,EncapsulatedContentInfo as Y,id_ContentType_Data as B,SignerInfo as Z,AlgorithmIdentifier as N,IssuerAndSerialNumber as ee,id_sha256 as te,SignedAndUnsignedAttributes as ne,Attribute as w,ContentInfo as re,id_ContentType_SignedData as se}from"pkijs";import{r as oe}from"./generate-boundary-DQbzDiOI.js";const G=q(import.meta.url),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,z=o=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,t]=u.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return u.getBuiltinModule(o)}return G(o)},{createPrivateKey:j,createHash:L,createSign:V,randomBytes:J}=z("node:crypto"),ie="1.2.840.113549.1.9.3",ae="1.2.840.113549.1.9.4",ce="1.2.840.113549.1.9.5",le="1.2.840.113549.1.1.1",pe={v1:1},ue={v1:1},f=globalThis.Buffer!==void 0,D=o=>{const e=o.replaceAll(/-----BEGIN[^-]+-----/g,"").replaceAll(/-----END[^-]+-----/g,"").replaceAll(/\s/g,"");if(f)return Buffer.from(e,"base64");const t=atob(e),s=new Uint8Array(t.length);for(let n=0;n<t.length;n+=1)s[n]=t.codePointAt(n);return s},fe=(o,e)=>{let t;if(f)t=Buffer.from(o).toString("base64");else{const n=new Uint8Array(o);let r="";const a=8192;for(let i=0;i<n.length;i+=a){const d=n.subarray(i,Math.min(i+a,n.length));r+=String.fromCharCode(...d)}t=btoa(r)}const s=t.match(/.{1,64}/g)??[];return`-----BEGIN ${e}-----
2
2
  ${s.join(`
3
3
  `)}
4
4
  -----END ${e}-----
@@ -1,4 +1,4 @@
1
- import{createRequire as E}from"node:module";import{z as W}from"./index-yDU-1zOZ.js";import{s as x}from"./headers-to-record-De1Eg951.js";import{f as b}from"./format-address-DTl-9O70.js";const q=E(import.meta.url),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,B=s=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[e,r]=g.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return g.getBuiltinModule(s)}return q(s)},{Buffer:j}=B("node:buffer"),{createPublicKey:N,createHash:v,createPrivateKey:z,sign:D,createSign:P,verify:R}=B("node:crypto"),H=/\s+/g,F=/ $/,I=/^\s*i=(\d+)\s*;/,V=["from","to","cc","subject","date","message-id","mime-version"],u=(s,e)=>`${s.toLowerCase()}:${e.replaceAll(H," ").trim()}`,G=s=>{let e=s.replaceAll(`\r
1
+ import{createRequire as E}from"node:module";import{z as W}from"./index-BoZvzveg.js";import{s as x}from"./headers-to-record-De1Eg951.js";import{f as b}from"./format-address-DTl-9O70.js";const q=E(import.meta.url),g=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,B=s=>{if(typeof g<"u"&&g.versions&&g.versions.node){const[e,r]=g.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return g.getBuiltinModule(s)}return q(s)},{Buffer:j}=B("node:buffer"),{createPublicKey:N,createHash:v,createPrivateKey:z,sign:D,createSign:P,verify:R}=B("node:crypto"),H=/\s+/g,F=/ $/,I=/^\s*i=(\d+)\s*;/,V=["from","to","cc","subject","date","message-id","mime-version"],u=(s,e)=>`${s.toLowerCase()}:${e.replaceAll(H," ").trim()}`,G=s=>{let e=s.replaceAll(`\r
2
2
  `,`
3
3
  `).replaceAll("\r",`
4
4
  `).split(`
@@ -1 +1 @@
1
- import{createMail as w}from"./Mail-BEuzrB00.js";import u from"./mockProvider-Behywbl1.js";const d=(t,o,e,n)=>{const r=Date.now()+e;return new Promise((s,c)=>{const a=()=>{const i=t.find(m=>o(m));if(i){s(i);return}if(Date.now()>=r){c(new Error("waitFor timed out before a matching message was captured"));return}setTimeout(a,n)};a()})},l=()=>{const t=u(),o=w(t),e=t.getInstance?.();if(!e)throw new Error("mockProvider() did not expose getInstance(); cannot create a test harness");return{mail:o,reset:()=>{e.length=0},sent:()=>e,waitFor:(n,r={})=>d(e,n,r.timeout??1e3,r.interval??10)}};export{l as createTestEmail};
1
+ import{createMail as w}from"./Mail-C1zp-fqt.js";import u from"./mockProvider-Behywbl1.js";const d=(t,o,e,n)=>{const r=Date.now()+e;return new Promise((s,c)=>{const a=()=>{const i=t.find(m=>o(m));if(i){s(i);return}if(Date.now()>=r){c(new Error("waitFor timed out before a matching message was captured"));return}setTimeout(a,n)};a()})},l=()=>{const t=u(),o=w(t),e=t.getInstance?.();if(!e)throw new Error("mockProvider() did not expose getInstance(); cannot create a test harness");return{mail:o,reset:()=>{e.length=0},sent:()=>e,waitFor:(n,r={})=>d(e,n,r.timeout??1e3,r.interval??10)}};export{l as createTestEmail};
@@ -1 +1 @@
1
- import{z as o}from"./index-yDU-1zOZ.js";import a from"mime";const n=e=>a.getType(e)??"application/octet-stream",p=e=>{const t=e.replaceAll(/[^a-z0-9]/gi,"-").replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"").toLowerCase(),r=Math.random().toString(36).slice(2,9);return`${t}-${r}@email`},c=e=>o(e,{buffer:!0});export{n as detectMimeType,p as generateContentId,c as readFileAsBuffer};
1
+ import{z as o}from"./index-BoZvzveg.js";import a from"mime";const n=e=>a.getType(e)??"application/octet-stream",p=e=>{const t=e.replaceAll(/[^a-z0-9]/gi,"-").replaceAll(/-+/g,"-").replaceAll(/^-|-$/g,"").toLowerCase(),r=Math.random().toString(36).slice(2,9);return`${t}-${r}@email`},c=e=>o(e,{buffer:!0});export{n as detectMimeType,p as generateContentId,c as readFileAsBuffer};
@@ -0,0 +1,11 @@
1
+ import{createRequire as It}from"node:module";const Pt=It(import.meta.url),de=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Dt=t=>{if(typeof de<"u"&&de.versions&&de.versions.node){const[e,o]=de.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return de.getBuiltinModule(t)}return Pt(t)},{createRequire:S}=Dt("node:module"),Gt=/^[A-Z]:\//i,Ut=(t="")=>t&&t.replaceAll("\\","/").replace(Gt,e=>e.toUpperCase()),zt=S(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kt=t=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[e,o]=be.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return be.getBuiltinModule(t)}return zt(t)},{fileURLToPath:Ft}=Kt("node:url");function Xt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dt,bt;function jt(){return bt||(bt=1,dt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),dt}var Qt=jt();const Wt=Xt(Qt);new Set(Wt);const qt=t=>Ut(t instanceof URL?Ft(t):t),Zt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},Vt=S(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yt=t=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,o]=he.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return he.getBuiltinModule(t)}return Vt(t)};Yt("node:fs/promises");const Jt=S(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,eo=t=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[e,o]=me.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return me.getBuiltinModule(t)}return Jt(t)};eo("node:fs");const to=S(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,oo=t=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[e,o]=ye.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ye.getBuiltinModule(t)}return to(t)};oo("node:fs/promises");const so=S(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=t=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[e,o]=ve.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ve.getBuiltinModule(t)}return so(t)};ro("node:fs");const no=S(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=t=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[e,o]=$e.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return $e.getBuiltinModule(t)}return no(t)};uo("node:fs/promises");const io=S(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=t=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[e,o]=Ee.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ee.getBuiltinModule(t)}return io(t)};lo("node:fs");const ao=S(import.meta.url),Re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,po=t=>{if(typeof Re<"u"&&Re.versions&&Re.versions.node){const[e,o]=Re.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Re.getBuiltinModule(t)}return ao(t)};po("node:fs/promises");const co=S(import.meta.url),_e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fo=t=>{if(typeof _e<"u"&&_e.versions&&_e.versions.node){const[e,o]=_e.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return _e.getBuiltinModule(t)}return co(t)};fo("node:fs");const go=S(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bo=t=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[e,o]=Ae.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ae.getBuiltinModule(t)}return go(t)};bo("node:fs/promises");const ho=S(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mo=t=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[e,o]=Te.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Te.getBuiltinModule(t)}return ho(t)};mo("node:fs");S(import.meta.url);const yo=S(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vo=t=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[e,o]=xe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return xe.getBuiltinModule(t)}return yo(t)};vo("node:fs/promises");const $o=S(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Eo=t=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[e,o]=Ce.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ce.getBuiltinModule(t)}return $o(t)};Eo("node:fs");const Ro=S(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_o=t=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[e,o]=Se.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Se.getBuiltinModule(t)}return Ro(t)};_o("node:fs/promises");const Ao=S(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,To=t=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[e,o]=Oe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Oe.getBuiltinModule(t)}return Ao(t)};To("node:fs");function ct(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ht={},ot,mt;function et(){if(mt)return ot;mt=1;const t="[^\\\\/]",e=Symbol("unignore"),o="\\.",H="\\+",b="\\?",n="\\/",l="(?=.)",f="[^/]",a=`(?:${n}|$)`,R=`(?:^|${n})`,g=`${o}{1,2}${a}`,T=`(?!${o})`,C=`(?!${R}${g})`,_=`(?!${o}{0,1}${a})`,L=`(?!${g})`,te=`[^.${n}]`,q=`${f}*?`,Z="/",M={DOT_LITERAL:o,PLUS_LITERAL:H,QMARK_LITERAL:b,SLASH_LITERAL:n,ONE_CHAR:l,QMARK:f,END_ANCHOR:a,DOTS_SLASH:g,NO_DOT:T,NO_DOTS:C,NO_DOT_SLASH:_,NO_DOTS_SLASH:L,QMARK_NO_DOT:te,STAR:q,START_ANCHOR:R,SEP:Z},d={...M,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},h={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ot={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:h,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(s){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${s.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(s){return s===!0?d:M}},ot}var yt;function tt(){return yt||(yt=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:H,REGEX_SPECIAL_CHARS_GLOBAL:b}=et();t.isObject=n=>n!==null&&typeof n=="object"&&!Array.isArray(n),t.hasRegexChars=n=>H.test(n),t.isRegexChar=n=>n.length===1&&t.hasRegexChars(n),t.escapeRegex=n=>n.replace(b,"\\$1"),t.toPosixSlashes=n=>n.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const n=navigator.platform.toLowerCase();return n==="win32"||n==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=n=>n.replace(o,l=>l==="\\"?"":l),t.escapeLast=(n,l,f)=>{const a=n.lastIndexOf(l,f);return a===-1?n:n[a-1]==="\\"?t.escapeLast(n,l,a-1):`${n.slice(0,a)}\\${n.slice(a)}`},t.removePrefix=(n,l={})=>{let f=n;return f.startsWith("./")&&(f=f.slice(2),l.prefix="./"),f},t.wrapOutput=(n,l={},f={})=>{const a=f.contains?"":"^",R=f.contains?"":"$";let g=`${a}(?:${n})${R}`;return l.negated===!0&&(g=`(?:^(?!${g}).*$)`),g},t.basename=(n,{windows:l}={})=>{const f=n.split(l?/[\\/]/:"/"),a=f[f.length-1];return a===""?f[f.length-2]:a}})(ht)),ht}var st,vt;function xo(){if(vt)return st;vt=1;const t=tt(),{CHAR_ASTERISK:e,CHAR_AT:o,CHAR_BACKWARD_SLASH:H,CHAR_COMMA:b,CHAR_DOT:n,CHAR_EXCLAMATION_MARK:l,CHAR_FORWARD_SLASH:f,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:R,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_PLUS:T,CHAR_QUESTION_MARK:C,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:L,CHAR_RIGHT_SQUARE_BRACKET:te}=et(),q=M=>M===f||M===H,Z=M=>{M.isPrefix!==!0&&(M.depth=M.isGlobstar?1/0:1)};return st=(M,d)=>{const h=d||{},s=M.length-1,$=h.parts===!0||h.scanToEnd===!0,O=[],m=[],E=[];let y=M,F=-1,U=0,Y=0,ae=!1,J=!1,z=!1,ee=!1,pe=!1,re=!1,oe=!1,D=!1,ne=!1,j=!1,ce=0,Q,v,k={value:"",depth:0,isGlob:!1};const X=()=>F>=s,i=()=>y.charCodeAt(F+1),I=()=>(Q=v,y.charCodeAt(++F));for(;F<s;){v=I();let W;if(v===H){oe=k.backslashes=!0,v=I(),v===a&&(re=!0);continue}if(re===!0||v===a){for(ce++;X()!==!0&&(v=I());){if(v===H){oe=k.backslashes=!0,I();continue}if(v===a){ce++;continue}if(re!==!0&&v===n&&(v=I())===n){if(ae=k.isBrace=!0,z=k.isGlob=!0,j=!0,$===!0)continue;break}if(re!==!0&&v===b){if(ae=k.isBrace=!0,z=k.isGlob=!0,j=!0,$===!0)continue;break}if(v===_&&(ce--,ce===0)){re=!1,ae=k.isBrace=!0,j=!0;break}}if($===!0)continue;break}if(v===f){if(O.push(F),m.push(k),k={value:"",depth:0,isGlob:!1},j===!0)continue;if(Q===n&&F===U+1){U+=2;continue}Y=F+1;continue}if(h.noext!==!0&&(v===T||v===o||v===e||v===C||v===l)&&i()===R){if(z=k.isGlob=!0,ee=k.isExtglob=!0,j=!0,v===l&&F===U&&(ne=!0),$===!0){for(;X()!==!0&&(v=I());){if(v===H){oe=k.backslashes=!0,v=I();continue}if(v===L){z=k.isGlob=!0,j=!0;break}}continue}break}if(v===e){if(Q===e&&(pe=k.isGlobstar=!0),z=k.isGlob=!0,j=!0,$===!0)continue;break}if(v===C){if(z=k.isGlob=!0,j=!0,$===!0)continue;break}if(v===g){for(;X()!==!0&&(W=I());){if(W===H){oe=k.backslashes=!0,I();continue}if(W===te){J=k.isBracket=!0,z=k.isGlob=!0,j=!0;break}}if($===!0)continue;break}if(h.nonegate!==!0&&v===l&&F===U){D=k.negated=!0,U++;continue}if(h.noparen!==!0&&v===R){if(z=k.isGlob=!0,$===!0){for(;X()!==!0&&(v=I());){if(v===R){oe=k.backslashes=!0,v=I();continue}if(v===L){j=!0;break}}continue}break}if(z===!0){if(j=!0,$===!0)continue;break}}h.noext===!0&&(ee=!1,z=!1);let B=y,fe="",r="";U>0&&(fe=y.slice(0,U),y=y.slice(U),Y-=U),B&&z===!0&&Y>0?(B=y.slice(0,Y),r=y.slice(Y)):z===!0?(B="",r=y):B=y,B&&B!==""&&B!=="/"&&B!==y&&q(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),h.unescape===!0&&(r&&(r=t.removeBackslashes(r)),B&&oe===!0&&(B=t.removeBackslashes(B)));const u={prefix:fe,input:M,start:U,base:B,glob:r,isBrace:ae,isBracket:J,isGlob:z,isExtglob:ee,isGlobstar:pe,negated:D,negatedExtglob:ne};if(h.tokens===!0&&(u.maxDepth=0,q(v)||m.push(k),u.tokens=m),h.parts===!0||h.tokens===!0){let W;for(let w=0;w<O.length;w++){const se=W?W+1:U,ue=O[w],V=M.slice(se,ue);h.tokens&&(w===0&&U!==0?(m[w].isPrefix=!0,m[w].value=fe):m[w].value=V,Z(m[w]),u.maxDepth+=m[w].depth),(w!==0||V!=="")&&E.push(V),W=ue}if(W&&W+1<M.length){const w=M.slice(W+1);E.push(w),h.tokens&&(m[m.length-1].value=w,Z(m[m.length-1]),u.maxDepth+=m[m.length-1].depth)}u.slashes=O,u.parts=E}return u},st}var rt,$t;function Co(){if($t)return rt;$t=1;const t=et(),e=tt(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:H,REGEX_NON_SPECIAL_CHARS:b,REGEX_SPECIAL_CHARS_BACKREF:n,REPLACEMENTS:l}=t,f=(d,h)=>typeof h.expandRange=="function"?h.expandRange(...d,h):(d.sort(),`[${d.join("-")}]`),a=(d,h)=>`Missing ${d}: "${h}" - use "\\\\${h}" to match literal characters`,R=d=>{const h=[];let s=0,$=0,O=0,m="",E=!1;for(const y of d){if(E===!0){m+=y,E=!1;continue}if(y==="\\"){m+=y,E=!0;continue}if(y==='"'){O=O===1?0:1,m+=y;continue}if(O===0){if(y==="[")s++;else if(y==="]"&&s>0)s--;else if(s===0){if(y==="(")$++;else if(y===")"&&$>0)$--;else if(y==="|"&&$===0){h.push(m),m="";continue}}}m+=y}return h.push(m),h},g=d=>{let h=!1;for(const s of d){if(h===!0){h=!1;continue}if(s==="\\"){h=!0;continue}if(/[?*+@!()[\]{}]/.test(s))return!1}return!0},T=d=>{let h=d.trim(),s=!0;for(;s===!0;)s=!1,/^@\([^\\()[\]{}|]+\)$/.test(h)&&(h=h.slice(2,-1),s=!0);if(g(h))return h.replace(/\\(.)/g,"$1")},C=d=>{const h=d.map(T).filter(Boolean);for(let s=0;s<h.length;s++)for(let $=s+1;$<h.length;$++){const O=h[s],m=h[$],E=O[0];if(!(!E||O!==E.repeat(O.length)||m!==E.repeat(m.length))&&(O===m||O.startsWith(m)||m.startsWith(O)))return!0}return!1},_=(d,h=!0)=>{if(d[0]!=="+"&&d[0]!=="*"||d[1]!=="(")return;let s=0,$=0,O=0,m=!1;for(let E=1;E<d.length;E++){const y=d[E];if(m===!0){m=!1;continue}if(y==="\\"){m=!0;continue}if(y==='"'){O=O===1?0:1;continue}if(O!==1){if(y==="["){s++;continue}if(y==="]"&&s>0){s--;continue}if(!(s>0)){if(y==="("){$++;continue}if(y===")"&&($--,$===0))return h===!0&&E!==d.length-1?void 0:{type:d[0],body:d.slice(2,E),end:E}}}}},L=d=>`${d.length===1?e.escapeRegex(d[0]):`[${d.map(h=>e.escapeRegex(h)).join("")}]`}*`,te=d=>{let h=0;const s=[];for(;h<d.length;){const $=_(d.slice(h),!1);if(!$||$.type!=="*")return;const O=R($.body).map(E=>E.trim());if(O.length!==1)return;const m=T(O[0]);if(!m||m.length!==1)return;s.push(m),h+=$.end+1}if(!(s.length<1))return s},q=d=>{let h=0,s=d.trim(),$=_(s);for(;$;)h++,s=$.body.trim(),$=_(s);return h},Z=(d,h)=>{if(h.maxExtglobRecursion===!1)return{risky:!1};const s=typeof h.maxExtglobRecursion=="number"?h.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,$=R(d).map(y=>y.trim());if($.length>1&&($.some(y=>y==="")||$.some(y=>/^[*?]+$/.test(y))||C($)))return{risky:!0};const O=[];let m=!1,E=!0;for(const y of $){const F=te(y);if(F){m=!0,O.push(...F);continue}const U=T(y);if(U&&U.length===1){O.push(U);continue}if(E=!1,q(y)>s)return{risky:!0}}return m?E?{risky:!0,safeOutput:L([...new Set(O)])}:{risky:!0}:{risky:!1}},M=(d,h)=>{if(typeof d!="string")throw new TypeError("Expected a string");d=l[d]||d;const s={...h},$=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o;let O=d.length;if(O>$)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${$}`);const m={type:"bos",value:"",output:s.prepend||""},E=[m],y=s.capture?"":"?:",F=t.globChars(s.windows),U=t.extglobChars(F),{DOT_LITERAL:Y,PLUS_LITERAL:ae,SLASH_LITERAL:J,ONE_CHAR:z,DOTS_SLASH:ee,NO_DOT:pe,NO_DOT_SLASH:re,NO_DOTS_SLASH:oe,QMARK:D,QMARK_NO_DOT:ne,STAR:j,START_ANCHOR:ce}=F,Q=c=>`(${y}(?:(?!${ce}${c.dot?ee:Y}).)*?)`,v=s.dot?"":pe,k=s.dot?D:ne;let X=s.bash===!0?Q(s):j;s.capture&&(X=`(${X})`),typeof s.noext=="boolean"&&(s.noextglob=s.noext);const i={input:d,index:-1,start:0,dot:s.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};d=e.removePrefix(d,i),O=d.length;const I=[],B=[],fe=[];let r=m,u;const W=()=>i.index===O-1,w=i.peek=(c=1)=>d[i.index+c],se=i.advance=()=>d[++i.index]||"",ue=()=>d.slice(i.index+1),V=(c="",P=0)=>{i.consumed+=c,i.index+=P},Ve=c=>{i.output+=c.output!=null?c.output:c.value,V(c.value)},Mt=()=>{let c=1;for(;w()==="!"&&(w(2)!=="("||w(3)==="?");)se(),i.start++,c++;return c%2===0?!1:(i.negated=!0,i.start++,!0)},Ye=c=>{i[c]++,fe.push(c)},ge=c=>{i[c]--,fe.pop()},A=c=>{if(r.type==="globstar"){const P=i.braces>0&&(c.type==="comma"||c.type==="brace"),p=c.extglob===!0||I.length&&(c.type==="pipe"||c.type==="paren");c.type!=="slash"&&c.type!=="paren"&&!P&&!p&&(i.output=i.output.slice(0,-r.output.length),r.type="star",r.value="*",r.output=X,i.output+=r.output)}if(I.length&&c.type!=="paren"&&(I[I.length-1].inner+=c.value),(c.value||c.output)&&Ve(c),r&&r.type==="text"&&c.type==="text"){r.output=(r.output||r.value)+c.value,r.value+=c.value;return}c.prev=r,E.push(c),r=c},Je=(c,P)=>{const p={...U[P],conditions:1,inner:""};p.prev=r,p.parens=i.parens,p.output=i.output,p.startIndex=i.index,p.tokensIndex=E.length;const x=(s.capture?"(":"")+p.open;Ye("parens"),A({type:c,value:P,output:i.output?"":z}),A({type:"paren",extglob:!0,value:se(),output:x}),I.push(p)},Bt=c=>{const P=d.slice(c.startIndex,i.index+1),p=d.slice(c.startIndex+2,i.index),x=Z(p,s);if((c.type==="plus"||c.type==="star")&&x.risky){const N=x.safeOutput?(c.output?"":z)+(s.capture?`(${x.safeOutput})`:x.safeOutput):void 0,ie=E[c.tokensIndex];ie.type="text",ie.value=P,ie.output=N||e.escapeRegex(P);for(let le=c.tokensIndex+1;le<E.length;le++)E[le].value="",E[le].output="",delete E[le].suffix;i.output=c.output+ie.output,i.backtrack=!0,A({type:"paren",extglob:!0,value:u,output:""}),ge("parens");return}let G=c.close+(s.capture?")":""),K;if(c.type==="negate"){let N=X;if(c.inner&&c.inner.length>1&&c.inner.includes("/")&&(N=Q(s)),(N!==X||W()||/^\)+$/.test(ue()))&&(G=c.close=`)$))${N}`),c.inner.includes("*")&&(K=ue())&&/^\.[^\\/.]+$/.test(K)){const ie=M(K,{...h,fastpaths:!1}).output;G=c.close=`)${ie})${N})`}c.prev.type==="bos"&&(i.negatedExtglob=!0)}A({type:"paren",extglob:!0,value:u,output:G}),ge("parens")};if(s.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(d)){let c=!1,P=d.replace(n,(p,x,G,K,N,ie)=>K==="\\"?(c=!0,p):K==="?"?x?x+K+(N?D.repeat(N.length):""):ie===0?k+(N?D.repeat(N.length):""):D.repeat(G.length):K==="."?Y.repeat(G.length):K==="*"?x?x+K+(N?X:""):X:x?p:`\\${p}`);return c===!0&&(s.unescape===!0?P=P.replace(/\\/g,""):P=P.replace(/\\+/g,p=>p.length%2===0?"\\\\":p?"\\":"")),P===d&&s.contains===!0?(i.output=d,i):(i.output=e.wrapOutput(P,i,h),i)}for(;!W();){if(u=se(),u==="\0")continue;if(u==="\\"){const p=w();if(p==="/"&&s.bash!==!0||p==="."||p===";")continue;if(!p){u+="\\",A({type:"text",value:u});continue}const x=/^\\+/.exec(ue());let G=0;if(x&&x[0].length>2&&(G=x[0].length,i.index+=G,G%2!==0&&(u+="\\")),s.unescape===!0?u=se():u+=se(),i.brackets===0){A({type:"text",value:u});continue}}if(i.brackets>0&&(u!=="]"||r.value==="["||r.value==="[^")){if(s.posix!==!1&&u===":"){const p=r.value.slice(1);if(p.includes("[")&&(r.posix=!0,p.includes(":"))){const x=r.value.lastIndexOf("["),G=r.value.slice(0,x),K=r.value.slice(x+2),N=H[K];if(N){r.value=G+N,i.backtrack=!0,se(),!m.output&&E.indexOf(r)===1&&(m.output=z);continue}}}(u==="["&&w()!==":"||u==="-"&&w()==="]")&&(u=`\\${u}`),u==="]"&&(r.value==="["||r.value==="[^")&&(u=`\\${u}`),s.posix===!0&&u==="!"&&r.value==="["&&(u="^"),r.value+=u,Ve({value:u});continue}if(i.quotes===1&&u!=='"'){u=e.escapeRegex(u),r.value+=u,Ve({value:u});continue}if(u==='"'){i.quotes=i.quotes===1?0:1,s.keepQuotes===!0&&A({type:"text",value:u});continue}if(u==="("){Ye("parens"),A({type:"paren",value:u});continue}if(u===")"){if(i.parens===0&&s.strictBrackets===!0)throw new SyntaxError(a("opening","("));const p=I[I.length-1];if(p&&i.parens===p.parens+1){Bt(I.pop());continue}A({type:"paren",value:u,output:i.parens?")":"\\)"}),ge("parens");continue}if(u==="["){if(s.nobracket===!0||!ue().includes("]")){if(s.nobracket!==!0&&s.strictBrackets===!0)throw new SyntaxError(a("closing","]"));u=`\\${u}`}else Ye("brackets");A({type:"bracket",value:u});continue}if(u==="]"){if(s.nobracket===!0||r&&r.type==="bracket"&&r.value.length===1){A({type:"text",value:u,output:`\\${u}`});continue}if(i.brackets===0){if(s.strictBrackets===!0)throw new SyntaxError(a("opening","["));A({type:"text",value:u,output:`\\${u}`});continue}ge("brackets");const p=r.value.slice(1);if(r.posix!==!0&&p[0]==="^"&&!p.includes("/")&&(u=`/${u}`),r.value+=u,Ve({value:u}),s.literalBrackets===!1||e.hasRegexChars(p))continue;const x=e.escapeRegex(r.value);if(i.output=i.output.slice(0,-r.value.length),s.literalBrackets===!0){i.output+=x,r.value=x;continue}r.value=`(${y}${x}|${r.value})`,i.output+=r.value;continue}if(u==="{"&&s.nobrace!==!0){Ye("braces");const p={type:"brace",value:u,output:"(",outputIndex:i.output.length,tokensIndex:i.tokens.length};B.push(p),A(p);continue}if(u==="}"){const p=B[B.length-1];if(s.nobrace===!0||!p){A({type:"text",value:u,output:u});continue}let x=")";if(p.dots===!0){const G=E.slice(),K=[];for(let N=G.length-1;N>=0&&(E.pop(),G[N].type!=="brace");N--)G[N].type!=="dots"&&K.unshift(G[N].value);x=f(K,s),i.backtrack=!0}if(p.comma!==!0&&p.dots!==!0){const G=i.output.slice(0,p.outputIndex),K=i.tokens.slice(p.tokensIndex);p.value=p.output="\\{",u=x="\\}",i.output=G;for(const N of K)i.output+=N.output||N.value}A({type:"brace",value:u,output:x}),ge("braces"),B.pop();continue}if(u==="|"){I.length>0&&I[I.length-1].conditions++,A({type:"text",value:u});continue}if(u===","){let p=u;const x=B[B.length-1];x&&fe[fe.length-1]==="braces"&&(x.comma=!0,p="|"),A({type:"comma",value:u,output:p});continue}if(u==="/"){if(r.type==="dot"&&i.index===i.start+1){i.start=i.index+1,i.consumed="",i.output="",E.pop(),r=m;continue}A({type:"slash",value:u,output:J});continue}if(u==="."){if(i.braces>0&&r.type==="dot"){r.value==="."&&(r.output=Y);const p=B[B.length-1];r.type="dots",r.output+=u,r.value+=u,p.dots=!0;continue}if(i.braces+i.parens===0&&r.type!=="bos"&&r.type!=="slash"){A({type:"text",value:u,output:Y});continue}A({type:"dot",value:u,output:Y});continue}if(u==="?"){if(!(r&&r.value==="(")&&s.noextglob!==!0&&w()==="("&&w(2)!=="?"){Je("qmark",u);continue}if(r&&r.type==="paren"){const p=w();let x=u;(r.value==="("&&!/[!=<:]/.test(p)||p==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(x=`\\${u}`),A({type:"text",value:u,output:x});continue}if(s.dot!==!0&&(r.type==="slash"||r.type==="bos")){A({type:"qmark",value:u,output:ne});continue}A({type:"qmark",value:u,output:D});continue}if(u==="!"){if(s.noextglob!==!0&&w()==="("&&(w(2)!=="?"||!/[!=<:]/.test(w(3)))){Je("negate",u);continue}if(s.nonegate!==!0&&i.index===0){Mt();continue}}if(u==="+"){if(s.noextglob!==!0&&w()==="("&&w(2)!=="?"){Je("plus",u);continue}if(r&&r.value==="("||s.regex===!1){A({type:"plus",value:u,output:ae});continue}if(r&&(r.type==="bracket"||r.type==="paren"||r.type==="brace")||i.parens>0){A({type:"plus",value:u});continue}A({type:"plus",value:ae});continue}if(u==="@"){if(s.noextglob!==!0&&w()==="("&&w(2)!=="?"){A({type:"at",extglob:!0,value:u,output:""});continue}A({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const p=b.exec(ue());p&&(u+=p[0],i.index+=p[0].length),A({type:"text",value:u});continue}if(r&&(r.type==="globstar"||r.star===!0)){r.type="star",r.star=!0,r.value+=u,r.output=X,i.backtrack=!0,i.globstar=!0,V(u);continue}let c=ue();if(s.noextglob!==!0&&/^\([^?]/.test(c)){Je("star",u);continue}if(r.type==="star"){if(s.noglobstar===!0){V(u);continue}const p=r.prev,x=p.prev,G=p.type==="slash"||p.type==="bos",K=x&&(x.type==="star"||x.type==="globstar");if(s.bash===!0&&(!G||c[0]&&c[0]!=="/")){A({type:"star",value:u,output:""});continue}const N=i.braces>0&&(p.type==="comma"||p.type==="brace"),ie=I.length&&(p.type==="pipe"||p.type==="paren");if(!G&&p.type!=="paren"&&!N&&!ie){A({type:"star",value:u,output:""});continue}for(;c.slice(0,3)==="/**";){const le=d[i.index+4];if(le&&le!=="/")break;c=c.slice(3),V("/**",3)}if(p.type==="bos"&&W()){r.type="globstar",r.value+=u,r.output=Q(s),i.output=r.output,i.globstar=!0,V(u);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&!K&&W()){i.output=i.output.slice(0,-(p.output+r.output).length),p.output=`(?:${p.output}`,r.type="globstar",r.output=Q(s)+(s.strictSlashes?")":"|$)"),r.value+=u,i.globstar=!0,i.output+=p.output+r.output,V(u);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&c[0]==="/"){const le=c[1]!==void 0?"|$":"";i.output=i.output.slice(0,-(p.output+r.output).length),p.output=`(?:${p.output}`,r.type="globstar",r.output=`${Q(s)}${J}|${J}${le})`,r.value+=u,i.output+=p.output+r.output,i.globstar=!0,V(u+se()),A({type:"slash",value:"/",output:""});continue}if(p.type==="bos"&&c[0]==="/"){r.type="globstar",r.value+=u,r.output=`(?:^|${J}|${Q(s)}${J})`,i.output=r.output,i.globstar=!0,V(u+se()),A({type:"slash",value:"/",output:""});continue}if(N&&c[0]==="/"){r.type="globstar",r.value+=u,r.output=`(?:^|${J}|${Q(s)}${J})`,i.output+=r.output,i.globstar=!0,V(u+se()),A({type:"slash",value:"/",output:""});continue}i.output=i.output.slice(0,-r.output.length),r.type="globstar",r.output=Q(s),r.value+=u,i.output+=r.output,i.globstar=!0,V(u);continue}const P={type:"star",value:u,output:X};if(s.bash===!0){P.output=".*?",(r.type==="bos"||r.type==="slash")&&(P.output=v+P.output),A(P);continue}if(r&&(r.type==="bracket"||r.type==="paren")&&s.regex===!0){P.output=u,A(P);continue}(i.index===i.start||r.type==="slash"||r.type==="dot")&&(r.type==="dot"?(i.output+=re,r.output+=re):s.dot===!0?(i.output+=oe,r.output+=oe):(i.output+=v,r.output+=v),w()!=="*"&&(i.output+=z,r.output+=z)),A(P)}for(;i.brackets>0;){if(s.strictBrackets===!0)throw new SyntaxError(a("closing","]"));i.output=e.escapeLast(i.output,"["),ge("brackets")}for(;i.parens>0;){if(s.strictBrackets===!0)throw new SyntaxError(a("closing",")"));i.output=e.escapeLast(i.output,"("),ge("parens")}for(;i.braces>0;){if(s.strictBrackets===!0)throw new SyntaxError(a("closing","}"));i.output=e.escapeLast(i.output,"{"),ge("braces")}if(s.strictSlashes!==!0&&(r.type==="star"||r.type==="bracket")&&A({type:"maybe_slash",value:"",output:`${J}?`}),i.backtrack===!0){i.output="";for(const c of i.tokens)i.output+=c.output!=null?c.output:c.value,c.suffix&&(i.output+=c.suffix)}return i};return M.fastpaths=(d,h)=>{const s={...h},$=typeof s.maxLength=="number"?Math.min(o,s.maxLength):o,O=d.length;if(O>$)throw new SyntaxError(`Input length: ${O}, exceeds maximum allowed length: ${$}`);d=l[d]||d;const{DOT_LITERAL:m,SLASH_LITERAL:E,ONE_CHAR:y,DOTS_SLASH:F,NO_DOT:U,NO_DOTS:Y,NO_DOTS_SLASH:ae,STAR:J,START_ANCHOR:z}=t.globChars(s.windows),ee=s.dot?Y:U,pe=s.dot?ae:U,re=s.capture?"":"?:",oe={negated:!1,prefix:""};let D=s.bash===!0?".*?":J;s.capture&&(D=`(${D})`);const ne=v=>v.noglobstar===!0?D:`(${re}(?:(?!${z}${v.dot?F:m}).)*?)`,j=v=>{switch(v){case"*":return`${ee}${y}${D}`;case".*":return`${m}${y}${D}`;case"*.*":return`${ee}${D}${m}${y}${D}`;case"*/*":return`${ee}${D}${E}${y}${pe}${D}`;case"**":return ee+ne(s);case"**/*":return`(?:${ee}${ne(s)}${E})?${pe}${y}${D}`;case"**/*.*":return`(?:${ee}${ne(s)}${E})?${pe}${D}${m}${y}${D}`;case"**/.*":return`(?:${ee}${ne(s)}${E})?${m}${y}${D}`;default:{const k=/^(.*?)\.(\w+)$/.exec(v);if(!k)return;const X=j(k[1]);return X?X+m+k[2]:void 0}}},ce=e.removePrefix(d,oe);let Q=j(ce);return Q&&s.strictSlashes!==!0&&(Q+=`${E}?`),Q},rt=M,rt}var nt,Et;function So(){if(Et)return nt;Et=1;const t=xo(),e=Co(),o=tt(),H=et(),b=l=>l&&typeof l=="object"&&!Array.isArray(l),n=(l,f,a=!1)=>{if(Array.isArray(l)){const q=l.map(Z=>n(Z,f,a));return Z=>{for(const M of q){const d=M(Z);if(d)return d}return!1}}const R=b(l)&&l.tokens&&l.input;if(l===""||typeof l!="string"&&!R)throw new TypeError("Expected pattern to be a non-empty string");const g=f||{},T=g.windows,C=R?n.compileRe(l,f):n.makeRe(l,f,!1,!0),_=C.state;delete C.state;let L=()=>!1;if(g.ignore){const q={...f,ignore:null,onMatch:null,onResult:null};L=n(g.ignore,q,a)}const te=(q,Z=!1)=>{const{isMatch:M,match:d,output:h}=n.test(q,C,f,{glob:l,posix:T}),s={glob:l,state:_,regex:C,posix:T,input:q,output:h,match:d,isMatch:M};if(typeof g.onResult=="function"&&g.onResult(s),M===!1)return s.isMatch=!1,Z?s:!1;e:if(L(q)){if(typeof g.onIgnore=="function"&&g.onIgnore(s)===H.UNIGNORE){s.isMatch=!0;break e}return s.isMatch=!1,Z?s:!1}return typeof g.onMatch=="function"&&g.onMatch(s),Z?s:!0};return a&&(te.state=_),te};return n.test=(l,f,a,{glob:R,posix:g}={})=>{if(typeof l!="string")throw new TypeError("Expected input to be a string");if(l==="")return{isMatch:!1,output:""};const T=a||{},C=T.format||(g?o.toPosixSlashes:null);let _=l===R,L=_&&C?C(l):l;return _===!1&&(L=C?C(l):l,_=L===R),(_===!1||T.capture===!0)&&(T.matchBase===!0||T.basename===!0?_=n.matchBase(l,f,a,g):_=f.exec(L)),{isMatch:!!_,match:_,output:L}},n.matchBase=(l,f,a,R=a&&a.windows)=>(f instanceof RegExp?f:n.makeRe(f,a)).test(o.basename(l,{windows:R})),n.isMatch=(l,f,a)=>n(f,a)(l),n.parse=(l,f)=>Array.isArray(l)?l.map(a=>n.parse(a,f)):e(l,{...f,fastpaths:!1}),n.scan=(l,f)=>t(l,f),n.compileRe=(l,f,a=!1,R=!1)=>{if(a===!0)return l.output;const g=f||{},T=g.contains?"":"^",C=g.contains?"":"$";let _=`${T}(?:${l.output})${C}`;l&&l.negated===!0&&(_=`^(?!${_}).*$`);const L=n.toRegex(_,f);return R===!0&&(L.state=l),L},n.makeRe=(l,f={},a=!1,R=!1)=>{if(!l||typeof l!="string")throw new TypeError("Expected a non-empty string");let g={negated:!1,fastpaths:!0};return f.fastpaths!==!1&&(l[0]==="."||l[0]==="*")&&(g.output=e.fastpaths(l,f)),g.output||(g=e(l,f)),n.compileRe(g,f,a,R)},n.toRegex=(l,f)=>{try{const a=f||{};return new RegExp(l,a.flags||(a.nocase?"i":""))}catch(a){if(f&&f.debug===!0)throw a;return/$^/}},n.constants=H,nt=n,nt}var ut,Rt;function Oo(){if(Rt)return ut;Rt=1;const t=So(),e=tt();function o(H,b,n=!1){return b&&(b.windows===null||b.windows===void 0)&&(b={...b,windows:e.isWindows()}),t(H,b,n)}return Object.assign(o,t),ut=o,ut}var wo=Oo();ct(wo);const ko=S(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ze=t=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[e,o]=we.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return we.getBuiltinModule(t)}return ko(t)};Ze("fs");Ze("fs");Ze("path");Ze("url");const{createRequire:Ho}=Ze("module");var _t=Ho(import.meta.url);try{_t.resolve("picomatch"),_t("picomatch")}catch{}var it,At;function No(){if(At)return it;At=1;/*!
2
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
+ *
4
+ * Copyright (c) 2014-2016, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */return it=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},it}var lt,Tt;function St(){if(Tt)return lt;Tt=1;/*!
7
+ * is-glob <https://github.com/jonschlinkert/is-glob>
8
+ *
9
+ * Copyright (c) 2014-2017, Jon Schlinkert.
10
+ * Released under the MIT License.
11
+ */var t=No(),e={"{":"}","(":")","[":"]"},o=function(b){if(b[0]==="!")return!0;for(var n=0,l=-2,f=-2,a=-2,R=-2,g=-2;n<b.length;){if(b[n]==="*"||b[n+1]==="?"&&/[\].+)]/.test(b[n])||f!==-1&&b[n]==="["&&b[n+1]!=="]"&&(f<n&&(f=b.indexOf("]",n)),f>n&&(g===-1||g>f||(g=b.indexOf("\\",n),g===-1||g>f)))||a!==-1&&b[n]==="{"&&b[n+1]!=="}"&&(a=b.indexOf("}",n),a>n&&(g=b.indexOf("\\",n),g===-1||g>a))||R!==-1&&b[n]==="("&&b[n+1]==="?"&&/[:!=]/.test(b[n+2])&&b[n+3]!==")"&&(R=b.indexOf(")",n),R>n&&(g=b.indexOf("\\",n),g===-1||g>R))||l!==-1&&b[n]==="("&&b[n+1]!=="|"&&(l<n&&(l=b.indexOf("|",n)),l!==-1&&b[l+1]!==")"&&(R=b.indexOf(")",l),R>l&&(g=b.indexOf("\\",l),g===-1||g>R))))return!0;if(b[n]==="\\"){var T=b[n+1];n+=2;var C=e[T];if(C){var _=b.indexOf(C,n);_!==-1&&(n=_+1)}if(b[n]==="!")return!0}else n++}return!1},H=function(b){if(b[0]==="!")return!0;for(var n=0;n<b.length;){if(/[*?{}()[\]]/.test(b[n]))return!0;if(b[n]==="\\"){var l=b[n+1];n+=2;var f=e[l];if(f){var a=b.indexOf(f,n);a!==-1&&(n=a+1)}if(b[n]==="!")return!0}else n++}return!1};return lt=function(b,n){if(typeof b!="string"||b==="")return!1;if(t(b))return!0;var l=o;return n&&n.strict===!1&&(l=H),l(b)},lt}const Lo=S(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ot=t=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[e,o]=ke.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ke.getBuiltinModule(t)}return Lo(t)},Mo=Ot("path"),Bo=Ot("os");var at,xt;function Io(){if(xt)return at;xt=1;var t=St(),e=Mo.posix.dirname,o=Bo.platform()==="win32",H="/",b=/\\/g,n=/\\([!*?|[\](){}])/g;at=function(a,R){var g=Object.assign({flipBackslashes:!0},R);g.flipBackslashes&&o&&a.indexOf(H)<0&&(a=a.replace(b,H)),l(a)&&(a+=H),a+="a";do a=e(a);while(f(a));return a.replace(n,"$1")};function l(a){var R=a.slice(-1),g;switch(R){case"}":g="{";break;case"]":g="[";break;default:return!1}var T=a.indexOf(g);return T<0?!1:a.slice(T+1,-1).includes(H)}function f(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:t(a)}return at}var Po=Io();ct(Po);const Do=S(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Go=t=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[e,o]=He.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return He.getBuiltinModule(t)}return Do(t)};Go("node:fs/promises");const Uo=S(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,zo=t=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[e,o]=Ne.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ne.getBuiltinModule(t)}return Uo(t)};zo("node:fs");var Ko=St();ct(Ko);const Fo=S(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wt=t=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[e,o]=Le.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Le.getBuiltinModule(t)}return Fo(t)};wt("node:fs/promises");wt("node:fs");let Xo=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},jo=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Qo=(t,e)=>{const o=t?.code;return o==="ENOENT"?new Xo(`no such file or directory, open '${e}'`):o==="EACCES"||o==="EPERM"?new jo(`unable to read the non-readable file: ${e}`):t},Wo=S(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=t=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[e,o]=Me.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Me.getBuiltinModule(t)}return Wo(t)},{readFile:qo}=kt("node:fs/promises"),{unzip:Zo,brotliDecompress:Vo}=kt("node:zlib"),Yo={brotli:Vo,gzip:Zo,none:(t,e)=>{e(null,t)}},ks=async(t,e)=>{Zt(t),t=qt(t);const{buffer:o,compression:H,encoding:b,flag:n}=e??{};let l;try{l=await qo(t,n?{flag:n}:{})}catch(f){throw Qo(f,t)}return await new Promise((f,a)=>{Yo[H??"none"](l,(R,g)=>{R?a(R):f(o?g:g.toString(b??"utf8"))})})},Jo=S(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ht=t=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[e,o]=Be.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Be.getBuiltinModule(t)}return Jo(t)};Ht("node:fs");Ht("node:zlib");const es=S(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ts=t=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[e,o]=Ie.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ie.getBuiltinModule(t)}return es(t)},{createRequire:Nt}=ts("node:module"),os=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&os.set("AggregateError",AggregateError);const ss=Nt(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rs=t=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[e,o]=Pe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Pe.getBuiltinModule(t)}return ss(t)};rs("node:util");const ns=Nt(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ft=t=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,o]=De.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return De.getBuiltinModule(t)}return ns(t)};ft("node:fs");ft("node:path");ft("node:url");const us=S(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Lt=t=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[e,o]=Ge.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ge.getBuiltinModule(t)}return us(t)};Lt("node:fs");Lt("node:fs/promises");const is=S(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=t=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[e,o]=Ue.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ue.getBuiltinModule(t)}return is(t)};ls("node:fs");const as=S(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=t=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,o]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ze.getBuiltinModule(t)}return as(t)};ps("node:fs/promises");const cs=S(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fs=t=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[e,o]=Ke.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ke.getBuiltinModule(t)}return cs(t)};fs("node:fs");S(import.meta.url);const gs=S(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ds=t=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[e,o]=Fe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Fe.getBuiltinModule(t)}return gs(t)};ds("node:crypto");new TextEncoder;const bs=S(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hs=t=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[e,o]=Xe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Xe.getBuiltinModule(t)}return bs(t)};hs("node:fs/promises");const ms=S(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ys=t=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[e,o]=je.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return je.getBuiltinModule(t)}return ms(t)};ys("node:fs");const vs=S(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$s=t=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[e,o]=Qe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Qe.getBuiltinModule(t)}return vs(t)};$s("node:fs/promises");const Es=S(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=t=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[e,o]=We.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return We.getBuiltinModule(t)}return Es(t)};Rs("node:fs");const _s=S(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gt=t=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[e,o]=qe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return qe.getBuiltinModule(t)}return _s(t)},As=gt("fs"),Ts=gt("os"),xs=gt("path");var pt={},Ct;function Cs(){if(Ct)return pt;Ct=1;var t=Object.defineProperty,e=(g,T)=>t(g,"name",{value:T,configurable:!0}),o=As,H=Ts,b=xs;const n=e(g=>{let T="";for(let C=0;C<g.length;C+=1){const _=g[C],L=_.toUpperCase();T+=_===L?_.toLowerCase():L}return T},"invertCase"),l=new Map,f=e((g,T)=>{const C=b.join(g,`.is-fs-case-sensitive-test-${process.pid}`);try{return T.writeFileSync(C,""),!T.existsSync(n(C))}finally{try{T.unlinkSync(C)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((g,T,C)=>{try{return f(g,C)}catch(_){if(T===void 0)return f(H.tmpdir(),C);throw _}},"checkDirectoryCaseWithFallback"),R=e((g,T=o,C=!0)=>{const _=g??process.cwd();if(C&&l.has(_))return l.get(_);let L;const te=n(_);return te!==_&&T.existsSync(_)?L=!T.existsSync(te):L=a(_,g,T),C&&l.set(_,L),L},"isFsCaseSensitive");return pt.isFsCaseSensitive=R,pt}Cs();export{ks as z};
@@ -1 +1 @@
1
- import{emailMatchers as a,registerEmailMatchers as o,toHaveSentMatching as r,toHaveSentTo as i,toHaveSentWithAttachment as m,toHaveSentWithSubject as h}from"../packem_shared/emailMatchers-DZDkrZ_3.js";import{toEmailSnapshot as c}from"../packem_shared/toEmailSnapshot-DeRqM5SJ.js";import{createTestEmail as s}from"../packem_shared/createTestEmail-CF_RUjqo.js";export{s as createTestEmail,a as emailMatchers,o as registerEmailMatchers,c as toEmailSnapshot,r as toHaveSentMatching,i as toHaveSentTo,m as toHaveSentWithAttachment,h as toHaveSentWithSubject};
1
+ import{emailMatchers as a,registerEmailMatchers as o,toHaveSentMatching as r,toHaveSentTo as i,toHaveSentWithAttachment as m,toHaveSentWithSubject as h}from"../packem_shared/emailMatchers-DZDkrZ_3.js";import{toEmailSnapshot as c}from"../packem_shared/toEmailSnapshot-DeRqM5SJ.js";import{createTestEmail as s}from"../packem_shared/createTestEmail-D3XPGiHY.js";export{s as createTestEmail,a as emailMatchers,o as registerEmailMatchers,c as toEmailSnapshot,r as toHaveSentMatching,i as toHaveSentTo,m as toHaveSentWithAttachment,h as toHaveSentWithSubject};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/email",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A comprehensive email library with multi-provider support, crypto utilities, and template engines",
5
5
  "keywords": [
6
6
  "ahasend",
@@ -16,19 +16,16 @@
16
16
  "dmarc",
17
17
  "email",
18
18
  "encryption",
19
- "i18n",
20
- "inbound-email",
21
- "jsx-email",
22
- "liquid",
23
- "list-unsubscribe",
24
- "middleware",
25
- "queue",
26
- "webhook",
27
19
  "failover",
28
20
  "handlebars",
29
21
  "html-to-text",
30
22
  "http",
23
+ "i18n",
24
+ "inbound-email",
31
25
  "infobip",
26
+ "jsx-email",
27
+ "liquid",
28
+ "list-unsubscribe",
32
29
  "mail",
33
30
  "mailcrab",
34
31
  "mailersend",
@@ -38,6 +35,7 @@
38
35
  "mailpace",
39
36
  "mailtrap",
40
37
  "mandrill",
38
+ "middleware",
41
39
  "mjml",
42
40
  "mock",
43
41
  "netcore",
@@ -47,7 +45,7 @@
47
45
  "plunk",
48
46
  "postal",
49
47
  "postmark",
50
- "sparkpost",
48
+ "queue",
51
49
  "react-email",
52
50
  "resend",
53
51
  "roundrobin",
@@ -56,13 +54,20 @@
56
54
  "signing",
57
55
  "smime",
58
56
  "smtp",
57
+ "sparkpost",
59
58
  "sweego",
60
59
  "visulima",
61
60
  "vue-email",
61
+ "webhook",
62
62
  "zeptomail"
63
63
  ],
64
64
  "homepage": "https://visulima.com/packages/email",
65
65
  "bugs": "https://github.com/visulima/visulima/issues",
66
+ "license": "MIT",
67
+ "author": {
68
+ "name": "Daniel Bannert",
69
+ "email": "d.bannert@anolilab.de"
70
+ },
66
71
  "repository": {
67
72
  "type": "git",
68
73
  "url": "git+https://github.com/visulima/visulima.git",
@@ -78,13 +83,13 @@
78
83
  "url": "https://anolilab.com/support"
79
84
  }
80
85
  ],
81
- "license": "MIT",
82
- "author": {
83
- "name": "Daniel Bannert",
84
- "email": "d.bannert@anolilab.de"
85
- },
86
- "sideEffects": false,
86
+ "files": [
87
+ "dist",
88
+ "README.md",
89
+ "CHANGELOG.md"
90
+ ],
87
91
  "type": "module",
92
+ "sideEffects": false,
88
93
  "exports": {
89
94
  ".": {
90
95
  "types": "./dist/index.d.ts",
@@ -348,11 +353,10 @@
348
353
  },
349
354
  "./package.json": "./package.json"
350
355
  },
351
- "files": [
352
- "dist",
353
- "README.md",
354
- "CHANGELOG.md"
355
- ],
356
+ "publishConfig": {
357
+ "access": "public",
358
+ "provenance": true
359
+ },
356
360
  "dependencies": {
357
361
  "html-to-text": "^10.0.0",
358
362
  "ical-generator": "11.0.0",
@@ -361,7 +365,7 @@
361
365
  },
362
366
  "peerDependencies": {
363
367
  "@opentelemetry/api": "^1.0.0 || ^2.0.0",
364
- "@react-email/render": "^2.0.9",
368
+ "@react-email/render": "^2.0.10",
365
369
  "@vue-email/render": "0.0.9",
366
370
  "asn1js": ">=3.0.10",
367
371
  "fast-xml-parser": "^4.5.0",
@@ -369,7 +373,7 @@
369
373
  "jsx-email": "^2.0.0",
370
374
  "juice": "^11.0.0",
371
375
  "liquidjs": "^10.0.0",
372
- "mjml": ">=5.3.0",
376
+ "mjml": ">=5.4.0",
373
377
  "nodemailer": ">=7",
374
378
  "pkijs": ">=3.4.0",
375
379
  "unstorage": "^1.13.0"
@@ -417,9 +421,5 @@
417
421
  },
418
422
  "engines": {
419
423
  "node": "^22.14.0 || >=24.10.0"
420
- },
421
- "publishConfig": {
422
- "access": "public",
423
- "provenance": true
424
424
  }
425
425
  }
@@ -1,11 +0,0 @@
1
- import{createRequire as Bt}from"node:module";const It=Bt(import.meta.url),de=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pt=t=>{if(typeof de<"u"&&de.versions&&de.versions.node){const[e,o]=de.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return de.getBuiltinModule(t)}return It(t)},{createRequire:O}=Pt("node:module"),Dt=/^[A-Z]:\//i,Gt=(t="")=>t&&t.replaceAll("\\","/").replace(Dt,e=>e.toUpperCase()),Ut=O(import.meta.url),be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Kt=t=>{if(typeof be<"u"&&be.versions&&be.versions.node){const[e,o]=be.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return be.getBuiltinModule(t)}return Ut(t)},{fileURLToPath:zt}=Kt("node:url");function Ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gt,dt;function jt(){return dt||(dt=1,gt=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),gt}var Xt=jt();const Qt=Ft(Xt);new Set(Qt);const Wt=t=>Gt(t instanceof URL?zt(t):t),qt=t=>{if(!t||!(t instanceof URL)&&typeof t!="string")throw new TypeError("Path must be a non-empty string or URL.")},Zt=O(import.meta.url),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yt=t=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,o]=he.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return he.getBuiltinModule(t)}return Zt(t)};Yt("node:fs/promises");const Vt=O(import.meta.url),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jt=t=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[e,o]=me.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return me.getBuiltinModule(t)}return Vt(t)};Jt("node:fs");const eo=O(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,to=t=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[e,o]=ye.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ye.getBuiltinModule(t)}return eo(t)};to("node:fs/promises");const oo=O(import.meta.url),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ro=t=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[e,o]=ve.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ve.getBuiltinModule(t)}return oo(t)};ro("node:fs");const so=O(import.meta.url),Re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,no=t=>{if(typeof Re<"u"&&Re.versions&&Re.versions.node){const[e,o]=Re.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Re.getBuiltinModule(t)}return so(t)};no("node:fs/promises");const uo=O(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,io=t=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[e,o]=$e.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return $e.getBuiltinModule(t)}return uo(t)};io("node:fs");const ao=O(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=t=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[e,o]=Ee.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ee.getBuiltinModule(t)}return ao(t)};lo("node:fs/promises");const po=O(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,co=t=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[e,o]=Ae.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ae.getBuiltinModule(t)}return po(t)};co("node:fs");const fo=O(import.meta.url),_e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,go=t=>{if(typeof _e<"u"&&_e.versions&&_e.versions.node){const[e,o]=_e.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return _e.getBuiltinModule(t)}return fo(t)};go("node:fs/promises");const bo=O(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ho=t=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[e,o]=Te.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Te.getBuiltinModule(t)}return bo(t)};ho("node:fs");O(import.meta.url);const mo=O(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yo=t=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[e,o]=xe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return xe.getBuiltinModule(t)}return mo(t)};yo("node:fs/promises");const vo=O(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ro=t=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[e,o]=Ce.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ce.getBuiltinModule(t)}return vo(t)};Ro("node:fs");const $o=O(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Eo=t=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[e,o]=Se.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Se.getBuiltinModule(t)}return $o(t)};Eo("node:fs/promises");const Ao=O(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_o=t=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[e,o]=Oe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Oe.getBuiltinModule(t)}return Ao(t)};_o("node:fs");function pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bt={},tt,ht;function Je(){if(ht)return tt;ht=1;const t="[^\\\\/]",e=Symbol("unignore"),o="\\.",N="\\+",b="\\?",s="\\/",a="(?=.)",g="[^/]",l=`(?:${s}|$)`,A=`(?:^|${s})`,d=`${o}{1,2}${l}`,x=`(?!${o})`,S=`(?!${A}${d})`,$=`(?!${o}{0,1}${l})`,M=`(?!${d})`,te=`[^.${s}]`,q=`${g}*?`,j="/",c={DOT_LITERAL:o,PLUS_LITERAL:N,QMARK_LITERAL:b,SLASH_LITERAL:s,ONE_CHAR:a,QMARK:g,END_ANCHOR:l,DOTS_SLASH:d,NO_DOT:x,NO_DOTS:S,NO_DOT_SLASH:$,NO_DOTS_SLASH:M,QMARK_NO_DOT:te,STAR:q,START_ANCHOR:A,SEP:j},h={...c,SLASH_LITERAL:"[\\\\/]",QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},r={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return tt={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:r,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(m){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${m.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(m){return m===!0?h:c}},tt}var mt;function et(){return mt||(mt=1,(function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:N,REGEX_SPECIAL_CHARS_GLOBAL:b}=Je();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>N.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(b,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(o,a=>a==="\\"?"":a),t.escapeLast=(s,a,g)=>{const l=s.lastIndexOf(a,g);return l===-1?s:s[l-1]==="\\"?t.escapeLast(s,a,l-1):`${s.slice(0,l)}\\${s.slice(l)}`},t.removePrefix=(s,a={})=>{let g=s;return g.startsWith("./")&&(g=g.slice(2),a.prefix="./"),g},t.wrapOutput=(s,a={},g={})=>{const l=g.contains?"":"^",A=g.contains?"":"$";let d=`${l}(?:${s})${A}`;return a.negated===!0&&(d=`(?:^(?!${d}).*$)`),d},t.basename=(s,{windows:a}={})=>{const g=s.split(a?/[\\/]/:"/"),l=g[g.length-1];return l===""?g[g.length-2]:l}})(bt)),bt}var ot,yt;function To(){if(yt)return ot;yt=1;const t=et(),{CHAR_ASTERISK:e,CHAR_AT:o,CHAR_BACKWARD_SLASH:N,CHAR_COMMA:b,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:g,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:A,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:x,CHAR_QUESTION_MARK:S,CHAR_RIGHT_CURLY_BRACE:$,CHAR_RIGHT_PARENTHESES:M,CHAR_RIGHT_SQUARE_BRACKET:te}=Je(),q=c=>c===g||c===N,j=c=>{c.isPrefix!==!0&&(c.depth=c.isGlobstar?1/0:1)};return ot=(c,h)=>{const r=h||{},m=c.length-1,v=r.parts===!0||r.scanToEnd===!0,R=[],y=[],H=[];let X=c,Z=-1,U=0,oe=0,Q=!1,re=!1,I=!1,ae=!1,fe=!1,se=!1,L=!1,ne=!1,ge=!1,W=!1,F=0,V,E,C={value:"",depth:0,isGlob:!1};const i=()=>Z>=m,Y=()=>X.charCodeAt(Z+1),K=()=>(V=E,X.charCodeAt(++Z));for(;Z<m;){E=K();let w;if(E===N){L=C.backslashes=!0,E=K(),E===l&&(se=!0);continue}if(se===!0||E===l){for(F++;i()!==!0&&(E=K());){if(E===N){L=C.backslashes=!0,K();continue}if(E===l){F++;continue}if(se!==!0&&E===s&&(E=K())===s){if(Q=C.isBrace=!0,I=C.isGlob=!0,W=!0,v===!0)continue;break}if(se!==!0&&E===b){if(Q=C.isBrace=!0,I=C.isGlob=!0,W=!0,v===!0)continue;break}if(E===$&&(F--,F===0)){se=!1,Q=C.isBrace=!0,W=!0;break}}if(v===!0)continue;break}if(E===g){if(R.push(Z),y.push(C),C={value:"",depth:0,isGlob:!1},W===!0)continue;if(V===s&&Z===U+1){U+=2;continue}oe=Z+1;continue}if(r.noext!==!0&&(E===x||E===o||E===e||E===S||E===a)&&Y()===A){if(I=C.isGlob=!0,ae=C.isExtglob=!0,W=!0,E===a&&Z===U&&(ge=!0),v===!0){for(;i()!==!0&&(E=K());){if(E===N){L=C.backslashes=!0,E=K();continue}if(E===M){I=C.isGlob=!0,W=!0;break}}continue}break}if(E===e){if(V===e&&(fe=C.isGlobstar=!0),I=C.isGlob=!0,W=!0,v===!0)continue;break}if(E===S){if(I=C.isGlob=!0,W=!0,v===!0)continue;break}if(E===d){for(;i()!==!0&&(w=K());){if(w===N){L=C.backslashes=!0,K();continue}if(w===te){re=C.isBracket=!0,I=C.isGlob=!0,W=!0;break}}if(v===!0)continue;break}if(r.nonegate!==!0&&E===a&&Z===U){ne=C.negated=!0,U++;continue}if(r.noparen!==!0&&E===A){if(I=C.isGlob=!0,v===!0){for(;i()!==!0&&(E=K());){if(E===A){L=C.backslashes=!0,E=K();continue}if(E===M){W=!0;break}}continue}break}if(I===!0){if(W=!0,v===!0)continue;break}}r.noext===!0&&(ae=!1,I=!1);let G=X,n="",u="";U>0&&(n=X.slice(0,U),X=X.slice(U),oe-=U),G&&I===!0&&oe>0?(G=X.slice(0,oe),u=X.slice(oe)):I===!0?(G="",u=X):G=X,G&&G!==""&&G!=="/"&&G!==X&&q(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),r.unescape===!0&&(u&&(u=t.removeBackslashes(u)),G&&L===!0&&(G=t.removeBackslashes(G)));const ee={prefix:n,input:c,start:U,base:G,glob:u,isBrace:Q,isBracket:re,isGlob:I,isExtglob:ae,isGlobstar:fe,negated:ne,negatedExtglob:ge};if(r.tokens===!0&&(ee.maxDepth=0,q(E)||y.push(C),ee.tokens=y),r.parts===!0||r.tokens===!0){let w;for(let P=0;P<R.length;P++){const le=w?w+1:U,J=R[P],pe=c.slice(le,J);r.tokens&&(P===0&&U!==0?(y[P].isPrefix=!0,y[P].value=n):y[P].value=pe,j(y[P]),ee.maxDepth+=y[P].depth),(P!==0||pe!=="")&&H.push(pe),w=J}if(w&&w+1<c.length){const P=c.slice(w+1);H.push(P),r.tokens&&(y[y.length-1].value=P,j(y[y.length-1]),ee.maxDepth+=y[y.length-1].depth)}ee.slashes=R,ee.parts=H}return ee},ot}var rt,vt;function xo(){if(vt)return rt;vt=1;const t=Je(),e=et(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:N,REGEX_NON_SPECIAL_CHARS:b,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:a}=t,g=(c,h)=>typeof h.expandRange=="function"?h.expandRange(...c,h):(c.sort(),`[${c.join("-")}]`),l=(c,h)=>`Missing ${c}: "${h}" - use "\\\\${h}" to match literal characters`,A=c=>{const h=[];let r=0,m=0,v=0,R="",y=!1;for(const H of c){if(y===!0){R+=H,y=!1;continue}if(H==="\\"){R+=H,y=!0;continue}if(H==='"'){v=v===1?0:1,R+=H;continue}if(v===0){if(H==="[")r++;else if(H==="]"&&r>0)r--;else if(r===0){if(H==="(")m++;else if(H===")"&&m>0)m--;else if(H==="|"&&m===0){h.push(R),R="";continue}}}R+=H}return h.push(R),h},d=c=>{let h=!1;for(const r of c){if(h===!0){h=!1;continue}if(r==="\\"){h=!0;continue}if(/[?*+@!()[\]{}]/.test(r))return!1}return!0},x=c=>{let h=c.trim(),r=!0;for(;r===!0;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(h)&&(h=h.slice(2,-1),r=!0);if(d(h))return h.replace(/\\(.)/g,"$1")},S=c=>{const h=c.map(x).filter(Boolean);for(let r=0;r<h.length;r++)for(let m=r+1;m<h.length;m++){const v=h[r],R=h[m],y=v[0];if(!(!y||v!==y.repeat(v.length)||R!==y.repeat(R.length))&&(v===R||v.startsWith(R)||R.startsWith(v)))return!0}return!1},$=(c,h=!0)=>{if(c[0]!=="+"&&c[0]!=="*"||c[1]!=="(")return;let r=0,m=0,v=0,R=!1;for(let y=1;y<c.length;y++){const H=c[y];if(R===!0){R=!1;continue}if(H==="\\"){R=!0;continue}if(H==='"'){v=v===1?0:1;continue}if(v!==1){if(H==="["){r++;continue}if(H==="]"&&r>0){r--;continue}if(!(r>0)){if(H==="("){m++;continue}if(H===")"&&(m--,m===0))return h===!0&&y!==c.length-1?void 0:{type:c[0],body:c.slice(2,y),end:y}}}}},M=c=>{let h=0;const r=[];for(;h<c.length;){const m=$(c.slice(h),!1);if(!m||m.type!=="*")return;const v=A(m.body).map(y=>y.trim());if(v.length!==1)return;const R=x(v[0]);if(!R||R.length!==1)return;r.push(R),h+=m.end+1}return r.length<1?void 0:`${r.length===1?e.escapeRegex(r[0]):`[${r.map(m=>e.escapeRegex(m)).join("")}]`}*`},te=c=>{let h=0,r=c.trim(),m=$(r);for(;m;)h++,r=m.body.trim(),m=$(r);return h},q=(c,h)=>{if(h.maxExtglobRecursion===!1)return{risky:!1};const r=typeof h.maxExtglobRecursion=="number"?h.maxExtglobRecursion:t.DEFAULT_MAX_EXTGLOB_RECURSION,m=A(c).map(v=>v.trim());if(m.length>1&&(m.some(v=>v==="")||m.some(v=>/^[*?]+$/.test(v))||S(m)))return{risky:!0};for(const v of m){const R=M(v);if(R)return{risky:!0,safeOutput:R};if(te(v)>r)return{risky:!0}}return{risky:!1}},j=(c,h)=>{if(typeof c!="string")throw new TypeError("Expected a string");c=a[c]||c;const r={...h},m=typeof r.maxLength=="number"?Math.min(o,r.maxLength):o;let v=c.length;if(v>m)throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${m}`);const R={type:"bos",value:"",output:r.prepend||""},y=[R],H=r.capture?"":"?:",X=t.globChars(r.windows),Z=t.extglobChars(X),{DOT_LITERAL:U,PLUS_LITERAL:oe,SLASH_LITERAL:Q,ONE_CHAR:re,DOTS_SLASH:I,NO_DOT:ae,NO_DOT_SLASH:fe,NO_DOTS_SLASH:se,QMARK:L,QMARK_NO_DOT:ne,STAR:ge,START_ANCHOR:W}=X,F=f=>`(${H}(?:(?!${W}${f.dot?I:U}).)*?)`,V=r.dot?"":ae,E=r.dot?L:ne;let C=r.bash===!0?F(r):ge;r.capture&&(C=`(${C})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const i={input:c,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};c=e.removePrefix(c,i),v=c.length;const Y=[],K=[],G=[];let n=R,u;const ee=()=>i.index===v-1,w=i.peek=(f=1)=>c[i.index+f],P=i.advance=()=>c[++i.index]||"",le=()=>c.slice(i.index+1),J=(f="",B=0)=>{i.consumed+=f,i.index+=B},pe=f=>{i.output+=f.output!=null?f.output:f.value,J(f.value)},Lt=()=>{let f=1;for(;w()==="!"&&(w(2)!=="("||w(3)==="?");)P(),i.start++,f++;return f%2===0?!1:(i.negated=!0,i.start++,!0)},Ye=f=>{i[f]++,G.push(f)},ce=f=>{i[f]--,G.pop()},_=f=>{if(n.type==="globstar"){const B=i.braces>0&&(f.type==="comma"||f.type==="brace"),p=f.extglob===!0||Y.length&&(f.type==="pipe"||f.type==="paren");f.type!=="slash"&&f.type!=="paren"&&!B&&!p&&(i.output=i.output.slice(0,-n.output.length),n.type="star",n.value="*",n.output=C,i.output+=n.output)}if(Y.length&&f.type!=="paren"&&(Y[Y.length-1].inner+=f.value),(f.value||f.output)&&pe(f),n&&n.type==="text"&&f.type==="text"){n.output=(n.output||n.value)+f.value,n.value+=f.value;return}f.prev=n,y.push(f),n=f},Ve=(f,B)=>{const p={...Z[B],conditions:1,inner:""};p.prev=n,p.parens=i.parens,p.output=i.output,p.startIndex=i.index,p.tokensIndex=y.length;const T=(r.capture?"(":"")+p.open;Ye("parens"),_({type:f,value:B,output:i.output?"":re}),_({type:"paren",extglob:!0,value:P(),output:T}),Y.push(p)},Mt=f=>{const B=c.slice(f.startIndex,i.index+1),p=c.slice(f.startIndex+2,i.index),T=q(p,r);if((f.type==="plus"||f.type==="star")&&T.risky){const k=T.safeOutput?(f.output?"":re)+(r.capture?`(${T.safeOutput})`:T.safeOutput):void 0,ue=y[f.tokensIndex];ue.type="text",ue.value=B,ue.output=k||e.escapeRegex(B);for(let ie=f.tokensIndex+1;ie<y.length;ie++)y[ie].value="",y[ie].output="",delete y[ie].suffix;i.output=f.output+ue.output,i.backtrack=!0,_({type:"paren",extglob:!0,value:u,output:""}),ce("parens");return}let D=f.close+(r.capture?")":""),z;if(f.type==="negate"){let k=C;if(f.inner&&f.inner.length>1&&f.inner.includes("/")&&(k=F(r)),(k!==C||ee()||/^\)+$/.test(le()))&&(D=f.close=`)$))${k}`),f.inner.includes("*")&&(z=le())&&/^\.[^\\/.]+$/.test(z)){const ue=j(z,{...h,fastpaths:!1}).output;D=f.close=`)${ue})${k})`}f.prev.type==="bos"&&(i.negatedExtglob=!0)}_({type:"paren",extglob:!0,value:u,output:D}),ce("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(c)){let f=!1,B=c.replace(s,(p,T,D,z,k,ue)=>z==="\\"?(f=!0,p):z==="?"?T?T+z+(k?L.repeat(k.length):""):ue===0?E+(k?L.repeat(k.length):""):L.repeat(D.length):z==="."?U.repeat(D.length):z==="*"?T?T+z+(k?C:""):C:T?p:`\\${p}`);return f===!0&&(r.unescape===!0?B=B.replace(/\\/g,""):B=B.replace(/\\+/g,p=>p.length%2===0?"\\\\":p?"\\":"")),B===c&&r.contains===!0?(i.output=c,i):(i.output=e.wrapOutput(B,i,h),i)}for(;!ee();){if(u=P(),u==="\0")continue;if(u==="\\"){const p=w();if(p==="/"&&r.bash!==!0||p==="."||p===";")continue;if(!p){u+="\\",_({type:"text",value:u});continue}const T=/^\\+/.exec(le());let D=0;if(T&&T[0].length>2&&(D=T[0].length,i.index+=D,D%2!==0&&(u+="\\")),r.unescape===!0?u=P():u+=P(),i.brackets===0){_({type:"text",value:u});continue}}if(i.brackets>0&&(u!=="]"||n.value==="["||n.value==="[^")){if(r.posix!==!1&&u===":"){const p=n.value.slice(1);if(p.includes("[")&&(n.posix=!0,p.includes(":"))){const T=n.value.lastIndexOf("["),D=n.value.slice(0,T),z=n.value.slice(T+2),k=N[z];if(k){n.value=D+k,i.backtrack=!0,P(),!R.output&&y.indexOf(n)===1&&(R.output=re);continue}}}(u==="["&&w()!==":"||u==="-"&&w()==="]")&&(u=`\\${u}`),u==="]"&&(n.value==="["||n.value==="[^")&&(u=`\\${u}`),r.posix===!0&&u==="!"&&n.value==="["&&(u="^"),n.value+=u,pe({value:u});continue}if(i.quotes===1&&u!=='"'){u=e.escapeRegex(u),n.value+=u,pe({value:u});continue}if(u==='"'){i.quotes=i.quotes===1?0:1,r.keepQuotes===!0&&_({type:"text",value:u});continue}if(u==="("){Ye("parens"),_({type:"paren",value:u});continue}if(u===")"){if(i.parens===0&&r.strictBrackets===!0)throw new SyntaxError(l("opening","("));const p=Y[Y.length-1];if(p&&i.parens===p.parens+1){Mt(Y.pop());continue}_({type:"paren",value:u,output:i.parens?")":"\\)"}),ce("parens");continue}if(u==="["){if(r.nobracket===!0||!le().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(l("closing","]"));u=`\\${u}`}else Ye("brackets");_({type:"bracket",value:u});continue}if(u==="]"){if(r.nobracket===!0||n&&n.type==="bracket"&&n.value.length===1){_({type:"text",value:u,output:`\\${u}`});continue}if(i.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(l("opening","["));_({type:"text",value:u,output:`\\${u}`});continue}ce("brackets");const p=n.value.slice(1);if(n.posix!==!0&&p[0]==="^"&&!p.includes("/")&&(u=`/${u}`),n.value+=u,pe({value:u}),r.literalBrackets===!1||e.hasRegexChars(p))continue;const T=e.escapeRegex(n.value);if(i.output=i.output.slice(0,-n.value.length),r.literalBrackets===!0){i.output+=T,n.value=T;continue}n.value=`(${H}${T}|${n.value})`,i.output+=n.value;continue}if(u==="{"&&r.nobrace!==!0){Ye("braces");const p={type:"brace",value:u,output:"(",outputIndex:i.output.length,tokensIndex:i.tokens.length};K.push(p),_(p);continue}if(u==="}"){const p=K[K.length-1];if(r.nobrace===!0||!p){_({type:"text",value:u,output:u});continue}let T=")";if(p.dots===!0){const D=y.slice(),z=[];for(let k=D.length-1;k>=0&&(y.pop(),D[k].type!=="brace");k--)D[k].type!=="dots"&&z.unshift(D[k].value);T=g(z,r),i.backtrack=!0}if(p.comma!==!0&&p.dots!==!0){const D=i.output.slice(0,p.outputIndex),z=i.tokens.slice(p.tokensIndex);p.value=p.output="\\{",u=T="\\}",i.output=D;for(const k of z)i.output+=k.output||k.value}_({type:"brace",value:u,output:T}),ce("braces"),K.pop();continue}if(u==="|"){Y.length>0&&Y[Y.length-1].conditions++,_({type:"text",value:u});continue}if(u===","){let p=u;const T=K[K.length-1];T&&G[G.length-1]==="braces"&&(T.comma=!0,p="|"),_({type:"comma",value:u,output:p});continue}if(u==="/"){if(n.type==="dot"&&i.index===i.start+1){i.start=i.index+1,i.consumed="",i.output="",y.pop(),n=R;continue}_({type:"slash",value:u,output:Q});continue}if(u==="."){if(i.braces>0&&n.type==="dot"){n.value==="."&&(n.output=U);const p=K[K.length-1];n.type="dots",n.output+=u,n.value+=u,p.dots=!0;continue}if(i.braces+i.parens===0&&n.type!=="bos"&&n.type!=="slash"){_({type:"text",value:u,output:U});continue}_({type:"dot",value:u,output:U});continue}if(u==="?"){if(!(n&&n.value==="(")&&r.noextglob!==!0&&w()==="("&&w(2)!=="?"){Ve("qmark",u);continue}if(n&&n.type==="paren"){const p=w();let T=u;(n.value==="("&&!/[!=<:]/.test(p)||p==="<"&&!/<([!=]|\w+>)/.test(le()))&&(T=`\\${u}`),_({type:"text",value:u,output:T});continue}if(r.dot!==!0&&(n.type==="slash"||n.type==="bos")){_({type:"qmark",value:u,output:ne});continue}_({type:"qmark",value:u,output:L});continue}if(u==="!"){if(r.noextglob!==!0&&w()==="("&&(w(2)!=="?"||!/[!=<:]/.test(w(3)))){Ve("negate",u);continue}if(r.nonegate!==!0&&i.index===0){Lt();continue}}if(u==="+"){if(r.noextglob!==!0&&w()==="("&&w(2)!=="?"){Ve("plus",u);continue}if(n&&n.value==="("||r.regex===!1){_({type:"plus",value:u,output:oe});continue}if(n&&(n.type==="bracket"||n.type==="paren"||n.type==="brace")||i.parens>0){_({type:"plus",value:u});continue}_({type:"plus",value:oe});continue}if(u==="@"){if(r.noextglob!==!0&&w()==="("&&w(2)!=="?"){_({type:"at",extglob:!0,value:u,output:""});continue}_({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);const p=b.exec(le());p&&(u+=p[0],i.index+=p[0].length),_({type:"text",value:u});continue}if(n&&(n.type==="globstar"||n.star===!0)){n.type="star",n.star=!0,n.value+=u,n.output=C,i.backtrack=!0,i.globstar=!0,J(u);continue}let f=le();if(r.noextglob!==!0&&/^\([^?]/.test(f)){Ve("star",u);continue}if(n.type==="star"){if(r.noglobstar===!0){J(u);continue}const p=n.prev,T=p.prev,D=p.type==="slash"||p.type==="bos",z=T&&(T.type==="star"||T.type==="globstar");if(r.bash===!0&&(!D||f[0]&&f[0]!=="/")){_({type:"star",value:u,output:""});continue}const k=i.braces>0&&(p.type==="comma"||p.type==="brace"),ue=Y.length&&(p.type==="pipe"||p.type==="paren");if(!D&&p.type!=="paren"&&!k&&!ue){_({type:"star",value:u,output:""});continue}for(;f.slice(0,3)==="/**";){const ie=c[i.index+4];if(ie&&ie!=="/")break;f=f.slice(3),J("/**",3)}if(p.type==="bos"&&ee()){n.type="globstar",n.value+=u,n.output=F(r),i.output=n.output,i.globstar=!0,J(u);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&!z&&ee()){i.output=i.output.slice(0,-(p.output+n.output).length),p.output=`(?:${p.output}`,n.type="globstar",n.output=F(r)+(r.strictSlashes?")":"|$)"),n.value+=u,i.globstar=!0,i.output+=p.output+n.output,J(u);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&f[0]==="/"){const ie=f[1]!==void 0?"|$":"";i.output=i.output.slice(0,-(p.output+n.output).length),p.output=`(?:${p.output}`,n.type="globstar",n.output=`${F(r)}${Q}|${Q}${ie})`,n.value+=u,i.output+=p.output+n.output,i.globstar=!0,J(u+P()),_({type:"slash",value:"/",output:""});continue}if(p.type==="bos"&&f[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${Q}|${F(r)}${Q})`,i.output=n.output,i.globstar=!0,J(u+P()),_({type:"slash",value:"/",output:""});continue}if(k&&f[0]==="/"){n.type="globstar",n.value+=u,n.output=`(?:^|${Q}|${F(r)}${Q})`,i.output+=n.output,i.globstar=!0,J(u+P()),_({type:"slash",value:"/",output:""});continue}i.output=i.output.slice(0,-n.output.length),n.type="globstar",n.output=F(r),n.value+=u,i.output+=n.output,i.globstar=!0,J(u);continue}const B={type:"star",value:u,output:C};if(r.bash===!0){B.output=".*?",(n.type==="bos"||n.type==="slash")&&(B.output=V+B.output),_(B);continue}if(n&&(n.type==="bracket"||n.type==="paren")&&r.regex===!0){B.output=u,_(B);continue}(i.index===i.start||n.type==="slash"||n.type==="dot")&&(n.type==="dot"?(i.output+=fe,n.output+=fe):r.dot===!0?(i.output+=se,n.output+=se):(i.output+=V,n.output+=V),w()!=="*"&&(i.output+=re,n.output+=re)),_(B)}for(;i.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(l("closing","]"));i.output=e.escapeLast(i.output,"["),ce("brackets")}for(;i.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(l("closing",")"));i.output=e.escapeLast(i.output,"("),ce("parens")}for(;i.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(l("closing","}"));i.output=e.escapeLast(i.output,"{"),ce("braces")}if(r.strictSlashes!==!0&&(n.type==="star"||n.type==="bracket")&&_({type:"maybe_slash",value:"",output:`${Q}?`}),i.backtrack===!0){i.output="";for(const f of i.tokens)i.output+=f.output!=null?f.output:f.value,f.suffix&&(i.output+=f.suffix)}return i};return j.fastpaths=(c,h)=>{const r={...h},m=typeof r.maxLength=="number"?Math.min(o,r.maxLength):o,v=c.length;if(v>m)throw new SyntaxError(`Input length: ${v}, exceeds maximum allowed length: ${m}`);c=a[c]||c;const{DOT_LITERAL:R,SLASH_LITERAL:y,ONE_CHAR:H,DOTS_SLASH:X,NO_DOT:Z,NO_DOTS:U,NO_DOTS_SLASH:oe,STAR:Q,START_ANCHOR:re}=t.globChars(r.windows),I=r.dot?U:Z,ae=r.dot?oe:Z,fe=r.capture?"":"?:",se={negated:!1,prefix:""};let L=r.bash===!0?".*?":Q;r.capture&&(L=`(${L})`);const ne=V=>V.noglobstar===!0?L:`(${fe}(?:(?!${re}${V.dot?X:R}).)*?)`,ge=V=>{switch(V){case"*":return`${I}${H}${L}`;case".*":return`${R}${H}${L}`;case"*.*":return`${I}${L}${R}${H}${L}`;case"*/*":return`${I}${L}${y}${H}${ae}${L}`;case"**":return I+ne(r);case"**/*":return`(?:${I}${ne(r)}${y})?${ae}${H}${L}`;case"**/*.*":return`(?:${I}${ne(r)}${y})?${ae}${L}${R}${H}${L}`;case"**/.*":return`(?:${I}${ne(r)}${y})?${R}${H}${L}`;default:{const E=/^(.*?)\.(\w+)$/.exec(V);if(!E)return;const C=ge(E[1]);return C?C+R+E[2]:void 0}}},W=e.removePrefix(c,se);let F=ge(W);return F&&r.strictSlashes!==!0&&(F+=`${y}?`),F},rt=j,rt}var st,Rt;function Co(){if(Rt)return st;Rt=1;const t=To(),e=xo(),o=et(),N=Je(),b=a=>a&&typeof a=="object"&&!Array.isArray(a),s=(a,g,l=!1)=>{if(Array.isArray(a)){const q=a.map(j=>s(j,g,l));return j=>{for(const c of q){const h=c(j);if(h)return h}return!1}}const A=b(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!A)throw new TypeError("Expected pattern to be a non-empty string");const d=g||{},x=d.windows,S=A?s.compileRe(a,g):s.makeRe(a,g,!1,!0),$=S.state;delete S.state;let M=()=>!1;if(d.ignore){const q={...g,ignore:null,onMatch:null,onResult:null};M=s(d.ignore,q,l)}const te=(q,j=!1)=>{const{isMatch:c,match:h,output:r}=s.test(q,S,g,{glob:a,posix:x}),m={glob:a,state:$,regex:S,posix:x,input:q,output:r,match:h,isMatch:c};if(typeof d.onResult=="function"&&d.onResult(m),c===!1)return m.isMatch=!1,j?m:!1;e:if(M(q)){if(typeof d.onIgnore=="function"&&d.onIgnore(m)===N.UNIGNORE){m.isMatch=!0;break e}return m.isMatch=!1,j?m:!1}return typeof d.onMatch=="function"&&d.onMatch(m),j?m:!0};return l&&(te.state=$),te};return s.test=(a,g,l,{glob:A,posix:d}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const x=l||{},S=x.format||(d?o.toPosixSlashes:null);let $=a===A,M=$&&S?S(a):a;return $===!1&&(M=S?S(a):a,$=M===A),($===!1||x.capture===!0)&&(x.matchBase===!0||x.basename===!0?$=s.matchBase(a,g,l,d):$=g.exec(M)),{isMatch:!!$,match:$,output:M}},s.matchBase=(a,g,l)=>(g instanceof RegExp?g:s.makeRe(g,l)).test(o.basename(a)),s.isMatch=(a,g,l)=>s(g,l)(a),s.parse=(a,g)=>Array.isArray(a)?a.map(l=>s.parse(l,g)):e(a,{...g,fastpaths:!1}),s.scan=(a,g)=>t(a,g),s.compileRe=(a,g,l=!1,A=!1)=>{if(l===!0)return a.output;const d=g||{},x=d.contains?"":"^",S=d.contains?"":"$";let $=`${x}(?:${a.output})${S}`;a&&a.negated===!0&&($=`^(?!${$}).*$`);const M=s.toRegex($,g);return A===!0&&(M.state=a),M},s.makeRe=(a,g={},l=!1,A=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return g.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(d.output=e.fastpaths(a,g)),d.output||(d=e(a,g)),s.compileRe(d,g,l,A)},s.toRegex=(a,g)=>{try{const l=g||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(g&&g.debug===!0)throw l;return/$^/}},s.constants=N,st=s,st}var nt,$t;function So(){if($t)return nt;$t=1;const t=Co(),e=et();function o(N,b,s=!1){return b&&(b.windows===null||b.windows===void 0)&&(b={...b,windows:e.isWindows()}),t(N,b,s)}return Object.assign(o,t),nt=o,nt}var Oo=So();pt(Oo);const Ho=O(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ze=t=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[e,o]=He.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return He.getBuiltinModule(t)}return Ho(t)};Ze("fs");Ze("fs");Ze("path");Ze("url");const{createRequire:wo}=Ze("module");var Et=wo(import.meta.url);try{Et.resolve("picomatch"),Et("picomatch")}catch{}var ut,At;function No(){if(At)return ut;At=1;/*!
2
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
- *
4
- * Copyright (c) 2014-2016, Jon Schlinkert.
5
- * Licensed under the MIT License.
6
- */return ut=function(t){if(typeof t!="string"||t==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(e[2])return!0;t=t.slice(e.index+e[0].length)}return!1},ut}var it,_t;function Ct(){if(_t)return it;_t=1;/*!
7
- * is-glob <https://github.com/jonschlinkert/is-glob>
8
- *
9
- * Copyright (c) 2014-2017, Jon Schlinkert.
10
- * Released under the MIT License.
11
- */var t=No(),e={"{":"}","(":")","[":"]"},o=function(b){if(b[0]==="!")return!0;for(var s=0,a=-2,g=-2,l=-2,A=-2,d=-2;s<b.length;){if(b[s]==="*"||b[s+1]==="?"&&/[\].+)]/.test(b[s])||g!==-1&&b[s]==="["&&b[s+1]!=="]"&&(g<s&&(g=b.indexOf("]",s)),g>s&&(d===-1||d>g||(d=b.indexOf("\\",s),d===-1||d>g)))||l!==-1&&b[s]==="{"&&b[s+1]!=="}"&&(l=b.indexOf("}",s),l>s&&(d=b.indexOf("\\",s),d===-1||d>l))||A!==-1&&b[s]==="("&&b[s+1]==="?"&&/[:!=]/.test(b[s+2])&&b[s+3]!==")"&&(A=b.indexOf(")",s),A>s&&(d=b.indexOf("\\",s),d===-1||d>A))||a!==-1&&b[s]==="("&&b[s+1]!=="|"&&(a<s&&(a=b.indexOf("|",s)),a!==-1&&b[a+1]!==")"&&(A=b.indexOf(")",a),A>a&&(d=b.indexOf("\\",a),d===-1||d>A))))return!0;if(b[s]==="\\"){var x=b[s+1];s+=2;var S=e[x];if(S){var $=b.indexOf(S,s);$!==-1&&(s=$+1)}if(b[s]==="!")return!0}else s++}return!1},N=function(b){if(b[0]==="!")return!0;for(var s=0;s<b.length;){if(/[*?{}()[\]]/.test(b[s]))return!0;if(b[s]==="\\"){var a=b[s+1];s+=2;var g=e[a];if(g){var l=b.indexOf(g,s);l!==-1&&(s=l+1)}if(b[s]==="!")return!0}else s++}return!1};return it=function(b,s){if(typeof b!="string"||b==="")return!1;if(t(b))return!0;var a=o;return s&&s.strict===!1&&(a=N),a(b)},it}const ko=O(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,St=t=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[e,o]=we.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return we.getBuiltinModule(t)}return ko(t)},Lo=St("path"),Mo=St("os");var at,Tt;function Bo(){if(Tt)return at;Tt=1;var t=Ct(),e=Lo.posix.dirname,o=Mo.platform()==="win32",N="/",b=/\\/g,s=/\\([!*?|[\](){}])/g;at=function(l,A){var d=Object.assign({flipBackslashes:!0},A);d.flipBackslashes&&o&&l.indexOf(N)<0&&(l=l.replace(b,N)),a(l)&&(l+=N),l+="a";do l=e(l);while(g(l));return l.replace(s,"$1")};function a(l){var A=l.slice(-1),d;switch(A){case"}":d="{";break;case"]":d="[";break;default:return!1}var x=l.indexOf(d);return x<0?!1:l.slice(x+1,-1).includes(N)}function g(l){return/\([^()]+$/.test(l)||l[0]==="{"||l[0]==="["||/[^\\][{[]/.test(l)?!0:t(l)}return at}var Io=Bo();pt(Io);const Po=O(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Do=t=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[e,o]=Ne.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ne.getBuiltinModule(t)}return Po(t)};Do("node:fs/promises");const Go=O(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Uo=t=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[e,o]=ke.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ke.getBuiltinModule(t)}return Go(t)};Uo("node:fs");var Ko=Ct();pt(Ko);const zo=O(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ot=t=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[e,o]=Le.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Le.getBuiltinModule(t)}return zo(t)};Ot("node:fs/promises");Ot("node:fs");let Fo=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},jo=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const Xo=(t,e)=>{const o=t?.code;return o==="ENOENT"?new Fo(`no such file or directory, open '${e}'`):o==="EACCES"||o==="EPERM"?new jo(`unable to read the non-readable file: ${e}`):t},Qo=O(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ht=t=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[e,o]=Me.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Me.getBuiltinModule(t)}return Qo(t)},{readFile:Wo}=Ht("node:fs/promises"),{unzip:qo,brotliDecompress:Zo}=Ht("node:zlib"),Yo={brotli:Zo,gzip:qo,none:(t,e)=>{e(null,t)}},Hr=async(t,e)=>{qt(t),t=Wt(t);const{buffer:o,compression:N,encoding:b,flag:s}=e??{};let a;try{a=await Wo(t,s?{flag:s}:{})}catch(g){throw Xo(g,t)}return await new Promise((g,l)=>{Yo[N??"none"](a,(A,d)=>{A?l(A):g(o?d:d.toString(b??"utf8"))})})},Vo=O(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wt=t=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[e,o]=Be.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Be.getBuiltinModule(t)}return Vo(t)};wt("node:fs");wt("node:zlib");const Jo=O(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,er=t=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[e,o]=Ie.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ie.getBuiltinModule(t)}return Jo(t)},{createRequire:Nt}=er("node:module"),tr=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&tr.set("AggregateError",AggregateError);const or=Nt(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,rr=t=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[e,o]=Pe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Pe.getBuiltinModule(t)}return or(t)};rr("node:util");const sr=Nt(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ct=t=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,o]=De.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return De.getBuiltinModule(t)}return sr(t)};ct("node:fs");ct("node:path");ct("node:url");const nr=O(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kt=t=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[e,o]=Ge.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ge.getBuiltinModule(t)}return nr(t)};kt("node:fs");kt("node:fs/promises");const ur=O(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ir=t=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[e,o]=Ue.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ue.getBuiltinModule(t)}return ur(t)};ir("node:fs");const ar=O(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lr=t=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[e,o]=Ke.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Ke.getBuiltinModule(t)}return ar(t)};lr("node:fs/promises");const pr=O(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cr=t=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,o]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return ze.getBuiltinModule(t)}return pr(t)};cr("node:fs");O(import.meta.url);const fr=O(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gr=t=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[e,o]=Fe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Fe.getBuiltinModule(t)}return fr(t)};gr("node:crypto");new TextEncoder;const dr=O(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,br=t=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[e,o]=je.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return je.getBuiltinModule(t)}return dr(t)};br("node:fs/promises");const hr=O(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mr=t=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[e,o]=Xe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Xe.getBuiltinModule(t)}return hr(t)};mr("node:fs");const yr=O(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vr=t=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[e,o]=Qe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return Qe.getBuiltinModule(t)}return yr(t)};vr("node:fs/promises");const Rr=O(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$r=t=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[e,o]=We.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return We.getBuiltinModule(t)}return Rr(t)};$r("node:fs");const Er=O(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ft=t=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[e,o]=qe.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return qe.getBuiltinModule(t)}return Er(t)},Ar=ft("fs"),_r=ft("os"),Tr=ft("path");var lt={},xt;function xr(){if(xt)return lt;xt=1;var t=Object.defineProperty,e=(d,x)=>t(d,"name",{value:x,configurable:!0}),o=Ar,N=_r,b=Tr;const s=e(d=>{let x="";for(let S=0;S<d.length;S+=1){const $=d[S],M=$.toUpperCase();x+=$===M?$.toLowerCase():M}return x},"invertCase"),a=new Map,g=e((d,x)=>{const S=b.join(d,`.is-fs-case-sensitive-test-${process.pid}`);try{return x.writeFileSync(S,""),!x.existsSync(s(S))}finally{try{x.unlinkSync(S)}catch{}}},"checkDirectoryCaseWithWrite"),l=e((d,x,S)=>{try{return g(d,S)}catch($){if(x===void 0)return g(N.tmpdir(),S);throw $}},"checkDirectoryCaseWithFallback"),A=e((d,x=o,S=!0)=>{const $=d??process.cwd();if(S&&a.has($))return a.get($);let M;const te=s($);return te!==$&&x.existsSync($)?M=!x.existsSync(te):M=l($,d,x),S&&a.set($,M),M},"isFsCaseSensitive");return lt.isFsCaseSensitive=A,lt}xr();export{Hr as z};