cdk-insights 1.41.2 → 1.41.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";var KC=Object.create;var Ai=Object.defineProperty;var VC=Object.getOwnPropertyDescriptor;var ZC=Object.getOwnPropertyNames;var YC=Object.getPrototypeOf,JC=Object.prototype.hasOwnProperty;var ep=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xi=(e,t)=>{for(var s in t)Ai(e,s,{get:t[s],enumerable:!0})},tp=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ZC(t))!JC.call(e,r)&&r!==s&&Ai(e,r,{get:()=>t[r],enumerable:!(n=VC(t,r))||n.enumerable});return e};var Z=(e,t,s)=>(s=e!=null?KC(YC(e)):{},tp(t||!e||!e.__esModule?Ai(s,"default",{value:e,enumerable:!0}):s,e)),Fa=e=>tp(Ai({},"__esModule",{value:!0}),e);var gp=T((D2,fp)=>{var mp=require("stream").Stream,JA=require("util");fp.exports=Gt;function Gt(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}JA.inherits(Gt,mp);Gt.create=function(e,t){var s=new this;t=t||{};for(var n in t)s[n]=t[n];s.source=e;var r=e.emit;return e.emit=function(){return s._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),s.pauseStream&&e.pause(),s};Object.defineProperty(Gt.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Gt.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Gt.prototype.resume=function(){this._released||this.release(),this.source.resume()};Gt.prototype.pause=function(){this.source.pause()};Gt.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Gt.prototype.pipe=function(){var e=mp.prototype.pipe.apply(this,arguments);return this.resume(),e};Gt.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Gt.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var bp=T((v2,Sp)=>{var QA=require("util"),yp=require("stream").Stream,hp=gp();Sp.exports=$e;function $e(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}QA.inherits($e,yp);$e.create=function(e){var t=new this;e=e||{};for(var s in e)t[s]=e[s];return t};$e.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};$e.prototype.append=function(e){var t=$e.isStreamLike(e);if(t){if(!(e instanceof hp)){var s=hp.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=s}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};$e.prototype.pipe=function(e,t){return yp.prototype.pipe.call(this,e,t),this.resume(),e};$e.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};$e.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(s){var n=$e.isStreamLike(s);n&&(s.on("data",this._checkDataSize.bind(this)),this._handleErrors(s)),this._pipeNext(s)}.bind(this))};$e.prototype._pipeNext=function(e){this._currentStream=e;var t=$e.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var s=e;this.write(s),this._getNext()};$e.prototype._handleErrors=function(e){var t=this;e.on("error",function(s){t._emitError(s)})};$e.prototype.write=function(e){this.emit("data",e)};$e.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};$e.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};$e.prototype.end=function(){this._reset(),this.emit("end")};$e.prototype.destroy=function(){this._reset(),this.emit("close")};$e.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};$e.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};$e.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};$e.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Dp=T((C2,XA)=>{XA.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var Cp=T((A2,vp)=>{vp.exports=Dp()});var wp=T(gt=>{"use strict";var Ti=Cp(),ex=require("path").extname,Ap=/^\s*([^;\s]*)(?:;|\s|$)/,tx=/^text\//i;gt.charset=xp;gt.charsets={lookup:xp};gt.contentType=sx;gt.extension=nx;gt.extensions=Object.create(null);gt.lookup=rx;gt.types=Object.create(null);ix(gt.extensions,gt.types);function xp(e){if(!e||typeof e!="string")return!1;var t=Ap.exec(e),s=t&&Ti[t[1].toLowerCase()];return s&&s.charset?s.charset:t&&tx.test(t[1])?"UTF-8":!1}function sx(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?gt.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var s=gt.charset(t);s&&(t+="; charset="+s.toLowerCase())}return t}function nx(e){if(!e||typeof e!="string")return!1;var t=Ap.exec(e),s=t&>.extensions[t[1].toLowerCase()];return!s||!s.length?!1:s[0]}function rx(e){if(!e||typeof e!="string")return!1;var t=ex("x."+e).toLowerCase().substr(1);return t&>.types[t]||!1}function ix(e,t){var s=["nginx","apache",void 0,"iana"];Object.keys(Ti).forEach(function(r){var i=Ti[r],o=i.extensions;if(!(!o||!o.length)){e[r]=o;for(var a=0;a<o.length;a++){var u=o[a];if(t[u]){var c=s.indexOf(Ti[t[u]].source),l=s.indexOf(i.source);if(t[u]!=="application/octet-stream"&&(c>l||c===l&&t[u].substr(0,12)==="application/"))continue}t[u]=r}}})}});var Rp=T((w2,Ep)=>{Ep.exports=ox;function ox(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Pa=T((E2,Ip)=>{var Fp=Rp();Ip.exports=ax;function ax(e){var t=!1;return Fp(function(){t=!0}),function(n,r){t?e(n,r):Fp(function(){e(n,r)})}}});var La=T((R2,kp)=>{kp.exports=cx;function cx(e){Object.keys(e.jobs).forEach(ux.bind(e)),e.jobs={}}function ux(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var _a=T((F2,Pp)=>{var Tp=Pa(),lx=La();Pp.exports=px;function px(e,t,s,n){var r=s.keyedList?s.keyedList[s.index]:s.index;s.jobs[r]=dx(t,r,e[r],function(i,o){r in s.jobs&&(delete s.jobs[r],i?lx(s):s.results[r]=o,n(i,s.results))})}function dx(e,t,s,n){var r;return e.length==2?r=e(s,Tp(n)):r=e(s,t,Tp(n)),r}});var Oa=T((I2,Lp)=>{Lp.exports=mx;function mx(e,t){var s=!Array.isArray(e),n={index:0,keyedList:s||t?Object.keys(e):null,jobs:{},results:s?{}:[],size:s?Object.keys(e).length:e.length};return t&&n.keyedList.sort(s?t:function(r,i){return t(e[r],e[i])}),n}});var Ba=T((k2,_p)=>{var fx=La(),gx=Pa();_p.exports=hx;function hx(e){Object.keys(this.jobs).length&&(this.index=this.size,fx(this),gx(e)(null,this.results))}});var Bp=T((T2,Op)=>{var yx=_a(),Sx=Oa(),bx=Ba();Op.exports=Dx;function Dx(e,t,s){for(var n=Sx(e);n.index<(n.keyedList||e).length;)yx(e,t,n,function(r,i){if(r){s(r,i);return}if(Object.keys(n.jobs).length===0){s(null,n.results);return}}),n.index++;return bx.bind(n,s)}});var Ma=T((P2,Pi)=>{var Mp=_a(),vx=Oa(),Cx=Ba();Pi.exports=Ax;Pi.exports.ascending=Np;Pi.exports.descending=xx;function Ax(e,t,s,n){var r=vx(e,s);return Mp(e,t,r,function i(o,a){if(o){n(o,a);return}if(r.index++,r.index<(r.keyedList||e).length){Mp(e,t,r,i);return}n(null,r.results)}),Cx.bind(r,n)}function Np(e,t){return e<t?-1:e>t?1:0}function xx(e,t){return-1*Np(e,t)}});var Up=T((L2,Wp)=>{var wx=Ma();Wp.exports=Ex;function Ex(e,t,s){return wx(e,t,null,s)}});var $p=T((_2,jp)=>{jp.exports={parallel:Bp(),serial:Up(),serialOrdered:Ma()}});var Na=T((O2,Gp)=>{"use strict";Gp.exports=Object});var zp=T((B2,Hp)=>{"use strict";Hp.exports=Error});var Kp=T((M2,qp)=>{"use strict";qp.exports=EvalError});var Zp=T((N2,Vp)=>{"use strict";Vp.exports=RangeError});var Jp=T((W2,Yp)=>{"use strict";Yp.exports=ReferenceError});var Xp=T((U2,Qp)=>{"use strict";Qp.exports=SyntaxError});var Li=T((j2,ed)=>{"use strict";ed.exports=TypeError});var sd=T(($2,td)=>{"use strict";td.exports=URIError});var rd=T((G2,nd)=>{"use strict";nd.exports=Math.abs});var od=T((H2,id)=>{"use strict";id.exports=Math.floor});var cd=T((z2,ad)=>{"use strict";ad.exports=Math.max});var ld=T((q2,ud)=>{"use strict";ud.exports=Math.min});var dd=T((K2,pd)=>{"use strict";pd.exports=Math.pow});var fd=T((V2,md)=>{"use strict";md.exports=Math.round});var hd=T((Z2,gd)=>{"use strict";gd.exports=Number.isNaN||function(t){return t!==t}});var Sd=T((Y2,yd)=>{"use strict";var Rx=hd();yd.exports=function(t){return Rx(t)||t===0?t:t<0?-1:1}});var Dd=T((J2,bd)=>{"use strict";bd.exports=Object.getOwnPropertyDescriptor});var Wa=T((Q2,vd)=>{"use strict";var _i=Dd();if(_i)try{_i([],"length")}catch{_i=null}vd.exports=_i});var Ad=T((X2,Cd)=>{"use strict";var Oi=Object.defineProperty||!1;if(Oi)try{Oi({},"a",{value:1})}catch{Oi=!1}Cd.exports=Oi});var Ua=T((eB,xd)=>{"use strict";xd.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},s=Symbol("test"),n=Object(s);if(typeof s=="string"||Object.prototype.toString.call(s)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;t[s]=r;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==s||!Object.prototype.propertyIsEnumerable.call(t,s))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,s);if(a.value!==r||a.enumerable!==!0)return!1}return!0}});var Rd=T((tB,Ed)=>{"use strict";var wd=typeof Symbol<"u"&&Symbol,Fx=Ua();Ed.exports=function(){return typeof wd!="function"||typeof Symbol!="function"||typeof wd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fx()}});var ja=T((sB,Fd)=>{"use strict";Fd.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var $a=T((nB,Id)=>{"use strict";var Ix=Na();Id.exports=Ix.getPrototypeOf||null});var Pd=T((rB,Td)=>{"use strict";var kx="Function.prototype.bind called on incompatible ",Tx=Object.prototype.toString,Px=Math.max,Lx="[object Function]",kd=function(t,s){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<s.length;i+=1)n[i+t.length]=s[i];return n},_x=function(t,s){for(var n=[],r=s||0,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n},Ox=function(e,t){for(var s="",n=0;n<e.length;n+=1)s+=e[n],n+1<e.length&&(s+=t);return s};Td.exports=function(t){var s=this;if(typeof s!="function"||Tx.apply(s)!==Lx)throw new TypeError(kx+s);for(var n=_x(arguments,1),r,i=function(){if(this instanceof r){var l=s.apply(this,kd(n,arguments));return Object(l)===l?l:this}return s.apply(t,kd(n,arguments))},o=Px(0,s.length-n.length),a=[],u=0;u<o;u++)a[u]="$"+u;if(r=Function("binder","return function ("+Ox(a,",")+"){ return binder.apply(this,arguments); }")(i),s.prototype){var c=function(){};c.prototype=s.prototype,r.prototype=new c,c.prototype=null}return r}});var wr=T((iB,Ld)=>{"use strict";var Bx=Pd();Ld.exports=Function.prototype.bind||Bx});var Bi=T((oB,_d)=>{"use strict";_d.exports=Function.prototype.call});var Ga=T((aB,Od)=>{"use strict";Od.exports=Function.prototype.apply});var Md=T((cB,Bd)=>{"use strict";Bd.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Wd=T((uB,Nd)=>{"use strict";var Mx=wr(),Nx=Ga(),Wx=Bi(),Ux=Md();Nd.exports=Ux||Mx.call(Wx,Nx)});var jd=T((lB,Ud)=>{"use strict";var jx=wr(),$x=Li(),Gx=Bi(),Hx=Wd();Ud.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new $x("a function is required");return Hx(jx,Gx,t)}});var Kd=T((pB,qd)=>{"use strict";var zx=jd(),$d=Wa(),Hd;try{Hd=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ha=!!Hd&&$d&&$d(Object.prototype,"__proto__"),zd=Object,Gd=zd.getPrototypeOf;qd.exports=Ha&&typeof Ha.get=="function"?zx([Ha.get]):typeof Gd=="function"?function(t){return Gd(t==null?t:zd(t))}:!1});var Qd=T((dB,Jd)=>{"use strict";var Vd=ja(),Zd=$a(),Yd=Kd();Jd.exports=Vd?function(t){return Vd(t)}:Zd?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Zd(t)}:Yd?function(t){return Yd(t)}:null});var Mi=T((mB,Xd)=>{"use strict";var qx=Function.prototype.call,Kx=Object.prototype.hasOwnProperty,Vx=wr();Xd.exports=Vx.call(qx,Kx)});var om=T((fB,im)=>{"use strict";var Ce,Zx=Na(),Yx=zp(),Jx=Kp(),Qx=Zp(),Xx=Jp(),kn=Xp(),In=Li(),ew=sd(),tw=rd(),sw=od(),nw=cd(),rw=ld(),iw=dd(),ow=fd(),aw=Sd(),nm=Function,za=function(e){try{return nm('"use strict"; return ('+e+").constructor;")()}catch{}},Er=Wa(),cw=Ad(),qa=function(){throw new In},uw=Er?function(){try{return arguments.callee,qa}catch{try{return Er(arguments,"callee").get}catch{return qa}}}():qa,Rn=Rd()(),Qe=Qd(),lw=$a(),pw=ja(),rm=Ga(),Rr=Bi(),Fn={},dw=typeof Uint8Array>"u"||!Qe?Ce:Qe(Uint8Array),Us={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":Rn&&Qe?Qe([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":Fn,"%AsyncGenerator%":Fn,"%AsyncGeneratorFunction%":Fn,"%AsyncIteratorPrototype%":Fn,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Yx,"%eval%":eval,"%EvalError%":Jx,"%Float16Array%":typeof Float16Array>"u"?Ce:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":nm,"%GeneratorFunction%":Fn,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rn&&Qe?Qe(Qe([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Rn||!Qe?Ce:Qe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Zx,"%Object.getOwnPropertyDescriptor%":Er,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":Qx,"%ReferenceError%":Xx,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Rn||!Qe?Ce:Qe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rn&&Qe?Qe(""[Symbol.iterator]()):Ce,"%Symbol%":Rn?Symbol:Ce,"%SyntaxError%":kn,"%ThrowTypeError%":uw,"%TypedArray%":dw,"%TypeError%":In,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":ew,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet,"%Function.prototype.call%":Rr,"%Function.prototype.apply%":rm,"%Object.defineProperty%":cw,"%Object.getPrototypeOf%":lw,"%Math.abs%":tw,"%Math.floor%":sw,"%Math.max%":nw,"%Math.min%":rw,"%Math.pow%":iw,"%Math.round%":ow,"%Math.sign%":aw,"%Reflect.getPrototypeOf%":pw};if(Qe)try{null.error}catch(e){em=Qe(Qe(e)),Us["%Error.prototype%"]=em}var em,mw=function e(t){var s;if(t==="%AsyncFunction%")s=za("async function () {}");else if(t==="%GeneratorFunction%")s=za("function* () {}");else if(t==="%AsyncGeneratorFunction%")s=za("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(s=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Qe&&(s=Qe(r.prototype))}return Us[t]=s,s},tm={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Fr=wr(),Ni=Mi(),fw=Fr.call(Rr,Array.prototype.concat),gw=Fr.call(rm,Array.prototype.splice),sm=Fr.call(Rr,String.prototype.replace),Wi=Fr.call(Rr,String.prototype.slice),hw=Fr.call(Rr,RegExp.prototype.exec),yw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Sw=/\\(\\)?/g,bw=function(t){var s=Wi(t,0,1),n=Wi(t,-1);if(s==="%"&&n!=="%")throw new kn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&s!=="%")throw new kn("invalid intrinsic syntax, expected opening `%`");var r=[];return sm(t,yw,function(i,o,a,u){r[r.length]=a?sm(u,Sw,"$1"):o||i}),r},Dw=function(t,s){var n=t,r;if(Ni(tm,n)&&(r=tm[n],n="%"+r[0]+"%"),Ni(Us,n)){var i=Us[n];if(i===Fn&&(i=mw(n)),typeof i>"u"&&!s)throw new In("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new kn("intrinsic "+t+" does not exist!")};im.exports=function(t,s){if(typeof t!="string"||t.length===0)throw new In("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof s!="boolean")throw new In('"allowMissing" argument must be a boolean');if(hw(/^%?[^%]*%?$/,t)===null)throw new kn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=bw(t),r=n.length>0?n[0]:"",i=Dw("%"+r+"%",s),o=i.name,a=i.value,u=!1,c=i.alias;c&&(r=c[0],gw(n,fw([0,1],c)));for(var l=1,p=!0;l<n.length;l+=1){var d=n[l],m=Wi(d,0,1),f=Wi(d,-1);if((m==='"'||m==="'"||m==="`"||f==='"'||f==="'"||f==="`")&&m!==f)throw new kn("property names with quotes must have matching quotes");if((d==="constructor"||!p)&&(u=!0),r+="."+d,o="%"+r+"%",Ni(Us,o))a=Us[o];else if(a!=null){if(!(d in a)){if(!s)throw new In("base intrinsic for "+t+" exists, but the property is not available.");return}if(Er&&l+1>=n.length){var g=Er(a,d);p=!!g,p&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[d]}else p=Ni(a,d),a=a[d];p&&!u&&(Us[o]=a)}}return a}});var cm=T((gB,am)=>{"use strict";var vw=Ua();am.exports=function(){return vw()&&!!Symbol.toStringTag}});var pm=T((hB,lm)=>{"use strict";var Cw=om(),um=Cw("%Object.defineProperty%",!0),Aw=cm()(),xw=Mi(),ww=Li(),Ui=Aw?Symbol.toStringTag:null;lm.exports=function(t,s){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,r=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof r<"u"&&typeof r!="boolean")throw new ww("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ui&&(n||!xw(t,Ui))&&(um?um(t,Ui,{configurable:!r,enumerable:!1,value:s,writable:!1}):t[Ui]=s)}});var mm=T((yB,dm)=>{"use strict";dm.exports=function(e,t){return Object.keys(t).forEach(function(s){e[s]=e[s]||t[s]}),e}});var gm=T((SB,fm)=>{"use strict";var Ya=bp(),Ew=require("util"),Ka=require("path"),Rw=require("http"),Fw=require("https"),Iw=require("url").parse,kw=require("fs"),Tw=require("stream").Stream,Pw=require("crypto"),Va=wp(),Lw=$p(),_w=pm(),Ds=Mi(),Za=mm();function we(e){if(!(this instanceof we))return new we(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ya.call(this),e=e||{};for(var t in e)this[t]=e[t]}Ew.inherits(we,Ya);we.LINE_BREAK=`\r
|
|
2
|
-
`;we.DEFAULT_CONTENT_TYPE="application/octet-stream";we.prototype.append=function(e,t,s){s=s||{},typeof s=="string"&&(s={filename:s});var n=Ya.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,s),i=this._multiPartFooter();n(r),n(t),n(i),this._trackLength(r,t,s)};we.prototype._trackLength=function(e,t,s){var n=0;s.knownLength!=null?n+=Number(s.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+we.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ds(t,"httpVersion"))&&!(t instanceof Tw))&&(s.knownLength||this._valuesToMeasure.push(t))};we.prototype._lengthRetriever=function(e,t){Ds(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):kw.stat(e.path,function(s,n){if(s){t(s);return}var r=n.size-(e.start?e.start:0);t(null,r)}):Ds(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ds(e,"httpModule")?(e.on("response",function(s){e.pause(),t(null,Number(s.headers["content-length"]))}),e.resume()):t("Unknown stream")};we.prototype._multiPartHeader=function(e,t,s){if(typeof s.header=="string")return s.header;var n=this._getContentDisposition(t,s),r=this._getContentType(t,s),i="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(r||[])};typeof s.header=="object"&&Za(o,s.header);var a;for(var u in o)if(Ds(o,u)){if(a=o[u],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(i+=u+": "+a.join("; ")+we.LINE_BREAK)}return"--"+this.getBoundary()+we.LINE_BREAK+i+we.LINE_BREAK};we.prototype._getContentDisposition=function(e,t){var s;if(typeof t.filepath=="string"?s=Ka.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?s=Ka.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ds(e,"httpVersion")&&(s=Ka.basename(e.client._httpMessage.path||"")),s)return'filename="'+s+'"'};we.prototype._getContentType=function(e,t){var s=t.contentType;return!s&&e&&e.name&&(s=Va.lookup(e.name)),!s&&e&&e.path&&(s=Va.lookup(e.path)),!s&&e&&e.readable&&Ds(e,"httpVersion")&&(s=e.headers["content-type"]),!s&&(t.filepath||t.filename)&&(s=Va.lookup(t.filepath||t.filename)),!s&&e&&typeof e=="object"&&(s=we.DEFAULT_CONTENT_TYPE),s};we.prototype._multiPartFooter=function(){return function(e){var t=we.LINE_BREAK,s=this._streams.length===0;s&&(t+=this._lastBoundary()),e(t)}.bind(this)};we.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+we.LINE_BREAK};we.prototype.getHeaders=function(e){var t,s={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ds(e,t)&&(s[t.toLowerCase()]=e[t]);return s};we.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};we.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};we.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),s=0,n=this._streams.length;s<n;s++)typeof this._streams[s]!="function"&&(Buffer.isBuffer(this._streams[s])?e=Buffer.concat([e,this._streams[s]]):e=Buffer.concat([e,Buffer.from(this._streams[s])]),(typeof this._streams[s]!="string"||this._streams[s].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(we.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};we.prototype._generateBoundary=function(){this._boundary="--------------------------"+Pw.randomBytes(12).toString("hex")};we.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};we.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};we.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Lw.parallel(this._valuesToMeasure,this._lengthRetriever,function(s,n){if(s){e(s);return}n.forEach(function(r){t+=r}),e(null,t)})};we.prototype.submit=function(e,t){var s,n,r={method:"post"};return typeof e=="string"?(e=Iw(e),n=Za({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(n=Za(e,r),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?s=Fw.request(n):s=Rw.request(n),this.getLength(function(i,o){if(i&&i!=="Unknown stream"){this._error(i);return}if(o&&s.setHeader("Content-Length",o),this.pipe(s),t){var a,u=function(c,l){return s.removeListener("error",u),s.removeListener("response",a),t.call(this,c,l)};a=u.bind(this,null),s.on("error",u),s.on("response",a)}}.bind(this)),s};we.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};we.prototype.toString=function(){return"[object FormData]"};_w(we.prototype,"FormData");fm.exports=we});var km=T((m3,Im)=>{var Ln=1e3,_n=Ln*60,On=_n*60,Gs=On*24,Yw=Gs*7,Jw=Gs*365.25;Im.exports=function(e,t){t=t||{};var s=typeof e;if(s==="string"&&e.length>0)return Qw(e);if(s==="number"&&isFinite(e))return t.long?e0(e):Xw(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Qw(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return s*Jw;case"weeks":case"week":case"w":return s*Yw;case"days":case"day":case"d":return s*Gs;case"hours":case"hour":case"hrs":case"hr":case"h":return s*On;case"minutes":case"minute":case"mins":case"min":case"m":return s*_n;case"seconds":case"second":case"secs":case"sec":case"s":return s*Ln;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function Xw(e){var t=Math.abs(e);return t>=Gs?Math.round(e/Gs)+"d":t>=On?Math.round(e/On)+"h":t>=_n?Math.round(e/_n)+"m":t>=Ln?Math.round(e/Ln)+"s":e+"ms"}function e0(e){var t=Math.abs(e);return t>=Gs?Gi(e,t,Gs,"day"):t>=On?Gi(e,t,On,"hour"):t>=_n?Gi(e,t,_n,"minute"):t>=Ln?Gi(e,t,Ln,"second"):e+" ms"}function Gi(e,t,s,n){var r=t>=s*1.5;return Math.round(e/s)+" "+n+(r?"s":"")}});var pc=T((f3,Tm)=>{function t0(e){s.debug=s,s.default=s,s.coerce=u,s.disable=o,s.enable=r,s.enabled=a,s.humanize=km(),s.destroy=c,Object.keys(e).forEach(l=>{s[l]=e[l]}),s.names=[],s.skips=[],s.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return s.colors[Math.abs(p)%s.colors.length]}s.selectColor=t;function s(l){let p,d=null,m,f;function g(...h){if(!g.enabled)return;let y=g,b=Number(new Date),x=b-(p||b);y.diff=x,y.prev=p,y.curr=b,p=b,h[0]=s.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let v=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(O,M)=>{if(O==="%%")return"%";v++;let P=s.formatters[M];if(typeof P=="function"){let X=h[v];O=P.call(y,X),h.splice(v,1),v--}return O}),s.formatArgs.call(y,h),(y.log||s.log).apply(y,h)}return g.namespace=l,g.useColors=s.useColors(),g.color=s.selectColor(l),g.extend=n,g.destroy=s.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(m!==s.namespaces&&(m=s.namespaces,f=s.enabled(l)),f),set:h=>{d=h}}),typeof s.init=="function"&&s.init(g),g}function n(l,p){let d=s(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function r(l){s.save(l),s.namespaces=l,s.names=[],s.skips=[];let p=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?s.skips.push(d.slice(1)):s.names.push(d)}function i(l,p){let d=0,m=0,f=-1,g=0;for(;d<l.length;)if(m<p.length&&(p[m]===l[d]||p[m]==="*"))p[m]==="*"?(f=m,g=d,m++):(d++,m++);else if(f!==-1)m=f+1,g++,d=g;else return!1;for(;m<p.length&&p[m]==="*";)m++;return m===p.length}function o(){let l=[...s.names,...s.skips.map(p=>"-"+p)].join(",");return s.enable(""),l}function a(l){for(let p of s.skips)if(i(l,p))return!1;for(let p of s.names)if(i(l,p))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s.enable(s.load()),s}Tm.exports=t0});var Pm=T((Ct,Hi)=>{Ct.formatArgs=n0;Ct.save=r0;Ct.load=i0;Ct.useColors=s0;Ct.storage=o0();Ct.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ct.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n0(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Hi.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let s=0,n=0;e[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(s++,r==="%c"&&(n=s))}),e.splice(n,0,t)}Ct.log=console.debug||console.log||(()=>{});function r0(e){try{e?Ct.storage.setItem("debug",e):Ct.storage.removeItem("debug")}catch{}}function i0(){let e;try{e=Ct.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function o0(){try{return localStorage}catch{}}Hi.exports=pc()(Ct);var{formatters:a0}=Hi.exports;a0.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var _m=T((g3,Lm)=>{"use strict";Lm.exports=(e,t=process.argv)=>{let s=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}});var Mm=T((h3,Bm)=>{"use strict";var c0=require("os"),Om=require("tty"),kt=_m(),{env:Xe}=process,As;kt("no-color")||kt("no-colors")||kt("color=false")||kt("color=never")?As=0:(kt("color")||kt("colors")||kt("color=true")||kt("color=always"))&&(As=1);"FORCE_COLOR"in Xe&&(Xe.FORCE_COLOR==="true"?As=1:Xe.FORCE_COLOR==="false"?As=0:As=Xe.FORCE_COLOR.length===0?1:Math.min(parseInt(Xe.FORCE_COLOR,10),3));function dc(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function mc(e,t){if(As===0)return 0;if(kt("color=16m")||kt("color=full")||kt("color=truecolor"))return 3;if(kt("color=256"))return 2;if(e&&!t&&As===void 0)return 0;let s=As||0;if(Xe.TERM==="dumb")return s;if(process.platform==="win32"){let n=c0.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Xe)||Xe.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xe.TEAMCITY_VERSION)?1:0;if(Xe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Xe){let n=parseInt((Xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Xe.TERM)||"COLORTERM"in Xe?1:s}function u0(e){let t=mc(e,e&&e.isTTY);return dc(t)}Bm.exports={supportsColor:u0,stdout:dc(mc(!0,Om.isatty(1))),stderr:dc(mc(!0,Om.isatty(2)))}});var Wm=T((et,qi)=>{var l0=require("tty"),zi=require("util");et.init=y0;et.log=f0;et.formatArgs=d0;et.save=g0;et.load=h0;et.useColors=p0;et.destroy=zi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");et.colors=[6,2,3,4,5,1];try{let e=Mm();e&&(e.stderr||e).level>=2&&(et.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}et.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let s=t.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[s]=n,e},{});function p0(){return"colors"in et.inspectOpts?!!et.inspectOpts.colors:l0.isatty(process.stderr.fd)}function d0(e){let{namespace:t,useColors:s}=this;if(s){let n=this.color,r="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${r};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
1
|
+
"use strict";var VC=Object.create;var Ai=Object.defineProperty;var KC=Object.getOwnPropertyDescriptor;var ZC=Object.getOwnPropertyNames;var YC=Object.getPrototypeOf,JC=Object.prototype.hasOwnProperty;var ep=(e,t)=>()=>(e&&(t=e(e=0)),t);var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xi=(e,t)=>{for(var s in t)Ai(e,s,{get:t[s],enumerable:!0})},tp=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ZC(t))!JC.call(e,r)&&r!==s&&Ai(e,r,{get:()=>t[r],enumerable:!(n=KC(t,r))||n.enumerable});return e};var Z=(e,t,s)=>(s=e!=null?VC(YC(e)):{},tp(t||!e||!e.__esModule?Ai(s,"default",{value:e,enumerable:!0}):s,e)),Fa=e=>tp(Ai({},"__esModule",{value:!0}),e);var gp=T((D2,fp)=>{var mp=require("stream").Stream,JA=require("util");fp.exports=Gt;function Gt(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}JA.inherits(Gt,mp);Gt.create=function(e,t){var s=new this;t=t||{};for(var n in t)s[n]=t[n];s.source=e;var r=e.emit;return e.emit=function(){return s._handleEmit(arguments),r.apply(e,arguments)},e.on("error",function(){}),s.pauseStream&&e.pause(),s};Object.defineProperty(Gt.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Gt.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Gt.prototype.resume=function(){this._released||this.release(),this.source.resume()};Gt.prototype.pause=function(){this.source.pause()};Gt.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Gt.prototype.pipe=function(){var e=mp.prototype.pipe.apply(this,arguments);return this.resume(),e};Gt.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Gt.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var bp=T((v2,Sp)=>{var QA=require("util"),yp=require("stream").Stream,hp=gp();Sp.exports=$e;function $e(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}QA.inherits($e,yp);$e.create=function(e){var t=new this;e=e||{};for(var s in e)t[s]=e[s];return t};$e.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};$e.prototype.append=function(e){var t=$e.isStreamLike(e);if(t){if(!(e instanceof hp)){var s=hp.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=s}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};$e.prototype.pipe=function(e,t){return yp.prototype.pipe.call(this,e,t),this.resume(),e};$e.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};$e.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(s){var n=$e.isStreamLike(s);n&&(s.on("data",this._checkDataSize.bind(this)),this._handleErrors(s)),this._pipeNext(s)}.bind(this))};$e.prototype._pipeNext=function(e){this._currentStream=e;var t=$e.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var s=e;this.write(s),this._getNext()};$e.prototype._handleErrors=function(e){var t=this;e.on("error",function(s){t._emitError(s)})};$e.prototype.write=function(e){this.emit("data",e)};$e.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};$e.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};$e.prototype.end=function(){this._reset(),this.emit("end")};$e.prototype.destroy=function(){this._reset(),this.emit("close")};$e.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};$e.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};$e.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};$e.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var Dp=T((C2,XA)=>{XA.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var Cp=T((A2,vp)=>{vp.exports=Dp()});var wp=T(gt=>{"use strict";var Ti=Cp(),ex=require("path").extname,Ap=/^\s*([^;\s]*)(?:;|\s|$)/,tx=/^text\//i;gt.charset=xp;gt.charsets={lookup:xp};gt.contentType=sx;gt.extension=nx;gt.extensions=Object.create(null);gt.lookup=rx;gt.types=Object.create(null);ix(gt.extensions,gt.types);function xp(e){if(!e||typeof e!="string")return!1;var t=Ap.exec(e),s=t&&Ti[t[1].toLowerCase()];return s&&s.charset?s.charset:t&&tx.test(t[1])?"UTF-8":!1}function sx(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?gt.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var s=gt.charset(t);s&&(t+="; charset="+s.toLowerCase())}return t}function nx(e){if(!e||typeof e!="string")return!1;var t=Ap.exec(e),s=t&>.extensions[t[1].toLowerCase()];return!s||!s.length?!1:s[0]}function rx(e){if(!e||typeof e!="string")return!1;var t=ex("x."+e).toLowerCase().substr(1);return t&>.types[t]||!1}function ix(e,t){var s=["nginx","apache",void 0,"iana"];Object.keys(Ti).forEach(function(r){var i=Ti[r],o=i.extensions;if(!(!o||!o.length)){e[r]=o;for(var a=0;a<o.length;a++){var u=o[a];if(t[u]){var c=s.indexOf(Ti[t[u]].source),l=s.indexOf(i.source);if(t[u]!=="application/octet-stream"&&(c>l||c===l&&t[u].substr(0,12)==="application/"))continue}t[u]=r}}})}});var Rp=T((w2,Ep)=>{Ep.exports=ox;function ox(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Pa=T((E2,Ip)=>{var Fp=Rp();Ip.exports=ax;function ax(e){var t=!1;return Fp(function(){t=!0}),function(n,r){t?e(n,r):Fp(function(){e(n,r)})}}});var La=T((R2,kp)=>{kp.exports=cx;function cx(e){Object.keys(e.jobs).forEach(ux.bind(e)),e.jobs={}}function ux(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var _a=T((F2,Pp)=>{var Tp=Pa(),lx=La();Pp.exports=px;function px(e,t,s,n){var r=s.keyedList?s.keyedList[s.index]:s.index;s.jobs[r]=dx(t,r,e[r],function(i,o){r in s.jobs&&(delete s.jobs[r],i?lx(s):s.results[r]=o,n(i,s.results))})}function dx(e,t,s,n){var r;return e.length==2?r=e(s,Tp(n)):r=e(s,t,Tp(n)),r}});var Oa=T((I2,Lp)=>{Lp.exports=mx;function mx(e,t){var s=!Array.isArray(e),n={index:0,keyedList:s||t?Object.keys(e):null,jobs:{},results:s?{}:[],size:s?Object.keys(e).length:e.length};return t&&n.keyedList.sort(s?t:function(r,i){return t(e[r],e[i])}),n}});var Ba=T((k2,_p)=>{var fx=La(),gx=Pa();_p.exports=hx;function hx(e){Object.keys(this.jobs).length&&(this.index=this.size,fx(this),gx(e)(null,this.results))}});var Bp=T((T2,Op)=>{var yx=_a(),Sx=Oa(),bx=Ba();Op.exports=Dx;function Dx(e,t,s){for(var n=Sx(e);n.index<(n.keyedList||e).length;)yx(e,t,n,function(r,i){if(r){s(r,i);return}if(Object.keys(n.jobs).length===0){s(null,n.results);return}}),n.index++;return bx.bind(n,s)}});var Ma=T((P2,Pi)=>{var Mp=_a(),vx=Oa(),Cx=Ba();Pi.exports=Ax;Pi.exports.ascending=Np;Pi.exports.descending=xx;function Ax(e,t,s,n){var r=vx(e,s);return Mp(e,t,r,function i(o,a){if(o){n(o,a);return}if(r.index++,r.index<(r.keyedList||e).length){Mp(e,t,r,i);return}n(null,r.results)}),Cx.bind(r,n)}function Np(e,t){return e<t?-1:e>t?1:0}function xx(e,t){return-1*Np(e,t)}});var Up=T((L2,Wp)=>{var wx=Ma();Wp.exports=Ex;function Ex(e,t,s){return wx(e,t,null,s)}});var $p=T((_2,jp)=>{jp.exports={parallel:Bp(),serial:Up(),serialOrdered:Ma()}});var Na=T((O2,Gp)=>{"use strict";Gp.exports=Object});var zp=T((B2,Hp)=>{"use strict";Hp.exports=Error});var Vp=T((M2,qp)=>{"use strict";qp.exports=EvalError});var Zp=T((N2,Kp)=>{"use strict";Kp.exports=RangeError});var Jp=T((W2,Yp)=>{"use strict";Yp.exports=ReferenceError});var Xp=T((U2,Qp)=>{"use strict";Qp.exports=SyntaxError});var Li=T((j2,ed)=>{"use strict";ed.exports=TypeError});var sd=T(($2,td)=>{"use strict";td.exports=URIError});var rd=T((G2,nd)=>{"use strict";nd.exports=Math.abs});var od=T((H2,id)=>{"use strict";id.exports=Math.floor});var cd=T((z2,ad)=>{"use strict";ad.exports=Math.max});var ld=T((q2,ud)=>{"use strict";ud.exports=Math.min});var dd=T((V2,pd)=>{"use strict";pd.exports=Math.pow});var fd=T((K2,md)=>{"use strict";md.exports=Math.round});var hd=T((Z2,gd)=>{"use strict";gd.exports=Number.isNaN||function(t){return t!==t}});var Sd=T((Y2,yd)=>{"use strict";var Rx=hd();yd.exports=function(t){return Rx(t)||t===0?t:t<0?-1:1}});var Dd=T((J2,bd)=>{"use strict";bd.exports=Object.getOwnPropertyDescriptor});var Wa=T((Q2,vd)=>{"use strict";var _i=Dd();if(_i)try{_i([],"length")}catch{_i=null}vd.exports=_i});var Ad=T((X2,Cd)=>{"use strict";var Oi=Object.defineProperty||!1;if(Oi)try{Oi({},"a",{value:1})}catch{Oi=!1}Cd.exports=Oi});var Ua=T((eB,xd)=>{"use strict";xd.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},s=Symbol("test"),n=Object(s);if(typeof s=="string"||Object.prototype.toString.call(s)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var r=42;t[s]=r;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==s||!Object.prototype.propertyIsEnumerable.call(t,s))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,s);if(a.value!==r||a.enumerable!==!0)return!1}return!0}});var Rd=T((tB,Ed)=>{"use strict";var wd=typeof Symbol<"u"&&Symbol,Fx=Ua();Ed.exports=function(){return typeof wd!="function"||typeof Symbol!="function"||typeof wd("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fx()}});var ja=T((sB,Fd)=>{"use strict";Fd.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var $a=T((nB,Id)=>{"use strict";var Ix=Na();Id.exports=Ix.getPrototypeOf||null});var Pd=T((rB,Td)=>{"use strict";var kx="Function.prototype.bind called on incompatible ",Tx=Object.prototype.toString,Px=Math.max,Lx="[object Function]",kd=function(t,s){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<s.length;i+=1)n[i+t.length]=s[i];return n},_x=function(t,s){for(var n=[],r=s||0,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n},Ox=function(e,t){for(var s="",n=0;n<e.length;n+=1)s+=e[n],n+1<e.length&&(s+=t);return s};Td.exports=function(t){var s=this;if(typeof s!="function"||Tx.apply(s)!==Lx)throw new TypeError(kx+s);for(var n=_x(arguments,1),r,i=function(){if(this instanceof r){var l=s.apply(this,kd(n,arguments));return Object(l)===l?l:this}return s.apply(t,kd(n,arguments))},o=Px(0,s.length-n.length),a=[],u=0;u<o;u++)a[u]="$"+u;if(r=Function("binder","return function ("+Ox(a,",")+"){ return binder.apply(this,arguments); }")(i),s.prototype){var c=function(){};c.prototype=s.prototype,r.prototype=new c,c.prototype=null}return r}});var wr=T((iB,Ld)=>{"use strict";var Bx=Pd();Ld.exports=Function.prototype.bind||Bx});var Bi=T((oB,_d)=>{"use strict";_d.exports=Function.prototype.call});var Ga=T((aB,Od)=>{"use strict";Od.exports=Function.prototype.apply});var Md=T((cB,Bd)=>{"use strict";Bd.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Wd=T((uB,Nd)=>{"use strict";var Mx=wr(),Nx=Ga(),Wx=Bi(),Ux=Md();Nd.exports=Ux||Mx.call(Wx,Nx)});var jd=T((lB,Ud)=>{"use strict";var jx=wr(),$x=Li(),Gx=Bi(),Hx=Wd();Ud.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new $x("a function is required");return Hx(jx,Gx,t)}});var Vd=T((pB,qd)=>{"use strict";var zx=jd(),$d=Wa(),Hd;try{Hd=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ha=!!Hd&&$d&&$d(Object.prototype,"__proto__"),zd=Object,Gd=zd.getPrototypeOf;qd.exports=Ha&&typeof Ha.get=="function"?zx([Ha.get]):typeof Gd=="function"?function(t){return Gd(t==null?t:zd(t))}:!1});var Qd=T((dB,Jd)=>{"use strict";var Kd=ja(),Zd=$a(),Yd=Vd();Jd.exports=Kd?function(t){return Kd(t)}:Zd?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Zd(t)}:Yd?function(t){return Yd(t)}:null});var Mi=T((mB,Xd)=>{"use strict";var qx=Function.prototype.call,Vx=Object.prototype.hasOwnProperty,Kx=wr();Xd.exports=Kx.call(qx,Vx)});var om=T((fB,im)=>{"use strict";var Ce,Zx=Na(),Yx=zp(),Jx=Vp(),Qx=Zp(),Xx=Jp(),kn=Xp(),In=Li(),ew=sd(),tw=rd(),sw=od(),nw=cd(),rw=ld(),iw=dd(),ow=fd(),aw=Sd(),nm=Function,za=function(e){try{return nm('"use strict"; return ('+e+").constructor;")()}catch{}},Er=Wa(),cw=Ad(),qa=function(){throw new In},uw=Er?function(){try{return arguments.callee,qa}catch{try{return Er(arguments,"callee").get}catch{return qa}}}():qa,Rn=Rd()(),Qe=Qd(),lw=$a(),pw=ja(),rm=Ga(),Rr=Bi(),Fn={},dw=typeof Uint8Array>"u"||!Qe?Ce:Qe(Uint8Array),Us={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":Rn&&Qe?Qe([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":Fn,"%AsyncGenerator%":Fn,"%AsyncGeneratorFunction%":Fn,"%AsyncIteratorPrototype%":Fn,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Yx,"%eval%":eval,"%EvalError%":Jx,"%Float16Array%":typeof Float16Array>"u"?Ce:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":nm,"%GeneratorFunction%":Fn,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Rn&&Qe?Qe(Qe([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Rn||!Qe?Ce:Qe(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Zx,"%Object.getOwnPropertyDescriptor%":Er,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":Qx,"%ReferenceError%":Xx,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Rn||!Qe?Ce:Qe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Rn&&Qe?Qe(""[Symbol.iterator]()):Ce,"%Symbol%":Rn?Symbol:Ce,"%SyntaxError%":kn,"%ThrowTypeError%":uw,"%TypedArray%":dw,"%TypeError%":In,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":ew,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet,"%Function.prototype.call%":Rr,"%Function.prototype.apply%":rm,"%Object.defineProperty%":cw,"%Object.getPrototypeOf%":lw,"%Math.abs%":tw,"%Math.floor%":sw,"%Math.max%":nw,"%Math.min%":rw,"%Math.pow%":iw,"%Math.round%":ow,"%Math.sign%":aw,"%Reflect.getPrototypeOf%":pw};if(Qe)try{null.error}catch(e){em=Qe(Qe(e)),Us["%Error.prototype%"]=em}var em,mw=function e(t){var s;if(t==="%AsyncFunction%")s=za("async function () {}");else if(t==="%GeneratorFunction%")s=za("function* () {}");else if(t==="%AsyncGeneratorFunction%")s=za("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(s=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var r=e("%AsyncGenerator%");r&&Qe&&(s=Qe(r.prototype))}return Us[t]=s,s},tm={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Fr=wr(),Ni=Mi(),fw=Fr.call(Rr,Array.prototype.concat),gw=Fr.call(rm,Array.prototype.splice),sm=Fr.call(Rr,String.prototype.replace),Wi=Fr.call(Rr,String.prototype.slice),hw=Fr.call(Rr,RegExp.prototype.exec),yw=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Sw=/\\(\\)?/g,bw=function(t){var s=Wi(t,0,1),n=Wi(t,-1);if(s==="%"&&n!=="%")throw new kn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&s!=="%")throw new kn("invalid intrinsic syntax, expected opening `%`");var r=[];return sm(t,yw,function(i,o,a,u){r[r.length]=a?sm(u,Sw,"$1"):o||i}),r},Dw=function(t,s){var n=t,r;if(Ni(tm,n)&&(r=tm[n],n="%"+r[0]+"%"),Ni(Us,n)){var i=Us[n];if(i===Fn&&(i=mw(n)),typeof i>"u"&&!s)throw new In("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new kn("intrinsic "+t+" does not exist!")};im.exports=function(t,s){if(typeof t!="string"||t.length===0)throw new In("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof s!="boolean")throw new In('"allowMissing" argument must be a boolean');if(hw(/^%?[^%]*%?$/,t)===null)throw new kn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=bw(t),r=n.length>0?n[0]:"",i=Dw("%"+r+"%",s),o=i.name,a=i.value,u=!1,c=i.alias;c&&(r=c[0],gw(n,fw([0,1],c)));for(var l=1,p=!0;l<n.length;l+=1){var d=n[l],m=Wi(d,0,1),f=Wi(d,-1);if((m==='"'||m==="'"||m==="`"||f==='"'||f==="'"||f==="`")&&m!==f)throw new kn("property names with quotes must have matching quotes");if((d==="constructor"||!p)&&(u=!0),r+="."+d,o="%"+r+"%",Ni(Us,o))a=Us[o];else if(a!=null){if(!(d in a)){if(!s)throw new In("base intrinsic for "+t+" exists, but the property is not available.");return}if(Er&&l+1>=n.length){var g=Er(a,d);p=!!g,p&&"get"in g&&!("originalValue"in g.get)?a=g.get:a=a[d]}else p=Ni(a,d),a=a[d];p&&!u&&(Us[o]=a)}}return a}});var cm=T((gB,am)=>{"use strict";var vw=Ua();am.exports=function(){return vw()&&!!Symbol.toStringTag}});var pm=T((hB,lm)=>{"use strict";var Cw=om(),um=Cw("%Object.defineProperty%",!0),Aw=cm()(),xw=Mi(),ww=Li(),Ui=Aw?Symbol.toStringTag:null;lm.exports=function(t,s){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,r=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof r<"u"&&typeof r!="boolean")throw new ww("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Ui&&(n||!xw(t,Ui))&&(um?um(t,Ui,{configurable:!r,enumerable:!1,value:s,writable:!1}):t[Ui]=s)}});var mm=T((yB,dm)=>{"use strict";dm.exports=function(e,t){return Object.keys(t).forEach(function(s){e[s]=e[s]||t[s]}),e}});var gm=T((SB,fm)=>{"use strict";var Ya=bp(),Ew=require("util"),Va=require("path"),Rw=require("http"),Fw=require("https"),Iw=require("url").parse,kw=require("fs"),Tw=require("stream").Stream,Pw=require("crypto"),Ka=wp(),Lw=$p(),_w=pm(),Ds=Mi(),Za=mm();function we(e){if(!(this instanceof we))return new we(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Ya.call(this),e=e||{};for(var t in e)this[t]=e[t]}Ew.inherits(we,Ya);we.LINE_BREAK=`\r
|
|
2
|
+
`;we.DEFAULT_CONTENT_TYPE="application/octet-stream";we.prototype.append=function(e,t,s){s=s||{},typeof s=="string"&&(s={filename:s});var n=Ya.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(e,t,s),i=this._multiPartFooter();n(r),n(t),n(i),this._trackLength(r,t,s)};we.prototype._trackLength=function(e,t,s){var n=0;s.knownLength!=null?n+=Number(s.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+we.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&Ds(t,"httpVersion"))&&!(t instanceof Tw))&&(s.knownLength||this._valuesToMeasure.push(t))};we.prototype._lengthRetriever=function(e,t){Ds(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):kw.stat(e.path,function(s,n){if(s){t(s);return}var r=n.size-(e.start?e.start:0);t(null,r)}):Ds(e,"httpVersion")?t(null,Number(e.headers["content-length"])):Ds(e,"httpModule")?(e.on("response",function(s){e.pause(),t(null,Number(s.headers["content-length"]))}),e.resume()):t("Unknown stream")};we.prototype._multiPartHeader=function(e,t,s){if(typeof s.header=="string")return s.header;var n=this._getContentDisposition(t,s),r=this._getContentType(t,s),i="",o={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(r||[])};typeof s.header=="object"&&Za(o,s.header);var a;for(var u in o)if(Ds(o,u)){if(a=o[u],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(i+=u+": "+a.join("; ")+we.LINE_BREAK)}return"--"+this.getBoundary()+we.LINE_BREAK+i+we.LINE_BREAK};we.prototype._getContentDisposition=function(e,t){var s;if(typeof t.filepath=="string"?s=Va.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?s=Va.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&Ds(e,"httpVersion")&&(s=Va.basename(e.client._httpMessage.path||"")),s)return'filename="'+s+'"'};we.prototype._getContentType=function(e,t){var s=t.contentType;return!s&&e&&e.name&&(s=Ka.lookup(e.name)),!s&&e&&e.path&&(s=Ka.lookup(e.path)),!s&&e&&e.readable&&Ds(e,"httpVersion")&&(s=e.headers["content-type"]),!s&&(t.filepath||t.filename)&&(s=Ka.lookup(t.filepath||t.filename)),!s&&e&&typeof e=="object"&&(s=we.DEFAULT_CONTENT_TYPE),s};we.prototype._multiPartFooter=function(){return function(e){var t=we.LINE_BREAK,s=this._streams.length===0;s&&(t+=this._lastBoundary()),e(t)}.bind(this)};we.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+we.LINE_BREAK};we.prototype.getHeaders=function(e){var t,s={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)Ds(e,t)&&(s[t.toLowerCase()]=e[t]);return s};we.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};we.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};we.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),s=0,n=this._streams.length;s<n;s++)typeof this._streams[s]!="function"&&(Buffer.isBuffer(this._streams[s])?e=Buffer.concat([e,this._streams[s]]):e=Buffer.concat([e,Buffer.from(this._streams[s])]),(typeof this._streams[s]!="string"||this._streams[s].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(we.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};we.prototype._generateBoundary=function(){this._boundary="--------------------------"+Pw.randomBytes(12).toString("hex")};we.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};we.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};we.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Lw.parallel(this._valuesToMeasure,this._lengthRetriever,function(s,n){if(s){e(s);return}n.forEach(function(r){t+=r}),e(null,t)})};we.prototype.submit=function(e,t){var s,n,r={method:"post"};return typeof e=="string"?(e=Iw(e),n=Za({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},r)):(n=Za(e,r),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?s=Fw.request(n):s=Rw.request(n),this.getLength(function(i,o){if(i&&i!=="Unknown stream"){this._error(i);return}if(o&&s.setHeader("Content-Length",o),this.pipe(s),t){var a,u=function(c,l){return s.removeListener("error",u),s.removeListener("response",a),t.call(this,c,l)};a=u.bind(this,null),s.on("error",u),s.on("response",a)}}.bind(this)),s};we.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};we.prototype.toString=function(){return"[object FormData]"};_w(we.prototype,"FormData");fm.exports=we});var km=T((m3,Im)=>{var Ln=1e3,_n=Ln*60,On=_n*60,Gs=On*24,Yw=Gs*7,Jw=Gs*365.25;Im.exports=function(e,t){t=t||{};var s=typeof e;if(s==="string"&&e.length>0)return Qw(e);if(s==="number"&&isFinite(e))return t.long?e0(e):Xw(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Qw(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var s=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return s*Jw;case"weeks":case"week":case"w":return s*Yw;case"days":case"day":case"d":return s*Gs;case"hours":case"hour":case"hrs":case"hr":case"h":return s*On;case"minutes":case"minute":case"mins":case"min":case"m":return s*_n;case"seconds":case"second":case"secs":case"sec":case"s":return s*Ln;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function Xw(e){var t=Math.abs(e);return t>=Gs?Math.round(e/Gs)+"d":t>=On?Math.round(e/On)+"h":t>=_n?Math.round(e/_n)+"m":t>=Ln?Math.round(e/Ln)+"s":e+"ms"}function e0(e){var t=Math.abs(e);return t>=Gs?Gi(e,t,Gs,"day"):t>=On?Gi(e,t,On,"hour"):t>=_n?Gi(e,t,_n,"minute"):t>=Ln?Gi(e,t,Ln,"second"):e+" ms"}function Gi(e,t,s,n){var r=t>=s*1.5;return Math.round(e/s)+" "+n+(r?"s":"")}});var pc=T((f3,Tm)=>{function t0(e){s.debug=s,s.default=s,s.coerce=u,s.disable=o,s.enable=r,s.enabled=a,s.humanize=km(),s.destroy=c,Object.keys(e).forEach(l=>{s[l]=e[l]}),s.names=[],s.skips=[],s.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return s.colors[Math.abs(p)%s.colors.length]}s.selectColor=t;function s(l){let p,d=null,m,f;function g(...h){if(!g.enabled)return;let y=g,b=Number(new Date),x=b-(p||b);y.diff=x,y.prev=p,y.curr=b,p=b,h[0]=s.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let v=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(O,M)=>{if(O==="%%")return"%";v++;let P=s.formatters[M];if(typeof P=="function"){let X=h[v];O=P.call(y,X),h.splice(v,1),v--}return O}),s.formatArgs.call(y,h),(y.log||s.log).apply(y,h)}return g.namespace=l,g.useColors=s.useColors(),g.color=s.selectColor(l),g.extend=n,g.destroy=s.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(m!==s.namespaces&&(m=s.namespaces,f=s.enabled(l)),f),set:h=>{d=h}}),typeof s.init=="function"&&s.init(g),g}function n(l,p){let d=s(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function r(l){s.save(l),s.namespaces=l,s.names=[],s.skips=[];let p=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?s.skips.push(d.slice(1)):s.names.push(d)}function i(l,p){let d=0,m=0,f=-1,g=0;for(;d<l.length;)if(m<p.length&&(p[m]===l[d]||p[m]==="*"))p[m]==="*"?(f=m,g=d,m++):(d++,m++);else if(f!==-1)m=f+1,g++,d=g;else return!1;for(;m<p.length&&p[m]==="*";)m++;return m===p.length}function o(){let l=[...s.names,...s.skips.map(p=>"-"+p)].join(",");return s.enable(""),l}function a(l){for(let p of s.skips)if(i(l,p))return!1;for(let p of s.names)if(i(l,p))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return s.enable(s.load()),s}Tm.exports=t0});var Pm=T((Ct,Hi)=>{Ct.formatArgs=n0;Ct.save=r0;Ct.load=i0;Ct.useColors=s0;Ct.storage=o0();Ct.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ct.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function s0(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n0(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Hi.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let s=0,n=0;e[0].replace(/%[a-zA-Z%]/g,r=>{r!=="%%"&&(s++,r==="%c"&&(n=s))}),e.splice(n,0,t)}Ct.log=console.debug||console.log||(()=>{});function r0(e){try{e?Ct.storage.setItem("debug",e):Ct.storage.removeItem("debug")}catch{}}function i0(){let e;try{e=Ct.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function o0(){try{return localStorage}catch{}}Hi.exports=pc()(Ct);var{formatters:a0}=Hi.exports;a0.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var _m=T((g3,Lm)=>{"use strict";Lm.exports=(e,t=process.argv)=>{let s=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}});var Mm=T((h3,Bm)=>{"use strict";var c0=require("os"),Om=require("tty"),kt=_m(),{env:Xe}=process,As;kt("no-color")||kt("no-colors")||kt("color=false")||kt("color=never")?As=0:(kt("color")||kt("colors")||kt("color=true")||kt("color=always"))&&(As=1);"FORCE_COLOR"in Xe&&(Xe.FORCE_COLOR==="true"?As=1:Xe.FORCE_COLOR==="false"?As=0:As=Xe.FORCE_COLOR.length===0?1:Math.min(parseInt(Xe.FORCE_COLOR,10),3));function dc(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function mc(e,t){if(As===0)return 0;if(kt("color=16m")||kt("color=full")||kt("color=truecolor"))return 3;if(kt("color=256"))return 2;if(e&&!t&&As===void 0)return 0;let s=As||0;if(Xe.TERM==="dumb")return s;if(process.platform==="win32"){let n=c0.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Xe)||Xe.CI_NAME==="codeship"?1:s;if("TEAMCITY_VERSION"in Xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xe.TEAMCITY_VERSION)?1:0;if(Xe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Xe){let n=parseInt((Xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Xe.TERM)||"COLORTERM"in Xe?1:s}function u0(e){let t=mc(e,e&&e.isTTY);return dc(t)}Bm.exports={supportsColor:u0,stdout:dc(mc(!0,Om.isatty(1))),stderr:dc(mc(!0,Om.isatty(2)))}});var Wm=T((et,qi)=>{var l0=require("tty"),zi=require("util");et.init=y0;et.log=f0;et.formatArgs=d0;et.save=g0;et.load=h0;et.useColors=p0;et.destroy=zi.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");et.colors=[6,2,3,4,5,1];try{let e=Mm();e&&(e.stderr||e).level>=2&&(et.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}et.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let s=t.substring(6).toLowerCase().replace(/_([a-z])/g,(r,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[s]=n,e},{});function p0(){return"colors"in et.inspectOpts?!!et.inspectOpts.colors:l0.isatty(process.stderr.fd)}function d0(e){let{namespace:t,useColors:s}=this;if(s){let n=this.color,r="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${r};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
|
|
3
3
|
`).join(`
|
|
4
4
|
`+i),e.push(r+"m+"+qi.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=m0()+t+" "+e[0]}function m0(){return et.inspectOpts.hideDate?"":new Date().toISOString()+" "}function f0(...e){return process.stderr.write(zi.formatWithOptions(et.inspectOpts,...e)+`
|
|
5
5
|
`)}function g0(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function h0(){return process.env.DEBUG}function y0(e){e.inspectOpts={};let t=Object.keys(et.inspectOpts);for(let s=0;s<t.length;s++)e.inspectOpts[t[s]]=et.inspectOpts[t[s]]}qi.exports=pc()(et);var{formatters:Nm}=qi.exports;Nm.o=function(e){return this.inspectOpts.colors=this.useColors,zi.inspect(e,this.inspectOpts).split(`
|
|
6
|
-
`).map(t=>t.trim()).join(" ")};Nm.O=function(e){return this.inspectOpts.colors=this.useColors,zi.inspect(e,this.inspectOpts)}});var Um=T((y3,fc)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?fc.exports=Pm():fc.exports=Wm()});var $m=T((S3,jm)=>{var Tr;jm.exports=function(){if(!Tr){try{Tr=Um()("follow-redirects")}catch{}typeof Tr!="function"&&(Tr=function(){})}Tr.apply(null,arguments)}});var Km=T((b3,Ec)=>{var Lr=require("url"),Pr=Lr.URL,S0=require("http"),b0=require("https"),bc=require("stream").Writable,Dc=require("assert"),Gm=$m();(function(){var t=typeof process<"u",s=typeof window<"u"&&typeof document<"u",n=zs(Error.captureStackTrace);!t&&(s||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var vc=!1;try{Dc(new Pr(""))}catch(e){vc=e.code==="ERR_INVALID_URL"}var D0=["Authorization","Proxy-Authorization","Cookie"],v0=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Cc=["abort","aborted","connect","error","socket","timeout"],Ac=Object.create(null);Cc.forEach(function(e){Ac[e]=function(t,s,n){this._redirectable.emit(e,t,s,n)}});var hc=_r("ERR_INVALID_URL","Invalid URL",TypeError),yc=_r("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),C0=_r("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",yc),A0=_r("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),x0=_r("ERR_STREAM_WRITE_AFTER_END","write after end"),w0=bc.prototype.destroy||zm;function ht(e,t){bc.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var s=this;this._onNativeResponse=function(n){try{s._processResponse(n)}catch(r){s.emit("error",r instanceof yc?r:new yc({cause:r}))}},this._headerFilter=new RegExp("^(?:"+D0.concat(e.sensitiveHeaders).map(T0).join("|")+")$","i"),this._performRequest()}ht.prototype=Object.create(bc.prototype);ht.prototype.abort=function(){wc(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};ht.prototype.destroy=function(e){return wc(this._currentRequest,e),w0.call(this,e),this};ht.prototype.write=function(e,t,s){if(this._ending)throw new x0;if(!Hs(e)&&!I0(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(zs(t)&&(s=t,t=null),e.length===0){s&&s();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,s)):(this.emit("error",new A0),this.abort())};ht.prototype.end=function(e,t,s){if(zs(e)?(s=e,e=t=null):zs(t)&&(s=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,s);else{var n=this,r=this._currentRequest;this.write(e,t,function(){n._ended=!0,r.end(null,null,s)}),this._ending=!0}};ht.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};ht.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};ht.prototype.setTimeout=function(e,t){var s=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function r(o){s._timeout&&clearTimeout(s._timeout),s._timeout=setTimeout(function(){s.emit("timeout"),i()},e),n(o)}function i(){s._timeout&&(clearTimeout(s._timeout),s._timeout=null),s.removeListener("abort",i),s.removeListener("error",i),s.removeListener("response",i),s.removeListener("close",i),t&&s.removeListener("timeout",t),s.socket||s._currentRequest.removeListener("socket",r)}return t&&this.on("timeout",t),this.socket?r(this.socket):this._currentRequest.once("socket",r),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){ht.prototype[e]=function(t,s){return this._currentRequest[e](t,s)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(ht.prototype,e,{get:function(){return this._currentRequest[e]}})});ht.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),F0(e.sensitiveHeaders)||(e.sensitiveHeaders=[]),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};ht.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var s=e.slice(0,-1);this._options.agent=this._options.agents[s]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var r of Cc)n.on(r,Ac[r]);if(this._currentUrl=/^\//.test(this._options.path)?Lr.format(this._options):this._options.path,this._isRedirect){var i=0,o=this,a=this._requestBodyBuffers;(function u(c){if(n===o._currentRequest)if(c)o.emit("error",c);else if(i<a.length){var l=a[i++];n.finished||n.write(l.data,l.encoding,u)}else o._ended&&n.end()})()}};ht.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var s=e.headers.location;if(!s||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(wc(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new C0;var n,r=this._options.beforeRedirect;r&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],gc(/^content-/i,this._options.headers));var o=gc(/^host$/i,this._options.headers),a=xc(this._currentUrl),u=o||a.host,c=/^\w+:/.test(s)?this._currentUrl:Lr.format(Object.assign(a,{host:u})),l=E0(s,c);if(Gm("redirecting to",l.href),this._isRedirect=!0,Sc(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!R0(l.host,u))&&gc(this._headerFilter,this._options.headers),zs(r)){var p={headers:e.headers,statusCode:t},d={url:c,method:i,headers:n};r(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function Hm(e){var t={maxRedirects:21,maxBodyLength:10485760},s={};return Object.keys(e).forEach(function(n){var r=n+":",i=s[r]=e[n],o=t[n]=Object.create(i);function a(c,l,p){return k0(c)?c=Sc(c):Hs(c)?c=Sc(xc(c)):(p=l,l=qm(c),c={protocol:r}),zs(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=s,!Hs(l.host)&&!Hs(l.hostname)&&(l.hostname="::1"),Dc.equal(l.protocol,r,"protocol mismatch"),Gm("options",l),new ht(l,p)}function u(c,l,p){var d=o.request(c,l,p);return d.end(),d}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function zm(){}function xc(e){var t;if(vc)t=new Pr(e);else if(t=qm(Lr.parse(e)),!Hs(t.protocol))throw new hc({input:e});return t}function E0(e,t){return vc?new Pr(e,t):xc(Lr.resolve(t,e))}function qm(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new hc({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new hc({input:e.href||e});return e}function Sc(e,t){var s=t||{};for(var n of v0)s[n]=e[n];return s.hostname.startsWith("[")&&(s.hostname=s.hostname.slice(1,-1)),s.port!==""&&(s.port=Number(s.port)),s.path=s.search?s.pathname+s.search:s.pathname,s}function gc(e,t){var s;for(var n in t)e.test(n)&&(s=t[n],delete t[n]);return s===null||typeof s>"u"?void 0:String(s).trim()}function _r(e,t,s){function n(r){zs(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(s||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function wc(e,t){for(var s of Cc)e.removeListener(s,Ac[s]);e.on("error",zm),e.destroy(t)}function R0(e,t){Dc(Hs(e)&&Hs(t));var s=e.length-t.length-1;return s>0&&e[s]==="."&&e.endsWith(t)}function F0(e){return e instanceof Array}function Hs(e){return typeof e=="string"||e instanceof String}function zs(e){return typeof e=="function"}function I0(e){return typeof e=="object"&&"length"in e}function k0(e){return Pr&&e instanceof Pr}function T0(e){return e.replace(/[\]\\/()*+?.$]/g,"\\$&")}Ec.exports=Hm({http:S0,https:b0});Ec.exports.wrap=Hm});var Vc=T(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.createJsonFormatter=void 0;var zR=e=>{switch(e){case 0:return"DEBUG";case 1:return"INFO";case 2:return"WARN";case 3:return"ERROR";case 4:return"FATAL";default:return"UNKNOWN"}},qR=()=>({format:e=>JSON.stringify({timestamp:e.timestamp,level:zR(e.level),message:e.message,...e.context,...e.error&&{error:{name:e.error.name,message:e.error.message,stack:e.error.stack}},...e.metadata&&{metadata:e.metadata}})});io.createJsonFormatter=qR});var zt=T(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.LogLevel=void 0;var Jh;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.FATAL=4]="FATAL"})(Jh||(oo.LogLevel=Jh={}))});var ps=T(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.shouldLog=Un.BaseTransport=void 0;var KR=zt(),Zc=class{constructor(){this.level=KR.LogLevel.INFO}setLevel(t){this.level=t}getLevel(){return this.level}shouldLog(t){return t>=this.level}};Un.BaseTransport=Zc;var VR=(e,t)=>e>=t;Un.shouldLog=VR});var co=T(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.createConsoleTransport=void 0;var jn=zt(),ZR=ps(),YR=(e={})=>{let t=e.level??jn.LogLevel.INFO,s=e.formatter||{format:n=>JSON.stringify(n)};return{log:n=>{if(!(0,ZR.shouldLog)(n.level,t))return;let r=s.format(n);switch(n.level){case jn.LogLevel.DEBUG:console.debug(r);break;case jn.LogLevel.INFO:console.info(r);break;case jn.LogLevel.WARN:console.warn(r);break;case jn.LogLevel.ERROR:case jn.LogLevel.FATAL:console.error(r);break}},setLevel:n=>{t=n},getLevel:()=>t}};ao.createConsoleTransport=YR});var Yc=T(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.createBatchedLogger=Vs.createBatchedTransport=void 0;var JR=(e,t={maxSize:100,maxWaitTime:5e3,maxBatchSize:1024*1024})=>{let s={logs:[],currentSize:0,lastFlush:Date.now()},n={totalLogs:0,totalBatches:0,averageBatchSize:0,lastFlushTime:0,pendingLogs:0},r=p=>p.reduce((d,m)=>d+JSON.stringify(m).length,0),i=async()=>{if(s.logs.length===0)return;let p=[...s.logs];s.logs=[],s.currentSize=0,s.lastFlush=Date.now(),s.flushTimer&&(clearTimeout(s.flushTimer),s.flushTimer=void 0);try{await Promise.allSettled(p.map(d=>e.log(d))),n.totalLogs+=p.length,n.totalBatches+=1,n.averageBatchSize=n.totalLogs/n.totalBatches,n.lastFlushTime=Date.now(),n.pendingLogs=s.logs.length}catch(d){console.error("Batch flush failed:",d),s.logs.unshift(...p),s.currentSize=r(s.logs)}},o=()=>{s.flushTimer||(s.flushTimer=setTimeout(()=>{i().catch(console.error)},t.maxWaitTime))};return{log:async p=>{let d=JSON.stringify(p).length;(s.logs.length>=t.maxSize||s.currentSize+d>=t.maxBatchSize)&&await i(),s.logs.push(p),s.currentSize+=d,n.pendingLogs=s.logs.length,s.logs.length===1&&o()},setLevel:p=>{e.setLevel(p)},getLevel:()=>e.getLevel(),flush:i,getStats:()=>({...n,pendingLogs:s.logs.length})}};Vs.createBatchedTransport=JR;var QR=(e,t={maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})=>{let s=e.map(u=>(0,Vs.createBatchedTransport)(u,t));return{log:async u=>{await Promise.allSettled(s.map(c=>c.log(u)))},setLevel:u=>{for(let c of s)c.setLevel(u)},getLevel:()=>Math.min(...s.map(u=>u.getLevel())),flush:async()=>{await Promise.allSettled(s.map(u=>u.flush()))},getStats:()=>s.map(u=>u.getStats())}};Vs.createBatchedLogger=QR});var Jc=T(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.createDefaultEnrichmentMiddleware=Ie.createEnrichmentMiddleware=Ie.createLoggerInstanceEnricher=Ie.createUserEnricher=Ie.createEnvironmentEnricher=Ie.createSessionEnricher=Ie.createCorrelationEnricher=Ie.generateLoggerInstanceId=Ie.generateSpanId=Ie.generateTraceId=Ie.generateCorrelationId=void 0;var XR=()=>`corr_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;Ie.generateCorrelationId=XR;var eF=()=>Math.random().toString(16).substr(2,32);Ie.generateTraceId=eF;var tF=()=>Math.random().toString(16).substr(2,16);Ie.generateSpanId=tF;var sF=()=>{let e=Date.now(),t=Math.random().toString(36).substr(2,9),s=process.pid||0;return`logger_${e}_${t}_${s}`};Ie.generateLoggerInstanceId=sF;var nF=()=>{let e,t,s;return{name:"correlation",enrich:n=>(n.correlationId||(e=e||(0,Ie.generateCorrelationId)(),n.correlationId=e),n.traceId||(t=t||(0,Ie.generateTraceId)(),n.traceId=t),n.spanId||(s=s||(0,Ie.generateSpanId)(),n.spanId=s),n)}};Ie.createCorrelationEnricher=nF;var rF=e=>{let t=e||`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return{name:"session",enrich:s=>(s.sessionId||(s.sessionId=t),s)}};Ie.createSessionEnricher=rF;var iF=(e,t)=>({name:"environment",enrich:s=>(e&&!s.serviceName&&(s.serviceName=e),t&&!s.stage&&(s.stage=t),s)});Ie.createEnvironmentEnricher=iF;var oF=e=>({name:"user",enrich:t=>(e&&!t.userId&&(t.userId=e),t)});Ie.createUserEnricher=oF;var aF=e=>({name:"loggerInstance",enrich:t=>(t.instanceId||(t.instanceId=e),t)});Ie.createLoggerInstanceEnricher=aF;var cF=e=>t=>e.reduce((s,n)=>n.enrich(s),{...t});Ie.createEnrichmentMiddleware=cF;var uF=(e,t,s,n)=>{let r=[(0,Ie.createCorrelationEnricher)(),(0,Ie.createSessionEnricher)(s),(0,Ie.createEnvironmentEnricher)(e,t)];return n&&r.push((0,Ie.createLoggerInstanceEnricher)(n)),(0,Ie.createEnrichmentMiddleware)(r)};Ie.createDefaultEnrichmentMiddleware=uF});var Hr=T(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.getParsedType=Be.ZodParsedType=Be.objectUtil=Be.util=void 0;var Qc;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function s(r){throw new Error}e.assertNever=s,e.arrayToEnum=r=>{let i={};for(let o of r)i[o]=o;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),o={};for(let a of i)o[a]=r[a];return e.objectValues(o)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},e.find=(r,i)=>{for(let o of r)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function n(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(Qc||(Be.util=Qc={}));var Qh;(function(e){e.mergeShapes=(t,s)=>({...t,...s})})(Qh||(Be.objectUtil=Qh={}));Be.ZodParsedType=Qc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var lF=e=>{switch(typeof e){case"undefined":return Be.ZodParsedType.undefined;case"string":return Be.ZodParsedType.string;case"number":return Number.isNaN(e)?Be.ZodParsedType.nan:Be.ZodParsedType.number;case"boolean":return Be.ZodParsedType.boolean;case"function":return Be.ZodParsedType.function;case"bigint":return Be.ZodParsedType.bigint;case"symbol":return Be.ZodParsedType.symbol;case"object":return Array.isArray(e)?Be.ZodParsedType.array:e===null?Be.ZodParsedType.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Be.ZodParsedType.promise:typeof Map<"u"&&e instanceof Map?Be.ZodParsedType.map:typeof Set<"u"&&e instanceof Set?Be.ZodParsedType.set:typeof Date<"u"&&e instanceof Date?Be.ZodParsedType.date:Be.ZodParsedType.object;default:return Be.ZodParsedType.unknown}};Be.getParsedType=lF});var uo=T(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.ZodError=xs.quotelessJson=xs.ZodIssueCode=void 0;var Xh=Hr();xs.ZodIssueCode=Xh.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var pF=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");xs.quotelessJson=pF;var zr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=t}format(t){let s=t||function(i){return i.message},n={_errors:[]},r=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)n._errors.push(s(o));else{let a=n,u=0;for(;u<o.path.length;){let c=o.path[u];u===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(s(o))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xh.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=s=>s.message){let s={},n=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];s[i]=s[i]||[],s[i].push(t(r))}else n.push(t(r));return{formErrors:n,fieldErrors:s}}get formErrors(){return this.flatten()}};xs.ZodError=zr;zr.create=e=>new zr(e)});var eu=T(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var at=uo(),Zs=Hr(),dF=(e,t)=>{let s;switch(e.code){case at.ZodIssueCode.invalid_type:e.received===Zs.ZodParsedType.undefined?s="Required":s=`Expected ${e.expected}, received ${e.received}`;break;case at.ZodIssueCode.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,Zs.util.jsonStringifyReplacer)}`;break;case at.ZodIssueCode.unrecognized_keys:s=`Unrecognized key(s) in object: ${Zs.util.joinValues(e.keys,", ")}`;break;case at.ZodIssueCode.invalid_union:s="Invalid input";break;case at.ZodIssueCode.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Zs.util.joinValues(e.options)}`;break;case at.ZodIssueCode.invalid_enum_value:s=`Invalid enum value. Expected ${Zs.util.joinValues(e.options)}, received '${e.received}'`;break;case at.ZodIssueCode.invalid_arguments:s="Invalid function arguments";break;case at.ZodIssueCode.invalid_return_type:s="Invalid function return type";break;case at.ZodIssueCode.invalid_date:s="Invalid date";break;case at.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:Zs.util.assertNever(e.validation):e.validation!=="regex"?s=`Invalid ${e.validation}`:s="Invalid";break;case at.ZodIssueCode.too_small:e.type==="array"?s=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?s=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?s=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?s=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?s=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:s="Invalid input";break;case at.ZodIssueCode.too_big:e.type==="array"?s=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?s=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?s=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?s=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?s=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:s="Invalid input";break;case at.ZodIssueCode.custom:s="Invalid input";break;case at.ZodIssueCode.invalid_intersection_types:s="Intersection results could not be merged";break;case at.ZodIssueCode.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case at.ZodIssueCode.not_finite:s="Number must be finite";break;default:s=t.defaultError,Zs.util.assertNever(e)}return{message:s}};Xc.default=dF});var lo=T(ws=>{"use strict";var mF=ws&&ws.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ws,"__esModule",{value:!0});ws.defaultErrorMap=void 0;ws.setErrorMap=fF;ws.getErrorMap=gF;var ey=mF(eu());ws.defaultErrorMap=ey.default;var ty=ey.default;function fF(e){ty=e}function gF(){return ty}});var su=T(Pe=>{"use strict";var hF=Pe&&Pe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.isAsync=Pe.isValid=Pe.isDirty=Pe.isAborted=Pe.OK=Pe.DIRTY=Pe.INVALID=Pe.ParseStatus=Pe.EMPTY_PATH=Pe.makeIssue=void 0;Pe.addIssueToContext=bF;var yF=lo(),sy=hF(eu()),SF=e=>{let{data:t,path:s,errorMaps:n,issueData:r}=e,i=[...s,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let a="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)a=c(o,{data:t,defaultError:a}).message;return{...r,path:i,message:a}};Pe.makeIssue=SF;Pe.EMPTY_PATH=[];function bF(e,t){let s=(0,yF.getErrorMap)(),n=(0,Pe.makeIssue)({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,s,s===sy.default?void 0:sy.default].filter(r=>!!r)});e.common.issues.push(n)}var tu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,s){let n=[];for(let r of s){if(r.status==="aborted")return Pe.INVALID;r.status==="dirty"&&t.dirty(),n.push(r.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,s){let n=[];for(let r of s){let i=await r.key,o=await r.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,s){let n={};for(let r of s){let{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return Pe.INVALID;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}};Pe.ParseStatus=tu;Pe.INVALID=Object.freeze({status:"aborted"});var DF=e=>({status:"dirty",value:e});Pe.DIRTY=DF;var vF=e=>({status:"valid",value:e});Pe.OK=vF;var CF=e=>e.status==="aborted";Pe.isAborted=CF;var AF=e=>e.status==="dirty";Pe.isDirty=AF;var xF=e=>e.status==="valid";Pe.isValid=xF;var wF=e=>typeof Promise<"u"&&e instanceof Promise;Pe.isAsync=wF});var ry=T(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0})});var oy=T(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.errorUtil=void 0;var iy;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(iy||(po.errorUtil=iy={}))});var Sy=T(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.discriminatedUnion=R.date=R.boolean=R.bigint=R.array=R.any=R.coerce=R.ZodFirstPartyTypeKind=R.late=R.ZodSchema=R.Schema=R.ZodReadonly=R.ZodPipeline=R.ZodBranded=R.BRAND=R.ZodNaN=R.ZodCatch=R.ZodDefault=R.ZodNullable=R.ZodOptional=R.ZodTransformer=R.ZodEffects=R.ZodPromise=R.ZodNativeEnum=R.ZodEnum=R.ZodLiteral=R.ZodLazy=R.ZodFunction=R.ZodSet=R.ZodMap=R.ZodRecord=R.ZodTuple=R.ZodIntersection=R.ZodDiscriminatedUnion=R.ZodUnion=R.ZodObject=R.ZodArray=R.ZodVoid=R.ZodNever=R.ZodUnknown=R.ZodAny=R.ZodNull=R.ZodUndefined=R.ZodSymbol=R.ZodDate=R.ZodBoolean=R.ZodBigInt=R.ZodNumber=R.ZodString=R.ZodType=void 0;R.NEVER=R.void=R.unknown=R.union=R.undefined=R.tuple=R.transformer=R.symbol=R.string=R.strictObject=R.set=R.record=R.promise=R.preprocess=R.pipeline=R.ostring=R.optional=R.onumber=R.oboolean=R.object=R.number=R.nullable=R.null=R.never=R.nativeEnum=R.nan=R.map=R.literal=R.lazy=R.intersection=R.instanceof=R.function=R.enum=R.effect=void 0;R.datetimeRegex=py;R.custom=my;var $=uo(),mo=lo(),Q=oy(),F=su(),H=Hr(),Ot=class{constructor(t,s,n,r){this._cachedPath=[],this.parent=t,this.data=s,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ay=(e,t)=>{if((0,F.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let s=new $.ZodError(e.common.issues);return this._error=s,this._error}}};function me(e){if(!e)return{};let{errorMap:t,invalid_type_error:s,required_error:n,description:r}=e;if(t&&(s||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(o,a)=>{let{message:u}=e;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:u??s??a.defaultError}},description:r}}var fe=class{get description(){return this._def.description}_getType(t){return(0,H.getParsedType)(t.data)}_getOrReturnCtx(t,s){return s||{common:t.parent.common,data:t.data,parsedType:(0,H.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new F.ParseStatus,ctx:{common:t.parent.common,data:t.data,parsedType:(0,H.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let s=this._parse(t);if((0,F.isAsync)(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(t){let s=this._parse(t);return Promise.resolve(s)}parse(t,s){let n=this.safeParse(t,s);if(n.success)return n.data;throw n.error}safeParse(t,s){let n={common:{issues:[],async:s?.async??!1,contextualErrorMap:s?.errorMap},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,H.getParsedType)(t)},r=this._parseSync({data:t,path:n.path,parent:n});return ay(n,r)}"~validate"(t){let s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,H.getParsedType)(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:s});return(0,F.isValid)(n)?{value:n.value}:{issues:s.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(n=>(0,F.isValid)(n)?{value:n.value}:{issues:s.common.issues})}async parseAsync(t,s){let n=await this.safeParseAsync(t,s);if(n.success)return n.data;throw n.error}async safeParseAsync(t,s){let n={common:{issues:[],contextualErrorMap:s?.errorMap,async:!0},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,H.getParsedType)(t)},r=this._parse({data:t,path:n.path,parent:n}),i=await((0,F.isAsync)(r)?r:Promise.resolve(r));return ay(n,i)}refine(t,s){let n=r=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(r):s;return this._refinement((r,i)=>{let o=t(r),a=()=>i.addIssue({code:$.ZodIssueCode.custom,...n(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,s){return this._refinement((n,r)=>t(n)?!0:(r.addIssue(typeof s=="function"?s(n,r):s),!1))}_refinement(t){return new At({schema:this,typeName:oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return _t.create(this,this._def)}nullable(){return rs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fs.create(this)}promise(){return Fs.create(this,this._def)}or(t){return sn.create([this,t],this._def)}and(t){return nn.create(this,t,this._def)}transform(t){return new At({...me(this._def),schema:this,typeName:oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let s=typeof t=="function"?t:()=>t;return new un({...me(this._def),innerType:this,defaultValue:s,typeName:oe.ZodDefault})}brand(){return new qr({typeName:oe.ZodBranded,type:this,...me(this._def)})}catch(t){let s=typeof t=="function"?t:()=>t;return new ln({...me(this._def),innerType:this,catchValue:s,typeName:oe.ZodCatch})}describe(t){let s=this.constructor;return new s({...this._def,description:t})}pipe(t){return Kr.create(this,t)}readonly(){return pn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};R.ZodType=fe;R.Schema=fe;R.ZodSchema=fe;var EF=/^c[^\s-]{8,}$/i,RF=/^[0-9a-z]+$/,FF=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IF=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kF=/^[a-z0-9_-]{21}$/i,TF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,PF=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,LF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_F="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",nu,OF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,BF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,MF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,NF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,WF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,UF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,uy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",jF=new RegExp(`^${uy}$`);function ly(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let s=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${s}`}function $F(e){return new RegExp(`^${ly(e)}$`)}function py(e){let t=`${uy}T${ly(e)}`,s=[];return s.push(e.local?"Z?":"Z"),e.offset&&s.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${s.join("|")})`,new RegExp(`^${t}$`)}function GF(e,t){return!!((t==="v4"||!t)&&OF.test(e)||(t==="v6"||!t)&&MF.test(e))}function HF(e,t){if(!TF.test(e))return!1;try{let[s]=e.split(".");if(!s)return!1;let n=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),r=JSON.parse(atob(n));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function zF(e,t){return!!((t==="v4"||!t)&&BF.test(e)||(t==="v6"||!t)&&NF.test(e))}var Es=class e extends fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==H.ZodParsedType.string){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.string,received:i.parsedType}),F.INVALID}let n=new F.ParseStatus,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(r=this._getOrReturnCtx(t,r),o?(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")LF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"email",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")nu||(nu=new RegExp(_F,"u")),nu.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"emoji",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")IF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"uuid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")kF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"nanoid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")EF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"cuid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")RF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"cuid2",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")FF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"ulid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"url",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"regex",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?py(i).test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?jF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?$F(i).test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?PF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"duration",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?GF(t.data,i.version)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"ip",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?HF(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"jwt",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?zF(t.data,i.version)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"cidr",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?WF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"base64",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?UF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"base64url",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):H.util.assertNever(i);return{status:n.value,value:t.data}}_regex(t,s,n){return this.refinement(r=>t.test(r),{validation:s,code:$.ZodIssueCode.invalid_string,...Q.errorUtil.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Q.errorUtil.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Q.errorUtil.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Q.errorUtil.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Q.errorUtil.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Q.errorUtil.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Q.errorUtil.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Q.errorUtil.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Q.errorUtil.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Q.errorUtil.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Q.errorUtil.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Q.errorUtil.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Q.errorUtil.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Q.errorUtil.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Q.errorUtil.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Q.errorUtil.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Q.errorUtil.errToObj(t)})}regex(t,s){return this._addCheck({kind:"regex",regex:t,...Q.errorUtil.errToObj(s)})}includes(t,s){return this._addCheck({kind:"includes",value:t,position:s?.position,...Q.errorUtil.errToObj(s?.message)})}startsWith(t,s){return this._addCheck({kind:"startsWith",value:t,...Q.errorUtil.errToObj(s)})}endsWith(t,s){return this._addCheck({kind:"endsWith",value:t,...Q.errorUtil.errToObj(s)})}min(t,s){return this._addCheck({kind:"min",value:t,...Q.errorUtil.errToObj(s)})}max(t,s){return this._addCheck({kind:"max",value:t,...Q.errorUtil.errToObj(s)})}length(t,s){return this._addCheck({kind:"length",value:t,...Q.errorUtil.errToObj(s)})}nonempty(t){return this.min(1,Q.errorUtil.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxLength(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}};R.ZodString=Es;Es.create=e=>new Es({checks:[],typeName:oe.ZodString,coerce:e?.coerce??!1,...me(e)});function qF(e,t){let s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=s>n?s:n,i=Number.parseInt(e.toFixed(r).replace(".","")),o=Number.parseInt(t.toFixed(r).replace(".",""));return i%o/10**r}var Ys=class e extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==H.ZodParsedType.number){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.number,received:i.parsedType}),F.INVALID}let n,r=new F.ParseStatus;for(let i of this._def.checks)i.kind==="int"?H.util.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?qF(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.not_finite,message:i.message}),r.dirty()):H.util.assertNever(i);return{status:r.value,value:t.data}}gte(t,s){return this.setLimit("min",t,!0,Q.errorUtil.toString(s))}gt(t,s){return this.setLimit("min",t,!1,Q.errorUtil.toString(s))}lte(t,s){return this.setLimit("max",t,!0,Q.errorUtil.toString(s))}lt(t,s){return this.setLimit("max",t,!1,Q.errorUtil.toString(s))}setLimit(t,s,n,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:n,message:Q.errorUtil.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Q.errorUtil.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.errorUtil.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:Q.errorUtil.toString(s)})}finite(t){return this._addCheck({kind:"finite",message:Q.errorUtil.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.errorUtil.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.errorUtil.toString(t)})}get minValue(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&H.util.isInteger(t.value))}get isFinite(){let t=null,s=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(s===null||n.value>s)&&(s=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(s)&&Number.isFinite(t)}};R.ZodNumber=Ys;Ys.create=e=>new Ys({checks:[],typeName:oe.ZodNumber,coerce:e?.coerce||!1,...me(e)});var Js=class e extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==H.ZodParsedType.bigint)return this._getInvalidInput(t);let n,r=new F.ParseStatus;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):H.util.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let s=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.bigint,received:s.parsedType}),F.INVALID}gte(t,s){return this.setLimit("min",t,!0,Q.errorUtil.toString(s))}gt(t,s){return this.setLimit("min",t,!1,Q.errorUtil.toString(s))}lte(t,s){return this.setLimit("max",t,!0,Q.errorUtil.toString(s))}lt(t,s){return this.setLimit("max",t,!1,Q.errorUtil.toString(s))}setLimit(t,s,n,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:n,message:Q.errorUtil.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.errorUtil.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:Q.errorUtil.toString(s)})}get minValue(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}};R.ZodBigInt=Js;Js.create=e=>new Js({checks:[],typeName:oe.ZodBigInt,coerce:e?.coerce??!1,...me(e)});var Qs=class extends fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==H.ZodParsedType.boolean){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.boolean,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodBoolean=Qs;Qs.create=e=>new Qs({typeName:oe.ZodBoolean,coerce:e?.coerce||!1,...me(e)});var Xs=class e extends fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==H.ZodParsedType.date){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.date,received:i.parsedType}),F.INVALID}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_date}),F.INVALID}let n=new F.ParseStatus,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):H.util.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,s){return this._addCheck({kind:"min",value:t.getTime(),message:Q.errorUtil.toString(s)})}max(t,s){return this._addCheck({kind:"max",value:t.getTime(),message:Q.errorUtil.toString(s)})}get minDate(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t!=null?new Date(t):null}};R.ZodDate=Xs;Xs.create=e=>new Xs({checks:[],coerce:e?.coerce||!1,typeName:oe.ZodDate,...me(e)});var Gn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.symbol){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.symbol,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodSymbol=Gn;Gn.create=e=>new Gn({typeName:oe.ZodSymbol,...me(e)});var en=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.undefined,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodUndefined=en;en.create=e=>new en({typeName:oe.ZodUndefined,...me(e)});var tn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.null){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.null,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodNull=tn;tn.create=e=>new tn({typeName:oe.ZodNull,...me(e)});var Rs=class extends fe{constructor(){super(...arguments),this._any=!0}_parse(t){return(0,F.OK)(t.data)}};R.ZodAny=Rs;Rs.create=e=>new Rs({typeName:oe.ZodAny,...me(e)});var ms=class extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return(0,F.OK)(t.data)}};R.ZodUnknown=ms;ms.create=e=>new ms({typeName:oe.ZodUnknown,...me(e)});var qt=class extends fe{_parse(t){let s=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.never,received:s.parsedType}),F.INVALID}};R.ZodNever=qt;qt.create=e=>new qt({typeName:oe.ZodNever,...me(e)});var Hn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.void,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodVoid=Hn;Hn.create=e=>new Hn({typeName:oe.ZodVoid,...me(e)});var fs=class e extends fe{_parse(t){let{ctx:s,status:n}=this._processInputParams(t),r=this._def;if(s.parsedType!==H.ZodParsedType.array)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.array,received:s.parsedType}),F.INVALID;if(r.exactLength!==null){let o=s.data.length>r.exactLength.value,a=s.data.length<r.exactLength.value;(o||a)&&((0,F.addIssueToContext)(s,{code:o?$.ZodIssueCode.too_big:$.ZodIssueCode.too_small,minimum:a?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&s.data.length<r.minLength.value&&((0,F.addIssueToContext)(s,{code:$.ZodIssueCode.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&s.data.length>r.maxLength.value&&((0,F.addIssueToContext)(s,{code:$.ZodIssueCode.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),s.common.async)return Promise.all([...s.data].map((o,a)=>r.type._parseAsync(new Ot(s,o,s.path,a)))).then(o=>F.ParseStatus.mergeArray(n,o));let i=[...s.data].map((o,a)=>r.type._parseSync(new Ot(s,o,s.path,a)));return F.ParseStatus.mergeArray(n,i)}get element(){return this._def.type}min(t,s){return new e({...this._def,minLength:{value:t,message:Q.errorUtil.toString(s)}})}max(t,s){return new e({...this._def,maxLength:{value:t,message:Q.errorUtil.toString(s)}})}length(t,s){return new e({...this._def,exactLength:{value:t,message:Q.errorUtil.toString(s)}})}nonempty(t){return this.min(1,t)}};R.ZodArray=fs;fs.create=(e,t)=>new fs({type:e,minLength:null,maxLength:null,exactLength:null,typeName:oe.ZodArray,...me(t)});function $n(e){if(e instanceof yt){let t={};for(let s in e.shape){let n=e.shape[s];t[s]=_t.create($n(n))}return new yt({...e._def,shape:()=>t})}else return e instanceof fs?new fs({...e._def,type:$n(e.element)}):e instanceof _t?_t.create($n(e.unwrap())):e instanceof rs?rs.create($n(e.unwrap())):e instanceof ns?ns.create(e.items.map(t=>$n(t))):e}var yt=class e extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),s=H.util.objectKeys(t);return this._cached={shape:t,keys:s},this._cached}_parse(t){if(this._getType(t)!==H.ZodParsedType.object){let c=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(c,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.object,received:c.parsedType}),F.INVALID}let{status:n,ctx:r}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof qt&&this._def.unknownKeys==="strip"))for(let c in r.data)o.includes(c)||a.push(c);let u=[];for(let c of o){let l=i[c],p=r.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Ot(r,p,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof qt){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)u.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(c==="strict")a.length>0&&((0,F.addIssueToContext)(r,{code:$.ZodIssueCode.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let p=r.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Ot(r,p,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let p=await l.key,d=await l.value;c.push({key:p,value:d,alwaysSet:l.alwaysSet})}return c}).then(c=>F.ParseStatus.mergeObjectSync(n,c)):F.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return Q.errorUtil.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(s,n)=>{let r=this._def.errorMap?.(s,n).message??n.defaultError;return s.code==="unrecognized_keys"?{message:Q.errorUtil.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:oe.ZodObject})}setKey(t,s){return this.augment({[t]:s})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let s={};for(let n of H.util.objectKeys(t))t[n]&&this.shape[n]&&(s[n]=this.shape[n]);return new e({...this._def,shape:()=>s})}omit(t){let s={};for(let n of H.util.objectKeys(this.shape))t[n]||(s[n]=this.shape[n]);return new e({...this._def,shape:()=>s})}deepPartial(){return $n(this)}partial(t){let s={};for(let n of H.util.objectKeys(this.shape)){let r=this.shape[n];t&&!t[n]?s[n]=r:s[n]=r.optional()}return new e({...this._def,shape:()=>s})}required(t){let s={};for(let n of H.util.objectKeys(this.shape))if(t&&!t[n])s[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof _t;)i=i._def.innerType;s[n]=i}return new e({...this._def,shape:()=>s})}keyof(){return dy(H.util.objectKeys(this.shape))}};R.ZodObject=yt;yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:qt.create(),typeName:oe.ZodObject,...me(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:qt.create(),typeName:oe.ZodObject,...me(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:qt.create(),typeName:oe.ZodObject,...me(t)});var sn=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n=this._def.options;function r(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return s.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new $.ZodError(a.ctx.common.issues));return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_union,unionErrors:o}),F.INVALID}if(s.common.async)return Promise.all(n.map(async i=>{let o={...s,common:{...s.common,issues:[]},parent:null};return{result:await i._parseAsync({data:s.data,path:s.path,parent:o}),ctx:o}})).then(r);{let i,o=[];for(let u of n){let c={...s,common:{...s.common,issues:[]},parent:null},l=u._parseSync({data:s.data,path:s.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return s.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(u=>new $.ZodError(u));return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_union,unionErrors:a}),F.INVALID}}get options(){return this._def.options}};R.ZodUnion=sn;sn.create=(e,t)=>new sn({options:e,typeName:oe.ZodUnion,...me(t)});var ds=e=>e instanceof rn?ds(e.schema):e instanceof At?ds(e.innerType()):e instanceof on?[e.value]:e instanceof an?e.options:e instanceof cn?H.util.objectValues(e.enum):e instanceof un?ds(e._def.innerType):e instanceof en?[void 0]:e instanceof tn?[null]:e instanceof _t?[void 0,...ds(e.unwrap())]:e instanceof rs?[null,...ds(e.unwrap())]:e instanceof qr||e instanceof pn?ds(e.unwrap()):e instanceof ln?ds(e._def.innerType):[],fo=class e extends fe{_parse(t){let{ctx:s}=this._processInputParams(t);if(s.parsedType!==H.ZodParsedType.object)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.object,received:s.parsedType}),F.INVALID;let n=this.discriminator,r=s.data[n],i=this.optionsMap.get(r);return i?s.common.async?i._parseAsync({data:s.data,path:s.path,parent:s}):i._parseSync({data:s.data,path:s.path,parent:s}):((0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),F.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,s,n){let r=new Map;for(let i of s){let o=ds(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(r.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);r.set(a,i)}}return new e({typeName:oe.ZodDiscriminatedUnion,discriminator:t,options:s,optionsMap:r,...me(n)})}};R.ZodDiscriminatedUnion=fo;function ru(e,t){let s=(0,H.getParsedType)(e),n=(0,H.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(s===H.ZodParsedType.object&&n===H.ZodParsedType.object){let r=H.util.objectKeys(t),i=H.util.objectKeys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...t};for(let a of i){let u=ru(e[a],t[a]);if(!u.valid)return{valid:!1};o[a]=u.data}return{valid:!0,data:o}}else if(s===H.ZodParsedType.array&&n===H.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],u=ru(o,a);if(!u.valid)return{valid:!1};r.push(u.data)}return{valid:!0,data:r}}else return s===H.ZodParsedType.date&&n===H.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var nn=class extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t),r=(i,o)=>{if((0,F.isAborted)(i)||(0,F.isAborted)(o))return F.INVALID;let a=ru(i.value,o.value);return a.valid?(((0,F.isDirty)(i)||(0,F.isDirty)(o))&&s.dirty(),{status:s.value,value:a.data}):((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_intersection_types}),F.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};R.ZodIntersection=nn;nn.create=(e,t,s)=>new nn({left:e,right:t,typeName:oe.ZodIntersection,...me(s)});var ns=class e extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.array)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.array,received:n.parsedType}),F.INVALID;if(n.data.length<this._def.items.length)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());let i=[...n.data].map((o,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new Ot(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>F.ParseStatus.mergeArray(s,o)):F.ParseStatus.mergeArray(s,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};R.ZodTuple=ns;ns.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ns({items:e,typeName:oe.ZodTuple,rest:null,...me(t)})};var go=class e extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.object)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.object,received:n.parsedType}),F.INVALID;let r=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)r.push({key:i._parse(new Ot(n,a,n.path,a)),value:o._parse(new Ot(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?F.ParseStatus.mergeObjectAsync(s,r):F.ParseStatus.mergeObjectSync(s,r)}get element(){return this._def.valueType}static create(t,s,n){return s instanceof fe?new e({keyType:t,valueType:s,typeName:oe.ZodRecord,...me(n)}):new e({keyType:Es.create(),valueType:t,typeName:oe.ZodRecord,...me(s)})}};R.ZodRecord=go;var zn=class extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.map)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.map,received:n.parsedType}),F.INVALID;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,u],c)=>({key:r._parse(new Ot(n,a,n.path,[c,"key"])),value:i._parse(new Ot(n,u,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of o){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return F.INVALID;(c.status==="dirty"||l.status==="dirty")&&s.dirty(),a.set(c.value,l.value)}return{status:s.value,value:a}})}else{let a=new Map;for(let u of o){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return F.INVALID;(c.status==="dirty"||l.status==="dirty")&&s.dirty(),a.set(c.value,l.value)}return{status:s.value,value:a}}}};R.ZodMap=zn;zn.create=(e,t,s)=>new zn({valueType:t,keyType:e,typeName:oe.ZodMap,...me(s)});var qn=class e extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.set)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.set,received:n.parsedType}),F.INVALID;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),s.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),s.dirty());let i=this._def.valueType;function o(u){let c=new Set;for(let l of u){if(l.status==="aborted")return F.INVALID;l.status==="dirty"&&s.dirty(),c.add(l.value)}return{status:s.value,value:c}}let a=[...n.data.values()].map((u,c)=>i._parse(new Ot(n,u,n.path,c)));return n.common.async?Promise.all(a).then(u=>o(u)):o(a)}min(t,s){return new e({...this._def,minSize:{value:t,message:Q.errorUtil.toString(s)}})}max(t,s){return new e({...this._def,maxSize:{value:t,message:Q.errorUtil.toString(s)}})}size(t,s){return this.min(t,s).max(t,s)}nonempty(t){return this.min(1,t)}};R.ZodSet=qn;qn.create=(e,t)=>new qn({valueType:e,minSize:null,maxSize:null,typeName:oe.ZodSet,...me(t)});var ho=class e extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:s}=this._processInputParams(t);if(s.parsedType!==H.ZodParsedType.function)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.function,received:s.parsedType}),F.INVALID;function n(a,u){return(0,F.makeIssue)({data:a,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,(0,mo.getErrorMap)(),mo.defaultErrorMap].filter(c=>!!c),issueData:{code:$.ZodIssueCode.invalid_arguments,argumentsError:u}})}function r(a,u){return(0,F.makeIssue)({data:a,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,(0,mo.getErrorMap)(),mo.defaultErrorMap].filter(c=>!!c),issueData:{code:$.ZodIssueCode.invalid_return_type,returnTypeError:u}})}let i={errorMap:s.common.contextualErrorMap},o=s.data;if(this._def.returns instanceof Fs){let a=this;return(0,F.OK)(async function(...u){let c=new $.ZodError([]),l=await a._def.args.parseAsync(u,i).catch(m=>{throw c.addIssue(n(u,m)),c}),p=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(p,i).catch(m=>{throw c.addIssue(r(p,m)),c})})}else{let a=this;return(0,F.OK)(function(...u){let c=a._def.args.safeParse(u,i);if(!c.success)throw new $.ZodError([n(u,c.error)]);let l=Reflect.apply(o,this,c.data),p=a._def.returns.safeParse(l,i);if(!p.success)throw new $.ZodError([r(l,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ns.create(t).rest(ms.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,s,n){return new e({args:t||ns.create([]).rest(ms.create()),returns:s||ms.create(),typeName:oe.ZodFunction,...me(n)})}};R.ZodFunction=ho;var rn=class extends fe{get schema(){return this._def.getter()}_parse(t){let{ctx:s}=this._processInputParams(t);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}};R.ZodLazy=rn;rn.create=(e,t)=>new rn({getter:e,typeName:oe.ZodLazy,...me(t)});var on=class extends fe{_parse(t){if(t.data!==this._def.value){let s=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(s,{received:s.data,code:$.ZodIssueCode.invalid_literal,expected:this._def.value}),F.INVALID}return{status:"valid",value:t.data}}get value(){return this._def.value}};R.ZodLiteral=on;on.create=(e,t)=>new on({value:e,typeName:oe.ZodLiteral,...me(t)});function dy(e,t){return new an({values:e,typeName:oe.ZodEnum,...me(t)})}var an=class e extends fe{_parse(t){if(typeof t.data!="string"){let s=this._getOrReturnCtx(t),n=this._def.values;return(0,F.addIssueToContext)(s,{expected:H.util.joinValues(n),received:s.parsedType,code:$.ZodIssueCode.invalid_type}),F.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let s=this._getOrReturnCtx(t),n=this._def.values;return(0,F.addIssueToContext)(s,{received:s.data,code:$.ZodIssueCode.invalid_enum_value,options:n}),F.INVALID}return(0,F.OK)(t.data)}get options(){return this._def.values}get enum(){let t={};for(let s of this._def.values)t[s]=s;return t}get Values(){let t={};for(let s of this._def.values)t[s]=s;return t}get Enum(){let t={};for(let s of this._def.values)t[s]=s;return t}extract(t,s=this._def){return e.create(t,{...this._def,...s})}exclude(t,s=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...s})}};R.ZodEnum=an;an.create=dy;var cn=class extends fe{_parse(t){let s=H.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==H.ZodParsedType.string&&n.parsedType!==H.ZodParsedType.number){let r=H.util.objectValues(s);return(0,F.addIssueToContext)(n,{expected:H.util.joinValues(r),received:n.parsedType,code:$.ZodIssueCode.invalid_type}),F.INVALID}if(this._cache||(this._cache=new Set(H.util.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=H.util.objectValues(s);return(0,F.addIssueToContext)(n,{received:n.data,code:$.ZodIssueCode.invalid_enum_value,options:r}),F.INVALID}return(0,F.OK)(t.data)}get enum(){return this._def.values}};R.ZodNativeEnum=cn;cn.create=(e,t)=>new cn({values:e,typeName:oe.ZodNativeEnum,...me(t)});var Fs=class extends fe{unwrap(){return this._def.type}_parse(t){let{ctx:s}=this._processInputParams(t);if(s.parsedType!==H.ZodParsedType.promise&&s.common.async===!1)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.promise,received:s.parsedType}),F.INVALID;let n=s.parsedType===H.ZodParsedType.promise?s.data:Promise.resolve(s.data);return(0,F.OK)(n.then(r=>this._def.type.parseAsync(r,{path:s.path,errorMap:s.common.contextualErrorMap})))}};R.ZodPromise=Fs;Fs.create=(e,t)=>new Fs({type:e,typeName:oe.ZodPromise,...me(t)});var At=class extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:s,ctx:n}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:o=>{(0,F.addIssueToContext)(n,o),o.fatal?s.abort():s.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let o=r.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(s.value==="aborted")return F.INVALID;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?F.INVALID:u.status==="dirty"||s.value==="dirty"?(0,F.DIRTY)(u.value):u});{if(s.value==="aborted")return F.INVALID;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?F.INVALID:a.status==="dirty"||s.value==="dirty"?(0,F.DIRTY)(a.value):a}}if(r.type==="refinement"){let o=a=>{let u=r.refinement(a,i);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?F.INVALID:(a.status==="dirty"&&s.dirty(),o(a.value),{status:s.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?F.INVALID:(a.status==="dirty"&&s.dirty(),o(a.value).then(()=>({status:s.value,value:a.value}))))}if(r.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,F.isValid)(o))return F.INVALID;let a=r.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>(0,F.isValid)(o)?Promise.resolve(r.transform(o.value,i)).then(a=>({status:s.value,value:a})):F.INVALID);H.util.assertNever(r)}};R.ZodEffects=At;R.ZodTransformer=At;At.create=(e,t,s)=>new At({schema:e,typeName:oe.ZodEffects,effect:t,...me(s)});At.createWithPreprocess=(e,t,s)=>new At({schema:t,effect:{type:"preprocess",transform:e},typeName:oe.ZodEffects,...me(s)});var _t=class extends fe{_parse(t){return this._getType(t)===H.ZodParsedType.undefined?(0,F.OK)(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};R.ZodOptional=_t;_t.create=(e,t)=>new _t({innerType:e,typeName:oe.ZodOptional,...me(t)});var rs=class extends fe{_parse(t){return this._getType(t)===H.ZodParsedType.null?(0,F.OK)(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};R.ZodNullable=rs;rs.create=(e,t)=>new rs({innerType:e,typeName:oe.ZodNullable,...me(t)});var un=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n=s.data;return s.parsedType===H.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:s.path,parent:s})}removeDefault(){return this._def.innerType}};R.ZodDefault=un;un.create=(e,t)=>new un({innerType:e,typeName:oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...me(t)});var ln=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n={...s,common:{...s.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,F.isAsync)(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new $.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};R.ZodCatch=ln;ln.create=(e,t)=>new ln({innerType:e,typeName:oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...me(t)});var Kn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.nan){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.nan,received:n.parsedType}),F.INVALID}return{status:"valid",value:t.data}}};R.ZodNaN=Kn;Kn.create=e=>new Kn({typeName:oe.ZodNaN,...me(e)});R.BRAND=Symbol("zod_brand");var qr=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n=s.data;return this._def.type._parse({data:n,path:s.path,parent:s})}unwrap(){return this._def.type}};R.ZodBranded=qr;var Kr=class e extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?F.INVALID:i.status==="dirty"?(s.dirty(),(0,F.DIRTY)(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let r=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return r.status==="aborted"?F.INVALID:r.status==="dirty"?(s.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:n.path,parent:n})}}static create(t,s){return new e({in:t,out:s,typeName:oe.ZodPipeline})}};R.ZodPipeline=Kr;var pn=class extends fe{_parse(t){let s=this._def.innerType._parse(t),n=r=>((0,F.isValid)(r)&&(r.value=Object.freeze(r.value)),r);return(0,F.isAsync)(s)?s.then(r=>n(r)):n(s)}unwrap(){return this._def.innerType}};R.ZodReadonly=pn;pn.create=(e,t)=>new pn({innerType:e,typeName:oe.ZodReadonly,...me(t)});function cy(e,t){let s=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof s=="string"?{message:s}:s}function my(e,t={},s){return e?Rs.create().superRefine((n,r)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=cy(t,n),u=a.fatal??s??!0;r.addIssue({code:"custom",...a,fatal:u})}});if(!i){let o=cy(t,n),a=o.fatal??s??!0;r.addIssue({code:"custom",...o,fatal:a})}}):Rs.create()}R.late={object:yt.lazycreate};var oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(oe||(R.ZodFirstPartyTypeKind=oe={}));var KF=(e,t={message:`Input not instance of ${e.name}`})=>my(s=>s instanceof e,t);R.instanceof=KF;var fy=Es.create;R.string=fy;var gy=Ys.create;R.number=gy;var VF=Kn.create;R.nan=VF;var ZF=Js.create;R.bigint=ZF;var hy=Qs.create;R.boolean=hy;var YF=Xs.create;R.date=YF;var JF=Gn.create;R.symbol=JF;var QF=en.create;R.undefined=QF;var XF=tn.create;R.null=XF;var eI=Rs.create;R.any=eI;var tI=ms.create;R.unknown=tI;var sI=qt.create;R.never=sI;var nI=Hn.create;R.void=nI;var rI=fs.create;R.array=rI;var iI=yt.create;R.object=iI;var oI=yt.strictCreate;R.strictObject=oI;var aI=sn.create;R.union=aI;var cI=fo.create;R.discriminatedUnion=cI;var uI=nn.create;R.intersection=uI;var lI=ns.create;R.tuple=lI;var pI=go.create;R.record=pI;var dI=zn.create;R.map=dI;var mI=qn.create;R.set=mI;var fI=ho.create;R.function=fI;var gI=rn.create;R.lazy=gI;var hI=on.create;R.literal=hI;var yI=an.create;R.enum=yI;var SI=cn.create;R.nativeEnum=SI;var bI=Fs.create;R.promise=bI;var yy=At.create;R.effect=yy;R.transformer=yy;var DI=_t.create;R.optional=DI;var vI=rs.create;R.nullable=vI;var CI=At.createWithPreprocess;R.preprocess=CI;var AI=Kr.create;R.pipeline=AI;var xI=()=>fy().optional();R.ostring=xI;var wI=()=>gy().optional();R.onumber=wI;var EI=()=>hy().optional();R.oboolean=EI;R.coerce={string:e=>Es.create({...e,coerce:!0}),number:e=>Ys.create({...e,coerce:!0}),boolean:e=>Qs.create({...e,coerce:!0}),bigint:e=>Js.create({...e,coerce:!0}),date:e=>Xs.create({...e,coerce:!0})};R.NEVER=F.INVALID});var iu=T(Bt=>{"use strict";var RI=Bt&&Bt.__createBinding||(Object.create?function(e,t,s,n){n===void 0&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){n===void 0&&(n=s),e[n]=t[s]}),Vn=Bt&&Bt.__exportStar||function(e,t){for(var s in e)s!=="default"&&!Object.prototype.hasOwnProperty.call(t,s)&&RI(t,e,s)};Object.defineProperty(Bt,"__esModule",{value:!0});Vn(lo(),Bt);Vn(su(),Bt);Vn(ry(),Bt);Vn(Hr(),Bt);Vn(Sy(),Bt);Vn(uo(),Bt)});var vy=T(St=>{"use strict";var by=St&&St.__createBinding||(Object.create?function(e,t,s,n){n===void 0&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){n===void 0&&(n=s),e[n]=t[s]}),FI=St&&St.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),II=St&&St.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&by(t,e,s);return FI(t,e),t},kI=St&&St.__exportStar||function(e,t){for(var s in e)s!=="default"&&!Object.prototype.hasOwnProperty.call(t,s)&&by(t,e,s)};Object.defineProperty(St,"__esModule",{value:!0});St.z=void 0;var Dy=II(iu());St.z=Dy;kI(iu(),St);St.default=Dy});var ou=T(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.getEnvironment=void 0;var gs=vy(),TI=gs.z.object({LOG_LEVEL:gs.z.enum(["DEBUG","INFO","WARN","ERROR","FATAL"]).optional(),STAGE:gs.z.enum(["dev","prod","test"]).default("dev"),SERVICE_NAME:gs.z.string().optional(),ENABLE_STRUCTURED_LOGGING:gs.z.string().transform(e=>e==="true").optional(),CLOUDWATCH_LOG_GROUP:gs.z.string().optional(),CLOUDWATCH_LOG_STREAM:gs.z.string().optional(),AWS_REGION:gs.z.string().optional()}),PI=(e=process.env)=>{let t;try{t=TI.parse(e)}catch(s){s instanceof gs.z.ZodError&&console.warn("Environment validation failed, using defaults:",s.errors),t={STAGE:"dev"}}return{...t,isProduction:t.STAGE==="prod",isDevelopment:t.STAGE==="dev",logLevel:t.LOG_LEVEL??void 0,serviceName:t.SERVICE_NAME??void 0,enableStructuredLogging:t.ENABLE_STRUCTURED_LOGGING??!0,stage:t.STAGE}};yo.getEnvironment=PI});var au=T(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.createLogFilter=is.createSampler=is.createRateLimiter=void 0;var LI=(e,t)=>{let s={tokens:t,lastRefill:Date.now(),maxTokens:t,refillRate:e},n=()=>{let i=Date.now(),a=(i-s.lastRefill)/1e3*s.refillRate;s.tokens=Math.min(s.maxTokens,s.tokens+a),s.lastRefill=i};return{tryConsume:(i=1)=>(n(),s.tokens>=i?(s.tokens-=i,!0):!1),getState:()=>({...s})}};is.createRateLimiter=LI;var _I=e=>{let t={totalLogs:0,sampledLogs:0};return{shouldSample:()=>(t.totalLogs++,e>=1?(t.sampledLogs++,!0):e<=0?!1:Math.random()<=e?(t.sampledLogs++,!0):!1),getStats:()=>({totalLogs:t.totalLogs,sampledLogs:t.sampledLogs,samplingRate:t.totalLogs>0?t.sampledLogs/t.totalLogs:0,configuredRate:e})}};is.createSampler=_I;var OI=e=>{let t=e.rateLimit?(0,is.createRateLimiter)(e.rateLimit.maxLogsPerSecond,e.rateLimit.burstSize):null,s=e.samplingRate!==void 0?(0,is.createSampler)(e.samplingRate):null;return{shouldLog:()=>!t&&!s?!0:!(t&&!t.tryConsume()||s&&!s.shouldSample()),getStats:()=>({rateLimit:t?.getState(),sampling:s?.getStats()})}};is.createLogFilter=OI});var cu=T(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.printLoggerConfig=Mt.createStrogger=Mt.strogger=Mt.createLogger=void 0;var BI=Vc(),MI=co(),_e=zt(),NI=Yc(),Cy=Jc(),WI=ou(),UI=au(),Ay=e=>{if(!e||typeof e!="object")return console.warn("[strogger] No environment provided, defaulting to DEBUG"),_e.LogLevel.DEBUG;switch(e.LOG_LEVEL?.toUpperCase()){case"DEBUG":return _e.LogLevel.DEBUG;case"INFO":return _e.LogLevel.INFO;case"WARN":return _e.LogLevel.WARN;case"ERROR":return _e.LogLevel.ERROR;case"FATAL":return _e.LogLevel.FATAL;case void 0:return e.STAGE==="prod"?_e.LogLevel.INFO:_e.LogLevel.DEBUG;default:return console.warn(`[strogger] Invalid LOG_LEVEL '${e.LOG_LEVEL}' provided. Defaulting to ${e.STAGE==="prod"?"INFO":"DEBUG"}.`),e.STAGE==="prod"?_e.LogLevel.INFO:_e.LogLevel.DEBUG}},jI=(e,t)=>e>=(t.level!==void 0?t.level:_e.LogLevel.INFO),$I=(e,t,s,n,r,i)=>({timestamp:new Date().toISOString(),level:t,message:s,context:{...e.stage&&{stage:e.stage},...e.serviceName&&{serviceName:e.serviceName},...n},error:r?{name:r.name,message:r.message,stack:r.stack}:void 0,metadata:i}),GI=({config:e={},transports:t=[],formatter:s,env:n})=>{let r=e.instanceId||(0,Cy.generateLoggerInstanceId)(),i={level:Ay(n),serviceName:n.SERVICE_NAME||void 0,stage:n.STAGE||"dev",enableStructuredLogging:n.ENABLE_STRUCTURED_LOGGING??!0,includeTimestamp:!0,includeLogLevel:!0,instanceId:r,...e};if(typeof i.level=="string")switch(i.level.toUpperCase()){case"DEBUG":i.level=_e.LogLevel.DEBUG;break;case"INFO":i.level=_e.LogLevel.INFO;break;case"WARN":i.level=_e.LogLevel.WARN;break;case"ERROR":i.level=_e.LogLevel.ERROR;break;case"FATAL":i.level=_e.LogLevel.FATAL;break;default:i.level=_e.LogLevel.INFO}e.level!==void 0&&(i.level=e.level);let o=(0,UI.createLogFilter)(i),a=(0,Cy.createDefaultEnrichmentMiddleware)(i.serviceName,i.stage,void 0,r),c=e.batching===!0?t.map(p=>(0,NI.createBatchedTransport)(p,{maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})):t,l=async(p,d,m,f,g)=>{if(!jI(p,i)||(i.samplingRate!==void 0||i.rateLimit)&&!o.shouldLog())return;let h=a(m||{}),y=$I(i,p,d,h,f,g),b=y;if(typeof i.redact=="function"&&(b=i.redact(y)),typeof i.validate=="function")try{i.validate(b)}catch(v){console.error("[LOGGER ERROR] Log entry validation failed:",v);return}if(Array.isArray(i.hooks))for(let v of i.hooks)try{let E=v(b);E&&typeof E.then=="function"&&await E}catch(E){console.error("[LOGGER ERROR] Log hook failed:",E)}let x=await Promise.allSettled(c.map(v=>v.log(b)));for(let v of x)v.status==="rejected"&&console.error(v.reason)};return{debug:(p,d,m)=>l(_e.LogLevel.DEBUG,p,d,void 0,m),info:(p,d,m)=>l(_e.LogLevel.INFO,p,d,void 0,m),warn:(p,d,m,f)=>l(_e.LogLevel.WARN,p,d,m,f),error:(p,d,m,f)=>l(_e.LogLevel.ERROR,p,d,m,f),fatal:(p,d,m,f)=>l(_e.LogLevel.FATAL,p,d,m,f),logFunctionStart:(p,d,m)=>l(_e.LogLevel.INFO,`Function ${p} started`,{...d,functionName:p},void 0,m),logFunctionEnd:(p,d,m,f)=>l(_e.LogLevel.INFO,`Function ${p} completed in ${d}ms`,{...m,functionName:p,duration:d},void 0,f),logDatabaseOperation:(p,d,m,f)=>l(_e.LogLevel.DEBUG,`Database operation: ${p} on table ${d}`,{...m,operation:p,table:d},void 0,f),logApiRequest:(p,d,m,f,g)=>l(_e.LogLevel.INFO,`API ${p} ${d} - ${m}`,{...f,method:p,path:d,statusCode:m},void 0,g),setLevel:p=>{i.level=p;for(let d of t)d.setLevel?.(p)},getLevel:()=>i.level!==void 0?i.level:_e.LogLevel.INFO,getInstanceId:()=>r,addTransport:p=>t.push(p),removeTransport:p=>{let d=t.indexOf(p);d>-1&&t.splice(d,1)},setFormatter:p=>{},getSamplingStats:()=>o.getStats(),flush:async()=>{await Promise.allSettled(c.map(p=>p.flush?.()||Promise.resolve()))},getBatchStats:()=>c.map(p=>p.getStats?.()||{})}};Mt.createLogger=GI;var HI=(0,WI.getEnvironment)(),xy=(0,BI.createJsonFormatter)(),zI=(0,MI.createConsoleTransport)({formatter:xy});Mt.strogger=(0,Mt.createLogger)({config:{},transports:[zI],formatter:xy,env:HI});Mt.createStrogger=Mt.createLogger;var qI=e=>{let t=Ay(e);console.log("--- Strogger Logger Configuration ---"),console.log("LOG_LEVEL:",e.LOG_LEVEL??"(default)"),console.log("STAGE:",e.STAGE??"dev"),console.log("SERVICE_NAME:",e.SERVICE_NAME??"(none)"),console.log("ENABLE_STRUCTURED_LOGGING:",e.ENABLE_STRUCTURED_LOGGING??!0),console.log("Effective log level:",t),console.log("--------------------------------------")};Mt.printLoggerConfig=qI});var ks=T(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.handleTransportError=ze.validateTransportConfig=ze.validateEnvironmentVariable=ze.createDetailedError=ze.ERROR_MESSAGES=ze.ValidationError=ze.ConfigurationError=ze.TransportError=ze.LoggerError=void 0;var Is=class extends Error{constructor(t,s,n){super(t),this.code=s,this.details=n,this.name="LoggerError"}};ze.LoggerError=Is;var dn=class extends Is{constructor(t,s,n){super(t,"TRANSPORT_ERROR",{transportName:s,...n}),this.transportName=s,this.name="TransportError"}};ze.TransportError=dn;var So=class extends Is{constructor(t,s){super(t,"CONFIGURATION_ERROR",s),this.name="ConfigurationError"}};ze.ConfigurationError=So;var uu=class extends Is{constructor(t,s){super(t,"VALIDATION_ERROR",s),this.name="ValidationError"}};ze.ValidationError=uu;ze.ERROR_MESSAGES={NEW_RELIC_MISSING_API_KEY:{message:"New Relic transport requires NEW_RELIC_LICENSE_KEY environment variable",solution:"Set NEW_RELIC_LICENSE_KEY in your environment variables or pass apiKey option",example:"NEW_RELIC_LICENSE_KEY=your-license-key-here"},NEW_RELIC_MISSING_ACCOUNT_ID:{message:"New Relic transport requires NEW_RELIC_ACCOUNT_ID environment variable",solution:"Set NEW_RELIC_ACCOUNT_ID in your environment variables or pass accountId option",example:"NEW_RELIC_ACCOUNT_ID=your-account-id-here"},NEW_RELIC_API_ERROR:{message:"Failed to send logs to New Relic API",solution:"Check your API key, account ID, and network connectivity"},DATADOG_MISSING_API_KEY:{message:"DataDog transport requires DATADOG_API_KEY environment variable",solution:"Set DATADOG_API_KEY in your environment variables",example:"DATADOG_API_KEY=your-api-key-here"},DATADOG_API_ERROR:{message:"Failed to send logs to DataDog API",solution:"Check your API key and network connectivity"},CLOUDWATCH_MISSING_CREDENTIALS:{message:"CloudWatch transport requires AWS credentials",solution:"Configure AWS credentials via environment variables, IAM role, or AWS credentials file",example:`AWS_ACCESS_KEY_ID=your-key
|
|
7
|
-
AWS_SECRET_ACCESS_KEY=your-secret`},CLOUDWATCH_MISSING_LOG_GROUP:{message:"CloudWatch transport requires logGroupName option",solution:"Provide logGroupName in transport options or set CLOUDWATCH_LOG_GROUP environment variable",example:'logGroupName: "/aws/lambda/my-function"'},CLOUDWATCH_LOG_GROUP_NOT_FOUND:{message:"CloudWatch log group does not exist",solution:"Create the log group in CloudWatch before using this transport",example:'aws logs create-log-group --log-group-name "/aws/lambda/my-function"'},CLOUDWATCH_API_ERROR:{message:"Failed to send logs to CloudWatch",solution:"Check your AWS credentials, region, and network connectivity"},TRANSPORT_INITIALIZATION_FAILED:{message:"Failed to initialize transport",solution:"Check transport configuration and required dependencies"},TRANSPORT_SEND_FAILED:{message:"Failed to send log entry to transport",solution:"Check transport configuration and network connectivity"},MISSING_SERVICE_NAME:{message:"Logger configuration requires serviceName",solution:"Set SERVICE_NAME environment variable or provide serviceName in config",example:"SERVICE_NAME=my-service"},INVALID_LOG_LEVEL:{message:"Invalid log level specified",solution:"Use one of: DEBUG, INFO, WARN, ERROR, FATAL",example:"LOG_LEVEL=INFO"},ENVIRONMENT_VALIDATION_FAILED:{message:"Environment configuration validation failed",solution:"Check your environment variables and configuration"},FORMATTER_MISSING:{message:"Logger requires a formatter",solution:"Provide a formatter object with a format(entry) method",example:"formatter: createJsonFormatter()"},PERFORMANCE_MONITOR_INITIALIZATION_FAILED:{message:"Failed to initialize performance monitor",solution:"Check performance monitor configuration"},SPLUNK_MISSING_HEC_URL:{message:"Splunk transport requires SPLUNK_HEC_URL environment variable",solution:"Set SPLUNK_HEC_URL in your environment variables",example:"SPLUNK_HEC_URL=https://your-splunk-instance:8088/services/collector"},SPLUNK_MISSING_HEC_TOKEN:{message:"Splunk transport requires SPLUNK_HEC_TOKEN environment variable",solution:"Set SPLUNK_HEC_TOKEN in your environment variables",example:"SPLUNK_HEC_TOKEN=your-hec-token-here"},SPLUNK_API_ERROR:{message:"Failed to send logs to Splunk HEC",solution:"Check your HEC URL, token, and network connectivity"},ELASTICSEARCH_MISSING_AUTH:{message:"Elasticsearch transport requires authentication",solution:"Set ELASTICSEARCH_API_KEY or ELASTICSEARCH_USERNAME/PASSWORD",example:"ELASTICSEARCH_API_KEY=your-api-key-here"},ELASTICSEARCH_MISSING_DATE:{message:"Date string is missing for Elasticsearch index pattern",solution:"Check date generation logic and ensure valid date string is produced"},ELASTICSEARCH_API_ERROR:{message:"Failed to send logs to Elasticsearch",solution:"Check your connection URL, authentication, and network connectivity"}};var
|
|
6
|
+
`).map(t=>t.trim()).join(" ")};Nm.O=function(e){return this.inspectOpts.colors=this.useColors,zi.inspect(e,this.inspectOpts)}});var Um=T((y3,fc)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?fc.exports=Pm():fc.exports=Wm()});var $m=T((S3,jm)=>{var Tr;jm.exports=function(){if(!Tr){try{Tr=Um()("follow-redirects")}catch{}typeof Tr!="function"&&(Tr=function(){})}Tr.apply(null,arguments)}});var Vm=T((b3,Ec)=>{var Lr=require("url"),Pr=Lr.URL,S0=require("http"),b0=require("https"),bc=require("stream").Writable,Dc=require("assert"),Gm=$m();(function(){var t=typeof process<"u",s=typeof window<"u"&&typeof document<"u",n=zs(Error.captureStackTrace);!t&&(s||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var vc=!1;try{Dc(new Pr(""))}catch(e){vc=e.code==="ERR_INVALID_URL"}var D0=["Authorization","Proxy-Authorization","Cookie"],v0=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Cc=["abort","aborted","connect","error","socket","timeout"],Ac=Object.create(null);Cc.forEach(function(e){Ac[e]=function(t,s,n){this._redirectable.emit(e,t,s,n)}});var hc=_r("ERR_INVALID_URL","Invalid URL",TypeError),yc=_r("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),C0=_r("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",yc),A0=_r("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),x0=_r("ERR_STREAM_WRITE_AFTER_END","write after end"),w0=bc.prototype.destroy||zm;function ht(e,t){bc.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var s=this;this._onNativeResponse=function(n){try{s._processResponse(n)}catch(r){s.emit("error",r instanceof yc?r:new yc({cause:r}))}},this._headerFilter=new RegExp("^(?:"+D0.concat(e.sensitiveHeaders).map(T0).join("|")+")$","i"),this._performRequest()}ht.prototype=Object.create(bc.prototype);ht.prototype.abort=function(){wc(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};ht.prototype.destroy=function(e){return wc(this._currentRequest,e),w0.call(this,e),this};ht.prototype.write=function(e,t,s){if(this._ending)throw new x0;if(!Hs(e)&&!I0(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(zs(t)&&(s=t,t=null),e.length===0){s&&s();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,s)):(this.emit("error",new A0),this.abort())};ht.prototype.end=function(e,t,s){if(zs(e)?(s=e,e=t=null):zs(t)&&(s=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,s);else{var n=this,r=this._currentRequest;this.write(e,t,function(){n._ended=!0,r.end(null,null,s)}),this._ending=!0}};ht.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};ht.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};ht.prototype.setTimeout=function(e,t){var s=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function r(o){s._timeout&&clearTimeout(s._timeout),s._timeout=setTimeout(function(){s.emit("timeout"),i()},e),n(o)}function i(){s._timeout&&(clearTimeout(s._timeout),s._timeout=null),s.removeListener("abort",i),s.removeListener("error",i),s.removeListener("response",i),s.removeListener("close",i),t&&s.removeListener("timeout",t),s.socket||s._currentRequest.removeListener("socket",r)}return t&&this.on("timeout",t),this.socket?r(this.socket):this._currentRequest.once("socket",r),this.on("socket",n),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){ht.prototype[e]=function(t,s){return this._currentRequest[e](t,s)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(ht.prototype,e,{get:function(){return this._currentRequest[e]}})});ht.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),F0(e.sensitiveHeaders)||(e.sensitiveHeaders=[]),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};ht.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var s=e.slice(0,-1);this._options.agent=this._options.agents[s]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var r of Cc)n.on(r,Ac[r]);if(this._currentUrl=/^\//.test(this._options.path)?Lr.format(this._options):this._options.path,this._isRedirect){var i=0,o=this,a=this._requestBodyBuffers;(function u(c){if(n===o._currentRequest)if(c)o.emit("error",c);else if(i<a.length){var l=a[i++];n.finished||n.write(l.data,l.encoding,u)}else o._ended&&n.end()})()}};ht.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var s=e.headers.location;if(!s||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(wc(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new C0;var n,r=this._options.beforeRedirect;r&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var i=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],gc(/^content-/i,this._options.headers));var o=gc(/^host$/i,this._options.headers),a=xc(this._currentUrl),u=o||a.host,c=/^\w+:/.test(s)?this._currentUrl:Lr.format(Object.assign(a,{host:u})),l=E0(s,c);if(Gm("redirecting to",l.href),this._isRedirect=!0,Sc(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==u&&!R0(l.host,u))&&gc(this._headerFilter,this._options.headers),zs(r)){var p={headers:e.headers,statusCode:t},d={url:c,method:i,headers:n};r(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function Hm(e){var t={maxRedirects:21,maxBodyLength:10485760},s={};return Object.keys(e).forEach(function(n){var r=n+":",i=s[r]=e[n],o=t[n]=Object.create(i);function a(c,l,p){return k0(c)?c=Sc(c):Hs(c)?c=Sc(xc(c)):(p=l,l=qm(c),c={protocol:r}),zs(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},c,l),l.nativeProtocols=s,!Hs(l.host)&&!Hs(l.hostname)&&(l.hostname="::1"),Dc.equal(l.protocol,r,"protocol mismatch"),Gm("options",l),new ht(l,p)}function u(c,l,p){var d=o.request(c,l,p);return d.end(),d}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:u,configurable:!0,enumerable:!0,writable:!0}})}),t}function zm(){}function xc(e){var t;if(vc)t=new Pr(e);else if(t=qm(Lr.parse(e)),!Hs(t.protocol))throw new hc({input:e});return t}function E0(e,t){return vc?new Pr(e,t):xc(Lr.resolve(t,e))}function qm(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new hc({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new hc({input:e.href||e});return e}function Sc(e,t){var s=t||{};for(var n of v0)s[n]=e[n];return s.hostname.startsWith("[")&&(s.hostname=s.hostname.slice(1,-1)),s.port!==""&&(s.port=Number(s.port)),s.path=s.search?s.pathname+s.search:s.pathname,s}function gc(e,t){var s;for(var n in t)e.test(n)&&(s=t[n],delete t[n]);return s===null||typeof s>"u"?void 0:String(s).trim()}function _r(e,t,s){function n(r){zs(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,r||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(s||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function wc(e,t){for(var s of Cc)e.removeListener(s,Ac[s]);e.on("error",zm),e.destroy(t)}function R0(e,t){Dc(Hs(e)&&Hs(t));var s=e.length-t.length-1;return s>0&&e[s]==="."&&e.endsWith(t)}function F0(e){return e instanceof Array}function Hs(e){return typeof e=="string"||e instanceof String}function zs(e){return typeof e=="function"}function I0(e){return typeof e=="object"&&"length"in e}function k0(e){return Pr&&e instanceof Pr}function T0(e){return e.replace(/[\]\\/()*+?.$]/g,"\\$&")}Ec.exports=Hm({http:S0,https:b0});Ec.exports.wrap=Hm});var Kc=T(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.createJsonFormatter=void 0;var zR=e=>{switch(e){case 0:return"DEBUG";case 1:return"INFO";case 2:return"WARN";case 3:return"ERROR";case 4:return"FATAL";default:return"UNKNOWN"}},qR=()=>({format:e=>JSON.stringify({timestamp:e.timestamp,level:zR(e.level),message:e.message,...e.context,...e.error&&{error:{name:e.error.name,message:e.error.message,stack:e.error.stack}},...e.metadata&&{metadata:e.metadata}})});io.createJsonFormatter=qR});var zt=T(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.LogLevel=void 0;var Jh;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.FATAL=4]="FATAL"})(Jh||(oo.LogLevel=Jh={}))});var ps=T(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.shouldLog=Un.BaseTransport=void 0;var VR=zt(),Zc=class{constructor(){this.level=VR.LogLevel.INFO}setLevel(t){this.level=t}getLevel(){return this.level}shouldLog(t){return t>=this.level}};Un.BaseTransport=Zc;var KR=(e,t)=>e>=t;Un.shouldLog=KR});var co=T(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});ao.createConsoleTransport=void 0;var jn=zt(),ZR=ps(),YR=(e={})=>{let t=e.level??jn.LogLevel.INFO,s=e.formatter||{format:n=>JSON.stringify(n)};return{log:n=>{if(!(0,ZR.shouldLog)(n.level,t))return;let r=s.format(n);switch(n.level){case jn.LogLevel.DEBUG:console.debug(r);break;case jn.LogLevel.INFO:console.info(r);break;case jn.LogLevel.WARN:console.warn(r);break;case jn.LogLevel.ERROR:case jn.LogLevel.FATAL:console.error(r);break}},setLevel:n=>{t=n},getLevel:()=>t}};ao.createConsoleTransport=YR});var Yc=T(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.createBatchedLogger=Ks.createBatchedTransport=void 0;var JR=(e,t={maxSize:100,maxWaitTime:5e3,maxBatchSize:1024*1024})=>{let s={logs:[],currentSize:0,lastFlush:Date.now()},n={totalLogs:0,totalBatches:0,averageBatchSize:0,lastFlushTime:0,pendingLogs:0},r=p=>p.reduce((d,m)=>d+JSON.stringify(m).length,0),i=async()=>{if(s.logs.length===0)return;let p=[...s.logs];s.logs=[],s.currentSize=0,s.lastFlush=Date.now(),s.flushTimer&&(clearTimeout(s.flushTimer),s.flushTimer=void 0);try{await Promise.allSettled(p.map(d=>e.log(d))),n.totalLogs+=p.length,n.totalBatches+=1,n.averageBatchSize=n.totalLogs/n.totalBatches,n.lastFlushTime=Date.now(),n.pendingLogs=s.logs.length}catch(d){console.error("Batch flush failed:",d),s.logs.unshift(...p),s.currentSize=r(s.logs)}},o=()=>{s.flushTimer||(s.flushTimer=setTimeout(()=>{i().catch(console.error)},t.maxWaitTime))};return{log:async p=>{let d=JSON.stringify(p).length;(s.logs.length>=t.maxSize||s.currentSize+d>=t.maxBatchSize)&&await i(),s.logs.push(p),s.currentSize+=d,n.pendingLogs=s.logs.length,s.logs.length===1&&o()},setLevel:p=>{e.setLevel(p)},getLevel:()=>e.getLevel(),flush:i,getStats:()=>({...n,pendingLogs:s.logs.length})}};Ks.createBatchedTransport=JR;var QR=(e,t={maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})=>{let s=e.map(u=>(0,Ks.createBatchedTransport)(u,t));return{log:async u=>{await Promise.allSettled(s.map(c=>c.log(u)))},setLevel:u=>{for(let c of s)c.setLevel(u)},getLevel:()=>Math.min(...s.map(u=>u.getLevel())),flush:async()=>{await Promise.allSettled(s.map(u=>u.flush()))},getStats:()=>s.map(u=>u.getStats())}};Ks.createBatchedLogger=QR});var Jc=T(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.createDefaultEnrichmentMiddleware=Ie.createEnrichmentMiddleware=Ie.createLoggerInstanceEnricher=Ie.createUserEnricher=Ie.createEnvironmentEnricher=Ie.createSessionEnricher=Ie.createCorrelationEnricher=Ie.generateLoggerInstanceId=Ie.generateSpanId=Ie.generateTraceId=Ie.generateCorrelationId=void 0;var XR=()=>`corr_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;Ie.generateCorrelationId=XR;var eF=()=>Math.random().toString(16).substr(2,32);Ie.generateTraceId=eF;var tF=()=>Math.random().toString(16).substr(2,16);Ie.generateSpanId=tF;var sF=()=>{let e=Date.now(),t=Math.random().toString(36).substr(2,9),s=process.pid||0;return`logger_${e}_${t}_${s}`};Ie.generateLoggerInstanceId=sF;var nF=()=>{let e,t,s;return{name:"correlation",enrich:n=>(n.correlationId||(e=e||(0,Ie.generateCorrelationId)(),n.correlationId=e),n.traceId||(t=t||(0,Ie.generateTraceId)(),n.traceId=t),n.spanId||(s=s||(0,Ie.generateSpanId)(),n.spanId=s),n)}};Ie.createCorrelationEnricher=nF;var rF=e=>{let t=e||`session_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;return{name:"session",enrich:s=>(s.sessionId||(s.sessionId=t),s)}};Ie.createSessionEnricher=rF;var iF=(e,t)=>({name:"environment",enrich:s=>(e&&!s.serviceName&&(s.serviceName=e),t&&!s.stage&&(s.stage=t),s)});Ie.createEnvironmentEnricher=iF;var oF=e=>({name:"user",enrich:t=>(e&&!t.userId&&(t.userId=e),t)});Ie.createUserEnricher=oF;var aF=e=>({name:"loggerInstance",enrich:t=>(t.instanceId||(t.instanceId=e),t)});Ie.createLoggerInstanceEnricher=aF;var cF=e=>t=>e.reduce((s,n)=>n.enrich(s),{...t});Ie.createEnrichmentMiddleware=cF;var uF=(e,t,s,n)=>{let r=[(0,Ie.createCorrelationEnricher)(),(0,Ie.createSessionEnricher)(s),(0,Ie.createEnvironmentEnricher)(e,t)];return n&&r.push((0,Ie.createLoggerInstanceEnricher)(n)),(0,Ie.createEnrichmentMiddleware)(r)};Ie.createDefaultEnrichmentMiddleware=uF});var Hr=T(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.getParsedType=Be.ZodParsedType=Be.objectUtil=Be.util=void 0;var Qc;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function s(r){throw new Error}e.assertNever=s,e.arrayToEnum=r=>{let i={};for(let o of r)i[o]=o;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(a=>typeof r[r[a]]!="number"),o={};for(let a of i)o[a]=r[a];return e.objectValues(o)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&i.push(o);return i},e.find=(r,i)=>{for(let o of r)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function n(r,i=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(Qc||(Be.util=Qc={}));var Qh;(function(e){e.mergeShapes=(t,s)=>({...t,...s})})(Qh||(Be.objectUtil=Qh={}));Be.ZodParsedType=Qc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var lF=e=>{switch(typeof e){case"undefined":return Be.ZodParsedType.undefined;case"string":return Be.ZodParsedType.string;case"number":return Number.isNaN(e)?Be.ZodParsedType.nan:Be.ZodParsedType.number;case"boolean":return Be.ZodParsedType.boolean;case"function":return Be.ZodParsedType.function;case"bigint":return Be.ZodParsedType.bigint;case"symbol":return Be.ZodParsedType.symbol;case"object":return Array.isArray(e)?Be.ZodParsedType.array:e===null?Be.ZodParsedType.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Be.ZodParsedType.promise:typeof Map<"u"&&e instanceof Map?Be.ZodParsedType.map:typeof Set<"u"&&e instanceof Set?Be.ZodParsedType.set:typeof Date<"u"&&e instanceof Date?Be.ZodParsedType.date:Be.ZodParsedType.object;default:return Be.ZodParsedType.unknown}};Be.getParsedType=lF});var uo=T(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.ZodError=xs.quotelessJson=xs.ZodIssueCode=void 0;var Xh=Hr();xs.ZodIssueCode=Xh.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var pF=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");xs.quotelessJson=pF;var zr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let s=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,s):this.__proto__=s,this.name="ZodError",this.issues=t}format(t){let s=t||function(i){return i.message},n={_errors:[]},r=i=>{for(let o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)n._errors.push(s(o));else{let a=n,u=0;for(;u<o.path.length;){let c=o.path[u];u===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(s(o))):a[c]=a[c]||{_errors:[]},a=a[c],u++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Xh.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=s=>s.message){let s={},n=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];s[i]=s[i]||[],s[i].push(t(r))}else n.push(t(r));return{formErrors:n,fieldErrors:s}}get formErrors(){return this.flatten()}};xs.ZodError=zr;zr.create=e=>new zr(e)});var eu=T(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});var at=uo(),Zs=Hr(),dF=(e,t)=>{let s;switch(e.code){case at.ZodIssueCode.invalid_type:e.received===Zs.ZodParsedType.undefined?s="Required":s=`Expected ${e.expected}, received ${e.received}`;break;case at.ZodIssueCode.invalid_literal:s=`Invalid literal value, expected ${JSON.stringify(e.expected,Zs.util.jsonStringifyReplacer)}`;break;case at.ZodIssueCode.unrecognized_keys:s=`Unrecognized key(s) in object: ${Zs.util.joinValues(e.keys,", ")}`;break;case at.ZodIssueCode.invalid_union:s="Invalid input";break;case at.ZodIssueCode.invalid_union_discriminator:s=`Invalid discriminator value. Expected ${Zs.util.joinValues(e.options)}`;break;case at.ZodIssueCode.invalid_enum_value:s=`Invalid enum value. Expected ${Zs.util.joinValues(e.options)}, received '${e.received}'`;break;case at.ZodIssueCode.invalid_arguments:s="Invalid function arguments";break;case at.ZodIssueCode.invalid_return_type:s="Invalid function return type";break;case at.ZodIssueCode.invalid_date:s="Invalid date";break;case at.ZodIssueCode.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(s=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(s=`${s} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?s=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?s=`Invalid input: must end with "${e.validation.endsWith}"`:Zs.util.assertNever(e.validation):e.validation!=="regex"?s=`Invalid ${e.validation}`:s="Invalid";break;case at.ZodIssueCode.too_small:e.type==="array"?s=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?s=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?s=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?s=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?s=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:s="Invalid input";break;case at.ZodIssueCode.too_big:e.type==="array"?s=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?s=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?s=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?s=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?s=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:s="Invalid input";break;case at.ZodIssueCode.custom:s="Invalid input";break;case at.ZodIssueCode.invalid_intersection_types:s="Intersection results could not be merged";break;case at.ZodIssueCode.not_multiple_of:s=`Number must be a multiple of ${e.multipleOf}`;break;case at.ZodIssueCode.not_finite:s="Number must be finite";break;default:s=t.defaultError,Zs.util.assertNever(e)}return{message:s}};Xc.default=dF});var lo=T(ws=>{"use strict";var mF=ws&&ws.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ws,"__esModule",{value:!0});ws.defaultErrorMap=void 0;ws.setErrorMap=fF;ws.getErrorMap=gF;var ey=mF(eu());ws.defaultErrorMap=ey.default;var ty=ey.default;function fF(e){ty=e}function gF(){return ty}});var su=T(Pe=>{"use strict";var hF=Pe&&Pe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.isAsync=Pe.isValid=Pe.isDirty=Pe.isAborted=Pe.OK=Pe.DIRTY=Pe.INVALID=Pe.ParseStatus=Pe.EMPTY_PATH=Pe.makeIssue=void 0;Pe.addIssueToContext=bF;var yF=lo(),sy=hF(eu()),SF=e=>{let{data:t,path:s,errorMaps:n,issueData:r}=e,i=[...s,...r.path||[]],o={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let a="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)a=c(o,{data:t,defaultError:a}).message;return{...r,path:i,message:a}};Pe.makeIssue=SF;Pe.EMPTY_PATH=[];function bF(e,t){let s=(0,yF.getErrorMap)(),n=(0,Pe.makeIssue)({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,s,s===sy.default?void 0:sy.default].filter(r=>!!r)});e.common.issues.push(n)}var tu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,s){let n=[];for(let r of s){if(r.status==="aborted")return Pe.INVALID;r.status==="dirty"&&t.dirty(),n.push(r.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,s){let n=[];for(let r of s){let i=await r.key,o=await r.value;n.push({key:i,value:o})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,s){let n={};for(let r of s){let{key:i,value:o}=r;if(i.status==="aborted"||o.status==="aborted")return Pe.INVALID;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||r.alwaysSet)&&(n[i.value]=o.value)}return{status:t.value,value:n}}};Pe.ParseStatus=tu;Pe.INVALID=Object.freeze({status:"aborted"});var DF=e=>({status:"dirty",value:e});Pe.DIRTY=DF;var vF=e=>({status:"valid",value:e});Pe.OK=vF;var CF=e=>e.status==="aborted";Pe.isAborted=CF;var AF=e=>e.status==="dirty";Pe.isDirty=AF;var xF=e=>e.status==="valid";Pe.isValid=xF;var wF=e=>typeof Promise<"u"&&e instanceof Promise;Pe.isAsync=wF});var ry=T(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0})});var oy=T(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.errorUtil=void 0;var iy;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(iy||(po.errorUtil=iy={}))});var Sy=T(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.discriminatedUnion=R.date=R.boolean=R.bigint=R.array=R.any=R.coerce=R.ZodFirstPartyTypeKind=R.late=R.ZodSchema=R.Schema=R.ZodReadonly=R.ZodPipeline=R.ZodBranded=R.BRAND=R.ZodNaN=R.ZodCatch=R.ZodDefault=R.ZodNullable=R.ZodOptional=R.ZodTransformer=R.ZodEffects=R.ZodPromise=R.ZodNativeEnum=R.ZodEnum=R.ZodLiteral=R.ZodLazy=R.ZodFunction=R.ZodSet=R.ZodMap=R.ZodRecord=R.ZodTuple=R.ZodIntersection=R.ZodDiscriminatedUnion=R.ZodUnion=R.ZodObject=R.ZodArray=R.ZodVoid=R.ZodNever=R.ZodUnknown=R.ZodAny=R.ZodNull=R.ZodUndefined=R.ZodSymbol=R.ZodDate=R.ZodBoolean=R.ZodBigInt=R.ZodNumber=R.ZodString=R.ZodType=void 0;R.NEVER=R.void=R.unknown=R.union=R.undefined=R.tuple=R.transformer=R.symbol=R.string=R.strictObject=R.set=R.record=R.promise=R.preprocess=R.pipeline=R.ostring=R.optional=R.onumber=R.oboolean=R.object=R.number=R.nullable=R.null=R.never=R.nativeEnum=R.nan=R.map=R.literal=R.lazy=R.intersection=R.instanceof=R.function=R.enum=R.effect=void 0;R.datetimeRegex=py;R.custom=my;var $=uo(),mo=lo(),Q=oy(),F=su(),H=Hr(),Ot=class{constructor(t,s,n,r){this._cachedPath=[],this.parent=t,this.data=s,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ay=(e,t)=>{if((0,F.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let s=new $.ZodError(e.common.issues);return this._error=s,this._error}}};function me(e){if(!e)return{};let{errorMap:t,invalid_type_error:s,required_error:n,description:r}=e;if(t&&(s||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(o,a)=>{let{message:u}=e;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:u??n??a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:u??s??a.defaultError}},description:r}}var fe=class{get description(){return this._def.description}_getType(t){return(0,H.getParsedType)(t.data)}_getOrReturnCtx(t,s){return s||{common:t.parent.common,data:t.data,parsedType:(0,H.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new F.ParseStatus,ctx:{common:t.parent.common,data:t.data,parsedType:(0,H.getParsedType)(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let s=this._parse(t);if((0,F.isAsync)(s))throw new Error("Synchronous parse encountered promise.");return s}_parseAsync(t){let s=this._parse(t);return Promise.resolve(s)}parse(t,s){let n=this.safeParse(t,s);if(n.success)return n.data;throw n.error}safeParse(t,s){let n={common:{issues:[],async:s?.async??!1,contextualErrorMap:s?.errorMap},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,H.getParsedType)(t)},r=this._parseSync({data:t,path:n.path,parent:n});return ay(n,r)}"~validate"(t){let s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,H.getParsedType)(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:s});return(0,F.isValid)(n)?{value:n.value}:{issues:s.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(n=>(0,F.isValid)(n)?{value:n.value}:{issues:s.common.issues})}async parseAsync(t,s){let n=await this.safeParseAsync(t,s);if(n.success)return n.data;throw n.error}async safeParseAsync(t,s){let n={common:{issues:[],contextualErrorMap:s?.errorMap,async:!0},path:s?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:(0,H.getParsedType)(t)},r=this._parse({data:t,path:n.path,parent:n}),i=await((0,F.isAsync)(r)?r:Promise.resolve(r));return ay(n,i)}refine(t,s){let n=r=>typeof s=="string"||typeof s>"u"?{message:s}:typeof s=="function"?s(r):s;return this._refinement((r,i)=>{let o=t(r),a=()=>i.addIssue({code:$.ZodIssueCode.custom,...n(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,s){return this._refinement((n,r)=>t(n)?!0:(r.addIssue(typeof s=="function"?s(n,r):s),!1))}_refinement(t){return new At({schema:this,typeName:oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:s=>this["~validate"](s)}}optional(){return _t.create(this,this._def)}nullable(){return rs.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fs.create(this)}promise(){return Fs.create(this,this._def)}or(t){return sn.create([this,t],this._def)}and(t){return nn.create(this,t,this._def)}transform(t){return new At({...me(this._def),schema:this,typeName:oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let s=typeof t=="function"?t:()=>t;return new un({...me(this._def),innerType:this,defaultValue:s,typeName:oe.ZodDefault})}brand(){return new qr({typeName:oe.ZodBranded,type:this,...me(this._def)})}catch(t){let s=typeof t=="function"?t:()=>t;return new ln({...me(this._def),innerType:this,catchValue:s,typeName:oe.ZodCatch})}describe(t){let s=this.constructor;return new s({...this._def,description:t})}pipe(t){return Vr.create(this,t)}readonly(){return pn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};R.ZodType=fe;R.Schema=fe;R.ZodSchema=fe;var EF=/^c[^\s-]{8,}$/i,RF=/^[0-9a-z]+$/,FF=/^[0-9A-HJKMNP-TV-Z]{26}$/i,IF=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kF=/^[a-z0-9_-]{21}$/i,TF=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,PF=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,LF=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_F="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",nu,OF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,BF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,MF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,NF=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,WF=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,UF=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,uy="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",jF=new RegExp(`^${uy}$`);function ly(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let s=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${s}`}function $F(e){return new RegExp(`^${ly(e)}$`)}function py(e){let t=`${uy}T${ly(e)}`,s=[];return s.push(e.local?"Z?":"Z"),e.offset&&s.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${s.join("|")})`,new RegExp(`^${t}$`)}function GF(e,t){return!!((t==="v4"||!t)&&OF.test(e)||(t==="v6"||!t)&&MF.test(e))}function HF(e,t){if(!TF.test(e))return!1;try{let[s]=e.split(".");if(!s)return!1;let n=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),r=JSON.parse(atob(n));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function zF(e,t){return!!((t==="v4"||!t)&&BF.test(e)||(t==="v6"||!t)&&NF.test(e))}var Es=class e extends fe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==H.ZodParsedType.string){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.string,received:i.parsedType}),F.INVALID}let n=new F.ParseStatus,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(r=this._getOrReturnCtx(t,r),o?(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")LF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"email",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")nu||(nu=new RegExp(_F,"u")),nu.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"emoji",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")IF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"uuid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")kF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"nanoid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")EF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"cuid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")RF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"cuid2",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")FF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"ulid",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"url",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"regex",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?py(i).test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?jF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?$F(i).test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?PF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"duration",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?GF(t.data,i.version)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"ip",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?HF(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"jwt",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?zF(t.data,i.version)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"cidr",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?WF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"base64",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?UF.test(t.data)||(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{validation:"base64url",code:$.ZodIssueCode.invalid_string,message:i.message}),n.dirty()):H.util.assertNever(i);return{status:n.value,value:t.data}}_regex(t,s,n){return this.refinement(r=>t.test(r),{validation:s,code:$.ZodIssueCode.invalid_string,...Q.errorUtil.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Q.errorUtil.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Q.errorUtil.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Q.errorUtil.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Q.errorUtil.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Q.errorUtil.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Q.errorUtil.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Q.errorUtil.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Q.errorUtil.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Q.errorUtil.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Q.errorUtil.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Q.errorUtil.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Q.errorUtil.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Q.errorUtil.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Q.errorUtil.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Q.errorUtil.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Q.errorUtil.errToObj(t)})}regex(t,s){return this._addCheck({kind:"regex",regex:t,...Q.errorUtil.errToObj(s)})}includes(t,s){return this._addCheck({kind:"includes",value:t,position:s?.position,...Q.errorUtil.errToObj(s?.message)})}startsWith(t,s){return this._addCheck({kind:"startsWith",value:t,...Q.errorUtil.errToObj(s)})}endsWith(t,s){return this._addCheck({kind:"endsWith",value:t,...Q.errorUtil.errToObj(s)})}min(t,s){return this._addCheck({kind:"min",value:t,...Q.errorUtil.errToObj(s)})}max(t,s){return this._addCheck({kind:"max",value:t,...Q.errorUtil.errToObj(s)})}length(t,s){return this._addCheck({kind:"length",value:t,...Q.errorUtil.errToObj(s)})}nonempty(t){return this.min(1,Q.errorUtil.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxLength(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}};R.ZodString=Es;Es.create=e=>new Es({checks:[],typeName:oe.ZodString,coerce:e?.coerce??!1,...me(e)});function qF(e,t){let s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=s>n?s:n,i=Number.parseInt(e.toFixed(r).replace(".","")),o=Number.parseInt(t.toFixed(r).replace(".",""));return i%o/10**r}var Ys=class e extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==H.ZodParsedType.number){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.number,received:i.parsedType}),F.INVALID}let n,r=new F.ParseStatus;for(let i of this._def.checks)i.kind==="int"?H.util.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?qF(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.not_finite,message:i.message}),r.dirty()):H.util.assertNever(i);return{status:r.value,value:t.data}}gte(t,s){return this.setLimit("min",t,!0,Q.errorUtil.toString(s))}gt(t,s){return this.setLimit("min",t,!1,Q.errorUtil.toString(s))}lte(t,s){return this.setLimit("max",t,!0,Q.errorUtil.toString(s))}lt(t,s){return this.setLimit("max",t,!1,Q.errorUtil.toString(s))}setLimit(t,s,n,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:n,message:Q.errorUtil.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Q.errorUtil.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.errorUtil.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:Q.errorUtil.toString(s)})}finite(t){return this._addCheck({kind:"finite",message:Q.errorUtil.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.errorUtil.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.errorUtil.toString(t)})}get minValue(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&H.util.isInteger(t.value))}get isFinite(){let t=null,s=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(s===null||n.value>s)&&(s=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(s)&&Number.isFinite(t)}};R.ZodNumber=Ys;Ys.create=e=>new Ys({checks:[],typeName:oe.ZodNumber,coerce:e?.coerce||!1,...me(e)});var Js=class e extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==H.ZodParsedType.bigint)return this._getInvalidInput(t);let n,r=new F.ParseStatus;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):H.util.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let s=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.bigint,received:s.parsedType}),F.INVALID}gte(t,s){return this.setLimit("min",t,!0,Q.errorUtil.toString(s))}gt(t,s){return this.setLimit("min",t,!1,Q.errorUtil.toString(s))}lte(t,s){return this.setLimit("max",t,!0,Q.errorUtil.toString(s))}lt(t,s){return this.setLimit("max",t,!1,Q.errorUtil.toString(s))}setLimit(t,s,n,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:s,inclusive:n,message:Q.errorUtil.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.errorUtil.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.errorUtil.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.errorUtil.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.errorUtil.toString(t)})}multipleOf(t,s){return this._addCheck({kind:"multipleOf",value:t,message:Q.errorUtil.toString(s)})}get minValue(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t}get maxValue(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t}};R.ZodBigInt=Js;Js.create=e=>new Js({checks:[],typeName:oe.ZodBigInt,coerce:e?.coerce??!1,...me(e)});var Qs=class extends fe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==H.ZodParsedType.boolean){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.boolean,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodBoolean=Qs;Qs.create=e=>new Qs({typeName:oe.ZodBoolean,coerce:e?.coerce||!1,...me(e)});var Xs=class e extends fe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==H.ZodParsedType.date){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.date,received:i.parsedType}),F.INVALID}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(i,{code:$.ZodIssueCode.invalid_date}),F.INVALID}let n=new F.ParseStatus,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),(0,F.addIssueToContext)(r,{code:$.ZodIssueCode.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):H.util.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,s){return this._addCheck({kind:"min",value:t.getTime(),message:Q.errorUtil.toString(s)})}max(t,s){return this._addCheck({kind:"max",value:t.getTime(),message:Q.errorUtil.toString(s)})}get minDate(){let t=null;for(let s of this._def.checks)s.kind==="min"&&(t===null||s.value>t)&&(t=s.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let s of this._def.checks)s.kind==="max"&&(t===null||s.value<t)&&(t=s.value);return t!=null?new Date(t):null}};R.ZodDate=Xs;Xs.create=e=>new Xs({checks:[],coerce:e?.coerce||!1,typeName:oe.ZodDate,...me(e)});var Gn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.symbol){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.symbol,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodSymbol=Gn;Gn.create=e=>new Gn({typeName:oe.ZodSymbol,...me(e)});var en=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.undefined,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodUndefined=en;en.create=e=>new en({typeName:oe.ZodUndefined,...me(e)});var tn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.null){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.null,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodNull=tn;tn.create=e=>new tn({typeName:oe.ZodNull,...me(e)});var Rs=class extends fe{constructor(){super(...arguments),this._any=!0}_parse(t){return(0,F.OK)(t.data)}};R.ZodAny=Rs;Rs.create=e=>new Rs({typeName:oe.ZodAny,...me(e)});var ms=class extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return(0,F.OK)(t.data)}};R.ZodUnknown=ms;ms.create=e=>new ms({typeName:oe.ZodUnknown,...me(e)});var qt=class extends fe{_parse(t){let s=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.never,received:s.parsedType}),F.INVALID}};R.ZodNever=qt;qt.create=e=>new qt({typeName:oe.ZodNever,...me(e)});var Hn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.undefined){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.void,received:n.parsedType}),F.INVALID}return(0,F.OK)(t.data)}};R.ZodVoid=Hn;Hn.create=e=>new Hn({typeName:oe.ZodVoid,...me(e)});var fs=class e extends fe{_parse(t){let{ctx:s,status:n}=this._processInputParams(t),r=this._def;if(s.parsedType!==H.ZodParsedType.array)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.array,received:s.parsedType}),F.INVALID;if(r.exactLength!==null){let o=s.data.length>r.exactLength.value,a=s.data.length<r.exactLength.value;(o||a)&&((0,F.addIssueToContext)(s,{code:o?$.ZodIssueCode.too_big:$.ZodIssueCode.too_small,minimum:a?r.exactLength.value:void 0,maximum:o?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&s.data.length<r.minLength.value&&((0,F.addIssueToContext)(s,{code:$.ZodIssueCode.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&s.data.length>r.maxLength.value&&((0,F.addIssueToContext)(s,{code:$.ZodIssueCode.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),s.common.async)return Promise.all([...s.data].map((o,a)=>r.type._parseAsync(new Ot(s,o,s.path,a)))).then(o=>F.ParseStatus.mergeArray(n,o));let i=[...s.data].map((o,a)=>r.type._parseSync(new Ot(s,o,s.path,a)));return F.ParseStatus.mergeArray(n,i)}get element(){return this._def.type}min(t,s){return new e({...this._def,minLength:{value:t,message:Q.errorUtil.toString(s)}})}max(t,s){return new e({...this._def,maxLength:{value:t,message:Q.errorUtil.toString(s)}})}length(t,s){return new e({...this._def,exactLength:{value:t,message:Q.errorUtil.toString(s)}})}nonempty(t){return this.min(1,t)}};R.ZodArray=fs;fs.create=(e,t)=>new fs({type:e,minLength:null,maxLength:null,exactLength:null,typeName:oe.ZodArray,...me(t)});function $n(e){if(e instanceof yt){let t={};for(let s in e.shape){let n=e.shape[s];t[s]=_t.create($n(n))}return new yt({...e._def,shape:()=>t})}else return e instanceof fs?new fs({...e._def,type:$n(e.element)}):e instanceof _t?_t.create($n(e.unwrap())):e instanceof rs?rs.create($n(e.unwrap())):e instanceof ns?ns.create(e.items.map(t=>$n(t))):e}var yt=class e extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),s=H.util.objectKeys(t);return this._cached={shape:t,keys:s},this._cached}_parse(t){if(this._getType(t)!==H.ZodParsedType.object){let c=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(c,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.object,received:c.parsedType}),F.INVALID}let{status:n,ctx:r}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof qt&&this._def.unknownKeys==="strip"))for(let c in r.data)o.includes(c)||a.push(c);let u=[];for(let c of o){let l=i[c],p=r.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Ot(r,p,r.path,c)),alwaysSet:c in r.data})}if(this._def.catchall instanceof qt){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of a)u.push({key:{status:"valid",value:l},value:{status:"valid",value:r.data[l]}});else if(c==="strict")a.length>0&&((0,F.addIssueToContext)(r,{code:$.ZodIssueCode.unrecognized_keys,keys:a}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of a){let p=r.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Ot(r,p,r.path,l)),alwaysSet:l in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let p=await l.key,d=await l.value;c.push({key:p,value:d,alwaysSet:l.alwaysSet})}return c}).then(c=>F.ParseStatus.mergeObjectSync(n,c)):F.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(t){return Q.errorUtil.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(s,n)=>{let r=this._def.errorMap?.(s,n).message??n.defaultError;return s.code==="unrecognized_keys"?{message:Q.errorUtil.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:oe.ZodObject})}setKey(t,s){return this.augment({[t]:s})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let s={};for(let n of H.util.objectKeys(t))t[n]&&this.shape[n]&&(s[n]=this.shape[n]);return new e({...this._def,shape:()=>s})}omit(t){let s={};for(let n of H.util.objectKeys(this.shape))t[n]||(s[n]=this.shape[n]);return new e({...this._def,shape:()=>s})}deepPartial(){return $n(this)}partial(t){let s={};for(let n of H.util.objectKeys(this.shape)){let r=this.shape[n];t&&!t[n]?s[n]=r:s[n]=r.optional()}return new e({...this._def,shape:()=>s})}required(t){let s={};for(let n of H.util.objectKeys(this.shape))if(t&&!t[n])s[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof _t;)i=i._def.innerType;s[n]=i}return new e({...this._def,shape:()=>s})}keyof(){return dy(H.util.objectKeys(this.shape))}};R.ZodObject=yt;yt.create=(e,t)=>new yt({shape:()=>e,unknownKeys:"strip",catchall:qt.create(),typeName:oe.ZodObject,...me(t)});yt.strictCreate=(e,t)=>new yt({shape:()=>e,unknownKeys:"strict",catchall:qt.create(),typeName:oe.ZodObject,...me(t)});yt.lazycreate=(e,t)=>new yt({shape:e,unknownKeys:"strip",catchall:qt.create(),typeName:oe.ZodObject,...me(t)});var sn=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n=this._def.options;function r(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return s.common.issues.push(...a.ctx.common.issues),a.result;let o=i.map(a=>new $.ZodError(a.ctx.common.issues));return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_union,unionErrors:o}),F.INVALID}if(s.common.async)return Promise.all(n.map(async i=>{let o={...s,common:{...s.common,issues:[]},parent:null};return{result:await i._parseAsync({data:s.data,path:s.path,parent:o}),ctx:o}})).then(r);{let i,o=[];for(let u of n){let c={...s,common:{...s.common,issues:[]},parent:null},l=u._parseSync({data:s.data,path:s.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return s.common.issues.push(...i.ctx.common.issues),i.result;let a=o.map(u=>new $.ZodError(u));return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_union,unionErrors:a}),F.INVALID}}get options(){return this._def.options}};R.ZodUnion=sn;sn.create=(e,t)=>new sn({options:e,typeName:oe.ZodUnion,...me(t)});var ds=e=>e instanceof rn?ds(e.schema):e instanceof At?ds(e.innerType()):e instanceof on?[e.value]:e instanceof an?e.options:e instanceof cn?H.util.objectValues(e.enum):e instanceof un?ds(e._def.innerType):e instanceof en?[void 0]:e instanceof tn?[null]:e instanceof _t?[void 0,...ds(e.unwrap())]:e instanceof rs?[null,...ds(e.unwrap())]:e instanceof qr||e instanceof pn?ds(e.unwrap()):e instanceof ln?ds(e._def.innerType):[],fo=class e extends fe{_parse(t){let{ctx:s}=this._processInputParams(t);if(s.parsedType!==H.ZodParsedType.object)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.object,received:s.parsedType}),F.INVALID;let n=this.discriminator,r=s.data[n],i=this.optionsMap.get(r);return i?s.common.async?i._parseAsync({data:s.data,path:s.path,parent:s}):i._parseSync({data:s.data,path:s.path,parent:s}):((0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),F.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,s,n){let r=new Map;for(let i of s){let o=ds(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of o){if(r.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);r.set(a,i)}}return new e({typeName:oe.ZodDiscriminatedUnion,discriminator:t,options:s,optionsMap:r,...me(n)})}};R.ZodDiscriminatedUnion=fo;function ru(e,t){let s=(0,H.getParsedType)(e),n=(0,H.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(s===H.ZodParsedType.object&&n===H.ZodParsedType.object){let r=H.util.objectKeys(t),i=H.util.objectKeys(e).filter(a=>r.indexOf(a)!==-1),o={...e,...t};for(let a of i){let u=ru(e[a],t[a]);if(!u.valid)return{valid:!1};o[a]=u.data}return{valid:!0,data:o}}else if(s===H.ZodParsedType.array&&n===H.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let o=e[i],a=t[i],u=ru(o,a);if(!u.valid)return{valid:!1};r.push(u.data)}return{valid:!0,data:r}}else return s===H.ZodParsedType.date&&n===H.ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var nn=class extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t),r=(i,o)=>{if((0,F.isAborted)(i)||(0,F.isAborted)(o))return F.INVALID;let a=ru(i.value,o.value);return a.valid?(((0,F.isDirty)(i)||(0,F.isDirty)(o))&&s.dirty(),{status:s.value,value:a.data}):((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_intersection_types}),F.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,o])=>r(i,o)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};R.ZodIntersection=nn;nn.create=(e,t,s)=>new nn({left:e,right:t,typeName:oe.ZodIntersection,...me(s)});var ns=class e extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.array)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.array,received:n.parsedType}),F.INVALID;if(n.data.length<this._def.items.length)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),F.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),s.dirty());let i=[...n.data].map((o,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new Ot(n,o,n.path,a)):null}).filter(o=>!!o);return n.common.async?Promise.all(i).then(o=>F.ParseStatus.mergeArray(s,o)):F.ParseStatus.mergeArray(s,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};R.ZodTuple=ns;ns.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ns({items:e,typeName:oe.ZodTuple,rest:null,...me(t)})};var go=class e extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.object)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.object,received:n.parsedType}),F.INVALID;let r=[],i=this._def.keyType,o=this._def.valueType;for(let a in n.data)r.push({key:i._parse(new Ot(n,a,n.path,a)),value:o._parse(new Ot(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?F.ParseStatus.mergeObjectAsync(s,r):F.ParseStatus.mergeObjectSync(s,r)}get element(){return this._def.valueType}static create(t,s,n){return s instanceof fe?new e({keyType:t,valueType:s,typeName:oe.ZodRecord,...me(n)}):new e({keyType:Es.create(),valueType:t,typeName:oe.ZodRecord,...me(s)})}};R.ZodRecord=go;var zn=class extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.map)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.map,received:n.parsedType}),F.INVALID;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([a,u],c)=>({key:r._parse(new Ot(n,a,n.path,[c,"key"])),value:i._parse(new Ot(n,u,n.path,[c,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of o){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return F.INVALID;(c.status==="dirty"||l.status==="dirty")&&s.dirty(),a.set(c.value,l.value)}return{status:s.value,value:a}})}else{let a=new Map;for(let u of o){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return F.INVALID;(c.status==="dirty"||l.status==="dirty")&&s.dirty(),a.set(c.value,l.value)}return{status:s.value,value:a}}}};R.ZodMap=zn;zn.create=(e,t,s)=>new zn({valueType:t,keyType:e,typeName:oe.ZodMap,...me(s)});var qn=class e extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.parsedType!==H.ZodParsedType.set)return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.set,received:n.parsedType}),F.INVALID;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),s.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&((0,F.addIssueToContext)(n,{code:$.ZodIssueCode.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),s.dirty());let i=this._def.valueType;function o(u){let c=new Set;for(let l of u){if(l.status==="aborted")return F.INVALID;l.status==="dirty"&&s.dirty(),c.add(l.value)}return{status:s.value,value:c}}let a=[...n.data.values()].map((u,c)=>i._parse(new Ot(n,u,n.path,c)));return n.common.async?Promise.all(a).then(u=>o(u)):o(a)}min(t,s){return new e({...this._def,minSize:{value:t,message:Q.errorUtil.toString(s)}})}max(t,s){return new e({...this._def,maxSize:{value:t,message:Q.errorUtil.toString(s)}})}size(t,s){return this.min(t,s).max(t,s)}nonempty(t){return this.min(1,t)}};R.ZodSet=qn;qn.create=(e,t)=>new qn({valueType:e,minSize:null,maxSize:null,typeName:oe.ZodSet,...me(t)});var ho=class e extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:s}=this._processInputParams(t);if(s.parsedType!==H.ZodParsedType.function)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.function,received:s.parsedType}),F.INVALID;function n(a,u){return(0,F.makeIssue)({data:a,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,(0,mo.getErrorMap)(),mo.defaultErrorMap].filter(c=>!!c),issueData:{code:$.ZodIssueCode.invalid_arguments,argumentsError:u}})}function r(a,u){return(0,F.makeIssue)({data:a,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,(0,mo.getErrorMap)(),mo.defaultErrorMap].filter(c=>!!c),issueData:{code:$.ZodIssueCode.invalid_return_type,returnTypeError:u}})}let i={errorMap:s.common.contextualErrorMap},o=s.data;if(this._def.returns instanceof Fs){let a=this;return(0,F.OK)(async function(...u){let c=new $.ZodError([]),l=await a._def.args.parseAsync(u,i).catch(m=>{throw c.addIssue(n(u,m)),c}),p=await Reflect.apply(o,this,l);return await a._def.returns._def.type.parseAsync(p,i).catch(m=>{throw c.addIssue(r(p,m)),c})})}else{let a=this;return(0,F.OK)(function(...u){let c=a._def.args.safeParse(u,i);if(!c.success)throw new $.ZodError([n(u,c.error)]);let l=Reflect.apply(o,this,c.data),p=a._def.returns.safeParse(l,i);if(!p.success)throw new $.ZodError([r(l,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ns.create(t).rest(ms.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,s,n){return new e({args:t||ns.create([]).rest(ms.create()),returns:s||ms.create(),typeName:oe.ZodFunction,...me(n)})}};R.ZodFunction=ho;var rn=class extends fe{get schema(){return this._def.getter()}_parse(t){let{ctx:s}=this._processInputParams(t);return this._def.getter()._parse({data:s.data,path:s.path,parent:s})}};R.ZodLazy=rn;rn.create=(e,t)=>new rn({getter:e,typeName:oe.ZodLazy,...me(t)});var on=class extends fe{_parse(t){if(t.data!==this._def.value){let s=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(s,{received:s.data,code:$.ZodIssueCode.invalid_literal,expected:this._def.value}),F.INVALID}return{status:"valid",value:t.data}}get value(){return this._def.value}};R.ZodLiteral=on;on.create=(e,t)=>new on({value:e,typeName:oe.ZodLiteral,...me(t)});function dy(e,t){return new an({values:e,typeName:oe.ZodEnum,...me(t)})}var an=class e extends fe{_parse(t){if(typeof t.data!="string"){let s=this._getOrReturnCtx(t),n=this._def.values;return(0,F.addIssueToContext)(s,{expected:H.util.joinValues(n),received:s.parsedType,code:$.ZodIssueCode.invalid_type}),F.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let s=this._getOrReturnCtx(t),n=this._def.values;return(0,F.addIssueToContext)(s,{received:s.data,code:$.ZodIssueCode.invalid_enum_value,options:n}),F.INVALID}return(0,F.OK)(t.data)}get options(){return this._def.values}get enum(){let t={};for(let s of this._def.values)t[s]=s;return t}get Values(){let t={};for(let s of this._def.values)t[s]=s;return t}get Enum(){let t={};for(let s of this._def.values)t[s]=s;return t}extract(t,s=this._def){return e.create(t,{...this._def,...s})}exclude(t,s=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...s})}};R.ZodEnum=an;an.create=dy;var cn=class extends fe{_parse(t){let s=H.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==H.ZodParsedType.string&&n.parsedType!==H.ZodParsedType.number){let r=H.util.objectValues(s);return(0,F.addIssueToContext)(n,{expected:H.util.joinValues(r),received:n.parsedType,code:$.ZodIssueCode.invalid_type}),F.INVALID}if(this._cache||(this._cache=new Set(H.util.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=H.util.objectValues(s);return(0,F.addIssueToContext)(n,{received:n.data,code:$.ZodIssueCode.invalid_enum_value,options:r}),F.INVALID}return(0,F.OK)(t.data)}get enum(){return this._def.values}};R.ZodNativeEnum=cn;cn.create=(e,t)=>new cn({values:e,typeName:oe.ZodNativeEnum,...me(t)});var Fs=class extends fe{unwrap(){return this._def.type}_parse(t){let{ctx:s}=this._processInputParams(t);if(s.parsedType!==H.ZodParsedType.promise&&s.common.async===!1)return(0,F.addIssueToContext)(s,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.promise,received:s.parsedType}),F.INVALID;let n=s.parsedType===H.ZodParsedType.promise?s.data:Promise.resolve(s.data);return(0,F.OK)(n.then(r=>this._def.type.parseAsync(r,{path:s.path,errorMap:s.common.contextualErrorMap})))}};R.ZodPromise=Fs;Fs.create=(e,t)=>new Fs({type:e,typeName:oe.ZodPromise,...me(t)});var At=class extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:s,ctx:n}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:o=>{(0,F.addIssueToContext)(n,o),o.fatal?s.abort():s.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let o=r.transform(n.data,i);if(n.common.async)return Promise.resolve(o).then(async a=>{if(s.value==="aborted")return F.INVALID;let u=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return u.status==="aborted"?F.INVALID:u.status==="dirty"||s.value==="dirty"?(0,F.DIRTY)(u.value):u});{if(s.value==="aborted")return F.INVALID;let a=this._def.schema._parseSync({data:o,path:n.path,parent:n});return a.status==="aborted"?F.INVALID:a.status==="dirty"||s.value==="dirty"?(0,F.DIRTY)(a.value):a}}if(r.type==="refinement"){let o=a=>{let u=r.refinement(a,i);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?F.INVALID:(a.status==="dirty"&&s.dirty(),o(a.value),{status:s.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?F.INVALID:(a.status==="dirty"&&s.dirty(),o(a.value).then(()=>({status:s.value,value:a.value}))))}if(r.type==="transform")if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,F.isValid)(o))return F.INVALID;let a=r.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:s.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>(0,F.isValid)(o)?Promise.resolve(r.transform(o.value,i)).then(a=>({status:s.value,value:a})):F.INVALID);H.util.assertNever(r)}};R.ZodEffects=At;R.ZodTransformer=At;At.create=(e,t,s)=>new At({schema:e,typeName:oe.ZodEffects,effect:t,...me(s)});At.createWithPreprocess=(e,t,s)=>new At({schema:t,effect:{type:"preprocess",transform:e},typeName:oe.ZodEffects,...me(s)});var _t=class extends fe{_parse(t){return this._getType(t)===H.ZodParsedType.undefined?(0,F.OK)(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};R.ZodOptional=_t;_t.create=(e,t)=>new _t({innerType:e,typeName:oe.ZodOptional,...me(t)});var rs=class extends fe{_parse(t){return this._getType(t)===H.ZodParsedType.null?(0,F.OK)(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};R.ZodNullable=rs;rs.create=(e,t)=>new rs({innerType:e,typeName:oe.ZodNullable,...me(t)});var un=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n=s.data;return s.parsedType===H.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:s.path,parent:s})}removeDefault(){return this._def.innerType}};R.ZodDefault=un;un.create=(e,t)=>new un({innerType:e,typeName:oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...me(t)});var ln=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n={...s,common:{...s.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,F.isAsync)(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new $.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};R.ZodCatch=ln;ln.create=(e,t)=>new ln({innerType:e,typeName:oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...me(t)});var Vn=class extends fe{_parse(t){if(this._getType(t)!==H.ZodParsedType.nan){let n=this._getOrReturnCtx(t);return(0,F.addIssueToContext)(n,{code:$.ZodIssueCode.invalid_type,expected:H.ZodParsedType.nan,received:n.parsedType}),F.INVALID}return{status:"valid",value:t.data}}};R.ZodNaN=Vn;Vn.create=e=>new Vn({typeName:oe.ZodNaN,...me(e)});R.BRAND=Symbol("zod_brand");var qr=class extends fe{_parse(t){let{ctx:s}=this._processInputParams(t),n=s.data;return this._def.type._parse({data:n,path:s.path,parent:s})}unwrap(){return this._def.type}};R.ZodBranded=qr;var Vr=class e extends fe{_parse(t){let{status:s,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?F.INVALID:i.status==="dirty"?(s.dirty(),(0,F.DIRTY)(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let r=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return r.status==="aborted"?F.INVALID:r.status==="dirty"?(s.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:n.path,parent:n})}}static create(t,s){return new e({in:t,out:s,typeName:oe.ZodPipeline})}};R.ZodPipeline=Vr;var pn=class extends fe{_parse(t){let s=this._def.innerType._parse(t),n=r=>((0,F.isValid)(r)&&(r.value=Object.freeze(r.value)),r);return(0,F.isAsync)(s)?s.then(r=>n(r)):n(s)}unwrap(){return this._def.innerType}};R.ZodReadonly=pn;pn.create=(e,t)=>new pn({innerType:e,typeName:oe.ZodReadonly,...me(t)});function cy(e,t){let s=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof s=="string"?{message:s}:s}function my(e,t={},s){return e?Rs.create().superRefine((n,r)=>{let i=e(n);if(i instanceof Promise)return i.then(o=>{if(!o){let a=cy(t,n),u=a.fatal??s??!0;r.addIssue({code:"custom",...a,fatal:u})}});if(!i){let o=cy(t,n),a=o.fatal??s??!0;r.addIssue({code:"custom",...o,fatal:a})}}):Rs.create()}R.late={object:yt.lazycreate};var oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(oe||(R.ZodFirstPartyTypeKind=oe={}));var VF=(e,t={message:`Input not instance of ${e.name}`})=>my(s=>s instanceof e,t);R.instanceof=VF;var fy=Es.create;R.string=fy;var gy=Ys.create;R.number=gy;var KF=Vn.create;R.nan=KF;var ZF=Js.create;R.bigint=ZF;var hy=Qs.create;R.boolean=hy;var YF=Xs.create;R.date=YF;var JF=Gn.create;R.symbol=JF;var QF=en.create;R.undefined=QF;var XF=tn.create;R.null=XF;var eI=Rs.create;R.any=eI;var tI=ms.create;R.unknown=tI;var sI=qt.create;R.never=sI;var nI=Hn.create;R.void=nI;var rI=fs.create;R.array=rI;var iI=yt.create;R.object=iI;var oI=yt.strictCreate;R.strictObject=oI;var aI=sn.create;R.union=aI;var cI=fo.create;R.discriminatedUnion=cI;var uI=nn.create;R.intersection=uI;var lI=ns.create;R.tuple=lI;var pI=go.create;R.record=pI;var dI=zn.create;R.map=dI;var mI=qn.create;R.set=mI;var fI=ho.create;R.function=fI;var gI=rn.create;R.lazy=gI;var hI=on.create;R.literal=hI;var yI=an.create;R.enum=yI;var SI=cn.create;R.nativeEnum=SI;var bI=Fs.create;R.promise=bI;var yy=At.create;R.effect=yy;R.transformer=yy;var DI=_t.create;R.optional=DI;var vI=rs.create;R.nullable=vI;var CI=At.createWithPreprocess;R.preprocess=CI;var AI=Vr.create;R.pipeline=AI;var xI=()=>fy().optional();R.ostring=xI;var wI=()=>gy().optional();R.onumber=wI;var EI=()=>hy().optional();R.oboolean=EI;R.coerce={string:e=>Es.create({...e,coerce:!0}),number:e=>Ys.create({...e,coerce:!0}),boolean:e=>Qs.create({...e,coerce:!0}),bigint:e=>Js.create({...e,coerce:!0}),date:e=>Xs.create({...e,coerce:!0})};R.NEVER=F.INVALID});var iu=T(Bt=>{"use strict";var RI=Bt&&Bt.__createBinding||(Object.create?function(e,t,s,n){n===void 0&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){n===void 0&&(n=s),e[n]=t[s]}),Kn=Bt&&Bt.__exportStar||function(e,t){for(var s in e)s!=="default"&&!Object.prototype.hasOwnProperty.call(t,s)&&RI(t,e,s)};Object.defineProperty(Bt,"__esModule",{value:!0});Kn(lo(),Bt);Kn(su(),Bt);Kn(ry(),Bt);Kn(Hr(),Bt);Kn(Sy(),Bt);Kn(uo(),Bt)});var vy=T(St=>{"use strict";var by=St&&St.__createBinding||(Object.create?function(e,t,s,n){n===void 0&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){n===void 0&&(n=s),e[n]=t[s]}),FI=St&&St.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),II=St&&St.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&by(t,e,s);return FI(t,e),t},kI=St&&St.__exportStar||function(e,t){for(var s in e)s!=="default"&&!Object.prototype.hasOwnProperty.call(t,s)&&by(t,e,s)};Object.defineProperty(St,"__esModule",{value:!0});St.z=void 0;var Dy=II(iu());St.z=Dy;kI(iu(),St);St.default=Dy});var ou=T(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.getEnvironment=void 0;var gs=vy(),TI=gs.z.object({LOG_LEVEL:gs.z.enum(["DEBUG","INFO","WARN","ERROR","FATAL"]).optional(),STAGE:gs.z.enum(["dev","prod","test"]).default("dev"),SERVICE_NAME:gs.z.string().optional(),ENABLE_STRUCTURED_LOGGING:gs.z.string().transform(e=>e==="true").optional(),CLOUDWATCH_LOG_GROUP:gs.z.string().optional(),CLOUDWATCH_LOG_STREAM:gs.z.string().optional(),AWS_REGION:gs.z.string().optional()}),PI=(e=process.env)=>{let t;try{t=TI.parse(e)}catch(s){s instanceof gs.z.ZodError&&console.warn("Environment validation failed, using defaults:",s.errors),t={STAGE:"dev"}}return{...t,isProduction:t.STAGE==="prod",isDevelopment:t.STAGE==="dev",logLevel:t.LOG_LEVEL??void 0,serviceName:t.SERVICE_NAME??void 0,enableStructuredLogging:t.ENABLE_STRUCTURED_LOGGING??!0,stage:t.STAGE}};yo.getEnvironment=PI});var au=T(is=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});is.createLogFilter=is.createSampler=is.createRateLimiter=void 0;var LI=(e,t)=>{let s={tokens:t,lastRefill:Date.now(),maxTokens:t,refillRate:e},n=()=>{let i=Date.now(),a=(i-s.lastRefill)/1e3*s.refillRate;s.tokens=Math.min(s.maxTokens,s.tokens+a),s.lastRefill=i};return{tryConsume:(i=1)=>(n(),s.tokens>=i?(s.tokens-=i,!0):!1),getState:()=>({...s})}};is.createRateLimiter=LI;var _I=e=>{let t={totalLogs:0,sampledLogs:0};return{shouldSample:()=>(t.totalLogs++,e>=1?(t.sampledLogs++,!0):e<=0?!1:Math.random()<=e?(t.sampledLogs++,!0):!1),getStats:()=>({totalLogs:t.totalLogs,sampledLogs:t.sampledLogs,samplingRate:t.totalLogs>0?t.sampledLogs/t.totalLogs:0,configuredRate:e})}};is.createSampler=_I;var OI=e=>{let t=e.rateLimit?(0,is.createRateLimiter)(e.rateLimit.maxLogsPerSecond,e.rateLimit.burstSize):null,s=e.samplingRate!==void 0?(0,is.createSampler)(e.samplingRate):null;return{shouldLog:()=>!t&&!s?!0:!(t&&!t.tryConsume()||s&&!s.shouldSample()),getStats:()=>({rateLimit:t?.getState(),sampling:s?.getStats()})}};is.createLogFilter=OI});var cu=T(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.printLoggerConfig=Mt.createStrogger=Mt.strogger=Mt.createLogger=void 0;var BI=Kc(),MI=co(),_e=zt(),NI=Yc(),Cy=Jc(),WI=ou(),UI=au(),Ay=e=>{if(!e||typeof e!="object")return console.warn("[strogger] No environment provided, defaulting to DEBUG"),_e.LogLevel.DEBUG;switch(e.LOG_LEVEL?.toUpperCase()){case"DEBUG":return _e.LogLevel.DEBUG;case"INFO":return _e.LogLevel.INFO;case"WARN":return _e.LogLevel.WARN;case"ERROR":return _e.LogLevel.ERROR;case"FATAL":return _e.LogLevel.FATAL;case void 0:return e.STAGE==="prod"?_e.LogLevel.INFO:_e.LogLevel.DEBUG;default:return console.warn(`[strogger] Invalid LOG_LEVEL '${e.LOG_LEVEL}' provided. Defaulting to ${e.STAGE==="prod"?"INFO":"DEBUG"}.`),e.STAGE==="prod"?_e.LogLevel.INFO:_e.LogLevel.DEBUG}},jI=(e,t)=>e>=(t.level!==void 0?t.level:_e.LogLevel.INFO),$I=(e,t,s,n,r,i)=>({timestamp:new Date().toISOString(),level:t,message:s,context:{...e.stage&&{stage:e.stage},...e.serviceName&&{serviceName:e.serviceName},...n},error:r?{name:r.name,message:r.message,stack:r.stack}:void 0,metadata:i}),GI=({config:e={},transports:t=[],formatter:s,env:n})=>{let r=e.instanceId||(0,Cy.generateLoggerInstanceId)(),i={level:Ay(n),serviceName:n.SERVICE_NAME||void 0,stage:n.STAGE||"dev",enableStructuredLogging:n.ENABLE_STRUCTURED_LOGGING??!0,includeTimestamp:!0,includeLogLevel:!0,instanceId:r,...e};if(typeof i.level=="string")switch(i.level.toUpperCase()){case"DEBUG":i.level=_e.LogLevel.DEBUG;break;case"INFO":i.level=_e.LogLevel.INFO;break;case"WARN":i.level=_e.LogLevel.WARN;break;case"ERROR":i.level=_e.LogLevel.ERROR;break;case"FATAL":i.level=_e.LogLevel.FATAL;break;default:i.level=_e.LogLevel.INFO}e.level!==void 0&&(i.level=e.level);let o=(0,UI.createLogFilter)(i),a=(0,Cy.createDefaultEnrichmentMiddleware)(i.serviceName,i.stage,void 0,r),c=e.batching===!0?t.map(p=>(0,NI.createBatchedTransport)(p,{maxSize:50,maxWaitTime:2e3,maxBatchSize:512*1024})):t,l=async(p,d,m,f,g)=>{if(!jI(p,i)||(i.samplingRate!==void 0||i.rateLimit)&&!o.shouldLog())return;let h=a(m||{}),y=$I(i,p,d,h,f,g),b=y;if(typeof i.redact=="function"&&(b=i.redact(y)),typeof i.validate=="function")try{i.validate(b)}catch(v){console.error("[LOGGER ERROR] Log entry validation failed:",v);return}if(Array.isArray(i.hooks))for(let v of i.hooks)try{let E=v(b);E&&typeof E.then=="function"&&await E}catch(E){console.error("[LOGGER ERROR] Log hook failed:",E)}let x=await Promise.allSettled(c.map(v=>v.log(b)));for(let v of x)v.status==="rejected"&&console.error(v.reason)};return{debug:(p,d,m)=>l(_e.LogLevel.DEBUG,p,d,void 0,m),info:(p,d,m)=>l(_e.LogLevel.INFO,p,d,void 0,m),warn:(p,d,m,f)=>l(_e.LogLevel.WARN,p,d,m,f),error:(p,d,m,f)=>l(_e.LogLevel.ERROR,p,d,m,f),fatal:(p,d,m,f)=>l(_e.LogLevel.FATAL,p,d,m,f),logFunctionStart:(p,d,m)=>l(_e.LogLevel.INFO,`Function ${p} started`,{...d,functionName:p},void 0,m),logFunctionEnd:(p,d,m,f)=>l(_e.LogLevel.INFO,`Function ${p} completed in ${d}ms`,{...m,functionName:p,duration:d},void 0,f),logDatabaseOperation:(p,d,m,f)=>l(_e.LogLevel.DEBUG,`Database operation: ${p} on table ${d}`,{...m,operation:p,table:d},void 0,f),logApiRequest:(p,d,m,f,g)=>l(_e.LogLevel.INFO,`API ${p} ${d} - ${m}`,{...f,method:p,path:d,statusCode:m},void 0,g),setLevel:p=>{i.level=p;for(let d of t)d.setLevel?.(p)},getLevel:()=>i.level!==void 0?i.level:_e.LogLevel.INFO,getInstanceId:()=>r,addTransport:p=>t.push(p),removeTransport:p=>{let d=t.indexOf(p);d>-1&&t.splice(d,1)},setFormatter:p=>{},getSamplingStats:()=>o.getStats(),flush:async()=>{await Promise.allSettled(c.map(p=>p.flush?.()||Promise.resolve()))},getBatchStats:()=>c.map(p=>p.getStats?.()||{})}};Mt.createLogger=GI;var HI=(0,WI.getEnvironment)(),xy=(0,BI.createJsonFormatter)(),zI=(0,MI.createConsoleTransport)({formatter:xy});Mt.strogger=(0,Mt.createLogger)({config:{},transports:[zI],formatter:xy,env:HI});Mt.createStrogger=Mt.createLogger;var qI=e=>{let t=Ay(e);console.log("--- Strogger Logger Configuration ---"),console.log("LOG_LEVEL:",e.LOG_LEVEL??"(default)"),console.log("STAGE:",e.STAGE??"dev"),console.log("SERVICE_NAME:",e.SERVICE_NAME??"(none)"),console.log("ENABLE_STRUCTURED_LOGGING:",e.ENABLE_STRUCTURED_LOGGING??!0),console.log("Effective log level:",t),console.log("--------------------------------------")};Mt.printLoggerConfig=qI});var ks=T(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.handleTransportError=ze.validateTransportConfig=ze.validateEnvironmentVariable=ze.createDetailedError=ze.ERROR_MESSAGES=ze.ValidationError=ze.ConfigurationError=ze.TransportError=ze.LoggerError=void 0;var Is=class extends Error{constructor(t,s,n){super(t),this.code=s,this.details=n,this.name="LoggerError"}};ze.LoggerError=Is;var dn=class extends Is{constructor(t,s,n){super(t,"TRANSPORT_ERROR",{transportName:s,...n}),this.transportName=s,this.name="TransportError"}};ze.TransportError=dn;var So=class extends Is{constructor(t,s){super(t,"CONFIGURATION_ERROR",s),this.name="ConfigurationError"}};ze.ConfigurationError=So;var uu=class extends Is{constructor(t,s){super(t,"VALIDATION_ERROR",s),this.name="ValidationError"}};ze.ValidationError=uu;ze.ERROR_MESSAGES={NEW_RELIC_MISSING_API_KEY:{message:"New Relic transport requires NEW_RELIC_LICENSE_KEY environment variable",solution:"Set NEW_RELIC_LICENSE_KEY in your environment variables or pass apiKey option",example:"NEW_RELIC_LICENSE_KEY=your-license-key-here"},NEW_RELIC_MISSING_ACCOUNT_ID:{message:"New Relic transport requires NEW_RELIC_ACCOUNT_ID environment variable",solution:"Set NEW_RELIC_ACCOUNT_ID in your environment variables or pass accountId option",example:"NEW_RELIC_ACCOUNT_ID=your-account-id-here"},NEW_RELIC_API_ERROR:{message:"Failed to send logs to New Relic API",solution:"Check your API key, account ID, and network connectivity"},DATADOG_MISSING_API_KEY:{message:"DataDog transport requires DATADOG_API_KEY environment variable",solution:"Set DATADOG_API_KEY in your environment variables",example:"DATADOG_API_KEY=your-api-key-here"},DATADOG_API_ERROR:{message:"Failed to send logs to DataDog API",solution:"Check your API key and network connectivity"},CLOUDWATCH_MISSING_CREDENTIALS:{message:"CloudWatch transport requires AWS credentials",solution:"Configure AWS credentials via environment variables, IAM role, or AWS credentials file",example:`AWS_ACCESS_KEY_ID=your-key
|
|
7
|
+
AWS_SECRET_ACCESS_KEY=your-secret`},CLOUDWATCH_MISSING_LOG_GROUP:{message:"CloudWatch transport requires logGroupName option",solution:"Provide logGroupName in transport options or set CLOUDWATCH_LOG_GROUP environment variable",example:'logGroupName: "/aws/lambda/my-function"'},CLOUDWATCH_LOG_GROUP_NOT_FOUND:{message:"CloudWatch log group does not exist",solution:"Create the log group in CloudWatch before using this transport",example:'aws logs create-log-group --log-group-name "/aws/lambda/my-function"'},CLOUDWATCH_API_ERROR:{message:"Failed to send logs to CloudWatch",solution:"Check your AWS credentials, region, and network connectivity"},TRANSPORT_INITIALIZATION_FAILED:{message:"Failed to initialize transport",solution:"Check transport configuration and required dependencies"},TRANSPORT_SEND_FAILED:{message:"Failed to send log entry to transport",solution:"Check transport configuration and network connectivity"},MISSING_SERVICE_NAME:{message:"Logger configuration requires serviceName",solution:"Set SERVICE_NAME environment variable or provide serviceName in config",example:"SERVICE_NAME=my-service"},INVALID_LOG_LEVEL:{message:"Invalid log level specified",solution:"Use one of: DEBUG, INFO, WARN, ERROR, FATAL",example:"LOG_LEVEL=INFO"},ENVIRONMENT_VALIDATION_FAILED:{message:"Environment configuration validation failed",solution:"Check your environment variables and configuration"},FORMATTER_MISSING:{message:"Logger requires a formatter",solution:"Provide a formatter object with a format(entry) method",example:"formatter: createJsonFormatter()"},PERFORMANCE_MONITOR_INITIALIZATION_FAILED:{message:"Failed to initialize performance monitor",solution:"Check performance monitor configuration"},SPLUNK_MISSING_HEC_URL:{message:"Splunk transport requires SPLUNK_HEC_URL environment variable",solution:"Set SPLUNK_HEC_URL in your environment variables",example:"SPLUNK_HEC_URL=https://your-splunk-instance:8088/services/collector"},SPLUNK_MISSING_HEC_TOKEN:{message:"Splunk transport requires SPLUNK_HEC_TOKEN environment variable",solution:"Set SPLUNK_HEC_TOKEN in your environment variables",example:"SPLUNK_HEC_TOKEN=your-hec-token-here"},SPLUNK_API_ERROR:{message:"Failed to send logs to Splunk HEC",solution:"Check your HEC URL, token, and network connectivity"},ELASTICSEARCH_MISSING_AUTH:{message:"Elasticsearch transport requires authentication",solution:"Set ELASTICSEARCH_API_KEY or ELASTICSEARCH_USERNAME/PASSWORD",example:"ELASTICSEARCH_API_KEY=your-api-key-here"},ELASTICSEARCH_MISSING_DATE:{message:"Date string is missing for Elasticsearch index pattern",solution:"Check date generation logic and ensure valid date string is produced"},ELASTICSEARCH_API_ERROR:{message:"Failed to send logs to Elasticsearch",solution:"Check your connection URL, authentication, and network connectivity"}};var VI=(e,t,s)=>{let n=ze.ERROR_MESSAGES[e],r=`${n.message}${t?` (${t})`:""}`,i={...n,...s,...t&&{transportName:t}};return t?new dn(r,t,i):new Is(r,"LOGGER_ERROR",i)};ze.createDetailedError=VI;var KI=(e,t,s=!1)=>{if(s&&!t)throw new So(`Required environment variable ${e} is not set`,{missingVariable:e,message:`Required environment variable ${e} is not set`})};ze.validateEnvironmentVariable=KI;var ZI=(e,t,s)=>{let n=s.filter(r=>!t[r]);if(n.length>0)throw new dn(`Missing required configuration fields: ${n.join(", ")}`,e,{missingFields:n,message:`Missing required configuration fields: ${n.join(", ")}`})};ze.validateTransportConfig=ZI;var YI=(e,t,s=!0)=>{let n;if(e instanceof Is?n=e:e instanceof Error?n=new dn(`Unexpected error in ${t}: ${e.message}`,t,{originalError:e.message,stack:e.stack}):n=new dn(`Unknown error in ${t}`,t,{originalError:e}),s&&(console.error(`[LOGGER ERROR] ${n.message}`),n.details?.solution&&console.error(`[LOGGER SOLUTION] ${n.details.solution}`),n.details?.example&&console.error(`[LOGGER EXAMPLE] ${n.details.example}`)),!s)throw n};ze.handleTransportError=YI});var lu=T(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.createDataDogTransport=void 0;var Zn=zt(),Yn=ks(),JI=ps(),QI=(e={})=>{let t="DataDog";try{let s=e.level??Zn.LogLevel.INFO,n=e.apiKey||process.env.DATADOG_API_KEY,r=e.serviceName||process.env.DD_SERVICE||process.env.SERVICE_NAME,i=e.source||"nodejs",o=e.tags||[],a=e.batchSize||10,u=e.flushInterval||5e3,c=e.region||process.env.DD_SITE||"us";(0,Yn.validateEnvironmentVariable)("DATADOG_API_KEY",n,!0),(0,Yn.validateTransportConfig)(t,{apiKey:n},["apiKey"]);let p=[...[`env:${process.env.NODE_ENV||"dev"}`,`service:${r||"unknown"}`,`source:${i}`],...o].join(","),d=[],m=null,f=async b=>{try{let x=`https://http-intake.logs.${c==="eu"?"eu.":""}datadoghq.com/api/v2/logs`,v=b.map(O=>({message:O.message,level:g(O.level),timestamp:new Date(O.timestamp).getTime(),ddsource:i,ddtags:p,service:r,...O.context,...O.error&&{error_name:O.error.name,error_message:O.error.message,error_stack:O.error.stack},...O.metadata&&{metadata:O.metadata}})),E=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json","DD-API-KEY":n},body:JSON.stringify(v)});if(!E.ok)throw(0,Yn.createDetailedError)("DATADOG_API_ERROR",t,{status:E.status,statusText:E.statusText,url:x,responseBody:await E.text().catch(()=>"Unable to read response body")})}catch(x){(0,Yn.handleTransportError)(x,t,!0)}},g=b=>{switch(b){case Zn.LogLevel.DEBUG:return"debug";case Zn.LogLevel.INFO:return"info";case Zn.LogLevel.WARN:return"warning";case Zn.LogLevel.ERROR:return"error";case Zn.LogLevel.FATAL:return"critical";default:return"info"}},h=async()=>{if(d.length===0)return;let b=[...d];d=[],await f(b)};return(()=>{m||(m=setInterval(()=>{h().catch(b=>{(0,Yn.handleTransportError)(b,t,!0)})},u))})(),{log:async b=>{(0,JI.shouldLog)(b.level,s)&&(d.push(b),d.length>=a&&await h())},setLevel:b=>{s=b},getLevel:()=>s,flush:async()=>{await h()},close:async()=>{m&&(clearInterval(m),m=null),await h()},addTags:b=>{o.push(...b)},getConfig:()=>({serviceName:r,source:i,tags:[...o],region:c,batchSize:a,flushInterval:u})}}catch(s){throw(0,Yn.handleTransportError)(s,t,!1),s}};bo.createDataDogTransport=QI});var pu=T(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.createSplunkTransport=void 0;var Jn=zt(),mn=ks(),XI=ps(),ek=(e={})=>{let t="Splunk";try{let s=e.level??Jn.LogLevel.INFO,n=e.hecUrl||process.env.SPLUNK_HEC_URL,r=e.hecToken||process.env.SPLUNK_HEC_TOKEN,i=e.source||"nodejs-logger",o=e.sourcetype||"_json",a=e.index||process.env.SPLUNK_INDEX,u=e.batchSize||10,c=e.flushInterval||5e3,l=e.channel||process.env.SPLUNK_CHANNEL;(0,mn.validateEnvironmentVariable)("SPLUNK_HEC_URL",n,!0),(0,mn.validateEnvironmentVariable)("SPLUNK_HEC_TOKEN",r,!0),(0,mn.validateTransportConfig)(t,{hecUrl:n,hecToken:r},["hecUrl","hecToken"]);let p=[],d=null,m=async y=>{try{let b=y.map(v=>({event:{message:v.message,level:f(v.level),timestamp:new Date(v.timestamp).getTime(),...v.context,...v.error&&{error_name:v.error.name,error_message:v.error.message,error_stack:v.error.stack},...v.metadata&&{metadata:v.metadata}},sourcetype:o,source:i,...a&&{index:a},...l&&{channel:l}})),x=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Splunk ${r}`},body:JSON.stringify(b)});if(!x.ok)throw(0,mn.createDetailedError)("SPLUNK_API_ERROR",t,{status:x.status,statusText:x.statusText,url:n,responseBody:await x.text().catch(()=>"Unable to read response body")})}catch(b){(0,mn.handleTransportError)(b,t,!0)}},f=y=>{switch(y){case Jn.LogLevel.DEBUG:return"DEBUG";case Jn.LogLevel.INFO:return"INFO";case Jn.LogLevel.WARN:return"WARN";case Jn.LogLevel.ERROR:return"ERROR";case Jn.LogLevel.FATAL:return"FATAL";default:return"INFO"}},g=async()=>{if(p.length===0)return;let y=[...p];p=[],await m(y)};return(()=>{d||(d=setInterval(()=>{g().catch(y=>{(0,mn.handleTransportError)(y,t,!0)})},c))})(),{log:async y=>{(0,XI.shouldLog)(y.level,s)&&(p.push(y),p.length>=u&&await g())},setLevel:y=>{s=y},getLevel:()=>s,flush:async()=>{await g()},close:async()=>{d&&(clearInterval(d),d=null),await g()},getConfig:()=>({hecUrl:n,source:i,sourcetype:o,index:a,channel:l,batchSize:u,flushInterval:c})}}catch(s){throw(0,mn.handleTransportError)(s,t,!1),s}};Do.createSplunkTransport=ek});var du=T(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.createElasticsearchTransport=void 0;var Qn=zt(),Xn=ks(),tk=ps(),sk=(e={})=>{let t="Elasticsearch";try{let s=e.level??Qn.LogLevel.INFO,n=e.url||process.env.ELASTICSEARCH_URL||"http://localhost:9200",r=e.username||process.env.ELASTICSEARCH_USERNAME,i=e.password||process.env.ELASTICSEARCH_PASSWORD,o=e.apiKey||process.env.ELASTICSEARCH_API_KEY,a=e.index||process.env.ELASTICSEARCH_INDEX||"logs",u=e.indexPattern||process.env.ELASTICSEARCH_INDEX_PATTERN||"logs-{YYYY.MM.DD}",c=e.batchSize||10,l=e.flushInterval||5e3,p=e.timeout||3e4;if(!o&&(!r||!i))throw(0,Xn.createDetailedError)("ELASTICSEARCH_MISSING_AUTH",t,{message:"Elasticsearch transport requires either API key or username/password"});let d=[],m=null,f=()=>{if(u?.includes("{YYYY.MM.DD}")){let E=new Date().toISOString().split("T")[0]?.replace(/-/g,".");if(!E)throw(0,Xn.createDetailedError)("ELASTICSEARCH_MISSING_DATE",t,{message:"Date string is missing"});return u.replace("{YYYY.MM.DD}",E)}return typeof a=="string"&&a.length>0?a:"logs"},g=()=>o?{Authorization:`ApiKey ${o}`}:r&&i?{Authorization:`Basic ${Buffer.from(`${r}:${i}`).toString("base64")}`}:{},h=async v=>{try{let E=f(),O=`${n}/_bulk`,M=`${v.map(B=>{let z={message:B.message,level:y(B.level),timestamp:new Date(B.timestamp).toISOString(),service:process.env.SERVICE_NAME||"unknown",...B.context,...B.error&&{error_name:B.error.name,error_message:B.error.message,error_stack:B.error.stack},...B.metadata&&{metadata:B.metadata}};return`${JSON.stringify({index:{_index:E}})}
|
|
8
8
|
${JSON.stringify(z)}`}).join(`
|
|
9
9
|
`)}
|
|
10
|
-
`,P=await fetch(O,{method:"POST",headers:{"Content-Type":"application/x-ndjson",...g()},body:M,signal:AbortSignal.timeout(p)});if(!P.ok){let B=await P.text().catch(()=>"Unable to read response body");throw(0,Xn.createDetailedError)("ELASTICSEARCH_API_ERROR",t,{status:P.status,statusText:P.statusText,url:O,responseBody:B})}let X=await P.json().catch(()=>null);if(X?.errors&&Array.isArray(X.items)){let B=X.items.filter(z=>z.index?.error).map(z=>z.index?.error).slice(0,3);B?.length>0&&console.warn("[ELASTICSEARCH] Some documents failed to index:",B)}}catch(E){(0,Xn.handleTransportError)(E,t,!0)}},y=v=>{switch(v){case Qn.LogLevel.DEBUG:return"debug";case Qn.LogLevel.INFO:return"info";case Qn.LogLevel.WARN:return"warn";case Qn.LogLevel.ERROR:return"error";case Qn.LogLevel.FATAL:return"fatal";default:return"info"}},b=async()=>{if(d.length===0)return;let v=[...d];d=[],await h(v)};return(()=>{m||(m=setInterval(()=>{b().catch(v=>{(0,Xn.handleTransportError)(v,t,!0)})},l))})(),{log:async v=>{(0,tk.shouldLog)(v.level,s)&&(d.push(v),d.length>=c&&await b())},setLevel:v=>{s=v},getLevel:()=>s,flush:async()=>{await b()},close:async()=>{m&&(clearInterval(m),m=null),await b()},getConfig:()=>({url:n,index:a,indexPattern:u,batchSize:c,flushInterval:l,timeout:p}),getCurrentIndex:()=>f()}}catch(s){throw(0,Xn.handleTransportError)(s,t,!1),s}};vo.createElasticsearchTransport=sk});var mu=T(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.createNewRelicTransport=void 0;var nk=zt(),fn=ks(),rk=ps(),ik=(e={})=>{let t="New Relic";try{let s=e.level??nk.LogLevel.INFO,n=e.apiKey||process.env.NEW_RELIC_LICENSE_KEY,r=e.accountId||process.env.NEW_RELIC_ACCOUNT_ID,i=e.region||process.env.NEW_RELIC_REGION||"us",o=e.serviceName||process.env.NEW_RELIC_SERVICE_NAME,a=e.batchSize||10,u=e.flushInterval||5e3;(0,fn.validateEnvironmentVariable)("NEW_RELIC_LICENSE_KEY",n,!0),(0,fn.validateEnvironmentVariable)("NEW_RELIC_ACCOUNT_ID",r,!0),(0,fn.validateTransportConfig)(t,{apiKey:n,accountId:r},["apiKey","accountId"]);let c=[],l=null,p=async f=>{try{let g=`https://log-api.${i}.newrelic.com/log/v1`,h={timestamp:Date.now(),service:o,attributes:{logtype:"application",timestamp:new Date().toISOString()},logs:f.map(b=>({message:b.message,level:b.level,timestamp:new Date(b.timestamp).getTime(),attributes:{...b.context,...b.error&&{error_name:b.error.name,error_message:b.error.message,error_stack:b.error.stack},...b.metadata&&{metadata:b.metadata}}}))},y=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json","Api-Key":n,"X-License-Key":n},body:JSON.stringify(h)});if(!y.ok)throw(0,fn.createDetailedError)("NEW_RELIC_API_ERROR",t,{status:y.status,statusText:y.statusText,url:g,responseBody:await y.text().catch(()=>"Unable to read response body")})}catch(g){(0,fn.handleTransportError)(g,t,!0)}},d=async()=>{if(c.length===0)return;let f=[...c];c=[],await p(f)};return(()=>{l||(l=setInterval(()=>{d().catch(f=>{(0,fn.handleTransportError)(f,t,!0)})},u))})(),{log:async f=>{(0,rk.shouldLog)(f.level,s)&&(c.push(f),c.length>=a&&await d())},setLevel:f=>{s=f},getLevel:()=>s,flush:async()=>{await d()},close:async()=>{l&&(clearInterval(l),l=null),await d()}}}catch(s){throw(0,fn.handleTransportError)(s,t,!1),s}};Co.createNewRelicTransport=ik});var wy=T(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.createFileTransport=void 0;var xt=require("node:fs"),
|
|
10
|
+
`,P=await fetch(O,{method:"POST",headers:{"Content-Type":"application/x-ndjson",...g()},body:M,signal:AbortSignal.timeout(p)});if(!P.ok){let B=await P.text().catch(()=>"Unable to read response body");throw(0,Xn.createDetailedError)("ELASTICSEARCH_API_ERROR",t,{status:P.status,statusText:P.statusText,url:O,responseBody:B})}let X=await P.json().catch(()=>null);if(X?.errors&&Array.isArray(X.items)){let B=X.items.filter(z=>z.index?.error).map(z=>z.index?.error).slice(0,3);B?.length>0&&console.warn("[ELASTICSEARCH] Some documents failed to index:",B)}}catch(E){(0,Xn.handleTransportError)(E,t,!0)}},y=v=>{switch(v){case Qn.LogLevel.DEBUG:return"debug";case Qn.LogLevel.INFO:return"info";case Qn.LogLevel.WARN:return"warn";case Qn.LogLevel.ERROR:return"error";case Qn.LogLevel.FATAL:return"fatal";default:return"info"}},b=async()=>{if(d.length===0)return;let v=[...d];d=[],await h(v)};return(()=>{m||(m=setInterval(()=>{b().catch(v=>{(0,Xn.handleTransportError)(v,t,!0)})},l))})(),{log:async v=>{(0,tk.shouldLog)(v.level,s)&&(d.push(v),d.length>=c&&await b())},setLevel:v=>{s=v},getLevel:()=>s,flush:async()=>{await b()},close:async()=>{m&&(clearInterval(m),m=null),await b()},getConfig:()=>({url:n,index:a,indexPattern:u,batchSize:c,flushInterval:l,timeout:p}),getCurrentIndex:()=>f()}}catch(s){throw(0,Xn.handleTransportError)(s,t,!1),s}};vo.createElasticsearchTransport=sk});var mu=T(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.createNewRelicTransport=void 0;var nk=zt(),fn=ks(),rk=ps(),ik=(e={})=>{let t="New Relic";try{let s=e.level??nk.LogLevel.INFO,n=e.apiKey||process.env.NEW_RELIC_LICENSE_KEY,r=e.accountId||process.env.NEW_RELIC_ACCOUNT_ID,i=e.region||process.env.NEW_RELIC_REGION||"us",o=e.serviceName||process.env.NEW_RELIC_SERVICE_NAME,a=e.batchSize||10,u=e.flushInterval||5e3;(0,fn.validateEnvironmentVariable)("NEW_RELIC_LICENSE_KEY",n,!0),(0,fn.validateEnvironmentVariable)("NEW_RELIC_ACCOUNT_ID",r,!0),(0,fn.validateTransportConfig)(t,{apiKey:n,accountId:r},["apiKey","accountId"]);let c=[],l=null,p=async f=>{try{let g=`https://log-api.${i}.newrelic.com/log/v1`,h={timestamp:Date.now(),service:o,attributes:{logtype:"application",timestamp:new Date().toISOString()},logs:f.map(b=>({message:b.message,level:b.level,timestamp:new Date(b.timestamp).getTime(),attributes:{...b.context,...b.error&&{error_name:b.error.name,error_message:b.error.message,error_stack:b.error.stack},...b.metadata&&{metadata:b.metadata}}}))},y=await fetch(g,{method:"POST",headers:{"Content-Type":"application/json","Api-Key":n,"X-License-Key":n},body:JSON.stringify(h)});if(!y.ok)throw(0,fn.createDetailedError)("NEW_RELIC_API_ERROR",t,{status:y.status,statusText:y.statusText,url:g,responseBody:await y.text().catch(()=>"Unable to read response body")})}catch(g){(0,fn.handleTransportError)(g,t,!0)}},d=async()=>{if(c.length===0)return;let f=[...c];c=[],await p(f)};return(()=>{l||(l=setInterval(()=>{d().catch(f=>{(0,fn.handleTransportError)(f,t,!0)})},u))})(),{log:async f=>{(0,rk.shouldLog)(f.level,s)&&(c.push(f),c.length>=a&&await d())},setLevel:f=>{s=f},getLevel:()=>s,flush:async()=>{await d()},close:async()=>{l&&(clearInterval(l),l=null),await d()}}}catch(s){throw(0,fn.handleTransportError)(s,t,!1),s}};Co.createNewRelicTransport=ik});var wy=T(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.createFileTransport=void 0;var xt=require("node:fs"),Kr=require("node:path"),ok=require("node:util"),ak=require("node:zlib"),ck=zt(),Ts=ks(),uk=ps(),lk=(0,ok.promisify)(ak.gzip),pk=(e={})=>{let t="File";try{let s=e.level??ck.LogLevel.INFO,n=e.formatter||{format:M=>JSON.stringify(M)},r=e.filePath||process.env.LOG_FILE_PATH||"./logs/app.log",i=e.maxFileSize??10*1024*1024,o=e.maxFiles??5,a=e.rotationInterval??24*60*60*1e3,u=e.compressOldFiles??!1,c=e.dateFormat??"YYYY-MM-DD",l=e.encoding??"utf8",p=e.createSymlink??!1,d=e.symlinkName??"current.log";(0,Ts.validateEnvironmentVariable)("LOG_FILE_PATH",r,!1),(0,Ts.validateTransportConfig)(t,{filePath:r},["filePath"]);let m={currentFile:r,currentSize:0,lastRotation:Date.now()},f=null,g=async M=>{let P=(0,Kr.dirname)(M);try{await xt.promises.access(P)}catch{await xt.promises.mkdir(P,{recursive:!0})}},h=(M,P)=>{let X=(0,Kr.extname)(M),B=M.replace(X,""),z=new Date().toISOString().split("T")[0];return`${B}.${z}.${P}${X}${u?".gz":""}`},y=()=>{let M=Date.now()-m.lastRotation;return m.currentSize>=i||M>=a},b=async M=>{if(u)try{let P=await xt.promises.readFile(M,l),X=await lk(P);await xt.promises.writeFile(`${M}.gz`,X),await xt.promises.unlink(M)}catch(P){(0,Ts.handleTransportError)(P,t,!0)}},x=async()=>{try{m.fileHandle&&(await m.fileHandle.close(),m.fileHandle=void 0);for(let P=o-1;P>=1;P--){let X=h(r,P),B=h(r,P+1);try{await xt.promises.access(X),await xt.promises.rename(X,B)}catch{}}let M=h(r,1);try{await xt.promises.access(r),await xt.promises.rename(r,M),await b(M)}catch{}if(m.currentSize=0,m.lastRotation=Date.now(),await g(r),m.fileHandle=await xt.promises.open(r,"a"),p){let P=(0,Kr.join)((0,Kr.dirname)(r),d);try{await xt.promises.unlink(P)}catch{}await xt.promises.symlink((0,Kr.basename)(r),P)}console.log(`[FILE] Rotated log file to: ${M}`)}catch(M){(0,Ts.handleTransportError)(M,t,!0)}},v=async M=>{try{y()&&await x(),m.fileHandle||(await g(r),m.fileHandle=await xt.promises.open(r,"a"));let P=`${M}
|
|
11
11
|
`;await m.fileHandle.write(P,void 0,l),m.currentSize+=P.length}catch(P){(0,Ts.handleTransportError)(P,t,!0)}},E=async()=>{try{m.fileHandle&&await m.fileHandle.sync()}catch(M){(0,Ts.handleTransportError)(M,t,!0)}};return(()=>{f||(f=setInterval(()=>{E().catch(M=>{(0,Ts.handleTransportError)(M,t,!0)})},5e3))})(),{log:async M=>{if(!(0,uk.shouldLog)(M.level,s))return;let P=n.format(M);await v(P)},setLevel:M=>{s=M},getLevel:()=>s,rotate:async()=>{await x()},getCurrentFile:()=>m.currentFile,getCurrentSize:()=>m.currentSize,flush:async()=>{await E()},close:async()=>{f&&(clearInterval(f),f=null),m.fileHandle&&(await m.fileHandle.close(),m.fileHandle=void 0)},getConfig:()=>({filePath:r,maxFileSize:i,maxFiles:o,rotationInterval:a,compressOldFiles:u,dateFormat:c,encoding:l,createSymlink:p,symlinkName:d}),getStats:()=>({currentFile:m.currentFile,currentSize:m.currentSize,lastRotation:m.lastRotation,fileHandleOpen:!!m.fileHandle,flushTimerActive:!!f})}}catch(s){throw(0,Ts.handleTransportError)(s,t,!1),s}};Ao.createFileTransport=pk});var fu=T(os=>{"use strict";var dk=os&&os.__createBinding||(Object.create?function(e,t,s,n){n===void 0&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){n===void 0&&(n=s),e[n]=t[s]}),mk=os&&os.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fk=os&&os.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(s){var n=[];for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(n[n.length]=r);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var s={};if(t!=null)for(var n=e(t),r=0;r<n.length;r++)n[r]!=="default"&&dk(s,t,n[r]);return mk(s,t),s}}();Object.defineProperty(os,"__esModule",{value:!0});os.createCloudWatchTransport=void 0;var gk=zt(),Ps=ks(),hk=ps(),yk=(e={})=>{let t="CloudWatch";try{let s=e.level??gk.LogLevel.INFO,n=e.formatter||{format:v=>JSON.stringify(v)},r=e.logGroupName||process.env.CLOUDWATCH_LOG_GROUP||"/aws/lambda/my-function",i=e.logStreamName||process.env.CLOUDWATCH_LOG_STREAM,o=e.region||process.env.AWS_REGION||"us-east-1",a=e.maxStreamSize??45*1024*1024,u=e.maxStreamAge??23*60*60*1e3,c=e.batchSize||10,l=e.flushInterval||5e3,p=e.timeout||3e4;(0,Ps.validateEnvironmentVariable)("CLOUDWATCH_LOG_GROUP",r,!1),(0,Ps.validateEnvironmentVariable)("AWS_REGION",o,!1),(0,Ps.validateTransportConfig)(t,{logGroupName:r,region:o},["logGroupName","region"]);let d={currentStreamName:i||`${new Date().toISOString().split("T")[0]}-${Date.now()}`,currentStreamSize:0,streamStartTime:Date.now(),sequenceToken:void 0,batch:[]},m=null,f=()=>{let v=Date.now()-d.streamStartTime;return d.currentStreamSize>=a||v>=u},g=()=>{let v=new Date().toISOString().replace(/[:.]/g,"-");return i?`${i}-${v}`:`${new Date().toISOString().split("T")[0]}-${v}`},h=async v=>{try{let{CloudWatchLogsClient:E,PutLogEventsCommand:O,CreateLogStreamCommand:M}=await Promise.resolve().then(()=>fk(require("@aws-sdk/client-cloudwatch-logs"))),P=new E({region:o,requestHandler:{requestTimeout:p}});try{await P.send(new M({logGroupName:r,logStreamName:d.currentStreamName}))}catch(ie){if(ie instanceof Error&&ie.name!=="ResourceAlreadyExistsException")throw ie}let X=v.map(ie=>({timestamp:new Date(ie.timestamp).getTime(),message:n.format(ie)})),B=new O({logGroupName:r,logStreamName:d.currentStreamName,logEvents:X,sequenceToken:d.sequenceToken}),z=await P.send(B);z.nextSequenceToken&&(d.sequenceToken=z.nextSequenceToken);let ne=X.reduce((ie,se)=>ie+se.message.length,0);d.currentStreamSize+=ne}catch(E){if(E instanceof Error&&E.name==="InvalidSequenceTokenException"){let O=E.message.match(/sequenceToken is: (.+)/);if(O){d.sequenceToken=O[1],await h(v);return}}throw E instanceof Error&&E.name==="ResourceNotFoundException"?(0,Ps.createDetailedError)("CLOUDWATCH_LOG_GROUP_NOT_FOUND",t,{logGroupName:r,region:o,message:"Log group does not exist. Create it first in CloudWatch."}):(0,Ps.createDetailedError)("CLOUDWATCH_API_ERROR",t,{error:E instanceof Error?E.message:String(E),logGroupName:r,logStreamName:d.currentStreamName,region:o})}},y=async()=>{try{await b(),d.currentStreamName=g(),d.currentStreamSize=0,d.streamStartTime=Date.now(),d.sequenceToken=void 0,console.log(`[CLOUDWATCH] Rotated to stream: ${d.currentStreamName}`)}catch(v){(0,Ps.handleTransportError)(v,t,!0)}},b=async()=>{if(d.batch.length===0)return;let v=[...d.batch];d.batch=[],await h(v)};return(()=>{m||(m=setInterval(()=>{b().catch(v=>{(0,Ps.handleTransportError)(v,t,!0)})},l))})(),{log:async v=>{(0,hk.shouldLog)(v.level,s)&&(f()&&await y(),d.batch.push(v),d.batch.length>=c&&await b())},setLevel:v=>{s=v},getLevel:()=>s,rotateStream:async()=>{await y()},getCurrentStream:()=>d.currentStreamName,getCurrentStreamSize:()=>d.currentStreamSize,flush:async()=>{await b()},close:async()=>{m&&(clearInterval(m),m=null),await b()},getConfig:()=>({logGroupName:r,logStreamName:d.currentStreamName,region:o,maxStreamSize:a,maxStreamAge:u,batchSize:c,flushInterval:l,timeout:p}),getStats:()=>({currentStream:d.currentStreamName,currentStreamSize:d.currentStreamSize,streamAge:Date.now()-d.streamStartTime,batchSize:d.batch.length,sequenceToken:d.sequenceToken?"set":"not set",flushTimerActive:!!m})}}catch(s){throw(0,Ps.handleTransportError)(s,t,!1),s}};os.createCloudWatchTransport=yk});var Ey=T(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.createPerformanceMonitor=void 0;var Sk=e=>{let t=e||{metrics:new Map},s=(p,d)=>{t.metrics.has(p)||t.metrics.set(p,[]);let m=t.metrics.get(p);m&&m.push(d)},n=p=>{let d=performance.now();return m=>{let f=performance.now(),g=f-d,h={functionName:p,duration:g,startTime:d,endTime:f,...m&&{metadata:m}};return s(p,h),h}},r=async(p,d,m)=>{let f=performance.now();try{let g=await d(),h=performance.now(),y=h-f,b={functionName:p,duration:y,startTime:f,endTime:h,...m&&{metadata:m}};return s(p,b),g}catch(g){let h=performance.now(),y=h-f,b={functionName:p,duration:y,startTime:f,endTime:h,...m&&{metadata:{...m,error:!0}}};throw s(p,b),g}},i=(p,d,m)=>{let f=performance.now();try{let g=d(),h=performance.now(),y=h-f,b={functionName:p,duration:y,startTime:f,endTime:h,...m&&{metadata:m}};return s(p,b),g}catch(g){let h=performance.now(),y=h-f,b={functionName:p,duration:y,startTime:f,endTime:h,...m&&{metadata:{...m,error:!0}}};throw s(p,b),g}},o=p=>{if(p)return t.metrics.get(p)||[];let d=[];for(let m of t.metrics.values())d.push(...m);return d},a=p=>{let d=o(p);return d.length===0?0:d.reduce((f,g)=>f+g.duration,0)/d.length};return{state:t,startTimer:n,timeAsync:r,timeSync:i,getMetrics:o,getAverageDuration:a,getSlowestExecution:p=>{let d=o(p);return d.length===0?null:d.reduce((m,f)=>f.duration>m.duration?f:m)},clearMetrics:p=>{p?t.metrics.delete(p):t.metrics.clear()},getMetricsSummary:()=>{let p={};for(let[d,m]of t.metrics.entries()){let f=m.length,g=a(d),h=Math.max(...m.map(y=>y.duration));p[d]={count:f,avgDuration:g,maxDuration:h}}return p}}};xo.createPerformanceMonitor=Sk});var Ry=T(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.stroggerWithFileTransport=gn.createFileTransportExample=void 0;var wo=hs(),bk=(e={})=>{let t=e.level??wo.LogLevel.INFO,s=e.maxFileSize??10*1024*1024,n=e.rotationInterval??24*60*60*1e3,r=0,i=Date.now(),o=()=>r>=s||Date.now()-i>=n,a=async()=>{r=0,i=Date.now(),console.log("[MOCK FILE] Rotated log file")},u=async c=>{o()&&await a(),r+=c.length,console.log(`[MOCK FILE] Writing: ${c}`)};return{log:async c=>{if(c.level<t)return;let l=JSON.stringify(c);await u(l)},setLevel:c=>{t=c},getLevel:()=>t}};gn.createFileTransportExample=bk;var Dk=(0,wo.getEnvironment)(),vk=(0,wo.createJsonFormatter)(),Ck=(0,gn.createFileTransportExample)({maxFileSize:1024,rotationInterval:1e4});gn.stroggerWithFileTransport=(0,wo.createLogger)({config:{serviceName:"file-rotation-example"},transports:[Ck],formatter:vk,env:Dk})});var Fy=T(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.loggerWithCloudWatchTransport=hn.createCloudWatchTransportExample=void 0;var Eo=hs(),Ak=(e={})=>{let t=e.level??Eo.LogLevel.INFO,s=e.maxStreamSize??45*1024*1024,n=e.maxStreamAge??23*60*60*1e3,r=0,i=Date.now(),o=()=>r>=s||Date.now()-i>=n,a=async()=>{r=0,i=Date.now(),console.log("[MOCK CW] Rotated log stream")},u=async c=>{o()&&await a(),r+=c.length,console.log(`[MOCK CW] Sending: ${c}`)};return{log:async c=>{if(c.level<t)return;let l=JSON.stringify(c);await u(l)},setLevel:c=>{t=c},getLevel:()=>t}};hn.createCloudWatchTransportExample=Ak;var xk=(0,Eo.getEnvironment)(),wk=(0,Eo.createJsonFormatter)(),Ek=(0,hn.createCloudWatchTransportExample)({maxStreamSize:1024,maxStreamAge:1e4});hn.loggerWithCloudWatchTransport=(0,Eo.createLogger)({config:{serviceName:"cloudwatch-rotation-example"},transports:[Ek],formatter:wk,env:xk})});var By=T((it,Oy)=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.demonstrateEnvironmentSpecificFileTransport=it.demonstrateCustomFileTransport=it.demonstrateMultipleFileTransports=it.demonstrateFileTransportWithSymlink=it.demonstrateCompressedFileTransport=it.demonstrateBasicFileTransport=it.runFileTransportExamples=void 0;var Ee=hs(),Iy=()=>{console.log(`=== Basic File Transport ===
|
|
12
12
|
`);let e=(0,Ee.getEnvironment)(),t=(0,Ee.createJsonFormatter)(),s=(0,Ee.createFileTransport)({level:Ee.LogLevel.INFO,filePath:"./logs/basic-app.log",maxFileSize:5*1024*1024,maxFiles:3}),n=(0,Ee.createLogger)({config:{serviceName:"basic-file-example",stage:e.stage},transports:[s],formatter:t,env:e});return n.info("Application started with basic file transport"),n.warn("This is a warning message"),n.error("This is an error message",{userId:"user-123"}),n};it.demonstrateBasicFileTransport=Iy;var ky=()=>{console.log(`
|
|
13
13
|
=== File Transport with Compression ===
|
|
@@ -47,7 +47,7 @@ ${JSON.stringify(z)}`}).join(`
|
|
|
47
47
|
=== Instance ID in Different Contexts ===
|
|
48
48
|
`);let e=(0,ke.getEnvironment)(),t=(0,ke.createJsonFormatter)(),s=(0,ke.createConsoleTransport)({formatter:t,level:ke.LogLevel.DEBUG}),n=(0,ke.createLogger)({config:{serviceName:"context-example",stage:"dev"},transports:[s],formatter:t,env:e});return console.log("Strogger Instance ID:",n.getInstanceId()),n.logFunctionStart("processOrder",{orderId:"order-123"}),n.logDatabaseOperation("SELECT","users",{table:"users"}),n.logApiRequest("POST","/api/orders",201,{endpoint:"/api/orders"}),n.logFunctionEnd("processOrder",150,{orderId:"order-123"}),n};Nt.demonstrateInstanceIdInContexts=Pk;var Lk=()=>{console.log(`
|
|
49
49
|
=== Manual Instance ID Generation ===
|
|
50
|
-
`);let e=(0,ke.generateLoggerInstanceId)(),t=(0,ke.generateLoggerInstanceId)();console.log("Manually generated ID 1:",e),console.log("Manually generated ID 2:",t);let s=(0,ke.getEnvironment)(),n=(0,ke.createJsonFormatter)(),r=(0,ke.createConsoleTransport)({formatter:n,level:ke.LogLevel.DEBUG}),i=(0,ke.createLogger)({config:{serviceName:"manual-id-1",stage:"dev",instanceId:e},transports:[r],formatter:n,env:s}),o=(0,ke.createLogger)({config:{serviceName:"manual-id-2",stage:"dev",instanceId:t},transports:[r],formatter:n,env:s});return i.info("Using manually generated ID 1"),o.info("Using manually generated ID 2"),{strogger1:i,strogger2:o}};Nt.demonstrateManualGeneration=Lk});var sS=T((ot,tS)=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.demonstrateSchemaConsistency=ot.demonstrateErrorStructuredLogging=ot.demonstratePerformanceStructuredLogging=ot.demonstrateBusinessEventStructuredLogging=ot.demonstrateCorrelatedStructuredLogging=ot.demonstrateBasicStructuredLogging=ot.runStructuredLoggingDemo=void 0;var Zr=hs(),
|
|
50
|
+
`);let e=(0,ke.generateLoggerInstanceId)(),t=(0,ke.generateLoggerInstanceId)();console.log("Manually generated ID 1:",e),console.log("Manually generated ID 2:",t);let s=(0,ke.getEnvironment)(),n=(0,ke.createJsonFormatter)(),r=(0,ke.createConsoleTransport)({formatter:n,level:ke.LogLevel.DEBUG}),i=(0,ke.createLogger)({config:{serviceName:"manual-id-1",stage:"dev",instanceId:e},transports:[r],formatter:n,env:s}),o=(0,ke.createLogger)({config:{serviceName:"manual-id-2",stage:"dev",instanceId:t},transports:[r],formatter:n,env:s});return i.info("Using manually generated ID 1"),o.info("Using manually generated ID 2"),{strogger1:i,strogger2:o}};Nt.demonstrateManualGeneration=Lk});var sS=T((ot,tS)=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.demonstrateSchemaConsistency=ot.demonstrateErrorStructuredLogging=ot.demonstratePerformanceStructuredLogging=ot.demonstrateBusinessEventStructuredLogging=ot.demonstrateCorrelatedStructuredLogging=ot.demonstrateBasicStructuredLogging=ot.runStructuredLoggingDemo=void 0;var Zr=hs(),Vy=(0,Zr.getEnvironment)(),Ky=(0,Zr.createJsonFormatter)(),tt=(0,Zr.createLogger)({config:{serviceName:"structured-logging-demo",stage:Vy.stage,enableStructuredLogging:!0},transports:[(0,Zr.createConsoleTransport)({formatter:Ky,level:Zr.LogLevel.DEBUG})],formatter:Ky,env:Vy}),Zy=()=>{console.log(`=== Basic Structured Logging ===
|
|
51
51
|
`),tt.info("User login successful",{userId:"user-123",email:"user@example.com",loginMethod:"password",ipAddress:"192.168.1.100"}),tt.debug("Processing request",{requestId:"req-456",endpoint:"/api/users",method:"GET",userAgent:"Mozilla/5.0..."}),tt.warn("High memory usage detected",{memoryUsage:"85%",threshold:"80%",serverId:"server-001",timestamp:new Date().toISOString()}),tt.error("Database connection failed",{database:"primary",retryAttempts:3,errorCode:"ECONNREFUSED"},new Error("Connection timeout after 30 seconds"))};ot.demonstrateBasicStructuredLogging=Zy;var Yy=()=>{console.log(`
|
|
52
52
|
=== Structured Logging with Correlation ===
|
|
53
53
|
`);let e="corr-789",t="trace-abc123";tt.info("Request started",{correlationId:e,traceId:t,requestId:"req-789",userId:"user-456",endpoint:"/api/orders",method:"POST"}),tt.debug("Validating order data",{correlationId:e,traceId:t,orderId:"order-123",items:3,totalAmount:150}),tt.info("Order created successfully",{correlationId:e,traceId:t,orderId:"order-123",status:"confirmed",processingTime:150})};ot.demonstrateCorrelatedStructuredLogging=Yy;var Jy=()=>{console.log(`
|
|
@@ -70,32 +70,32 @@ ${JSON.stringify(z)}`}).join(`
|
|
|
70
70
|
`),s.info("Mixed approach - conventional createLogger with branded transports")};bt.demonstrateMixedUsage=Mk;var Nk=()=>{console.log(`\u{1F3A8} Running Branded API Examples
|
|
71
71
|
`);try{(0,bt.demonstrateBrandedAPI)(),(0,bt.demonstrateAPIComparison)(),(0,bt.demonstrateMixedUsage)(),console.log(`
|
|
72
72
|
\u2705 All branded API examples completed!`),console.log(`
|
|
73
|
-
\u{1F4A1} Benefits of Branded API:`),console.log(" \u2022 Clear brand ownership"),console.log(" \u2022 Consistent naming convention"),console.log(" \u2022 Easy to identify Strogger functions"),console.log(" \u2022 No breaking changes - conventional API still works")}catch(e){console.error("\u274C Error running branded API examples:",e)}};bt.runBrandedAPIExamples=Nk;require.main===nS&&(0,bt.runBrandedAPIExamples)()});var hs=T(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.demonstrateAutomaticInstanceId=L.runCloudWatchTransportExamples=L.runFileTransportExamples=L.createCloudWatchTransportExample=L.createFileTransportExample=L.createBatchedLogger=L.createBatchedTransport=L.generateLoggerInstanceId=L.generateSpanId=L.generateTraceId=L.generateCorrelationId=L.createLoggerInstanceEnricher=L.createUserEnricher=L.createEnvironmentEnricher=L.createSessionEnricher=L.createCorrelationEnricher=L.createEnrichmentMiddleware=L.createDefaultEnrichmentMiddleware=L.createSampler=L.createRateLimiter=L.createLogFilter=L.validateTransportConfig=L.validateEnvironmentVariable=L.handleTransportError=L.createDetailedError=L.ERROR_MESSAGES=L.ValidationError=L.ConfigurationError=L.TransportError=L.LoggerError=L.createPerformanceMonitor=L.getEnvironment=L.createStroggerCloudWatchTransport=L.createStroggerNewRelicTransport=L.createStroggerElasticsearchTransport=L.createStroggerSplunkTransport=L.createStroggerDataDogTransport=L.createStroggerConsoleTransport=L.createCloudWatchTransport=L.createFileTransport=L.createNewRelicTransport=L.createElasticsearchTransport=L.createSplunkTransport=L.createDataDogTransport=L.createConsoleTransport=L.createJsonFormatter=L.LogLevel=L.strogger=L.createStrogger=L.createLogger=void 0;L.printLoggerConfig=L.shouldLog=L.runBrandedAPIExamples=L.runStructuredLoggingDemo=L.demonstrateManualGeneration=L.demonstrateInstanceIdInContexts=L.demonstrateMultipleInstances=L.demonstrateCustomInstanceId=void 0;var gu=cu();Object.defineProperty(L,"createLogger",{enumerable:!0,get:function(){return gu.createLogger}});Object.defineProperty(L,"createStrogger",{enumerable:!0,get:function(){return gu.createStrogger}});Object.defineProperty(L,"strogger",{enumerable:!0,get:function(){return gu.strogger}});var Wk=zt();Object.defineProperty(L,"LogLevel",{enumerable:!0,get:function(){return Wk.LogLevel}});var Uk=Vc();Object.defineProperty(L,"createJsonFormatter",{enumerable:!0,get:function(){return Uk.createJsonFormatter}});var jk=co();Object.defineProperty(L,"createConsoleTransport",{enumerable:!0,get:function(){return jk.createConsoleTransport}});var $k=lu();Object.defineProperty(L,"createDataDogTransport",{enumerable:!0,get:function(){return $k.createDataDogTransport}});var Gk=pu();Object.defineProperty(L,"createSplunkTransport",{enumerable:!0,get:function(){return Gk.createSplunkTransport}});var Hk=du();Object.defineProperty(L,"createElasticsearchTransport",{enumerable:!0,get:function(){return Hk.createElasticsearchTransport}});var zk=mu();Object.defineProperty(L,"createNewRelicTransport",{enumerable:!0,get:function(){return zk.createNewRelicTransport}});var qk=wy();Object.defineProperty(L,"createFileTransport",{enumerable:!0,get:function(){return qk.createFileTransport}});var Kk=fu();Object.defineProperty(L,"createCloudWatchTransport",{enumerable:!0,get:function(){return Kk.createCloudWatchTransport}});var Vk=co();Object.defineProperty(L,"createStroggerConsoleTransport",{enumerable:!0,get:function(){return Vk.createConsoleTransport}});var Zk=lu();Object.defineProperty(L,"createStroggerDataDogTransport",{enumerable:!0,get:function(){return Zk.createDataDogTransport}});var Yk=pu();Object.defineProperty(L,"createStroggerSplunkTransport",{enumerable:!0,get:function(){return Yk.createSplunkTransport}});var Jk=du();Object.defineProperty(L,"createStroggerElasticsearchTransport",{enumerable:!0,get:function(){return Jk.createElasticsearchTransport}});var Qk=mu();Object.defineProperty(L,"createStroggerNewRelicTransport",{enumerable:!0,get:function(){return Qk.createNewRelicTransport}});var Xk=fu();Object.defineProperty(L,"createStroggerCloudWatchTransport",{enumerable:!0,get:function(){return Xk.createCloudWatchTransport}});var eT=ou();Object.defineProperty(L,"getEnvironment",{enumerable:!0,get:function(){return eT.getEnvironment}});var tT=Ey();Object.defineProperty(L,"createPerformanceMonitor",{enumerable:!0,get:function(){return tT.createPerformanceMonitor}});var ys=ks();Object.defineProperty(L,"LoggerError",{enumerable:!0,get:function(){return ys.LoggerError}});Object.defineProperty(L,"TransportError",{enumerable:!0,get:function(){return ys.TransportError}});Object.defineProperty(L,"ConfigurationError",{enumerable:!0,get:function(){return ys.ConfigurationError}});Object.defineProperty(L,"ValidationError",{enumerable:!0,get:function(){return ys.ValidationError}});Object.defineProperty(L,"ERROR_MESSAGES",{enumerable:!0,get:function(){return ys.ERROR_MESSAGES}});Object.defineProperty(L,"createDetailedError",{enumerable:!0,get:function(){return ys.createDetailedError}});Object.defineProperty(L,"handleTransportError",{enumerable:!0,get:function(){return ys.handleTransportError}});Object.defineProperty(L,"validateEnvironmentVariable",{enumerable:!0,get:function(){return ys.validateEnvironmentVariable}});Object.defineProperty(L,"validateTransportConfig",{enumerable:!0,get:function(){return ys.validateTransportConfig}});var hu=au();Object.defineProperty(L,"createLogFilter",{enumerable:!0,get:function(){return hu.createLogFilter}});Object.defineProperty(L,"createRateLimiter",{enumerable:!0,get:function(){return hu.createRateLimiter}});Object.defineProperty(L,"createSampler",{enumerable:!0,get:function(){return hu.createSampler}});var Kt=Jc();Object.defineProperty(L,"createDefaultEnrichmentMiddleware",{enumerable:!0,get:function(){return Kt.createDefaultEnrichmentMiddleware}});Object.defineProperty(L,"createEnrichmentMiddleware",{enumerable:!0,get:function(){return Kt.createEnrichmentMiddleware}});Object.defineProperty(L,"createCorrelationEnricher",{enumerable:!0,get:function(){return Kt.createCorrelationEnricher}});Object.defineProperty(L,"createSessionEnricher",{enumerable:!0,get:function(){return Kt.createSessionEnricher}});Object.defineProperty(L,"createEnvironmentEnricher",{enumerable:!0,get:function(){return Kt.createEnvironmentEnricher}});Object.defineProperty(L,"createUserEnricher",{enumerable:!0,get:function(){return Kt.createUserEnricher}});Object.defineProperty(L,"createLoggerInstanceEnricher",{enumerable:!0,get:function(){return Kt.createLoggerInstanceEnricher}});Object.defineProperty(L,"generateCorrelationId",{enumerable:!0,get:function(){return Kt.generateCorrelationId}});Object.defineProperty(L,"generateTraceId",{enumerable:!0,get:function(){return Kt.generateTraceId}});Object.defineProperty(L,"generateSpanId",{enumerable:!0,get:function(){return Kt.generateSpanId}});Object.defineProperty(L,"generateLoggerInstanceId",{enumerable:!0,get:function(){return Kt.generateLoggerInstanceId}});var iS=Yc();Object.defineProperty(L,"createBatchedTransport",{enumerable:!0,get:function(){return iS.createBatchedTransport}});Object.defineProperty(L,"createBatchedLogger",{enumerable:!0,get:function(){return iS.createBatchedLogger}});var sT=Ry();Object.defineProperty(L,"createFileTransportExample",{enumerable:!0,get:function(){return sT.createFileTransportExample}});var nT=Fy();Object.defineProperty(L,"createCloudWatchTransportExample",{enumerable:!0,get:function(){return nT.createCloudWatchTransportExample}});var rT=By();Object.defineProperty(L,"runFileTransportExamples",{enumerable:!0,get:function(){return rT.runFileTransportExamples}});var iT=zy();Object.defineProperty(L,"runCloudWatchTransportExamples",{enumerable:!0,get:function(){return iT.runCloudWatchTransportExamples}});var Yr=qy();Object.defineProperty(L,"demonstrateAutomaticInstanceId",{enumerable:!0,get:function(){return Yr.demonstrateAutomaticInstanceId}});Object.defineProperty(L,"demonstrateCustomInstanceId",{enumerable:!0,get:function(){return Yr.demonstrateCustomInstanceId}});Object.defineProperty(L,"demonstrateMultipleInstances",{enumerable:!0,get:function(){return Yr.demonstrateMultipleInstances}});Object.defineProperty(L,"demonstrateInstanceIdInContexts",{enumerable:!0,get:function(){return Yr.demonstrateInstanceIdInContexts}});Object.defineProperty(L,"demonstrateManualGeneration",{enumerable:!0,get:function(){return Yr.demonstrateManualGeneration}});var oT=sS();Object.defineProperty(L,"runStructuredLoggingDemo",{enumerable:!0,get:function(){return oT.runStructuredLoggingDemo}});var aT=rS();Object.defineProperty(L,"runBrandedAPIExamples",{enumerable:!0,get:function(){return aT.runBrandedAPIExamples}});var cT=ps();Object.defineProperty(L,"shouldLog",{enumerable:!0,get:function(){return cT.shouldLog}});var uT=cu();Object.defineProperty(L,"printLoggerConfig",{enumerable:!0,get:function(){return uT.printLoggerConfig}})});var xS={};xi(xS,{BOX_TRACE_MIN_VERSION:()=>AS,__resetDetectCdkVersionCache:()=>AT,compareSemver:()=>nr,detectCdkVersion:()=>rr});var vS,CS,AS,nr,Qr,rr,AT,To=ep(()=>{"use strict";vS=Z(require("node:fs")),CS=require("node:module"),AS="2.252.0",nr=(e,t)=>{let s=i=>i.replace(/[-+].*$/,"").split(".").map(o=>Number.parseInt(o,10)||0),n=s(e),r=s(t);for(let i=0;i<Math.max(n.length,r.length);i++){let o=(n[i]??0)-(r[i]??0);if(o!==0)return o}return 0},Qr=null,rr=e=>{let t=e??process.cwd();if(Qr&&Qr.cwd===t)return Qr.info;let s=null;try{let i=(0,CS.createRequire)(`${t}/__cdk-insights-anchor__.js`).resolve("aws-cdk-lib/package.json"),o=JSON.parse(vS.readFileSync(i,"utf-8"));typeof o.version=="string"&&(s=o.version)}catch{}let n={version:s,supportsBoxTraces:s!==null&&nr(s,AS)>=0};return Qr={cwd:t,info:n},n},AT=()=>{Qr=null}});var Fb=T((p9,PP)=>{PP.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var $u=T((d9,kb)=>{"use strict";var Vo=Object.assign({},Fb()),Ib=Object.keys(Vo);Object.defineProperty(Vo,"random",{get(){let e=Math.floor(Math.random()*Ib.length),t=Ib[e];return Vo[t]}});kb.exports=Vo});var Bb=T((x9,Ob)=>{Ob.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Wb=T((G9,Nb)=>{var Xu=class{constructor(t,s,n){this.etaBufferLength=t||100,this.valueBuffer=[n],this.timeBuffer=[s],this.eta="0"}update(t,s,n){this.valueBuffer.push(s),this.timeBuffer.push(t),this.calculate(n-s)}getTime(){return this.eta}calculate(t){let s=this.valueBuffer.length,n=Math.min(this.etaBufferLength,s),r=this.valueBuffer[s-1]-this.valueBuffer[s-n],i=this.timeBuffer[s-1]-this.timeBuffer[s-n],o=r/i;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(t/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};Nb.exports=Xu});var tl=T((H9,Ub)=>{var vn=require("readline"),el=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,s=null){this.stream.isTTY&&vn.cursorTo(this.stream,t,s)}cursorRelative(t=null,s=null){this.stream.isTTY&&(this.dy=this.dy+s,vn.moveCursor(this.stream,t,s))}cursorRelativeReset(){this.stream.isTTY&&(vn.moveCursor(this.stream,0,-this.dy),vn.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&vn.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&vn.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&vn.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
74
|
-
`),this.dy++}write(t,s=!1){this.linewrap===!0&&s===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Ub.exports=el});var $b=T((z9,jb)=>{"use strict";jb.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Hb=T((q9,Gb)=>{"use strict";var GP=$b();Gb.exports=e=>typeof e=="string"?e.replace(GP(),""):e});var qb=T((K9,sl)=>{"use strict";var zb=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);sl.exports=zb;sl.exports.default=zb});var Vb=T((V9,Kb)=>{"use strict";Kb.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var rl=T((Z9,nl)=>{"use strict";var HP=Hb(),zP=qb(),qP=Vb(),Zb=e=>{if(typeof e!="string"||e.length===0||(e=HP(e),e.length===0))return 0;e=e.replace(qP()," ");let t=0;for(let s=0;s<e.length;s++){let n=e.codePointAt(s);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&s++,t+=zP(n)?2:1)}return t};nl.exports=Zb;nl.exports.default=Zb});var il=T((Y9,Yb)=>{Yb.exports=function(t,s,n){if(s.autopadding!==!0)return t;function r(i,o){return(s.autopaddingChar+i).slice(-o)}switch(n){case"percentage":return r(t,3);default:return t}}});var ol=T((J9,Jb)=>{Jb.exports=function(t,s){let n=Math.round(t*s.barsize),r=s.barsize-n;return s.barCompleteString.substr(0,n)+s.barGlue+s.barIncompleteString.substr(0,r)}});var al=T((Q9,Qb)=>{Qb.exports=function(t,s,n){function r(o){return n?n*Math.round(o/n):o}function i(o){return(s.autopaddingChar+o).slice(-2)}return t>3600?i(Math.floor(t/3600))+"h"+i(r(t%3600/60))+"m":t>60?i(Math.floor(t/60))+"m"+i(r(t%60))+"s":t>10?i(r(t))+"s":i(t)+"s"}});var cl=T((X9,Xb)=>{var KP=rl(),VP=il(),ZP=ol(),YP=al();Xb.exports=function(t,s,n){let r=t.format,i=t.formatTime||YP,o=t.formatValue||VP,a=t.formatBar||ZP,u=Math.floor(s.progress*100)+"",c=s.stopTime||Date.now(),l=Math.round((c-s.startTime)/1e3),p=Object.assign({},n,{bar:a(s.progress,t),percentage:o(u,t,"percentage"),total:o(s.total,t,"total"),value:o(s.value,t,"value"),eta:o(s.eta,t,"eta"),eta_formatted:i(s.eta,t,5),duration:o(l,t,"duration"),duration_formatted:i(l,t,1)});r=r.replace(/\{(\w+)\}/g,function(f,g){return typeof p[g]<"u"?p[g]:f});let d=Math.max(0,s.maxWidth-KP(r)-2),m=Math.floor(d/2);switch(t.align){case"right":r=d>0?" ".repeat(d)+r:r;break;case"center":r=m>0?" ".repeat(m)+r:r;break;case"left":default:break}return r}});var Jo=T((eK,eD)=>{function Oe(e,t){return typeof e>"u"||e===null?t:e}eD.exports={parse:function(t,s){let n={},r=Object.assign({},s,t);return n.throttleTime=1e3/Oe(r.fps,10),n.stream=Oe(r.stream,process.stderr),n.terminal=Oe(r.terminal,null),n.clearOnComplete=Oe(r.clearOnComplete,!1),n.stopOnComplete=Oe(r.stopOnComplete,!1),n.barsize=Oe(r.barsize,40),n.align=Oe(r.align,"left"),n.hideCursor=Oe(r.hideCursor,!1),n.linewrap=Oe(r.linewrap,!1),n.barGlue=Oe(r.barGlue,""),n.barCompleteChar=Oe(r.barCompleteChar,"="),n.barIncompleteChar=Oe(r.barIncompleteChar,"-"),n.format=Oe(r.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Oe(r.formatTime,null),n.formatValue=Oe(r.formatValue,null),n.formatBar=Oe(r.formatBar,null),n.etaBufferLength=Oe(r.etaBuffer,10),n.etaAsynchronousUpdate=Oe(r.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Oe(r.progressCalculationRelative,!1),n.synchronousUpdate=Oe(r.synchronousUpdate,!0),n.noTTYOutput=Oe(r.noTTYOutput,!1),n.notTTYSchedule=Oe(r.notTTYSchedule,2e3),n.emptyOnZero=Oe(r.emptyOnZero,!1),n.forceRedraw=Oe(r.forceRedraw,!1),n.autopadding=Oe(r.autopadding,!1),n.gracefulExit=Oe(r.gracefulExit,!1),n},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?Oe(t.autopaddingChar," "):"",t}}});var ul=T((sK,sD)=>{var tD=Wb(),JP=tl(),QP=cl(),XP=Jo(),eL=require("events");sD.exports=class extends eL{constructor(t){super(),this.options=XP.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new JP(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new tD(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:QP}render(t=!1){let s={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,s,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,s,n){this.value=s||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=s||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new tD(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,s)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,s={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let n=(typeof t=="object"?t:s)||{};this.emit("update",this.total,this.value);for(let r in n)this.payload[r]=n[r];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,s={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,s)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var rD=T((rK,nD)=>{var tL=ul(),sL=Jo();nD.exports=class extends tL{constructor(t,s){super(sL.parse(t,s)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,s){this.timer&&(super.update(t,s),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,s,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,s,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var oD=T((oK,iD)=>{var nL=tl(),rL=ul(),iL=Jo(),oL=require("events");iD.exports=class extends oL{constructor(t,s){super(),this.bars=[],this.options=iL.parse(t,s),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new nL(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,s,n,r={}){let i=new rL(Object.assign({},this.options,{terminal:this.terminal},r));return this.bars.push(i),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,i.start(t,s,n),this.emit("start")),i}remove(t){let s=this.bars.indexOf(t);return s<0?!1:(this.bars.splice(s,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var cD=T((aK,aD)=>{aD.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var lD=T((cK,uD)=>{uD.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var dD=T((uK,pD)=>{pD.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var fD=T((lK,mD)=>{mD.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var hD=T((pK,gD)=>{var aL=cD(),cL=lD(),uL=dD(),lL=fD();gD.exports={legacy:aL,shades_classic:cL,shades_grey:uL,rect:lL}});var bD=T((dK,SD)=>{var yD=rD(),pL=oD(),dL=hD(),mL=cl(),fL=il(),gL=ol(),hL=al();SD.exports={Bar:yD,SingleBar:yD,MultiBar:pL,Presets:dL,Format:{Formatter:mL,BarFormat:gL,ValueFormat:fL,TimeFormat:hL}}});var sa=T((pV,nv)=>{var wl=[],sv=0,ut=(e,t)=>{sv>=t&&wl.push(e)};ut.WARN=1;ut.INFO=2;ut.DEBUG=3;ut.reset=()=>{wl=[]};ut.setDebugLevel=e=>{sv=e};ut.warn=e=>ut(e,ut.WARN);ut.info=e=>ut(e,ut.INFO);ut.debug=e=>ut(e,ut.DEBUG);ut.debugMessages=()=>wl;nv.exports=ut});var El=T((dV,av)=>{var rv=rl();function na(e){return e?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function as(e){let t=na();return(""+e).replace(t,"").split(`
|
|
73
|
+
\u{1F4A1} Benefits of Branded API:`),console.log(" \u2022 Clear brand ownership"),console.log(" \u2022 Consistent naming convention"),console.log(" \u2022 Easy to identify Strogger functions"),console.log(" \u2022 No breaking changes - conventional API still works")}catch(e){console.error("\u274C Error running branded API examples:",e)}};bt.runBrandedAPIExamples=Nk;require.main===nS&&(0,bt.runBrandedAPIExamples)()});var hs=T(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.demonstrateAutomaticInstanceId=L.runCloudWatchTransportExamples=L.runFileTransportExamples=L.createCloudWatchTransportExample=L.createFileTransportExample=L.createBatchedLogger=L.createBatchedTransport=L.generateLoggerInstanceId=L.generateSpanId=L.generateTraceId=L.generateCorrelationId=L.createLoggerInstanceEnricher=L.createUserEnricher=L.createEnvironmentEnricher=L.createSessionEnricher=L.createCorrelationEnricher=L.createEnrichmentMiddleware=L.createDefaultEnrichmentMiddleware=L.createSampler=L.createRateLimiter=L.createLogFilter=L.validateTransportConfig=L.validateEnvironmentVariable=L.handleTransportError=L.createDetailedError=L.ERROR_MESSAGES=L.ValidationError=L.ConfigurationError=L.TransportError=L.LoggerError=L.createPerformanceMonitor=L.getEnvironment=L.createStroggerCloudWatchTransport=L.createStroggerNewRelicTransport=L.createStroggerElasticsearchTransport=L.createStroggerSplunkTransport=L.createStroggerDataDogTransport=L.createStroggerConsoleTransport=L.createCloudWatchTransport=L.createFileTransport=L.createNewRelicTransport=L.createElasticsearchTransport=L.createSplunkTransport=L.createDataDogTransport=L.createConsoleTransport=L.createJsonFormatter=L.LogLevel=L.strogger=L.createStrogger=L.createLogger=void 0;L.printLoggerConfig=L.shouldLog=L.runBrandedAPIExamples=L.runStructuredLoggingDemo=L.demonstrateManualGeneration=L.demonstrateInstanceIdInContexts=L.demonstrateMultipleInstances=L.demonstrateCustomInstanceId=void 0;var gu=cu();Object.defineProperty(L,"createLogger",{enumerable:!0,get:function(){return gu.createLogger}});Object.defineProperty(L,"createStrogger",{enumerable:!0,get:function(){return gu.createStrogger}});Object.defineProperty(L,"strogger",{enumerable:!0,get:function(){return gu.strogger}});var Wk=zt();Object.defineProperty(L,"LogLevel",{enumerable:!0,get:function(){return Wk.LogLevel}});var Uk=Kc();Object.defineProperty(L,"createJsonFormatter",{enumerable:!0,get:function(){return Uk.createJsonFormatter}});var jk=co();Object.defineProperty(L,"createConsoleTransport",{enumerable:!0,get:function(){return jk.createConsoleTransport}});var $k=lu();Object.defineProperty(L,"createDataDogTransport",{enumerable:!0,get:function(){return $k.createDataDogTransport}});var Gk=pu();Object.defineProperty(L,"createSplunkTransport",{enumerable:!0,get:function(){return Gk.createSplunkTransport}});var Hk=du();Object.defineProperty(L,"createElasticsearchTransport",{enumerable:!0,get:function(){return Hk.createElasticsearchTransport}});var zk=mu();Object.defineProperty(L,"createNewRelicTransport",{enumerable:!0,get:function(){return zk.createNewRelicTransport}});var qk=wy();Object.defineProperty(L,"createFileTransport",{enumerable:!0,get:function(){return qk.createFileTransport}});var Vk=fu();Object.defineProperty(L,"createCloudWatchTransport",{enumerable:!0,get:function(){return Vk.createCloudWatchTransport}});var Kk=co();Object.defineProperty(L,"createStroggerConsoleTransport",{enumerable:!0,get:function(){return Kk.createConsoleTransport}});var Zk=lu();Object.defineProperty(L,"createStroggerDataDogTransport",{enumerable:!0,get:function(){return Zk.createDataDogTransport}});var Yk=pu();Object.defineProperty(L,"createStroggerSplunkTransport",{enumerable:!0,get:function(){return Yk.createSplunkTransport}});var Jk=du();Object.defineProperty(L,"createStroggerElasticsearchTransport",{enumerable:!0,get:function(){return Jk.createElasticsearchTransport}});var Qk=mu();Object.defineProperty(L,"createStroggerNewRelicTransport",{enumerable:!0,get:function(){return Qk.createNewRelicTransport}});var Xk=fu();Object.defineProperty(L,"createStroggerCloudWatchTransport",{enumerable:!0,get:function(){return Xk.createCloudWatchTransport}});var eT=ou();Object.defineProperty(L,"getEnvironment",{enumerable:!0,get:function(){return eT.getEnvironment}});var tT=Ey();Object.defineProperty(L,"createPerformanceMonitor",{enumerable:!0,get:function(){return tT.createPerformanceMonitor}});var ys=ks();Object.defineProperty(L,"LoggerError",{enumerable:!0,get:function(){return ys.LoggerError}});Object.defineProperty(L,"TransportError",{enumerable:!0,get:function(){return ys.TransportError}});Object.defineProperty(L,"ConfigurationError",{enumerable:!0,get:function(){return ys.ConfigurationError}});Object.defineProperty(L,"ValidationError",{enumerable:!0,get:function(){return ys.ValidationError}});Object.defineProperty(L,"ERROR_MESSAGES",{enumerable:!0,get:function(){return ys.ERROR_MESSAGES}});Object.defineProperty(L,"createDetailedError",{enumerable:!0,get:function(){return ys.createDetailedError}});Object.defineProperty(L,"handleTransportError",{enumerable:!0,get:function(){return ys.handleTransportError}});Object.defineProperty(L,"validateEnvironmentVariable",{enumerable:!0,get:function(){return ys.validateEnvironmentVariable}});Object.defineProperty(L,"validateTransportConfig",{enumerable:!0,get:function(){return ys.validateTransportConfig}});var hu=au();Object.defineProperty(L,"createLogFilter",{enumerable:!0,get:function(){return hu.createLogFilter}});Object.defineProperty(L,"createRateLimiter",{enumerable:!0,get:function(){return hu.createRateLimiter}});Object.defineProperty(L,"createSampler",{enumerable:!0,get:function(){return hu.createSampler}});var Vt=Jc();Object.defineProperty(L,"createDefaultEnrichmentMiddleware",{enumerable:!0,get:function(){return Vt.createDefaultEnrichmentMiddleware}});Object.defineProperty(L,"createEnrichmentMiddleware",{enumerable:!0,get:function(){return Vt.createEnrichmentMiddleware}});Object.defineProperty(L,"createCorrelationEnricher",{enumerable:!0,get:function(){return Vt.createCorrelationEnricher}});Object.defineProperty(L,"createSessionEnricher",{enumerable:!0,get:function(){return Vt.createSessionEnricher}});Object.defineProperty(L,"createEnvironmentEnricher",{enumerable:!0,get:function(){return Vt.createEnvironmentEnricher}});Object.defineProperty(L,"createUserEnricher",{enumerable:!0,get:function(){return Vt.createUserEnricher}});Object.defineProperty(L,"createLoggerInstanceEnricher",{enumerable:!0,get:function(){return Vt.createLoggerInstanceEnricher}});Object.defineProperty(L,"generateCorrelationId",{enumerable:!0,get:function(){return Vt.generateCorrelationId}});Object.defineProperty(L,"generateTraceId",{enumerable:!0,get:function(){return Vt.generateTraceId}});Object.defineProperty(L,"generateSpanId",{enumerable:!0,get:function(){return Vt.generateSpanId}});Object.defineProperty(L,"generateLoggerInstanceId",{enumerable:!0,get:function(){return Vt.generateLoggerInstanceId}});var iS=Yc();Object.defineProperty(L,"createBatchedTransport",{enumerable:!0,get:function(){return iS.createBatchedTransport}});Object.defineProperty(L,"createBatchedLogger",{enumerable:!0,get:function(){return iS.createBatchedLogger}});var sT=Ry();Object.defineProperty(L,"createFileTransportExample",{enumerable:!0,get:function(){return sT.createFileTransportExample}});var nT=Fy();Object.defineProperty(L,"createCloudWatchTransportExample",{enumerable:!0,get:function(){return nT.createCloudWatchTransportExample}});var rT=By();Object.defineProperty(L,"runFileTransportExamples",{enumerable:!0,get:function(){return rT.runFileTransportExamples}});var iT=zy();Object.defineProperty(L,"runCloudWatchTransportExamples",{enumerable:!0,get:function(){return iT.runCloudWatchTransportExamples}});var Yr=qy();Object.defineProperty(L,"demonstrateAutomaticInstanceId",{enumerable:!0,get:function(){return Yr.demonstrateAutomaticInstanceId}});Object.defineProperty(L,"demonstrateCustomInstanceId",{enumerable:!0,get:function(){return Yr.demonstrateCustomInstanceId}});Object.defineProperty(L,"demonstrateMultipleInstances",{enumerable:!0,get:function(){return Yr.demonstrateMultipleInstances}});Object.defineProperty(L,"demonstrateInstanceIdInContexts",{enumerable:!0,get:function(){return Yr.demonstrateInstanceIdInContexts}});Object.defineProperty(L,"demonstrateManualGeneration",{enumerable:!0,get:function(){return Yr.demonstrateManualGeneration}});var oT=sS();Object.defineProperty(L,"runStructuredLoggingDemo",{enumerable:!0,get:function(){return oT.runStructuredLoggingDemo}});var aT=rS();Object.defineProperty(L,"runBrandedAPIExamples",{enumerable:!0,get:function(){return aT.runBrandedAPIExamples}});var cT=ps();Object.defineProperty(L,"shouldLog",{enumerable:!0,get:function(){return cT.shouldLog}});var uT=cu();Object.defineProperty(L,"printLoggerConfig",{enumerable:!0,get:function(){return uT.printLoggerConfig}})});var xS={};xi(xS,{BOX_TRACE_MIN_VERSION:()=>AS,__resetDetectCdkVersionCache:()=>AT,compareSemver:()=>nr,detectCdkVersion:()=>rr});var vS,CS,AS,nr,Qr,rr,AT,To=ep(()=>{"use strict";vS=Z(require("node:fs")),CS=require("node:module"),AS="2.252.0",nr=(e,t)=>{let s=i=>i.replace(/[-+].*$/,"").split(".").map(o=>Number.parseInt(o,10)||0),n=s(e),r=s(t);for(let i=0;i<Math.max(n.length,r.length);i++){let o=(n[i]??0)-(r[i]??0);if(o!==0)return o}return 0},Qr=null,rr=e=>{let t=e??process.cwd();if(Qr&&Qr.cwd===t)return Qr.info;let s=null;try{let i=(0,CS.createRequire)(`${t}/__cdk-insights-anchor__.js`).resolve("aws-cdk-lib/package.json"),o=JSON.parse(vS.readFileSync(i,"utf-8"));typeof o.version=="string"&&(s=o.version)}catch{}let n={version:s,supportsBoxTraces:s!==null&&nr(s,AS)>=0};return Qr={cwd:t,info:n},n},AT=()=>{Qr=null}});var Fb=T((p9,PP)=>{PP.exports={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]}}});var $u=T((d9,kb)=>{"use strict";var Ko=Object.assign({},Fb()),Ib=Object.keys(Ko);Object.defineProperty(Ko,"random",{get(){let e=Math.floor(Math.random()*Ib.length),t=Ib[e];return Ko[t]}});kb.exports=Ko});var Bb=T((x9,Ob)=>{Ob.exports=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g});var Wb=T((G9,Nb)=>{var Xu=class{constructor(t,s,n){this.etaBufferLength=t||100,this.valueBuffer=[n],this.timeBuffer=[s],this.eta="0"}update(t,s,n){this.valueBuffer.push(s),this.timeBuffer.push(t),this.calculate(n-s)}getTime(){return this.eta}calculate(t){let s=this.valueBuffer.length,n=Math.min(this.etaBufferLength,s),r=this.valueBuffer[s-1]-this.valueBuffer[s-n],i=this.timeBuffer[s-1]-this.timeBuffer[s-n],o=r/i;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let a=Math.ceil(t/o/1e3);isNaN(a)?this.eta="NULL":isFinite(a)?a>1e7?this.eta="INF":a<0?this.eta=0:this.eta=a:this.eta="INF"}};Nb.exports=Xu});var tl=T((H9,Ub)=>{var vn=require("readline"),el=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,s=null){this.stream.isTTY&&vn.cursorTo(this.stream,t,s)}cursorRelative(t=null,s=null){this.stream.isTTY&&(this.dy=this.dy+s,vn.moveCursor(this.stream,t,s))}cursorRelativeReset(){this.stream.isTTY&&(vn.moveCursor(this.stream,0,-this.dy),vn.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&vn.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&vn.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&vn.clearScreenDown(this.stream)}newline(){this.stream.write(`
|
|
74
|
+
`),this.dy++}write(t,s=!1){this.linewrap===!0&&s===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};Ub.exports=el});var $b=T((z9,jb)=>{"use strict";jb.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Hb=T((q9,Gb)=>{"use strict";var GP=$b();Gb.exports=e=>typeof e=="string"?e.replace(GP(),""):e});var qb=T((V9,sl)=>{"use strict";var zb=e=>Number.isNaN(e)?!1:e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141);sl.exports=zb;sl.exports.default=zb});var Kb=T((K9,Vb)=>{"use strict";Vb.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var rl=T((Z9,nl)=>{"use strict";var HP=Hb(),zP=qb(),qP=Kb(),Zb=e=>{if(typeof e!="string"||e.length===0||(e=HP(e),e.length===0))return 0;e=e.replace(qP()," ");let t=0;for(let s=0;s<e.length;s++){let n=e.codePointAt(s);n<=31||n>=127&&n<=159||n>=768&&n<=879||(n>65535&&s++,t+=zP(n)?2:1)}return t};nl.exports=Zb;nl.exports.default=Zb});var il=T((Y9,Yb)=>{Yb.exports=function(t,s,n){if(s.autopadding!==!0)return t;function r(i,o){return(s.autopaddingChar+i).slice(-o)}switch(n){case"percentage":return r(t,3);default:return t}}});var ol=T((J9,Jb)=>{Jb.exports=function(t,s){let n=Math.round(t*s.barsize),r=s.barsize-n;return s.barCompleteString.substr(0,n)+s.barGlue+s.barIncompleteString.substr(0,r)}});var al=T((Q9,Qb)=>{Qb.exports=function(t,s,n){function r(o){return n?n*Math.round(o/n):o}function i(o){return(s.autopaddingChar+o).slice(-2)}return t>3600?i(Math.floor(t/3600))+"h"+i(r(t%3600/60))+"m":t>60?i(Math.floor(t/60))+"m"+i(r(t%60))+"s":t>10?i(r(t))+"s":i(t)+"s"}});var cl=T((X9,Xb)=>{var VP=rl(),KP=il(),ZP=ol(),YP=al();Xb.exports=function(t,s,n){let r=t.format,i=t.formatTime||YP,o=t.formatValue||KP,a=t.formatBar||ZP,u=Math.floor(s.progress*100)+"",c=s.stopTime||Date.now(),l=Math.round((c-s.startTime)/1e3),p=Object.assign({},n,{bar:a(s.progress,t),percentage:o(u,t,"percentage"),total:o(s.total,t,"total"),value:o(s.value,t,"value"),eta:o(s.eta,t,"eta"),eta_formatted:i(s.eta,t,5),duration:o(l,t,"duration"),duration_formatted:i(l,t,1)});r=r.replace(/\{(\w+)\}/g,function(f,g){return typeof p[g]<"u"?p[g]:f});let d=Math.max(0,s.maxWidth-VP(r)-2),m=Math.floor(d/2);switch(t.align){case"right":r=d>0?" ".repeat(d)+r:r;break;case"center":r=m>0?" ".repeat(m)+r:r;break;case"left":default:break}return r}});var Jo=T((eV,eD)=>{function Oe(e,t){return typeof e>"u"||e===null?t:e}eD.exports={parse:function(t,s){let n={},r=Object.assign({},s,t);return n.throttleTime=1e3/Oe(r.fps,10),n.stream=Oe(r.stream,process.stderr),n.terminal=Oe(r.terminal,null),n.clearOnComplete=Oe(r.clearOnComplete,!1),n.stopOnComplete=Oe(r.stopOnComplete,!1),n.barsize=Oe(r.barsize,40),n.align=Oe(r.align,"left"),n.hideCursor=Oe(r.hideCursor,!1),n.linewrap=Oe(r.linewrap,!1),n.barGlue=Oe(r.barGlue,""),n.barCompleteChar=Oe(r.barCompleteChar,"="),n.barIncompleteChar=Oe(r.barIncompleteChar,"-"),n.format=Oe(r.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=Oe(r.formatTime,null),n.formatValue=Oe(r.formatValue,null),n.formatBar=Oe(r.formatBar,null),n.etaBufferLength=Oe(r.etaBuffer,10),n.etaAsynchronousUpdate=Oe(r.etaAsynchronousUpdate,!1),n.progressCalculationRelative=Oe(r.progressCalculationRelative,!1),n.synchronousUpdate=Oe(r.synchronousUpdate,!0),n.noTTYOutput=Oe(r.noTTYOutput,!1),n.notTTYSchedule=Oe(r.notTTYSchedule,2e3),n.emptyOnZero=Oe(r.emptyOnZero,!1),n.forceRedraw=Oe(r.forceRedraw,!1),n.autopadding=Oe(r.autopadding,!1),n.gracefulExit=Oe(r.gracefulExit,!1),n},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?Oe(t.autopaddingChar," "):"",t}}});var ul=T((sV,sD)=>{var tD=Wb(),JP=tl(),QP=cl(),XP=Jo(),eL=require("events");sD.exports=class extends eL{constructor(t){super(),this.options=XP.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new JP(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new tD(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:QP}render(t=!1){let s={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let n=this.formatter(this.options,s,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=n)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(n),this.terminal.clearRight(),this.lastDrawnString=n,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,s,n){this.value=s||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=s||0,this.payload=n||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new tD(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,s)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,s={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let n=(typeof t=="object"?t:s)||{};this.emit("update",this.total,this.value);for(let r in n)this.payload[r]=n[r];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,s={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,s)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var rD=T((rV,nD)=>{var tL=ul(),sL=Jo();nD.exports=class extends tL{constructor(t,s){super(sL.parse(t,s)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,s){this.timer&&(super.update(t,s),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,s,n){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,s,n),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var oD=T((oV,iD)=>{var nL=tl(),rL=ul(),iL=Jo(),oL=require("events");iD.exports=class extends oL{constructor(t,s){super(),this.bars=[],this.options=iL.parse(t,s),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new nL(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,s,n,r={}){let i=new rL(Object.assign({},this.options,{terminal:this.terminal},r));return this.bars.push(i),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,i.start(t,s,n),this.emit("start")),i}remove(t){let s=this.bars.indexOf(t);return s<0?!1:(this.bars.splice(s,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var cD=T((aV,aD)=>{aD.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var lD=T((cV,uD)=>{uD.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var dD=T((uV,pD)=>{pD.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var fD=T((lV,mD)=>{mD.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var hD=T((pV,gD)=>{var aL=cD(),cL=lD(),uL=dD(),lL=fD();gD.exports={legacy:aL,shades_classic:cL,shades_grey:uL,rect:lL}});var bD=T((dV,SD)=>{var yD=rD(),pL=oD(),dL=hD(),mL=cl(),fL=il(),gL=ol(),hL=al();SD.exports={Bar:yD,SingleBar:yD,MultiBar:pL,Presets:dL,Format:{Formatter:mL,BarFormat:gL,ValueFormat:fL,TimeFormat:hL}}});var sa=T((pK,nv)=>{var wl=[],sv=0,ut=(e,t)=>{sv>=t&&wl.push(e)};ut.WARN=1;ut.INFO=2;ut.DEBUG=3;ut.reset=()=>{wl=[]};ut.setDebugLevel=e=>{sv=e};ut.warn=e=>ut(e,ut.WARN);ut.info=e=>ut(e,ut.INFO);ut.debug=e=>ut(e,ut.DEBUG);ut.debugMessages=()=>wl;nv.exports=ut});var El=T((dK,av)=>{var rv=rl();function na(e){return e?/\u001b\[((?:\d*;){0,5}\d*)m/g:/\u001b\[(?:\d*;){0,5}\d*m/g}function as(e){let t=na();return(""+e).replace(t,"").split(`
|
|
75
75
|
`).reduce(function(r,i){return rv(i)>r?rv(i):r},0)}function di(e,t){return Array(t+1).join(e)}function s_(e,t,s,n){let r=as(e);if(t+1>=r){let i=t-r;switch(n){case"right":{e=di(s,i)+e;break}case"center":{let o=Math.ceil(i/2),a=i-o;e=di(s,a)+e+di(s,o);break}default:{e=e+di(s,i);break}}}return e}var hr={};function mi(e,t,s){t="\x1B["+t+"m",s="\x1B["+s+"m",hr[t]={set:e,to:!0},hr[s]={set:e,to:!1},hr[e]={on:t,off:s}}mi("bold",1,22);mi("italics",3,23);mi("underline",4,24);mi("inverse",7,27);mi("strikethrough",9,29);function iv(e,t){let s=t[1]?parseInt(t[1].split(";")[0]):0;if(s>=30&&s<=39||s>=90&&s<=97){e.lastForegroundAdded=t[0];return}if(s>=40&&s<=49||s>=100&&s<=107){e.lastBackgroundAdded=t[0];return}if(s===0){for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&delete e[r];return}let n=hr[t[0]];n&&(e[n.set]=n.to)}function n_(e){let t=na(!0),s=t.exec(e),n={};for(;s!==null;)iv(n,s),s=t.exec(e);return n}function ov(e,t){let s=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(r){e[r]&&(t+=hr[r].off)}),s&&s!="\x1B[49m"&&(t+="\x1B[49m"),n&&n!="\x1B[39m"&&(t+="\x1B[39m"),t}function r_(e,t){let s=e.lastBackgroundAdded,n=e.lastForegroundAdded;return delete e.lastBackgroundAdded,delete e.lastForegroundAdded,Object.keys(e).forEach(function(r){e[r]&&(t=hr[r].on+t)}),s&&s!="\x1B[49m"&&(t=s+t),n&&n!="\x1B[39m"&&(t=n+t),t}function i_(e,t){if(e.length===as(e))return e.substr(0,t);for(;as(e)>t;)e=e.slice(0,-1);return e}function o_(e,t){let s=na(!0),n=e.split(na()),r=0,i=0,o="",a,u={};for(;i<t;){a=s.exec(e);let c=n[r];if(r++,i+as(c)>t&&(c=i_(c,t-i)),o+=c,i+=as(c),i<t){if(!a)break;o+=a[0],iv(u,a)}}return ov(u,o)}function a_(e,t,s){if(s=s||"\u2026",as(e)<=t)return e;t-=as(s);let r=o_(e,t);r+=s;let i="\x1B]8;;\x07";return e.includes(i)&&!r.includes(i)&&(r+=i),r}function c_(){return{chars:{top:"\u2500","top-mid":"\u252C","top-left":"\u250C","top-right":"\u2510",bottom:"\u2500","bottom-mid":"\u2534","bottom-left":"\u2514","bottom-right":"\u2518",left:"\u2502","left-mid":"\u251C",mid:"\u2500","mid-mid":"\u253C",right:"\u2502","right-mid":"\u2524",middle:"\u2502"},truncate:"\u2026",colWidths:[],rowHeights:[],colAligns:[],rowAligns:[],style:{"padding-left":1,"padding-right":1,head:["red"],border:["grey"],compact:!1},head:[]}}function u_(e,t){e=e||{},t=t||c_();let s=Object.assign({},t,e);return s.chars=Object.assign({},t.chars,e.chars),s.style=Object.assign({},t.style,e.style),s}function l_(e,t){let s=[],n=t.split(/(\s+)/g),r=[],i=0,o;for(let a=0;a<n.length;a+=2){let u=n[a],c=i+as(u);i>0&&o&&(c+=o.length),c>e?(i!==0&&s.push(r.join("")),r=[u],i=as(u)):(r.push(o||"",u),i=c),o=n[a+1]}return i&&s.push(r.join("")),s}function p_(e,t){let s=[],n="";function r(o,a){for(n.length&&a&&(n+=a),n+=o;n.length>e;)s.push(n.slice(0,e)),n=n.slice(e)}let i=t.split(/(\s+)/g);for(let o=0;o<i.length;o+=2)r(i[o],o&&i[o-1]);return n.length&&s.push(n),s}function d_(e,t,s=!0){let n=[];t=t.split(`
|
|
76
|
-
`);let r=s?l_:p_;for(let i=0;i<t.length;i++)n.push.apply(n,r(e,t[i]));return n}function m_(e){let t={},s=[];for(let n=0;n<e.length;n++){let r=r_(t,e[n]);t=n_(r);let i=Object.assign({},t);s.push(ov(i,r))}return s}function f_(e,t){let s="\x1B]",n="\x07",r=";";return[s,"8",r,r,e||t,n,t,s,"8",r,r,n].join("")}av.exports={strlen:as,repeat:di,pad:s_,truncate:a_,mergeOptions:u_,wordWrap:d_,colorizeLines:m_,hyperlink:f_}});var pv=T((
|
|
77
|
-
`)!=-1,n=this._styles,r=n.length;r--;){var i=Cn[n[r]];t=i.open+t.replace(i.closeRe,i.open)+i.close,s&&(t=t.replace(b_,function(o){return i.close+o+i.open}))}return t}Ae.setTheme=function(e){if(typeof e=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in e)(function(s){Ae[s]=function(n){if(typeof e[s]=="object"){var r=n;for(var i in e[s])r=Ae[e[s][i]](r);return r}return Ae[e[s]](n)}})(t)};function x_(){var e={};return Object.keys(Tv).forEach(function(t){e[t]={get:function(){return kv([t])}}}),e}var w_=function(t,s){var n=s.split("");return n=n.map(t),n.join("")};Ae.trap=yv();Ae.zalgo=bv();Ae.maps={};Ae.maps.america=vv()(Ae);Ae.maps.zebra=Av()(Ae);Ae.maps.rainbow=wv()(Ae);Ae.maps.random=Rv()(Ae);for(Fv in Ae.maps)(function(e){Ae[e]=function(t){return w_(Ae.maps[e],t)}})(Fv);var Fv;Iv(Ae,x_())});var Ov=T((
|
|
78
|
-
`))}wrapLines(t){let s=Rt.colorizeLines(t);return this.href?s.map(n=>Rt.hyperlink(this.href,n)):s}init(t){let s=this.x,n=this.y;this.widths=t.colWidths.slice(s,s+this.colSpan),this.heights=t.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(Mv,-1),this.height=this.heights.reduce(Mv,-1),this.hAlign=this.options.hAlign||t.colAligns[s],this.vAlign=this.options.vAlign||t.rowAligns[n],this.drawRight=s+this.colSpan==t.colWidths.length}draw(t,s){if(t=="top")return this.drawTop(this.drawRight);if(t=="bottom")return this.drawBottom(this.drawRight);let n=Rt.truncate(this.content,10,this.truncate);t||R_(`${this.y}-${this.x}: ${this.rowSpan-t}x${this.colSpan} Cell ${n}`);let r=Math.max(this.height-this.lines.length,0),i;switch(this.vAlign){case"center":i=Math.ceil(r/2);break;case"bottom":i=r;break;default:i=0}if(t<i||t>=i+this.lines.length)return this.drawEmpty(this.drawRight,s);let o=this.lines.length>this.height&&t+1>=this.height;return this.drawLine(t-i,this.drawRight,o,s)}drawTop(t){let s=[];return this.cells?this.widths.forEach(function(n,r){s.push(this._topLeftChar(r)),s.push(Rt.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(s.push(this._topLeftChar(0)),s.push(Rt.repeat(this.chars[this.y==0?"top":"mid"],this.width))),t&&s.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",s.join(""))}_topLeftChar(t){let s=this.x+t,n;if(this.y==0)n=s==0?"topLeft":t==0?"topMid":"top";else if(s==0)n="leftMid";else if(n=t==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][s]instanceof e.ColSpanCell&&(n=t==0?"topMid":"mid"),t==0)){let i=1;for(;this.cells[this.y][s-i]instanceof e.ColSpanCell;)i++;this.cells[this.y][s-i]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(t,s){if(this[t]&&this[t].length)try{let n=Ov();for(let r=this[t].length-1;r>=0;r--)n=n[this[t][r]];return n(s)}catch{return s}else return s}drawLine(t,s,n,r){let i=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let d=this.cells[this.y+r][this.x-1];for(;d instanceof fi;)d=this.cells[d.y][d.x-1];d instanceof gi||(i=this.chars.rightMid)}let o=Rt.repeat(" ",this.paddingLeft),a=s?this.chars.right:"",u=Rt.repeat(" ",this.paddingRight),c=this.lines[t],l=this.width-(this.paddingLeft+this.paddingRight);n&&(c+=this.truncate||"\u2026");let p=Rt.truncate(c,l,this.truncate);return p=Rt.pad(p,l," ",this.hAlign),p=o+p+u,this.stylizeLine(i,p,a)}stylizeLine(t,s,n){return t=this.wrapWithStyleColors("border",t),n=this.wrapWithStyleColors("border",n),this.y===0&&(s=this.wrapWithStyleColors("head",s)),t+s+n}drawBottom(t){let s=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=Rt.repeat(this.chars.bottom,this.width),r=t?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",s+n+r)}drawEmpty(t,s){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&s&&this.cells){let o=this.cells[this.y+s][this.x-1];for(;o instanceof fi;)o=this.cells[o.y][o.x-1];o instanceof gi||(n=this.chars.rightMid)}let r=t?this.chars.right:"",i=Rt.repeat(" ",this.width);return this.stylizeLine(n,i,r)}},fi=class{constructor(){}draw(t){return typeof t=="number"&&Nv(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},gi=class{constructor(t){this.originalCell=t}init(t){let s=this.y,n=this.originalCell.y;this.cellOffset=s-n,this.offset=F_(t.rowHeights,n,this.cellOffset)}draw(t){return t=="top"?this.originalCell.draw(this.offset,this.cellOffset):t=="bottom"?this.originalCell.draw("bottom"):(Nv(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+t))}mergeTableOptions(){}};function Bv(...e){return e.filter(t=>t!=null).shift()}function Fl(e,t,s,n){let r=s.split("-");r.length>1?(r[1]=r[1].charAt(0).toUpperCase()+r[1].substr(1),r=r.join(""),n[r]=Bv(e[r],e[s],t[r],t[s])):n[s]=Bv(e[s],t[s])}function F_(e,t,s){let n=e[t];for(let r=1;r<s;r++)n+=1+e[t+r];return n}function Mv(e,t){return e+t+1}var I_=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];ra.exports=Il;ra.exports.ColSpanCell=fi;ra.exports.RowSpanCell=gi});var $v=T((
|
|
76
|
+
`);let r=s?l_:p_;for(let i=0;i<t.length;i++)n.push.apply(n,r(e,t[i]));return n}function m_(e){let t={},s=[];for(let n=0;n<e.length;n++){let r=r_(t,e[n]);t=n_(r);let i=Object.assign({},t);s.push(ov(i,r))}return s}function f_(e,t){let s="\x1B]",n="\x07",r=";";return[s,"8",r,r,e||t,n,t,s,"8",r,r,n].join("")}av.exports={strlen:as,repeat:di,pad:s_,truncate:a_,mergeOptions:u_,wordWrap:d_,colorizeLines:m_,hyperlink:f_}});var pv=T((mK,lv)=>{var uv={};lv.exports=uv;var cv={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(cv).forEach(function(e){var t=cv[e],s=uv[e]=[];s.open="\x1B["+t[0]+"m",s.close="\x1B["+t[1]+"m"})});var mv=T((fK,dv)=>{"use strict";dv.exports=function(e,t){t=t||process.argv;var s=t.indexOf("--"),n=/^-{1,2}/.test(e)?"":"--",r=t.indexOf(n+e);return r!==-1&&(s===-1?!0:r<s)}});var gv=T((gK,fv)=>{"use strict";var g_=require("os"),Qt=mv(),dt=process.env,yr=void 0;Qt("no-color")||Qt("no-colors")||Qt("color=false")?yr=!1:(Qt("color")||Qt("colors")||Qt("color=true")||Qt("color=always"))&&(yr=!0);"FORCE_COLOR"in dt&&(yr=dt.FORCE_COLOR.length===0||parseInt(dt.FORCE_COLOR,10)!==0);function h_(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function y_(e){if(yr===!1)return 0;if(Qt("color=16m")||Qt("color=full")||Qt("color=truecolor"))return 3;if(Qt("color=256"))return 2;if(e&&!e.isTTY&&yr!==!0)return 0;var t=yr?1:0;if(process.platform==="win32"){var s=g_.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in dt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(function(r){return r in dt})||dt.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in dt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(dt.TEAMCITY_VERSION)?1:0;if("TERM_PROGRAM"in dt){var n=parseInt((dt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(dt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Hyper":return 3;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(dt.TERM)?2:/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(dt.TERM)||"COLORTERM"in dt?1:(dt.TERM==="dumb",t)}function Rl(e){var t=y_(e);return h_(t)}fv.exports={supportsColor:Rl,stdout:Rl(process.stdout),stderr:Rl(process.stderr)}});var yv=T((hK,hv)=>{hv.exports=function(t,s){var n="";t=t||"Run the trap, drop the bass",t=t.split("");var r={a:["@","\u0104","\u023A","\u0245","\u0394","\u039B","\u0414"],b:["\xDF","\u0181","\u0243","\u026E","\u03B2","\u0E3F"],c:["\xA9","\u023B","\u03FE"],d:["\xD0","\u018A","\u0500","\u0501","\u0502","\u0503"],e:["\xCB","\u0115","\u018E","\u0258","\u03A3","\u03BE","\u04BC","\u0A6C"],f:["\u04FA"],g:["\u0262"],h:["\u0126","\u0195","\u04A2","\u04BA","\u04C7","\u050A"],i:["\u0F0F"],j:["\u0134"],k:["\u0138","\u04A0","\u04C3","\u051E"],l:["\u0139"],m:["\u028D","\u04CD","\u04CE","\u0520","\u0521","\u0D69"],n:["\xD1","\u014B","\u019D","\u0376","\u03A0","\u048A"],o:["\xD8","\xF5","\xF8","\u01FE","\u0298","\u047A","\u05DD","\u06DD","\u0E4F"],p:["\u01F7","\u048E"],q:["\u09CD"],r:["\xAE","\u01A6","\u0210","\u024C","\u0280","\u042F"],s:["\xA7","\u03DE","\u03DF","\u03E8"],t:["\u0141","\u0166","\u0373"],u:["\u01B1","\u054D"],v:["\u05D8"],w:["\u0428","\u0460","\u047C","\u0D70"],x:["\u04B2","\u04FE","\u04FC","\u04FD"],y:["\xA5","\u04B0","\u04CB"],z:["\u01B5","\u0240"]};return t.forEach(function(i){i=i.toLowerCase();var o=r[i]||[" "],a=Math.floor(Math.random()*o.length);typeof r[i]<"u"?n+=r[i][a]:n+=i}),n}});var bv=T((yK,Sv)=>{Sv.exports=function(t,s){t=t||" he is here ";var n={up:["\u030D","\u030E","\u0304","\u0305","\u033F","\u0311","\u0306","\u0310","\u0352","\u0357","\u0351","\u0307","\u0308","\u030A","\u0342","\u0313","\u0308","\u034A","\u034B","\u034C","\u0303","\u0302","\u030C","\u0350","\u0300","\u0301","\u030B","\u030F","\u0312","\u0313","\u0314","\u033D","\u0309","\u0363","\u0364","\u0365","\u0366","\u0367","\u0368","\u0369","\u036A","\u036B","\u036C","\u036D","\u036E","\u036F","\u033E","\u035B","\u0346","\u031A"],down:["\u0316","\u0317","\u0318","\u0319","\u031C","\u031D","\u031E","\u031F","\u0320","\u0324","\u0325","\u0326","\u0329","\u032A","\u032B","\u032C","\u032D","\u032E","\u032F","\u0330","\u0331","\u0332","\u0333","\u0339","\u033A","\u033B","\u033C","\u0345","\u0347","\u0348","\u0349","\u034D","\u034E","\u0353","\u0354","\u0355","\u0356","\u0359","\u035A","\u0323"],mid:["\u0315","\u031B","\u0300","\u0301","\u0358","\u0321","\u0322","\u0327","\u0328","\u0334","\u0335","\u0336","\u035C","\u035D","\u035E","\u035F","\u0360","\u0362","\u0338","\u0337","\u0361"," \u0489"]},r=[].concat(n.up,n.down,n.mid);function i(u){var c=Math.floor(Math.random()*u);return c}function o(u){var c=!1;return r.filter(function(l){c=l===u}),c}function a(u,c){var l="",p,d;c=c||{},c.up=typeof c.up<"u"?c.up:!0,c.mid=typeof c.mid<"u"?c.mid:!0,c.down=typeof c.down<"u"?c.down:!0,c.size=typeof c.size<"u"?c.size:"maxi",u=u.split("");for(d in u)if(!o(d)){switch(l=l+u[d],p={up:0,down:0,mid:0},c.size){case"mini":p.up=i(8),p.mid=i(2),p.down=i(8);break;case"maxi":p.up=i(16)+3,p.mid=i(4)+1,p.down=i(64)+3;break;default:p.up=i(8)+1,p.mid=i(6)/2,p.down=i(8)+1;break}var m=["up","mid","down"];for(var f in m)for(var g=m[f],h=0;h<=p[g];h++)c[g]&&(l=l+n[g][i(n[g].length)])}return l}return a(t,s)}});var vv=T((SK,Dv)=>{Dv.exports=function(e){return function(t,s,n){if(t===" ")return t;switch(s%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}});var Av=T((bK,Cv)=>{Cv.exports=function(e){return function(t,s,n){return s%2===0?t:e.inverse(t)}}});var wv=T((DK,xv)=>{xv.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(s,n,r){return s===" "?s:e[t[n++%t.length]](s)}}});var Rv=T((vK,Ev)=>{Ev.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(s,n,r){return s===" "?s:e[t[Math.round(Math.random()*(t.length-2))]](s)}}});var Lv=T((AK,Pv)=>{var Ae={};Pv.exports=Ae;Ae.themes={};var S_=require("util"),Cn=Ae.styles=pv(),Iv=Object.defineProperties,b_=new RegExp(/[\r\n]+/g);Ae.supportsColor=gv().supportsColor;typeof Ae.enabled>"u"&&(Ae.enabled=Ae.supportsColor()!==!1);Ae.enable=function(){Ae.enabled=!0};Ae.disable=function(){Ae.enabled=!1};Ae.stripColors=Ae.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")};var CK=Ae.stylize=function(t,s){if(!Ae.enabled)return t+"";var n=Cn[s];return!n&&s in Ae?Ae[s](t):n.open+t+n.close},D_=/[|\\{}()[\]^$+*?.]/g,v_=function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(D_,"\\$&")};function kv(e){var t=function s(){return A_.apply(s,arguments)};return t._styles=e,t.__proto__=C_,t}var Tv=function(){var e={};return Cn.grey=Cn.gray,Object.keys(Cn).forEach(function(t){Cn[t].closeRe=new RegExp(v_(Cn[t].close),"g"),e[t]={get:function(){return kv(this._styles.concat(t))}}}),e}(),C_=Iv(function(){},Tv);function A_(){var e=Array.prototype.slice.call(arguments),t=e.map(function(o){return o!=null&&o.constructor===String?o:S_.inspect(o)}).join(" ");if(!Ae.enabled||!t)return t;for(var s=t.indexOf(`
|
|
77
|
+
`)!=-1,n=this._styles,r=n.length;r--;){var i=Cn[n[r]];t=i.open+t.replace(i.closeRe,i.open)+i.close,s&&(t=t.replace(b_,function(o){return i.close+o+i.open}))}return t}Ae.setTheme=function(e){if(typeof e=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in e)(function(s){Ae[s]=function(n){if(typeof e[s]=="object"){var r=n;for(var i in e[s])r=Ae[e[s][i]](r);return r}return Ae[e[s]](n)}})(t)};function x_(){var e={};return Object.keys(Tv).forEach(function(t){e[t]={get:function(){return kv([t])}}}),e}var w_=function(t,s){var n=s.split("");return n=n.map(t),n.join("")};Ae.trap=yv();Ae.zalgo=bv();Ae.maps={};Ae.maps.america=vv()(Ae);Ae.maps.zebra=Av()(Ae);Ae.maps.rainbow=wv()(Ae);Ae.maps.random=Rv()(Ae);for(Fv in Ae.maps)(function(e){Ae[e]=function(t){return w_(Ae.maps[e],t)}})(Fv);var Fv;Iv(Ae,x_())});var Ov=T((xK,_v)=>{var E_=Lv();_v.exports=E_});var Wv=T((wK,ra)=>{var{info:R_,debug:Nv}=sa(),Rt=El(),Il=class e{constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let s=t.content;if(["boolean","number","bigint","string"].indexOf(typeof s)!==-1)this.content=String(s);else if(!s)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof s);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,s){this.cells=s;let n=this.options.chars||{},r=t.chars,i=this.chars={};I_.forEach(function(u){Fl(n,r,u,i)}),this.truncate=this.options.truncate||t.truncate;let o=this.options.style=this.options.style||{},a=t.style;Fl(o,a,"padding-left",this),Fl(o,a,"padding-right",this),this.head=o.head||a.head,this.border=o.border||a.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=Rt.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let s=t.wordWrap||t.textWrap,{wordWrap:n=s}=this.options;if(this.fixedWidth&&n){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let o=1;for(;o<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+o],o++}let{wrapOnWordBoundary:r=!0}=t,{wrapOnWordBoundary:i=r}=this.options;return this.wrapLines(Rt.wordWrap(this.fixedWidth,this.content,i))}return this.wrapLines(this.content.split(`
|
|
78
|
+
`))}wrapLines(t){let s=Rt.colorizeLines(t);return this.href?s.map(n=>Rt.hyperlink(this.href,n)):s}init(t){let s=this.x,n=this.y;this.widths=t.colWidths.slice(s,s+this.colSpan),this.heights=t.rowHeights.slice(n,n+this.rowSpan),this.width=this.widths.reduce(Mv,-1),this.height=this.heights.reduce(Mv,-1),this.hAlign=this.options.hAlign||t.colAligns[s],this.vAlign=this.options.vAlign||t.rowAligns[n],this.drawRight=s+this.colSpan==t.colWidths.length}draw(t,s){if(t=="top")return this.drawTop(this.drawRight);if(t=="bottom")return this.drawBottom(this.drawRight);let n=Rt.truncate(this.content,10,this.truncate);t||R_(`${this.y}-${this.x}: ${this.rowSpan-t}x${this.colSpan} Cell ${n}`);let r=Math.max(this.height-this.lines.length,0),i;switch(this.vAlign){case"center":i=Math.ceil(r/2);break;case"bottom":i=r;break;default:i=0}if(t<i||t>=i+this.lines.length)return this.drawEmpty(this.drawRight,s);let o=this.lines.length>this.height&&t+1>=this.height;return this.drawLine(t-i,this.drawRight,o,s)}drawTop(t){let s=[];return this.cells?this.widths.forEach(function(n,r){s.push(this._topLeftChar(r)),s.push(Rt.repeat(this.chars[this.y==0?"top":"mid"],n))},this):(s.push(this._topLeftChar(0)),s.push(Rt.repeat(this.chars[this.y==0?"top":"mid"],this.width))),t&&s.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",s.join(""))}_topLeftChar(t){let s=this.x+t,n;if(this.y==0)n=s==0?"topLeft":t==0?"topMid":"top";else if(s==0)n="leftMid";else if(n=t==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][s]instanceof e.ColSpanCell&&(n=t==0?"topMid":"mid"),t==0)){let i=1;for(;this.cells[this.y][s-i]instanceof e.ColSpanCell;)i++;this.cells[this.y][s-i]instanceof e.RowSpanCell&&(n="leftMid")}return this.chars[n]}wrapWithStyleColors(t,s){if(this[t]&&this[t].length)try{let n=Ov();for(let r=this[t].length-1;r>=0;r--)n=n[this[t][r]];return n(s)}catch{return s}else return s}drawLine(t,s,n,r){let i=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let d=this.cells[this.y+r][this.x-1];for(;d instanceof fi;)d=this.cells[d.y][d.x-1];d instanceof gi||(i=this.chars.rightMid)}let o=Rt.repeat(" ",this.paddingLeft),a=s?this.chars.right:"",u=Rt.repeat(" ",this.paddingRight),c=this.lines[t],l=this.width-(this.paddingLeft+this.paddingRight);n&&(c+=this.truncate||"\u2026");let p=Rt.truncate(c,l,this.truncate);return p=Rt.pad(p,l," ",this.hAlign),p=o+p+u,this.stylizeLine(i,p,a)}stylizeLine(t,s,n){return t=this.wrapWithStyleColors("border",t),n=this.wrapWithStyleColors("border",n),this.y===0&&(s=this.wrapWithStyleColors("head",s)),t+s+n}drawBottom(t){let s=this.chars[this.x==0?"bottomLeft":"bottomMid"],n=Rt.repeat(this.chars.bottom,this.width),r=t?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",s+n+r)}drawEmpty(t,s){let n=this.chars[this.x==0?"left":"middle"];if(this.x&&s&&this.cells){let o=this.cells[this.y+s][this.x-1];for(;o instanceof fi;)o=this.cells[o.y][o.x-1];o instanceof gi||(n=this.chars.rightMid)}let r=t?this.chars.right:"",i=Rt.repeat(" ",this.width);return this.stylizeLine(n,i,r)}},fi=class{constructor(){}draw(t){return typeof t=="number"&&Nv(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},gi=class{constructor(t){this.originalCell=t}init(t){let s=this.y,n=this.originalCell.y;this.cellOffset=s-n,this.offset=F_(t.rowHeights,n,this.cellOffset)}draw(t){return t=="top"?this.originalCell.draw(this.offset,this.cellOffset):t=="bottom"?this.originalCell.draw("bottom"):(Nv(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+t))}mergeTableOptions(){}};function Bv(...e){return e.filter(t=>t!=null).shift()}function Fl(e,t,s,n){let r=s.split("-");r.length>1?(r[1]=r[1].charAt(0).toUpperCase()+r[1].substr(1),r=r.join(""),n[r]=Bv(e[r],e[s],t[r],t[s])):n[s]=Bv(e[s],t[s])}function F_(e,t,s){let n=e[t];for(let r=1;r<s;r++)n+=1+e[t+r];return n}function Mv(e,t){return e+t+1}var I_=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];ra.exports=Il;ra.exports.ColSpanCell=fi;ra.exports.RowSpanCell=gi});var $v=T((EK,jv)=>{var{warn:k_,debug:T_}=sa(),kl=Wv(),{ColSpanCell:P_,RowSpanCell:L_}=kl;(function(){function e(m,f){return m[f]>0?e(m,f+1):f}function t(m){let f={};m.forEach(function(g,h){let y=0;g.forEach(function(b){b.y=h,b.x=h?e(f,y):y;let x=b.rowSpan||1,v=b.colSpan||1;if(x>1)for(let E=0;E<v;E++)f[b.x+E]=x;y=b.x+v}),Object.keys(f).forEach(b=>{f[b]--,f[b]<1&&delete f[b]})})}function s(m){let f=0;return m.forEach(function(g){g.forEach(function(h){f=Math.max(f,h.x+(h.colSpan||1))})}),f}function n(m){return m.length}function r(m,f){let g=m.y,h=m.y-1+(m.rowSpan||1),y=f.y,b=f.y-1+(f.rowSpan||1),x=!(g>b||y>h),v=m.x,E=m.x-1+(m.colSpan||1),O=f.x,M=f.x-1+(f.colSpan||1),P=!(v>M||O>E);return x&&P}function i(m,f,g){let h=Math.min(m.length-1,g),y={x:f,y:g};for(let b=0;b<=h;b++){let x=m[b];for(let v=0;v<x.length;v++)if(r(y,x[v]))return!0}return!1}function o(m,f,g,h){for(let y=g;y<h;y++)if(i(m,y,f))return!1;return!0}function a(m){m.forEach(function(f,g){f.forEach(function(h){for(let y=1;y<h.rowSpan;y++){let b=new L_(h);b.x=h.x,b.y=h.y+y,b.colSpan=h.colSpan,c(b,m[g+y])}})})}function u(m){for(let f=m.length-1;f>=0;f--){let g=m[f];for(let h=0;h<g.length;h++){let y=g[h];for(let b=1;b<y.colSpan;b++){let x=new P_;x.x=y.x+b,x.y=y.y,g.splice(h+1,0,x)}}}}function c(m,f){let g=0;for(;g<f.length&&f[g].x<m.x;)g++;f.splice(g,0,m)}function l(m){let f=n(m),g=s(m);T_(`Max rows: ${f}; Max cols: ${g}`);for(let h=0;h<f;h++)for(let y=0;y<g;y++)if(!i(m,y,h)){let b={x:y,y:h,colSpan:1,rowSpan:1};for(y++;y<g&&!i(m,y,h);)b.colSpan++,y++;let x=h+1;for(;x<f&&o(m,x,b.x,b.x+b.colSpan);)b.rowSpan++,x++;let v=new kl(b);v.x=b.x,v.y=b.y,k_(`Missing cell at ${v.y}-${v.x}.`),c(v,m[h])}}function p(m){return m.map(function(f){if(!Array.isArray(f)){let g=Object.keys(f)[0];f=f[g],Array.isArray(f)?(f=f.slice(),f.unshift(g)):f=[g,f]}return f.map(function(g){return new kl(g)})})}function d(m){let f=p(m);return t(f),l(f),a(f),u(f),f}jv.exports={makeTableLayout:d,layoutTable:t,addRowSpanCells:a,maxWidth:s,fillInTable:l,computeWidths:Uv("colSpan","desiredWidth","x",1),computeHeights:Uv("rowSpan","desiredHeight","y",1)}})();function Uv(e,t,s,n){return function(r,i){let o=[],a=[],u={};i.forEach(function(c){c.forEach(function(l){(l[e]||1)>1?a.push(l):o[l[s]]=Math.max(o[l[s]]||0,l[t]||0,n)})}),r.forEach(function(c,l){typeof c=="number"&&(o[l]=c)});for(let c=a.length-1;c>=0;c--){let l=a[c],p=l[e],d=l[s],m=o[d],f=typeof r[d]=="number"?0:1;if(typeof m=="number")for(let g=1;g<p;g++)m+=1+o[d+g],typeof r[d+g]!="number"&&f++;else m=t==="desiredWidth"?l.desiredWidth-1:1,(!u[d]||u[d]<m)&&(u[d]=m);if(l[t]>m){let g=0;for(;f>0&&l[t]>m;){if(typeof r[d+g]!="number"){let h=Math.round((l[t]-m)/f);m+=h,o[d+g]+=h,f--}g++}}}Object.assign(r,o,u);for(let c=0;c<r.length;c++)r[c]=Math.max(n,r[c]||0)}}});var Hv=T((RK,Gv)=>{var Ss=sa(),__=El(),Tl=$v(),ia=class extends Array{constructor(t){super();let s=__.mergeOptions(t);if(Object.defineProperty(this,"options",{value:s,enumerable:s.debug}),s.debug){switch(typeof s.debug){case"boolean":Ss.setDebugLevel(Ss.WARN);break;case"number":Ss.setDebugLevel(s.debug);break;case"string":Ss.setDebugLevel(parseInt(s.debug,10));break;default:Ss.setDebugLevel(Ss.WARN),Ss.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof s.debug}`)}Object.defineProperty(this,"messages",{get(){return Ss.debugMessages()}})}}toString(){let t=this,s=this.options.head&&this.options.head.length;s?(t=[this.options.head],this.length&&t.push.apply(t,this)):this.options.style.head=[];let n=Tl.makeTableLayout(t);n.forEach(function(i){i.forEach(function(o){o.mergeTableOptions(this.options,n)},this)},this),Tl.computeWidths(this.options.colWidths,n),Tl.computeHeights(this.options.rowHeights,n),n.forEach(function(i){i.forEach(function(o){o.init(this.options)},this)},this);let r=[];for(let i=0;i<n.length;i++){let o=n[i],a=this.options.rowHeights[i];(i===0||!this.options.style.compact||i==1&&s)&&Pl(o,"top",r);for(let u=0;u<a;u++)Pl(o,u,r);i+1==n.length&&Pl(o,"bottom",r)}return r.join(`
|
|
79
79
|
`)}get width(){return this.toString().split(`
|
|
80
|
-
`)[0].length}};ia.reset=()=>Ss.reset();function Pl(e,t,s){let n=[];e.forEach(function(i){n.push(i.draw(t))});let r=n.join("");r.length&&s.push(r)}Gv.exports=ia});var qv=T((
|
|
80
|
+
`)[0].length}};ia.reset=()=>Ss.reset();function Pl(e,t,s){let n=[];e.forEach(function(i){n.push(i.draw(t))});let r=n.join("");r.length&&s.push(r)}Gv.exports=ia});var qv=T((FK,zv)=>{zv.exports=Hv()});var Ll=T((kK,N_)=>{N_.exports={name:"cdk-insights",version:"1.41.4",description:"AWS CDK security and cost analysis CLI. Free static scans via npm \u2014 no account needed. Sign up free to add AI-powered insights.",main:"dist/index.js",types:"dist/index.d.ts",bin:{"cdk-insights":"dist/entry.js"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.js"}},files:["dist/**/*","README.md","LICENSE"],scripts:{test:"vitest --run",lint:"biome lint src/",typecheck:"tsc --noEmit",format:"biome format --write src/",check:"biome check src/","check:schema-sync":"ts-node scripts/check-schema-sync.ts",build:"ts-node scripts/build.ts","build:dev":"CDK_INSIGHTS_ENVIRONMENT=dev CDK_INSIGHTS_API_URL=https://s2zhmjbwlj.execute-api.eu-west-2.amazonaws.com/v1 ts-node scripts/build.ts",start:"node dist/index.js",dev:"ts-node src/index.ts",prepare:"husky install && npm run build","start:dev":"CDK_ENV=local ts-node src/index.ts","ai-run":"ts-node src/index.ts",unlink:"npm unlink -g cdk-insights",link:"npm link","prepare:test":"npm run unlink && npm run build && npm run link","prepare:dev":"npm run unlink && npm run build:dev && npm run link","deploy:dev":"STAGE=dev cdk deploy","destroy:dev":"STAGE=dev cdk destroy","release:patch":"bumper release patch","release:minor":"bumper release minor","release:major":"bumper release major","release:dry-run":"bumper release patch --dry-run","changelog:preview":"bumper preview","changelog:generate":"bumper generate","validate:commits":"bumper validate","release:check":"npm run validate:commits && npm run test && npm run build","release:full":"npm run release:check && npm run changelog:generate","setup:bumper":"bumper setup","publish:beta":"npm run build && npm publish --tag beta && npm dist-tag add cdk-insights@$npm_package_version latest","publish:alpha":"npm run build && npm publish --tag alpha","publish:canary":"npm run build && npm publish --tag canary","publish:latest":"npm run build && npm publish --tag latest","version:beta":"npm version prerelease --preid=beta","version:alpha":"npm version prerelease --preid=alpha","version:rc":"npm version prerelease --preid=rc","cdk-insights":"node scripts/cdk-insights-wrapper.js",scan:"node scripts/cdk-insights-wrapper.js scan","scan:all":"node scripts/cdk-insights-wrapper.js scan --all","scan:json":"node scripts/cdk-insights-wrapper.js scan --format json","scan:markdown":"node scripts/cdk-insights-wrapper.js scan --format markdown","scan:summary":"node scripts/cdk-insights-wrapper.js scan --format summary","scan:with-issues":"node scripts/cdk-insights-wrapper.js scan --withIssue","cache:clear":"node scripts/cdk-insights-wrapper.js cache clear","cache:status":"node scripts/cdk-insights-wrapper.js cache status","demo:progress":"ts-node src/examples/progress-demo.ts","demo:single-line":"ts-node src/examples/single-line-progress-demo.ts","test:line-clearing":"ts-node src/examples/line-clearing-test.ts"},publishConfig:{access:"public"},keywords:["aws","cdk","cloudformation","analysis","security","cost-optimization","static-analysis","devops","infrastructure","aws-cdk","cloud-security","compliance"],author:"Lee Priest <lee@cdkinsights.dev>",license:"BUSL-1.1",homepage:"https://github.com/instancelabs/cdk-insights",bugs:"https://github.com/instancelabs/cdk-insights/issues",repository:{type:"git",url:"git+https://github.com/instancelabs/cdk-insights.git"},dependencies:{"@inquirer/prompts":"^7.4.1","@middy/core":"^6.1.6","@types/glob":"^8.1.0",axios:"^1.8.4",chalk:"^5.4.1",chokidar:"^3.6.0","cli-progress":"^3.12.0","cli-table3":"^0.6.5",dotenv:"^16.5.0",envolution:"^1.4.1",glob:"^11.0.3",ora:"^8.2.0",strogger:"^2.0.3",yargs:"^17.7.2",zod:"^3.23.8"},devDependencies:{"@aws-sdk/client-dynamodb":"^3.788.0","@biomejs/biome":"^2.0.6","@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@types/cli-progress":"^3.11.6","@types/jsonwebtoken":"^9.0.9","@types/node":"^22.14.1","@types/yargs":"^17.0.33","aws-cdk":"^2.1010.0","bumper-cli":"^1.6.0",esbuild:"^0.25.2",husky:"^8.0.3","ts-node":"^10.9.2",typescript:"^5.8.3",vitest:"^3.1.1"},peerDependencies:{"@aws-solutions-constructs/aws-apigateway-lambda":"^2.0.0","@aws-solutions-constructs/aws-lambda-stepfunctions":"^2.0.0","@aws-solutions-constructs/aws-s3-lambda":"^2.0.0","aws-cdk-lib":"^2.190.0","cdk-nag":"^2.35.73",constructs:"^10.4.2"},peerDependenciesMeta:{"@aws-solutions-constructs/aws-apigateway-lambda":{optional:!0},"@aws-solutions-constructs/aws-lambda-stepfunctions":{optional:!0},"@aws-solutions-constructs/aws-s3-lambda":{optional:!0}}}});var hC={};xi(hC,{STACK_TRACE_CONTEXT_KEY:()=>ga,ensureStackTraceInCdkJson:()=>yO,isStackTraceContextEnabledInCdkJson:()=>SO,patchCdkJsonForStackTrace:()=>gC});var Bs,Vl,ga,gC,yO,SO,yC=ep(()=>{"use strict";Bs=Z(require("node:fs")),Vl=Z(require("node:path")),ga="@aws-cdk/core:stackTrace",gC=e=>{let t;try{t=JSON.parse(e)}catch{return{status:"invalid-json"}}if(t===null||typeof t!="object"||Array.isArray(t))return{status:"invalid-json"};let s=t,n=s.context,r=n&&typeof n=="object"&&!Array.isArray(n)?{...n}:{};if(r[ga]===!0)return{status:"already-set",updated:e};r[ga]=!0;let i={...s,context:r},o=e.endsWith(`
|
|
81
81
|
`)?`
|
|
82
|
-
`:"";return{status:"added",updated:`${JSON.stringify(i,null,2)}${o}`}},yO=e=>{let t=
|
|
83
|
-
`).forEach(function(o){r=o.indexOf(":"),s=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!s||t[s]&&UA[s])&&(s==="set-cookie"?t[s]?t[s].push(n):t[s]=[n]:t[s]=t[s]?t[s]+", "+n:n)}),t};var dp=Symbol("internals"),jA=/[^\x09\x20-\x7E\x80-\xFF]/g;function $A(e){let t=0,s=e.length;for(;t<s;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;s>t;){let n=e.charCodeAt(s-1);if(n!==9&&n!==32)break;s-=1}return t===0&&s===e.length?e:e.slice(t,s)}function xr(e){return e&&String(e).trim().toLowerCase()}function GA(e){return $A(e.replace(jA,""))}function ki(e){return e===!1||e==null?e:D.isArray(e)?e.map(ki):GA(String(e))}function HA(e){let t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=s.exec(e);)t[n[1]]=n[2];return t}var zA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ta(e,t,s,n,r){if(D.isFunction(n))return n.call(this,t,s);if(r&&(t=s),!!D.isString(t)){if(D.isString(n))return t.indexOf(n)!==-1;if(D.isRegExp(n))return n.test(t)}}function qA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,n)=>s.toUpperCase()+n)}function
|
|
84
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){let n=new this(t);return s.forEach(r=>n.set(r)),n}static accessor(t){let n=(this[dp]=this[dp]={accessors:{}}).accessors,r=this.prototype;function i(o){let a=xr(o);n[a]||(KA(r,o),n[a]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}};En.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(En.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[s]=n}}});D.freezeMethods(En);var Ne=En;var VA="[REDACTED ****]";function ZA(e){if(D.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(D.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function YA(e,t){let s=new Set(t.map(i=>String(i).toLowerCase())),n=[],r=i=>{if(i===null||typeof i!="object"||D.isBuffer(i))return i;if(n.indexOf(i)!==-1)return;i instanceof Ne&&(i=i.toJSON()),n.push(i);let o;if(D.isArray(i))o=[],i.forEach((a,u)=>{let c=r(a);D.isUndefined(c)||(o[u]=c)});else{if(!D.isPlainObject(i)&&ZA(i))return n.pop(),i;o=Object.create(null);for(let[a,u]of Object.entries(i)){let c=s.has(a.toLowerCase())?VA:r(u);D.isUndefined(c)||(o[a]=c)}}return n.pop(),o};return r(e)}var rt=class e extends Error{static from(t,s,n,r,i,o){let a=new e(t.message,s||t.code,n,r,i);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,s,n,r,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let t=this.config,s=t&&D.hasOwnProp(t,"redact")?t.redact:void 0,n=D.isArray(s)&&s.length>0?YA(t,s):D.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};rt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";rt.ERR_BAD_OPTION="ERR_BAD_OPTION";rt.ECONNABORTED="ECONNABORTED";rt.ETIMEDOUT="ETIMEDOUT";rt.ECONNREFUSED="ECONNREFUSED";rt.ERR_NETWORK="ERR_NETWORK";rt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";rt.ERR_DEPRECATED="ERR_DEPRECATED";rt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";rt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";rt.ERR_CANCELED="ERR_CANCELED";rt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";rt.ERR_INVALID_URL="ERR_INVALID_URL";rt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var N=rt;var hm=Z(gm(),1),ji=hm.default;function Qa(e){return D.isPlainObject(e)||D.isArray(e)}function ym(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Ja(e,t,s){return e?e.concat(t).map(function(r,i){return r=ym(r),!s&&i?"["+r+"]":r}).join(s?".":""):t}function Ow(e){return D.isArray(e)&&!e.some(Qa)}var Bw=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Mw(e,t,s){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new(ji||FormData),s=D.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!D.isUndefined(y[h])});let n=s.metaTokens,r=s.visitor||p,i=s.dots,o=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,u=s.maxDepth===void 0?100:s.maxDepth,c=a&&D.isSpecCompliantForm(t);if(!D.isFunction(r))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(D.isDate(g))return g.toISOString();if(D.isBoolean(g))return g.toString();if(!c&&D.isBlob(g))throw new N("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(g)||D.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,h,y){let b=g;if(D.isReactNative(t)&&D.isReactNativeBlob(g))return t.append(Ja(y,h,i),l(g)),!1;if(g&&!y&&typeof g=="object"){if(D.endsWith(h,"{}"))h=n?h:h.slice(0,-2),g=JSON.stringify(g);else if(D.isArray(g)&&Ow(g)||(D.isFileList(g)||D.endsWith(h,"[]"))&&(b=D.toArray(g)))return h=ym(h),b.forEach(function(v,E){!(D.isUndefined(v)||v===null)&&t.append(o===!0?Ja([h],E,i):o===null?h:h+"[]",l(v))}),!1}return Qa(g)?!0:(t.append(Ja(y,h,i),l(g)),!1)}let d=[],m=Object.assign(Bw,{defaultVisitor:p,convertValue:l,isVisitable:Qa});function f(g,h,y=0){if(!D.isUndefined(g)){if(y>u)throw new N("Object is too deeply nested ("+y+" levels). Max depth: "+u,N.ERR_FORM_DATA_DEPTH_EXCEEDED);if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(g),D.forEach(g,function(x,v){(!(D.isUndefined(x)||x===null)&&r.call(t,x,D.isString(v)?v.trim():v,h,m))===!0&&f(x,h?h.concat(v):[v],y+1)}),d.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return f(e),t}var vs=Mw;function Sm(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function bm(e,t){this._pairs=[],e&&vs(e,this,t)}var Dm=bm.prototype;Dm.append=function(t,s){this._pairs.push([t,s])};Dm.toString=function(t){let s=t?function(n){return t.call(this,n,Sm)}:Sm;return this._pairs.map(function(r){return s(r[0])+"="+s(r[1])},"").join("&")};var vm=bm;function Nw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function js(e,t,s){if(!t)return e;let n=s&&s.encode||Nw,r=D.isFunction(s)?{serialize:s}:s,i=r&&r.serialize,o;if(i?o=i(t,r):o=D.isURLSearchParams(t)?t.toString():new vm(t,r).toString(n),o){let a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Xa=class{constructor(){this.handlers=[]}use(t,s,n){return this.handlers.push({fulfilled:t,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(n){n!==null&&t(n)})}},ec=Xa;var Cs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var wm=Z(require("crypto"),1);var Cm=Z(require("url"),1),Am=Cm.default.URLSearchParams;var tc="abcdefghijklmnopqrstuvwxyz",xm="0123456789",Em={DIGIT:xm,ALPHA:tc,ALPHA_DIGIT:tc+tc.toUpperCase()+xm},Ww=(e=16,t=Em.ALPHA_DIGIT)=>{let s="",{length:n}=t,r=new Uint32Array(e);wm.default.randomFillSync(r);for(let i=0;i<e;i++)s+=t[r[i]%n];return s},Rm={isNode:!0,classes:{URLSearchParams:Am,FormData:ji,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Em,generateString:Ww,protocols:["http","https","file","data"]};var rc={};xi(rc,{hasBrowserEnv:()=>nc,hasStandardBrowserEnv:()=>Uw,hasStandardBrowserWebWorkerEnv:()=>jw,navigator:()=>sc,origin:()=>$w});var nc=typeof window<"u"&&typeof document<"u",sc=typeof navigator=="object"&&navigator||void 0,Uw=nc&&(!sc||["ReactNative","NativeScript","NS"].indexOf(sc.product)<0),jw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$w=nc&&window.location.href||"http://localhost";var Fe={...rc,...Rm};function ic(e,t){return vs(e,new Fe.classes.URLSearchParams,{visitor:function(s,n,r,i){return Fe.isNode&&D.isBuffer(s)?(this.append(n,s.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Gw(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hw(e){let t={},s=Object.keys(e),n,r=s.length,i;for(n=0;n<r;n++)i=s[n],t[i]=e[i];return t}function zw(e){function t(s,n,r,i){let o=s[i++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),u=i>=s.length;return o=!o&&D.isArray(r)?r.length:o,u?(D.hasOwnProp(r,o)?r[o]=D.isArray(r[o])?r[o].concat(n):[r[o],n]:r[o]=n,!a):((!r[o]||!D.isObject(r[o]))&&(r[o]=[]),t(s,n,r[o],i)&&D.isArray(r[o])&&(r[o]=Hw(r[o])),!a)}if(D.isFormData(e)&&D.isFunction(e.entries)){let s={};return D.forEachEntry(e,(n,r)=>{t(Gw(n),r,s,0)}),s}return null}var $i=zw;var Tn=(e,t)=>e!=null&&D.hasOwnProp(e,t)?e[t]:void 0;function qw(e,t,s){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(e)}var oc={transitional:Cs,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){let n=s.getContentType()||"",r=n.indexOf("application/json")>-1,i=D.isObject(t);if(i&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return r?JSON.stringify($i(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){let u=Tn(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return ic(t,u).toString();if((a=D.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=Tn(this,"env"),l=c&&c.FormData;return vs(a?{"files[]":t}:t,l&&new l,u)}}return i||r?(s.setContentType("application/json",!1),qw(t)):t}],transformResponse:[function(t){let s=Tn(this,"transitional")||oc.transitional,n=s&&s.forcedJSONParsing,r=Tn(this,"responseType"),i=r==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(n&&!r||i)){let a=!(s&&s.silentJSONParsing)&&i;try{return JSON.parse(t,Tn(this,"parseReviver"))}catch(u){if(a)throw u.name==="SyntaxError"?N.from(u,N.ERR_BAD_RESPONSE,this,null,Tn(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch","query"],e=>{oc.headers[e]={}});var Pn=oc;function Ir(e,t){let s=this||Pn,n=t||s,r=Ne.from(n.headers),i=n.data;return D.forEach(e,function(a){i=a.call(s,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function kr(e){return!!(e&&e.__CANCEL__)}var ac=class extends N{constructor(t,s,n){super(t??"canceled",N.ERR_CANCELED,s,n),this.name="CanceledError",this.__CANCEL__=!0}},vt=ac;function ss(e,t,s){let n=s.config.validateStatus;!s.status||!n||n(s.status)?e(s):t(new N("Request failed with status code "+s.status,s.status>=400&&s.status<500?N.ERR_BAD_REQUEST:N.ERR_BAD_RESPONSE,s.config,s.request,s))}function cc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function uc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $s(e,t,s){let n=!cc(t);return e&&(n||s===!1)?uc(e,t):t}var Kw={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Vw(e){try{return new URL(e)}catch{return null}}function Fm(e){var t=(typeof e=="string"?Vw(e):e)||{},s=t.protocol,n=t.host,r=t.port;if(typeof n!="string"||!n||typeof s!="string"||(s=s.split(":",1)[0],n=n.replace(/:\d*$/,""),r=parseInt(r)||Kw[s]||0,!Zw(n,r)))return"";var i=lc(s+"_proxy")||lc("all_proxy");return i&&i.indexOf("://")===-1&&(i=s+"://"+i),i}function Zw(e,t){var s=lc("no_proxy").toLowerCase();return s?s==="*"?!1:s.split(/[,\s]/).every(function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,o=r?parseInt(r[2]):0;return o&&o!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!e.endsWith(i)):e!==i}):!0}function lc(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var gf=Z(require("http"),1),hf=Z(require("https"),1),Bc=Z(require("http2"),1),Mc=Z(require("util"),1),_c=require("path"),yf=Z(Km(),1),ls=Z(require("zlib"),1);var cs="1.16.0";function Or(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}var P0=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Rc(e,t,s){let n=s&&s.Blob||Fe.classes.Blob,r=Or(e);if(t===void 0&&n&&(t=!0),r==="data"){e=r.length?e.slice(r.length+1):e;let i=P0.exec(e);if(!i)throw new N("Invalid URL",N.ERR_INVALID_URL);let o=i[1],a=i[2],u=i[3],c=Buffer.from(decodeURIComponent(u),a?"base64":"utf8");if(t){if(!n)throw new N("Blob is not supported",N.ERR_NOT_SUPPORT);return new n([c],{type:o})}return c}throw new N("Unsupported protocol "+r,N.ERR_NOT_SUPPORT)}var Tt=Z(require("stream"),1);var Vm=Z(require("stream"),1);var Fc=Symbol("internals"),Ic=class extends Vm.default.Transform{constructor(t){t=D.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,r)=>!D.isUndefined(r[n])),super({readableHighWaterMark:t.chunkSize});let s=this[Fc]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(s.isCaptured||(s.isCaptured=!0))})}_read(t){let s=this[Fc];return s.onReadCallback&&s.onReadCallback(),super._read(t)}_transform(t,s,n){let r=this[Fc],i=r.maxRate,o=this.readableHighWaterMark,a=r.timeWindow,u=1e3/a,c=i/u,l=r.minChunkSize!==!1?Math.max(r.minChunkSize,c*.01):0,p=(m,f)=>{let g=Buffer.byteLength(m);r.bytesSeen+=g,r.bytes+=g,r.isCaptured&&this.emit("progress",r.bytesSeen),this.push(m)?process.nextTick(f):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(f)}},d=(m,f)=>{let g=Buffer.byteLength(m),h=null,y=o,b,x=0;if(i){let v=Date.now();(!r.ts||(x=v-r.ts)>=a)&&(r.ts=v,b=c-r.bytes,r.bytes=b<0?-b:0,x=0),b=c-r.bytes}if(i){if(b<=0)return setTimeout(()=>{f(null,m)},a-x);b<y&&(y=b)}y&&g>y&&g-y>l&&(h=m.subarray(y),m=m.subarray(0,y)),p(m,h?()=>{process.nextTick(f,null,h)}:f)};d(t,function m(f,g){if(f)return n(f);g?d(g,m):n(null)})}},kc=Ic;var Sf=require("events");var Ym=Z(require("util"),1),Jm=require("stream");var{asyncIterator:Zm}=Symbol,L0=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Zm]?yield*e[Zm]():yield e},Ki=L0;var _0=Fe.ALPHABET.ALPHA_DIGIT+"-_",Br=typeof TextEncoder=="function"?new TextEncoder:new Ym.default.TextEncoder,qs=`\r
|
|
85
|
-
`,O0=Br.encode(qs),B0=2,Tc=class{constructor(t,s){let{escapeName:n}=this.constructor,r=D.isString(s),i=`Content-Disposition: form-data; name="${n(t)}"${!r&&s.name?`; filename="${n(s.name)}"`:""}${qs}`;if(r)s=Br.encode(String(s).replace(/\r?\n|\r\n?/g,qs));else{let o=String(s.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${o}${qs}`}this.headers=Br.encode(i+qs),this.contentLength=r?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+B0,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;D.isTypedArray(t)?yield t:yield*Ki(t),yield O0}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},M0=(e,t,s)=>{let{tag:n="form-data-boundary",size:r=25,boundary:i=n+"-"+Fe.generateString(r,_0)}=s||{};if(!D.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 1-70 characters long");let o=Br.encode("--"+i+qs),a=Br.encode("--"+i+"--"+qs),u=a.byteLength,c=Array.from(e.entries()).map(([p,d])=>{let m=new Tc(p,d);return u+=m.size,m});u+=o.byteLength*c.length,u=D.toFiniteNumber(u);let l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),Jm.Readable.from(async function*(){for(let p of c)yield o,yield*p.encode();yield a}())},Qm=M0;var Xm=Z(require("stream"),1),Pc=class extends Xm.default.Transform{__transform(t,s,n){this.push(t),n()}_transform(t,s,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,s)}this.__transform(t,s,n)}},ef=Pc;var N0=(e,t)=>D.isAsyncFn(e)?function(...s){let n=s.pop();e.apply(this,s).then(r=>{try{t?n(null,...t(r)):n(null,r)}catch(i){n(i)}},n)}:e,tf=N0;var W0=new Set(["localhost"]),rf=e=>{let t=e.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(s=>/^\d+$/.test(s)&&Number(s)>=0&&Number(s)<=255)},U0=e=>{if(e==="::1")return!0;let t=e.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return rf(t[1]);let s=e.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(s){let r=parseInt(s[1],16);return r>=32512&&r<=32767}let n=e.split(":");if(n.length===8){for(let r=0;r<7;r++)if(!/^0+$/.test(n[r]))return!1;return/^0*1$/.test(n[7])}return!1},sf=e=>e?W0.has(e)||rf(e)?!0:U0(e):!1,j0={http:80,https:443,ws:80,wss:443,ftp:21},$0=e=>{let t=e,s=0;if(t.charAt(0)==="["){let i=t.indexOf("]");if(i!==-1){let o=t.slice(1,i),a=t.slice(i+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(s=Number.parseInt(a.slice(1),10)),[o,s]}}let n=t.indexOf(":"),r=t.lastIndexOf(":");return n!==-1&&n===r&&/^\d+$/.test(t.slice(r+1))&&(s=Number.parseInt(t.slice(r+1),10),t=t.slice(0,r)),[t,s]},G0=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,H0=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,z0=e=>{if(typeof e!="string"||e.indexOf(":")===-1)return e;let t=e.match(G0);if(t)return t[1];let s=e.match(H0);if(s){let n=parseInt(s[1],16),r=parseInt(s[2],16);return`${n>>8}.${n&255}.${r>>8}.${r&255}`}return e},nf=e=>e&&(e.charAt(0)==="["&&e.charAt(e.length-1)==="]"&&(e=e.slice(1,-1)),z0(e.replace(/\.+$/,"")));function Lc(e){let t;try{t=new URL(e)}catch{return!1}let s=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!s)return!1;if(s==="*")return!0;let n=Number.parseInt(t.port,10)||j0[t.protocol.split(":",1)[0]]||0,r=nf(t.hostname.toLowerCase());return s.split(/[\s,]+/).some(i=>{if(!i)return!1;let[o,a]=$0(i);return o=nf(o),!o||a&&a!==n?!1:(o.charAt(0)==="*"&&(o=o.slice(1)),o.charAt(0)==="."?r.endsWith(o):r===o||sf(r)&&sf(o))})}function q0(e,t){e=e||10;let s=new Array(e),n=new Array(e),r=0,i=0,o;return t=t!==void 0?t:1e3,function(u){let c=Date.now(),l=n[i];o||(o=c),s[r]=u,n[r]=c;let p=i,d=0;for(;p!==r;)d+=s[p++],p=p%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),c-o<t)return;let m=l&&c-l;return m?Math.round(d*1e3/m):void 0}}var of=q0;function K0(e,t){let s=0,n=1e3/t,r,i,o=(c,l=Date.now())=>{s=l,r=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{let l=Date.now(),p=l-s;p>=n?o(c,l):(r=c,i||(i=setTimeout(()=>{i=null,o(r)},n-p)))},()=>r&&o(r)]}var af=K0;var us=(e,t,s=3)=>{let n=0,r=of(50,250);return af(i=>{let o=i.loaded,a=i.lengthComputable?i.total:void 0,u=a!=null?Math.min(o,a):o,c=Math.max(0,u-n),l=r(c);n=Math.max(n,u);let p={loaded:u,total:a,progress:a?u/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a?(a-u)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(p)},s)},Bn=(e,t)=>{let s=e!=null;return[n=>t[0]({lengthComputable:s,total:e,loaded:n}),t[1]]},Mn=e=>(...t)=>D.asap(()=>e(...t));function Mr(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let s=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(s)){let o=n.length,a=n.length;for(let m=0;m<a;m++)if(n.charCodeAt(m)===37&&m+2<a){let f=n.charCodeAt(m+1),g=n.charCodeAt(m+2);(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(o-=2,m+=2)}let u=0,c=a-1,l=m=>m>=2&&n.charCodeAt(m-2)===37&&n.charCodeAt(m-1)===51&&(n.charCodeAt(m)===68||n.charCodeAt(m)===100);c>=0&&(n.charCodeAt(c)===61?(u++,c--):l(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||l(c))&&u++;let d=Math.floor(o/4)*3-(u||0);return d>0?d:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let i=0;for(let o=0,a=n.length;o<a;o++){let u=n.charCodeAt(o);if(u<128)i+=1;else if(u<2048)i+=2;else if(u>=55296&&u<=56319&&o+1<a){let c=n.charCodeAt(o+1);c>=56320&&c<=57343?(i+=4,o++):i+=3}else i+=3}return i}var cf={flush:ls.default.constants.Z_SYNC_FLUSH,finishFlush:ls.default.constants.Z_SYNC_FLUSH},V0={flush:ls.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ls.default.constants.BROTLI_OPERATION_FLUSH},uf=D.isFunction(ls.default.createBrotliDecompress),{http:Z0,https:Y0}=yf.default,J0=/https:?/,Q0=["content-type","content-length"];function X0(e,t,s){if(s!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,r])=>{Q0.includes(n.toLowerCase())&&e.set(n,r)})}var lf=Symbol("axios.http.socketListener"),Vi=Symbol("axios.http.currentReq"),pf=Fe.protocols.map(e=>e+":"),df=e=>{if(!D.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},mf=(e,[t,s])=>(e.on("end",s).on("error",s),t),Oc=class{constructor(){this.sessions=Object.create(null)}getSession(t,s){s=Object.assign({sessionTimeout:1e3},s);let n=this.sessions[t];if(n){let l=n.length;for(let p=0;p<l;p++){let[d,m]=n[p];if(!d.destroyed&&!d.closed&&Mc.default.isDeepStrictEqual(m,s))return d}}let r=Bc.default.connect(t,s),i,o=()=>{if(i)return;i=!0;let l=n,p=l.length,d=p;for(;d--;)if(l[d][0]===r){p===1?delete this.sessions[t]:l.splice(d,1),r.closed||r.close();return}},a=r.request,{sessionTimeout:u}=s;if(u!=null){let l,p=0;r.request=function(){let d=a.apply(this,arguments);return p++,l&&(clearTimeout(l),l=null),d.once("close",()=>{--p||(l=setTimeout(()=>{l=null,o()},u))}),d}}r.once("close",o);let c=[r,s];return n?n.push(c):n=this.sessions[t]=[c],r}},eE=new Oc;function tE(e,t,s){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t,s)}function bf(e,t,s,n){let r=t;if(!r&&r!==!1){let i=Fm(s);i&&(Lc(s)||(r=new URL(i)))}if(n&&e.headers)for(let i of Object.keys(e.headers))i.toLowerCase()==="proxy-authorization"&&delete e.headers[i];if(r){let i=r instanceof URL,o=m=>i||D.hasOwnProp(r,m)?r[m]:void 0,a=o("username"),u=o("password"),c=D.hasOwnProp(r,"auth")?r.auth:void 0;if(a&&(c=(a||"")+":"+(u||"")),c){let m=typeof c=="object",f=m&&D.hasOwnProp(c,"username")?c.username:void 0,g=m&&D.hasOwnProp(c,"password")?c.password:void 0;if(!!(f||g))c=(f||"")+":"+(g||"");else if(m)throw new N("Invalid proxy authorization",N.ERR_BAD_OPTION,{proxy:r});let y=Buffer.from(c,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+y}let l=!1;for(let m of Object.keys(e.headers))if(m.toLowerCase()==="host"){l=!0;break}l||(e.headers.host=e.hostname+(e.port?":"+e.port:""));let p=o("hostname")||o("host");e.hostname=p,e.host=p,e.port=o("port"),e.path=s;let d=o("protocol");d&&(e.protocol=d.includes(":")?d:`${d}:`)}e.beforeRedirects.proxy=function(o){bf(o,t,o.href,!0)}}var sE=typeof process<"u"&&D.kindOf(process)==="process",nE=e=>new Promise((t,s)=>{let n,r,i=(u,c)=>{r||(r=!0,n&&n(u,c))},o=u=>{i(u),t(u)},a=u=>{i(u,!0),s(u)};e(o,a,u=>n=u).catch(a)}),rE=({address:e,family:t})=>{if(!D.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},ff=(e,t)=>rE(D.isObject(e)?e:{address:e,family:t}),iE={request(e,t){let s=e.protocol+"//"+e.hostname+":"+(e.port||(e.protocol==="https:"?443:80)),{http2Options:n,headers:r}=e,i=eE.getSession(s,n),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:u,HTTP2_HEADER_STATUS:c}=Bc.default.constants,l={[o]:e.protocol.replace(":",""),[a]:e.method,[u]:e.path};D.forEach(r,(d,m)=>{m.charAt(0)!==":"&&(l[m]=d)});let p=i.request(l);return p.once("response",d=>{let m=p;d=Object.assign({},d);let f=d[c];delete d[c],m.headers=d,m.statusCode=+f,t(m)}),p}},Df=sE&&function(t){return nE(async function(n,r,i){let o=G=>D.hasOwnProp(t,G)?t[G]:void 0,a=o("data"),u=o("lookup"),c=o("family"),l=o("httpVersion");l===void 0&&(l=1);let p=o("http2Options"),d=o("responseType"),m=o("responseEncoding"),f=t.method.toUpperCase(),g,h=!1,y,b;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(l!==1&&l!==2)throw TypeError(`Unsupported protocol version '${l}'`);let x=l===2;if(u){let G=tf(u,k=>D.isArray(k)?k:[k]);u=(k,J,Se)=>{G(k,J,(K,he,He)=>{if(K)return Se(K);let xe=D.isArray(he)?he.map(mt=>ff(mt)):[ff(he,He)];J.all?Se(K,xe):Se(K,xe[0].address,xe[0].family)})}}let v=new Sf.EventEmitter;function E(G){try{v.emit("abort",!G||G.type?new vt(null,t,y):G)}catch(k){console.warn("emit error",k)}}function O(){b&&(clearTimeout(b),b=null)}function M(){let G=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",k=t.transitional||Cs;return t.timeoutErrorMessage&&(G=t.timeoutErrorMessage),new N(G,k.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,y)}v.once("abort",r);let P=()=>{O(),t.cancelToken&&t.cancelToken.unsubscribe(E),t.signal&&t.signal.removeEventListener("abort",E),v.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(E),t.signal&&(t.signal.aborted?E():t.signal.addEventListener("abort",E))),i((G,k)=>{if(g=!0,O(),k){h=!0,P();return}let{data:J}=G;if(J instanceof Tt.default.Readable||J instanceof Tt.default.Duplex){let Se=Tt.default.finished(J,()=>{Se(),P()})}else P()});let X=$s(t.baseURL,t.url,t.allowAbsoluteUrls),B=new URL(X,Fe.hasBrowserEnv?Fe.origin:void 0),z=B.protocol||pf[0];if(z==="data:"){if(t.maxContentLength>-1){let k=String(t.url||X||"");if(Mr(k)>t.maxContentLength)return r(new N("maxContentLength size of "+t.maxContentLength+" exceeded",N.ERR_BAD_RESPONSE,t))}let G;if(f!=="GET")return ss(n,r,{status:405,statusText:"method not allowed",headers:{},config:t});try{G=Rc(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(k){throw N.from(k,N.ERR_BAD_REQUEST,t)}return d==="text"?(G=G.toString(m),(!m||m==="utf8")&&(G=D.stripBOM(G))):d==="stream"&&(G=Tt.default.Readable.from(G)),ss(n,r,{data:G,status:200,statusText:"OK",headers:new Ne,config:t})}if(pf.indexOf(z)===-1)return r(new N("Unsupported protocol "+z,N.ERR_BAD_REQUEST,t));let ne=Ne.from(t.headers).normalize();ne.set("User-Agent","axios/"+cs,!1);let{onUploadProgress:ie,onDownloadProgress:se}=t,_=t.maxRate,U,Y;if(D.isSpecCompliantForm(a)){let G=ne.getContentType(/boundary=([-_\w\d]{10,70})/i);a=Qm(a,k=>{ne.set(k)},{tag:`axios-${cs}-boundary`,boundary:G&&G[1]||void 0})}else if(D.isFormData(a)&&D.isFunction(a.getHeaders)&&a.getHeaders!==Object.prototype.getHeaders){if(X0(ne,a.getHeaders(),o("formDataHeaderPolicy")),!ne.hasContentLength())try{let G=await Mc.default.promisify(a.getLength).call(a);Number.isFinite(G)&&G>=0&&ne.setContentLength(G)}catch{}}else if(D.isBlob(a)||D.isFile(a))a.size&&ne.setContentType(a.type||"application/octet-stream"),ne.setContentLength(a.size||0),a=Tt.default.Readable.from(Ki(a));else if(a&&!D.isStream(a)){if(!Buffer.isBuffer(a))if(D.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(D.isString(a))a=Buffer.from(a,"utf-8");else return r(new N("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",N.ERR_BAD_REQUEST,t));if(ne.setContentLength(a.length,!1),t.maxBodyLength>-1&&a.length>t.maxBodyLength)return r(new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,t))}let ae=D.toFiniteNumber(ne.getContentLength());D.isArray(_)?(U=_[0],Y=_[1]):U=Y=_,a&&(ie||U)&&(D.isStream(a)||(a=Tt.default.Readable.from(a,{objectMode:!1})),a=Tt.default.pipeline([a,new kc({maxRate:D.toFiniteNumber(U)})],D.noop),ie&&a.on("progress",mf(a,Bn(ae,us(Mn(ie),!1,3)))));let W,ee=o("auth");if(ee){let G=ee.username||"",k=ee.password||"";W=G+":"+k}if(!W&&B.username){let G=df(B.username),k=df(B.password);W=G+":"+k}W&&ne.delete("authorization");let te;try{te=js(B.pathname+B.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(G){let k=new Error(G.message);return k.config=t,k.url=t.url,k.exists=!0,r(k)}ne.set("Accept-Encoding","gzip, compress, deflate"+(uf?", br":""),!1);let pe=Object.assign(Object.create(null),{path:te,method:f,headers:ne.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:W,protocol:z,family:c,beforeRedirect:tE,beforeRedirects:Object.create(null),http2Options:p});if(!D.isUndefined(u)&&(pe.lookup=u),t.socketPath){if(typeof t.socketPath!="string")return r(new N("socketPath must be a string",N.ERR_BAD_OPTION_VALUE,t));if(t.allowedSocketPaths!=null){let G=Array.isArray(t.allowedSocketPaths)?t.allowedSocketPaths:[t.allowedSocketPaths],k=(0,_c.resolve)(t.socketPath);if(!G.some(Se=>typeof Se=="string"&&(0,_c.resolve)(Se)===k))return r(new N(`socketPath "${t.socketPath}" is not permitted by allowedSocketPaths`,N.ERR_BAD_OPTION_VALUE,t))}pe.socketPath=t.socketPath}else pe.hostname=B.hostname.startsWith("[")?B.hostname.slice(1,-1):B.hostname,pe.port=B.port,bf(pe,t.proxy,z+"//"+B.hostname+(B.port?":"+B.port:"")+pe.path);let ce,Le=!1,De=J0.test(pe.protocol);if(pe.agent=De?t.httpsAgent:t.httpAgent,x)ce=iE;else{let G=o("transport");if(G)ce=G;else if(t.maxRedirects===0)ce=De?hf.default:gf.default,Le=!0;else{t.maxRedirects&&(pe.maxRedirects=t.maxRedirects);let k=o("beforeRedirect");k&&(pe.beforeRedirects.config=k),ce=De?Y0:Z0}}t.maxBodyLength>-1?pe.maxBodyLength=t.maxBodyLength:pe.maxBodyLength=1/0,pe.insecureHTTPParser=!!o("insecureHTTPParser"),y=ce.request(pe,function(k){if(O(),y.destroyed)return;let J=[k],Se=D.toFiniteNumber(k.headers["content-length"]);if(se||Y){let xe=new kc({maxRate:D.toFiniteNumber(Y)});se&&xe.on("progress",mf(xe,Bn(Se,us(Mn(se),!0,3)))),J.push(xe)}let K=k,he=k.req||y;if(t.decompress!==!1&&k.headers["content-encoding"])switch((f==="HEAD"||k.statusCode===204)&&delete k.headers["content-encoding"],(k.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":J.push(ls.default.createUnzip(cf)),delete k.headers["content-encoding"];break;case"deflate":J.push(new ef),J.push(ls.default.createUnzip(cf)),delete k.headers["content-encoding"];break;case"br":uf&&(J.push(ls.default.createBrotliDecompress(V0)),delete k.headers["content-encoding"])}K=J.length>1?Tt.default.pipeline(J,D.noop):J[0];let He={status:k.statusCode,statusText:k.statusMessage,headers:new Ne(k.headers),config:t,request:he};if(d==="stream"){if(t.maxContentLength>-1){let xe=t.maxContentLength,mt=K;async function*It(){let Ue=0;for await(let bs of mt){if(Ue+=bs.length,Ue>xe)throw new N("maxContentLength size of "+xe+" exceeded",N.ERR_BAD_RESPONSE,t,he);yield bs}}K=Tt.default.Readable.from(It(),{objectMode:!1})}He.data=K,ss(n,r,He)}else{let xe=[],mt=0;K.on("data",function(Ue){xe.push(Ue),mt+=Ue.length,t.maxContentLength>-1&&mt>t.maxContentLength&&(h=!0,K.destroy(),E(new N("maxContentLength size of "+t.maxContentLength+" exceeded",N.ERR_BAD_RESPONSE,t,he)))}),K.on("aborted",function(){if(h)return;let Ue=new N("stream has been aborted",N.ERR_BAD_RESPONSE,t,he,He);K.destroy(Ue),r(Ue)}),K.on("error",function(Ue){h||r(N.from(Ue,null,t,he,He))}),K.on("end",function(){try{let Ue=xe.length===1?xe[0]:Buffer.concat(xe);d!=="arraybuffer"&&(Ue=Ue.toString(m),(!m||m==="utf8")&&(Ue=D.stripBOM(Ue))),He.data=Ue}catch(Ue){return r(N.from(Ue,null,t,He.request,He))}ss(n,r,He)})}v.once("abort",xe=>{K.destroyed||(K.emit("error",xe),K.destroy())})}),v.once("abort",G=>{y.close?y.close():y.destroy(G)}),y.on("error",function(k){r(N.from(k,null,t,y))});let re=new Set;if(y.on("socket",function(k){k.setKeepAlive(!0,1e3*60),k[lf]||(k.on("error",function(Se){let K=k[Vi];K&&!K.destroyed&&K.destroy(Se)}),k[lf]=!0),k[Vi]=y,re.add(k)}),y.once("close",function(){O();for(let k of re)k[Vi]===y&&(k[Vi]=null);re.clear()}),t.timeout){let G=parseInt(t.timeout,10);if(Number.isNaN(G)){E(new N("error trying to parse `config.timeout` to int",N.ERR_BAD_OPTION_VALUE,t,y));return}let k=function(){g||E(M())};Le&&G>0&&(b=setTimeout(k,G)),y.setTimeout(G,k)}else y.setTimeout(0);if(D.isStream(a)){let G=!1,k=!1;a.on("end",()=>{G=!0}),a.once("error",Se=>{k=!0,y.destroy(Se)}),a.on("close",()=>{!G&&!k&&E(new vt("Request stream has been aborted",t,y))});let J=a;if(t.maxBodyLength>-1&&t.maxRedirects===0){let Se=t.maxBodyLength,K=0;J=Tt.default.pipeline([a,new Tt.default.Transform({transform(he,He,xe){if(K+=he.length,K>Se)return xe(new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,t,y));xe(null,he)}})],D.noop),J.on("error",he=>{y.destroyed||y.destroy(he)})}J.pipe(y)}else a&&y.write(a),y.end()})};var vf=Fe.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,Fe.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0;var Cf=Fe.hasStandardBrowserEnv?{write(e,t,s,n,r,i,o){if(typeof document>"u")return;let a=[`${e}=${encodeURIComponent(t)}`];D.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),D.isString(n)&&a.push(`path=${n}`),D.isString(r)&&a.push(`domain=${r}`),i===!0&&a.push("secure"),D.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.split(";");for(let s=0;s<t.length;s++){let n=t[s].replace(/^\s+/,""),r=n.indexOf("=");if(r!==-1&&n.slice(0,r)===e)return decodeURIComponent(n.slice(r+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var Af=e=>e instanceof Ne?{...e}:e;function Ht(e,t){t=t||{};let s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(c,l,p,d){return D.isPlainObject(c)&&D.isPlainObject(l)?D.merge.call({caseless:d},c,l):D.isPlainObject(l)?D.merge({},l):D.isArray(l)?l.slice():l}function r(c,l,p,d){if(D.isUndefined(l)){if(!D.isUndefined(c))return n(void 0,c,p,d)}else return n(c,l,p,d)}function i(c,l){if(!D.isUndefined(l))return n(void 0,l)}function o(c,l){if(D.isUndefined(l)){if(!D.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,p){if(D.hasOwnProp(t,p))return n(c,l);if(D.hasOwnProp(e,p))return n(void 0,c)}let u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:a,headers:(c,l,p)=>r(Af(c),Af(l),p,!0)};return D.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;let p=D.hasOwnProp(u,l)?u[l]:r,d=D.hasOwnProp(e,l)?e[l]:void 0,m=D.hasOwnProp(t,l)?t[l]:void 0,f=p(d,m,l);D.isUndefined(f)&&p!==a||(s[l]=f)}),s}var oE=["content-type","content-length"];function aE(e,t,s){if(s!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,r])=>{oE.includes(n.toLowerCase())&&e.set(n,r)})}var cE=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),Zi=e=>{let t=Ht({},e),s=d=>D.hasOwnProp(t,d)?t[d]:void 0,n=s("data"),r=s("withXSRFToken"),i=s("xsrfHeaderName"),o=s("xsrfCookieName"),a=s("headers"),u=s("auth"),c=s("baseURL"),l=s("allowAbsoluteUrls"),p=s("url");if(t.headers=a=Ne.from(a),t.url=js($s(c,p,l),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?cE(u.password):""))),D.isFormData(n)&&(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv?a.setContentType(void 0):D.isFunction(n.getHeaders)&&aE(a,n.getHeaders(),s("formDataHeaderPolicy"))),Fe.hasStandardBrowserEnv&&(D.isFunction(r)&&(r=r(t)),r===!0||r==null&&vf(t.url))){let m=i&&o&&Cf.read(o);m&&a.set(i,m)}return t};var uE=typeof XMLHttpRequest<"u",xf=uE&&function(e){return new Promise(function(s,n){let r=Zi(e),i=r.data,o=Ne.from(r.headers).normalize(),{responseType:a,onUploadProgress:u,onDownloadProgress:c}=r,l,p,d,m,f;function g(){m&&m(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function y(){if(!h)return;let x=Ne.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:e,request:h};ss(function(M){s(M),g()},function(M){n(M),g()},E),h=null}"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith("file:"))||setTimeout(y)},h.onabort=function(){h&&(n(new N("Request aborted",N.ECONNABORTED,e,h)),g(),h=null)},h.onerror=function(v){let E=v&&v.message?v.message:"Network Error",O=new N(E,N.ERR_NETWORK,e,h);O.event=v||null,n(O),g(),h=null},h.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",E=r.transitional||Cs;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),n(new N(v,E.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,h)),g(),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&D.forEach(o.toJSON(),function(v,E){h.setRequestHeader(E,v)}),D.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),a&&a!=="json"&&(h.responseType=r.responseType),c&&([d,f]=us(c,!0),h.addEventListener("progress",d)),u&&h.upload&&([p,m]=us(u),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(l=x=>{h&&(n(!x||x.type?new vt(null,e,h):x),h.abort(),g(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));let b=Or(r.url);if(b&&!Fe.protocols.includes(b)){n(new N("Unsupported protocol "+b+":",N.ERR_BAD_REQUEST,e));return}h.send(i||null)})};var lE=(e,t)=>{let{length:s}=e=e?e.filter(Boolean):[];if(t||s){let n=new AbortController,r,i=function(c){if(!r){r=!0,a();let l=c instanceof Error?c:this.reason;n.abort(l instanceof N?l:new vt(l instanceof Error?l.message:l))}},o=t&&setTimeout(()=>{o=null,i(new N(`timeout of ${t}ms exceeded`,N.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));let{signal:u}=n;return u.unsubscribe=()=>D.asap(a),u}},wf=lE;var pE=function*(e,t){let s=e.byteLength;if(!t||s<t){yield e;return}let n=0,r;for(;n<s;)r=n+t,yield e.slice(n,r),n=r},dE=async function*(e,t){for await(let s of mE(e))yield*pE(s,t)},mE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:s,value:n}=await t.read();if(s)break;yield n}}finally{await t.cancel()}},Nc=(e,t,s,n)=>{let r=dE(e,t),i=0,o,a=u=>{o||(o=!0,n&&n(u))};return new ReadableStream({async pull(u){try{let{done:c,value:l}=await r.next();if(c){a(),u.close();return}let p=l.byteLength;if(s){let d=i+=p;s(d)}u.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(u){return a(u),r.return()}},{highWaterMark:2})};var Ef=64*1024,{isFunction:Yi}=D,Rf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fE=e=>{let t=D.global??globalThis,{ReadableStream:s,TextEncoder:n}=t;e=D.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:r,Request:i,Response:o}=e,a=r?Yi(r):typeof fetch=="function",u=Yi(i),c=Yi(o);if(!a)return!1;let l=a&&Yi(s),p=a&&(typeof n=="function"?(y=>b=>y.encode(b))(new n):async y=>new Uint8Array(await new i(y).arrayBuffer())),d=u&&l&&Rf(()=>{let y=!1,b=new i(Fe.origin,{body:new s,method:"POST",get duplex(){return y=!0,"half"}}),x=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),y&&!x}),m=c&&l&&Rf(()=>D.isReadableStream(new o("").body)),f={stream:m&&(y=>y.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!f[y]&&(f[y]=(b,x)=>{let v=b&&b[y];if(v)return v.call(b);throw new N(`Response type '${y}' is not supported`,N.ERR_NOT_SUPPORT,x)})});let g=async y=>{if(y==null)return 0;if(D.isBlob(y))return y.size;if(D.isSpecCompliantForm(y))return(await new i(Fe.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(D.isArrayBufferView(y)||D.isArrayBuffer(y))return y.byteLength;if(D.isURLSearchParams(y)&&(y=y+""),D.isString(y))return(await p(y)).byteLength},h=async(y,b)=>{let x=D.toFiniteNumber(y.getContentLength());return x??g(b)};return async y=>{let{url:b,method:x,data:v,signal:E,cancelToken:O,timeout:M,onDownloadProgress:P,onUploadProgress:X,responseType:B,headers:z,withCredentials:ne="same-origin",fetchOptions:ie,maxContentLength:se,maxBodyLength:_}=Zi(y),U=D.isNumber(se)&&se>-1,Y=D.isNumber(_)&&_>-1,ae=r||fetch;B=B?(B+"").toLowerCase():"text";let W=wf([E,O&&O.toAbortSignal()],M),ee=null,te=W&&W.unsubscribe&&(()=>{W.unsubscribe()}),pe;try{if(U&&typeof b=="string"&&b.startsWith("data:")&&Mr(b)>se)throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee);if(Y&&x!=="get"&&x!=="head"){let k=await h(z,v);if(typeof k=="number"&&isFinite(k)&&k>_)throw new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,y,ee)}if(X&&d&&x!=="get"&&x!=="head"&&(pe=await h(z,v))!==0){let k=new i(b,{method:"POST",body:v,duplex:"half"}),J;if(D.isFormData(v)&&(J=k.headers.get("content-type"))&&z.setContentType(J),k.body){let[Se,K]=Bn(pe,us(Mn(X)));v=Nc(k.body,Ef,Se,K)}}D.isString(ne)||(ne=ne?"include":"omit");let ce=u&&"credentials"in i.prototype;if(D.isFormData(v)){let k=z.getContentType();k&&/^multipart\/form-data/i.test(k)&&!/boundary=/i.test(k)&&z.delete("content-type")}z.set("User-Agent","axios/"+cs,!1);let Le={...ie,signal:W,method:x.toUpperCase(),headers:z.normalize().toJSON(),body:v,duplex:"half",credentials:ce?ne:void 0};ee=u&&new i(b,Le);let De=await(u?ae(ee,ie):ae(b,Le));if(U){let k=D.toFiniteNumber(De.headers.get("content-length"));if(k!=null&&k>se)throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee)}let re=m&&(B==="stream"||B==="response");if(m&&De.body&&(P||U||re&&te)){let k={};["status","statusText","headers"].forEach(xe=>{k[xe]=De[xe]});let J=D.toFiniteNumber(De.headers.get("content-length")),[Se,K]=P&&Bn(J,us(Mn(P),!0))||[],he=0,He=xe=>{if(U&&(he=xe,he>se))throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee);Se&&Se(xe)};De=new o(Nc(De.body,Ef,He,()=>{K&&K(),te&&te()}),k)}B=B||"text";let G=await f[D.findKey(f,B)||"text"](De,y);if(U&&!m&&!re){let k;if(G!=null&&(typeof G.byteLength=="number"?k=G.byteLength:typeof G.size=="number"?k=G.size:typeof G=="string"&&(k=typeof n=="function"?new n().encode(G).byteLength:G.length)),typeof k=="number"&&k>se)throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee)}return!re&&te&&te(),await new Promise((k,J)=>{ss(k,J,{data:G,headers:Ne.from(De.headers),status:De.status,statusText:De.statusText,config:y,request:ee})})}catch(ce){if(te&&te(),W&&W.aborted&&W.reason instanceof N){let Le=W.reason;throw Le.config=y,ee&&(Le.request=ee),ce!==Le&&(Le.cause=ce),Le}throw ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,y,ee,ce&&ce.response),{cause:ce.cause||ce}):N.from(ce,ce&&ce.code,y,ee,ce&&ce.response)}}},gE=new Map,Wc=e=>{let t=e&&e.env||{},{fetch:s,Request:n,Response:r}=t,i=[n,r,s],o=i.length,a=o,u,c,l=gE;for(;a--;)u=i[a],c=l.get(u),c===void 0&&l.set(u,c=a?new Map:fE(t)),l=c;return c},t1=Wc();var Uc={http:Df,xhr:xf,fetch:{get:Wc}};D.forEach(Uc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Ff=e=>`- ${e}`,yE=e=>D.isFunction(e)||e===null||e===!1;function SE(e,t){e=D.isArray(e)?e:[e];let{length:s}=e,n,r,i={};for(let o=0;o<s;o++){n=e[o];let a;if(r=n,!yE(n)&&(r=Uc[(a=String(n)).toLowerCase()],r===void 0))throw new N(`Unknown adapter '${a}'`);if(r&&(D.isFunction(r)||(r=r.get(t))))break;i[a||"#"+o]=r}if(!r){let o=Object.entries(i).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build")),a=s?o.length>1?`since :
|
|
82
|
+
`:"";return{status:"added",updated:`${JSON.stringify(i,null,2)}${o}`}},yO=e=>{let t=Vl.join(e,"cdk.json");if(!Bs.existsSync(t))return{status:"missing",cdkJsonPath:t};let s=Bs.readFileSync(t,"utf-8"),n=gC(s);return n.status==="invalid-json"?{status:"invalid-json",cdkJsonPath:t}:n.status==="already-set"?{status:"already-set",cdkJsonPath:t}:(Bs.writeFileSync(t,n.updated,"utf-8"),{status:"added",cdkJsonPath:t})},SO=e=>{try{let t=Vl.join(e,"cdk.json");if(!Bs.existsSync(t))return!1;let s=JSON.parse(Bs.readFileSync(t,"utf-8"));if(!s||typeof s!="object"||Array.isArray(s))return!1;let n=s.context;return!n||typeof n!="object"||Array.isArray(n)?!1:n[ga]===!0}catch{return!1}}});var a2={};xi(a2,{CDK_INSIGHTS_ANNOTATION_PREFIX:()=>va,CDK_INSIGHTS_METADATA_VERSION:()=>Jl,CDK_INSIGHTS_NAG_FINDING_PREFIX:()=>ya,CdkInsightsAspect:()=>Da,CdkInsightsPolicyValidationPlugin:()=>vi,ExtremelyHelpfulConsoleLogger:()=>Di,SCAN_REPORT_SCHEMA_VERSION:()=>FC,clearCaches:()=>EC,createCdkInsightsAspect:()=>wC,createCdkInsightsLogger:()=>AC,createCdkInsightsPolicyValidationPlugin:()=>WC,createExtremelyHelpfulConsoleLogger:()=>xC,getCacheStats:()=>RC,isCdkDebugEnabled:()=>Ql,runAnalysis:()=>o2});module.exports=Fa(a2);var GC=Z(require("node:fs"));function Dr(e,t){return function(){return e.apply(t,arguments)}}var{toString:QC}=Object.prototype,{getPrototypeOf:Ei}=Object,{iterator:Ri,toStringTag:rp}=Symbol,Fi=(e=>t=>{let s=QC.call(t);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),$t=e=>(e=e.toLowerCase(),t=>Fi(t)===e),Ii=e=>t=>typeof t===e,{isArray:wn}=Array,xn=Ii("undefined");function vr(e){return e!==null&&!xn(e)&&e.constructor!==null&&!xn(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ip=$t("ArrayBuffer");function XC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ip(e.buffer),t}var eA=Ii("string"),ft=Ii("function"),op=Ii("number"),Cr=e=>e!==null&&typeof e=="object",tA=e=>e===!0||e===!1,wi=e=>{if(Fi(e)!=="object")return!1;let t=Ei(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(rp in e)&&!(Ri in e)},sA=e=>{if(!Cr(e)||vr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},nA=$t("Date"),rA=$t("File"),iA=e=>!!(e&&typeof e.uri<"u"),oA=e=>e&&typeof e.getParts<"u",aA=$t("Blob"),cA=$t("FileList"),uA=e=>Cr(e)&&ft(e.pipe);function lA(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var sp=lA(),np=typeof sp.FormData<"u"?sp.FormData:void 0,pA=e=>{if(!e)return!1;if(np&&e instanceof np)return!0;let t=Ei(e);if(!t||t===Object.prototype||!ft(e.append))return!1;let s=Fi(e);return s==="formdata"||s==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"},dA=$t("URLSearchParams"),[mA,fA,gA,hA]=["ReadableStream","Request","Response","Headers"].map($t),yA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ar(e,t,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let n,r;if(typeof e!="object"&&(e=[e]),wn(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{if(vr(e))return;let i=s?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length,a;for(n=0;n<o;n++)a=i[n],t.call(null,e[a],a,e)}}function ap(e,t){if(vr(e))return null;t=t.toLowerCase();let s=Object.keys(e),n=s.length,r;for(;n-- >0;)if(r=s[n],t===r.toLowerCase())return r;return null}var Ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cp=e=>!xn(e)&&e!==Ws;function Ia(...e){let{caseless:t,skipUndefined:s}=cp(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;let a=t&&ap(n,o)||o,u=ka(n,a)?n[a]:void 0;wi(u)&&wi(i)?n[a]=Ia(u,i):wi(i)?n[a]=Ia({},i):wn(i)?n[a]=i.slice():(!s||!xn(i))&&(n[a]=i)};for(let i=0,o=e.length;i<o;i++)e[i]&&Ar(e[i],r);return n}var SA=(e,t,s,{allOwnKeys:n}={})=>(Ar(t,(r,i)=>{s&&ft(r)?Object.defineProperty(e,i,{__proto__:null,value:Dr(r,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),bA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),DA=(e,t,s,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(e.prototype,s)},vA=(e,t,s,n)=>{let r,i,o,a={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!n||n(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=s!==!1&&Ei(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},CA=(e,t,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=t.length;let n=e.indexOf(t,s);return n!==-1&&n===s},AA=e=>{if(!e)return null;if(wn(e))return e;let t=e.length;if(!op(t))return null;let s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},xA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ei(Uint8Array)),wA=(e,t)=>{let n=(e&&e[Ri]).call(e),r;for(;(r=n.next())&&!r.done;){let i=r.value;t.call(e,i[0],i[1])}},EA=(e,t)=>{let s,n=[];for(;(s=e.exec(t))!==null;)n.push(s);return n},RA=$t("HTMLFormElement"),FA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,n,r){return n.toUpperCase()+r}),ka=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),IA=$t("RegExp"),up=(e,t)=>{let s=Object.getOwnPropertyDescriptors(e),n={};Ar(s,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(n[i]=o||r)}),Object.defineProperties(e,n)},kA=e=>{up(e,(t,s)=>{if(ft(e)&&["arguments","caller","callee"].includes(s))return!1;let n=e[s];if(ft(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},TA=(e,t)=>{let s={},n=r=>{r.forEach(i=>{s[i]=!0})};return wn(e)?n(e):n(String(e).split(t)),s},PA=()=>{},LA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _A(e){return!!(e&&ft(e.append)&&e[rp]==="FormData"&&e[Ri])}var OA=e=>{let t=new Array(10),s=(n,r)=>{if(Cr(n)){if(t.indexOf(n)>=0)return;if(vr(n))return n;if(!("toJSON"in n)){t[r]=n;let i=wn(n)?[]:{};return Ar(n,(o,a)=>{let u=s(o,r+1);!xn(u)&&(i[a]=u)}),t[r]=void 0,i}}return n};return s(e,0)},BA=$t("AsyncFunction"),MA=e=>e&&(Cr(e)||ft(e))&&ft(e.then)&&ft(e.catch),lp=((e,t)=>e?setImmediate:t?((s,n)=>(Ws.addEventListener("message",({source:r,data:i})=>{r===Ws&&i===s&&n.length&&n.shift()()},!1),r=>{n.push(r),Ws.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",ft(Ws.postMessage)),NA=typeof queueMicrotask<"u"?queueMicrotask.bind(Ws):typeof process<"u"&&process.nextTick||lp,WA=e=>e!=null&&ft(e[Ri]),D={isArray:wn,isArrayBuffer:ip,isBuffer:vr,isFormData:pA,isArrayBufferView:XC,isString:eA,isNumber:op,isBoolean:tA,isObject:Cr,isPlainObject:wi,isEmptyObject:sA,isReadableStream:mA,isRequest:fA,isResponse:gA,isHeaders:hA,isUndefined:xn,isDate:nA,isFile:rA,isReactNativeBlob:iA,isReactNative:oA,isBlob:aA,isRegExp:IA,isFunction:ft,isStream:uA,isURLSearchParams:dA,isTypedArray:xA,isFileList:cA,forEach:Ar,merge:Ia,extend:SA,trim:yA,stripBOM:bA,inherits:DA,toFlatObject:vA,kindOf:Fi,kindOfTest:$t,endsWith:CA,toArray:AA,forEachEntry:wA,matchAll:EA,isHTMLForm:RA,hasOwnProperty:ka,hasOwnProp:ka,reduceDescriptors:up,freezeMethods:kA,toObjectSet:TA,toCamelCase:FA,noop:PA,toFiniteNumber:LA,findKey:ap,global:Ws,isContextDefined:cp,isSpecCompliantForm:_A,toJSONObject:OA,isAsyncFn:BA,isThenable:MA,setImmediate:lp,asap:NA,isIterable:WA};var UA=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pp=e=>{let t={},s,n,r;return e&&e.split(`
|
|
83
|
+
`).forEach(function(o){r=o.indexOf(":"),s=o.substring(0,r).trim().toLowerCase(),n=o.substring(r+1).trim(),!(!s||t[s]&&UA[s])&&(s==="set-cookie"?t[s]?t[s].push(n):t[s]=[n]:t[s]=t[s]?t[s]+", "+n:n)}),t};var dp=Symbol("internals"),jA=/[^\x09\x20-\x7E\x80-\xFF]/g;function $A(e){let t=0,s=e.length;for(;t<s;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;s>t;){let n=e.charCodeAt(s-1);if(n!==9&&n!==32)break;s-=1}return t===0&&s===e.length?e:e.slice(t,s)}function xr(e){return e&&String(e).trim().toLowerCase()}function GA(e){return $A(e.replace(jA,""))}function ki(e){return e===!1||e==null?e:D.isArray(e)?e.map(ki):GA(String(e))}function HA(e){let t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,n;for(;n=s.exec(e);)t[n[1]]=n[2];return t}var zA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ta(e,t,s,n,r){if(D.isFunction(n))return n.call(this,t,s);if(r&&(t=s),!!D.isString(t)){if(D.isString(n))return t.indexOf(n)!==-1;if(D.isRegExp(n))return n.test(t)}}function qA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,n)=>s.toUpperCase()+n)}function VA(e,t){let s=D.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+s,{__proto__:null,value:function(r,i,o){return this[n].call(this,t,r,i,o)},configurable:!0})})}var En=class{constructor(t){t&&this.set(t)}set(t,s,n){let r=this;function i(a,u,c){let l=xr(u);if(!l)throw new Error("header name must be a non-empty string");let p=D.findKey(r,l);(!p||r[p]===void 0||c===!0||c===void 0&&r[p]!==!1)&&(r[p||u]=ki(a))}let o=(a,u)=>D.forEach(a,(c,l)=>i(c,l,u));if(D.isPlainObject(t)||t instanceof this.constructor)o(t,s);else if(D.isString(t)&&(t=t.trim())&&!zA(t))o(pp(t),s);else if(D.isObject(t)&&D.isIterable(t)){let a={},u,c;for(let l of t){if(!D.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[c=l[0]]=(u=a[c])?D.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}o(a,s)}else t!=null&&i(s,t,n);return this}get(t,s){if(t=xr(t),t){let n=D.findKey(this,t);if(n){let r=this[n];if(!s)return r;if(s===!0)return HA(r);if(D.isFunction(s))return s.call(this,r,n);if(D.isRegExp(s))return s.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=xr(t),t){let n=D.findKey(this,t);return!!(n&&this[n]!==void 0&&(!s||Ta(this,this[n],n,s)))}return!1}delete(t,s){let n=this,r=!1;function i(o){if(o=xr(o),o){let a=D.findKey(n,o);a&&(!s||Ta(n,n[a],a,s))&&(delete n[a],r=!0)}}return D.isArray(t)?t.forEach(i):i(t),r}clear(t){let s=Object.keys(this),n=s.length,r=!1;for(;n--;){let i=s[n];(!t||Ta(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){let s=this,n={};return D.forEach(this,(r,i)=>{let o=D.findKey(n,i);if(o){s[o]=ki(r),delete s[i];return}let a=t?qA(i):String(i).trim();a!==i&&delete s[i],s[a]=ki(r),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let s=Object.create(null);return D.forEach(this,(n,r)=>{n!=null&&n!==!1&&(s[r]=t&&D.isArray(n)?n.join(", "):n)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(`
|
|
84
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){let n=new this(t);return s.forEach(r=>n.set(r)),n}static accessor(t){let n=(this[dp]=this[dp]={accessors:{}}).accessors,r=this.prototype;function i(o){let a=xr(o);n[a]||(VA(r,o),n[a]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}};En.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(En.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[s]=n}}});D.freezeMethods(En);var Ne=En;var KA="[REDACTED ****]";function ZA(e){if(D.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(D.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function YA(e,t){let s=new Set(t.map(i=>String(i).toLowerCase())),n=[],r=i=>{if(i===null||typeof i!="object"||D.isBuffer(i))return i;if(n.indexOf(i)!==-1)return;i instanceof Ne&&(i=i.toJSON()),n.push(i);let o;if(D.isArray(i))o=[],i.forEach((a,u)=>{let c=r(a);D.isUndefined(c)||(o[u]=c)});else{if(!D.isPlainObject(i)&&ZA(i))return n.pop(),i;o=Object.create(null);for(let[a,u]of Object.entries(i)){let c=s.has(a.toLowerCase())?KA:r(u);D.isUndefined(c)||(o[a]=c)}}return n.pop(),o};return r(e)}var rt=class e extends Error{static from(t,s,n,r,i,o){let a=new e(t.message,s||t.code,n,r,i);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,s,n,r,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let t=this.config,s=t&&D.hasOwnProp(t,"redact")?t.redact:void 0,n=D.isArray(s)&&s.length>0?YA(t,s):D.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};rt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";rt.ERR_BAD_OPTION="ERR_BAD_OPTION";rt.ECONNABORTED="ECONNABORTED";rt.ETIMEDOUT="ETIMEDOUT";rt.ECONNREFUSED="ECONNREFUSED";rt.ERR_NETWORK="ERR_NETWORK";rt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";rt.ERR_DEPRECATED="ERR_DEPRECATED";rt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";rt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";rt.ERR_CANCELED="ERR_CANCELED";rt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";rt.ERR_INVALID_URL="ERR_INVALID_URL";rt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var N=rt;var hm=Z(gm(),1),ji=hm.default;function Qa(e){return D.isPlainObject(e)||D.isArray(e)}function ym(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function Ja(e,t,s){return e?e.concat(t).map(function(r,i){return r=ym(r),!s&&i?"["+r+"]":r}).join(s?".":""):t}function Ow(e){return D.isArray(e)&&!e.some(Qa)}var Bw=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function Mw(e,t,s){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new(ji||FormData),s=D.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,y){return!D.isUndefined(y[h])});let n=s.metaTokens,r=s.visitor||p,i=s.dots,o=s.indexes,a=s.Blob||typeof Blob<"u"&&Blob,u=s.maxDepth===void 0?100:s.maxDepth,c=a&&D.isSpecCompliantForm(t);if(!D.isFunction(r))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(D.isDate(g))return g.toISOString();if(D.isBoolean(g))return g.toString();if(!c&&D.isBlob(g))throw new N("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(g)||D.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function p(g,h,y){let b=g;if(D.isReactNative(t)&&D.isReactNativeBlob(g))return t.append(Ja(y,h,i),l(g)),!1;if(g&&!y&&typeof g=="object"){if(D.endsWith(h,"{}"))h=n?h:h.slice(0,-2),g=JSON.stringify(g);else if(D.isArray(g)&&Ow(g)||(D.isFileList(g)||D.endsWith(h,"[]"))&&(b=D.toArray(g)))return h=ym(h),b.forEach(function(v,E){!(D.isUndefined(v)||v===null)&&t.append(o===!0?Ja([h],E,i):o===null?h:h+"[]",l(v))}),!1}return Qa(g)?!0:(t.append(Ja(y,h,i),l(g)),!1)}let d=[],m=Object.assign(Bw,{defaultVisitor:p,convertValue:l,isVisitable:Qa});function f(g,h,y=0){if(!D.isUndefined(g)){if(y>u)throw new N("Object is too deeply nested ("+y+" levels). Max depth: "+u,N.ERR_FORM_DATA_DEPTH_EXCEEDED);if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));d.push(g),D.forEach(g,function(x,v){(!(D.isUndefined(x)||x===null)&&r.call(t,x,D.isString(v)?v.trim():v,h,m))===!0&&f(x,h?h.concat(v):[v],y+1)}),d.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return f(e),t}var vs=Mw;function Sm(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function bm(e,t){this._pairs=[],e&&vs(e,this,t)}var Dm=bm.prototype;Dm.append=function(t,s){this._pairs.push([t,s])};Dm.toString=function(t){let s=t?function(n){return t.call(this,n,Sm)}:Sm;return this._pairs.map(function(r){return s(r[0])+"="+s(r[1])},"").join("&")};var vm=bm;function Nw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function js(e,t,s){if(!t)return e;let n=s&&s.encode||Nw,r=D.isFunction(s)?{serialize:s}:s,i=r&&r.serialize,o;if(i?o=i(t,r):o=D.isURLSearchParams(t)?t.toString():new vm(t,r).toString(n),o){let a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Xa=class{constructor(){this.handlers=[]}use(t,s,n){return this.handlers.push({fulfilled:t,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(n){n!==null&&t(n)})}},ec=Xa;var Cs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0};var wm=Z(require("crypto"),1);var Cm=Z(require("url"),1),Am=Cm.default.URLSearchParams;var tc="abcdefghijklmnopqrstuvwxyz",xm="0123456789",Em={DIGIT:xm,ALPHA:tc,ALPHA_DIGIT:tc+tc.toUpperCase()+xm},Ww=(e=16,t=Em.ALPHA_DIGIT)=>{let s="",{length:n}=t,r=new Uint32Array(e);wm.default.randomFillSync(r);for(let i=0;i<e;i++)s+=t[r[i]%n];return s},Rm={isNode:!0,classes:{URLSearchParams:Am,FormData:ji,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Em,generateString:Ww,protocols:["http","https","file","data"]};var rc={};xi(rc,{hasBrowserEnv:()=>nc,hasStandardBrowserEnv:()=>Uw,hasStandardBrowserWebWorkerEnv:()=>jw,navigator:()=>sc,origin:()=>$w});var nc=typeof window<"u"&&typeof document<"u",sc=typeof navigator=="object"&&navigator||void 0,Uw=nc&&(!sc||["ReactNative","NativeScript","NS"].indexOf(sc.product)<0),jw=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",$w=nc&&window.location.href||"http://localhost";var Fe={...rc,...Rm};function ic(e,t){return vs(e,new Fe.classes.URLSearchParams,{visitor:function(s,n,r,i){return Fe.isNode&&D.isBuffer(s)?(this.append(n,s.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Gw(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Hw(e){let t={},s=Object.keys(e),n,r=s.length,i;for(n=0;n<r;n++)i=s[n],t[i]=e[i];return t}function zw(e){function t(s,n,r,i){let o=s[i++];if(o==="__proto__")return!0;let a=Number.isFinite(+o),u=i>=s.length;return o=!o&&D.isArray(r)?r.length:o,u?(D.hasOwnProp(r,o)?r[o]=D.isArray(r[o])?r[o].concat(n):[r[o],n]:r[o]=n,!a):((!r[o]||!D.isObject(r[o]))&&(r[o]=[]),t(s,n,r[o],i)&&D.isArray(r[o])&&(r[o]=Hw(r[o])),!a)}if(D.isFormData(e)&&D.isFunction(e.entries)){let s={};return D.forEachEntry(e,(n,r)=>{t(Gw(n),r,s,0)}),s}return null}var $i=zw;var Tn=(e,t)=>e!=null&&D.hasOwnProp(e,t)?e[t]:void 0;function qw(e,t,s){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(e)}var oc={transitional:Cs,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){let n=s.getContentType()||"",r=n.indexOf("application/json")>-1,i=D.isObject(t);if(i&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return r?JSON.stringify($i(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){let u=Tn(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return ic(t,u).toString();if((a=D.isFileList(t))||n.indexOf("multipart/form-data")>-1){let c=Tn(this,"env"),l=c&&c.FormData;return vs(a?{"files[]":t}:t,l&&new l,u)}}return i||r?(s.setContentType("application/json",!1),qw(t)):t}],transformResponse:[function(t){let s=Tn(this,"transitional")||oc.transitional,n=s&&s.forcedJSONParsing,r=Tn(this,"responseType"),i=r==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(n&&!r||i)){let a=!(s&&s.silentJSONParsing)&&i;try{return JSON.parse(t,Tn(this,"parseReviver"))}catch(u){if(a)throw u.name==="SyntaxError"?N.from(u,N.ERR_BAD_RESPONSE,this,null,Tn(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch","query"],e=>{oc.headers[e]={}});var Pn=oc;function Ir(e,t){let s=this||Pn,n=t||s,r=Ne.from(n.headers),i=n.data;return D.forEach(e,function(a){i=a.call(s,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function kr(e){return!!(e&&e.__CANCEL__)}var ac=class extends N{constructor(t,s,n){super(t??"canceled",N.ERR_CANCELED,s,n),this.name="CanceledError",this.__CANCEL__=!0}},vt=ac;function ss(e,t,s){let n=s.config.validateStatus;!s.status||!n||n(s.status)?e(s):t(new N("Request failed with status code "+s.status,s.status>=400&&s.status<500?N.ERR_BAD_REQUEST:N.ERR_BAD_RESPONSE,s.config,s.request,s))}function cc(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function uc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $s(e,t,s){let n=!cc(t);return e&&(n||s===!1)?uc(e,t):t}var Vw={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Kw(e){try{return new URL(e)}catch{return null}}function Fm(e){var t=(typeof e=="string"?Kw(e):e)||{},s=t.protocol,n=t.host,r=t.port;if(typeof n!="string"||!n||typeof s!="string"||(s=s.split(":",1)[0],n=n.replace(/:\d*$/,""),r=parseInt(r)||Vw[s]||0,!Zw(n,r)))return"";var i=lc(s+"_proxy")||lc("all_proxy");return i&&i.indexOf("://")===-1&&(i=s+"://"+i),i}function Zw(e,t){var s=lc("no_proxy").toLowerCase();return s?s==="*"?!1:s.split(/[,\s]/).every(function(n){if(!n)return!0;var r=n.match(/^(.+):(\d+)$/),i=r?r[1]:n,o=r?parseInt(r[2]):0;return o&&o!==t?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!e.endsWith(i)):e!==i}):!0}function lc(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var gf=Z(require("http"),1),hf=Z(require("https"),1),Bc=Z(require("http2"),1),Mc=Z(require("util"),1),_c=require("path"),yf=Z(Vm(),1),ls=Z(require("zlib"),1);var cs="1.16.0";function Or(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}var P0=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Rc(e,t,s){let n=s&&s.Blob||Fe.classes.Blob,r=Or(e);if(t===void 0&&n&&(t=!0),r==="data"){e=r.length?e.slice(r.length+1):e;let i=P0.exec(e);if(!i)throw new N("Invalid URL",N.ERR_INVALID_URL);let o=i[1],a=i[2],u=i[3],c=Buffer.from(decodeURIComponent(u),a?"base64":"utf8");if(t){if(!n)throw new N("Blob is not supported",N.ERR_NOT_SUPPORT);return new n([c],{type:o})}return c}throw new N("Unsupported protocol "+r,N.ERR_NOT_SUPPORT)}var Tt=Z(require("stream"),1);var Km=Z(require("stream"),1);var Fc=Symbol("internals"),Ic=class extends Km.default.Transform{constructor(t){t=D.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(n,r)=>!D.isUndefined(r[n])),super({readableHighWaterMark:t.chunkSize});let s=this[Fc]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",n=>{n==="progress"&&(s.isCaptured||(s.isCaptured=!0))})}_read(t){let s=this[Fc];return s.onReadCallback&&s.onReadCallback(),super._read(t)}_transform(t,s,n){let r=this[Fc],i=r.maxRate,o=this.readableHighWaterMark,a=r.timeWindow,u=1e3/a,c=i/u,l=r.minChunkSize!==!1?Math.max(r.minChunkSize,c*.01):0,p=(m,f)=>{let g=Buffer.byteLength(m);r.bytesSeen+=g,r.bytes+=g,r.isCaptured&&this.emit("progress",r.bytesSeen),this.push(m)?process.nextTick(f):r.onReadCallback=()=>{r.onReadCallback=null,process.nextTick(f)}},d=(m,f)=>{let g=Buffer.byteLength(m),h=null,y=o,b,x=0;if(i){let v=Date.now();(!r.ts||(x=v-r.ts)>=a)&&(r.ts=v,b=c-r.bytes,r.bytes=b<0?-b:0,x=0),b=c-r.bytes}if(i){if(b<=0)return setTimeout(()=>{f(null,m)},a-x);b<y&&(y=b)}y&&g>y&&g-y>l&&(h=m.subarray(y),m=m.subarray(0,y)),p(m,h?()=>{process.nextTick(f,null,h)}:f)};d(t,function m(f,g){if(f)return n(f);g?d(g,m):n(null)})}},kc=Ic;var Sf=require("events");var Ym=Z(require("util"),1),Jm=require("stream");var{asyncIterator:Zm}=Symbol,L0=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[Zm]?yield*e[Zm]():yield e},Vi=L0;var _0=Fe.ALPHABET.ALPHA_DIGIT+"-_",Br=typeof TextEncoder=="function"?new TextEncoder:new Ym.default.TextEncoder,qs=`\r
|
|
85
|
+
`,O0=Br.encode(qs),B0=2,Tc=class{constructor(t,s){let{escapeName:n}=this.constructor,r=D.isString(s),i=`Content-Disposition: form-data; name="${n(t)}"${!r&&s.name?`; filename="${n(s.name)}"`:""}${qs}`;if(r)s=Br.encode(String(s).replace(/\r?\n|\r\n?/g,qs));else{let o=String(s.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${o}${qs}`}this.headers=Br.encode(i+qs),this.contentLength=r?s.byteLength:s.size,this.size=this.headers.byteLength+this.contentLength+B0,this.name=t,this.value=s}async*encode(){yield this.headers;let{value:t}=this;D.isTypedArray(t)?yield t:yield*Vi(t),yield O0}static escapeName(t){return String(t).replace(/[\r\n"]/g,s=>({"\r":"%0D","\n":"%0A",'"':"%22"})[s])}},M0=(e,t,s)=>{let{tag:n="form-data-boundary",size:r=25,boundary:i=n+"-"+Fe.generateString(r,_0)}=s||{};if(!D.isFormData(e))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 1-70 characters long");let o=Br.encode("--"+i+qs),a=Br.encode("--"+i+"--"+qs),u=a.byteLength,c=Array.from(e.entries()).map(([p,d])=>{let m=new Tc(p,d);return u+=m.size,m});u+=o.byteLength*c.length,u=D.toFiniteNumber(u);let l={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(l["Content-Length"]=u),t&&t(l),Jm.Readable.from(async function*(){for(let p of c)yield o,yield*p.encode();yield a}())},Qm=M0;var Xm=Z(require("stream"),1),Pc=class extends Xm.default.Transform{__transform(t,s,n){this.push(t),n()}_transform(t,s,n){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,s)}this.__transform(t,s,n)}},ef=Pc;var N0=(e,t)=>D.isAsyncFn(e)?function(...s){let n=s.pop();e.apply(this,s).then(r=>{try{t?n(null,...t(r)):n(null,r)}catch(i){n(i)}},n)}:e,tf=N0;var W0=new Set(["localhost"]),rf=e=>{let t=e.split(".");return t.length!==4||t[0]!=="127"?!1:t.every(s=>/^\d+$/.test(s)&&Number(s)>=0&&Number(s)<=255)},U0=e=>{if(e==="::1")return!0;let t=e.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(t)return rf(t[1]);let s=e.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(s){let r=parseInt(s[1],16);return r>=32512&&r<=32767}let n=e.split(":");if(n.length===8){for(let r=0;r<7;r++)if(!/^0+$/.test(n[r]))return!1;return/^0*1$/.test(n[7])}return!1},sf=e=>e?W0.has(e)||rf(e)?!0:U0(e):!1,j0={http:80,https:443,ws:80,wss:443,ftp:21},$0=e=>{let t=e,s=0;if(t.charAt(0)==="["){let i=t.indexOf("]");if(i!==-1){let o=t.slice(1,i),a=t.slice(i+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(s=Number.parseInt(a.slice(1),10)),[o,s]}}let n=t.indexOf(":"),r=t.lastIndexOf(":");return n!==-1&&n===r&&/^\d+$/.test(t.slice(r+1))&&(s=Number.parseInt(t.slice(r+1),10),t=t.slice(0,r)),[t,s]},G0=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,H0=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,z0=e=>{if(typeof e!="string"||e.indexOf(":")===-1)return e;let t=e.match(G0);if(t)return t[1];let s=e.match(H0);if(s){let n=parseInt(s[1],16),r=parseInt(s[2],16);return`${n>>8}.${n&255}.${r>>8}.${r&255}`}return e},nf=e=>e&&(e.charAt(0)==="["&&e.charAt(e.length-1)==="]"&&(e=e.slice(1,-1)),z0(e.replace(/\.+$/,"")));function Lc(e){let t;try{t=new URL(e)}catch{return!1}let s=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!s)return!1;if(s==="*")return!0;let n=Number.parseInt(t.port,10)||j0[t.protocol.split(":",1)[0]]||0,r=nf(t.hostname.toLowerCase());return s.split(/[\s,]+/).some(i=>{if(!i)return!1;let[o,a]=$0(i);return o=nf(o),!o||a&&a!==n?!1:(o.charAt(0)==="*"&&(o=o.slice(1)),o.charAt(0)==="."?r.endsWith(o):r===o||sf(r)&&sf(o))})}function q0(e,t){e=e||10;let s=new Array(e),n=new Array(e),r=0,i=0,o;return t=t!==void 0?t:1e3,function(u){let c=Date.now(),l=n[i];o||(o=c),s[r]=u,n[r]=c;let p=i,d=0;for(;p!==r;)d+=s[p++],p=p%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),c-o<t)return;let m=l&&c-l;return m?Math.round(d*1e3/m):void 0}}var of=q0;function V0(e,t){let s=0,n=1e3/t,r,i,o=(c,l=Date.now())=>{s=l,r=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{let l=Date.now(),p=l-s;p>=n?o(c,l):(r=c,i||(i=setTimeout(()=>{i=null,o(r)},n-p)))},()=>r&&o(r)]}var af=V0;var us=(e,t,s=3)=>{let n=0,r=of(50,250);return af(i=>{let o=i.loaded,a=i.lengthComputable?i.total:void 0,u=a!=null?Math.min(o,a):o,c=Math.max(0,u-n),l=r(c);n=Math.max(n,u);let p={loaded:u,total:a,progress:a?u/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a?(a-u)/l:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(p)},s)},Bn=(e,t)=>{let s=e!=null;return[n=>t[0]({lengthComputable:s,total:e,loaded:n}),t[1]]},Mn=e=>(...t)=>D.asap(()=>e(...t));function Mr(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let s=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(s)){let o=n.length,a=n.length;for(let m=0;m<a;m++)if(n.charCodeAt(m)===37&&m+2<a){let f=n.charCodeAt(m+1),g=n.charCodeAt(m+2);(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(g>=48&&g<=57||g>=65&&g<=70||g>=97&&g<=102)&&(o-=2,m+=2)}let u=0,c=a-1,l=m=>m>=2&&n.charCodeAt(m-2)===37&&n.charCodeAt(m-1)===51&&(n.charCodeAt(m)===68||n.charCodeAt(m)===100);c>=0&&(n.charCodeAt(c)===61?(u++,c--):l(c)&&(u++,c-=3)),u===1&&c>=0&&(n.charCodeAt(c)===61||l(c))&&u++;let d=Math.floor(o/4)*3-(u||0);return d>0?d:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(n,"utf8");let i=0;for(let o=0,a=n.length;o<a;o++){let u=n.charCodeAt(o);if(u<128)i+=1;else if(u<2048)i+=2;else if(u>=55296&&u<=56319&&o+1<a){let c=n.charCodeAt(o+1);c>=56320&&c<=57343?(i+=4,o++):i+=3}else i+=3}return i}var cf={flush:ls.default.constants.Z_SYNC_FLUSH,finishFlush:ls.default.constants.Z_SYNC_FLUSH},K0={flush:ls.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ls.default.constants.BROTLI_OPERATION_FLUSH},uf=D.isFunction(ls.default.createBrotliDecompress),{http:Z0,https:Y0}=yf.default,J0=/https:?/,Q0=["content-type","content-length"];function X0(e,t,s){if(s!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,r])=>{Q0.includes(n.toLowerCase())&&e.set(n,r)})}var lf=Symbol("axios.http.socketListener"),Ki=Symbol("axios.http.currentReq"),pf=Fe.protocols.map(e=>e+":"),df=e=>{if(!D.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},mf=(e,[t,s])=>(e.on("end",s).on("error",s),t),Oc=class{constructor(){this.sessions=Object.create(null)}getSession(t,s){s=Object.assign({sessionTimeout:1e3},s);let n=this.sessions[t];if(n){let l=n.length;for(let p=0;p<l;p++){let[d,m]=n[p];if(!d.destroyed&&!d.closed&&Mc.default.isDeepStrictEqual(m,s))return d}}let r=Bc.default.connect(t,s),i,o=()=>{if(i)return;i=!0;let l=n,p=l.length,d=p;for(;d--;)if(l[d][0]===r){p===1?delete this.sessions[t]:l.splice(d,1),r.closed||r.close();return}},a=r.request,{sessionTimeout:u}=s;if(u!=null){let l,p=0;r.request=function(){let d=a.apply(this,arguments);return p++,l&&(clearTimeout(l),l=null),d.once("close",()=>{--p||(l=setTimeout(()=>{l=null,o()},u))}),d}}r.once("close",o);let c=[r,s];return n?n.push(c):n=this.sessions[t]=[c],r}},eE=new Oc;function tE(e,t,s){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t,s)}function bf(e,t,s,n){let r=t;if(!r&&r!==!1){let i=Fm(s);i&&(Lc(s)||(r=new URL(i)))}if(n&&e.headers)for(let i of Object.keys(e.headers))i.toLowerCase()==="proxy-authorization"&&delete e.headers[i];if(r){let i=r instanceof URL,o=m=>i||D.hasOwnProp(r,m)?r[m]:void 0,a=o("username"),u=o("password"),c=D.hasOwnProp(r,"auth")?r.auth:void 0;if(a&&(c=(a||"")+":"+(u||"")),c){let m=typeof c=="object",f=m&&D.hasOwnProp(c,"username")?c.username:void 0,g=m&&D.hasOwnProp(c,"password")?c.password:void 0;if(!!(f||g))c=(f||"")+":"+(g||"");else if(m)throw new N("Invalid proxy authorization",N.ERR_BAD_OPTION,{proxy:r});let y=Buffer.from(c,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+y}let l=!1;for(let m of Object.keys(e.headers))if(m.toLowerCase()==="host"){l=!0;break}l||(e.headers.host=e.hostname+(e.port?":"+e.port:""));let p=o("hostname")||o("host");e.hostname=p,e.host=p,e.port=o("port"),e.path=s;let d=o("protocol");d&&(e.protocol=d.includes(":")?d:`${d}:`)}e.beforeRedirects.proxy=function(o){bf(o,t,o.href,!0)}}var sE=typeof process<"u"&&D.kindOf(process)==="process",nE=e=>new Promise((t,s)=>{let n,r,i=(u,c)=>{r||(r=!0,n&&n(u,c))},o=u=>{i(u),t(u)},a=u=>{i(u,!0),s(u)};e(o,a,u=>n=u).catch(a)}),rE=({address:e,family:t})=>{if(!D.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},ff=(e,t)=>rE(D.isObject(e)?e:{address:e,family:t}),iE={request(e,t){let s=e.protocol+"//"+e.hostname+":"+(e.port||(e.protocol==="https:"?443:80)),{http2Options:n,headers:r}=e,i=eE.getSession(s,n),{HTTP2_HEADER_SCHEME:o,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:u,HTTP2_HEADER_STATUS:c}=Bc.default.constants,l={[o]:e.protocol.replace(":",""),[a]:e.method,[u]:e.path};D.forEach(r,(d,m)=>{m.charAt(0)!==":"&&(l[m]=d)});let p=i.request(l);return p.once("response",d=>{let m=p;d=Object.assign({},d);let f=d[c];delete d[c],m.headers=d,m.statusCode=+f,t(m)}),p}},Df=sE&&function(t){return nE(async function(n,r,i){let o=G=>D.hasOwnProp(t,G)?t[G]:void 0,a=o("data"),u=o("lookup"),c=o("family"),l=o("httpVersion");l===void 0&&(l=1);let p=o("http2Options"),d=o("responseType"),m=o("responseEncoding"),f=t.method.toUpperCase(),g,h=!1,y,b;if(l=+l,Number.isNaN(l))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(l!==1&&l!==2)throw TypeError(`Unsupported protocol version '${l}'`);let x=l===2;if(u){let G=tf(u,k=>D.isArray(k)?k:[k]);u=(k,J,Se)=>{G(k,J,(V,he,He)=>{if(V)return Se(V);let xe=D.isArray(he)?he.map(mt=>ff(mt)):[ff(he,He)];J.all?Se(V,xe):Se(V,xe[0].address,xe[0].family)})}}let v=new Sf.EventEmitter;function E(G){try{v.emit("abort",!G||G.type?new vt(null,t,y):G)}catch(k){console.warn("emit error",k)}}function O(){b&&(clearTimeout(b),b=null)}function M(){let G=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",k=t.transitional||Cs;return t.timeoutErrorMessage&&(G=t.timeoutErrorMessage),new N(G,k.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,y)}v.once("abort",r);let P=()=>{O(),t.cancelToken&&t.cancelToken.unsubscribe(E),t.signal&&t.signal.removeEventListener("abort",E),v.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(E),t.signal&&(t.signal.aborted?E():t.signal.addEventListener("abort",E))),i((G,k)=>{if(g=!0,O(),k){h=!0,P();return}let{data:J}=G;if(J instanceof Tt.default.Readable||J instanceof Tt.default.Duplex){let Se=Tt.default.finished(J,()=>{Se(),P()})}else P()});let X=$s(t.baseURL,t.url,t.allowAbsoluteUrls),B=new URL(X,Fe.hasBrowserEnv?Fe.origin:void 0),z=B.protocol||pf[0];if(z==="data:"){if(t.maxContentLength>-1){let k=String(t.url||X||"");if(Mr(k)>t.maxContentLength)return r(new N("maxContentLength size of "+t.maxContentLength+" exceeded",N.ERR_BAD_RESPONSE,t))}let G;if(f!=="GET")return ss(n,r,{status:405,statusText:"method not allowed",headers:{},config:t});try{G=Rc(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(k){throw N.from(k,N.ERR_BAD_REQUEST,t)}return d==="text"?(G=G.toString(m),(!m||m==="utf8")&&(G=D.stripBOM(G))):d==="stream"&&(G=Tt.default.Readable.from(G)),ss(n,r,{data:G,status:200,statusText:"OK",headers:new Ne,config:t})}if(pf.indexOf(z)===-1)return r(new N("Unsupported protocol "+z,N.ERR_BAD_REQUEST,t));let ne=Ne.from(t.headers).normalize();ne.set("User-Agent","axios/"+cs,!1);let{onUploadProgress:ie,onDownloadProgress:se}=t,_=t.maxRate,U,Y;if(D.isSpecCompliantForm(a)){let G=ne.getContentType(/boundary=([-_\w\d]{10,70})/i);a=Qm(a,k=>{ne.set(k)},{tag:`axios-${cs}-boundary`,boundary:G&&G[1]||void 0})}else if(D.isFormData(a)&&D.isFunction(a.getHeaders)&&a.getHeaders!==Object.prototype.getHeaders){if(X0(ne,a.getHeaders(),o("formDataHeaderPolicy")),!ne.hasContentLength())try{let G=await Mc.default.promisify(a.getLength).call(a);Number.isFinite(G)&&G>=0&&ne.setContentLength(G)}catch{}}else if(D.isBlob(a)||D.isFile(a))a.size&&ne.setContentType(a.type||"application/octet-stream"),ne.setContentLength(a.size||0),a=Tt.default.Readable.from(Vi(a));else if(a&&!D.isStream(a)){if(!Buffer.isBuffer(a))if(D.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(D.isString(a))a=Buffer.from(a,"utf-8");else return r(new N("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",N.ERR_BAD_REQUEST,t));if(ne.setContentLength(a.length,!1),t.maxBodyLength>-1&&a.length>t.maxBodyLength)return r(new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,t))}let ae=D.toFiniteNumber(ne.getContentLength());D.isArray(_)?(U=_[0],Y=_[1]):U=Y=_,a&&(ie||U)&&(D.isStream(a)||(a=Tt.default.Readable.from(a,{objectMode:!1})),a=Tt.default.pipeline([a,new kc({maxRate:D.toFiniteNumber(U)})],D.noop),ie&&a.on("progress",mf(a,Bn(ae,us(Mn(ie),!1,3)))));let W,ee=o("auth");if(ee){let G=ee.username||"",k=ee.password||"";W=G+":"+k}if(!W&&B.username){let G=df(B.username),k=df(B.password);W=G+":"+k}W&&ne.delete("authorization");let te;try{te=js(B.pathname+B.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(G){let k=new Error(G.message);return k.config=t,k.url=t.url,k.exists=!0,r(k)}ne.set("Accept-Encoding","gzip, compress, deflate"+(uf?", br":""),!1);let pe=Object.assign(Object.create(null),{path:te,method:f,headers:ne.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:W,protocol:z,family:c,beforeRedirect:tE,beforeRedirects:Object.create(null),http2Options:p});if(!D.isUndefined(u)&&(pe.lookup=u),t.socketPath){if(typeof t.socketPath!="string")return r(new N("socketPath must be a string",N.ERR_BAD_OPTION_VALUE,t));if(t.allowedSocketPaths!=null){let G=Array.isArray(t.allowedSocketPaths)?t.allowedSocketPaths:[t.allowedSocketPaths],k=(0,_c.resolve)(t.socketPath);if(!G.some(Se=>typeof Se=="string"&&(0,_c.resolve)(Se)===k))return r(new N(`socketPath "${t.socketPath}" is not permitted by allowedSocketPaths`,N.ERR_BAD_OPTION_VALUE,t))}pe.socketPath=t.socketPath}else pe.hostname=B.hostname.startsWith("[")?B.hostname.slice(1,-1):B.hostname,pe.port=B.port,bf(pe,t.proxy,z+"//"+B.hostname+(B.port?":"+B.port:"")+pe.path);let ce,Le=!1,De=J0.test(pe.protocol);if(pe.agent=De?t.httpsAgent:t.httpAgent,x)ce=iE;else{let G=o("transport");if(G)ce=G;else if(t.maxRedirects===0)ce=De?hf.default:gf.default,Le=!0;else{t.maxRedirects&&(pe.maxRedirects=t.maxRedirects);let k=o("beforeRedirect");k&&(pe.beforeRedirects.config=k),ce=De?Y0:Z0}}t.maxBodyLength>-1?pe.maxBodyLength=t.maxBodyLength:pe.maxBodyLength=1/0,pe.insecureHTTPParser=!!o("insecureHTTPParser"),y=ce.request(pe,function(k){if(O(),y.destroyed)return;let J=[k],Se=D.toFiniteNumber(k.headers["content-length"]);if(se||Y){let xe=new kc({maxRate:D.toFiniteNumber(Y)});se&&xe.on("progress",mf(xe,Bn(Se,us(Mn(se),!0,3)))),J.push(xe)}let V=k,he=k.req||y;if(t.decompress!==!1&&k.headers["content-encoding"])switch((f==="HEAD"||k.statusCode===204)&&delete k.headers["content-encoding"],(k.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":J.push(ls.default.createUnzip(cf)),delete k.headers["content-encoding"];break;case"deflate":J.push(new ef),J.push(ls.default.createUnzip(cf)),delete k.headers["content-encoding"];break;case"br":uf&&(J.push(ls.default.createBrotliDecompress(K0)),delete k.headers["content-encoding"])}V=J.length>1?Tt.default.pipeline(J,D.noop):J[0];let He={status:k.statusCode,statusText:k.statusMessage,headers:new Ne(k.headers),config:t,request:he};if(d==="stream"){if(t.maxContentLength>-1){let xe=t.maxContentLength,mt=V;async function*It(){let Ue=0;for await(let bs of mt){if(Ue+=bs.length,Ue>xe)throw new N("maxContentLength size of "+xe+" exceeded",N.ERR_BAD_RESPONSE,t,he);yield bs}}V=Tt.default.Readable.from(It(),{objectMode:!1})}He.data=V,ss(n,r,He)}else{let xe=[],mt=0;V.on("data",function(Ue){xe.push(Ue),mt+=Ue.length,t.maxContentLength>-1&&mt>t.maxContentLength&&(h=!0,V.destroy(),E(new N("maxContentLength size of "+t.maxContentLength+" exceeded",N.ERR_BAD_RESPONSE,t,he)))}),V.on("aborted",function(){if(h)return;let Ue=new N("stream has been aborted",N.ERR_BAD_RESPONSE,t,he,He);V.destroy(Ue),r(Ue)}),V.on("error",function(Ue){h||r(N.from(Ue,null,t,he,He))}),V.on("end",function(){try{let Ue=xe.length===1?xe[0]:Buffer.concat(xe);d!=="arraybuffer"&&(Ue=Ue.toString(m),(!m||m==="utf8")&&(Ue=D.stripBOM(Ue))),He.data=Ue}catch(Ue){return r(N.from(Ue,null,t,He.request,He))}ss(n,r,He)})}v.once("abort",xe=>{V.destroyed||(V.emit("error",xe),V.destroy())})}),v.once("abort",G=>{y.close?y.close():y.destroy(G)}),y.on("error",function(k){r(N.from(k,null,t,y))});let re=new Set;if(y.on("socket",function(k){k.setKeepAlive(!0,1e3*60),k[lf]||(k.on("error",function(Se){let V=k[Ki];V&&!V.destroyed&&V.destroy(Se)}),k[lf]=!0),k[Ki]=y,re.add(k)}),y.once("close",function(){O();for(let k of re)k[Ki]===y&&(k[Ki]=null);re.clear()}),t.timeout){let G=parseInt(t.timeout,10);if(Number.isNaN(G)){E(new N("error trying to parse `config.timeout` to int",N.ERR_BAD_OPTION_VALUE,t,y));return}let k=function(){g||E(M())};Le&&G>0&&(b=setTimeout(k,G)),y.setTimeout(G,k)}else y.setTimeout(0);if(D.isStream(a)){let G=!1,k=!1;a.on("end",()=>{G=!0}),a.once("error",Se=>{k=!0,y.destroy(Se)}),a.on("close",()=>{!G&&!k&&E(new vt("Request stream has been aborted",t,y))});let J=a;if(t.maxBodyLength>-1&&t.maxRedirects===0){let Se=t.maxBodyLength,V=0;J=Tt.default.pipeline([a,new Tt.default.Transform({transform(he,He,xe){if(V+=he.length,V>Se)return xe(new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,t,y));xe(null,he)}})],D.noop),J.on("error",he=>{y.destroyed||y.destroy(he)})}J.pipe(y)}else a&&y.write(a),y.end()})};var vf=Fe.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,Fe.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(Fe.origin),Fe.navigator&&/(msie|trident)/i.test(Fe.navigator.userAgent)):()=>!0;var Cf=Fe.hasStandardBrowserEnv?{write(e,t,s,n,r,i,o){if(typeof document>"u")return;let a=[`${e}=${encodeURIComponent(t)}`];D.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),D.isString(n)&&a.push(`path=${n}`),D.isString(r)&&a.push(`domain=${r}`),i===!0&&a.push("secure"),D.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.split(";");for(let s=0;s<t.length;s++){let n=t[s].replace(/^\s+/,""),r=n.indexOf("=");if(r!==-1&&n.slice(0,r)===e)return decodeURIComponent(n.slice(r+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var Af=e=>e instanceof Ne?{...e}:e;function Ht(e,t){t=t||{};let s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(c,l,p,d){return D.isPlainObject(c)&&D.isPlainObject(l)?D.merge.call({caseless:d},c,l):D.isPlainObject(l)?D.merge({},l):D.isArray(l)?l.slice():l}function r(c,l,p,d){if(D.isUndefined(l)){if(!D.isUndefined(c))return n(void 0,c,p,d)}else return n(c,l,p,d)}function i(c,l){if(!D.isUndefined(l))return n(void 0,l)}function o(c,l){if(D.isUndefined(l)){if(!D.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function a(c,l,p){if(D.hasOwnProp(t,p))return n(c,l);if(D.hasOwnProp(e,p))return n(void 0,c)}let u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:a,headers:(c,l,p)=>r(Af(c),Af(l),p,!0)};return D.forEach(Object.keys({...e,...t}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;let p=D.hasOwnProp(u,l)?u[l]:r,d=D.hasOwnProp(e,l)?e[l]:void 0,m=D.hasOwnProp(t,l)?t[l]:void 0,f=p(d,m,l);D.isUndefined(f)&&p!==a||(s[l]=f)}),s}var oE=["content-type","content-length"];function aE(e,t,s){if(s!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,r])=>{oE.includes(n.toLowerCase())&&e.set(n,r)})}var cE=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),Zi=e=>{let t=Ht({},e),s=d=>D.hasOwnProp(t,d)?t[d]:void 0,n=s("data"),r=s("withXSRFToken"),i=s("xsrfHeaderName"),o=s("xsrfCookieName"),a=s("headers"),u=s("auth"),c=s("baseURL"),l=s("allowAbsoluteUrls"),p=s("url");if(t.headers=a=Ne.from(a),t.url=js($s(c,p,l),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?cE(u.password):""))),D.isFormData(n)&&(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv?a.setContentType(void 0):D.isFunction(n.getHeaders)&&aE(a,n.getHeaders(),s("formDataHeaderPolicy"))),Fe.hasStandardBrowserEnv&&(D.isFunction(r)&&(r=r(t)),r===!0||r==null&&vf(t.url))){let m=i&&o&&Cf.read(o);m&&a.set(i,m)}return t};var uE=typeof XMLHttpRequest<"u",xf=uE&&function(e){return new Promise(function(s,n){let r=Zi(e),i=r.data,o=Ne.from(r.headers).normalize(),{responseType:a,onUploadProgress:u,onDownloadProgress:c}=r,l,p,d,m,f;function g(){m&&m(),f&&f(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function y(){if(!h)return;let x=Ne.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:x,config:e,request:h};ss(function(M){s(M),g()},function(M){n(M),g()},E),h=null}"onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith("file:"))||setTimeout(y)},h.onabort=function(){h&&(n(new N("Request aborted",N.ECONNABORTED,e,h)),g(),h=null)},h.onerror=function(v){let E=v&&v.message?v.message:"Network Error",O=new N(E,N.ERR_NETWORK,e,h);O.event=v||null,n(O),g(),h=null},h.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded",E=r.transitional||Cs;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),n(new N(v,E.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,h)),g(),h=null},i===void 0&&o.setContentType(null),"setRequestHeader"in h&&D.forEach(o.toJSON(),function(v,E){h.setRequestHeader(E,v)}),D.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),a&&a!=="json"&&(h.responseType=r.responseType),c&&([d,f]=us(c,!0),h.addEventListener("progress",d)),u&&h.upload&&([p,m]=us(u),h.upload.addEventListener("progress",p),h.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(l=x=>{h&&(n(!x||x.type?new vt(null,e,h):x),h.abort(),g(),h=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));let b=Or(r.url);if(b&&!Fe.protocols.includes(b)){n(new N("Unsupported protocol "+b+":",N.ERR_BAD_REQUEST,e));return}h.send(i||null)})};var lE=(e,t)=>{let{length:s}=e=e?e.filter(Boolean):[];if(t||s){let n=new AbortController,r,i=function(c){if(!r){r=!0,a();let l=c instanceof Error?c:this.reason;n.abort(l instanceof N?l:new vt(l instanceof Error?l.message:l))}},o=t&&setTimeout(()=>{o=null,i(new N(`timeout of ${t}ms exceeded`,N.ETIMEDOUT))},t),a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));let{signal:u}=n;return u.unsubscribe=()=>D.asap(a),u}},wf=lE;var pE=function*(e,t){let s=e.byteLength;if(!t||s<t){yield e;return}let n=0,r;for(;n<s;)r=n+t,yield e.slice(n,r),n=r},dE=async function*(e,t){for await(let s of mE(e))yield*pE(s,t)},mE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:s,value:n}=await t.read();if(s)break;yield n}}finally{await t.cancel()}},Nc=(e,t,s,n)=>{let r=dE(e,t),i=0,o,a=u=>{o||(o=!0,n&&n(u))};return new ReadableStream({async pull(u){try{let{done:c,value:l}=await r.next();if(c){a(),u.close();return}let p=l.byteLength;if(s){let d=i+=p;s(d)}u.enqueue(new Uint8Array(l))}catch(c){throw a(c),c}},cancel(u){return a(u),r.return()}},{highWaterMark:2})};var Ef=64*1024,{isFunction:Yi}=D,Rf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fE=e=>{let t=D.global??globalThis,{ReadableStream:s,TextEncoder:n}=t;e=D.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:r,Request:i,Response:o}=e,a=r?Yi(r):typeof fetch=="function",u=Yi(i),c=Yi(o);if(!a)return!1;let l=a&&Yi(s),p=a&&(typeof n=="function"?(y=>b=>y.encode(b))(new n):async y=>new Uint8Array(await new i(y).arrayBuffer())),d=u&&l&&Rf(()=>{let y=!1,b=new i(Fe.origin,{body:new s,method:"POST",get duplex(){return y=!0,"half"}}),x=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),y&&!x}),m=c&&l&&Rf(()=>D.isReadableStream(new o("").body)),f={stream:m&&(y=>y.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!f[y]&&(f[y]=(b,x)=>{let v=b&&b[y];if(v)return v.call(b);throw new N(`Response type '${y}' is not supported`,N.ERR_NOT_SUPPORT,x)})});let g=async y=>{if(y==null)return 0;if(D.isBlob(y))return y.size;if(D.isSpecCompliantForm(y))return(await new i(Fe.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(D.isArrayBufferView(y)||D.isArrayBuffer(y))return y.byteLength;if(D.isURLSearchParams(y)&&(y=y+""),D.isString(y))return(await p(y)).byteLength},h=async(y,b)=>{let x=D.toFiniteNumber(y.getContentLength());return x??g(b)};return async y=>{let{url:b,method:x,data:v,signal:E,cancelToken:O,timeout:M,onDownloadProgress:P,onUploadProgress:X,responseType:B,headers:z,withCredentials:ne="same-origin",fetchOptions:ie,maxContentLength:se,maxBodyLength:_}=Zi(y),U=D.isNumber(se)&&se>-1,Y=D.isNumber(_)&&_>-1,ae=r||fetch;B=B?(B+"").toLowerCase():"text";let W=wf([E,O&&O.toAbortSignal()],M),ee=null,te=W&&W.unsubscribe&&(()=>{W.unsubscribe()}),pe;try{if(U&&typeof b=="string"&&b.startsWith("data:")&&Mr(b)>se)throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee);if(Y&&x!=="get"&&x!=="head"){let k=await h(z,v);if(typeof k=="number"&&isFinite(k)&&k>_)throw new N("Request body larger than maxBodyLength limit",N.ERR_BAD_REQUEST,y,ee)}if(X&&d&&x!=="get"&&x!=="head"&&(pe=await h(z,v))!==0){let k=new i(b,{method:"POST",body:v,duplex:"half"}),J;if(D.isFormData(v)&&(J=k.headers.get("content-type"))&&z.setContentType(J),k.body){let[Se,V]=Bn(pe,us(Mn(X)));v=Nc(k.body,Ef,Se,V)}}D.isString(ne)||(ne=ne?"include":"omit");let ce=u&&"credentials"in i.prototype;if(D.isFormData(v)){let k=z.getContentType();k&&/^multipart\/form-data/i.test(k)&&!/boundary=/i.test(k)&&z.delete("content-type")}z.set("User-Agent","axios/"+cs,!1);let Le={...ie,signal:W,method:x.toUpperCase(),headers:z.normalize().toJSON(),body:v,duplex:"half",credentials:ce?ne:void 0};ee=u&&new i(b,Le);let De=await(u?ae(ee,ie):ae(b,Le));if(U){let k=D.toFiniteNumber(De.headers.get("content-length"));if(k!=null&&k>se)throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee)}let re=m&&(B==="stream"||B==="response");if(m&&De.body&&(P||U||re&&te)){let k={};["status","statusText","headers"].forEach(xe=>{k[xe]=De[xe]});let J=D.toFiniteNumber(De.headers.get("content-length")),[Se,V]=P&&Bn(J,us(Mn(P),!0))||[],he=0,He=xe=>{if(U&&(he=xe,he>se))throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee);Se&&Se(xe)};De=new o(Nc(De.body,Ef,He,()=>{V&&V(),te&&te()}),k)}B=B||"text";let G=await f[D.findKey(f,B)||"text"](De,y);if(U&&!m&&!re){let k;if(G!=null&&(typeof G.byteLength=="number"?k=G.byteLength:typeof G.size=="number"?k=G.size:typeof G=="string"&&(k=typeof n=="function"?new n().encode(G).byteLength:G.length)),typeof k=="number"&&k>se)throw new N("maxContentLength size of "+se+" exceeded",N.ERR_BAD_RESPONSE,y,ee)}return!re&&te&&te(),await new Promise((k,J)=>{ss(k,J,{data:G,headers:Ne.from(De.headers),status:De.status,statusText:De.statusText,config:y,request:ee})})}catch(ce){if(te&&te(),W&&W.aborted&&W.reason instanceof N){let Le=W.reason;throw Le.config=y,ee&&(Le.request=ee),ce!==Le&&(Le.cause=ce),Le}throw ce&&ce.name==="TypeError"&&/Load failed|fetch/i.test(ce.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,y,ee,ce&&ce.response),{cause:ce.cause||ce}):N.from(ce,ce&&ce.code,y,ee,ce&&ce.response)}}},gE=new Map,Wc=e=>{let t=e&&e.env||{},{fetch:s,Request:n,Response:r}=t,i=[n,r,s],o=i.length,a=o,u,c,l=gE;for(;a--;)u=i[a],c=l.get(u),c===void 0&&l.set(u,c=a?new Map:fE(t)),l=c;return c},t1=Wc();var Uc={http:Df,xhr:xf,fetch:{get:Wc}};D.forEach(Uc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Ff=e=>`- ${e}`,yE=e=>D.isFunction(e)||e===null||e===!1;function SE(e,t){e=D.isArray(e)?e:[e];let{length:s}=e,n,r,i={};for(let o=0;o<s;o++){n=e[o];let a;if(r=n,!yE(n)&&(r=Uc[(a=String(n)).toLowerCase()],r===void 0))throw new N(`Unknown adapter '${a}'`);if(r&&(D.isFunction(r)||(r=r.get(t))))break;i[a||"#"+o]=r}if(!r){let o=Object.entries(i).map(([u,c])=>`adapter ${u} `+(c===!1?"is not supported by the environment":"is not available in the build")),a=s?o.length>1?`since :
|
|
86
86
|
`+o.map(Ff).join(`
|
|
87
87
|
`):" "+Ff(o[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}var Ji={getAdapter:SE,adapters:Uc};function jc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vt(null,e)}function Qi(e){return jc(e),e.headers=Ne.from(e.headers),e.data=Ir.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ji.getAdapter(e.adapter||Pn.adapter,e)(e).then(function(n){jc(e),e.response=n;try{n.data=Ir.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=Ne.from(n.headers),n},function(n){if(!kr(n)&&(jc(e),n&&n.response)){e.response=n.response;try{n.response.data=Ir.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=Ne.from(n.response.headers)}return Promise.reject(n)})}var Xi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xi[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var If={};Xi.transitional=function(t,s,n){function r(i,o){return"[Axios v"+cs+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,a)=>{if(t===!1)throw new N(r(o," has been removed"+(s?" in "+s:"")),N.ERR_DEPRECATED);return s&&!If[o]&&(If[o]=!0,console.warn(r(o," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(i,o,a):!0}};Xi.spelling=function(t){return(s,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function bE(e,t,s){if(typeof e!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),r=n.length;for(;r-- >0;){let i=n[r],o=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(o){let a=e[i],u=a===void 0||o(a,i,e);if(u!==!0)throw new N("option "+i+" must be "+u,N.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new N("Unknown option "+i,N.ERR_BAD_OPTION)}}var Nr={assertOptions:bE,validators:Xi};var Pt=Nr.validators,Nn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ec,response:new ec}}async request(t,s){try{return await this._request(t,s)}catch(n){if(n instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;let i=(()=>{if(!r.stack)return"";let o=r.stack.indexOf(`
|
|
88
88
|
`);return o===-1?"":r.stack.slice(o+1)})();try{if(!n.stack)n.stack=i;else if(i){let o=i.indexOf(`
|
|
89
89
|
`),a=o===-1?-1:i.indexOf(`
|
|
90
90
|
`,o+1),u=a===-1?"":i.slice(a+1);String(n.stack).endsWith(u)||(n.stack+=`
|
|
91
|
-
`+i)}}catch{}}throw n}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Ht(this.defaults,s);let{transitional:n,paramsSerializer:r,headers:i}=s;n!==void 0&&Nr.assertOptions(n,{silentJSONParsing:Pt.transitional(Pt.boolean),forcedJSONParsing:Pt.transitional(Pt.boolean),clarifyTimeoutError:Pt.transitional(Pt.boolean),legacyInterceptorReqResOrdering:Pt.transitional(Pt.boolean)},!1),r!=null&&(D.isFunction(r)?s.paramsSerializer={serialize:r}:Nr.assertOptions(r,{encode:Pt.function,serialize:Pt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Nr.assertOptions(s,{baseUrl:Pt.spelling("baseURL"),withXsrfToken:Pt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let o=i&&D.merge(i.common,i[s.method]);i&&D.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete i[f]}),s.headers=Ne.concat(o,i);let a=[],u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(s)===!1)return;u=u&&g.synchronous;let h=s.transitional||Cs;h&&h.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});let c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let l,p=0,d;if(!u){let f=[Qi.bind(this),void 0];for(f.unshift(...a),f.push(...c),d=f.length,l=Promise.resolve(s);p<d;)l=l.then(f[p++],f[p++]);return l}d=a.length;let m=s;for(;p<d;){let f=a[p++],g=a[p++];try{m=f(m)}catch(h){g.call(this,h);break}}try{l=Qi.call(this,m)}catch(f){return Promise.reject(f)}for(p=0,d=c.length;p<d;)l=l.then(c[p++],c[p++]);return l}getUri(t){t=Ht(this.defaults,t);let s=$s(t.baseURL,t.url,t.allowAbsoluteUrls);return js(s,t.params,t.paramsSerializer)}};D.forEach(["delete","get","head","options"],function(t){Nn.prototype[t]=function(s,n){return this.request(Ht(n||{},{method:t,url:s,data:(n||{}).data}))}});D.forEach(["post","put","patch","query"],function(t){function s(n){return function(i,o,a){return this.request(Ht(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Nn.prototype[t]=s(),t!=="query"&&(Nn.prototype[t+"Form"]=s(!0))});var Wr=Nn;var $c=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(i){s=i});let n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i,o=new Promise(a=>{n.subscribe(a),i=a}).then(r);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,a){n.reason||(n.reason=new vt(i,o,a),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){let t=new AbortController,s=n=>{t.abort(n)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new e(function(r){t=r}),cancel:t}}},kf=$c;function Gc(e){return function(s){return e.apply(null,s)}}function Hc(e){return D.isObject(e)&&e.isAxiosError===!0}var zc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zc).forEach(([e,t])=>{zc[t]=e});var Tf=zc;function Pf(e){let t=new Wr(e),s=Dr(Wr.prototype.request,t);return D.extend(s,Wr.prototype,t,{allOwnKeys:!0}),D.extend(s,t,null,{allOwnKeys:!0}),s.create=function(r){return Pf(Ht(e,r))},s}var Ke=Pf(Pn);Ke.Axios=Wr;Ke.CanceledError=vt;Ke.CancelToken=kf;Ke.isCancel=kr;Ke.VERSION=cs;Ke.toFormData=vs;Ke.AxiosError=N;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=Gc;Ke.isAxiosError=Hc;Ke.mergeConfig=Ht;Ke.AxiosHeaders=Ne;Ke.formToJSON=e=>$i(D.isHTMLForm(e)?new FormData(e):e);Ke.getAdapter=Ji.getAdapter;Ke.HttpStatusCode=Tf;Ke.default=Ke;var Lt=Ke;var{Axios:Q1,AxiosError:X1,CanceledError:eN,isCancel:tN,CancelToken:sN,VERSION:nN,all:rN,Cancel:iN,isAxiosError:oN,spread:aN,toFormData:cN,AxiosHeaders:uN,HttpStatusCode:lN,formToJSON:pN,getAdapter:dN,mergeConfig:mN,create:fN}=Lt;var Wn=(e,t)=>{let s=[];if(e==null)return s;if(typeof e=="string"){let n=e.matchAll(/\$\{([^.}]+)(?:\.[^}]+)?\}/g);for(let r of n){let i=r[1];t.has(i)&&s.push(i)}return s}if(Array.isArray(e)){for(let n of e)s.push(...Wn(n,t));return s}if(typeof e=="object"){let n=e;if("Ref"in n&&typeof n.Ref=="string"&&t.has(n.Ref)&&s.push(n.Ref),"Fn::GetAtt"in n){let r=n["Fn::GetAtt"];if(Array.isArray(r)&&typeof r[0]=="string")t.has(r[0])&&s.push(r[0]);else if(typeof r=="string"){let i=r.split(".")[0];t.has(i)&&s.push(i)}}if("Fn::Sub"in n){let r=n["Fn::Sub"];Array.isArray(r)?(s.push(...Wn(r[0],t)),r[1]&&typeof r[1]=="object"&&s.push(...Wn(r[1],t))):s.push(...Wn(r,t))}for(let[r,i]of Object.entries(n))["Ref","Fn::GetAtt","Fn::Sub"].includes(r)||s.push(...Wn(i,t))}return s},DE=e=>e.DependsOn?Array.isArray(e.DependsOn)?e.DependsOn:[e.DependsOn]:[],vE=(e,t)=>{if(t.length===0)return;let s=new Set(t.map(i=>i.type.split("::")[2]||i.type)),n=Array.from(s).slice(0,3),r=e.split("::")[2]||e;if(e.includes("SecurityGroup"))return`Security group attached to: ${n.join(", ")}`;if(e.includes("IAM::Role"))return`IAM role assumed by: ${n.join(", ")}`;if(e.includes("VPC")||e.includes("Subnet"))return`Network hosting: ${n.join(", ")}`;if(e.includes("KMS::Key"))return`Encryption key used by: ${n.join(", ")}`;if(e.includes("S3::Bucket")){if(n.some(i=>i.includes("Lambda")))return"S3 bucket accessed by Lambda functions";if(n.some(i=>i.includes("CloudFront")))return"S3 bucket serving as CloudFront origin"}if(e.includes("DynamoDB::Table")&&n.some(i=>i.includes("Lambda")))return"DynamoDB table accessed by Lambda functions";if(t.length>0)return`Referenced by ${t.length} resource${t.length>1?"s":""}: ${n.join(", ")}`},Ks=e=>{let t=new Set(Object.keys(e)),s={};for(let n of t)s[n]={dependencies:[],dependents:[]};for(let[n,r]of Object.entries(e)){let i=DE(r),o=Wn(r.Properties,t),a=[...new Set([...i,...o])];s[n].dependencies=a;for(let u of a)s[u]&&s[u].dependents.push(n)}for(let[n,r]of Object.entries(e)){let i=s[n],o=i.dependents.map(a=>({id:a,type:e[a]?.Type||"Unknown"}));i.usageDescription=vE(r.Type,o)}return s},eo=(e,t,s)=>{let n=t[e];if(!n)return{dependencies:[],dependents:[]};let r=n.dependencies.map(o=>{let a=s[o]?.Type?.split("::")[2]||o;return`${o} (${a})`}),i=n.dependents.map(o=>{let a=s[o]?.Type?.split("::")[2]||o;return`${o} (${a})`});return{dependencies:r,dependents:i,usageDescription:n.usageDescription}};var CE=(e,t,s)=>{let n={},r=new Set(["AWS::RDS::DBInstance","AWS::RDS::DBCluster","AWS::ElastiCache::CacheCluster","AWS::ElastiCache::ReplicationGroup","AWS::Redshift::Cluster","AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain","AWS::ECS::Service"]),i=new Set(Object.entries(e).filter(([,o])=>r.has(o.Type)).map(([o])=>o));for(let[o,a]of Object.entries(e)){if(a.Type!=="AWS::Lambda::Function")continue;let u=a.Properties||{},c=!!(u.VpcConfig&&(u.VpcConfig.SubnetIds||u.VpcConfig.SecurityGroupIds)),l=t[o];if(!l)continue;if(l.dependencies.some(d=>i.has(d))&&!c){n[o]||(n[o]={issues:[]});let d=l.dependencies.filter(m=>i.has(m));n[o].issues.push(s(o,`Lambda function references VPC resources (${d.join(", ")}) but is not VPC-enabled`,"Configure VpcConfig with appropriate SubnetIds and SecurityGroupIds to allow the Lambda function to connect to VPC resources. Without VPC configuration, the function cannot reach private resources like RDS databases.","HIGH","Reliability",a.Metadata?.["aws:cdk:path"]||o,"cdkInsights"))}}return n},AE=(e,t)=>{let s={},n=new Map;for(let[r,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let o=i.Properties||{},a=!!(o.BucketEncryption||o.ServerSideEncryptionConfiguration);n.set(r,a)}for(let[r,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let a=(i.Properties||{}).ReplicationConfiguration;if(!a)continue;let u=n.get(r),c=a.Rules;if(!(!c||!Array.isArray(c)))for(let l of c){if(l.Status!=="Enabled")continue;let p=l.Destination;if(!p||!p.Bucket)continue;let m=p.EncryptionConfiguration;u&&!m&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,"S3 replication configured without encryption configuration for replicated objects","Specify EncryptionConfiguration in the replication rule to ensure replicated objects maintain encryption. Use ReplicaKmsKeyID to specify the KMS key for encrypting replicated objects in the destination bucket.","MEDIUM","Security",i.Metadata?.["aws:cdk:path"]||r,"cdkInsights")))}}return s},xE=(e,t,s)=>{let n={},r=new Set([80,443,8080,8443]);for(let[i,o]of Object.entries(e)){if(o.Type!=="AWS::EC2::SecurityGroup")continue;let u=(o.Properties||{}).SecurityGroupIngress||[],c=t[i];if(!(c&&c.dependents.length>0))continue;let p=[];for(let d of u){let m=d.CidrIp,f=d.CidrIpv6,g=d.FromPort,h=d.ToPort;if(!(m==="0.0.0.0/0"||f==="::/0")||g===void 0)continue;let b=h!==void 0&&h!==g,x=!r.has(g);(b||x)&&p.push(g)}if(p.length>0){n[i]||(n[i]={issues:[]});let d=c.dependents.map(m=>e[m]?.Type?.split("::")[2]||"Unknown").join(", ");n[i].issues.push(s(i,`Security group used by ${d} has public access on non-standard ports: ${p.join(", ")}`,"Restrict ingress rules to specific CIDR blocks or reference other security groups instead of allowing 0.0.0.0/0 on non-standard ports. Consider using a bastion host or VPN for administrative access.","HIGH","Security",o.Metadata?.["aws:cdk:path"]||i,"cdkInsights"))}}return n},to=(e,t)=>{let s=e.Resources||{},n=Ks(s),r={},i=[CE(s,n,t),AE(s,t),xE(s,n,t)];for(let o of i)for(let[a,u]of Object.entries(o))r[a]||(r[a]={issues:[]}),r[a].issues.push(...u.issues);return r};var wE=e=>{let t=[],s=Object.values(e).map(P=>P.Type),n={};for(let P of s)n[P]=(n[P]||0)+1;let r=s.some(P=>P==="AWS::Lambda::Function"),i=s.some(P=>P==="AWS::ApiGateway::RestApi"||P==="AWS::ApiGatewayV2::Api"),o=s.some(P=>P==="AWS::DynamoDB::Table"),a=s.some(P=>P==="AWS::S3::Bucket");r&&(o||a)&&!s.some(P=>P.includes("ECS")||P.includes("EC2::Instance"))&&t.push("serverless");let u=s.some(P=>P==="AWS::ECS::Service"||P==="AWS::ECS::TaskDefinition"||P==="AWS::ECS::Cluster"),c=s.some(P=>P.startsWith("AWS::EKS::"));(u||c)&&t.push("container-based");let l=s.some(P=>P.startsWith("AWS::Events::")),p=s.some(P=>P==="AWS::SNS::Topic"),d=s.some(P=>P==="AWS::SQS::Queue"),m=s.some(P=>P.startsWith("AWS::Kinesis::")),f=s.some(P=>P.startsWith("AWS::StepFunctions::"));(l||p||d||m||f)&&r&&t.push("event-driven"),i&&t.push("api-gateway");let g=s.some(P=>P.startsWith("AWS::Glue::")),h=s.some(P=>P.startsWith("AWS::Athena::")),y=s.some(P=>P.startsWith("AWS::EMR::"));(m||g||h||y)&&t.push("data-processing");let b=s.some(P=>P==="AWS::CloudFront::Distribution");a&&b&&!r&&!u&&t.push("static-website");let x=n["AWS::Lambda::Function"]||0,v=n["AWS::ECS::Service"]||0;(x>=3||v>=2)&&t.push("microservices");let E=s.some(P=>P==="AWS::EC2::Instance"),O=s.some(P=>P==="AWS::RDS::DBInstance"||P==="AWS::RDS::DBCluster"),M=s.some(P=>P==="AWS::ElasticLoadBalancingV2::LoadBalancer");return E&&(O||M)&&t.push("traditional"),t},EE=(e,t)=>{let s={},n=Object.values(e).map(l=>l.Type),r=n.some(l=>l==="AWS::CloudWatch::Alarm"),i=n.some(l=>l==="AWS::Lambda::Function"),o=n.some(l=>l==="AWS::ECS::Service"),a=n.some(l=>l==="AWS::RDS::DBInstance"||l==="AWS::RDS::DBCluster");(i||o||a)&&!r&&(s["Stack Architecture"]={issues:[t("Stack Architecture","No CloudWatch Alarms defined for critical resources","Add CloudWatch Alarms to monitor key metrics like Lambda errors, ECS task failures, or RDS connections. Consider using CDK's built-in alarm methods or aws-cdk-lib/aws-cloudwatch.","MEDIUM","Operational Excellence","Stack Architecture","cdkInsights")]});let u=n.some(l=>l==="AWS::XRay::Group"||l==="AWS::XRay::SamplingRule");return n.filter(l=>l==="AWS::Lambda::Function").length>=3&&!u&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","Multiple Lambda functions without X-Ray tracing configuration","Enable X-Ray tracing for your Lambda functions to gain visibility into distributed request flows and identify performance bottlenecks. Set tracing: lambda.Tracing.ACTIVE on your functions.","LOW","Operational Excellence","Stack Architecture","cdkInsights"))),s},RE=(e,t)=>{let s={},n=Object.values(e).map(d=>d.Type),r=n.some(d=>d==="AWS::ApiGateway::RestApi"||d==="AWS::ApiGatewayV2::Api"),i=n.some(d=>d==="AWS::ElasticLoadBalancingV2::LoadBalancer"),o=n.some(d=>d==="AWS::CloudFront::Distribution"),a=n.some(d=>d==="AWS::WAFv2::WebACL"||d==="AWS::WAF::WebACL");(r||i||o)&&!a&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","Public-facing resources without WAF protection","Consider adding AWS WAF to protect your API Gateway, ALB, or CloudFront distribution from common web exploits. WAF can help prevent SQL injection, XSS, and rate-limit malicious traffic.","MEDIUM","Security","Stack Architecture","cdkInsights")));let u=n.some(d=>d==="AWS::SecretsManager::Secret"),c=n.some(d=>d==="AWS::SSM::Parameter"),l=n.some(d=>d==="AWS::RDS::DBInstance"||d==="AWS::RDS::DBCluster"),p=!1;for(let[d,m]of Object.entries(e))if(m.Type==="AWS::Lambda::Function"){let f=m.Properties?.Environment?.Variables;if(f){let g=["PASSWORD","SECRET","API_KEY","TOKEN","CREDENTIAL"];for(let h of Object.keys(f))if(g.some(y=>h.toUpperCase().includes(y))){let y=f[h];if(typeof y=="string"&&!y.startsWith("{{")){p=!0;break}}}}return l&&!u&&!c&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","RDS database without Secrets Manager for credential rotation","Use AWS Secrets Manager to store and automatically rotate database credentials. This improves security by eliminating hardcoded passwords and enabling automatic credential rotation.","HIGH","Security","Stack Architecture","cdkInsights"))),s},FE=(e,t)=>{let s={},n=Object.values(e).filter(c=>c.Type==="AWS::EC2::NatGateway").length;n>=3&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture",`${n} NAT Gateways detected - potential cost optimization`,"Multiple NAT Gateways can be expensive ($32/month each + data processing). Consider if all are necessary, or explore alternatives like NAT instances for dev environments, or VPC endpoints for AWS services.","MEDIUM","Cost Optimization","Stack Architecture","cdkInsights")));let r=n>0,i=Object.values(e).some(c=>c.Type==="AWS::EC2::VPCEndpoint"),o=Object.values(e).some(c=>{if(c.Type!=="AWS::Lambda::Function")return!1;let l=c.Properties?.VpcConfig;return l?.SubnetIds||l?.SecurityGroupIds}),a=Object.values(e).some(c=>c.Type==="AWS::S3::Bucket"),u=Object.values(e).some(c=>c.Type==="AWS::DynamoDB::Table");return o&&r&&!i&&(a||u)&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","VPC Lambda functions accessing AWS services through NAT Gateway","Consider using VPC Endpoints (Gateway endpoints for S3/DynamoDB are free) instead of routing AWS service traffic through NAT Gateway. This reduces costs and improves latency.","LOW","Cost Optimization","Stack Architecture","cdkInsights"))),s},IE=(e,t,s)=>{let n={};for(let[r,i]of Object.entries(t)){let o=e[r];if(!o)continue;let a=i.dependents.length;if(a>=5){let u=o.Type.split("::")[2]||o.Type;n["Stack Architecture"]||(n["Stack Architecture"]={issues:[]}),n["Stack Architecture"].issues.push(s("Stack Architecture",`${u} (${r}) is a potential single point of failure with ${a} dependent resources`,"Consider adding redundancy or failover mechanisms for this critical resource. For databases, consider Multi-AZ. For queues, consider dead-letter queues. For Lambda, ensure proper error handling.","MEDIUM","Reliability","Stack Architecture","cdkInsights"))}}for(let[r,i]of Object.entries(e)){if(i.Type!=="AWS::DynamoDB::Table")continue;if(i.Properties?.PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled!==!0){let a=t[r];a&&a.dependents.length>=3&&(n["Stack Architecture"]||(n["Stack Architecture"]={issues:[]}),n["Stack Architecture"].issues.push(s("Stack Architecture",`Critical DynamoDB table ${r} has ${a.dependents.length} dependents but no point-in-time recovery`,"Enable Point-in-Time Recovery (PITR) for critical DynamoDB tables used by multiple resources. This provides continuous backups with 35-day retention.","HIGH","Reliability","Stack Architecture","cdkInsights")))}}return n},so=(e,t)=>{let s=e.Resources||{};if(Object.keys(s).length<3)return{};let r=Ks(s),i=wE(s),o={},a=[EE(s,t),RE(s,t),FE(s,t),IE(s,r,t)];for(let u of a)for(let[c,l]of Object.entries(u))o[c]||(o[c]={issues:[]}),o[c].issues.push(...l.issues);return o};var no=require("node:fs"),Ur=require("node:path");function Lf(){let e;try{e=require.resolve("@aws-solutions-constructs/core/package.json")}catch{return[]}let t=(0,Ur.dirname)((0,Ur.dirname)(e));return(0,no.readdirSync)(t).filter(s=>s!=="core"&&s.startsWith("aws-")&&(0,no.statSync)((0,Ur.join)(t,s)).isDirectory())}var _f={"aws-apigateway-dynamodb":{className:"ApiGatewayToDynamoDB",packageName:"aws-apigateway-dynamodb",friendlyName:"Api Gateway To Dynamo DB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-dynamodb",requiredResourceTypes:["AWS::DynamoDB::Table","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigateway-kinesisstreams":{className:"ApiGatewayToKinesisStreams",packageName:"aws-apigateway-kinesisstreams",friendlyName:"Api Gateway To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-kinesisstreams",requiredResourceTypes:["AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::RequestValidator","AWS::ApiGateway::Model","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy","AWS::CloudWatch::Alarm","AWS::Kinesis::Stream"]},"aws-apigateway-lambda":{className:"ApiGatewayToLambda",packageName:"aws-apigateway-lambda",friendlyName:"Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account"]},"aws-apigateway-sqs":{className:"ApiGatewayToSqs",packageName:"aws-apigateway-sqs",friendlyName:"Api Gateway To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigatewayv2websocket-sqs":{className:"ApiGatewayV2WebSocketToSqs",packageName:"aws-apigatewayv2websocket-sqs",friendlyName:"Api Gateway V2 Web Socket To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigatewayv2websocket-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigatewayv2websocket-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::ApiGatewayV2::Api","AWS::ApiGatewayV2::Integration","AWS::ApiGatewayV2::Route","AWS::ApiGatewayV2::Stage","AWS::Logs::LogGroup"]},"aws-cloudfront-apigateway-lambda":{className:"CloudFrontToApiGatewayToLambda",packageName:"aws-cloudfront-apigateway-lambda",friendlyName:"Cloud Front To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::CloudFront::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Distribution"]},"aws-cloudfront-mediastore":{className:"CloudFrontToMediaStore",packageName:"aws-cloudfront-mediastore",friendlyName:"Cloud Front To Media Store",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-mediastore/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-mediastore",requiredResourceTypes:["AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::MediaStore::Container","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::OriginRequestPolicy","AWS::CloudFront::Function","AWS::CloudFront::Distribution"]},"aws-cloudfront-oai-s3":{className:"CloudFrontToOaiToS3",packageName:"aws-cloudfront-oai-s3",friendlyName:"Cloud Front To Oai To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-oai-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-oai-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::CloudFront::Distribution"]},"aws-cloudfront-s3":{className:"CloudFrontToS3",packageName:"aws-cloudfront-s3",friendlyName:"Cloud Front To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::OriginAccessControl","AWS::CloudFront::Distribution"]},"aws-cognito-apigateway-lambda":{className:"CognitoToApiGatewayToLambda",packageName:"aws-cognito-apigateway-lambda",friendlyName:"Cognito To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cognito-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cognito-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::Cognito::UserPool","AWS::Cognito::UserPoolClient","AWS::ApiGateway::Authorizer"]},"aws-dynamodbstreams-lambda":{className:"DynamoDBStreamsToLambda",packageName:"aws-dynamodbstreams-lambda",friendlyName:"Dynamo DBStreams To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::EventSourceMapping","AWS::DynamoDB::Table","AWS::SQS::Queue","AWS::SQS::QueuePolicy"]},"aws-kinesisfirehose-s3":{className:"KinesisFirehoseToS3",packageName:"aws-kinesisfirehose-s3",friendlyName:"Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisfirehose-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream"]},"aws-kinesisstreams-kinesisfirehose-s3":{className:"KinesisStreamsToKinesisFirehoseToS3",packageName:"aws-kinesisstreams-kinesisfirehose-s3",friendlyName:"Kinesis Streams To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisstreams-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisstreams-kinesisfirehose-s3",requiredResourceTypes:["AWS::Kinesis::Stream","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream","AWS::CloudWatch::Alarm"]},"aws-s3-lambda":{className:"S3ToLambda",packageName:"aws-s3-lambda",friendlyName:"S3 To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::Lambda::Permission"]},"aws-s3-sns":{className:"S3ToSns",packageName:"aws-s3-sns",friendlyName:"S3 To Sns",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sns",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::KMS::Key","AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-s3-sqs":{className:"S3ToSqs",packageName:"aws-s3-sqs",friendlyName:"S3 To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sqs",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::KMS::Key","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-sns-lambda":{className:"SnsToLambda",packageName:"aws-sns-lambda",friendlyName:"Sns To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::Permission","AWS::SNS::Subscription","AWS::SNS::Topic","AWS::SNS::TopicPolicy"]},"aws-sns-sqs":{className:"SnsToSqs",packageName:"aws-sns-sqs",friendlyName:"Sns To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-sqs",requiredResourceTypes:["AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::SNS::Subscription","AWS::KMS::Key"]},"aws-eventbridge-kinesisstreams":{className:"EventbridgeToKinesisStreams",packageName:"aws-eventbridge-kinesisstreams",friendlyName:"EventBridge To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisstreams",requiredResourceTypes:["AWS::Events::Rule","AWS::Kinesis::Stream"]},"aws-eventbridge-sns":{className:"EventbridgeToSns",packageName:"aws-eventbridge-sns",friendlyName:"EventBridge To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sns",requiredResourceTypes:["AWS::Events::Rule","AWS::SNS::Topic"]},"aws-eventbridge-sqs":{className:"EventbridgeToSqs",packageName:"aws-eventbridge-sqs",friendlyName:"EventBridge To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sqs",requiredResourceTypes:["AWS::Events::Rule","AWS::SQS::Queue"]},"aws-eventbridge-stepfunctions":{className:"EventbridgeToStepfunctions",packageName:"aws-eventbridge-stepfunctions",friendlyName:"EventBridge To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-stepfunctions",requiredResourceTypes:["AWS::Events::Rule","AWS::StepFunctions::StateMachine"]},"aws-alb-fargate":{className:"AlbToFargate",packageName:"aws-alb-fargate",friendlyName:"ALB To Fargate",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-fargate/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-fargate",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::ECS::Cluster","AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-alb-lambda":{className:"AlbToLambda",packageName:"aws-alb-lambda",friendlyName:"ALB To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-lambda",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::Lambda::Function","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-apigateway-iot":{className:"ApiGatewayToIot",packageName:"aws-apigateway-iot",friendlyName:"API Gateway To IoT",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-iot/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-iot",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::IoT::TopicRule"]},"aws-apigateway-sagemakerendpoint":{className:"ApiGatewayToSagemakerendpoint",packageName:"aws-apigateway-sagemakerendpoint",friendlyName:"API Gateway To SageMaker Endpoint",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sagemakerendpoint/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sagemakerendpoint",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Integration","AWS::SageMaker::Endpoint"]},"aws-cloudfront-apigateway":{className:"CloudFrontToApiGateway",packageName:"aws-cloudfront-apigateway",friendlyName:"CloudFront To API Gateway",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway",requiredResourceTypes:["AWS::CloudFront::Distribution","AWS::ApiGateway::RestApi","AWS::ApiGateway::Method"]},"aws-dynamodbstreams-lambda-elasticsearch-kibana":{className:"DynamoDBStreamsToLambdaElasticsearchKibana",packageName:"aws-dynamodbstreams-lambda-elasticsearch-kibana",friendlyName:"DynamoDB Streams To Lambda Elasticsearch Kibana",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda-elasticsearch-kibana/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda-elasticsearch-kibana",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::Lambda::Function","AWS::Elasticsearch::Domain","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-dynamodbstreams-pipes-stepfunctions":{className:"DynamoDBStreamsToPipesStepfunctions",packageName:"aws-dynamodbstreams-pipes-stepfunctions",friendlyName:"DynamoDB Streams To Pipes StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-pipes-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-pipes-stepfunctions",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::StepFunctions::StateMachine"]},"aws-eventbridge-kinesisfirehose-s3":{className:"EventbridgeToKinesisfirehoseToS3",packageName:"aws-eventbridge-kinesisfirehose-s3",friendlyName:"EventBridge To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisfirehose-s3",requiredResourceTypes:["AWS::Events::Rule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-eventbridge-lambda":{className:"EventbridgeToLambda",packageName:"aws-eventbridge-lambda",friendlyName:"EventBridge To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-lambda",requiredResourceTypes:["AWS::Events::Rule","AWS::Lambda::Function","AWS::IAM::Role"]},"aws-fargate-dynamodb":{className:"FargateToDynamodb",packageName:"aws-fargate-dynamodb",friendlyName:"Fargate To DynamoDB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-dynamodb",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::DynamoDB::Table"]},"aws-fargate-eventbridge":{className:"FargateToEventbridge",packageName:"aws-fargate-eventbridge",friendlyName:"Fargate To EventBridge",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-eventbridge/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-eventbridge",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Events::Rule"]},"aws-fargate-kinesisfirehose":{className:"FargateToKinesisfirehose",packageName:"aws-fargate-kinesisfirehose",friendlyName:"Fargate To Kinesis Firehose",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisfirehose/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisfirehose",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::KinesisFirehose::DeliveryStream"]},"aws-fargate-kinesisstreams":{className:"FargateToKinesisstreams",packageName:"aws-fargate-kinesisstreams",friendlyName:"Fargate To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisstreams",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Kinesis::Stream"]},"aws-fargate-opensearch":{className:"FargateToOpensearch",packageName:"aws-fargate-opensearch",friendlyName:"Fargate To OpenSearch",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-opensearch/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-opensearch",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::OpenSearch::Domain"]},"aws-fargate-s3":{className:"FargateToS3",packageName:"aws-fargate-s3",friendlyName:"Fargate To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-s3",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::S3::Bucket"]},"aws-fargate-secretsmanager":{className:"FargateToSecretsmanager",packageName:"aws-fargate-secretsmanager",friendlyName:"Fargate To SecretsManager",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-secretsmanager/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-secretsmanager",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SecretsManager::Secret"]},"aws-fargate-sns":{className:"FargateToSns",packageName:"aws-fargate-sns",friendlyName:"Fargate To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sns",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SNS::Topic"]},"aws-fargate-sqs":{className:"FargateToSqs",packageName:"aws-fargate-sqs",friendlyName:"Fargate To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sqs",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SQS::Queue"]},"aws-fargate-ssmstringparameter":{className:"FargateToSsmstringparameter",packageName:"aws-fargate-ssmstringparameter",friendlyName:"Fargate To SSM String Parameter",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-ssmstringparameter/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-ssmstringparameter",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SSM::StringParameter"]},"aws-fargate-stepfunctions":{className:"FargateToStepfunctions",packageName:"aws-fargate-stepfunctions",friendlyName:"Fargate To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-stepfunctions",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::StepFunctions::StateMachine"]},"aws-iot-kinesisfirehose-s3":{className:"IotToKinesisfirehoseToS3",packageName:"aws-iot-kinesisfirehose-s3",friendlyName:"IoT To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisfirehose-s3",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-iot-kinesisstreams":{className:"IotToKinesisstreams",packageName:"aws-iot-kinesisstreams",friendlyName:"IoT To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisstreams",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Kinesis::Stream"]},"aws-iot-lambda":{className:"IotToLambda",packageName:"aws-iot-lambda",friendlyName:"IoT To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-lambda",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Lambda::Function","AWS::IAM::Role"]}};var Of=async e=>{let t={};for(let s of e)try{let n=await import(`@aws-solutions-constructs/${s}`),r=Object.keys(n).find(c=>/^[A-Z][a-zA-Z0-9]*To[A-Z][a-zA-Z0-9]*$/.test(c));if(!r)continue;let i=`https://docs.aws.amazon.com/solutions/latest/${s}/`,o=`https://github.com/awslabs/aws-solutions-constructs/tree/main/${s}`,u=_f[s]?.requiredResourceTypes||[];t[s]={className:r,packageName:s,friendlyName:r.replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim(),documentationUrl:i,githubUrl:o,requiredResourceTypes:u}}catch{}return t};var w=(e,t)=>e.Metadata?.["aws:cdk:path"]??t;var Bf={LOW:0,MEDIUM:1,HIGH:2,CRITICAL:3},A=(e,t)=>e?.resourceIdMetadata?.[t]?.constructLevel;var C=e=>e==="L3-aws-solutions"||e==="L3-third-party";var I=e=>{let t=Bf[e]??0;return t<=0?"LOW":Object.entries(Bf).find(([,s])=>s===t-1)?.[0]},S=(e,t,s)=>{if(!C(t))return e;let n=s?` Look for a \`${s}\` argument on the construct.`:"";return`${e} This resource is owned by an L3 pattern \u2014 fix via the pattern's props${n} rather than escape-hatching the underlying CFN resource.`},Mf=(e,t)=>{let s=e?.cdkContext?.[t];return s===!0||s==="true"};var Nf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CertificateManager::Certificate")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.ValidationMethod==="EMAIL"&&l.push(t(r,"ACM certificate uses email validation instead of DNS validation.",S("Use DNS validation for automated certificate renewal. Email validation requires manual intervention for renewals.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),i.Properties?.CertificateTransparencyLoggingPreference==="DISABLED"&&l.push(t(r,"ACM certificate has certificate transparency logging disabled.",S("Enable certificate transparency logging for security monitoring and to detect misissued certificates.",o),u("LOW"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Wf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::ApiGateway::RestApi"&&!i.Properties?.EndpointConfiguration?.Types?.includes("PRIVATE")){let o=A(s,r),a=C(o);n[r]={issues:[t(r,"API Gateway is publicly accessible.",S("If this API is intentionally public, ignore this finding (or suppress it via .cdk-insights.json). For internal APIs, use PRIVATE endpoints to restrict access.",o,"endpointConfiguration / endpointTypes"),a?"LOW":"MEDIUM","Security",w(i,r),"cdkInsights")]}}return n},{});var kE=e=>typeof e=="string"&&e.toUpperCase()==="OPTIONS",Uf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=i.Type==="AWS::ApiGateway::Method",a=i.Type==="AWS::ApiGatewayV2::Route";if(!o&&!a)return n;let u=i.Properties??{},c=u.AuthorizationType;if(o&&kE(u.HttpMethod)||!(c===void 0||c==="NONE"))return n;let p=w(i,r),d=A(s,r),m=C(d),f=o?"API Gateway Method has no authorization (AuthorizationType is NONE).":"API Gateway v2 Route has no authorization (AuthorizationType is NONE).";return n[r]={issues:[t(r,f,S("Set AuthorizationType to AWS_IAM, COGNITO_USER_POOLS, CUSTOM (REST), or JWT (HTTP API). Public-by-default endpoints expose backend Lambdas to anyone on the internet without authentication. If the route is intentionally public (e.g. a webhook receiver), prefer api-key + WAF rate limiting.",d,"methodOptions.authorizationType"),m?"MEDIUM":"HIGH","Security",p,"cdkInsights")]},n},{});var jf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AppSync::GraphQLApi")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],p=i.Properties?.AuthenticationType;p==="API_KEY"&&l.push(t(r,"AppSync API uses API key authentication.",S("Consider using AWS_IAM, AMAZON_COGNITO_USER_POOLS, or OPENID_CONNECT for production workloads. API keys are best for development or public read-only access.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let d=i.Properties?.AdditionalAuthenticationProviders;return p!=="AWS_IAM"&&(!d||d.length===0)&&l.push(t(r,"AppSync API does not have multiple authentication providers configured.",S("Consider adding AdditionalAuthenticationProviders for flexibility in authenticating different client types.",o),u("LOW"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var $f=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AppSync::GraphQLApi")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],p=i.Properties?.LogConfig;return p?p.FieldLogLevel==="NONE"&&l.push(t(r,"AppSync API has field-level logging disabled.",S("Set FieldLogLevel to ERROR or ALL to capture GraphQL resolver execution details.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")):l.push(t(r,"AppSync API does not have logging configured.",S("Enable LogConfig to capture request/response logs in CloudWatch for debugging and monitoring.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),i.Properties?.XrayEnabled!==!0&&l.push(t(r,"AppSync API does not have X-Ray tracing enabled.",S("Enable XrayEnabled for distributed tracing and performance analysis.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Gf=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::AppSync::GraphQLApi"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::WAFv2::WebACLAssociation"),i=new Set(r.map(([,o])=>{let a=o.Properties?.ResourceArn;return typeof a=="string"?a:a?.["Fn::GetAtt"]?.[0]?a["Fn::GetAtt"][0]:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"AppSync API does not have AWS WAF protection.",S("Associate a WAF WebACL to protect against common web exploits and control access to the API.",p),m("MEDIUM"),"Security",c,"cdkInsights")]}}return o},{})};var Hf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Backup::BackupPlan")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],d=i.Properties?.BackupPlan?.BackupPlanRule||[];for(let m of d){(m.CopyActions||[]).length===0&&l.push(t(r,`Backup rule "${m.RuleName||"unnamed"}" does not have cross-region copy configured.`,S("Add CopyActions to replicate backups to another region for disaster recovery.",o),u("LOW"),"Reliability",c,"cdkInsights"));let g=m.Lifecycle;!g?.DeleteAfterDays&&!g?.MoveToColdStorageAfterDays&&l.push(t(r,`Backup rule "${m.RuleName||"unnamed"}" has no lifecycle configuration.`,S("Set DeleteAfterDays or MoveToColdStorageAfterDays to manage backup retention and costs.",o),u("LOW"),"Cost Optimization",c,"cdkInsights"))}return l.length>0&&(n[r]={issues:l}),n},{});var zf=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Backup::BackupVault"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Backup::BackupVaultLock"),i=new Set(r.map(([,o])=>{let a=o.Properties?.BackupVaultName;return typeof a=="string"?a:typeof a=="object"&&a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=A(s,a),l=C(c),p=b=>l?I(b):b,d=w(u,a),m=[];u.Properties?.EncryptionKeyArn||m.push(t(a,"Backup vault uses default AWS-managed encryption key.",S("Specify a customer-managed KMS key using EncryptionKeyArn for additional control over encryption.",c),p("LOW"),"Security",d,"cdkInsights"));let g=u.Properties?.BackupVaultName,h=typeof g=="string"?g:typeof g=="object"?g?.Ref:void 0;return i.has(a)||h&&i.has(h)||m.push(t(a,"Backup vault does not have a vault lock configured.",S("Add a BackupVaultLock to enforce retention policies and prevent backup deletion for compliance requirements.",c),p("LOW"),"Security",d,"cdkInsights")),m.length>0&&(o[a]={issues:m}),o},{})};var qf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r);return i.Properties?.DistributionConfig?.DefaultCacheBehavior?.ViewerProtocolPolicy==="allow-all"&&(n[r]={issues:[t(r,"CloudFront distribution allows HTTP traffic (ViewerProtocolPolicy is allow-all).",S('Set ViewerProtocolPolicy to "https-only" or "redirect-to-https" to enforce HTTPS and protect data in transit.',o),u("HIGH"),"Security",c,"cdkInsights")]}),n},{});var Kf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r);return i.Properties?.DistributionConfig?.Logging?.Bucket||(n[r]={issues:[t(r,"CloudFront distribution does not have access logging enabled.",S("Enable access logging to an S3 bucket to track viewer requests for security analysis, auditing, and troubleshooting.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var TE=["SSLv3","TLSv1","TLSv1_2016","TLSv1.1_2016"],Vf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=w(i,r),u=i.Properties?.DistributionConfig?.ViewerCertificate,c=u?.MinimumProtocolVersion;if(u?.CloudFrontDefaultCertificate)return n;let l=A(s,r),p=C(l),d=m=>p?I(m):m;return c&&TE.includes(c)&&(n[r]={issues:[t(r,`CloudFront distribution uses outdated TLS version (${c}).`,S("Use TLSv1.2_2021 or later for improved security. Older TLS versions have known vulnerabilities.",l),d("MEDIUM"),"Security",o,"cdkInsights")]}),n},{});var Zf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.DistributionConfig?.WebACLId||(n[r]={issues:[t(r,"CloudFront distribution has no WAF WebACL associated.",S("Associate a WAF WebACL to protect against common web exploits, SQL injection, XSS, and DDoS attacks.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Yf=(e,t)=>Object.entries(e.Resources||{}).some(([,n])=>n.Type==="AWS::CloudTrail::Trail")?{}:{Global:{issues:[t("Global","No CloudTrail Trail defined in this stack.","CloudTrail is most commonly configured at the AWS account or organization level (one Trail covers every stack). If account-level CloudTrail is already in place, suppress this rule. If not, add a CloudTrail Trail at the account level \u2014 defining one per stack is rarely the right shape.","LOW","Security","Global","cdkInsights")]}};var Jf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudWatch::Alarm")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.AlarmActions,d=i.Properties?.OKActions,m=i.Properties?.InsufficientDataActions;return(!p||p.length===0)&&l.push(t(r,"CloudWatch Alarm has no alarm actions configured.",S("Add AlarmActions (SNS topic, Lambda, etc.) to receive notifications when the alarm state changes to ALARM.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),i.Properties?.TreatMissingData||l.push(t(r,"CloudWatch Alarm does not specify how to treat missing data.",S("Set TreatMissingData to define alarm behavior when data points are missing (missing, ignore, breaching, or notBreaching).",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Qf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Logs::LogGroup")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.KmsKeyId||(n[r]={issues:[t(r,"CloudWatch Log Group is not encrypted with a customer-managed KMS key.",S("Enable KMS encryption using KmsKeyId to protect sensitive log data at rest with customer-managed keys.",o),u("LOW"),"Security",c,"cdkInsights")]}),n},{});var PE="@aws-cdk/aws-lambda:logRetentionDefaultsTo30Days",LE=e=>/\/LogRetention[0-9A-Fa-f]*$/.test(e)||/LogRetention[0-9A-Fa-f]+$/.test(e),Xf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Logs::LogGroup")return n;let o=w(i,r),a=i.Properties?.RetentionInDays,u=A(s,r),c=C(u);return a!==void 0||Mf(s,PE)&&LE(o||r)||(n[r]={issues:[t(r,"CloudWatch Log Group has no retention period set (logs retained indefinitely).",S("Set RetentionInDays to control storage costs. Consider 30-90 days for operational logs, longer for compliance requirements.",u,"logGroupProps.retention"),c?"LOW":"MEDIUM","Cost Optimization",o,"cdkInsights")]}),n},{});var eg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Cognito::UserPool")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r),l=i.Properties?.MfaConfiguration;return(!l||l==="OFF")&&(n[r]={issues:[t(r,"Cognito User Pool has MFA disabled.",S("Enable MFA (OPTIONAL or ON) to add an extra layer of security for user authentication.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var tg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Cognito::UserPool")return n;let o=[],a=w(i,r),u=i.Properties?.PasswordPolicy,c=A(s,r),l=C(c),p=d=>l?I(d):d;if(!u)o.push(t(r,"Cognito User Pool has no password policy configured.",S("Configure a strong password policy with minimum length, uppercase, lowercase, numbers, and symbols requirements.",c,"passwordPolicy"),p("HIGH"),"Security",a,"cdkInsights"));else{let d=u.MinimumLength||8;d<12&&o.push(t(r,`Cognito password policy has minimum length of ${d} characters.`,S("Set MinimumLength to at least 12 characters for stronger security against brute-force attacks.",c,"passwordPolicy.minLength"),p("MEDIUM"),"Security",a,"cdkInsights")),u.RequireSymbols===!1&&o.push(t(r,"Cognito password policy does not require symbols.",S("Enable RequireSymbols for stronger password complexity requirements.",c,"passwordPolicy.requireSymbols"),p("LOW"),"Security",a,"cdkInsights"))}return o.length>0&&(n[r]={issues:o}),n},{});var sg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Cognito::UserPool")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r),l=i.Properties?.UserPoolAddOns?.AdvancedSecurityMode;return(!l||l==="OFF")&&(n[r]={issues:[t(r,"Cognito User Pool does not have advanced security features enabled.",S("Enable UserPoolAddOns with AdvancedSecurityMode set to AUDIT or ENFORCED to detect compromised credentials and block suspicious sign-ins.",o),u("LOW"),"Security",c,"cdkInsights")]}),n},{});var ng=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::DynamoDB::Table"||i.Properties?.SSESpecification?.SSEEnabled===!0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"DynamoDB Table is not configured with KMS encryption.",S("Set SSESpecification.SSEEnabled to true and provide a customer-managed KMSMasterKeyId. Without SSESpecification, DynamoDB encrypts with an AWS-owned key \u2014 adequate for general use but not for HIPAA / PCI-DSS workloads that require customer-controlled key rotation and audit.",u,"tableProps.encryption"),c?"LOW":"MEDIUM","Security",a,"cdkInsights")]},n},{});var rg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::DynamoDB::Table"||i.Properties?.PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled===!0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"DynamoDB Table does not have Point-in-Time Recovery enabled.",S("Set PointInTimeRecoverySpecification.PointInTimeRecoveryEnabled to true to enable continuous backups for the last 35 days. Required by HIPAA and SOC2 for data resilience.",u,"tableProps.pointInTimeRecoverySpecification"),c?"LOW":"MEDIUM","Reliability",a,"cdkInsights")]},n},{});var ig=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::DynamoDB::Table")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=i.Properties?.BillingMode,l=w(i,r);return(!c||c==="PROVISIONED")&&(n[r]={issues:[t(r,"DynamoDB table uses provisioned capacity without on-demand billing.",S("Consider using BillingMode: PAY_PER_REQUEST for automatic scaling and cost optimization, especially for unpredictable workloads. For predictable workloads, configure Application Auto Scaling.",o),u("MEDIUM"),"Cost Optimization",l,"cdkInsights")]}),n},{});var og=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::DynamoDB::Table"&&!i.Properties?.StreamSpecification){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"DynamoDB table does not have streams enabled.",S("Consider enabling DynamoDB Streams to capture item-level changes for analytics, auditing, event-driven architectures, and cross-region replication.",o),u("LOW"),"Operational Excellence",w(i,r),"cdkInsights")]}}return n},{});var ag=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::Volume")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties??{};return p.Encrypted!==!0&&c.push(t(r,"EBS Volume is not encrypted.",S("Enable encryption on EBS volumes to protect data at rest. Use the Encrypted property and optionally specify a KmsKeyId.",o),u("HIGH"),"Security",l,"cdkInsights")),p.VolumeType==="gp2"&&c.push(t(r,"EBS Volume uses gp2 storage type.",S("Consider migrating to gp3 for up to 20% cost savings with better baseline performance (3,000 IOPS and 125 MB/s throughput).",o),u("LOW"),"Cost Optimization",l,"cdkInsights")),c.length>0&&(n[r]={issues:c}),n},{});var cg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EFS::FileSystem"||i.Properties?.Encrypted===!0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"EFS FileSystem is not encrypted at rest.",S("Set Encrypted to true and provide KmsKeyId for a customer-managed key. Encryption can only be enabled at filesystem creation; existing unencrypted filesystems require data migration to a new encrypted filesystem.",u,"fileSystemProps.encrypted"),c?"MEDIUM":"HIGH","Security",a,"cdkInsights")]},n},{});var ug=e=>Array.isArray(e)&&e.length>0,lg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AutoScaling::AutoScalingGroup")return n;let o=i.Properties??{};if(!(ug(o.LoadBalancerNames)||ug(o.TargetGroupARNs))||o.HealthCheckType==="ELB")return n;let c=w(i,r),l=A(s,r),p=C(l);return n[r]={issues:[t(r,"AutoScalingGroup attached to a load balancer is not using ELB health checks.",S("Set HealthCheckType to ELB so unhealthy instances detected by the load balancer are recycled. EC2 health checks (the default) only catch instance-level failures, missing app-level outages the LB would otherwise detect.",l,"asgProps.healthCheckType"),p?"LOW":"MEDIUM","Reliability",c,"cdkInsights")]},n},{});var pg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AutoScaling::LaunchConfiguration"||i.Properties?.AssociatePublicIpAddress!==!0)return n;let o=w(i,r),a=A(s,r),u=C(a);return n[r]={issues:[t(r,"AutoScaling LaunchConfiguration sets AssociatePublicIpAddress=true.",S("Set AssociatePublicIpAddress to false. Instances launched from this configuration will get a public IP and be reachable from the internet directly; prefer placing them in private subnets behind an ALB / NLB.",a,"launchConfigProps.associatePublicIpAddress"),u?"MEDIUM":"HIGH","Security",o,"cdkInsights")]},n},{});var dg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::EC2::Instance"&&i.Properties?.InstanceType?.toString().startsWith("t2")){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"EC2 instance is using an older t2 instance. Consider upgrading to t3 for better performance and cost savings.",S("Upgrade to a t3 instance for improved performance, lower latency, and better cost efficiency.",o),u("MEDIUM"),"Cost Optimization",w(i,r),"cdkInsights")]}}return n},{});var mg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::EC2::NatGateway"){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"NAT Gateway detected. NAT Gateways incur hourly charges (~$0.045/hr) plus data processing fees (~$0.045/GB).",S("Consider alternatives like NAT instances for lower traffic, VPC endpoints for AWS services, or IPv6 egress-only internet gateways to reduce costs.",o),u("LOW"),"Cost Optimization",w(i,r),"cdkInsights")]}}return n},{});var fg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::Instance")return n;let o=i.Properties?.NetworkInterfaces;if(!Array.isArray(o)||o.length===0||!o.some(p=>p&&p.AssociatePublicIpAddress===!0))return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"EC2 Instance has a network interface with public IP association (AssociatePublicIpAddress=true).",S("Set AssociatePublicIpAddress to false on the NetworkInterface, or remove the property and rely on subnet defaults. A public IP on the instance ENI makes it directly internet-reachable; prefer a NAT/ALB for outbound and inbound traffic.",c,"instanceProps.associatePublicIpAddress"),l?"MEDIUM":"HIGH","Security",u,"cdkInsights")]},n},{});var _E=[22,3389,3306,5432,1433,27017,6379],OE=e=>e.CidrIp==="0.0.0.0/0"||e.CidrIpv6==="::/0",BE=(e,t,s)=>t===void 0||s===void 0?!1:e>=t&&e<=s,gg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::SecurityGroup")return n;let o=A(s,r),a=C(o),u=h=>a?I(h):h,c=[],l=w(i,r),p=i.Properties?.SecurityGroupIngress||[],d=i.Properties?.SecurityGroupEgress||[],m=p.some(h=>h.CidrIp==="0.0.0.0/0"),f=p.some(h=>h.CidrIpv6==="::/0");m&&c.push(t(r,"Security Group allows unrestricted IPv4 ingress (0.0.0.0/0).",S("Restrict security group rules to specific IPs and ports.",o),u("HIGH"),"Security",l,"cdkInsights")),f&&c.push(t(r,"Security Group allows unrestricted IPv6 ingress (::/0).",S("Restrict security group rules to specific IPs and ports.",o),u("HIGH"),"Security",l,"cdkInsights"));for(let h of p)if(OE(h)){for(let y of _E)if(BE(y,h.FromPort,h.ToPort)){c.push(t(r,`Security Group exposes port ${y} to the internet.`,S("Restrict access to management and database ports. Use bastion hosts, VPN, or AWS Systems Manager Session Manager instead.",o),u("CRITICAL"),"Security",l,"cdkInsights"));break}}return d.some(h=>h.CidrIp==="0.0.0.0/0")&&c.push(t(r,"Security Group allows unrestricted egress to 0.0.0.0/0.",S("Consider restricting egress rules to specific destinations for defense in depth.",o),u("LOW"),"Security",l,"cdkInsights")),p.length===0&&d.length===0&&c.push(t(r,"Security Group has no ingress or egress rules defined.",S("Review if this security group is in use. Empty security groups may indicate orphaned resources or misconfiguration.",o),u("LOW"),"Operational Excellence",l,"cdkInsights")),c.length>0&&(n[r]={issues:c}),n},{});var hg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::Subnet"||i.Properties?.MapPublicIpOnLaunch!==!0)return n;let o=w(i,r),a=A(s,r),u=C(a);return n[r]={issues:[t(r,"EC2 Subnet auto-assigns public IPs to launched instances (MapPublicIpOnLaunch=true).",S("Set MapPublicIpOnLaunch to false unless this is intentionally a public subnet. Instances should opt into a public IP at the ENI level rather than inheriting it from subnet defaults \u2014 keeps the blast radius small if a private workload accidentally lands here.",a,"subnetProps.mapPublicIpOnLaunch"),u?"LOW":"MEDIUM","Security",o,"cdkInsights")]},n},{});var yg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECR::Repository")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.ImageTagMutability!=="IMMUTABLE"&&(n[r]={issues:[t(r,"ECR repository allows mutable image tags.",S("Set ImageTagMutability to IMMUTABLE to prevent image tags from being overwritten, ensuring deployment consistency.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Sg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECR::Repository")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.LifecyclePolicy?.LifecyclePolicyText||(n[r]={issues:[t(r,"ECR repository does not have a lifecycle policy configured.",S("Add a lifecycle policy to automatically clean up old or untagged images and reduce storage costs.",o),u("MEDIUM"),"Cost Optimization",c,"cdkInsights")]}),n},{});var bg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECR::Repository")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.ImageScanningConfiguration?.ScanOnPush!==!0&&l.push(t(r,"ECR repository does not have image scanning on push enabled.",S("Enable ScanOnPush in ImageScanningConfiguration to automatically scan images for vulnerabilities when pushed.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Dg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::TaskDefinition")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.ContainerDefinitions||[];for(let d of p)d.LogConfiguration?.LogDriver||c.push(t(r,`ECS container "${d.Name||"unnamed"}" has no logging configuration.`,S("Configure LogConfiguration with awslogs driver to send container logs to CloudWatch for monitoring and debugging.",o),u("MEDIUM"),"Operational Excellence",l,"cdkInsights"));return c.length>0&&(n[r]={issues:c}),n},{});var vg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::Service")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=i.Properties?.ServiceConnectConfiguration;if(!c||c.Enabled!==!0||c.LogConfiguration?.LogDriver)return n;let p=w(i,r);return n[r]={issues:[t(r,"ECS Service Connect is enabled without an access log configuration.",S("Configure ServiceConnectConfiguration.LogConfiguration with a LogDriver (e.g. awslogs) to capture inter-service traffic metadata for audit, debugging, and incident response.",o),u("MEDIUM"),"Security",p,"cdkInsights")]},n},{});var Cg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::TaskDefinition")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.ContainerDefinitions||[];for(let d of p){let m=d.Memory||d.MemoryReservation,f=d.Cpu;!m&&!f&&c.push(t(r,`ECS container "${d.Name||"unnamed"}" has no CPU or memory limits defined.`,S("Define CPU and Memory limits to prevent runaway containers and ensure predictable resource allocation.",o),u("LOW"),"Reliability",l,"cdkInsights"))}return c.length>0&&(n[r]={issues:c}),n},{});var ME=/(^|_)(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)(_|$)/i,Ag=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::TaskDefinition")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.ContainerDefinitions||[];for(let d of p){let m=d.Environment||[];for(let f of m)ME.test(f.Name||"")&&c.push(t(r,`ECS task definition has sensitive environment variable "${f.Name}" in plaintext.`,S('Use AWS Secrets Manager or SSM Parameter Store with the "secrets" property instead of plaintext environment variables.',o),u("HIGH"),"Security",l,"cdkInsights"))}return c.length>0&&(n[r]={issues:c}),n},{});var xg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EKS::Cluster")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.EncryptionConfig?.some(m=>m.Resources?.includes("secrets"))||l.push(t(r,"EKS cluster does not have Kubernetes secrets encryption enabled.",S("Configure EncryptionConfig with a KMS key to encrypt secrets stored in etcd.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var wg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EKS::Cluster")return n;let o=A(s,r),a=C(o),u=h=>a?I(h):h,c=w(i,r),l=[],d=i.Properties?.Logging?.ClusterLogging?.EnabledTypes||[],m=d.map(h=>h.Type).filter(h=>!!h),g=["api","audit","authenticator","controllerManager","scheduler"].filter(h=>!m.includes(h));return g.length>0&&l.push(t(r,`EKS cluster is missing control plane logging for: ${g.join(", ")}.`,S("Enable all control plane log types (api, audit, authenticator, controllerManager, scheduler) for comprehensive cluster monitoring.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),d.length===0?(n[r]={issues:[t(r,"EKS cluster does not have any control plane logging enabled.",S("Enable control plane logging to CloudWatch for audit trails and troubleshooting Kubernetes API issues.",o),u("MEDIUM"),"Security",c,"cdkInsights")]},n):(l.length>0&&(n[r]={issues:l}),n)},{});var Eg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EKS::Cluster")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.ResourcesVpcConfig,d=p?.EndpointPublicAccess,m=p?.EndpointPrivateAccess,f=p?.PublicAccessCidrs;return d===!0&&m!==!0&&l.push(t(r,"EKS cluster has only public endpoint access enabled.",S("Enable EndpointPrivateAccess to allow communication between nodes and the API server within the VPC.",o),u("MEDIUM"),"Security",c,"cdkInsights")),d===!0&&(!f||f.length===0||f.includes("0.0.0.0/0"))&&l.push(t(r,"EKS cluster public endpoint is accessible from the internet (0.0.0.0/0).",S("Restrict PublicAccessCidrs to specific IP ranges that need to access the Kubernetes API.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Rg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r);return(i.Properties?.LoadBalancerAttributes||[]).some(d=>d.Key==="deletion_protection.enabled"&&d.Value==="true")||(n[r]={issues:[t(r,"Load Balancer does not have deletion protection enabled.",S("Enable deletion protection to prevent accidental deletion of the load balancer in production environments.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")]}),n},{});var Fg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::Listener")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=i.Properties?.Protocol,p=i.Properties?.Port;return l==="HTTP"&&p!==80?n[r]={issues:[t(r,`Load Balancer listener uses HTTP protocol on port ${p}.`,S("Use HTTPS protocol with a valid SSL certificate to encrypt traffic in transit.",o),u("HIGH"),"Security",c,"cdkInsights")]}:l==="HTTP"&&p===80&&((i.Properties?.DefaultActions||[]).some(f=>f.Type==="redirect"&&f.RedirectConfig?.Protocol==="HTTPS")||(n[r]={issues:[t(r,"Load Balancer HTTP listener on port 80 does not redirect to HTTPS.",S("Configure the HTTP listener to redirect to HTTPS to ensure encrypted traffic.",o),u("MEDIUM"),"Security",c,"cdkInsights")]})),n},{});var Ig=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return n;let o=w(i,r);if(!(i.Properties?.LoadBalancerAttributes||[]).some(c=>c.Key==="access_logs.s3.enabled"&&c.Value==="true")){let c=A(s,r),l=C(c),p=d=>l?I(d):d;n[r]={issues:[t(r,"Load Balancer does not have access logging enabled.",S("Enable access logging to S3 for security analysis, auditing, and troubleshooting of traffic patterns.",c,"accessLogs / logAccessLogs"),p("MEDIUM"),"Security",o,"cdkInsights")]}}return n},{});var NE=["ELBSecurityPolicy-2016-08","ELBSecurityPolicy-TLS-1-0-2015-04","ELBSecurityPolicy-TLS-1-1-2017-01","ELBSecurityPolicy-2015-05"],kg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::Listener")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=i.Properties?.Protocol,p=i.Properties?.SslPolicy;return l!=="HTTPS"&&l!=="TLS"||p&&NE.includes(p)&&(n[r]={issues:[t(r,`Load Balancer listener uses outdated security policy (${p}).`,S("Use ELBSecurityPolicy-TLS13-1-2-2021-06 or later for TLS 1.3 support, or at minimum ELBSecurityPolicy-TLS-1-2-2017-01 for TLS 1.2.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Tg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElastiCache::ReplicationGroup")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],p=i.Properties?.AuthToken,d=i.Properties?.TransitEncryptionEnabled;return!p&&d===!0&&l.push(t(r,"ElastiCache Redis cluster has transit encryption but no AUTH token configured.",S("Set AuthToken to require authentication for Redis connections, providing an additional security layer.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Pg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElastiCache::ReplicationGroup"&&i.Type!=="AWS::ElastiCache::CacheCluster")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.AtRestEncryptionEnabled!==!0&&l.push(t(r,"ElastiCache cluster does not have encryption at rest enabled.",S("Enable AtRestEncryptionEnabled to protect cached data at rest using AWS-managed or customer-managed keys.",o),u("HIGH"),"Security",c,"cdkInsights")),i.Properties?.TransitEncryptionEnabled!==!0&&l.push(t(r,"ElastiCache cluster does not have encryption in transit enabled.",S("Enable TransitEncryptionEnabled to protect data during transfer between clients and the cache.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Lg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElastiCache::ReplicationGroup")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.AutomaticFailoverEnabled,d=i.Properties?.NumNodeGroups||1,m=i.Properties?.ReplicasPerNodeGroup||0;return p!==!0&&(d>1||m>0)&&l.push(t(r,"ElastiCache replication group has replicas but automatic failover is not enabled.",S("Enable AutomaticFailoverEnabled to automatically promote a replica to primary if the primary node fails.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")),i.Properties?.MultiAZEnabled!==!0&&p===!0&&l.push(t(r,"ElastiCache replication group has automatic failover but Multi-AZ is not enabled.",S("Enable MultiAZEnabled to distribute nodes across availability zones for higher availability.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var _g=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Events::Rule")return n;let o=w(i,r),a=A(s,r),u=C(a),c=p=>u?I(p):p,l=[];return i.Properties?.State!=="ENABLED"&&l.push(t(r,"EventBridge rule is disabled or not explicitly enabled.",S("Ensure the EventBridge rule State is set to ENABLED to trigger events as expected.",a,"enabled / state"),c("MEDIUM"),"Operational Excellence",o,"cdkInsights")),(!i.Properties?.Targets||Array.isArray(i.Properties.Targets)&&i.Properties.Targets.length===0)&&l.push(t(r,"EventBridge rule has no targets configured. Events matching this rule will be silently dropped.",S("Add at least one target (Lambda, SQS, SNS, Step Functions, etc.) to process matched events. Without targets, the rule matches events but takes no action.",a,"targets"),c("HIGH"),"Reliability",o,"cdkInsights")),l.length>0&&(n[r]={issues:[...n[r]?.issues||[],...l]}),n},{});var WE=e=>{if(e==="*")return!0;if(e&&typeof e=="object"){let t=e.AWS;if(t==="*"||Array.isArray(t)&&t.includes("*"))return!0}return!1},UE=e=>e.Condition!==void 0&&e.Condition!==null&&typeof e.Condition=="object"&&Object.keys(e.Condition).length>0,Og=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Events::EventBusPolicy")return n;let o=i.Properties??{},a=[];o.Principal!==void 0&&a.push({Effect:"Allow",Principal:o.Principal,Condition:o.Condition});let u=o.Statement;if(u&&(Array.isArray(u.Statement)?a.push(...u.Statement):a.push(u)),a.filter(m=>(m.Effect===void 0||m.Effect==="Allow")&&WE(m.Principal)&&!UE(m)).length===0)return n;let l=w(i,r),p=A(s,r),d=C(p);return n[r]={issues:[t(r,"EventBridge EventBusPolicy grants access to wildcard Principal without a Condition.",S("Replace wildcard Principal with a specific AWS account / org ID, or add a Condition (e.g. aws:PrincipalOrgID) to scope cross-account access. Wildcard principals on an event bus mean any AWS account can publish events to your bus.",p,"eventBusPolicyProps.statement"),d?"HIGH":"CRITICAL","Security",l,"cdkInsights")]},n},{});var Bg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Glue::Connection")return n;let o=A(s,r),a=C(o),u=f=>a?I(f):f,c=w(i,r),l=[],p=i.Properties?.ConnectionInput,d=p?.ConnectionType,m=p?.PhysicalConnectionRequirements;if(d==="JDBC"){m?.SubnetId||l.push(t(r,"Glue JDBC connection does not specify a VPC subnet.",S("Configure PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList for network isolation.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let g=p?.ConnectionProperties?.JDBC_CONNECTION_URL||"";typeof g=="string"&&!g.includes("ssl=true")&&!g.includes("useSSL=true")&&l.push(t(r,"Glue JDBC connection URL may not enforce SSL.",S("Ensure the JDBC connection URL includes SSL parameters to encrypt data in transit.",o),u("LOW"),"Security",c,"cdkInsights"))}return l.length>0&&(n[r]={issues:l}),n},{});var Mg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Glue::Job")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[];return i.Properties?.SecurityConfiguration||l.push(t(r,"Glue job does not have a security configuration specified.",S("Create and attach a SecurityConfiguration to enable encryption for job bookmarks, S3 data, and CloudWatch logs.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Ng=/^\d{12}$/,Wg=/arn:aws:iam::(\d{12}):root/,jE=e=>{if(!e)return[];if(typeof e=="string"){if(Ng.test(e))return[e];let t=e.match(Wg);return t?[t[1]]:[]}return typeof e=="object"&&e.AWS?(Array.isArray(e.AWS)?e.AWS:[e.AWS]).flatMap(s=>{if(Ng.test(s))return[s];let n=s.match(Wg);return n?[n[1]]:[]}):[]},Ug=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::Role")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.AssumeRolePolicyDocument;if(p?.Statement){for(let d of p.Statement)if(d.Effect==="Allow"){let m=jE(d.Principal);for(let f of m)c.push(t(r,`IAM Role allows cross-account trust from account ${f}.`,S("Verify this cross-account trust relationship is intentional and the external account is trusted. Consider adding conditions to restrict access.",o),u("MEDIUM"),"Security",l,"cdkInsights"))}}return c.length>0&&(n[r]={issues:c}),n},{});var jg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::Policy"&&i.Type!=="AWS::IAM::Role")return n;let o=i.Properties?.Policies,a=[];if(Array.isArray(o))for(let m of o)m?.PolicyDocument&&a.push(m.PolicyDocument);let u=i.Properties?.PolicyDocument;u&&a.push(u);let c=A(s,r),l=C(c),p=m=>l?I(m):m,d=[];for(let m of a){if(!m?.Statement)continue;let f=m.Statement;for(let g of f)if(g.Effect==="Allow"){let h=g.Action,y=g.Resource,b=h==="*"||Array.isArray(h)&&h.includes("*"),x=y==="*"||Array.isArray(y)&&y.includes("*");b&&x?d.push(t(r,"IAM policy allows all actions (*) on all resources (*). This grants administrative access.",S("Restrict both actions and resources to follow the principle of least privilege.",c,"rolePolicy / inlinePolicies"),p("CRITICAL"),"Security",r,"cdkInsights")):b?d.push(t(r,"IAM policy allows all actions (*). This is overly permissive.",S("Specify only the required actions instead of using wildcards.",c,"rolePolicy / inlinePolicies"),p("CRITICAL"),"Security",r,"cdkInsights")):x&&d.push(t(r,"IAM policy allows actions on all resources (*). This is overly permissive.",S("Restrict resources to specific ARNs instead of using wildcards.",c,"rolePolicy / inlinePolicies"),p("HIGH"),"Security",r,"cdkInsights"))}}return d.length>0&&(n[r]={issues:d}),n},{});var $E=[/\/ServiceRole\/Resource$/,/\/Role\/Resource$/,/\/InstanceRole\/Resource$/,/CustomResourceProvider\/Role$/],GE=e=>$E.some(t=>t.test(e)),$g=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::Role")return n;let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=w(i,r);return GE(c)||i.Properties?.PermissionsBoundary||(n[r]={issues:[t(r,"IAM Role has no permission boundary configured.",S("Consider using permission boundaries to limit the maximum permissions for delegated access and prevent privilege escalation.",o),u("LOW"),"Security",c,"cdkInsights")]}),n},{});var Gg=e=>Array.isArray(e)&&e.length>0,Hg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::User")return n;let o=i.Properties??{},a=Gg(o.Policies),u=Gg(o.ManagedPolicyArns);if(!a&&!u)return n;let c=w(i,r),l=A(s,r),p=C(l),d=[];return a&&d.push(t(r,"IAM User has inline policies attached.",S("Move policies to an IAM Group and add the user to the group, or attach via a Role assumed by the user. CIS AWS Foundations 1.15 requires users to inherit permissions through groups.",l,"userProps.attachInlinePolicy"),p?"LOW":"MEDIUM","Security",c,"cdkInsights")),u&&d.push(t(r,"IAM User has managed policies attached directly.",S("Attach managed policies to an IAM Group and add the user to that group. Direct attachment violates CIS AWS Foundations 1.15 (users must inherit permissions through groups).",l,"userProps.managedPolicies"),p?"LOW":"MEDIUM","Security",c,"cdkInsights")),n[r]={issues:d},n},{});var zg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Kinesis::Stream")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[],p=i.Properties?.StreamEncryption;return(!p?.EncryptionType||p.EncryptionType==="NONE")&&l.push(t(r,"Kinesis Data Stream does not have server-side encryption enabled.",S("Enable StreamEncryption with EncryptionType KMS to protect data at rest.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var qg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Kinesis::Stream")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];i.Properties?.RetentionPeriodHours===24&&l.push(t(r,"Kinesis Data Stream uses minimum retention period (24 hours).",S("Consider increasing RetentionPeriodHours for applications that need to replay or reprocess data during failures.",o),u("LOW"),"Reliability",c,"cdkInsights"));let d=i.Properties?.StreamModeDetails?.StreamMode;return l.length>0&&(n[r]={issues:l}),n},{});var HE=e=>typeof e=="string"?e==="*":typeof e=="object"?Object.values(e).some(t=>Array.isArray(t)?t.includes("*"):t==="*"):!1,Kg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if((i.Type==="AWS::KMS::Key"&&Array.isArray(i.Properties?.KeyPolicy?.Statement)?i.Properties.KeyPolicy.Statement:[]).some(u=>HE(u.Principal))){let u=A(s,r),c=C(u);n[r]={issues:[t(r,"KMS key has a public policy.",S("Restrict the KMS key policy to specific IAM roles or users to prevent unauthorized access.",u,"keyPolicy / admins / encryptionKey"),c?"HIGH":"CRITICAL","Security",w(i,r),"cdkInsights")]}}return n},{});var zE=new Set(["*","kms:*","kms:PutKeyPolicy"]),qE=new Set(["*","kms:*","kms:PutKeyPolicy"]),KE=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),VE=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),ZE=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},Vg=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],YE=e=>Vg(e).find(t=>zE.has(t)),JE=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(VE.has(t)){for(let r of n)if(KE.has(r))return!0}}return!1},QE=e=>{if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e.AWS;return(Array.isArray(t)?t:[t]).some(n=>{if(n==="*")return!1;if(typeof n=="string")return/:root$/.test(n);if(n&&typeof n=="object"){let r=JSON.stringify(n);return r.includes("AWS::AccountId")&&r.includes("root")}return!1})},XE=e=>e.Effect!=="Allow"||e.NotPrincipal!==void 0||!QE(e.Principal)?!1:Vg(e.Action).some(s=>qE.has(s)),eR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!ZE(e.Principal))return;let t=YE(e.Action);if(t&&!JE(e.Condition))return t},Zg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::KMS::Key")return n;let o=i.Properties?.KeyPolicy?.Statement;if(!Array.isArray(o)||o.some(XE))return n;let a=o.map(eR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Key policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This locks the account out of the KMS key \u2014 recovery requires breaking glass on the account root credentials AND scheduling a 7-30 day key deletion (which does not actually let you recover the key, just remove it). Effectively unrecoverable for any data the key has encrypted; AWS Support typically declines to intervene.`,S("Keep the auto-injected root Allow statement (CDK's defaultKeyPolicy) intact, or add an explicit Allow on Principal: { AWS: 'arn:aws:iam::<account>:root' } for Action: kms:*. Alternatively, add a NotPrincipal exemption or a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s).",c,"keyPolicy.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var Yg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Lambda::Function")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.ReservedConcurrentExecutions===void 0&&(n[r]={issues:[t(r,"Lambda function has no reserved concurrency configured.",S("Consider setting ReservedConcurrentExecutions to prevent the function from consuming all available account concurrency and to control scaling behavior.",o),u("LOW"),"Reliability",c,"cdkInsights")]}),n},{});var tR=new Set(["events.amazonaws.com","sns.amazonaws.com","s3.amazonaws.com","ses.amazonaws.com","codecommit.amazonaws.com","codepipeline.amazonaws.com","config.amazonaws.com","cloudwatch.amazonaws.com","iot.amazonaws.com","logs.amazonaws.com","pipes.amazonaws.com","scheduler.amazonaws.com","cognito-idp.amazonaws.com"]),sR=new Set(["apigateway.amazonaws.com","elasticloadbalancing.amazonaws.com","lambda.amazonaws.com"]),qc=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null){let t=e;if(typeof t.Ref=="string")return t.Ref;let s=t["Fn::GetAtt"];if(Array.isArray(s)&&typeof s[0]=="string")return s[0]}return null},nR=e=>{let t=new Map,s=(n,r)=>{t.has(n)||t.set(n,new Set),t.get(n)?.add(r)};for(let n of Object.values(e))if(n.Type==="AWS::Lambda::Permission"){let r=qc(n.Properties?.FunctionName),i=n.Properties?.Principal;if(!r||typeof i!="string")continue;tR.has(i)?s(r,"async"):sR.has(i)&&s(r,"sync")}else if(n.Type==="AWS::Lambda::EventSourceMapping"){let r=qc(n.Properties?.FunctionName);r&&s(r,"event-source")}else if(n.Type==="AWS::Lambda::EventInvokeConfig"){let r=qc(n.Properties?.FunctionName);r&&s(r,"async")}return t},Jg=(e,t,s)=>{let n=e.Resources||{},r=nR(n);return Object.entries(n).reduce((i,[o,a])=>{if(a.Type!=="AWS::Lambda::Function"||a.Properties?.DeadLetterConfig?.TargetArn)return i;let u=w(a,o),c=A(s,o),l=C(c),p=r.get(o)??new Set(["unknown"]),d=p.has("async"),m=p.has("sync"),f=p.has("event-source");return m&&!d&&!f?i:f&&!d?(i[o]={issues:[t(o,"Lambda function consumes an event source mapping without a failure destination.",S("For SQS/Kinesis/DynamoDB Streams, configure an OnFailure destination on the EventSourceMapping (DestinationConfig.OnFailure) \u2014 function-level DeadLetterConfig is for async invocations and does not apply to poll-based event sources.",c,"onFailure / deadLetterQueue (on EventSourceMapping)"),l?"LOW":"MEDIUM","Reliability",u,"cdkInsights")]},i):d?(i[o]={issues:[t(o,"Lambda function has no Dead Letter Queue configured for async invocations.",S("Configure a Dead Letter Queue (SQS or SNS) via DeadLetterConfig to capture failed async invocations for debugging, monitoring, and retry processing.",c,"deadLetterQueueEnabled / deadLetterQueue"),l?"LOW":"MEDIUM","Reliability",u,"cdkInsights")]},i):(i[o]={issues:[t(o,"Lambda function has no Dead Letter Queue configured (invocation mode could not be inferred).",S("No invocation source was detected in this template. If the function is invoked async (EventBridge, SNS, S3, etc.), configure DeadLetterConfig to capture failures. If it is invoked sync (API Gateway, ALB, direct invoke), DLQ does not apply and this finding can be suppressed.",c,"deadLetterQueueEnabled / deadLetterQueue"),"LOW","Reliability",u,"cdkInsights")]},i)},{})};var rR=/\b(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)\b/i,Qg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::Lambda::Function"){let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=Object.entries(i.Properties?.Environment?.Variables||{}).filter(([l])=>rR.test(l)).map(([l])=>t(r,`Lambda function contains sensitive environment variable: ${l}.`,S("Store sensitive environment variables in AWS Secrets Manager or SSM Parameter Store instead of plaintext environment variables.",o),u("HIGH"),"Security",w(i,r),"cdkInsights"));c.length>0&&(n[r]={issues:c})}return n},{});var Xg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::Lambda::Function"){let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=i.Properties?.MemorySize;typeof c=="number"&&c>1024&&(n[r]={issues:[t(r,"Lambda function has high memory allocation.",S("Consider reducing memory for cost savings.",o),u("MEDIUM"),"Cost Optimization",w(i,r),"cdkInsights")]})}return n},{});var iR=e=>typeof e=="string"&&/^\d{12}$/.test(e),oR=e=>{if(!e||typeof e!="object")return!1;let t=e.Ref;return typeof t=="string"&&t.endsWith("AccountId")},aR=e=>e==="*"||e===void 0,eh=e=>typeof e=="string"&&e.endsWith(".amazonaws.com"),th=e=>e?!!(e.SourceArn||e.SourceAccount||e.PrincipalOrgID||e.OrganizationId):!1,sh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=i.Type==="AWS::Lambda::Permission",a=i.Type==="AWS::Lambda::LayerVersionPermission";if(!o&&!a)return n;let u=i.Properties??{},c=u.Principal,l=[],p=w(i,r),d=A(s,r),m=C(d);return aR(c)?l.push(t(r,`${i.Type} grants public access via wildcard Principal.`,S("Set Principal to a specific AWS account ID, an AWS service principal with SourceArn/SourceAccount, or an OrganizationId. Wildcard principals make the function/layer reachable from any AWS account.",d,"permissionProps.principal"),m?"HIGH":"CRITICAL","Security",p,"cdkInsights")):o&&eh(c)&&!th(u)?l.push(t(r,"Lambda::Permission grants a service principal access without SourceArn / SourceAccount / PrincipalOrgID.",S("Constrain the service principal: set SourceArn to the specific resource that may invoke the function, or SourceAccount to your AWS account ID. Without one of these, any account using that AWS service can invoke this function (confused-deputy risk).",d,"permissionProps.sourceArn"),m?"MEDIUM":"HIGH","Security",p,"cdkInsights")):o&&!iR(c)&&!oR(c)&&!eh(c)&&!th(u)&&l.push(t(r,"Lambda::Permission has an unrecognised Principal shape with no source restriction.",S("Confirm the Principal resolves to an account ID, an org ID, or an AWS service plus a SourceArn/SourceAccount. Wildcards or unrestricted patterns expose the function publicly.",d,"permissionProps.principal"),m?"LOW":"MEDIUM","Security",p,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var cR={nodejs:"nodejs22.x","nodejs4.3":"nodejs22.x","nodejs4.3-edge":"nodejs22.x","nodejs6.10":"nodejs22.x","nodejs8.10":"nodejs22.x","nodejs10.x":"nodejs22.x","nodejs12.x":"nodejs22.x","nodejs14.x":"nodejs22.x","nodejs16.x":"nodejs22.x","nodejs18.x":"nodejs22.x","python2.7":"python3.13","python3.6":"python3.13","python3.7":"python3.13","python3.8":"python3.13","python3.9":"python3.13",java8:"java21","java8.al2":"java21",java11:"java21","dotnetcore1.0":"dotnet8","dotnetcore2.0":"dotnet8","dotnetcore2.1":"dotnet8","dotnetcore3.1":"dotnet8","dotnet5.0":"dotnet8",dotnet6:"dotnet8","ruby2.5":"ruby3.3","ruby2.7":"ruby3.3","go1.x":"provided.al2023"},nh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Lambda::Function")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=i.Properties?.Runtime;if(typeof c!="string")return n;let l=cR[c];return l&&(n[r]={issues:[t(r,`Lambda function uses deprecated runtime "${c}". This runtime has reached or is approaching end-of-life and will no longer receive security patches.`,S(`Upgrade to "${l}" for continued security patches, performance improvements, and long-term support.`,o),u("HIGH"),"Security",w(i,r),"cdkInsights")]}),n},{});var rh=(e,t,s)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::EC2::NatGateway")?Object.entries(e.Resources||{}).reduce((r,[i,o])=>{if(o.Type!=="AWS::Lambda::Function")return r;let a=A(s,i),u=C(a),c=d=>u?I(d):d,l=w(o,i),p=o.Properties?.VpcConfig;return p?.SubnetIds&&p.SubnetIds.length>0&&(r[i]={issues:[t(i,"Lambda function in VPC with NAT Gateway detected. NAT Gateway costs can accumulate quickly.",S("Evaluate if VPC attachment is necessary. Consider using VPC endpoints for AWS services to reduce NAT costs. NAT Gateway charges ~$0.045/hr plus $0.045/GB processed.",a),c("MEDIUM"),"Cost Optimization",l,"cdkInsights")]}),r},{}):{};var ih=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::MSK::Cluster")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.ClientAuthentication,d=(p?.Tls?.CertificateAuthorityArnList?.length??0)>0,m=p?.Sasl?.Scram?.Enabled===!0||p?.Sasl?.Iam?.Enabled===!0,f=p?.Unauthenticated?.Enabled===!0;return!d&&!m&&l.push(t(r,"MSK cluster does not have client authentication configured.",S("Enable SASL/SCRAM, IAM authentication, or mutual TLS for client authentication.",o),u("HIGH"),"Security",c,"cdkInsights")),f&&l.push(t(r,"MSK cluster allows unauthenticated access.",S("Disable unauthenticated access and require client authentication for all connections.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var oh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::MSK::Cluster")return n;let o=A(s,r),a=C(o),u=f=>a?I(f):f,c=w(i,r),l=[],p=i.Properties?.EncryptionInfo;p?.EncryptionAtRest?.DataVolumeKMSKeyId||l.push(t(r,"MSK cluster does not use a customer-managed KMS key for encryption at rest.",S("Specify DataVolumeKMSKeyId in EncryptionAtRest for additional control over data encryption.",o),u("LOW"),"Security",c,"cdkInsights"));let m=p?.EncryptionInTransit;return m?.ClientBroker!=="TLS"&&l.push(t(r,"MSK cluster does not enforce TLS encryption for client-broker communication.",S("Set ClientBroker to TLS in EncryptionInTransit to encrypt data between clients and brokers.",o),u("HIGH"),"Security",c,"cdkInsights")),m?.InCluster!==!0&&l.push(t(r,"MSK cluster does not have encryption enabled for inter-broker communication.",S("Set InCluster to true in EncryptionInTransit to encrypt data between brokers.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var ah=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::MSK::Cluster")return n;let o=A(s,r),a=C(o),u=h=>a?I(h):h,c=w(i,r),l=[],d=i.Properties?.LoggingInfo?.BrokerLogs,m=d?.CloudWatchLogs?.Enabled===!0,f=d?.Firehose?.Enabled===!0,g=d?.S3?.Enabled===!0;return!m&&!f&&!g&&l.push(t(r,"MSK cluster does not have broker logging configured.",S("Enable broker logs to CloudWatch, Firehose, or S3 for monitoring and troubleshooting Kafka operations.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var ch=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::OpenSearchService::Domain"&&i.Type!=="AWS::Elasticsearch::Domain")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];i.Properties?.AdvancedSecurityOptions?.Enabled!==!0&&l.push(t(r,"OpenSearch domain does not have fine-grained access control enabled.",S("Enable AdvancedSecurityOptions to use IAM or internal user database for document-level and field-level security.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let d=i.Properties?.VPCOptions;return(!d?.SubnetIds||d.SubnetIds.length===0)&&l.push(t(r,"OpenSearch domain is not deployed within a VPC.",S("Configure VPCOptions with subnet IDs to deploy the domain within a VPC for network isolation.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var uh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::OpenSearchService::Domain"&&i.Type!=="AWS::Elasticsearch::Domain")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.EncryptionAtRestOptions?.Enabled!==!0&&l.push(t(r,"OpenSearch domain does not have encryption at rest enabled.",S("Enable EncryptionAtRestOptions to protect indexed data at rest using AWS KMS.",o),u("HIGH"),"Security",c,"cdkInsights")),i.Properties?.NodeToNodeEncryptionOptions?.Enabled!==!0&&l.push(t(r,"OpenSearch domain does not have node-to-node encryption enabled.",S("Enable NodeToNodeEncryptionOptions to encrypt data in transit between nodes within the cluster.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var lh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::OpenSearchService::Domain"&&i.Type!=="AWS::Elasticsearch::Domain")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[],p=i.Properties?.LogPublishingOptions;return p?.AUDIT_LOGS?.Enabled||l.push(t(r,"OpenSearch domain does not have audit logging enabled.",S("Enable AUDIT_LOGS in LogPublishingOptions to track user activity for security and compliance monitoring.",o),u("LOW"),"Security",c,"cdkInsights")),p?.ES_APPLICATION_LOGS?.Enabled||l.push(t(r,"OpenSearch domain does not have application logging enabled.",S("Enable ES_APPLICATION_LOGS in LogPublishingOptions to capture error logs for troubleshooting.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var ph=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=w(i,r),a=i.Properties?.BackupRetentionPeriod,u=A(s,r),c=C(u),l=p=>c?I(p):p;return a===0?n[r]={issues:[t(r,"RDS instance has automated backups disabled (BackupRetentionPeriod is 0).",S("Enable automated backups with at least 7 days retention for production databases to enable point-in-time recovery.",u,"backupRetention"),l("HIGH"),"Reliability",o,"cdkInsights")]}:a!==void 0&&a<7&&(n[r]={issues:[t(r,`RDS backup retention period is only ${a} day(s).`,S("Consider increasing backup retention to at least 7 days for production databases.",u,"backupRetention"),l("MEDIUM"),"Reliability",o,"cdkInsights")]}),n},{});var dh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=w(i,r);return i.Properties?.DeletionProtection!==!0&&(n[r]={issues:[t(r,"RDS instance does not have deletion protection enabled.",S("Enable DeletionProtection to prevent accidental database deletion.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")]}),n},{});var mh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::RDS::DBInstance"&&i.Properties?.StorageEncrypted!==!0){let o=A(s,r),a=C(o);n[r]={issues:[t(r,"RDS instance is not encrypted.",S("Enable encryption to protect data at rest and meet compliance standards.",o,"storageEncrypted / storageEncryptionKey"),a?"HIGH":"CRITICAL","Security",w(i,r),"cdkInsights")]}}return n},{});var uR=new Set(["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]),fh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(!uR.has(i.Type))return n;let o=i.Properties?.EnableCloudwatchLogsExports;if(Array.isArray(o)&&o.length>0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"RDS database does not export logs to CloudWatch.",S("Set EnableCloudwatchLogsExports to the relevant log types for the engine (e.g. ['error','general','slowquery'] for MySQL, ['postgresql'] for PostgreSQL, ['audit','error','general','slowquery'] for MariaDB).",u,"databaseProps.cloudwatchLogsExports"),c?"LOW":"MEDIUM","Security",a,"cdkInsights")]},n},{});var lR=new Set([1,5,10,15,30,60]),gh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=i.Properties?.MonitoringInterval,a=typeof o=="number"?o:typeof o=="string"?Number.parseInt(o,10):void 0;if(typeof a=="number"&&lR.has(a))return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"RDS Instance does not have enhanced monitoring enabled.",S("Set MonitoringInterval to 1, 5, 10, 15, 30, or 60 (seconds) and provide MonitoringRoleArn so RDS can publish OS-level metrics to CloudWatch Logs.",c,"databaseProps.monitoringInterval"),l?"LOW":"MEDIUM","Operational Excellence",u,"cdkInsights")]},n},{});var hh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=i.Properties??{},l=c.MultiAZ===!0,p=c.StorageType==="gp2",d=typeof c.StorageType>"u";return l&&(p||d)&&(n[r]={issues:[t(r,p?"RDS instance is using Multi-AZ with gp2 storage. Consider gp3 for lower costs.":"RDS instance is using Multi-AZ without explicitly setting a storage type. gp3 may offer better performance and cost savings.",S("Switch to gp3 storage for RDS to reduce costs and improve performance.",o),u("MEDIUM"),"Cost Optimization",w(i,r),"cdkInsights")]}),n},{});var yh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=w(i,r);return i.Properties?.PubliclyAccessible===!0&&(n[r]={issues:[t(r,"RDS instance is publicly accessible from the internet.",S("Set PubliclyAccessible to false and access the database through private subnets, bastion hosts, or VPN. If public access is intentional (e.g. a dev or staging database with restricted security groups), suppress this rule for the resource.",o),u("HIGH"),"Security",c,"cdkInsights")]}),n},{});var Sh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Redshift::Cluster")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[];return i.Properties?.Encrypted!==!0&&l.push(t(r,"Redshift cluster does not have encryption at rest enabled.",S("Set Encrypted to true and specify a KmsKeyId to protect data at rest.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var bh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Redshift::Cluster")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.LoggingProperties?.BucketName||(n[r]={issues:[t(r,"Redshift cluster does not have audit logging enabled.",S("Configure LoggingProperties with an S3 bucket to capture connection logs, user activity, and query activity.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Dh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Redshift::Cluster")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.PubliclyAccessible===!0&&(n[r]={issues:[t(r,"Redshift cluster is publicly accessible.",S("Set PubliclyAccessible to false and use VPC endpoints or bastion hosts for secure access. If public access is intentional (e.g. analytics tooling or customer-facing dashboards) ensure security groups restrict the source CIDRs and suppress this rule for the resource.",o),u("HIGH"),"Security",c,"cdkInsights")]}),n},{});var vh=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::HostedZone"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::DNSSEC"),i=new Set(r.map(([,o])=>{let a=o.Properties?.HostedZoneId;return typeof a=="string"?a:a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{if(u.Properties?.HostedZoneConfig?.Comment?.includes("private"))return o;let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"Route53 Hosted Zone does not have DNSSEC signing enabled.",S("Enable DNSSEC to protect against DNS spoofing and cache poisoning attacks by cryptographically signing DNS records.",p),m("LOW"),"Security",c,"cdkInsights")]}}return o},{})};var Ch=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Route53::HealthCheck")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[],p=i.Properties?.HealthCheckConfig;return p?.Type==="HTTP"&&l.push(t(r,"Route53 Health Check uses HTTP instead of HTTPS.",S("Use HTTPS for health checks to ensure the endpoint supports secure connections and to validate SSL certificates.",o),u("LOW"),"Security",c,"cdkInsights")),p?.RequestInterval===30&&l.push(t(r,"Route53 Health Check uses standard (30 second) request interval.",S("Consider using fast interval (10 seconds) for critical endpoints to detect failures more quickly.",o),u("LOW"),"Reliability",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Ah=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::HostedZone"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::QueryLoggingConfig"),i=new Set(r.map(([,o])=>{let a=o.Properties?.HostedZoneId;return typeof a=="string"?a:a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"Route53 Hosted Zone does not have query logging enabled.",S("Enable query logging to CloudWatch Logs for DNS query analysis, troubleshooting, and security monitoring.",p),m("LOW"),"Security",c,"cdkInsights")]}}return o},{})};var xh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket")return n;let o=[],a=i.Properties??{},u=w(i,r),c=A(s,r),l=C(c);a.BucketEncryption||o.push(t(r,"S3 Bucket lacks encryption.",S("Enable encryption at rest for better security.",c,"bucketProps.encryption"),l?"MEDIUM":"HIGH","Security",u,"cdkInsights"));let p=a?.PublicAccessBlockConfiguration;return p?(p.BlockPublicAcls===!1&&o.push(t(r,"S3 Bucket allows public ACLs (BlockPublicAcls is false).","Set BlockPublicAcls to true to prevent public ACLs from being applied.","CRITICAL","Security",u,"cdkInsights")),p.BlockPublicPolicy===!1&&o.push(t(r,"S3 Bucket allows public bucket policies (BlockPublicPolicy is false).","Set BlockPublicPolicy to true to prevent public bucket policies.","CRITICAL","Security",u,"cdkInsights")),p.IgnorePublicAcls===!1&&o.push(t(r,"S3 Bucket does not ignore public ACLs (IgnorePublicAcls is false).","Set IgnorePublicAcls to true to ignore any public ACLs on the bucket.","HIGH","Security",u,"cdkInsights")),p.RestrictPublicBuckets===!1&&o.push(t(r,"S3 Bucket does not restrict public bucket access (RestrictPublicBuckets is false).","Set RestrictPublicBuckets to true to restrict access to the bucket to only authorized users.","HIGH","Security",u,"cdkInsights"))):o.push(t(r,"S3 Bucket has no PublicAccessBlockConfiguration defined.","Configure PublicAccessBlockConfiguration with BlockPublicAcls, BlockPublicPolicy, IgnorePublicAcls, and RestrictPublicBuckets all set to true.","HIGH","Security",u,"cdkInsights")),a.VersioningConfiguration||o.push(t(r,"S3 Bucket has no versioning enabled.","Enable versioning to protect against accidental deletions.","MEDIUM","Operational Excellence",u,"cdkInsights")),o.length>0&&(n[r]={issues:o}),n},{});var pR=new Set(["*","s3:*","s3:DeleteBucket","s3:DeleteBucketPolicy","s3:PutBucketPolicy"]),dR=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),mR=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),fR=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},gR=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],hR=e=>gR(e).find(t=>pR.has(t)),yR=e=>e===!1||e==="false"||e==="False",SR=e=>{if(e==null)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;for(let s of t){if(typeof s!="string"||s==="*")return!0;let n=s.split(":::")[1];if(n===void 0||!n.includes("/"))return!0}return!1},bR=e=>{let t=e.Condition;if(!t||typeof t!="object")return!1;let s=t.Bool??t.BoolIfExists;return s?yR(s["aws:SecureTransport"]):!1},DR=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(mR.has(t)){for(let r of n)if(dR.has(r))return!0}}return!1},vR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!fR(e.Principal))return;let t=hR(e.Action);if(t&&!bR(e)&&!DR(e.Condition)&&SR(e.Resource))return t},wh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::BucketPolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(!Array.isArray(o))return n;let a=o.map(vR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Bucket policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This will lock the account out of the bucket \u2014 recovery requires breaking glass on the account root credentials to remove the bucket policy. AWS Support will typically not intervene for this scenario.`,S("Add a NotPrincipal exemption for the account root (e.g. arn:aws:iam::<account>:root) or use a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s). If the Deny is intended for transport security, scope it with aws:SecureTransport rather than a blanket Deny on Principal: '*'.",c,"bucketPolicyProps.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var CR=e=>e===!1||e==="false"||e==="False",AR=e=>{if(e.Effect!=="Deny")return!1;let t=e.Condition;if(!t||typeof t!="object")return!1;let s=t.Bool??t.BoolIfExists;return s?CR(s["aws:SecureTransport"]):!1},Eh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::BucketPolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(Array.isArray(o)&&o.some(AR))return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"S3 BucketPolicy does not deny non-SSL/TLS requests.",S("Add a Deny statement with Condition.Bool['aws:SecureTransport']=false to enforce TLS for all S3 access. CIS AWS Foundations 2.1.1 and PCI-DSS require encrypted-in-transit requests.",c,"bucketPolicyProps.statements"),l?"MEDIUM":"HIGH","Security",u,"cdkInsights")]},n},{});var Rh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r);return(i.Properties?.LifecycleConfiguration?.Rules||[]).length===0&&(n[r]={issues:[t(r,"S3 bucket has no lifecycle policy configured.",S("Configure lifecycle rules to automatically transition objects to cheaper storage classes (e.g., Glacier) or delete old versions to optimize storage costs.",o),u("MEDIUM"),"Cost Optimization",c,"cdkInsights")]}),n},{});var Fh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket"||(i.Properties??{}).LoggingConfiguration?.DestinationBucketName)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"S3 Bucket has no access logging configured.",S("Set LoggingConfiguration.DestinationBucketName to capture object-level access logs in a separate bucket. Required by CIS AWS Foundations 2.1.2 and useful for incident forensics.",c,"bucketProps.serverAccessLogsBucket"),l?"LOW":"MEDIUM","Security",u,"cdkInsights")]},n},{});var xR=/\b(prod|production|critical|backup|dr|disaster|recovery|primary)\b/i,Ih=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=i.Properties?.BucketName||r,p=i.Properties?.ReplicationConfiguration;return xR.test(l)&&!p?.Rules?.length&&(n[r]={issues:[t(r,"Critical S3 bucket does not have cross-region replication configured.",S("Consider enabling cross-region replication for disaster recovery and data durability on production/critical buckets.",o),u("LOW"),"Reliability",c,"cdkInsights")]}),n},{});var kh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::S3::Bucket"&&!i.Properties?.IntelligentTieringConfigurations){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"S3 Bucket does not use Intelligent-Tiering. Consider enabling it for cost optimization.",S("Enable Intelligent-Tiering for automatic cost optimization of infrequently accessed objects.",o),u("LOW"),"Cost Optimization",w(i,r),"cdkInsights")]}}return n},{});var Th=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=i.Properties??{};if(i.Type==="AWS::SecretsManager::Secret"&&o.PublicPolicy){let a=A(s,r),u=C(a),c=l=>u?I(l):l;n[r]={issues:[t(r,"Secret is publicly accessible.",S("Restrict secret access using IAM policies to ensure only authorized entities can retrieve it.",a),c("CRITICAL"),"Security",w(i,r),"cdkInsights")]}}return n},{});var Ph=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::SNS::Topic"&&!i.Properties?.KmsMasterKeyId){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"SNS topic is not encrypted.",S("Enable AWS KMS encryption for SNS to protect sensitive messages in transit and at rest.",o),u("HIGH"),"Security",w(i,r),"cdkInsights")]}}return n},{});var wR=new Set(["*","sns:*","sns:DeleteTopic","sns:RemovePermission"]),ER=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),RR=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),FR=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},IR=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],kR=e=>IR(e).find(t=>wR.has(t)),TR=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(RR.has(t)){for(let r of n)if(ER.has(r))return!0}}return!1},PR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!FR(e.Principal))return;let t=kR(e.Action);if(t&&!TR(e.Condition))return t},Lh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::SNS::TopicPolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(!Array.isArray(o))return n;let a=o.map(PR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Topic policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This locks the account out of the topic \u2014 recovery requires breaking glass on the account root credentials to remove the topic policy, or delete-and-recreate the topic if no subscribers depend on its ARN. In fan-out architectures that's often a multi-stack rebuild.`,S("Add a NotPrincipal exemption for the account root (e.g. arn:aws:iam::<account>:root) or use a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s). If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'.",c,"topicPolicyProps.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var _h=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=!!i.Properties?.KmsMasterKeyId,a=i.Properties?.SqsManagedSseEnabled===!0;if(i.Type==="AWS::SQS::Queue"&&!o&&!a){let u=A(s,r),c=C(u),l=p=>c?I(p):p;n[r]={issues:[t(r,"SQS queue is not encrypted.",S("Enable AWS KMS encryption for SQS to protect message data in transit and at rest.",u),l("HIGH"),"Security",w(i,r),"cdkInsights")]}}return n},{});var LR=new Set(["*","sqs:*","sqs:DeleteQueue","sqs:RemovePermission"]),_R=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),OR=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),BR=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},MR=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],NR=e=>MR(e).find(t=>LR.has(t)),WR=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(OR.has(t)){for(let r of n)if(_R.has(r))return!0}}return!1},UR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!BR(e.Principal))return;let t=NR(e.Action);if(t&&!WR(e.Condition))return t},Oh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::SQS::QueuePolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(!Array.isArray(o))return n;let a=o.map(UR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Queue policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This locks the account out of the queue \u2014 recovery requires breaking glass on the account root credentials to remove the queue policy, or delete-and-recreate the queue if nothing else depends on its ARN. In event-driven systems that's often a multi-stack rebuild.`,S("Add a NotPrincipal exemption for the account root (e.g. arn:aws:iam::<account>:root) or use a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s). If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'.",c,"queuePolicyProps.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var Bh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::StepFunctions::StateMachine"&&i.Properties?.LoggingConfiguration===void 0){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"Step Function lacks logging configuration.",S("Enable logging for the Step Function using AWS CloudWatch to improve monitoring and debugging.",o),u("HIGH"),"Security",w(i,r),"cdkInsights")]}}return n},{});var Mh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::SecurityGroup")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);if(i.Properties?.GroupName==="default"){let p=i.Properties?.SecurityGroupIngress||[],d=i.Properties?.SecurityGroupEgress||[];(p.length>0||d.length>0)&&(n[r]={issues:[t(r,"VPC default security group has rules configured.",S("Remove all rules from the default security group and use custom security groups instead. Default groups cannot be deleted but should have no rules.",o),u("MEDIUM"),"Security",c,"cdkInsights")]})}return n},{});var Nh=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::EC2::VPC"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::EC2::FlowLog"),i=new Set(r.filter(([,o])=>o.Properties?.ResourceType==="VPC").map(([,o])=>{let a=o.Properties?.ResourceId;return typeof a=="string"?a:a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"VPC does not have flow logs enabled.",S("Enable VPC Flow Logs to capture network traffic information for security analysis and troubleshooting.",p),m("MEDIUM"),"Security",c,"cdkInsights")]}}return o},{})};var Wh=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::WAFv2::WebACL"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::WAFv2::LoggingConfiguration"),i=new Set(r.map(([,o])=>{let a=o.Properties?.ResourceArn;return typeof a=="string"?a:a?.Ref?a.Ref:a?.["Fn::GetAtt"]?.[0]?a["Fn::GetAtt"][0]:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!(i.has(a)||r.some(([,p])=>{let d=p.Properties?.ResourceArn;return typeof d=="object"&&(d?.Ref===a||d?.["Fn::GetAtt"]?.[0]===a)}))){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"WAF WebACL does not have logging configured.",S("Enable WAF logging to capture detailed information about web requests for security analysis and compliance.",p),m("MEDIUM"),"Security",c,"cdkInsights")]}}return o},{})};var Uh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::WAFv2::WebACL")return n;let o=A(s,r),a=C(o),u=f=>a?I(f):f,c=w(i,r),l=[],p=i.Properties?.DefaultAction;p?.Allow&&!p?.Block&&l.push(t(r,"WAF WebACL has default action set to Allow, which permits all traffic not matching rules.",S("Consider setting the default action to Block and explicitly allowing known-good traffic patterns for defense-in-depth.",o),u("MEDIUM"),"Security",c,"cdkInsights")),i.Properties?.VisibilityConfig?.CloudWatchMetricsEnabled||l.push(t(r,"WAF WebACL does not have CloudWatch metrics enabled.",S("Enable CloudWatchMetricsEnabled in VisibilityConfig to monitor WAF activity and detect potential attacks.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let m=i.Properties?.Rules;return(!m||m.length===0)&&l.push(t(r,"WAF WebACL has no rules defined.",S("Add WAF rules to protect against common web exploits like SQL injection, XSS, and bot traffic.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var jR=e=>Object.values(e.Resources||{}).some(t=>t.Type==="Custom::S3BucketNotifications"),jh=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::EventSourceMapping"),$h=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Events::Rule"),Gh=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type!=="AWS::ElasticLoadBalancingV2::Listener"?!1:(s.Properties?.DefaultActions||s.Properties?.Actions)?.some(r=>r.TargetGroupArn?.startsWith(t))),$R=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::Permission"&&t.Properties?.Principal==="apigateway.amazonaws.com"),ro=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type==="AWS::ApiGateway::Integration"&&typeof s.Properties?.Uri=="string"&&s.Properties.Uri.includes(t)),jr=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type==="AWS::IoT::TopicRule"&&s.Properties?.TopicRulePayload?.actions?.some(n=>Object.hasOwn(n,t))),GR=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::ECS::Service"),Hh=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type==="AWS::SNS::Subscription"&&s.Properties?.Protocol===t),zh=(e,t)=>{let s=[],n={},r={};for(let[o,a]of Object.entries(t)){let u=a.requiredResourceTypes||[];if(u.length!==0){r[o]=u.length;for(let c of u)n[c]||(n[c]=[]),n[c].push(o)}}let i={};for(let o of Object.values(e.Resources||{})){let a=o.Type,u=n[a];if(u){for(let c of u)if(i[c]=(i[c]||0)+1,i[c]===r[c]){let l=t[c],p=!0;switch(c){case"aws-s3-lambda":p=jR(e)||jh(e);break;case"aws-dynamodbstreams-lambda":p=jh(e);break;case"aws-eventbridge-lambda":p=$h(e);break;case"aws-alb-fargate":p=Gh(e,"arn:aws:ecs:");break;case"aws-alb-lambda":p=Gh(e,"arn:aws:lambda:");break;case"aws-apigateway-lambda":p=$R(e);break;case"aws-apigateway-sqs":p=ro(e,"sqs");break;case"aws-apigateway-dynamodb":p=ro(e,"dynamodb");break;case"aws-apigateway-kinesisstreams":p=ro(e,"kinesis");break;case"aws-apigateway-sagemakerendpoint":p=ro(e,"sagemaker");break;case"aws-iot-lambda":p=jr(e,"lambda");break;case"aws-iot-kinesisstreams":p=jr(e,"kinesis");break;case"aws-iot-kinesisfirehose-s3":p=jr(e,"firehose");break;case"aws-iot-sqs":p=jr(e,"sqs");break;case"aws-iot-s3":p=jr(e,"s3");break;case"aws-sns-lambda":p=Hh(e,"lambda");break;case"aws-sns-sqs":p=Hh(e,"sqs");break;case"aws-fargate-dynamodb":case"aws-fargate-eventbridge":case"aws-fargate-kinesisfirehose":case"aws-fargate-kinesisstreams":case"aws-fargate-opensearch":case"aws-fargate-s3":case"aws-fargate-secretsmanager":case"aws-fargate-sns":case"aws-fargate-sqs":case"aws-fargate-ssmstringparameter":case"aws-fargate-stepfunctions":p=GR(e);break;case"aws-eventbridge-kinesisfirehose-s3":case"aws-eventbridge-kinesisstreams":case"aws-eventbridge-sns":case"aws-eventbridge-sqs":case"aws-eventbridge-stepfunctions":p=$h(e);break}if(!p)continue;s.push({resourceId:l.className,issue:`Possible Pattern detected: ${l.friendlyName}`,recommendation:`Consider using the AWS Solutions Construct \`${l.className}\` from \`@aws-solutions-constructs/${c}\`.`,severity:"LOW",wafPillar:"Operational Excellence",docUrl:l.documentationUrl,githubUrl:l.githubUrl,constructPath:l.className,foundBy:"cdkInsights"}),delete r[c]}}}return s};var qh=()=>({iamPolicies:jg,iamPermissionBoundary:$g,iamCrossAccountTrust:Ug,iamUserPolicies:Hg,s3Buckets:xh,s3BucketLogging:Fh,s3BucketPolicySsl:Eh,s3BucketPolicySelfLockout:wh,s3IntelligentTiering:kh,s3LifecyclePolicy:Rh,s3Replication:Ih,securityGroups:gg,ec2InstanceType:dg,ec2PublicIp:fg,ec2SubnetAutoPublicIp:hg,natGatewayUsage:mg,ebsVolumes:ag,lambdaEnvironmentVariables:Qg,lambdaMemory:Xg,lambdaReservedConcurrency:Yg,lambdaDeadLetterQueue:Jg,lambdaRuntime:nh,lambdaVpcNatWarning:rh,lambdaPermission:sh,rdsEncryption:mh,rdsMultiAZ:hh,rdsPublicAccess:yh,rdsBackupRetention:ph,rdsDeletionProtection:dh,rdsLogging:fh,rdsEnhancedMonitoring:gh,dynamoDBAutoScaling:ig,dynamoDBStreams:og,dynamoDBPitr:rg,dynamoDBEncryption:ng,cloudFrontHttpsOnly:qf,cloudFrontWafAssociation:Zf,cloudFrontLogging:Kf,cloudFrontTls:Vf,elbDeletionProtection:Rg,elbLogging:Ig,elbHttpsListeners:Fg,elbSecurityPolicy:kg,ecsSecrets:Ag,ecsLogging:Dg,ecsServiceConnectLogs:vg,ecsResources:Cg,cognitoPasswordPolicy:tg,cognitoMfa:eg,cognitoAdvancedSecurity:sg,wafWebAcl:Uh,wafLogging:Wh,cloudWatchLogRetention:Xf,cloudWatchEncryption:Qf,cloudWatchAlarms:Jf,route53Dnssec:vh,route53HealthChecks:Ch,route53QueryLogging:Ah,elastiCacheEncryption:Pg,elastiCacheAuth:Tg,elastiCacheFailover:Lg,ecrScanning:bg,ecrLifecycle:Sg,ecrImmutableTags:yg,openSearchEncryption:uh,openSearchAccessControl:ch,openSearchLogging:lh,acmValidation:Nf,backupPlans:Hf,backupVault:zf,vpcFlowLogs:Nh,vpcDefaultSecurityGroup:Mh,kinesisEncryption:zg,kinesisRetention:qg,appSyncAuth:jf,appSyncLogging:$f,appSyncWaf:Gf,eksPublicEndpoint:Eg,eksEncryption:xg,eksLogging:wg,redshiftEncryption:Sh,redshiftPublicAccess:Dh,redshiftLogging:bh,mskEncryption:oh,mskAuth:ih,mskLogging:ah,glueEncryption:Mg,glueConnections:Bg,efsEncryption:cg,autoScalingGroupHealthCheck:lg,autoScalingLaunchConfigPublicIp:pg,apiGateway:Wf,apiGatewayMethodAuth:Uf,secretsManager:Th,cloudTrailLogging:Yf,eventBridgeRules:_g,eventBusPolicy:Og,kmsKeys:Kg,kmsKeyPolicySelfLockout:Zg,sns:Ph,snsTopicPolicySelfLockout:Lh,sqs:_h,sqsQueuePolicySelfLockout:Oh,stepFunctions:Bh,crossResourceRelationships:to,stackArchitecture:so,solutionsPatterns:zh});var $r=(e={})=>{let{ttl:t=3e5,maxSize:s=1e3}=e,n=new Map,r=new Set,i=[],o=Date.now(),a=6e4,u=m=>Date.now()-m.timestamp>m.ttl,c=m=>{r.delete(m)},l=()=>{let m=0;for(let f=0;f<i.length;f++)r.has(i[f])&&(i[m++]=i[f]);i.length=m},p=()=>{let m=Date.now();if(m-o<a)return;o=m;let f=[];for(let[g,h]of n.entries())u(h)&&f.push(g);for(let g of f)n.delete(g),c(g);f.length>0&&l()},d=()=>{for(;n.size>=s&&i.length>0;){let m=i.shift();m&&r.has(m)&&(n.delete(m),r.delete(m))}};return{get(m){let f=n.get(m);if(f){if(u(f)){n.delete(m),c(m);return}return f.value}},set(m,f,g){n.size>=s*.9&&p(),d(),r.has(m)&&c(m),n.set(m,{value:f,timestamp:Date.now(),ttl:g??t}),r.add(m),i.push(m)},clear(){n.clear(),r.clear(),i.length=0},size(){return n.size},has(m){let f=n.get(m);return f?u(f)?(n.delete(m),c(m),!1):!0:!1}}},Kh=(e,t={})=>{let s=$r(t);return(...n)=>{let r;try{r=JSON.stringify(n)}catch{return e(...n)}let i=s.get(r);if(i!==void 0)return i;let o=e(...n);return s.set(r,o),o}};var Vh={IAM:["iamPolicies","iamPermissionBoundary","iamCrossAccountTrust","iamUserPolicies"],S3:["s3Buckets","s3BucketLogging","s3BucketPolicySsl","s3BucketPolicySelfLockout","s3IntelligentTiering","s3LifecyclePolicy","s3Replication"],Lambda:["lambdaEnvironmentVariables","lambdaMemory","lambdaReservedConcurrency","lambdaDeadLetterQueue","lambdaRuntime","lambdaVpcNatWarning","lambdaPermission"],DynamoDB:["dynamoDBAutoScaling","dynamoDBStreams","dynamoDBPitr","dynamoDBEncryption"],RDS:["rdsEncryption","rdsMultiAZ","rdsPublicAccess","rdsBackupRetention","rdsDeletionProtection","rdsLogging","rdsEnhancedMonitoring"],EC2:["ec2InstanceType","natGatewayUsage","securityGroups","ebsVolumes","ec2PublicIp","ec2SubnetAutoPublicIp"],SNS:["sns","snsTopicPolicySelfLockout"],SQS:["sqs","sqsQueuePolicySelfLockout"],StepFunctions:["stepFunctions"],CloudTrail:["cloudTrailLogging"],ApiGateway:["apiGateway","apiGatewayMethodAuth"],SecretsManager:["secretsManager"],KMS:["kmsKeys","kmsKeyPolicySelfLockout"],EventBridge:["eventBridgeRules","eventBusPolicy"],CloudFront:["cloudFrontHttpsOnly","cloudFrontWafAssociation","cloudFrontLogging","cloudFrontTls"],ELB:["elbDeletionProtection","elbLogging","elbHttpsListeners","elbSecurityPolicy"],ECS:["ecsSecrets","ecsLogging","ecsServiceConnectLogs","ecsResources"],Cognito:["cognitoPasswordPolicy","cognitoMfa","cognitoAdvancedSecurity"],WAF:["wafWebAcl","wafLogging"],CloudWatch:["cloudWatchLogRetention","cloudWatchEncryption","cloudWatchAlarms"],Route53:["route53Dnssec","route53HealthChecks","route53QueryLogging"],ElastiCache:["elastiCacheEncryption","elastiCacheAuth","elastiCacheFailover"],ECR:["ecrScanning","ecrLifecycle","ecrImmutableTags"],OpenSearch:["openSearchEncryption","openSearchAccessControl","openSearchLogging"],ACM:["acmValidation"],Backup:["backupPlans","backupVault"],VPC:["vpcFlowLogs","vpcDefaultSecurityGroup"],Kinesis:["kinesisEncryption","kinesisRetention"],AppSync:["appSyncAuth","appSyncLogging","appSyncWaf"],EKS:["eksPublicEndpoint","eksEncryption","eksLogging"],Redshift:["redshiftEncryption","redshiftPublicAccess","redshiftLogging"],MSK:["mskEncryption","mskAuth","mskLogging"],Glue:["glueEncryption","glueConnections"],EFS:["efsEncryption"],AutoScaling:["autoScalingGroupHealthCheck","autoScalingLaunchConfigPublicIp"]},HR=Object.entries(Vh).reduce((e,[t,s])=>{for(let n of s)e[n]=t;return e},{}),Kc=e=>{let t=new Set,s=[];for(let n of e)t.has(n)||(t.add(n),s.push(n));return s},Zh=e=>{if(!e||e.length===0)return{services:["All services"],removedAllServices:!1,defaultedToAll:!0};let t=Kc(e),s=t.includes("All services"),n=t.filter(r=>r!=="All services");return s&&n.length>0?{services:n,removedAllServices:!0,defaultedToAll:!1}:{services:s?["All services"]:t,removedAllServices:!1,defaultedToAll:!1}},Yh=(e,t)=>{if(e.length===0||e.includes("All services"))return Kc(t);let s=e.flatMap(n=>n==="All services"?t:Vh[n]??[]);return Kc(s)},Gr=e=>HR[e];var Vt=Z(hs()),er=process.env.NODE_ENV==="development",yu=process.env.CDK_INSIGHTS_VERBOSE==="true",lT=er||yu||process.env.CDK_INSIGHTS_ENABLE_LOGGING==="true",oS=yu?Vt.LogLevel.DEBUG:er?Vt.LogLevel.INFO:Vt.LogLevel.ERROR,pT=lT?[(0,Vt.createConsoleTransport)({formatter:(0,Vt.createJsonFormatter)(),level:oS,useColors:!er})]:[],ue=(0,Vt.createLogger)({config:{level:oS,serviceName:"cdk-insights",stage:er?"dev":"prod"},formatter:(0,Vt.createJsonFormatter)(),transports:pT,env:{STAGE:er?"dev":"prod",LOG_LEVEL:yu?"DEBUG":er?"INFO":"ERROR"}}),tr=e=>({debug:(t,s,n)=>ue.debug(t,{component:e,...s},n),info:(t,s,n)=>ue.info(t,{component:e,...s},n),warn:(t,s,n,r)=>ue.warn(t,{component:e,...s},n,r),error:(t,s,n,r)=>ue.error(t,{component:e,...s},n,r)}),st=tr("cli"),ye=tr("analysis"),V8=tr("license"),Ls=tr("cache"),Ro=tr("github"),qe=tr("aspect");function Jr(e,t){let s=t.split("."),n=e;for(let r of s){if(n==null||typeof n!="object")return;n=n[r]}return n}function Su(e,t){switch(e.type){case"property_exists":{let s=Jr(t,e.path),n=s!=null;return e.negate?!n:n}case"property_equals":{let s=Jr(t,e.path),n=JSON.stringify(s)===JSON.stringify(e.value);return e.negate?!n:n}case"property_matches":{let s=Jr(t,e.path);if(typeof s!="string")return!!e.negate;let n=new RegExp(e.pattern).test(s);return e.negate?!n:n}case"property_gt":{let s=Jr(t,e.path);return typeof s!="number"?!1:s>e.value}case"property_lt":{let s=Jr(t,e.path);return typeof s!="number"?!1:s<e.value}case"and":return e.conditions.every(s=>Su(s,t));case"or":return e.conditions.some(s=>Su(s,t));default:return!1}}function aS(e,t,s){if(t.length===0)return{};let n={};for(let[r,i]of Object.entries(e.Resources||{}))for(let o of t)if(o.resourceTypes.some(u=>u.endsWith("*")?i.Type.startsWith(u.slice(0,-1)):i.Type===u))try{if(Su(o.condition,i)){let c=s(r,`[${o.ruleId}] ${o.description}`,o.recommendation,o.severity,o.wafPillar,"","cdkInsights");c.ruleId=o.ruleId,n[r]||(n[r]={issues:[]}),n[r].issues.push(c)}}catch(u){ye.warn(`Error evaluating custom rule '${o.ruleId}' on resource '${r}'`,{error:u instanceof Error?u.message:String(u)})}return n}var sr={"iam-policies-overly-permissive":{ruleId:"iam-policies-overly-permissive",checkKey:"iamPolicies",name:"IAM Overly Permissive Policies",description:"Detects IAM policies with overly permissive actions like * wildcards.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Review IAM policies for overly broad permissions","Replace wildcard (*) actions with specific actions","Use IAM Access Analyzer to identify unused permissions"],resourceTypes:["AWS::IAM::Policy","AWS::IAM::Role","AWS::IAM::ManagedPolicy"]},"iam-permission-boundary-missing":{ruleId:"iam-permission-boundary-missing",checkKey:"iamPermissionBoundary",name:"IAM Permission Boundary Missing",description:"Detects IAM roles without permission boundaries.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html",complianceFrameworks:["SOC2","CIS","NIST"],remediationSteps:["Create a permission boundary policy","Attach the permission boundary to IAM roles"],resourceTypes:["AWS::IAM::Role"]},"iam-cross-account-trust":{ruleId:"iam-cross-account-trust",checkKey:"iamCrossAccountTrust",name:"IAM Cross-Account Trust",description:"Detects IAM roles with cross-account trust relationships.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Verify cross-account trust is intentional","Add conditions to restrict access (e.g., external ID)","Document the business justification"],resourceTypes:["AWS::IAM::Role"]},"iam-user-direct-policies":{ruleId:"iam-user-direct-policies",checkKey:"iamUserPolicies",name:"IAM User Direct Policies",description:"Detects IAM Users with policies attached directly (inline Policies or ManagedPolicyArns). CIS AWS Foundations 1.15 requires users to inherit permissions through groups.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#use-groups-for-permissions",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Create an IAM Group with the required policies","Add the user to the group instead of attaching policies directly","Remove Policies and ManagedPolicyArns from AWS::IAM::User resources"],resourceTypes:["AWS::IAM::User"]},"s3-bucket-public-access":{ruleId:"s3-bucket-public-access",checkKey:"s3Buckets",name:"S3 Bucket Public Access",description:"Detects S3 buckets with public access enabled.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable S3 Block Public Access settings","Review bucket policies for public access","Use VPC endpoints for private access"],resourceTypes:["AWS::S3::Bucket"]},"s3-intelligent-tiering":{ruleId:"s3-intelligent-tiering",checkKey:"s3IntelligentTiering",name:"S3 Intelligent Tiering",description:"Recommends S3 Intelligent Tiering for cost optimization.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html",remediationSteps:["Enable S3 Intelligent-Tiering for buckets with varying access patterns","Configure archive access tiers for infrequently accessed data"],resourceTypes:["AWS::S3::Bucket"]},"s3-lifecycle-policy-missing":{ruleId:"s3-lifecycle-policy-missing",checkKey:"s3LifecyclePolicy",name:"S3 Lifecycle Policy Missing",description:"Detects S3 buckets without lifecycle policies.",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html",remediationSteps:["Create lifecycle rules to transition objects to cheaper storage classes","Set expiration rules for temporary data","Use lifecycle rules to delete incomplete multipart uploads"],resourceTypes:["AWS::S3::Bucket"]},"s3-replication-missing":{ruleId:"s3-replication-missing",checkKey:"s3Replication",name:"S3 Replication Missing",description:"Detects critical S3 buckets without cross-region replication.",severity:"LOW",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html",remediationSteps:["Enable cross-region replication for disaster recovery","Configure replication rules for critical data"],resourceTypes:["AWS::S3::Bucket"]},"s3-bucket-access-logging-disabled":{ruleId:"s3-bucket-access-logging-disabled",checkKey:"s3BucketLogging",name:"S3 Bucket Access Logging Disabled",description:"Detects S3 buckets without server access logging configured. Required by CIS AWS Foundations 2.1.2 and useful for incident forensics.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set LoggingConfiguration.DestinationBucketName on the bucket to capture access logs","Use a separate bucket for logs to avoid recursive logging","Configure a lifecycle rule on the log bucket to manage storage costs"],resourceTypes:["AWS::S3::Bucket"]},"s3-bucket-policy-non-ssl":{ruleId:"s3-bucket-policy-non-ssl",checkKey:"s3BucketPolicySsl",name:"S3 BucketPolicy Permits Non-SSL Requests",description:"Detects AWS::S3::BucketPolicy resources that lack a Deny statement enforcing aws:SecureTransport. Without this, the bucket accepts plain HTTP requests in addition to HTTPS.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html#enforce-tls",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Add a Deny statement with Action s3:* and Condition Bool aws:SecureTransport=false","Apply the Deny to both the bucket ARN and the bucket-objects ARN (arn/* )","Use BoolIfExists if the policy already accepts unsigned requests via specific clauses"],resourceTypes:["AWS::S3::BucketPolicy"]},"s3-bucket-policy-self-lockout":{ruleId:"s3-bucket-policy-self-lockout",checkKey:"s3BucketPolicySelfLockout",name:"S3 BucketPolicy Self-Lockout",description:"Detects AWS::S3::BucketPolicy resources containing a Deny statement on s3:DeleteBucket, s3:*, or * with a broad Principal and no NotPrincipal or aws:PrincipalArn carveout for the account root or admin role. Such a policy locks the account out of its own bucket \u2014 recovery requires breaking glass on the account root credentials, since AWS Support typically declines to intervene where customers have a self-service path via root.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Add a NotPrincipal exemption for the account root (arn:aws:iam::<account>:root) or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs","If the Deny is intended for transport security, scope it with aws:SecureTransport rather than a blanket Deny on Principal: '*'"],resourceTypes:["AWS::S3::BucketPolicy"]},"lambda-env-sensitive-data":{ruleId:"lambda-env-sensitive-data",checkKey:"lambdaEnvironmentVariables",name:"Lambda Sensitive Environment Variables",description:"Detects Lambda functions with sensitive data in environment variables.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Move sensitive data to AWS Secrets Manager","Use SSM Parameter Store with SecureString","Enable Lambda environment variable encryption"],resourceTypes:["AWS::Lambda::Function"]},"lambda-memory-optimization":{ruleId:"lambda-memory-optimization",checkKey:"lambdaMemory",name:"Lambda Memory Optimization",description:"Detects Lambda functions with suboptimal memory configuration.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console",remediationSteps:["Use AWS Lambda Power Tuning to find optimal memory","Consider cost vs performance tradeoffs"],resourceTypes:["AWS::Lambda::Function"]},"lambda-reserved-concurrency-missing":{ruleId:"lambda-reserved-concurrency-missing",checkKey:"lambdaReservedConcurrency",name:"Lambda Reserved Concurrency Missing",description:"Detects Lambda functions without reserved concurrency.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html",remediationSteps:["Set reserved concurrency for critical functions","Use provisioned concurrency for latency-sensitive workloads"],resourceTypes:["AWS::Lambda::Function"]},"lambda-dlq-missing":{ruleId:"lambda-dlq-missing",checkKey:"lambdaDeadLetterQueue",name:"Lambda Dead Letter Queue Missing",description:"Detects Lambda functions without dead letter queue configuration.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq",remediationSteps:["Configure a dead letter queue (SQS or SNS)","Set up monitoring for DLQ messages","Implement retry logic for failed invocations"],resourceTypes:["AWS::Lambda::Function"]},"lambda-vpc-nat-cost":{ruleId:"lambda-vpc-nat-cost",checkKey:"lambdaVpcNatWarning",name:"Lambda VPC NAT Gateway Cost Warning",description:"Warns about potential NAT Gateway costs for VPC-attached Lambda functions.",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html",remediationSteps:["Use VPC endpoints instead of NAT Gateway where possible","Consider if VPC attachment is necessary","Monitor NAT Gateway data processing costs"],resourceTypes:["AWS::Lambda::Function"]},"lambda-permission-public":{ruleId:"lambda-permission-public",checkKey:"lambdaPermission",name:"Lambda Permission Permits Public Access",description:"Detects AWS::Lambda::Permission and AWS::Lambda::LayerVersionPermission resources that grant invoke / use rights with a wildcard Principal, or grant a service principal without a SourceArn / SourceAccount / PrincipalOrgID restriction (confused-deputy risk).",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Replace wildcard Principal with a specific 12-digit AWS account ID or {Ref: AWS::AccountId}","For service principals, set SourceArn to the specific resource that may invoke the function","For S3 service principal, set SourceAccount to your AWS account ID","For LayerVersionPermission, prefer OrganizationId over wildcard Principal"],resourceTypes:["AWS::Lambda::Permission","AWS::Lambda::LayerVersionPermission"]},"dynamodb-autoscaling-missing":{ruleId:"dynamodb-autoscaling-missing",checkKey:"dynamoDBAutoScaling",name:"DynamoDB Auto Scaling Missing",description:"Detects DynamoDB tables without auto-scaling enabled.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html",remediationSteps:["Enable DynamoDB auto-scaling or use on-demand capacity","Set appropriate minimum and maximum capacity units"],resourceTypes:["AWS::DynamoDB::Table"]},"dynamodb-streams-disabled":{ruleId:"dynamodb-streams-disabled",checkKey:"dynamoDBStreams",name:"DynamoDB Streams Disabled",description:"Detects DynamoDB tables without streams enabled.",severity:"LOW",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html",remediationSteps:["Enable DynamoDB Streams for change data capture","Consider point-in-time recovery for data protection"],resourceTypes:["AWS::DynamoDB::Table"]},"dynamodb-encryption-aws-owned-key":{ruleId:"dynamodb-encryption-aws-owned-key",checkKey:"dynamoDBEncryption",name:"DynamoDB Table Uses AWS-Owned Encryption Key",description:"Detects AWS::DynamoDB::Table resources without SSESpecification.SSEEnabled=true. DynamoDB always encrypts at rest, but the default AWS-owned key cannot be inspected, audited, or rotated by the customer \u2014 inadequate for HIPAA / PCI-DSS / FedRAMP workloads.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/encryption.howitworks.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set SSESpecification.SSEEnabled to true on the table","Provide SSESpecification.KMSMasterKeyId pointing at a customer-managed KMS key","Verify the KMS key has rotation enabled (kms-key-rotation-disabled covers this)"],resourceTypes:["AWS::DynamoDB::Table"]},"dynamodb-pitr-disabled":{ruleId:"dynamodb-pitr-disabled",checkKey:"dynamoDBPitr",name:"DynamoDB Point-in-Time Recovery Disabled",description:"Detects DynamoDB tables without Point-in-Time Recovery enabled. PITR provides continuous backups for the last 35 days and is required for SOC2 / HIPAA data resilience.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PointInTimeRecovery.html",remediationSteps:["Set PointInTimeRecoverySpecification.PointInTimeRecoveryEnabled to true on the table","Verify the AWS region supports PITR for your table type (Provisioned / On-Demand)"],resourceTypes:["AWS::DynamoDB::Table"]},"rds-encryption-disabled":{ruleId:"rds-encryption-disabled",checkKey:"rdsEncryption",name:"RDS Encryption Disabled",description:"Detects RDS instances without encryption at rest.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable encryption for new RDS instances","For existing instances, create encrypted snapshot and restore"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-multi-az-disabled":{ruleId:"rds-multi-az-disabled",checkKey:"rdsMultiAZ",name:"RDS Multi-AZ Disabled",description:"Detects RDS instances without Multi-AZ deployment.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html",remediationSteps:["Enable Multi-AZ for production databases","Consider Aurora for automatic multi-AZ"],resourceTypes:["AWS::RDS::DBInstance"]},"rds-publicly-accessible":{ruleId:"rds-publicly-accessible",checkKey:"rdsPublicAccess",name:"RDS Publicly Accessible",description:"Detects RDS instances that are publicly accessible.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set PubliclyAccessible to false","Use VPC security groups to control access","Access databases through bastion hosts or VPN"],resourceTypes:["AWS::RDS::DBInstance"]},"rds-backup-retention-low":{ruleId:"rds-backup-retention-low",checkKey:"rdsBackupRetention",name:"RDS Backup Retention Low",description:"Detects RDS instances with insufficient backup retention.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html",complianceFrameworks:["SOC2","HIPAA","NIST"],remediationSteps:["Set backup retention period to at least 7 days","Consider longer retention for compliance requirements","Enable cross-region backup replication"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-deletion-protection-disabled":{ruleId:"rds-deletion-protection-disabled",checkKey:"rdsDeletionProtection",name:"RDS Deletion Protection Disabled",description:"Detects RDS instances without deletion protection.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html",remediationSteps:["Enable deletion protection for production databases","Use CloudFormation DeletionPolicy: Retain"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-logging-disabled":{ruleId:"rds-logging-disabled",checkKey:"rdsLogging",name:"RDS Logging Disabled",description:"Detects RDS DBInstance and DBCluster resources without EnableCloudwatchLogsExports configured. Engine logs (error, slow query, audit) are not exported to CloudWatch for retention or analysis.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set EnableCloudwatchLogsExports to the engine's relevant log types (e.g. ['error','slowquery'] for MySQL, ['postgresql'] for PostgreSQL)","Configure a CloudWatch Logs retention policy on the resulting log group","For Aurora, enable both DBCluster and per-instance log exports"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-enhanced-monitoring-disabled":{ruleId:"rds-enhanced-monitoring-disabled",checkKey:"rdsEnhancedMonitoring",name:"RDS Enhanced Monitoring Disabled",description:"Detects RDS instances without enhanced monitoring (MonitoringInterval missing or set to 0). OS-level metrics are not published to CloudWatch Logs.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html",remediationSteps:["Set MonitoringInterval to one of 1, 5, 10, 15, 30, or 60 (seconds)","Provide MonitoringRoleArn pointing at an IAM role with AmazonRDSEnhancedMonitoringRole attached"],resourceTypes:["AWS::RDS::DBInstance"]},"ec2-instance-type-outdated":{ruleId:"ec2-instance-type-outdated",checkKey:"ec2InstanceType",name:"EC2 Instance Type Outdated",description:"Detects EC2 instances using older generation instance types.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html",remediationSteps:["Upgrade to current generation instance types","Use AWS Compute Optimizer for recommendations"],resourceTypes:["AWS::EC2::Instance"]},"nat-gateway-usage":{ruleId:"nat-gateway-usage",checkKey:"natGatewayUsage",name:"NAT Gateway Usage",description:"Identifies NAT Gateway usage for cost awareness.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html",remediationSteps:["Consider VPC endpoints to reduce NAT Gateway traffic","Use NAT instances for lower traffic volumes"],resourceTypes:["AWS::EC2::NatGateway"]},"security-group-unrestricted-ingress":{ruleId:"security-group-unrestricted-ingress",checkKey:"securityGroups",name:"Security Group Unrestricted Ingress",description:"Detects security groups with unrestricted ingress (0.0.0.0/0).",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Restrict ingress to specific IP ranges","Use security group references for internal traffic","Implement least privilege network access"],resourceTypes:["AWS::EC2::SecurityGroup"]},"ebs-volume-unencrypted":{ruleId:"ebs-volume-unencrypted",checkKey:"ebsVolumes",name:"EBS Volume Unencrypted",description:"Detects EBS volumes without encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable EBS encryption by default in account settings","Use KMS customer managed keys for additional control"],resourceTypes:["AWS::EC2::Volume"]},"ec2-subnet-auto-public-ip":{ruleId:"ec2-subnet-auto-public-ip",checkKey:"ec2SubnetAutoPublicIp",name:"EC2 Subnet Auto-Assigns Public IPs",description:"Detects AWS::EC2::Subnet resources with MapPublicIpOnLaunch=true. Instances launched into the subnet inherit a public IP by default, which makes them internet-reachable without an explicit opt-in at the ENI level.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-ip-addressing.html#subnet-public-ip",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set MapPublicIpOnLaunch to false unless this is intentionally a public subnet","Have instances opt into a public IP via the ENI configuration when needed","Use VPC endpoints / NAT for outbound access from private subnets"],resourceTypes:["AWS::EC2::Subnet"]},"ec2-instance-public-ip":{ruleId:"ec2-instance-public-ip",checkKey:"ec2PublicIp",name:"EC2 Instance Public IP",description:"Detects EC2 instances whose NetworkInterfaces specify AssociatePublicIpAddress=true, exposing the instance directly to the internet.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set AssociatePublicIpAddress to false on the NetworkInterface","Place the instance in a private subnet and use a NAT Gateway / VPC endpoint for outbound","Use an ALB / NLB in a public subnet to front the workload instead"],resourceTypes:["AWS::EC2::Instance"]},"cloudfront-https-only":{ruleId:"cloudfront-https-only",checkKey:"cloudFrontHttpsOnly",name:"CloudFront HTTPS Only",description:"Detects CloudFront distributions allowing HTTP traffic.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set ViewerProtocolPolicy to https-only or redirect-to-https","Configure custom SSL certificate"],resourceTypes:["AWS::CloudFront::Distribution"]},"cloudfront-waf-missing":{ruleId:"cloudfront-waf-missing",checkKey:"cloudFrontWafAssociation",name:"CloudFront WAF Missing",description:"Detects CloudFront distributions without WAF association.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-awswaf.html",complianceFrameworks:["SOC2","PCI-DSS","NIST"],remediationSteps:["Associate AWS WAF web ACL with CloudFront distribution","Configure WAF rules for common attack patterns"],resourceTypes:["AWS::CloudFront::Distribution"]},"cloudfront-logging-disabled":{ruleId:"cloudfront-logging-disabled",checkKey:"cloudFrontLogging",name:"CloudFront Logging Disabled",description:"Detects CloudFront distributions without access logging.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable standard logging to S3","Consider real-time logs for detailed analysis"],resourceTypes:["AWS::CloudFront::Distribution"]},"cloudfront-tls-outdated":{ruleId:"cloudfront-tls-outdated",checkKey:"cloudFrontTls",name:"CloudFront TLS Outdated",description:"Detects CloudFront distributions using outdated TLS versions.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set MinimumProtocolVersion to TLSv1.2_2021 or higher","Use a custom SSL certificate"],resourceTypes:["AWS::CloudFront::Distribution"]},"elb-deletion-protection-disabled":{ruleId:"elb-deletion-protection-disabled",checkKey:"elbDeletionProtection",name:"ELB Deletion Protection Disabled",description:"Detects load balancers without deletion protection.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#deletion-protection",remediationSteps:["Enable deletion protection for production load balancers","Use CloudFormation DeletionPolicy: Retain"],resourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer"]},"elb-logging-disabled":{ruleId:"elb-logging-disabled",checkKey:"elbLogging",name:"ELB Logging Disabled",description:"Detects load balancers without access logging.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable access logging to S3","Configure log retention policy"],resourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer"]},"elb-https-listeners-missing":{ruleId:"elb-https-listeners-missing",checkKey:"elbHttpsListeners",name:"ELB HTTPS Listeners Missing",description:"Detects load balancers with HTTP listeners not redirecting to HTTPS.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Add HTTPS listener with valid SSL certificate","Configure HTTP to HTTPS redirect"],resourceTypes:["AWS::ElasticLoadBalancingV2::Listener"]},"elb-security-policy-outdated":{ruleId:"elb-security-policy-outdated",checkKey:"elbSecurityPolicy",name:"ELB Security Policy Outdated",description:"Detects load balancers using outdated TLS security policies.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Update to ELBSecurityPolicy-TLS13-1-2-2021-06 or newer","Remove support for deprecated protocols"],resourceTypes:["AWS::ElasticLoadBalancingV2::Listener"]},"ecs-secrets-plaintext":{ruleId:"ecs-secrets-plaintext",checkKey:"ecsSecrets",name:"ECS Secrets in Plaintext",description:"Detects ECS task definitions with sensitive data in plaintext environment variables.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Use secrets property with Secrets Manager ARN","Use SSM Parameter Store SecureString"],resourceTypes:["AWS::ECS::TaskDefinition"]},"ecs-logging-disabled":{ruleId:"ecs-logging-disabled",checkKey:"ecsLogging",name:"ECS Logging Disabled",description:"Detects ECS task definitions without logging configured.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Configure awslogs log driver","Set up CloudWatch log groups with retention"],resourceTypes:["AWS::ECS::TaskDefinition"]},"ecs-service-connect-access-logs-missing":{ruleId:"ecs-service-connect-access-logs-missing",checkKey:"ecsServiceConnectLogs",name:"ECS Service Connect Access Logs Missing",description:"Detects ECS services with Service Connect enabled but no access log configuration, leaving inter-service traffic unaudited.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-logging.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set ServiceConnectConfiguration.LogConfiguration with a LogDriver such as awslogs","Send Service Connect logs to a CloudWatch log group with a retention policy","Confirm log group encryption is configured for sensitive workloads"],resourceTypes:["AWS::ECS::Service"]},"ecs-resources-missing":{ruleId:"ecs-resources-missing",checkKey:"ecsResources",name:"ECS Resource Limits Missing",description:"Detects ECS task definitions without CPU/memory limits.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size",remediationSteps:["Set CPU and memory at task level for Fargate","Set container-level memory limits for EC2"],resourceTypes:["AWS::ECS::TaskDefinition"]},"cognito-password-policy-weak":{ruleId:"cognito-password-policy-weak",checkKey:"cognitoPasswordPolicy",name:"Cognito Password Policy Weak",description:"Detects Cognito user pools with weak password policies.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-policies.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set minimum password length to at least 12 characters","Require uppercase, lowercase, numbers, and symbols"],resourceTypes:["AWS::Cognito::UserPool"]},"cognito-mfa-disabled":{ruleId:"cognito-mfa-disabled",checkKey:"cognitoMfa",name:"Cognito MFA Disabled",description:"Detects Cognito user pools without MFA enabled.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable MFA (OPTIONAL or ON)","Configure SMS or TOTP as MFA method"],resourceTypes:["AWS::Cognito::UserPool"]},"cognito-advanced-security-disabled":{ruleId:"cognito-advanced-security-disabled",checkKey:"cognitoAdvancedSecurity",name:"Cognito Advanced Security Disabled",description:"Detects Cognito user pools without advanced security features.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Enable advanced security mode (AUDIT or ENFORCED)","Configure risk-based adaptive authentication"],resourceTypes:["AWS::Cognito::UserPool"]},"api-gateway-method-auth-missing":{ruleId:"api-gateway-method-auth-missing",checkKey:"apiGatewayMethodAuth",name:"API Gateway Method Has No Authorization",description:"Detects AWS::ApiGateway::Method and AWS::ApiGatewayV2::Route resources where AuthorizationType is missing or NONE (excluding OPTIONS preflight). Public-by-default endpoints expose backend Lambdas to anyone on the internet.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/apigateway/latest/developerguide/permissions.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AuthorizationType to AWS_IAM, COGNITO_USER_POOLS, or CUSTOM (REST APIs)","Use JWT or AWS_IAM AuthorizationType for HTTP APIs (v2)","If the route is intentionally public (e.g. webhook receiver), prefer api-key + WAF rate limiting and suppress this rule explicitly"],resourceTypes:["AWS::ApiGateway::Method","AWS::ApiGatewayV2::Route"]},"api-gateway-logging-disabled":{ruleId:"api-gateway-logging-disabled",checkKey:"apiGateway",name:"API Gateway Logging Disabled",description:"Detects API Gateway stages without logging enabled.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable CloudWatch logging for API stages","Configure access logging for request/response details"],resourceTypes:["AWS::ApiGateway::Stage","AWS::ApiGatewayV2::Stage"]},"secrets-manager-rotation-disabled":{ruleId:"secrets-manager-rotation-disabled",checkKey:"secretsManager",name:"Secrets Manager Rotation Disabled",description:"Detects secrets without automatic rotation configured.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable automatic rotation","Set rotation schedule (e.g., every 30 days)"],resourceTypes:["AWS::SecretsManager::Secret"]},"cloudtrail-logging-disabled":{ruleId:"cloudtrail-logging-disabled",checkKey:"cloudTrailLogging",name:"CloudTrail Logging Disabled",description:"Detects CloudTrail trails with logging disabled.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-getting-started.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Ensure IsLogging is enabled","Configure multi-region trails","Enable log file validation"],resourceTypes:["AWS::CloudTrail::Trail"]},"eventbridge-bus-policy-wildcard-principal":{ruleId:"eventbridge-bus-policy-wildcard-principal",checkKey:"eventBusPolicy",name:"EventBridge Bus Policy Allows Wildcard Principal",description:"Detects AWS::Events::EventBusPolicy with an Allow statement targeting Principal=* (or AWS=*) without a Condition restricting access. Without the condition, any AWS account can publish events to the bus.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-perms.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Replace wildcard Principal with specific 12-digit AWS account IDs","Or scope the policy with a Condition such as aws:PrincipalOrgID","Verify the StatementId is descriptive \u2014 easier to audit later"],resourceTypes:["AWS::Events::EventBusPolicy"]},"eventbridge-dlq-missing":{ruleId:"eventbridge-dlq-missing",checkKey:"eventBridgeRules",name:"EventBridge DLQ Missing",description:"Detects EventBridge rules without dead letter queue.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html",remediationSteps:["Configure dead letter queue for failed event delivery","Set up monitoring for DLQ messages"],resourceTypes:["AWS::Events::Rule"]},"kms-key-rotation-disabled":{ruleId:"kms-key-rotation-disabled",checkKey:"kmsKeys",name:"KMS Key Rotation Disabled",description:"Detects KMS keys without automatic rotation.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable automatic key rotation","Key rotation occurs annually"],resourceTypes:["AWS::KMS::Key"]},"kms-key-policy-self-lockout":{ruleId:"kms-key-policy-self-lockout",checkKey:"kmsKeyPolicySelfLockout",name:"KMS Key Policy Self-Lockout",description:"Detects AWS::KMS::Key resources whose KeyPolicy contains a Deny statement on kms:*, kms:PutKeyPolicy, or * with a broad Principal and no carveout for the account root or admin role. Such a policy locks the account out of its own key \u2014 recovery requires breaking glass on the account root credentials AND scheduling a 7-30 day key deletion (which does not actually let you recover the key, just remove it). Effectively unrecoverable for any data the key has encrypted; AWS Support typically declines to intervene where customers have a self-service path via root.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Keep the auto-injected root Allow statement (CDK's defaultKeyPolicy) intact, or add an explicit Allow on Principal: { AWS: 'arn:aws:iam::<account>:root' } for Action: kms:*","Or add a NotPrincipal exemption for the account root or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs"],resourceTypes:["AWS::KMS::Key"]},"sns-encryption-disabled":{ruleId:"sns-encryption-disabled",checkKey:"sns",name:"SNS Encryption Disabled",description:"Detects SNS topics without encryption.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable server-side encryption with KMS","Use customer managed keys for additional control"],resourceTypes:["AWS::SNS::Topic"]},"sqs-encryption-disabled":{ruleId:"sqs-encryption-disabled",checkKey:"sqs",name:"SQS Encryption Disabled",description:"Detects SQS queues without encryption.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable server-side encryption with KMS","Use SQS-managed keys (SSE-SQS) or customer managed keys"],resourceTypes:["AWS::SQS::Queue"]},"sqs-queue-policy-self-lockout":{ruleId:"sqs-queue-policy-self-lockout",checkKey:"sqsQueuePolicySelfLockout",name:"SQS QueuePolicy Self-Lockout",description:"Detects AWS::SQS::QueuePolicy resources containing a Deny statement on sqs:DeleteQueue, sqs:RemovePermission, sqs:*, or * with a broad Principal and no NotPrincipal or aws:PrincipalArn carveout for the account root or admin role. Such a policy locks the account out of its own queue \u2014 recovery requires breaking glass on the account root credentials to remove the queue policy, or delete-and-recreate the queue if nothing else depends on its ARN. In event-driven systems that is often a multi-stack rebuild.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-access-policy-language-basic-structure.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Add a NotPrincipal exemption for the account root (arn:aws:iam::<account>:root) or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs","If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'"],resourceTypes:["AWS::SQS::QueuePolicy"]},"sns-topic-policy-self-lockout":{ruleId:"sns-topic-policy-self-lockout",checkKey:"snsTopicPolicySelfLockout",name:"SNS TopicPolicy Self-Lockout",description:"Detects AWS::SNS::TopicPolicy resources containing a Deny statement on sns:DeleteTopic, sns:RemovePermission, sns:*, or * with a broad Principal and no NotPrincipal or aws:PrincipalArn carveout for the account root or admin role. Such a policy locks the account out of its own topic \u2014 recovery requires breaking glass on the account root credentials to remove the topic policy, or delete-and-recreate the topic if no subscribers depend on its ARN. In fan-out architectures that is often a multi-stack rebuild.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/sns/latest/dg/sns-access-policy-language-key-concepts.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Add a NotPrincipal exemption for the account root (arn:aws:iam::<account>:root) or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs","If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'"],resourceTypes:["AWS::SNS::TopicPolicy"]},"stepfunctions-logging-disabled":{ruleId:"stepfunctions-logging-disabled",checkKey:"stepFunctions",name:"Step Functions Logging Disabled",description:"Detects Step Functions state machines without logging.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable CloudWatch Logs for state machine execution","Set appropriate log level (ALL, ERROR, FATAL, OFF)"],resourceTypes:["AWS::StepFunctions::StateMachine"]},"acm-certificate-email-validation":{ruleId:"acm-certificate-email-validation",checkKey:"acmValidation",name:"ACM Certificate Validation Hardening",description:"Detects ACM certificates using email validation or with certificate transparency logging disabled.",severity:"LOW",wafPillar:"Security",complianceFrameworks:["SOC2","NIST"],awsDocUrl:"https://docs.aws.amazon.com/acm/latest/userguide/dns-validation.html",remediationSteps:["Use DNS validation for automated certificate renewal","Enable certificate transparency logging to detect misissuance"],resourceTypes:["AWS::CertificateManager::Certificate"]},"appsync-api-key-auth":{ruleId:"appsync-api-key-auth",checkKey:"appSyncAuth",name:"AppSync API Key Authentication",description:"Detects AppSync APIs using API key authentication or lacking additional authentication providers.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/appsync/latest/devguide/security-authz.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Use AWS_IAM, Cognito User Pools, or OIDC for production workloads","Configure AdditionalAuthenticationProviders for client flexibility"],resourceTypes:["AWS::AppSync::GraphQLApi"]},"appsync-logging-disabled":{ruleId:"appsync-logging-disabled",checkKey:"appSyncLogging",name:"AppSync Logging Disabled",description:"Detects AppSync APIs without logging, field-level logging, or X-Ray tracing.",severity:"MEDIUM",wafPillar:"Operational Excellence",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],awsDocUrl:"https://docs.aws.amazon.com/appsync/latest/devguide/monitoring.html",remediationSteps:["Configure LogConfig to capture request/response logs in CloudWatch","Set FieldLogLevel to ERROR or ALL for resolver execution detail","Enable XrayEnabled for distributed tracing"],resourceTypes:["AWS::AppSync::GraphQLApi"]},"appsync-waf-missing":{ruleId:"appsync-waf-missing",checkKey:"appSyncWaf",name:"AppSync WAF Missing",description:"Detects AppSync APIs without an associated AWS WAF WebACL.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/appsync/latest/devguide/WAF-Integration.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Associate a WAFv2 WebACL with the AppSync API","Define rules to protect against common web exploits"],resourceTypes:["AWS::AppSync::GraphQLApi","AWS::WAFv2::WebACLAssociation"]},"backup-plan-misconfigured":{ruleId:"backup-plan-misconfigured",checkKey:"backupPlans",name:"Backup Plan Misconfigured",description:"Detects Backup plan rules without cross-region copy or lifecycle configuration.",severity:"LOW",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/aws-backup/latest/devguide/about-backup-plans.html",remediationSteps:["Add CopyActions to replicate backups cross-region for DR","Set DeleteAfterDays / MoveToColdStorageAfterDays to manage retention and cost"],resourceTypes:["AWS::Backup::BackupPlan"]},"backup-vault-hardening":{ruleId:"backup-vault-hardening",checkKey:"backupVault",name:"Backup Vault Hardening",description:"Detects Backup vaults using AWS-managed keys or without a vault lock for compliance.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/aws-backup/latest/devguide/vaultlock.html",complianceFrameworks:["SOC2","HIPAA","NIST"],remediationSteps:["Specify a customer-managed KMS key via EncryptionKeyArn","Add a BackupVaultLock to enforce retention and prevent deletion"],resourceTypes:["AWS::Backup::BackupVault","AWS::Backup::BackupVaultLock"]},"cloudwatch-alarm-actions-missing":{ruleId:"cloudwatch-alarm-actions-missing",checkKey:"cloudWatchAlarms",name:"CloudWatch Alarm Actions Missing",description:"Detects CloudWatch Alarms without alarm actions or missing-data handling.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html",remediationSteps:["Add AlarmActions (SNS, Lambda, SSM) for state-change notifications","Set TreatMissingData to define behaviour for missing data points"],resourceTypes:["AWS::CloudWatch::Alarm"]},"cloudwatch-logs-encryption-disabled":{ruleId:"cloudwatch-logs-encryption-disabled",checkKey:"cloudWatchEncryption",name:"CloudWatch Logs Encryption Disabled",description:"Detects CloudWatch Log Groups not encrypted with a customer-managed KMS key.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set KmsKeyId on the LogGroup to encrypt with a customer-managed key"],resourceTypes:["AWS::Logs::LogGroup"]},"cloudwatch-logs-retention-missing":{ruleId:"cloudwatch-logs-retention-missing",checkKey:"cloudWatchLogRetention",name:"CloudWatch Logs Retention Missing",description:"Detects CloudWatch Log Groups without an explicit retention period (logs retained indefinitely).",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html",remediationSteps:["Set RetentionInDays to control storage cost (30\u201390 days for ops, longer for compliance)"],resourceTypes:["AWS::Logs::LogGroup"]},"ecr-mutable-tags":{ruleId:"ecr-mutable-tags",checkKey:"ecrImmutableTags",name:"ECR Mutable Image Tags",description:"Detects ECR repositories that allow image tags to be overwritten.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html",complianceFrameworks:["SOC2","PCI-DSS","NIST"],remediationSteps:["Set ImageTagMutability to IMMUTABLE"],resourceTypes:["AWS::ECR::Repository"]},"ecr-lifecycle-policy-missing":{ruleId:"ecr-lifecycle-policy-missing",checkKey:"ecrLifecycle",name:"ECR Lifecycle Policy Missing",description:"Detects ECR repositories without a lifecycle policy to clean up old images.",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html",remediationSteps:["Define a LifecyclePolicy to expire untagged or excess image versions"],resourceTypes:["AWS::ECR::Repository"]},"ecr-scan-on-push-disabled":{ruleId:"ecr-scan-on-push-disabled",checkKey:"ecrScanning",name:"ECR Scan-on-Push Disabled",description:"Detects ECR repositories without image vulnerability scanning on push.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable ScanOnPush in ImageScanningConfiguration","Or use enhanced scanning at the registry level"],resourceTypes:["AWS::ECR::Repository"]},"eks-secrets-encryption-disabled":{ruleId:"eks-secrets-encryption-disabled",checkKey:"eksEncryption",name:"EKS Secrets Encryption Disabled",description:"Detects EKS clusters without envelope encryption for Kubernetes secrets in etcd.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eks/latest/userguide/enable-kms.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:['Configure EncryptionConfig with a KMS key referencing resources: ["secrets"]'],resourceTypes:["AWS::EKS::Cluster"]},"eks-control-plane-logging-disabled":{ruleId:"eks-control-plane-logging-disabled",checkKey:"eksLogging",name:"EKS Control Plane Logging Disabled",description:"Detects EKS clusters with no control plane log types enabled.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable api, audit, authenticator, controllerManager, and scheduler logs"],resourceTypes:["AWS::EKS::Cluster"]},"eks-public-endpoint-unrestricted":{ruleId:"eks-public-endpoint-unrestricted",checkKey:"eksPublicEndpoint",name:"EKS Public Endpoint Unrestricted",description:"Detects EKS clusters with the API endpoint reachable from 0.0.0.0/0 or only via the public network.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable EndpointPrivateAccess for in-VPC node communication","Restrict PublicAccessCidrs to known administrative IP ranges"],resourceTypes:["AWS::EKS::Cluster"]},"elasticache-auth-token-missing":{ruleId:"elasticache-auth-token-missing",checkKey:"elastiCacheAuth",name:"ElastiCache AUTH Token Missing",description:"Detects Redis replication groups with transit encryption but no AUTH token configured.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AuthToken to require Redis client authentication"],resourceTypes:["AWS::ElastiCache::ReplicationGroup"]},"elasticache-encryption-disabled":{ruleId:"elasticache-encryption-disabled",checkKey:"elastiCacheEncryption",name:"ElastiCache Encryption Disabled",description:"Detects ElastiCache clusters without at-rest or in-transit encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/at-rest-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AtRestEncryptionEnabled: true","Set TransitEncryptionEnabled: true"],resourceTypes:["AWS::ElastiCache::ReplicationGroup","AWS::ElastiCache::CacheCluster"]},"elasticache-failover-disabled":{ruleId:"elasticache-failover-disabled",checkKey:"elastiCacheFailover",name:"ElastiCache Automatic Failover Disabled",description:"Detects ElastiCache replication groups without automatic failover or Multi-AZ.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA"],awsDocUrl:"https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html",remediationSteps:["Enable AutomaticFailoverEnabled","Enable MultiAZEnabled to span availability zones"],resourceTypes:["AWS::ElastiCache::ReplicationGroup"]},"glue-connection-network-isolation":{ruleId:"glue-connection-network-isolation",checkKey:"glueConnections",name:"Glue Connection Network Isolation",description:"Detects Glue JDBC connections without VPC subnet placement or SSL enforcement.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/glue/latest/dg/setup-vpc-for-glue-access.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList","Include SSL parameters in the JDBC connection URL"],resourceTypes:["AWS::Glue::Connection"]},"glue-job-encryption-missing":{ruleId:"glue-job-encryption-missing",checkKey:"glueEncryption",name:"Glue Job Encryption Missing",description:"Detects Glue jobs without an attached SecurityConfiguration for encrypting bookmarks, S3 data, and CloudWatch logs.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/glue/latest/dg/encryption-security-configuration.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Create a SecurityConfiguration enabling KMS encryption for all targets","Reference it via the job's SecurityConfiguration property"],resourceTypes:["AWS::Glue::Job"]},"kinesis-encryption-disabled":{ruleId:"kinesis-encryption-disabled",checkKey:"kinesisEncryption",name:"Kinesis Encryption Disabled",description:"Detects Kinesis Data Streams without server-side KMS encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/streams/latest/dev/server-side-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set StreamEncryption with EncryptionType: KMS and a KeyId"],resourceTypes:["AWS::Kinesis::Stream"]},"kinesis-retention-minimum":{ruleId:"kinesis-retention-minimum",checkKey:"kinesisRetention",name:"Kinesis Minimum Retention",description:"Detects Kinesis Data Streams using the default 24-hour retention period.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/streams/latest/dev/kinesis-extended-retention.html",remediationSteps:["Increase RetentionPeriodHours to support replay/reprocessing during incidents"],resourceTypes:["AWS::Kinesis::Stream"]},"lambda-runtime-deprecated":{ruleId:"lambda-runtime-deprecated",checkKey:"lambdaRuntime",name:"Lambda Deprecated Runtime",description:"Detects Lambda functions using runtimes that have reached or are approaching end-of-life.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html",complianceFrameworks:["SOC2","PCI-DSS","NIST"],remediationSteps:["Upgrade to a currently supported runtime","Track AWS Lambda runtime deprecation announcements"],resourceTypes:["AWS::Lambda::Function"]},"msk-client-authentication-missing":{ruleId:"msk-client-authentication-missing",checkKey:"mskAuth",name:"MSK Client Authentication Missing",description:"Detects MSK clusters without client authentication or that allow unauthenticated access.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/msk/latest/developerguide/kafka_apis_iam.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable SASL/SCRAM, IAM auth, or mTLS in ClientAuthentication","Disable Unauthenticated access"],resourceTypes:["AWS::MSK::Cluster"]},"msk-encryption-weak":{ruleId:"msk-encryption-weak",checkKey:"mskEncryption",name:"MSK Encryption Weak",description:"Detects MSK clusters without TLS for client-broker traffic, without inter-broker encryption, or using AWS-managed keys for at-rest encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/msk/latest/developerguide/msk-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set ClientBroker to TLS in EncryptionInTransit","Set InCluster to true in EncryptionInTransit","Specify DataVolumeKMSKeyId for at-rest encryption"],resourceTypes:["AWS::MSK::Cluster"]},"msk-broker-logging-disabled":{ruleId:"msk-broker-logging-disabled",checkKey:"mskLogging",name:"MSK Broker Logging Disabled",description:"Detects MSK clusters without broker logs configured.",severity:"MEDIUM",wafPillar:"Operational Excellence",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],awsDocUrl:"https://docs.aws.amazon.com/msk/latest/developerguide/msk-logging.html",remediationSteps:["Enable broker logs to CloudWatch Logs, Firehose, or S3"],resourceTypes:["AWS::MSK::Cluster"]},"opensearch-access-control-weak":{ruleId:"opensearch-access-control-weak",checkKey:"openSearchAccessControl",name:"OpenSearch Access Control Weak",description:"Detects OpenSearch domains without fine-grained access control or VPC placement.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable AdvancedSecurityOptions","Configure VPCOptions to deploy the domain inside a VPC"],resourceTypes:["AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain"]},"opensearch-encryption-disabled":{ruleId:"opensearch-encryption-disabled",checkKey:"openSearchEncryption",name:"OpenSearch Encryption Disabled",description:"Detects OpenSearch domains without at-rest encryption or node-to-node encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable EncryptionAtRestOptions with a KMS key","Enable NodeToNodeEncryptionOptions"],resourceTypes:["AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain"]},"opensearch-logging-disabled":{ruleId:"opensearch-logging-disabled",checkKey:"openSearchLogging",name:"OpenSearch Logging Disabled",description:"Detects OpenSearch domains without audit logs or application logs published to CloudWatch.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/audit-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable AUDIT_LOGS in LogPublishingOptions","Enable ES_APPLICATION_LOGS in LogPublishingOptions"],resourceTypes:["AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain"]},"redshift-encryption-disabled":{ruleId:"redshift-encryption-disabled",checkKey:"redshiftEncryption",name:"Redshift Encryption Disabled",description:"Detects Redshift clusters without at-rest encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set Encrypted: true and specify a KmsKeyId"],resourceTypes:["AWS::Redshift::Cluster"]},"redshift-audit-logging-disabled":{ruleId:"redshift-audit-logging-disabled",checkKey:"redshiftLogging",name:"Redshift Audit Logging Disabled",description:"Detects Redshift clusters without audit logging to S3 (connection, user, query activity).",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set LoggingProperties with a target S3 bucket and key prefix"],resourceTypes:["AWS::Redshift::Cluster"]},"redshift-publicly-accessible":{ruleId:"redshift-publicly-accessible",checkKey:"redshiftPublicAccess",name:"Redshift Publicly Accessible",description:"Detects Redshift clusters reachable from the public internet.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-vpc.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set PubliclyAccessible: false","Use VPC endpoints, bastion hosts, or VPN for access"],resourceTypes:["AWS::Redshift::Cluster"]},"route53-dnssec-disabled":{ruleId:"route53-dnssec-disabled",checkKey:"route53Dnssec",name:"Route 53 DNSSEC Disabled",description:"Detects Route 53 hosted zones without DNSSEC signing enabled.",severity:"LOW",wafPillar:"Security",complianceFrameworks:["SOC2","NIST"],awsDocUrl:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html",remediationSteps:["Create an AWS::Route53::DNSSEC resource for the hosted zone","Configure a key-signing key (KSK)"],resourceTypes:["AWS::Route53::HostedZone","AWS::Route53::DNSSEC"]},"route53-health-check-suboptimal":{ruleId:"route53-health-check-suboptimal",checkKey:"route53HealthChecks",name:"Route 53 Health Check Suboptimal",description:"Detects Route 53 health checks using HTTP instead of HTTPS or the standard request interval.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html",remediationSteps:["Use HTTPS to validate certificate and endpoint security","Use a 10-second request interval for critical endpoints"],resourceTypes:["AWS::Route53::HealthCheck"]},"route53-query-logging-disabled":{ruleId:"route53-query-logging-disabled",checkKey:"route53QueryLogging",name:"Route 53 Query Logging Disabled",description:"Detects Route 53 hosted zones without query logging.",severity:"LOW",wafPillar:"Security",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html",remediationSteps:["Create an AWS::Route53::QueryLoggingConfig pointing to a CloudWatch Logs group"],resourceTypes:["AWS::Route53::HostedZone","AWS::Route53::QueryLoggingConfig"]},"vpc-default-security-group-rules-present":{ruleId:"vpc-default-security-group-rules-present",checkKey:"vpcDefaultSecurityGroup",name:"VPC Default Security Group Has Rules",description:"Detects default VPC security groups with ingress or egress rules; defaults should be empty.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/default-security-group.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Remove all rules from the default security group","Use purpose-built security groups instead"],resourceTypes:["AWS::EC2::SecurityGroup"]},"vpc-flow-logs-missing":{ruleId:"vpc-flow-logs-missing",checkKey:"vpcFlowLogs",name:"VPC Flow Logs Missing",description:"Detects VPCs without flow logs configured.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Create an AWS::EC2::FlowLog resource targeting the VPC","Send logs to CloudWatch Logs or S3"],resourceTypes:["AWS::EC2::VPC","AWS::EC2::FlowLog"]},"waf-logging-disabled":{ruleId:"waf-logging-disabled",checkKey:"wafLogging",name:"WAF Logging Disabled",description:"Detects WAFv2 WebACLs without logging configuration for analysed requests.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/waf/latest/developerguide/logging.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Create an AWS::WAFv2::LoggingConfiguration for the WebACL"],resourceTypes:["AWS::WAFv2::WebACL","AWS::WAFv2::LoggingConfiguration"]},"autoscaling-group-no-elb-healthcheck":{ruleId:"autoscaling-group-no-elb-healthcheck",checkKey:"autoScalingGroupHealthCheck",name:"AutoScaling Group Not Using ELB Health Checks",description:"Detects AWS::AutoScaling::AutoScalingGroup resources attached to a load balancer (LoadBalancerNames or TargetGroupARNs) but using EC2 health checks. EC2 health checks miss app-level outages the load balancer would otherwise detect.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html",remediationSteps:["Set HealthCheckType to ELB on the AutoScalingGroup","Set HealthCheckGracePeriod to give instances time to bootstrap before the LB starts probing","Verify the ALB / NLB target group has appropriate health-check thresholds"],resourceTypes:["AWS::AutoScaling::AutoScalingGroup"]},"autoscaling-launch-config-public-ip":{ruleId:"autoscaling-launch-config-public-ip",checkKey:"autoScalingLaunchConfigPublicIp",name:"AutoScaling LaunchConfiguration Assigns Public IP",description:"Detects AWS::AutoScaling::LaunchConfiguration with AssociatePublicIpAddress=true. Instances launched from this configuration get a public IP and are internet-reachable directly.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupExamples.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AssociatePublicIpAddress to false on the LaunchConfiguration","Place instances in private subnets behind an ALB / NLB","Use a NAT Gateway / VPC endpoints for outbound traffic","Migrate to AWS::EC2::LaunchTemplate (LaunchConfiguration is deprecated)"],resourceTypes:["AWS::AutoScaling::LaunchConfiguration"]},"efs-encryption-disabled":{ruleId:"efs-encryption-disabled",checkKey:"efsEncryption",name:"EFS Encryption Disabled",description:"Detects AWS::EFS::FileSystem resources without Encrypted=true. The CFN default is unencrypted (unlike the EFS console default), and encryption can only be enabled at filesystem creation.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set Encrypted to true on the AWS::EFS::FileSystem resource","Provide KmsKeyId pointing at a customer-managed KMS key for additional control","For existing unencrypted filesystems, migrate data to a new encrypted filesystem"],resourceTypes:["AWS::EFS::FileSystem"]},"waf-webacl-misconfigured":{ruleId:"waf-webacl-misconfigured",checkKey:"wafWebAcl",name:"WAF WebACL Misconfigured",description:"Detects WAFv2 WebACLs with no rules, default Allow action, or CloudWatch metrics disabled.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/waf/latest/developerguide/web-acl.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Add WAF rules covering the OWASP Top 10 baseline","Set DefaultAction to Block for defence-in-depth","Enable CloudWatchMetricsEnabled in VisibilityConfig"],resourceTypes:["AWS::WAFv2::WebACL"]},"cross-resource-misconfiguration":{ruleId:"cross-resource-misconfiguration",checkKey:"crossResourceRelationships",name:"Cross-Resource Misconfiguration",description:"Detects misconfigurations only visible across multiple resources: Lambda functions referencing VPC-only resources without VpcConfig, S3 replication without encryption configuration, and security groups exposing non-standard ports to the public when used by sensitive services.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Configure VpcConfig on Lambda functions that reach VPC-only resources (RDS, ElastiCache, Redshift, OpenSearch, ECS Service)","Specify EncryptionConfiguration on S3 replication rules so replicated objects retain encryption at the destination","Restrict 0.0.0.0/0 ingress on non-standard ports for security groups attached to sensitive services"],resourceTypes:["AWS::Lambda::Function","AWS::S3::Bucket","AWS::EC2::SecurityGroup","AWS::RDS::DBInstance","AWS::ElastiCache::CacheCluster","AWS::Redshift::Cluster","AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain","AWS::ECS::Service"]},"stack-architecture-recommendations":{ruleId:"stack-architecture-recommendations",checkKey:"stackArchitecture",name:"Stack Architecture Recommendations",description:"Detects architectural omissions across the stack: missing CloudWatch Alarms on critical resources, Lambda functions without X-Ray tracing, public-facing resources without WAF, RDS databases without Secrets Manager rotation, and excessive NAT Gateway usage.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/wellarchitected/latest/framework/welcome.html",remediationSteps:["Add CloudWatch Alarms on key metrics (Lambda errors, ECS task failures, RDS connections)","Enable X-Ray tracing on Lambda functions for distributed-request visibility","Associate AWS WAF with public-facing API Gateway, ALB, or CloudFront distributions","Use Secrets Manager with automatic rotation for RDS database credentials","Audit NAT Gateway count and consider VPC endpoints or NAT instances for cost reduction"],resourceTypes:["AWS::Lambda::Function","AWS::ApiGateway::RestApi","AWS::ApiGatewayV2::Api","AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::CloudFront::Distribution","AWS::RDS::DBInstance","AWS::EC2::NatGateway","AWS::CloudWatch::Alarm"]}};var dT=(()=>{let e=new Map;for(let t of Object.values(sr))t.checkKey&&t.ruleId&&e.set(t.checkKey,t.ruleId);return e})(),mT={IAM:["AWS::IAM::"],S3:["AWS::S3::"],Lambda:["AWS::Lambda::"],DynamoDB:["AWS::DynamoDB::"],RDS:["AWS::RDS::"],EC2:["AWS::EC2::"],SNS:["AWS::SNS::"],SQS:["AWS::SQS::"],StepFunctions:["AWS::StepFunctions::"],CloudTrail:["AWS::CloudTrail::"],ApiGateway:["AWS::ApiGateway::","AWS::ApiGatewayV2::"],SecretsManager:["AWS::SecretsManager::"],KMS:["AWS::KMS::"],EventBridge:["AWS::Events::"],CloudFront:["AWS::CloudFront::"],ELB:["AWS::ElasticLoadBalancing::","AWS::ElasticLoadBalancingV2::"],ECS:["AWS::ECS::"],Cognito:["AWS::Cognito::"],WAF:["AWS::WAFv2::","AWS::WAF::"],CloudWatch:["AWS::CloudWatch::","AWS::Logs::"],Route53:["AWS::Route53::"],ElastiCache:["AWS::ElastiCache::"],ECR:["AWS::ECR::"],OpenSearch:["AWS::OpenSearchService::","AWS::Elasticsearch::"],ACM:["AWS::CertificateManager::"],Backup:["AWS::Backup::"],VPC:["AWS::EC2::VPC","AWS::EC2::FlowLog","AWS::EC2::SecurityGroup"],Kinesis:["AWS::Kinesis::"],AppSync:["AWS::AppSync::"],EKS:["AWS::EKS::"],Redshift:["AWS::Redshift::"],MSK:["AWS::MSK::"],Glue:["AWS::Glue::"],EFS:["AWS::EFS::"],AutoScaling:["AWS::AutoScaling::"]},iz=$r({ttl:3e5,maxSize:100});var fT=Kh(qh,{ttl:6e5,maxSize:10}),gT=e=>{if(e.includes("All services")||e.length===0)return s=>!s.Type.startsWith("AWS::CDK::");let t=[];for(let s of e){if(s==="All services")continue;let n=mT[s];n&&t.push(...n)}return t.length===0?s=>!s.Type.startsWith("AWS::CDK::"):s=>!s.Type.startsWith("AWS::CDK::")&&t.some(n=>s.Type.startsWith(n))},hT=e=>{let t=new Map,s={CRITICAL:4,HIGH:3,MEDIUM:2,LOW:1};for(let n of e){let r=n.issue,i=t.get(r);i?s[n.severity]>s[i.severity]&&t.set(r,n):t.set(r,n)}return Array.from(t.values())},yT=(e,t,s,n)=>{let r={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},i={},o=0;for(let a of Object.values(e))for(let u of a.issues){o++,r[u.severity]++;let c=u.ruleId?Gr(u.ruleId)??"Other":"Other";i[c]=(i[c]||0)+1}return{totalResources:t,analyzedResources:Object.keys(e).length,totalFindings:o,findingsBySeverity:r,findingsByService:i,analysisTimeMs:Date.now()-n,servicesAnalyzed:s}},Fo=(e,t,s=[],n={},r=[],i)=>ST(e,t,{selectedServices:s,solutionsRegistry:n,deduplicateFindings:!0,includeStatistics:!1,customRules:r,ruleContext:i}).findings,ST=(e,t,s={})=>{let n=Date.now(),{selectedServices:r=[],solutionsRegistry:i={},deduplicateFindings:o=!0,customRules:a=[],ruleContext:u}=s,c=fT(),l=new Set(["solutionsPatterns","stackArchitecture","crossResourceRelationships"]),p=Object.keys(c).filter(E=>!l.has(E)),{services:d}=Zh(r),m=Yh(d,p),f={},g=gT(d),h=Object.keys(e.Resources||{}).length,y=Object.entries(e.Resources||{}).filter(([,E])=>g(E)).reduce((E,[O,M])=>(E[O]=M,E),{}),b=[];for(let E of m)try{let O=c[E];if(typeof O!="function"){let X=Gr(E)??E;ye.warn(`\u26A0\uFE0F Service check function for ${X} (${E}) is not available`);continue}let M=O({Resources:y},t,u);b.push(E);let P=dT.get(E);for(let[X,B]of Object.entries(M)){if(f[X]||(f[X]={issues:[]}),P)for(let z of B.issues)z.ruleId||(z.ruleId=P);f[X].issues.push(...B.issues)}}catch(O){let M=Gr(E)??E;ye.warn(`\u26A0\uFE0F Error in ${M} analysis (${E})`,{error:O instanceof Error?O.message:String(O)})}if(Object.keys(i).length>0)try{let E=c.solutionsPatterns({Resources:y},i);for(let O of E){let M=O.resourceId;f[M]||(f[M]={issues:[]}),f[M].issues.push(O)}}catch(E){ye.warn("\u26A0\uFE0F Error in solutions pattern analysis",{error:E instanceof Error?E.message:String(E)})}if(a.length>0)try{let E=aS(e,a,t);for(let[O,M]of Object.entries(E))f[O]||(f[O]={issues:[]}),f[O].issues.push(...M.issues);ye.info(`Custom rules evaluated: ${a.length} rule(s)`)}catch(E){ye.warn("\u26A0\uFE0F Error evaluating custom rules",{error:E instanceof Error?E.message:String(E)})}if(o)for(let E of Object.keys(f))f[E].issues=hT(f[E].issues);Object.keys(f).length===0&&ye.info(`\x1B[32m\u2705 No security or cost issues detected!\x1B[0m
|
|
91
|
+
`+i)}}catch{}}throw n}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Ht(this.defaults,s);let{transitional:n,paramsSerializer:r,headers:i}=s;n!==void 0&&Nr.assertOptions(n,{silentJSONParsing:Pt.transitional(Pt.boolean),forcedJSONParsing:Pt.transitional(Pt.boolean),clarifyTimeoutError:Pt.transitional(Pt.boolean),legacyInterceptorReqResOrdering:Pt.transitional(Pt.boolean)},!1),r!=null&&(D.isFunction(r)?s.paramsSerializer={serialize:r}:Nr.assertOptions(r,{encode:Pt.function,serialize:Pt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Nr.assertOptions(s,{baseUrl:Pt.spelling("baseURL"),withXsrfToken:Pt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let o=i&&D.merge(i.common,i[s.method]);i&&D.forEach(["delete","get","head","post","put","patch","query","common"],f=>{delete i[f]}),s.headers=Ne.concat(o,i);let a=[],u=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(s)===!1)return;u=u&&g.synchronous;let h=s.transitional||Cs;h&&h.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});let c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let l,p=0,d;if(!u){let f=[Qi.bind(this),void 0];for(f.unshift(...a),f.push(...c),d=f.length,l=Promise.resolve(s);p<d;)l=l.then(f[p++],f[p++]);return l}d=a.length;let m=s;for(;p<d;){let f=a[p++],g=a[p++];try{m=f(m)}catch(h){g.call(this,h);break}}try{l=Qi.call(this,m)}catch(f){return Promise.reject(f)}for(p=0,d=c.length;p<d;)l=l.then(c[p++],c[p++]);return l}getUri(t){t=Ht(this.defaults,t);let s=$s(t.baseURL,t.url,t.allowAbsoluteUrls);return js(s,t.params,t.paramsSerializer)}};D.forEach(["delete","get","head","options"],function(t){Nn.prototype[t]=function(s,n){return this.request(Ht(n||{},{method:t,url:s,data:(n||{}).data}))}});D.forEach(["post","put","patch","query"],function(t){function s(n){return function(i,o,a){return this.request(Ht(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Nn.prototype[t]=s(),t!=="query"&&(Nn.prototype[t+"Form"]=s(!0))});var Wr=Nn;var $c=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(i){s=i});let n=this;this.promise.then(r=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](r);n._listeners=null}),this.promise.then=r=>{let i,o=new Promise(a=>{n.subscribe(a),i=a}).then(r);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,a){n.reason||(n.reason=new vt(i,o,a),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){let t=new AbortController,s=n=>{t.abort(n)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new e(function(r){t=r}),cancel:t}}},kf=$c;function Gc(e){return function(s){return e.apply(null,s)}}function Hc(e){return D.isObject(e)&&e.isAxiosError===!0}var zc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zc).forEach(([e,t])=>{zc[t]=e});var Tf=zc;function Pf(e){let t=new Wr(e),s=Dr(Wr.prototype.request,t);return D.extend(s,Wr.prototype,t,{allOwnKeys:!0}),D.extend(s,t,null,{allOwnKeys:!0}),s.create=function(r){return Pf(Ht(e,r))},s}var Ve=Pf(Pn);Ve.Axios=Wr;Ve.CanceledError=vt;Ve.CancelToken=kf;Ve.isCancel=kr;Ve.VERSION=cs;Ve.toFormData=vs;Ve.AxiosError=N;Ve.Cancel=Ve.CanceledError;Ve.all=function(t){return Promise.all(t)};Ve.spread=Gc;Ve.isAxiosError=Hc;Ve.mergeConfig=Ht;Ve.AxiosHeaders=Ne;Ve.formToJSON=e=>$i(D.isHTMLForm(e)?new FormData(e):e);Ve.getAdapter=Ji.getAdapter;Ve.HttpStatusCode=Tf;Ve.default=Ve;var Lt=Ve;var{Axios:Q1,AxiosError:X1,CanceledError:eN,isCancel:tN,CancelToken:sN,VERSION:nN,all:rN,Cancel:iN,isAxiosError:oN,spread:aN,toFormData:cN,AxiosHeaders:uN,HttpStatusCode:lN,formToJSON:pN,getAdapter:dN,mergeConfig:mN,create:fN}=Lt;var Wn=(e,t)=>{let s=[];if(e==null)return s;if(typeof e=="string"){let n=e.matchAll(/\$\{([^.}]+)(?:\.[^}]+)?\}/g);for(let r of n){let i=r[1];t.has(i)&&s.push(i)}return s}if(Array.isArray(e)){for(let n of e)s.push(...Wn(n,t));return s}if(typeof e=="object"){let n=e;if("Ref"in n&&typeof n.Ref=="string"&&t.has(n.Ref)&&s.push(n.Ref),"Fn::GetAtt"in n){let r=n["Fn::GetAtt"];if(Array.isArray(r)&&typeof r[0]=="string")t.has(r[0])&&s.push(r[0]);else if(typeof r=="string"){let i=r.split(".")[0];t.has(i)&&s.push(i)}}if("Fn::Sub"in n){let r=n["Fn::Sub"];Array.isArray(r)?(s.push(...Wn(r[0],t)),r[1]&&typeof r[1]=="object"&&s.push(...Wn(r[1],t))):s.push(...Wn(r,t))}for(let[r,i]of Object.entries(n))["Ref","Fn::GetAtt","Fn::Sub"].includes(r)||s.push(...Wn(i,t))}return s},DE=e=>e.DependsOn?Array.isArray(e.DependsOn)?e.DependsOn:[e.DependsOn]:[],vE=(e,t)=>{if(t.length===0)return;let s=new Set(t.map(i=>i.type.split("::")[2]||i.type)),n=Array.from(s).slice(0,3),r=e.split("::")[2]||e;if(e.includes("SecurityGroup"))return`Security group attached to: ${n.join(", ")}`;if(e.includes("IAM::Role"))return`IAM role assumed by: ${n.join(", ")}`;if(e.includes("VPC")||e.includes("Subnet"))return`Network hosting: ${n.join(", ")}`;if(e.includes("KMS::Key"))return`Encryption key used by: ${n.join(", ")}`;if(e.includes("S3::Bucket")){if(n.some(i=>i.includes("Lambda")))return"S3 bucket accessed by Lambda functions";if(n.some(i=>i.includes("CloudFront")))return"S3 bucket serving as CloudFront origin"}if(e.includes("DynamoDB::Table")&&n.some(i=>i.includes("Lambda")))return"DynamoDB table accessed by Lambda functions";if(t.length>0)return`Referenced by ${t.length} resource${t.length>1?"s":""}: ${n.join(", ")}`},Vs=e=>{let t=new Set(Object.keys(e)),s={};for(let n of t)s[n]={dependencies:[],dependents:[]};for(let[n,r]of Object.entries(e)){let i=DE(r),o=Wn(r.Properties,t),a=[...new Set([...i,...o])];s[n].dependencies=a;for(let u of a)s[u]&&s[u].dependents.push(n)}for(let[n,r]of Object.entries(e)){let i=s[n],o=i.dependents.map(a=>({id:a,type:e[a]?.Type||"Unknown"}));i.usageDescription=vE(r.Type,o)}return s},eo=(e,t,s)=>{let n=t[e];if(!n)return{dependencies:[],dependents:[]};let r=n.dependencies.map(o=>{let a=s[o]?.Type?.split("::")[2]||o;return`${o} (${a})`}),i=n.dependents.map(o=>{let a=s[o]?.Type?.split("::")[2]||o;return`${o} (${a})`});return{dependencies:r,dependents:i,usageDescription:n.usageDescription}};var CE=(e,t,s)=>{let n={},r=new Set(["AWS::RDS::DBInstance","AWS::RDS::DBCluster","AWS::ElastiCache::CacheCluster","AWS::ElastiCache::ReplicationGroup","AWS::Redshift::Cluster","AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain","AWS::ECS::Service"]),i=new Set(Object.entries(e).filter(([,o])=>r.has(o.Type)).map(([o])=>o));for(let[o,a]of Object.entries(e)){if(a.Type!=="AWS::Lambda::Function")continue;let u=a.Properties||{},c=!!(u.VpcConfig&&(u.VpcConfig.SubnetIds||u.VpcConfig.SecurityGroupIds)),l=t[o];if(!l)continue;if(l.dependencies.some(d=>i.has(d))&&!c){n[o]||(n[o]={issues:[]});let d=l.dependencies.filter(m=>i.has(m));n[o].issues.push(s(o,`Lambda function references VPC resources (${d.join(", ")}) but is not VPC-enabled`,"Configure VpcConfig with appropriate SubnetIds and SecurityGroupIds to allow the Lambda function to connect to VPC resources. Without VPC configuration, the function cannot reach private resources like RDS databases.","HIGH","Reliability",a.Metadata?.["aws:cdk:path"]||o,"cdkInsights"))}}return n},AE=(e,t)=>{let s={},n=new Map;for(let[r,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let o=i.Properties||{},a=!!(o.BucketEncryption||o.ServerSideEncryptionConfiguration);n.set(r,a)}for(let[r,i]of Object.entries(e)){if(i.Type!=="AWS::S3::Bucket")continue;let a=(i.Properties||{}).ReplicationConfiguration;if(!a)continue;let u=n.get(r),c=a.Rules;if(!(!c||!Array.isArray(c)))for(let l of c){if(l.Status!=="Enabled")continue;let p=l.Destination;if(!p||!p.Bucket)continue;let m=p.EncryptionConfiguration;u&&!m&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,"S3 replication configured without encryption configuration for replicated objects","Specify EncryptionConfiguration in the replication rule to ensure replicated objects maintain encryption. Use ReplicaKmsKeyID to specify the KMS key for encrypting replicated objects in the destination bucket.","MEDIUM","Security",i.Metadata?.["aws:cdk:path"]||r,"cdkInsights")))}}return s},xE=(e,t,s)=>{let n={},r=new Set([80,443,8080,8443]);for(let[i,o]of Object.entries(e)){if(o.Type!=="AWS::EC2::SecurityGroup")continue;let u=(o.Properties||{}).SecurityGroupIngress||[],c=t[i];if(!(c&&c.dependents.length>0))continue;let p=[];for(let d of u){let m=d.CidrIp,f=d.CidrIpv6,g=d.FromPort,h=d.ToPort;if(!(m==="0.0.0.0/0"||f==="::/0")||g===void 0)continue;let b=h!==void 0&&h!==g,x=!r.has(g);(b||x)&&p.push(g)}if(p.length>0){n[i]||(n[i]={issues:[]});let d=c.dependents.map(m=>e[m]?.Type?.split("::")[2]||"Unknown").join(", ");n[i].issues.push(s(i,`Security group used by ${d} has public access on non-standard ports: ${p.join(", ")}`,"Restrict ingress rules to specific CIDR blocks or reference other security groups instead of allowing 0.0.0.0/0 on non-standard ports. Consider using a bastion host or VPN for administrative access.","HIGH","Security",o.Metadata?.["aws:cdk:path"]||i,"cdkInsights"))}}return n},to=(e,t)=>{let s=e.Resources||{},n=Vs(s),r={},i=[CE(s,n,t),AE(s,t),xE(s,n,t)];for(let o of i)for(let[a,u]of Object.entries(o))r[a]||(r[a]={issues:[]}),r[a].issues.push(...u.issues);return r};var wE=e=>{let t=[],s=Object.values(e).map(P=>P.Type),n={};for(let P of s)n[P]=(n[P]||0)+1;let r=s.some(P=>P==="AWS::Lambda::Function"),i=s.some(P=>P==="AWS::ApiGateway::RestApi"||P==="AWS::ApiGatewayV2::Api"),o=s.some(P=>P==="AWS::DynamoDB::Table"),a=s.some(P=>P==="AWS::S3::Bucket");r&&(o||a)&&!s.some(P=>P.includes("ECS")||P.includes("EC2::Instance"))&&t.push("serverless");let u=s.some(P=>P==="AWS::ECS::Service"||P==="AWS::ECS::TaskDefinition"||P==="AWS::ECS::Cluster"),c=s.some(P=>P.startsWith("AWS::EKS::"));(u||c)&&t.push("container-based");let l=s.some(P=>P.startsWith("AWS::Events::")),p=s.some(P=>P==="AWS::SNS::Topic"),d=s.some(P=>P==="AWS::SQS::Queue"),m=s.some(P=>P.startsWith("AWS::Kinesis::")),f=s.some(P=>P.startsWith("AWS::StepFunctions::"));(l||p||d||m||f)&&r&&t.push("event-driven"),i&&t.push("api-gateway");let g=s.some(P=>P.startsWith("AWS::Glue::")),h=s.some(P=>P.startsWith("AWS::Athena::")),y=s.some(P=>P.startsWith("AWS::EMR::"));(m||g||h||y)&&t.push("data-processing");let b=s.some(P=>P==="AWS::CloudFront::Distribution");a&&b&&!r&&!u&&t.push("static-website");let x=n["AWS::Lambda::Function"]||0,v=n["AWS::ECS::Service"]||0;(x>=3||v>=2)&&t.push("microservices");let E=s.some(P=>P==="AWS::EC2::Instance"),O=s.some(P=>P==="AWS::RDS::DBInstance"||P==="AWS::RDS::DBCluster"),M=s.some(P=>P==="AWS::ElasticLoadBalancingV2::LoadBalancer");return E&&(O||M)&&t.push("traditional"),t},EE=(e,t)=>{let s={},n=Object.values(e).map(l=>l.Type),r=n.some(l=>l==="AWS::CloudWatch::Alarm"),i=n.some(l=>l==="AWS::Lambda::Function"),o=n.some(l=>l==="AWS::ECS::Service"),a=n.some(l=>l==="AWS::RDS::DBInstance"||l==="AWS::RDS::DBCluster");(i||o||a)&&!r&&(s["Stack Architecture"]={issues:[t("Stack Architecture","No CloudWatch Alarms defined for critical resources","Add CloudWatch Alarms to monitor key metrics like Lambda errors, ECS task failures, or RDS connections. Consider using CDK's built-in alarm methods or aws-cdk-lib/aws-cloudwatch.","MEDIUM","Operational Excellence","Stack Architecture","cdkInsights")]});let u=n.some(l=>l==="AWS::XRay::Group"||l==="AWS::XRay::SamplingRule");return n.filter(l=>l==="AWS::Lambda::Function").length>=3&&!u&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","Multiple Lambda functions without X-Ray tracing configuration","Enable X-Ray tracing for your Lambda functions to gain visibility into distributed request flows and identify performance bottlenecks. Set tracing: lambda.Tracing.ACTIVE on your functions.","LOW","Operational Excellence","Stack Architecture","cdkInsights"))),s},RE=(e,t)=>{let s={},n=Object.values(e).map(d=>d.Type),r=n.some(d=>d==="AWS::ApiGateway::RestApi"||d==="AWS::ApiGatewayV2::Api"),i=n.some(d=>d==="AWS::ElasticLoadBalancingV2::LoadBalancer"),o=n.some(d=>d==="AWS::CloudFront::Distribution"),a=n.some(d=>d==="AWS::WAFv2::WebACL"||d==="AWS::WAF::WebACL");(r||i||o)&&!a&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","Public-facing resources without WAF protection","Consider adding AWS WAF to protect your API Gateway, ALB, or CloudFront distribution from common web exploits. WAF can help prevent SQL injection, XSS, and rate-limit malicious traffic.","MEDIUM","Security","Stack Architecture","cdkInsights")));let u=n.some(d=>d==="AWS::SecretsManager::Secret"),c=n.some(d=>d==="AWS::SSM::Parameter"),l=n.some(d=>d==="AWS::RDS::DBInstance"||d==="AWS::RDS::DBCluster"),p=!1;for(let[d,m]of Object.entries(e))if(m.Type==="AWS::Lambda::Function"){let f=m.Properties?.Environment?.Variables;if(f){let g=["PASSWORD","SECRET","API_KEY","TOKEN","CREDENTIAL"];for(let h of Object.keys(f))if(g.some(y=>h.toUpperCase().includes(y))){let y=f[h];if(typeof y=="string"&&!y.startsWith("{{")){p=!0;break}}}}return l&&!u&&!c&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","RDS database without Secrets Manager for credential rotation","Use AWS Secrets Manager to store and automatically rotate database credentials. This improves security by eliminating hardcoded passwords and enabling automatic credential rotation.","HIGH","Security","Stack Architecture","cdkInsights"))),s},FE=(e,t)=>{let s={},n=Object.values(e).filter(c=>c.Type==="AWS::EC2::NatGateway").length;n>=3&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture",`${n} NAT Gateways detected - potential cost optimization`,"Multiple NAT Gateways can be expensive ($32/month each + data processing). Consider if all are necessary, or explore alternatives like NAT instances for dev environments, or VPC endpoints for AWS services.","MEDIUM","Cost Optimization","Stack Architecture","cdkInsights")));let r=n>0,i=Object.values(e).some(c=>c.Type==="AWS::EC2::VPCEndpoint"),o=Object.values(e).some(c=>{if(c.Type!=="AWS::Lambda::Function")return!1;let l=c.Properties?.VpcConfig;return l?.SubnetIds||l?.SecurityGroupIds}),a=Object.values(e).some(c=>c.Type==="AWS::S3::Bucket"),u=Object.values(e).some(c=>c.Type==="AWS::DynamoDB::Table");return o&&r&&!i&&(a||u)&&(s["Stack Architecture"]||(s["Stack Architecture"]={issues:[]}),s["Stack Architecture"].issues.push(t("Stack Architecture","VPC Lambda functions accessing AWS services through NAT Gateway","Consider using VPC Endpoints (Gateway endpoints for S3/DynamoDB are free) instead of routing AWS service traffic through NAT Gateway. This reduces costs and improves latency.","LOW","Cost Optimization","Stack Architecture","cdkInsights"))),s},IE=(e,t,s)=>{let n={};for(let[r,i]of Object.entries(t)){let o=e[r];if(!o)continue;let a=i.dependents.length;if(a>=5){let u=o.Type.split("::")[2]||o.Type;n["Stack Architecture"]||(n["Stack Architecture"]={issues:[]}),n["Stack Architecture"].issues.push(s("Stack Architecture",`${u} (${r}) is a potential single point of failure with ${a} dependent resources`,"Consider adding redundancy or failover mechanisms for this critical resource. For databases, consider Multi-AZ. For queues, consider dead-letter queues. For Lambda, ensure proper error handling.","MEDIUM","Reliability","Stack Architecture","cdkInsights"))}}for(let[r,i]of Object.entries(e)){if(i.Type!=="AWS::DynamoDB::Table")continue;if(i.Properties?.PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled!==!0){let a=t[r];a&&a.dependents.length>=3&&(n["Stack Architecture"]||(n["Stack Architecture"]={issues:[]}),n["Stack Architecture"].issues.push(s("Stack Architecture",`Critical DynamoDB table ${r} has ${a.dependents.length} dependents but no point-in-time recovery`,"Enable Point-in-Time Recovery (PITR) for critical DynamoDB tables used by multiple resources. This provides continuous backups with 35-day retention.","HIGH","Reliability","Stack Architecture","cdkInsights")))}}return n},so=(e,t)=>{let s=e.Resources||{};if(Object.keys(s).length<3)return{};let r=Vs(s),i=wE(s),o={},a=[EE(s,t),RE(s,t),FE(s,t),IE(s,r,t)];for(let u of a)for(let[c,l]of Object.entries(u))o[c]||(o[c]={issues:[]}),o[c].issues.push(...l.issues);return o};var no=require("node:fs"),Ur=require("node:path");function Lf(){let e;try{e=require.resolve("@aws-solutions-constructs/core/package.json")}catch{return[]}let t=(0,Ur.dirname)((0,Ur.dirname)(e));return(0,no.readdirSync)(t).filter(s=>s!=="core"&&s.startsWith("aws-")&&(0,no.statSync)((0,Ur.join)(t,s)).isDirectory())}var _f={"aws-apigateway-dynamodb":{className:"ApiGatewayToDynamoDB",packageName:"aws-apigateway-dynamodb",friendlyName:"Api Gateway To Dynamo DB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-dynamodb",requiredResourceTypes:["AWS::DynamoDB::Table","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigateway-kinesisstreams":{className:"ApiGatewayToKinesisStreams",packageName:"aws-apigateway-kinesisstreams",friendlyName:"Api Gateway To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-kinesisstreams",requiredResourceTypes:["AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::RequestValidator","AWS::ApiGateway::Model","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy","AWS::CloudWatch::Alarm","AWS::Kinesis::Stream"]},"aws-apigateway-lambda":{className:"ApiGatewayToLambda",packageName:"aws-apigateway-lambda",friendlyName:"Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account"]},"aws-apigateway-sqs":{className:"ApiGatewayToSqs",packageName:"aws-apigateway-sqs",friendlyName:"Api Gateway To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::IAM::Role","AWS::ApiGateway::Account","AWS::IAM::Policy"]},"aws-apigatewayv2websocket-sqs":{className:"ApiGatewayV2WebSocketToSqs",packageName:"aws-apigatewayv2websocket-sqs",friendlyName:"Api Gateway V2 Web Socket To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigatewayv2websocket-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigatewayv2websocket-sqs",requiredResourceTypes:["AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::ApiGatewayV2::Api","AWS::ApiGatewayV2::Integration","AWS::ApiGatewayV2::Route","AWS::ApiGatewayV2::Stage","AWS::Logs::LogGroup"]},"aws-cloudfront-apigateway-lambda":{className:"CloudFrontToApiGatewayToLambda",packageName:"aws-cloudfront-apigateway-lambda",friendlyName:"Cloud Front To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::CloudFront::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Distribution"]},"aws-cloudfront-mediastore":{className:"CloudFrontToMediaStore",packageName:"aws-cloudfront-mediastore",friendlyName:"Cloud Front To Media Store",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-mediastore/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-mediastore",requiredResourceTypes:["AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::MediaStore::Container","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::OriginRequestPolicy","AWS::CloudFront::Function","AWS::CloudFront::Distribution"]},"aws-cloudfront-oai-s3":{className:"CloudFrontToOaiToS3",packageName:"aws-cloudfront-oai-s3",friendlyName:"Cloud Front To Oai To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-oai-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-oai-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::CloudFrontOriginAccessIdentity","AWS::CloudFront::Distribution"]},"aws-cloudfront-s3":{className:"CloudFrontToS3",packageName:"aws-cloudfront-s3",friendlyName:"Cloud Front To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::CloudFront::Function","AWS::CloudFront::OriginAccessControl","AWS::CloudFront::Distribution"]},"aws-cognito-apigateway-lambda":{className:"CognitoToApiGatewayToLambda",packageName:"aws-cognito-apigateway-lambda",friendlyName:"Cognito To Api Gateway To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cognito-apigateway-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cognito-apigateway-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Logs::LogGroup","AWS::ApiGateway::RestApi","AWS::ApiGateway::Deployment","AWS::ApiGateway::Stage","AWS::ApiGateway::Resource","AWS::Lambda::Permission","AWS::ApiGateway::Method","AWS::ApiGateway::UsagePlan","AWS::ApiGateway::Account","AWS::Cognito::UserPool","AWS::Cognito::UserPoolClient","AWS::ApiGateway::Authorizer"]},"aws-dynamodbstreams-lambda":{className:"DynamoDBStreamsToLambda",packageName:"aws-dynamodbstreams-lambda",friendlyName:"Dynamo DBStreams To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::EventSourceMapping","AWS::DynamoDB::Table","AWS::SQS::Queue","AWS::SQS::QueuePolicy"]},"aws-kinesisfirehose-s3":{className:"KinesisFirehoseToS3",packageName:"aws-kinesisfirehose-s3",friendlyName:"Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisfirehose-s3",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream"]},"aws-kinesisstreams-kinesisfirehose-s3":{className:"KinesisStreamsToKinesisFirehoseToS3",packageName:"aws-kinesisstreams-kinesisfirehose-s3",friendlyName:"Kinesis Streams To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-kinesisstreams-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-kinesisstreams-kinesisfirehose-s3",requiredResourceTypes:["AWS::Kinesis::Stream","AWS::S3::Bucket","AWS::S3::BucketPolicy","AWS::Logs::LogGroup","AWS::Logs::LogStream","AWS::IAM::Role","AWS::IAM::Policy","AWS::KinesisFirehose::DeliveryStream","AWS::CloudWatch::Alarm"]},"aws-s3-lambda":{className:"S3ToLambda",packageName:"aws-s3-lambda",friendlyName:"S3 To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::Lambda::Permission"]},"aws-s3-sns":{className:"S3ToSns",packageName:"aws-s3-sns",friendlyName:"S3 To Sns",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sns",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::KMS::Key","AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-s3-sqs":{className:"S3ToSqs",packageName:"aws-s3-sqs",friendlyName:"S3 To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-s3-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-s3-sqs",requiredResourceTypes:["AWS::S3::Bucket","AWS::S3::BucketPolicy","Custom::S3BucketNotifications","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::KMS::Key","AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function"]},"aws-sns-lambda":{className:"SnsToLambda",packageName:"aws-sns-lambda",friendlyName:"Sns To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-lambda",requiredResourceTypes:["AWS::IAM::Role","AWS::IAM::Policy","AWS::Lambda::Function","AWS::Lambda::Permission","AWS::SNS::Subscription","AWS::SNS::Topic","AWS::SNS::TopicPolicy"]},"aws-sns-sqs":{className:"SnsToSqs",packageName:"aws-sns-sqs",friendlyName:"Sns To Sqs",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-sns-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-sns-sqs",requiredResourceTypes:["AWS::SNS::Topic","AWS::SNS::TopicPolicy","AWS::SQS::Queue","AWS::SQS::QueuePolicy","AWS::SNS::Subscription","AWS::KMS::Key"]},"aws-eventbridge-kinesisstreams":{className:"EventbridgeToKinesisStreams",packageName:"aws-eventbridge-kinesisstreams",friendlyName:"EventBridge To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisstreams",requiredResourceTypes:["AWS::Events::Rule","AWS::Kinesis::Stream"]},"aws-eventbridge-sns":{className:"EventbridgeToSns",packageName:"aws-eventbridge-sns",friendlyName:"EventBridge To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sns",requiredResourceTypes:["AWS::Events::Rule","AWS::SNS::Topic"]},"aws-eventbridge-sqs":{className:"EventbridgeToSqs",packageName:"aws-eventbridge-sqs",friendlyName:"EventBridge To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-sqs",requiredResourceTypes:["AWS::Events::Rule","AWS::SQS::Queue"]},"aws-eventbridge-stepfunctions":{className:"EventbridgeToStepfunctions",packageName:"aws-eventbridge-stepfunctions",friendlyName:"EventBridge To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-stepfunctions",requiredResourceTypes:["AWS::Events::Rule","AWS::StepFunctions::StateMachine"]},"aws-alb-fargate":{className:"AlbToFargate",packageName:"aws-alb-fargate",friendlyName:"ALB To Fargate",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-fargate/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-fargate",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::ECS::Cluster","AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-alb-lambda":{className:"AlbToLambda",packageName:"aws-alb-lambda",friendlyName:"ALB To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-alb-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-alb-lambda",requiredResourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::ElasticLoadBalancingV2::Listener","AWS::Lambda::Function","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-apigateway-iot":{className:"ApiGatewayToIot",packageName:"aws-apigateway-iot",friendlyName:"API Gateway To IoT",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-iot/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-iot",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Resource","AWS::ApiGateway::Method","AWS::IoT::TopicRule"]},"aws-apigateway-sagemakerendpoint":{className:"ApiGatewayToSagemakerendpoint",packageName:"aws-apigateway-sagemakerendpoint",friendlyName:"API Gateway To SageMaker Endpoint",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-apigateway-sagemakerendpoint/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-apigateway-sagemakerendpoint",requiredResourceTypes:["AWS::ApiGateway::RestApi","AWS::ApiGateway::Integration","AWS::SageMaker::Endpoint"]},"aws-cloudfront-apigateway":{className:"CloudFrontToApiGateway",packageName:"aws-cloudfront-apigateway",friendlyName:"CloudFront To API Gateway",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-cloudfront-apigateway/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-cloudfront-apigateway",requiredResourceTypes:["AWS::CloudFront::Distribution","AWS::ApiGateway::RestApi","AWS::ApiGateway::Method"]},"aws-dynamodbstreams-lambda-elasticsearch-kibana":{className:"DynamoDBStreamsToLambdaElasticsearchKibana",packageName:"aws-dynamodbstreams-lambda-elasticsearch-kibana",friendlyName:"DynamoDB Streams To Lambda Elasticsearch Kibana",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-lambda-elasticsearch-kibana/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-lambda-elasticsearch-kibana",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::Lambda::Function","AWS::Elasticsearch::Domain","AWS::IAM::Role","AWS::Logs::LogGroup"]},"aws-dynamodbstreams-pipes-stepfunctions":{className:"DynamoDBStreamsToPipesStepfunctions",packageName:"aws-dynamodbstreams-pipes-stepfunctions",friendlyName:"DynamoDB Streams To Pipes StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-dynamodbstreams-pipes-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-dynamodbstreams-pipes-stepfunctions",requiredResourceTypes:["AWS::DynamoDB::Stream","AWS::StepFunctions::StateMachine"]},"aws-eventbridge-kinesisfirehose-s3":{className:"EventbridgeToKinesisfirehoseToS3",packageName:"aws-eventbridge-kinesisfirehose-s3",friendlyName:"EventBridge To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-kinesisfirehose-s3",requiredResourceTypes:["AWS::Events::Rule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-eventbridge-lambda":{className:"EventbridgeToLambda",packageName:"aws-eventbridge-lambda",friendlyName:"EventBridge To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-eventbridge-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-eventbridge-lambda",requiredResourceTypes:["AWS::Events::Rule","AWS::Lambda::Function","AWS::IAM::Role"]},"aws-fargate-dynamodb":{className:"FargateToDynamodb",packageName:"aws-fargate-dynamodb",friendlyName:"Fargate To DynamoDB",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-dynamodb/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-dynamodb",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::DynamoDB::Table"]},"aws-fargate-eventbridge":{className:"FargateToEventbridge",packageName:"aws-fargate-eventbridge",friendlyName:"Fargate To EventBridge",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-eventbridge/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-eventbridge",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Events::Rule"]},"aws-fargate-kinesisfirehose":{className:"FargateToKinesisfirehose",packageName:"aws-fargate-kinesisfirehose",friendlyName:"Fargate To Kinesis Firehose",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisfirehose/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisfirehose",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::KinesisFirehose::DeliveryStream"]},"aws-fargate-kinesisstreams":{className:"FargateToKinesisstreams",packageName:"aws-fargate-kinesisstreams",friendlyName:"Fargate To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-kinesisstreams",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::Kinesis::Stream"]},"aws-fargate-opensearch":{className:"FargateToOpensearch",packageName:"aws-fargate-opensearch",friendlyName:"Fargate To OpenSearch",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-opensearch/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-opensearch",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::OpenSearch::Domain"]},"aws-fargate-s3":{className:"FargateToS3",packageName:"aws-fargate-s3",friendlyName:"Fargate To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-s3",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::S3::Bucket"]},"aws-fargate-secretsmanager":{className:"FargateToSecretsmanager",packageName:"aws-fargate-secretsmanager",friendlyName:"Fargate To SecretsManager",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-secretsmanager/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-secretsmanager",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SecretsManager::Secret"]},"aws-fargate-sns":{className:"FargateToSns",packageName:"aws-fargate-sns",friendlyName:"Fargate To SNS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sns/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sns",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SNS::Topic"]},"aws-fargate-sqs":{className:"FargateToSqs",packageName:"aws-fargate-sqs",friendlyName:"Fargate To SQS",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-sqs/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-sqs",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SQS::Queue"]},"aws-fargate-ssmstringparameter":{className:"FargateToSsmstringparameter",packageName:"aws-fargate-ssmstringparameter",friendlyName:"Fargate To SSM String Parameter",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-ssmstringparameter/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-ssmstringparameter",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::SSM::StringParameter"]},"aws-fargate-stepfunctions":{className:"FargateToStepfunctions",packageName:"aws-fargate-stepfunctions",friendlyName:"Fargate To StepFunctions",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-fargate-stepfunctions/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-fargate-stepfunctions",requiredResourceTypes:["AWS::ECS::TaskDefinition","AWS::ECS::Service","AWS::StepFunctions::StateMachine"]},"aws-iot-kinesisfirehose-s3":{className:"IotToKinesisfirehoseToS3",packageName:"aws-iot-kinesisfirehose-s3",friendlyName:"IoT To Kinesis Firehose To S3",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisfirehose-s3/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisfirehose-s3",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::KinesisFirehose::DeliveryStream","AWS::S3::Bucket"]},"aws-iot-kinesisstreams":{className:"IotToKinesisstreams",packageName:"aws-iot-kinesisstreams",friendlyName:"IoT To Kinesis Streams",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-kinesisstreams/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-kinesisstreams",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Kinesis::Stream"]},"aws-iot-lambda":{className:"IotToLambda",packageName:"aws-iot-lambda",friendlyName:"IoT To Lambda",documentationUrl:"https://docs.aws.amazon.com/solutions/latest/aws-iot-lambda/",githubUrl:"https://github.com/awslabs/aws-solutions-constructs/tree/main/aws-iot-lambda",requiredResourceTypes:["AWS::IoT::TopicRule","AWS::Lambda::Function","AWS::IAM::Role"]}};var Of=async e=>{let t={};for(let s of e)try{let n=await import(`@aws-solutions-constructs/${s}`),r=Object.keys(n).find(c=>/^[A-Z][a-zA-Z0-9]*To[A-Z][a-zA-Z0-9]*$/.test(c));if(!r)continue;let i=`https://docs.aws.amazon.com/solutions/latest/${s}/`,o=`https://github.com/awslabs/aws-solutions-constructs/tree/main/${s}`,u=_f[s]?.requiredResourceTypes||[];t[s]={className:r,packageName:s,friendlyName:r.replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim(),documentationUrl:i,githubUrl:o,requiredResourceTypes:u}}catch{}return t};var w=(e,t)=>e.Metadata?.["aws:cdk:path"]??t;var Bf={LOW:0,MEDIUM:1,HIGH:2,CRITICAL:3},A=(e,t)=>e?.resourceIdMetadata?.[t]?.constructLevel;var C=e=>e==="L3-aws-solutions"||e==="L3-third-party";var I=e=>{let t=Bf[e]??0;return t<=0?"LOW":Object.entries(Bf).find(([,s])=>s===t-1)?.[0]},S=(e,t,s)=>{if(!C(t))return e;let n=s?` Look for a \`${s}\` argument on the construct.`:"";return`${e} This resource is owned by an L3 pattern \u2014 fix via the pattern's props${n} rather than escape-hatching the underlying CFN resource.`},Mf=(e,t)=>{let s=e?.cdkContext?.[t];return s===!0||s==="true"};var Nf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CertificateManager::Certificate")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.ValidationMethod==="EMAIL"&&l.push(t(r,"ACM certificate uses email validation instead of DNS validation.",S("Use DNS validation for automated certificate renewal. Email validation requires manual intervention for renewals.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),i.Properties?.CertificateTransparencyLoggingPreference==="DISABLED"&&l.push(t(r,"ACM certificate has certificate transparency logging disabled.",S("Enable certificate transparency logging for security monitoring and to detect misissued certificates.",o),u("LOW"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Wf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::ApiGateway::RestApi"&&!i.Properties?.EndpointConfiguration?.Types?.includes("PRIVATE")){let o=A(s,r),a=C(o);n[r]={issues:[t(r,"API Gateway is publicly accessible.",S("If this API is intentionally public, ignore this finding (or suppress it via .cdk-insights.json). For internal APIs, use PRIVATE endpoints to restrict access.",o,"endpointConfiguration / endpointTypes"),a?"LOW":"MEDIUM","Security",w(i,r),"cdkInsights")]}}return n},{});var kE=e=>typeof e=="string"&&e.toUpperCase()==="OPTIONS",Uf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=i.Type==="AWS::ApiGateway::Method",a=i.Type==="AWS::ApiGatewayV2::Route";if(!o&&!a)return n;let u=i.Properties??{},c=u.AuthorizationType;if(o&&kE(u.HttpMethod)||!(c===void 0||c==="NONE"))return n;let p=w(i,r),d=A(s,r),m=C(d),f=o?"API Gateway Method has no authorization (AuthorizationType is NONE).":"API Gateway v2 Route has no authorization (AuthorizationType is NONE).";return n[r]={issues:[t(r,f,S("Set AuthorizationType to AWS_IAM, COGNITO_USER_POOLS, CUSTOM (REST), or JWT (HTTP API). Public-by-default endpoints expose backend Lambdas to anyone on the internet without authentication. If the route is intentionally public (e.g. a webhook receiver), prefer api-key + WAF rate limiting.",d,"methodOptions.authorizationType"),m?"MEDIUM":"HIGH","Security",p,"cdkInsights")]},n},{});var jf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AppSync::GraphQLApi")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],p=i.Properties?.AuthenticationType;p==="API_KEY"&&l.push(t(r,"AppSync API uses API key authentication.",S("Consider using AWS_IAM, AMAZON_COGNITO_USER_POOLS, or OPENID_CONNECT for production workloads. API keys are best for development or public read-only access.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let d=i.Properties?.AdditionalAuthenticationProviders;return p!=="AWS_IAM"&&(!d||d.length===0)&&l.push(t(r,"AppSync API does not have multiple authentication providers configured.",S("Consider adding AdditionalAuthenticationProviders for flexibility in authenticating different client types.",o),u("LOW"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var $f=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AppSync::GraphQLApi")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],p=i.Properties?.LogConfig;return p?p.FieldLogLevel==="NONE"&&l.push(t(r,"AppSync API has field-level logging disabled.",S("Set FieldLogLevel to ERROR or ALL to capture GraphQL resolver execution details.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")):l.push(t(r,"AppSync API does not have logging configured.",S("Enable LogConfig to capture request/response logs in CloudWatch for debugging and monitoring.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),i.Properties?.XrayEnabled!==!0&&l.push(t(r,"AppSync API does not have X-Ray tracing enabled.",S("Enable XrayEnabled for distributed tracing and performance analysis.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Gf=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::AppSync::GraphQLApi"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::WAFv2::WebACLAssociation"),i=new Set(r.map(([,o])=>{let a=o.Properties?.ResourceArn;return typeof a=="string"?a:a?.["Fn::GetAtt"]?.[0]?a["Fn::GetAtt"][0]:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"AppSync API does not have AWS WAF protection.",S("Associate a WAF WebACL to protect against common web exploits and control access to the API.",p),m("MEDIUM"),"Security",c,"cdkInsights")]}}return o},{})};var Hf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Backup::BackupPlan")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],d=i.Properties?.BackupPlan?.BackupPlanRule||[];for(let m of d){(m.CopyActions||[]).length===0&&l.push(t(r,`Backup rule "${m.RuleName||"unnamed"}" does not have cross-region copy configured.`,S("Add CopyActions to replicate backups to another region for disaster recovery.",o),u("LOW"),"Reliability",c,"cdkInsights"));let g=m.Lifecycle;!g?.DeleteAfterDays&&!g?.MoveToColdStorageAfterDays&&l.push(t(r,`Backup rule "${m.RuleName||"unnamed"}" has no lifecycle configuration.`,S("Set DeleteAfterDays or MoveToColdStorageAfterDays to manage backup retention and costs.",o),u("LOW"),"Cost Optimization",c,"cdkInsights"))}return l.length>0&&(n[r]={issues:l}),n},{});var zf=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Backup::BackupVault"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Backup::BackupVaultLock"),i=new Set(r.map(([,o])=>{let a=o.Properties?.BackupVaultName;return typeof a=="string"?a:typeof a=="object"&&a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=A(s,a),l=C(c),p=b=>l?I(b):b,d=w(u,a),m=[];u.Properties?.EncryptionKeyArn||m.push(t(a,"Backup vault uses default AWS-managed encryption key.",S("Specify a customer-managed KMS key using EncryptionKeyArn for additional control over encryption.",c),p("LOW"),"Security",d,"cdkInsights"));let g=u.Properties?.BackupVaultName,h=typeof g=="string"?g:typeof g=="object"?g?.Ref:void 0;return i.has(a)||h&&i.has(h)||m.push(t(a,"Backup vault does not have a vault lock configured.",S("Add a BackupVaultLock to enforce retention policies and prevent backup deletion for compliance requirements.",c),p("LOW"),"Security",d,"cdkInsights")),m.length>0&&(o[a]={issues:m}),o},{})};var qf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r);return i.Properties?.DistributionConfig?.DefaultCacheBehavior?.ViewerProtocolPolicy==="allow-all"&&(n[r]={issues:[t(r,"CloudFront distribution allows HTTP traffic (ViewerProtocolPolicy is allow-all).",S('Set ViewerProtocolPolicy to "https-only" or "redirect-to-https" to enforce HTTPS and protect data in transit.',o),u("HIGH"),"Security",c,"cdkInsights")]}),n},{});var Vf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r);return i.Properties?.DistributionConfig?.Logging?.Bucket||(n[r]={issues:[t(r,"CloudFront distribution does not have access logging enabled.",S("Enable access logging to an S3 bucket to track viewer requests for security analysis, auditing, and troubleshooting.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var TE=["SSLv3","TLSv1","TLSv1_2016","TLSv1.1_2016"],Kf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=w(i,r),u=i.Properties?.DistributionConfig?.ViewerCertificate,c=u?.MinimumProtocolVersion;if(u?.CloudFrontDefaultCertificate)return n;let l=A(s,r),p=C(l),d=m=>p?I(m):m;return c&&TE.includes(c)&&(n[r]={issues:[t(r,`CloudFront distribution uses outdated TLS version (${c}).`,S("Use TLSv1.2_2021 or later for improved security. Older TLS versions have known vulnerabilities.",l),d("MEDIUM"),"Security",o,"cdkInsights")]}),n},{});var Zf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudFront::Distribution")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.DistributionConfig?.WebACLId||(n[r]={issues:[t(r,"CloudFront distribution has no WAF WebACL associated.",S("Associate a WAF WebACL to protect against common web exploits, SQL injection, XSS, and DDoS attacks.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Yf=(e,t)=>Object.entries(e.Resources||{}).some(([,n])=>n.Type==="AWS::CloudTrail::Trail")?{}:{Global:{issues:[t("Global","No CloudTrail Trail defined in this stack.","CloudTrail is most commonly configured at the AWS account or organization level (one Trail covers every stack). If account-level CloudTrail is already in place, suppress this rule. If not, add a CloudTrail Trail at the account level \u2014 defining one per stack is rarely the right shape.","LOW","Security","Global","cdkInsights")]}};var Jf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::CloudWatch::Alarm")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.AlarmActions,d=i.Properties?.OKActions,m=i.Properties?.InsufficientDataActions;return(!p||p.length===0)&&l.push(t(r,"CloudWatch Alarm has no alarm actions configured.",S("Add AlarmActions (SNS topic, Lambda, etc.) to receive notifications when the alarm state changes to ALARM.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),i.Properties?.TreatMissingData||l.push(t(r,"CloudWatch Alarm does not specify how to treat missing data.",S("Set TreatMissingData to define alarm behavior when data points are missing (missing, ignore, breaching, or notBreaching).",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Qf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Logs::LogGroup")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.KmsKeyId||(n[r]={issues:[t(r,"CloudWatch Log Group is not encrypted with a customer-managed KMS key.",S("Enable KMS encryption using KmsKeyId to protect sensitive log data at rest with customer-managed keys.",o),u("LOW"),"Security",c,"cdkInsights")]}),n},{});var PE="@aws-cdk/aws-lambda:logRetentionDefaultsTo30Days",LE=e=>/\/LogRetention[0-9A-Fa-f]*$/.test(e)||/LogRetention[0-9A-Fa-f]+$/.test(e),Xf=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Logs::LogGroup")return n;let o=w(i,r),a=i.Properties?.RetentionInDays,u=A(s,r),c=C(u);return a!==void 0||Mf(s,PE)&&LE(o||r)||(n[r]={issues:[t(r,"CloudWatch Log Group has no retention period set (logs retained indefinitely).",S("Set RetentionInDays to control storage costs. Consider 30-90 days for operational logs, longer for compliance requirements.",u,"logGroupProps.retention"),c?"LOW":"MEDIUM","Cost Optimization",o,"cdkInsights")]}),n},{});var eg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Cognito::UserPool")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r),l=i.Properties?.MfaConfiguration;return(!l||l==="OFF")&&(n[r]={issues:[t(r,"Cognito User Pool has MFA disabled.",S("Enable MFA (OPTIONAL or ON) to add an extra layer of security for user authentication.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var tg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Cognito::UserPool")return n;let o=[],a=w(i,r),u=i.Properties?.PasswordPolicy,c=A(s,r),l=C(c),p=d=>l?I(d):d;if(!u)o.push(t(r,"Cognito User Pool has no password policy configured.",S("Configure a strong password policy with minimum length, uppercase, lowercase, numbers, and symbols requirements.",c,"passwordPolicy"),p("HIGH"),"Security",a,"cdkInsights"));else{let d=u.MinimumLength||8;d<12&&o.push(t(r,`Cognito password policy has minimum length of ${d} characters.`,S("Set MinimumLength to at least 12 characters for stronger security against brute-force attacks.",c,"passwordPolicy.minLength"),p("MEDIUM"),"Security",a,"cdkInsights")),u.RequireSymbols===!1&&o.push(t(r,"Cognito password policy does not require symbols.",S("Enable RequireSymbols for stronger password complexity requirements.",c,"passwordPolicy.requireSymbols"),p("LOW"),"Security",a,"cdkInsights"))}return o.length>0&&(n[r]={issues:o}),n},{});var sg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Cognito::UserPool")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r),l=i.Properties?.UserPoolAddOns?.AdvancedSecurityMode;return(!l||l==="OFF")&&(n[r]={issues:[t(r,"Cognito User Pool does not have advanced security features enabled.",S("Enable UserPoolAddOns with AdvancedSecurityMode set to AUDIT or ENFORCED to detect compromised credentials and block suspicious sign-ins.",o),u("LOW"),"Security",c,"cdkInsights")]}),n},{});var ng=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::DynamoDB::Table"||i.Properties?.SSESpecification?.SSEEnabled===!0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"DynamoDB Table is not configured with KMS encryption.",S("Set SSESpecification.SSEEnabled to true and provide a customer-managed KMSMasterKeyId. Without SSESpecification, DynamoDB encrypts with an AWS-owned key \u2014 adequate for general use but not for HIPAA / PCI-DSS workloads that require customer-controlled key rotation and audit.",u,"tableProps.encryption"),c?"LOW":"MEDIUM","Security",a,"cdkInsights")]},n},{});var rg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::DynamoDB::Table"||i.Properties?.PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled===!0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"DynamoDB Table does not have Point-in-Time Recovery enabled.",S("Set PointInTimeRecoverySpecification.PointInTimeRecoveryEnabled to true to enable continuous backups for the last 35 days. Required by HIPAA and SOC2 for data resilience.",u,"tableProps.pointInTimeRecoverySpecification"),c?"LOW":"MEDIUM","Reliability",a,"cdkInsights")]},n},{});var ig=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::DynamoDB::Table")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=i.Properties?.BillingMode,l=w(i,r);return(!c||c==="PROVISIONED")&&(n[r]={issues:[t(r,"DynamoDB table uses provisioned capacity without on-demand billing.",S("Consider using BillingMode: PAY_PER_REQUEST for automatic scaling and cost optimization, especially for unpredictable workloads. For predictable workloads, configure Application Auto Scaling.",o),u("MEDIUM"),"Cost Optimization",l,"cdkInsights")]}),n},{});var og=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::DynamoDB::Table"&&!i.Properties?.StreamSpecification){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"DynamoDB table does not have streams enabled.",S("Consider enabling DynamoDB Streams to capture item-level changes for analytics, auditing, event-driven architectures, and cross-region replication.",o),u("LOW"),"Operational Excellence",w(i,r),"cdkInsights")]}}return n},{});var ag=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::Volume")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties??{};return p.Encrypted!==!0&&c.push(t(r,"EBS Volume is not encrypted.",S("Enable encryption on EBS volumes to protect data at rest. Use the Encrypted property and optionally specify a KmsKeyId.",o),u("HIGH"),"Security",l,"cdkInsights")),p.VolumeType==="gp2"&&c.push(t(r,"EBS Volume uses gp2 storage type.",S("Consider migrating to gp3 for up to 20% cost savings with better baseline performance (3,000 IOPS and 125 MB/s throughput).",o),u("LOW"),"Cost Optimization",l,"cdkInsights")),c.length>0&&(n[r]={issues:c}),n},{});var cg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EFS::FileSystem"||i.Properties?.Encrypted===!0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"EFS FileSystem is not encrypted at rest.",S("Set Encrypted to true and provide KmsKeyId for a customer-managed key. Encryption can only be enabled at filesystem creation; existing unencrypted filesystems require data migration to a new encrypted filesystem.",u,"fileSystemProps.encrypted"),c?"MEDIUM":"HIGH","Security",a,"cdkInsights")]},n},{});var ug=e=>Array.isArray(e)&&e.length>0,lg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AutoScaling::AutoScalingGroup")return n;let o=i.Properties??{};if(!(ug(o.LoadBalancerNames)||ug(o.TargetGroupARNs))||o.HealthCheckType==="ELB")return n;let c=w(i,r),l=A(s,r),p=C(l);return n[r]={issues:[t(r,"AutoScalingGroup attached to a load balancer is not using ELB health checks.",S("Set HealthCheckType to ELB so unhealthy instances detected by the load balancer are recycled. EC2 health checks (the default) only catch instance-level failures, missing app-level outages the LB would otherwise detect.",l,"asgProps.healthCheckType"),p?"LOW":"MEDIUM","Reliability",c,"cdkInsights")]},n},{});var pg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::AutoScaling::LaunchConfiguration"||i.Properties?.AssociatePublicIpAddress!==!0)return n;let o=w(i,r),a=A(s,r),u=C(a);return n[r]={issues:[t(r,"AutoScaling LaunchConfiguration sets AssociatePublicIpAddress=true.",S("Set AssociatePublicIpAddress to false. Instances launched from this configuration will get a public IP and be reachable from the internet directly; prefer placing them in private subnets behind an ALB / NLB.",a,"launchConfigProps.associatePublicIpAddress"),u?"MEDIUM":"HIGH","Security",o,"cdkInsights")]},n},{});var dg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::EC2::Instance"&&i.Properties?.InstanceType?.toString().startsWith("t2")){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"EC2 instance is using an older t2 instance. Consider upgrading to t3 for better performance and cost savings.",S("Upgrade to a t3 instance for improved performance, lower latency, and better cost efficiency.",o),u("MEDIUM"),"Cost Optimization",w(i,r),"cdkInsights")]}}return n},{});var mg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::EC2::NatGateway"){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"NAT Gateway detected. NAT Gateways incur hourly charges (~$0.045/hr) plus data processing fees (~$0.045/GB).",S("Consider alternatives like NAT instances for lower traffic, VPC endpoints for AWS services, or IPv6 egress-only internet gateways to reduce costs.",o),u("LOW"),"Cost Optimization",w(i,r),"cdkInsights")]}}return n},{});var fg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::Instance")return n;let o=i.Properties?.NetworkInterfaces;if(!Array.isArray(o)||o.length===0||!o.some(p=>p&&p.AssociatePublicIpAddress===!0))return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"EC2 Instance has a network interface with public IP association (AssociatePublicIpAddress=true).",S("Set AssociatePublicIpAddress to false on the NetworkInterface, or remove the property and rely on subnet defaults. A public IP on the instance ENI makes it directly internet-reachable; prefer a NAT/ALB for outbound and inbound traffic.",c,"instanceProps.associatePublicIpAddress"),l?"MEDIUM":"HIGH","Security",u,"cdkInsights")]},n},{});var _E=[22,3389,3306,5432,1433,27017,6379],OE=e=>e.CidrIp==="0.0.0.0/0"||e.CidrIpv6==="::/0",BE=(e,t,s)=>t===void 0||s===void 0?!1:e>=t&&e<=s,gg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::SecurityGroup")return n;let o=A(s,r),a=C(o),u=h=>a?I(h):h,c=[],l=w(i,r),p=i.Properties?.SecurityGroupIngress||[],d=i.Properties?.SecurityGroupEgress||[],m=p.some(h=>h.CidrIp==="0.0.0.0/0"),f=p.some(h=>h.CidrIpv6==="::/0");m&&c.push(t(r,"Security Group allows unrestricted IPv4 ingress (0.0.0.0/0).",S("Restrict security group rules to specific IPs and ports.",o),u("HIGH"),"Security",l,"cdkInsights")),f&&c.push(t(r,"Security Group allows unrestricted IPv6 ingress (::/0).",S("Restrict security group rules to specific IPs and ports.",o),u("HIGH"),"Security",l,"cdkInsights"));for(let h of p)if(OE(h)){for(let y of _E)if(BE(y,h.FromPort,h.ToPort)){c.push(t(r,`Security Group exposes port ${y} to the internet.`,S("Restrict access to management and database ports. Use bastion hosts, VPN, or AWS Systems Manager Session Manager instead.",o),u("CRITICAL"),"Security",l,"cdkInsights"));break}}return d.some(h=>h.CidrIp==="0.0.0.0/0")&&c.push(t(r,"Security Group allows unrestricted egress to 0.0.0.0/0.",S("Consider restricting egress rules to specific destinations for defense in depth.",o),u("LOW"),"Security",l,"cdkInsights")),p.length===0&&d.length===0&&c.push(t(r,"Security Group has no ingress or egress rules defined.",S("Review if this security group is in use. Empty security groups may indicate orphaned resources or misconfiguration.",o),u("LOW"),"Operational Excellence",l,"cdkInsights")),c.length>0&&(n[r]={issues:c}),n},{});var hg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::Subnet"||i.Properties?.MapPublicIpOnLaunch!==!0)return n;let o=w(i,r),a=A(s,r),u=C(a);return n[r]={issues:[t(r,"EC2 Subnet auto-assigns public IPs to launched instances (MapPublicIpOnLaunch=true).",S("Set MapPublicIpOnLaunch to false unless this is intentionally a public subnet. Instances should opt into a public IP at the ENI level rather than inheriting it from subnet defaults \u2014 keeps the blast radius small if a private workload accidentally lands here.",a,"subnetProps.mapPublicIpOnLaunch"),u?"LOW":"MEDIUM","Security",o,"cdkInsights")]},n},{});var yg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECR::Repository")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.ImageTagMutability!=="IMMUTABLE"&&(n[r]={issues:[t(r,"ECR repository allows mutable image tags.",S("Set ImageTagMutability to IMMUTABLE to prevent image tags from being overwritten, ensuring deployment consistency.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Sg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECR::Repository")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.LifecyclePolicy?.LifecyclePolicyText||(n[r]={issues:[t(r,"ECR repository does not have a lifecycle policy configured.",S("Add a lifecycle policy to automatically clean up old or untagged images and reduce storage costs.",o),u("MEDIUM"),"Cost Optimization",c,"cdkInsights")]}),n},{});var bg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECR::Repository")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.ImageScanningConfiguration?.ScanOnPush!==!0&&l.push(t(r,"ECR repository does not have image scanning on push enabled.",S("Enable ScanOnPush in ImageScanningConfiguration to automatically scan images for vulnerabilities when pushed.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Dg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::TaskDefinition")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.ContainerDefinitions||[];for(let d of p)d.LogConfiguration?.LogDriver||c.push(t(r,`ECS container "${d.Name||"unnamed"}" has no logging configuration.`,S("Configure LogConfiguration with awslogs driver to send container logs to CloudWatch for monitoring and debugging.",o),u("MEDIUM"),"Operational Excellence",l,"cdkInsights"));return c.length>0&&(n[r]={issues:c}),n},{});var vg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::Service")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=i.Properties?.ServiceConnectConfiguration;if(!c||c.Enabled!==!0||c.LogConfiguration?.LogDriver)return n;let p=w(i,r);return n[r]={issues:[t(r,"ECS Service Connect is enabled without an access log configuration.",S("Configure ServiceConnectConfiguration.LogConfiguration with a LogDriver (e.g. awslogs) to capture inter-service traffic metadata for audit, debugging, and incident response.",o),u("MEDIUM"),"Security",p,"cdkInsights")]},n},{});var Cg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::TaskDefinition")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.ContainerDefinitions||[];for(let d of p){let m=d.Memory||d.MemoryReservation,f=d.Cpu;!m&&!f&&c.push(t(r,`ECS container "${d.Name||"unnamed"}" has no CPU or memory limits defined.`,S("Define CPU and Memory limits to prevent runaway containers and ensure predictable resource allocation.",o),u("LOW"),"Reliability",l,"cdkInsights"))}return c.length>0&&(n[r]={issues:c}),n},{});var ME=/(^|_)(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)(_|$)/i,Ag=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ECS::TaskDefinition")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.ContainerDefinitions||[];for(let d of p){let m=d.Environment||[];for(let f of m)ME.test(f.Name||"")&&c.push(t(r,`ECS task definition has sensitive environment variable "${f.Name}" in plaintext.`,S('Use AWS Secrets Manager or SSM Parameter Store with the "secrets" property instead of plaintext environment variables.',o),u("HIGH"),"Security",l,"cdkInsights"))}return c.length>0&&(n[r]={issues:c}),n},{});var xg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EKS::Cluster")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.EncryptionConfig?.some(m=>m.Resources?.includes("secrets"))||l.push(t(r,"EKS cluster does not have Kubernetes secrets encryption enabled.",S("Configure EncryptionConfig with a KMS key to encrypt secrets stored in etcd.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var wg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EKS::Cluster")return n;let o=A(s,r),a=C(o),u=h=>a?I(h):h,c=w(i,r),l=[],d=i.Properties?.Logging?.ClusterLogging?.EnabledTypes||[],m=d.map(h=>h.Type).filter(h=>!!h),g=["api","audit","authenticator","controllerManager","scheduler"].filter(h=>!m.includes(h));return g.length>0&&l.push(t(r,`EKS cluster is missing control plane logging for: ${g.join(", ")}.`,S("Enable all control plane log types (api, audit, authenticator, controllerManager, scheduler) for comprehensive cluster monitoring.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),d.length===0?(n[r]={issues:[t(r,"EKS cluster does not have any control plane logging enabled.",S("Enable control plane logging to CloudWatch for audit trails and troubleshooting Kubernetes API issues.",o),u("MEDIUM"),"Security",c,"cdkInsights")]},n):(l.length>0&&(n[r]={issues:l}),n)},{});var Eg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EKS::Cluster")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.ResourcesVpcConfig,d=p?.EndpointPublicAccess,m=p?.EndpointPrivateAccess,f=p?.PublicAccessCidrs;return d===!0&&m!==!0&&l.push(t(r,"EKS cluster has only public endpoint access enabled.",S("Enable EndpointPrivateAccess to allow communication between nodes and the API server within the VPC.",o),u("MEDIUM"),"Security",c,"cdkInsights")),d===!0&&(!f||f.length===0||f.includes("0.0.0.0/0"))&&l.push(t(r,"EKS cluster public endpoint is accessible from the internet (0.0.0.0/0).",S("Restrict PublicAccessCidrs to specific IP ranges that need to access the Kubernetes API.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Rg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r);return(i.Properties?.LoadBalancerAttributes||[]).some(d=>d.Key==="deletion_protection.enabled"&&d.Value==="true")||(n[r]={issues:[t(r,"Load Balancer does not have deletion protection enabled.",S("Enable deletion protection to prevent accidental deletion of the load balancer in production environments.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")]}),n},{});var Fg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::Listener")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=i.Properties?.Protocol,p=i.Properties?.Port;return l==="HTTP"&&p!==80?n[r]={issues:[t(r,`Load Balancer listener uses HTTP protocol on port ${p}.`,S("Use HTTPS protocol with a valid SSL certificate to encrypt traffic in transit.",o),u("HIGH"),"Security",c,"cdkInsights")]}:l==="HTTP"&&p===80&&((i.Properties?.DefaultActions||[]).some(f=>f.Type==="redirect"&&f.RedirectConfig?.Protocol==="HTTPS")||(n[r]={issues:[t(r,"Load Balancer HTTP listener on port 80 does not redirect to HTTPS.",S("Configure the HTTP listener to redirect to HTTPS to ensure encrypted traffic.",o),u("MEDIUM"),"Security",c,"cdkInsights")]})),n},{});var Ig=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::LoadBalancer")return n;let o=w(i,r);if(!(i.Properties?.LoadBalancerAttributes||[]).some(c=>c.Key==="access_logs.s3.enabled"&&c.Value==="true")){let c=A(s,r),l=C(c),p=d=>l?I(d):d;n[r]={issues:[t(r,"Load Balancer does not have access logging enabled.",S("Enable access logging to S3 for security analysis, auditing, and troubleshooting of traffic patterns.",c,"accessLogs / logAccessLogs"),p("MEDIUM"),"Security",o,"cdkInsights")]}}return n},{});var NE=["ELBSecurityPolicy-2016-08","ELBSecurityPolicy-TLS-1-0-2015-04","ELBSecurityPolicy-TLS-1-1-2017-01","ELBSecurityPolicy-2015-05"],kg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElasticLoadBalancingV2::Listener")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=i.Properties?.Protocol,p=i.Properties?.SslPolicy;return l!=="HTTPS"&&l!=="TLS"||p&&NE.includes(p)&&(n[r]={issues:[t(r,`Load Balancer listener uses outdated security policy (${p}).`,S("Use ELBSecurityPolicy-TLS13-1-2-2021-06 or later for TLS 1.3 support, or at minimum ELBSecurityPolicy-TLS-1-2-2017-01 for TLS 1.2.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Tg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElastiCache::ReplicationGroup")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[],p=i.Properties?.AuthToken,d=i.Properties?.TransitEncryptionEnabled;return!p&&d===!0&&l.push(t(r,"ElastiCache Redis cluster has transit encryption but no AUTH token configured.",S("Set AuthToken to require authentication for Redis connections, providing an additional security layer.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Pg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElastiCache::ReplicationGroup"&&i.Type!=="AWS::ElastiCache::CacheCluster")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.AtRestEncryptionEnabled!==!0&&l.push(t(r,"ElastiCache cluster does not have encryption at rest enabled.",S("Enable AtRestEncryptionEnabled to protect cached data at rest using AWS-managed or customer-managed keys.",o),u("HIGH"),"Security",c,"cdkInsights")),i.Properties?.TransitEncryptionEnabled!==!0&&l.push(t(r,"ElastiCache cluster does not have encryption in transit enabled.",S("Enable TransitEncryptionEnabled to protect data during transfer between clients and the cache.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Lg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::ElastiCache::ReplicationGroup")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.AutomaticFailoverEnabled,d=i.Properties?.NumNodeGroups||1,m=i.Properties?.ReplicasPerNodeGroup||0;return p!==!0&&(d>1||m>0)&&l.push(t(r,"ElastiCache replication group has replicas but automatic failover is not enabled.",S("Enable AutomaticFailoverEnabled to automatically promote a replica to primary if the primary node fails.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")),i.Properties?.MultiAZEnabled!==!0&&p===!0&&l.push(t(r,"ElastiCache replication group has automatic failover but Multi-AZ is not enabled.",S("Enable MultiAZEnabled to distribute nodes across availability zones for higher availability.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var _g=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Events::Rule")return n;let o=w(i,r),a=A(s,r),u=C(a),c=p=>u?I(p):p,l=[];return i.Properties?.State!=="ENABLED"&&l.push(t(r,"EventBridge rule is disabled or not explicitly enabled.",S("Ensure the EventBridge rule State is set to ENABLED to trigger events as expected.",a,"enabled / state"),c("MEDIUM"),"Operational Excellence",o,"cdkInsights")),(!i.Properties?.Targets||Array.isArray(i.Properties.Targets)&&i.Properties.Targets.length===0)&&l.push(t(r,"EventBridge rule has no targets configured. Events matching this rule will be silently dropped.",S("Add at least one target (Lambda, SQS, SNS, Step Functions, etc.) to process matched events. Without targets, the rule matches events but takes no action.",a,"targets"),c("HIGH"),"Reliability",o,"cdkInsights")),l.length>0&&(n[r]={issues:[...n[r]?.issues||[],...l]}),n},{});var WE=e=>{if(e==="*")return!0;if(e&&typeof e=="object"){let t=e.AWS;if(t==="*"||Array.isArray(t)&&t.includes("*"))return!0}return!1},UE=e=>e.Condition!==void 0&&e.Condition!==null&&typeof e.Condition=="object"&&Object.keys(e.Condition).length>0,Og=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Events::EventBusPolicy")return n;let o=i.Properties??{},a=[];o.Principal!==void 0&&a.push({Effect:"Allow",Principal:o.Principal,Condition:o.Condition});let u=o.Statement;if(u&&(Array.isArray(u.Statement)?a.push(...u.Statement):a.push(u)),a.filter(m=>(m.Effect===void 0||m.Effect==="Allow")&&WE(m.Principal)&&!UE(m)).length===0)return n;let l=w(i,r),p=A(s,r),d=C(p);return n[r]={issues:[t(r,"EventBridge EventBusPolicy grants access to wildcard Principal without a Condition.",S("Replace wildcard Principal with a specific AWS account / org ID, or add a Condition (e.g. aws:PrincipalOrgID) to scope cross-account access. Wildcard principals on an event bus mean any AWS account can publish events to your bus.",p,"eventBusPolicyProps.statement"),d?"HIGH":"CRITICAL","Security",l,"cdkInsights")]},n},{});var Bg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Glue::Connection")return n;let o=A(s,r),a=C(o),u=f=>a?I(f):f,c=w(i,r),l=[],p=i.Properties?.ConnectionInput,d=p?.ConnectionType,m=p?.PhysicalConnectionRequirements;if(d==="JDBC"){m?.SubnetId||l.push(t(r,"Glue JDBC connection does not specify a VPC subnet.",S("Configure PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList for network isolation.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let g=p?.ConnectionProperties?.JDBC_CONNECTION_URL||"";typeof g=="string"&&!g.includes("ssl=true")&&!g.includes("useSSL=true")&&l.push(t(r,"Glue JDBC connection URL may not enforce SSL.",S("Ensure the JDBC connection URL includes SSL parameters to encrypt data in transit.",o),u("LOW"),"Security",c,"cdkInsights"))}return l.length>0&&(n[r]={issues:l}),n},{});var Mg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Glue::Job")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[];return i.Properties?.SecurityConfiguration||l.push(t(r,"Glue job does not have a security configuration specified.",S("Create and attach a SecurityConfiguration to enable encryption for job bookmarks, S3 data, and CloudWatch logs.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Ng=/^\d{12}$/,Wg=/arn:aws:iam::(\d{12}):root/,jE=e=>{if(!e)return[];if(typeof e=="string"){if(Ng.test(e))return[e];let t=e.match(Wg);return t?[t[1]]:[]}return typeof e=="object"&&e.AWS?(Array.isArray(e.AWS)?e.AWS:[e.AWS]).flatMap(s=>{if(Ng.test(s))return[s];let n=s.match(Wg);return n?[n[1]]:[]}):[]},Ug=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::Role")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=[],l=w(i,r),p=i.Properties?.AssumeRolePolicyDocument;if(p?.Statement){for(let d of p.Statement)if(d.Effect==="Allow"){let m=jE(d.Principal);for(let f of m)c.push(t(r,`IAM Role allows cross-account trust from account ${f}.`,S("Verify this cross-account trust relationship is intentional and the external account is trusted. Consider adding conditions to restrict access.",o),u("MEDIUM"),"Security",l,"cdkInsights"))}}return c.length>0&&(n[r]={issues:c}),n},{});var jg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::Policy"&&i.Type!=="AWS::IAM::Role")return n;let o=i.Properties?.Policies,a=[];if(Array.isArray(o))for(let m of o)m?.PolicyDocument&&a.push(m.PolicyDocument);let u=i.Properties?.PolicyDocument;u&&a.push(u);let c=A(s,r),l=C(c),p=m=>l?I(m):m,d=[];for(let m of a){if(!m?.Statement)continue;let f=m.Statement;for(let g of f)if(g.Effect==="Allow"){let h=g.Action,y=g.Resource,b=h==="*"||Array.isArray(h)&&h.includes("*"),x=y==="*"||Array.isArray(y)&&y.includes("*");b&&x?d.push(t(r,"IAM policy allows all actions (*) on all resources (*). This grants administrative access.",S("Restrict both actions and resources to follow the principle of least privilege.",c,"rolePolicy / inlinePolicies"),p("CRITICAL"),"Security",r,"cdkInsights")):b?d.push(t(r,"IAM policy allows all actions (*). This is overly permissive.",S("Specify only the required actions instead of using wildcards.",c,"rolePolicy / inlinePolicies"),p("CRITICAL"),"Security",r,"cdkInsights")):x&&d.push(t(r,"IAM policy allows actions on all resources (*). This is overly permissive.",S("Restrict resources to specific ARNs instead of using wildcards.",c,"rolePolicy / inlinePolicies"),p("HIGH"),"Security",r,"cdkInsights"))}}return d.length>0&&(n[r]={issues:d}),n},{});var $E=[/\/ServiceRole\/Resource$/,/\/Role\/Resource$/,/\/InstanceRole\/Resource$/,/CustomResourceProvider\/Role$/],GE=e=>$E.some(t=>t.test(e)),$g=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::Role")return n;let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=w(i,r);return GE(c)||i.Properties?.PermissionsBoundary||(n[r]={issues:[t(r,"IAM Role has no permission boundary configured.",S("Consider using permission boundaries to limit the maximum permissions for delegated access and prevent privilege escalation.",o),u("LOW"),"Security",c,"cdkInsights")]}),n},{});var Gg=e=>Array.isArray(e)&&e.length>0,Hg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::IAM::User")return n;let o=i.Properties??{},a=Gg(o.Policies),u=Gg(o.ManagedPolicyArns);if(!a&&!u)return n;let c=w(i,r),l=A(s,r),p=C(l),d=[];return a&&d.push(t(r,"IAM User has inline policies attached.",S("Move policies to an IAM Group and add the user to the group, or attach via a Role assumed by the user. CIS AWS Foundations 1.15 requires users to inherit permissions through groups.",l,"userProps.attachInlinePolicy"),p?"LOW":"MEDIUM","Security",c,"cdkInsights")),u&&d.push(t(r,"IAM User has managed policies attached directly.",S("Attach managed policies to an IAM Group and add the user to that group. Direct attachment violates CIS AWS Foundations 1.15 (users must inherit permissions through groups).",l,"userProps.managedPolicies"),p?"LOW":"MEDIUM","Security",c,"cdkInsights")),n[r]={issues:d},n},{});var zg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Kinesis::Stream")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[],p=i.Properties?.StreamEncryption;return(!p?.EncryptionType||p.EncryptionType==="NONE")&&l.push(t(r,"Kinesis Data Stream does not have server-side encryption enabled.",S("Enable StreamEncryption with EncryptionType KMS to protect data at rest.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var qg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Kinesis::Stream")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];i.Properties?.RetentionPeriodHours===24&&l.push(t(r,"Kinesis Data Stream uses minimum retention period (24 hours).",S("Consider increasing RetentionPeriodHours for applications that need to replay or reprocess data during failures.",o),u("LOW"),"Reliability",c,"cdkInsights"));let d=i.Properties?.StreamModeDetails?.StreamMode;return l.length>0&&(n[r]={issues:l}),n},{});var HE=e=>typeof e=="string"?e==="*":typeof e=="object"?Object.values(e).some(t=>Array.isArray(t)?t.includes("*"):t==="*"):!1,Vg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if((i.Type==="AWS::KMS::Key"&&Array.isArray(i.Properties?.KeyPolicy?.Statement)?i.Properties.KeyPolicy.Statement:[]).some(u=>HE(u.Principal))){let u=A(s,r),c=C(u);n[r]={issues:[t(r,"KMS key has a public policy.",S("Restrict the KMS key policy to specific IAM roles or users to prevent unauthorized access.",u,"keyPolicy / admins / encryptionKey"),c?"HIGH":"CRITICAL","Security",w(i,r),"cdkInsights")]}}return n},{});var zE=new Set(["*","kms:*","kms:PutKeyPolicy"]),qE=new Set(["*","kms:*","kms:PutKeyPolicy"]),VE=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),KE=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),ZE=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},Kg=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],YE=e=>Kg(e).find(t=>zE.has(t)),JE=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(KE.has(t)){for(let r of n)if(VE.has(r))return!0}}return!1},QE=e=>{if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e.AWS;return(Array.isArray(t)?t:[t]).some(n=>{if(n==="*")return!1;if(typeof n=="string")return/:root$/.test(n);if(n&&typeof n=="object"){let r=JSON.stringify(n);return r.includes("AWS::AccountId")&&r.includes("root")}return!1})},XE=e=>e.Effect!=="Allow"||e.NotPrincipal!==void 0||!QE(e.Principal)?!1:Kg(e.Action).some(s=>qE.has(s)),eR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!ZE(e.Principal))return;let t=YE(e.Action);if(t&&!JE(e.Condition))return t},Zg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::KMS::Key")return n;let o=i.Properties?.KeyPolicy?.Statement;if(!Array.isArray(o)||o.some(XE))return n;let a=o.map(eR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Key policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This locks the account out of the KMS key \u2014 recovery requires breaking glass on the account root credentials AND scheduling a 7-30 day key deletion (which does not actually let you recover the key, just remove it). Effectively unrecoverable for any data the key has encrypted; AWS Support typically declines to intervene.`,S("Keep the auto-injected root Allow statement (CDK's defaultKeyPolicy) intact, or add an explicit Allow on Principal: { AWS: 'arn:aws:iam::<account>:root' } for Action: kms:*. Alternatively, add a NotPrincipal exemption or a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s).",c,"keyPolicy.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var Yg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Lambda::Function")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.ReservedConcurrentExecutions===void 0&&(n[r]={issues:[t(r,"Lambda function has no reserved concurrency configured.",S("Consider setting ReservedConcurrentExecutions to prevent the function from consuming all available account concurrency and to control scaling behavior.",o),u("LOW"),"Reliability",c,"cdkInsights")]}),n},{});var tR=new Set(["events.amazonaws.com","sns.amazonaws.com","s3.amazonaws.com","ses.amazonaws.com","codecommit.amazonaws.com","codepipeline.amazonaws.com","config.amazonaws.com","cloudwatch.amazonaws.com","iot.amazonaws.com","logs.amazonaws.com","pipes.amazonaws.com","scheduler.amazonaws.com","cognito-idp.amazonaws.com"]),sR=new Set(["apigateway.amazonaws.com","elasticloadbalancing.amazonaws.com","lambda.amazonaws.com"]),qc=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null){let t=e;if(typeof t.Ref=="string")return t.Ref;let s=t["Fn::GetAtt"];if(Array.isArray(s)&&typeof s[0]=="string")return s[0]}return null},nR=e=>{let t=new Map,s=(n,r)=>{t.has(n)||t.set(n,new Set),t.get(n)?.add(r)};for(let n of Object.values(e))if(n.Type==="AWS::Lambda::Permission"){let r=qc(n.Properties?.FunctionName),i=n.Properties?.Principal;if(!r||typeof i!="string")continue;tR.has(i)?s(r,"async"):sR.has(i)&&s(r,"sync")}else if(n.Type==="AWS::Lambda::EventSourceMapping"){let r=qc(n.Properties?.FunctionName);r&&s(r,"event-source")}else if(n.Type==="AWS::Lambda::EventInvokeConfig"){let r=qc(n.Properties?.FunctionName);r&&s(r,"async")}return t},Jg=(e,t,s)=>{let n=e.Resources||{},r=nR(n);return Object.entries(n).reduce((i,[o,a])=>{if(a.Type!=="AWS::Lambda::Function"||a.Properties?.DeadLetterConfig?.TargetArn)return i;let u=w(a,o),c=A(s,o),l=C(c),p=r.get(o)??new Set(["unknown"]),d=p.has("async"),m=p.has("sync"),f=p.has("event-source");return m&&!d&&!f?i:f&&!d?(i[o]={issues:[t(o,"Lambda function consumes an event source mapping without a failure destination.",S("For SQS/Kinesis/DynamoDB Streams, configure an OnFailure destination on the EventSourceMapping (DestinationConfig.OnFailure) \u2014 function-level DeadLetterConfig is for async invocations and does not apply to poll-based event sources.",c,"onFailure / deadLetterQueue (on EventSourceMapping)"),l?"LOW":"MEDIUM","Reliability",u,"cdkInsights")]},i):d?(i[o]={issues:[t(o,"Lambda function has no Dead Letter Queue configured for async invocations.",S("Configure a Dead Letter Queue (SQS or SNS) via DeadLetterConfig to capture failed async invocations for debugging, monitoring, and retry processing.",c,"deadLetterQueueEnabled / deadLetterQueue"),l?"LOW":"MEDIUM","Reliability",u,"cdkInsights")]},i):(i[o]={issues:[t(o,"Lambda function has no Dead Letter Queue configured (invocation mode could not be inferred).",S("No invocation source was detected in this template. If the function is invoked async (EventBridge, SNS, S3, etc.), configure DeadLetterConfig to capture failures. If it is invoked sync (API Gateway, ALB, direct invoke), DLQ does not apply and this finding can be suppressed.",c,"deadLetterQueueEnabled / deadLetterQueue"),"LOW","Reliability",u,"cdkInsights")]},i)},{})};var rR=/\b(secret|password|passwd|pwd|credential|private_key|api_key|api_secret|auth_token|access_key|access_secret|bearer_token|jwt_secret|encryption_key|signing_key)\b/i,Qg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::Lambda::Function"){let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=Object.entries(i.Properties?.Environment?.Variables||{}).filter(([l])=>rR.test(l)).map(([l])=>t(r,`Lambda function contains sensitive environment variable: ${l}.`,S("Store sensitive environment variables in AWS Secrets Manager or SSM Parameter Store instead of plaintext environment variables.",o),u("HIGH"),"Security",w(i,r),"cdkInsights"));c.length>0&&(n[r]={issues:c})}return n},{});var Xg=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::Lambda::Function"){let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=i.Properties?.MemorySize;typeof c=="number"&&c>1024&&(n[r]={issues:[t(r,"Lambda function has high memory allocation.",S("Consider reducing memory for cost savings.",o),u("MEDIUM"),"Cost Optimization",w(i,r),"cdkInsights")]})}return n},{});var iR=e=>typeof e=="string"&&/^\d{12}$/.test(e),oR=e=>{if(!e||typeof e!="object")return!1;let t=e.Ref;return typeof t=="string"&&t.endsWith("AccountId")},aR=e=>e==="*"||e===void 0,eh=e=>typeof e=="string"&&e.endsWith(".amazonaws.com"),th=e=>e?!!(e.SourceArn||e.SourceAccount||e.PrincipalOrgID||e.OrganizationId):!1,sh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=i.Type==="AWS::Lambda::Permission",a=i.Type==="AWS::Lambda::LayerVersionPermission";if(!o&&!a)return n;let u=i.Properties??{},c=u.Principal,l=[],p=w(i,r),d=A(s,r),m=C(d);return aR(c)?l.push(t(r,`${i.Type} grants public access via wildcard Principal.`,S("Set Principal to a specific AWS account ID, an AWS service principal with SourceArn/SourceAccount, or an OrganizationId. Wildcard principals make the function/layer reachable from any AWS account.",d,"permissionProps.principal"),m?"HIGH":"CRITICAL","Security",p,"cdkInsights")):o&&eh(c)&&!th(u)?l.push(t(r,"Lambda::Permission grants a service principal access without SourceArn / SourceAccount / PrincipalOrgID.",S("Constrain the service principal: set SourceArn to the specific resource that may invoke the function, or SourceAccount to your AWS account ID. Without one of these, any account using that AWS service can invoke this function (confused-deputy risk).",d,"permissionProps.sourceArn"),m?"MEDIUM":"HIGH","Security",p,"cdkInsights")):o&&!iR(c)&&!oR(c)&&!eh(c)&&!th(u)&&l.push(t(r,"Lambda::Permission has an unrecognised Principal shape with no source restriction.",S("Confirm the Principal resolves to an account ID, an org ID, or an AWS service plus a SourceArn/SourceAccount. Wildcards or unrestricted patterns expose the function publicly.",d,"permissionProps.principal"),m?"LOW":"MEDIUM","Security",p,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var cR={nodejs:"nodejs22.x","nodejs4.3":"nodejs22.x","nodejs4.3-edge":"nodejs22.x","nodejs6.10":"nodejs22.x","nodejs8.10":"nodejs22.x","nodejs10.x":"nodejs22.x","nodejs12.x":"nodejs22.x","nodejs14.x":"nodejs22.x","nodejs16.x":"nodejs22.x","nodejs18.x":"nodejs22.x","python2.7":"python3.13","python3.6":"python3.13","python3.7":"python3.13","python3.8":"python3.13","python3.9":"python3.13",java8:"java21","java8.al2":"java21",java11:"java21","dotnetcore1.0":"dotnet8","dotnetcore2.0":"dotnet8","dotnetcore2.1":"dotnet8","dotnetcore3.1":"dotnet8","dotnet5.0":"dotnet8",dotnet6:"dotnet8","ruby2.5":"ruby3.3","ruby2.7":"ruby3.3","go1.x":"provided.al2023"},nh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Lambda::Function")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=i.Properties?.Runtime;if(typeof c!="string")return n;let l=cR[c];return l&&(n[r]={issues:[t(r,`Lambda function uses deprecated runtime "${c}". This runtime has reached or is approaching end-of-life and will no longer receive security patches.`,S(`Upgrade to "${l}" for continued security patches, performance improvements, and long-term support.`,o),u("HIGH"),"Security",w(i,r),"cdkInsights")]}),n},{});var rh=(e,t,s)=>Object.values(e.Resources||{}).some(r=>r.Type==="AWS::EC2::NatGateway")?Object.entries(e.Resources||{}).reduce((r,[i,o])=>{if(o.Type!=="AWS::Lambda::Function")return r;let a=A(s,i),u=C(a),c=d=>u?I(d):d,l=w(o,i),p=o.Properties?.VpcConfig;return p?.SubnetIds&&p.SubnetIds.length>0&&(r[i]={issues:[t(i,"Lambda function in VPC with NAT Gateway detected. NAT Gateway costs can accumulate quickly.",S("Evaluate if VPC attachment is necessary. Consider using VPC endpoints for AWS services to reduce NAT costs. NAT Gateway charges ~$0.045/hr plus $0.045/GB processed.",a),c("MEDIUM"),"Cost Optimization",l,"cdkInsights")]}),r},{}):{};var ih=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::MSK::Cluster")return n;let o=A(s,r),a=C(o),u=g=>a?I(g):g,c=w(i,r),l=[],p=i.Properties?.ClientAuthentication,d=(p?.Tls?.CertificateAuthorityArnList?.length??0)>0,m=p?.Sasl?.Scram?.Enabled===!0||p?.Sasl?.Iam?.Enabled===!0,f=p?.Unauthenticated?.Enabled===!0;return!d&&!m&&l.push(t(r,"MSK cluster does not have client authentication configured.",S("Enable SASL/SCRAM, IAM authentication, or mutual TLS for client authentication.",o),u("HIGH"),"Security",c,"cdkInsights")),f&&l.push(t(r,"MSK cluster allows unauthenticated access.",S("Disable unauthenticated access and require client authentication for all connections.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var oh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::MSK::Cluster")return n;let o=A(s,r),a=C(o),u=f=>a?I(f):f,c=w(i,r),l=[],p=i.Properties?.EncryptionInfo;p?.EncryptionAtRest?.DataVolumeKMSKeyId||l.push(t(r,"MSK cluster does not use a customer-managed KMS key for encryption at rest.",S("Specify DataVolumeKMSKeyId in EncryptionAtRest for additional control over data encryption.",o),u("LOW"),"Security",c,"cdkInsights"));let m=p?.EncryptionInTransit;return m?.ClientBroker!=="TLS"&&l.push(t(r,"MSK cluster does not enforce TLS encryption for client-broker communication.",S("Set ClientBroker to TLS in EncryptionInTransit to encrypt data between clients and brokers.",o),u("HIGH"),"Security",c,"cdkInsights")),m?.InCluster!==!0&&l.push(t(r,"MSK cluster does not have encryption enabled for inter-broker communication.",S("Set InCluster to true in EncryptionInTransit to encrypt data between brokers.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var ah=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::MSK::Cluster")return n;let o=A(s,r),a=C(o),u=h=>a?I(h):h,c=w(i,r),l=[],d=i.Properties?.LoggingInfo?.BrokerLogs,m=d?.CloudWatchLogs?.Enabled===!0,f=d?.Firehose?.Enabled===!0,g=d?.S3?.Enabled===!0;return!m&&!f&&!g&&l.push(t(r,"MSK cluster does not have broker logging configured.",S("Enable broker logs to CloudWatch, Firehose, or S3 for monitoring and troubleshooting Kafka operations.",o),u("MEDIUM"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var ch=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::OpenSearchService::Domain"&&i.Type!=="AWS::Elasticsearch::Domain")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];i.Properties?.AdvancedSecurityOptions?.Enabled!==!0&&l.push(t(r,"OpenSearch domain does not have fine-grained access control enabled.",S("Enable AdvancedSecurityOptions to use IAM or internal user database for document-level and field-level security.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let d=i.Properties?.VPCOptions;return(!d?.SubnetIds||d.SubnetIds.length===0)&&l.push(t(r,"OpenSearch domain is not deployed within a VPC.",S("Configure VPCOptions with subnet IDs to deploy the domain within a VPC for network isolation.",o),u("MEDIUM"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var uh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::OpenSearchService::Domain"&&i.Type!=="AWS::Elasticsearch::Domain")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=w(i,r),l=[];return i.Properties?.EncryptionAtRestOptions?.Enabled!==!0&&l.push(t(r,"OpenSearch domain does not have encryption at rest enabled.",S("Enable EncryptionAtRestOptions to protect indexed data at rest using AWS KMS.",o),u("HIGH"),"Security",c,"cdkInsights")),i.Properties?.NodeToNodeEncryptionOptions?.Enabled!==!0&&l.push(t(r,"OpenSearch domain does not have node-to-node encryption enabled.",S("Enable NodeToNodeEncryptionOptions to encrypt data in transit between nodes within the cluster.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var lh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::OpenSearchService::Domain"&&i.Type!=="AWS::Elasticsearch::Domain")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[],p=i.Properties?.LogPublishingOptions;return p?.AUDIT_LOGS?.Enabled||l.push(t(r,"OpenSearch domain does not have audit logging enabled.",S("Enable AUDIT_LOGS in LogPublishingOptions to track user activity for security and compliance monitoring.",o),u("LOW"),"Security",c,"cdkInsights")),p?.ES_APPLICATION_LOGS?.Enabled||l.push(t(r,"OpenSearch domain does not have application logging enabled.",S("Enable ES_APPLICATION_LOGS in LogPublishingOptions to capture error logs for troubleshooting.",o),u("LOW"),"Operational Excellence",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var ph=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=w(i,r),a=i.Properties?.BackupRetentionPeriod,u=A(s,r),c=C(u),l=p=>c?I(p):p;return a===0?n[r]={issues:[t(r,"RDS instance has automated backups disabled (BackupRetentionPeriod is 0).",S("Enable automated backups with at least 7 days retention for production databases to enable point-in-time recovery.",u,"backupRetention"),l("HIGH"),"Reliability",o,"cdkInsights")]}:a!==void 0&&a<7&&(n[r]={issues:[t(r,`RDS backup retention period is only ${a} day(s).`,S("Consider increasing backup retention to at least 7 days for production databases.",u,"backupRetention"),l("MEDIUM"),"Reliability",o,"cdkInsights")]}),n},{});var dh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=w(i,r);return i.Properties?.DeletionProtection!==!0&&(n[r]={issues:[t(r,"RDS instance does not have deletion protection enabled.",S("Enable DeletionProtection to prevent accidental database deletion.",o),u("MEDIUM"),"Reliability",c,"cdkInsights")]}),n},{});var mh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::RDS::DBInstance"&&i.Properties?.StorageEncrypted!==!0){let o=A(s,r),a=C(o);n[r]={issues:[t(r,"RDS instance is not encrypted.",S("Enable encryption to protect data at rest and meet compliance standards.",o,"storageEncrypted / storageEncryptionKey"),a?"HIGH":"CRITICAL","Security",w(i,r),"cdkInsights")]}}return n},{});var uR=new Set(["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]),fh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(!uR.has(i.Type))return n;let o=i.Properties?.EnableCloudwatchLogsExports;if(Array.isArray(o)&&o.length>0)return n;let a=w(i,r),u=A(s,r),c=C(u);return n[r]={issues:[t(r,"RDS database does not export logs to CloudWatch.",S("Set EnableCloudwatchLogsExports to the relevant log types for the engine (e.g. ['error','general','slowquery'] for MySQL, ['postgresql'] for PostgreSQL, ['audit','error','general','slowquery'] for MariaDB).",u,"databaseProps.cloudwatchLogsExports"),c?"LOW":"MEDIUM","Security",a,"cdkInsights")]},n},{});var lR=new Set([1,5,10,15,30,60]),gh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=i.Properties?.MonitoringInterval,a=typeof o=="number"?o:typeof o=="string"?Number.parseInt(o,10):void 0;if(typeof a=="number"&&lR.has(a))return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"RDS Instance does not have enhanced monitoring enabled.",S("Set MonitoringInterval to 1, 5, 10, 15, 30, or 60 (seconds) and provide MonitoringRoleArn so RDS can publish OS-level metrics to CloudWatch Logs.",c,"databaseProps.monitoringInterval"),l?"LOW":"MEDIUM","Operational Excellence",u,"cdkInsights")]},n},{});var hh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=A(s,r),a=C(o),u=m=>a?I(m):m,c=i.Properties??{},l=c.MultiAZ===!0,p=c.StorageType==="gp2",d=typeof c.StorageType>"u";return l&&(p||d)&&(n[r]={issues:[t(r,p?"RDS instance is using Multi-AZ with gp2 storage. Consider gp3 for lower costs.":"RDS instance is using Multi-AZ without explicitly setting a storage type. gp3 may offer better performance and cost savings.",S("Switch to gp3 storage for RDS to reduce costs and improve performance.",o),u("MEDIUM"),"Cost Optimization",w(i,r),"cdkInsights")]}),n},{});var yh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::RDS::DBInstance")return n;let o=A(s,r),a=C(o),u=l=>a?I(l):l,c=w(i,r);return i.Properties?.PubliclyAccessible===!0&&(n[r]={issues:[t(r,"RDS instance is publicly accessible from the internet.",S("Set PubliclyAccessible to false and access the database through private subnets, bastion hosts, or VPN. If public access is intentional (e.g. a dev or staging database with restricted security groups), suppress this rule for the resource.",o),u("HIGH"),"Security",c,"cdkInsights")]}),n},{});var Sh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Redshift::Cluster")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[];return i.Properties?.Encrypted!==!0&&l.push(t(r,"Redshift cluster does not have encryption at rest enabled.",S("Set Encrypted to true and specify a KmsKeyId to protect data at rest.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var bh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Redshift::Cluster")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.LoggingProperties?.BucketName||(n[r]={issues:[t(r,"Redshift cluster does not have audit logging enabled.",S("Configure LoggingProperties with an S3 bucket to capture connection logs, user activity, and query activity.",o),u("MEDIUM"),"Security",c,"cdkInsights")]}),n},{});var Dh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Redshift::Cluster")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);return i.Properties?.PubliclyAccessible===!0&&(n[r]={issues:[t(r,"Redshift cluster is publicly accessible.",S("Set PubliclyAccessible to false and use VPC endpoints or bastion hosts for secure access. If public access is intentional (e.g. analytics tooling or customer-facing dashboards) ensure security groups restrict the source CIDRs and suppress this rule for the resource.",o),u("HIGH"),"Security",c,"cdkInsights")]}),n},{});var vh=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::HostedZone"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::DNSSEC"),i=new Set(r.map(([,o])=>{let a=o.Properties?.HostedZoneId;return typeof a=="string"?a:a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{if(u.Properties?.HostedZoneConfig?.Comment?.includes("private"))return o;let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"Route53 Hosted Zone does not have DNSSEC signing enabled.",S("Enable DNSSEC to protect against DNS spoofing and cache poisoning attacks by cryptographically signing DNS records.",p),m("LOW"),"Security",c,"cdkInsights")]}}return o},{})};var Ch=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::Route53::HealthCheck")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=[],p=i.Properties?.HealthCheckConfig;return p?.Type==="HTTP"&&l.push(t(r,"Route53 Health Check uses HTTP instead of HTTPS.",S("Use HTTPS for health checks to ensure the endpoint supports secure connections and to validate SSL certificates.",o),u("LOW"),"Security",c,"cdkInsights")),p?.RequestInterval===30&&l.push(t(r,"Route53 Health Check uses standard (30 second) request interval.",S("Consider using fast interval (10 seconds) for critical endpoints to detect failures more quickly.",o),u("LOW"),"Reliability",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var Ah=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::HostedZone"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::Route53::QueryLoggingConfig"),i=new Set(r.map(([,o])=>{let a=o.Properties?.HostedZoneId;return typeof a=="string"?a:a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"Route53 Hosted Zone does not have query logging enabled.",S("Enable query logging to CloudWatch Logs for DNS query analysis, troubleshooting, and security monitoring.",p),m("LOW"),"Security",c,"cdkInsights")]}}return o},{})};var xh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket")return n;let o=[],a=i.Properties??{},u=w(i,r),c=A(s,r),l=C(c);a.BucketEncryption||o.push(t(r,"S3 Bucket lacks encryption.",S("Enable encryption at rest for better security.",c,"bucketProps.encryption"),l?"MEDIUM":"HIGH","Security",u,"cdkInsights"));let p=a?.PublicAccessBlockConfiguration;return p?(p.BlockPublicAcls===!1&&o.push(t(r,"S3 Bucket allows public ACLs (BlockPublicAcls is false).","Set BlockPublicAcls to true to prevent public ACLs from being applied.","CRITICAL","Security",u,"cdkInsights")),p.BlockPublicPolicy===!1&&o.push(t(r,"S3 Bucket allows public bucket policies (BlockPublicPolicy is false).","Set BlockPublicPolicy to true to prevent public bucket policies.","CRITICAL","Security",u,"cdkInsights")),p.IgnorePublicAcls===!1&&o.push(t(r,"S3 Bucket does not ignore public ACLs (IgnorePublicAcls is false).","Set IgnorePublicAcls to true to ignore any public ACLs on the bucket.","HIGH","Security",u,"cdkInsights")),p.RestrictPublicBuckets===!1&&o.push(t(r,"S3 Bucket does not restrict public bucket access (RestrictPublicBuckets is false).","Set RestrictPublicBuckets to true to restrict access to the bucket to only authorized users.","HIGH","Security",u,"cdkInsights"))):o.push(t(r,"S3 Bucket has no PublicAccessBlockConfiguration defined.","Configure PublicAccessBlockConfiguration with BlockPublicAcls, BlockPublicPolicy, IgnorePublicAcls, and RestrictPublicBuckets all set to true.","HIGH","Security",u,"cdkInsights")),a.VersioningConfiguration||o.push(t(r,"S3 Bucket has no versioning enabled.","Enable versioning to protect against accidental deletions.","MEDIUM","Operational Excellence",u,"cdkInsights")),o.length>0&&(n[r]={issues:o}),n},{});var pR=new Set(["*","s3:*","s3:DeleteBucket","s3:DeleteBucketPolicy","s3:PutBucketPolicy"]),dR=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),mR=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),fR=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},gR=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],hR=e=>gR(e).find(t=>pR.has(t)),yR=e=>e===!1||e==="false"||e==="False",SR=e=>{if(e==null)return!0;let t=Array.isArray(e)?e:[e];if(t.length===0)return!0;for(let s of t){if(typeof s!="string"||s==="*")return!0;let n=s.split(":::")[1];if(n===void 0||!n.includes("/"))return!0}return!1},bR=e=>{let t=e.Condition;if(!t||typeof t!="object")return!1;let s=t.Bool??t.BoolIfExists;return s?yR(s["aws:SecureTransport"]):!1},DR=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(mR.has(t)){for(let r of n)if(dR.has(r))return!0}}return!1},vR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!fR(e.Principal))return;let t=hR(e.Action);if(t&&!bR(e)&&!DR(e.Condition)&&SR(e.Resource))return t},wh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::BucketPolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(!Array.isArray(o))return n;let a=o.map(vR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Bucket policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This will lock the account out of the bucket \u2014 recovery requires breaking glass on the account root credentials to remove the bucket policy. AWS Support will typically not intervene for this scenario.`,S("Add a NotPrincipal exemption for the account root (e.g. arn:aws:iam::<account>:root) or use a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s). If the Deny is intended for transport security, scope it with aws:SecureTransport rather than a blanket Deny on Principal: '*'.",c,"bucketPolicyProps.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var CR=e=>e===!1||e==="false"||e==="False",AR=e=>{if(e.Effect!=="Deny")return!1;let t=e.Condition;if(!t||typeof t!="object")return!1;let s=t.Bool??t.BoolIfExists;return s?CR(s["aws:SecureTransport"]):!1},Eh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::BucketPolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(Array.isArray(o)&&o.some(AR))return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"S3 BucketPolicy does not deny non-SSL/TLS requests.",S("Add a Deny statement with Condition.Bool['aws:SecureTransport']=false to enforce TLS for all S3 access. CIS AWS Foundations 2.1.1 and PCI-DSS require encrypted-in-transit requests.",c,"bucketPolicyProps.statements"),l?"MEDIUM":"HIGH","Security",u,"cdkInsights")]},n},{});var Rh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r);return(i.Properties?.LifecycleConfiguration?.Rules||[]).length===0&&(n[r]={issues:[t(r,"S3 bucket has no lifecycle policy configured.",S("Configure lifecycle rules to automatically transition objects to cheaper storage classes (e.g., Glacier) or delete old versions to optimize storage costs.",o),u("MEDIUM"),"Cost Optimization",c,"cdkInsights")]}),n},{});var Fh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket"||(i.Properties??{}).LoggingConfiguration?.DestinationBucketName)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,"S3 Bucket has no access logging configured.",S("Set LoggingConfiguration.DestinationBucketName to capture object-level access logs in a separate bucket. Required by CIS AWS Foundations 2.1.2 and useful for incident forensics.",c,"bucketProps.serverAccessLogsBucket"),l?"LOW":"MEDIUM","Security",u,"cdkInsights")]},n},{});var xR=/\b(prod|production|critical|backup|dr|disaster|recovery|primary)\b/i,Ih=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::S3::Bucket")return n;let o=A(s,r),a=C(o),u=d=>a?I(d):d,c=w(i,r),l=i.Properties?.BucketName||r,p=i.Properties?.ReplicationConfiguration;return xR.test(l)&&!p?.Rules?.length&&(n[r]={issues:[t(r,"Critical S3 bucket does not have cross-region replication configured.",S("Consider enabling cross-region replication for disaster recovery and data durability on production/critical buckets.",o),u("LOW"),"Reliability",c,"cdkInsights")]}),n},{});var kh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::S3::Bucket"&&!i.Properties?.IntelligentTieringConfigurations){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"S3 Bucket does not use Intelligent-Tiering. Consider enabling it for cost optimization.",S("Enable Intelligent-Tiering for automatic cost optimization of infrequently accessed objects.",o),u("LOW"),"Cost Optimization",w(i,r),"cdkInsights")]}}return n},{});var Th=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=i.Properties??{};if(i.Type==="AWS::SecretsManager::Secret"&&o.PublicPolicy){let a=A(s,r),u=C(a),c=l=>u?I(l):l;n[r]={issues:[t(r,"Secret is publicly accessible.",S("Restrict secret access using IAM policies to ensure only authorized entities can retrieve it.",a),c("CRITICAL"),"Security",w(i,r),"cdkInsights")]}}return n},{});var Ph=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::SNS::Topic"&&!i.Properties?.KmsMasterKeyId){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"SNS topic is not encrypted.",S("Enable AWS KMS encryption for SNS to protect sensitive messages in transit and at rest.",o),u("HIGH"),"Security",w(i,r),"cdkInsights")]}}return n},{});var wR=new Set(["*","sns:*","sns:DeleteTopic","sns:RemovePermission"]),ER=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),RR=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),FR=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},IR=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],kR=e=>IR(e).find(t=>wR.has(t)),TR=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(RR.has(t)){for(let r of n)if(ER.has(r))return!0}}return!1},PR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!FR(e.Principal))return;let t=kR(e.Action);if(t&&!TR(e.Condition))return t},Lh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::SNS::TopicPolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(!Array.isArray(o))return n;let a=o.map(PR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Topic policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This locks the account out of the topic \u2014 recovery requires breaking glass on the account root credentials to remove the topic policy, or delete-and-recreate the topic if no subscribers depend on its ARN. In fan-out architectures that's often a multi-stack rebuild.`,S("Add a NotPrincipal exemption for the account root (e.g. arn:aws:iam::<account>:root) or use a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s). If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'.",c,"topicPolicyProps.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var _h=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{let o=!!i.Properties?.KmsMasterKeyId,a=i.Properties?.SqsManagedSseEnabled===!0;if(i.Type==="AWS::SQS::Queue"&&!o&&!a){let u=A(s,r),c=C(u),l=p=>c?I(p):p;n[r]={issues:[t(r,"SQS queue is not encrypted.",S("Enable AWS KMS encryption for SQS to protect message data in transit and at rest.",u),l("HIGH"),"Security",w(i,r),"cdkInsights")]}}return n},{});var LR=new Set(["*","sqs:*","sqs:DeleteQueue","sqs:RemovePermission"]),_R=new Set(["aws:PrincipalArn","aws:PrincipalAccount","aws:PrincipalIsAWSService"]),OR=new Set(["StringNotEquals","StringNotLike","ArnNotLike","ArnNotEquals"]),BR=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},MR=e=>typeof e=="string"?[e]:Array.isArray(e)?e.filter(t=>typeof t=="string"):[],NR=e=>MR(e).find(t=>LR.has(t)),WR=e=>{if(!e||typeof e!="object")return!1;for(let[t,s]of Object.entries(e)){if(!s||typeof s!="object")continue;let n=Object.keys(s);if(n.includes("aws:PrincipalIsAWSService"))return!0;if(OR.has(t)){for(let r of n)if(_R.has(r))return!0}}return!1},UR=e=>{if(e.Effect!=="Deny"||e.NotPrincipal!==void 0||!BR(e.Principal))return;let t=NR(e.Action);if(t&&!WR(e.Condition))return t},Oh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::SQS::QueuePolicy")return n;let o=i.Properties?.PolicyDocument?.Statement;if(!Array.isArray(o))return n;let a=o.map(UR).find(p=>p!==void 0);if(!a)return n;let u=w(i,r),c=A(s,r),l=C(c);return n[r]={issues:[t(r,`Queue policy contains a Deny statement on ${a} with Principal: '*' and no carveout for the account root or admin role. This locks the account out of the queue \u2014 recovery requires breaking glass on the account root credentials to remove the queue policy, or delete-and-recreate the queue if nothing else depends on its ARN. In event-driven systems that's often a multi-stack rebuild.`,S("Add a NotPrincipal exemption for the account root (e.g. arn:aws:iam::<account>:root) or use a Condition with StringNotEquals on aws:PrincipalArn to exempt your admin role(s). If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'.",c,"queuePolicyProps.statements"),l?"HIGH":"CRITICAL","Security",u,"cdkInsights")]},n},{});var Bh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type==="AWS::StepFunctions::StateMachine"&&i.Properties?.LoggingConfiguration===void 0){let o=A(s,r),a=C(o),u=c=>a?I(c):c;n[r]={issues:[t(r,"Step Function lacks logging configuration.",S("Enable logging for the Step Function using AWS CloudWatch to improve monitoring and debugging.",o),u("HIGH"),"Security",w(i,r),"cdkInsights")]}}return n},{});var Mh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::EC2::SecurityGroup")return n;let o=A(s,r),a=C(o),u=p=>a?I(p):p,c=w(i,r);if(i.Properties?.GroupName==="default"){let p=i.Properties?.SecurityGroupIngress||[],d=i.Properties?.SecurityGroupEgress||[];(p.length>0||d.length>0)&&(n[r]={issues:[t(r,"VPC default security group has rules configured.",S("Remove all rules from the default security group and use custom security groups instead. Default groups cannot be deleted but should have no rules.",o),u("MEDIUM"),"Security",c,"cdkInsights")]})}return n},{});var Nh=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::EC2::VPC"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::EC2::FlowLog"),i=new Set(r.filter(([,o])=>o.Properties?.ResourceType==="VPC").map(([,o])=>{let a=o.Properties?.ResourceId;return typeof a=="string"?a:a?.Ref?a.Ref:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!i.has(a)){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"VPC does not have flow logs enabled.",S("Enable VPC Flow Logs to capture network traffic information for security analysis and troubleshooting.",p),m("MEDIUM"),"Security",c,"cdkInsights")]}}return o},{})};var Wh=(e,t,s)=>{let n=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::WAFv2::WebACL"),r=Object.entries(e.Resources||{}).filter(([,o])=>o.Type==="AWS::WAFv2::LoggingConfiguration"),i=new Set(r.map(([,o])=>{let a=o.Properties?.ResourceArn;return typeof a=="string"?a:a?.Ref?a.Ref:a?.["Fn::GetAtt"]?.[0]?a["Fn::GetAtt"][0]:null}).filter(Boolean));return n.reduce((o,[a,u])=>{let c=w(u,a);if(!(i.has(a)||r.some(([,p])=>{let d=p.Properties?.ResourceArn;return typeof d=="object"&&(d?.Ref===a||d?.["Fn::GetAtt"]?.[0]===a)}))){let p=A(s,a),d=C(p),m=f=>d?I(f):f;o[a]={issues:[t(a,"WAF WebACL does not have logging configured.",S("Enable WAF logging to capture detailed information about web requests for security analysis and compliance.",p),m("MEDIUM"),"Security",c,"cdkInsights")]}}return o},{})};var Uh=(e,t,s)=>Object.entries(e.Resources||{}).reduce((n,[r,i])=>{if(i.Type!=="AWS::WAFv2::WebACL")return n;let o=A(s,r),a=C(o),u=f=>a?I(f):f,c=w(i,r),l=[],p=i.Properties?.DefaultAction;p?.Allow&&!p?.Block&&l.push(t(r,"WAF WebACL has default action set to Allow, which permits all traffic not matching rules.",S("Consider setting the default action to Block and explicitly allowing known-good traffic patterns for defense-in-depth.",o),u("MEDIUM"),"Security",c,"cdkInsights")),i.Properties?.VisibilityConfig?.CloudWatchMetricsEnabled||l.push(t(r,"WAF WebACL does not have CloudWatch metrics enabled.",S("Enable CloudWatchMetricsEnabled in VisibilityConfig to monitor WAF activity and detect potential attacks.",o),u("MEDIUM"),"Security",c,"cdkInsights"));let m=i.Properties?.Rules;return(!m||m.length===0)&&l.push(t(r,"WAF WebACL has no rules defined.",S("Add WAF rules to protect against common web exploits like SQL injection, XSS, and bot traffic.",o),u("HIGH"),"Security",c,"cdkInsights")),l.length>0&&(n[r]={issues:l}),n},{});var jR=e=>Object.values(e.Resources||{}).some(t=>t.Type==="Custom::S3BucketNotifications"),jh=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::EventSourceMapping"),$h=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Events::Rule"),Gh=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type!=="AWS::ElasticLoadBalancingV2::Listener"?!1:(s.Properties?.DefaultActions||s.Properties?.Actions)?.some(r=>r.TargetGroupArn?.startsWith(t))),$R=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::Lambda::Permission"&&t.Properties?.Principal==="apigateway.amazonaws.com"),ro=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type==="AWS::ApiGateway::Integration"&&typeof s.Properties?.Uri=="string"&&s.Properties.Uri.includes(t)),jr=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type==="AWS::IoT::TopicRule"&&s.Properties?.TopicRulePayload?.actions?.some(n=>Object.hasOwn(n,t))),GR=e=>Object.values(e.Resources||{}).some(t=>t.Type==="AWS::ECS::Service"),Hh=(e,t)=>Object.values(e.Resources||{}).some(s=>s.Type==="AWS::SNS::Subscription"&&s.Properties?.Protocol===t),zh=(e,t)=>{let s=[],n={},r={};for(let[o,a]of Object.entries(t)){let u=a.requiredResourceTypes||[];if(u.length!==0){r[o]=u.length;for(let c of u)n[c]||(n[c]=[]),n[c].push(o)}}let i={};for(let o of Object.values(e.Resources||{})){let a=o.Type,u=n[a];if(u){for(let c of u)if(i[c]=(i[c]||0)+1,i[c]===r[c]){let l=t[c],p=!0;switch(c){case"aws-s3-lambda":p=jR(e)||jh(e);break;case"aws-dynamodbstreams-lambda":p=jh(e);break;case"aws-eventbridge-lambda":p=$h(e);break;case"aws-alb-fargate":p=Gh(e,"arn:aws:ecs:");break;case"aws-alb-lambda":p=Gh(e,"arn:aws:lambda:");break;case"aws-apigateway-lambda":p=$R(e);break;case"aws-apigateway-sqs":p=ro(e,"sqs");break;case"aws-apigateway-dynamodb":p=ro(e,"dynamodb");break;case"aws-apigateway-kinesisstreams":p=ro(e,"kinesis");break;case"aws-apigateway-sagemakerendpoint":p=ro(e,"sagemaker");break;case"aws-iot-lambda":p=jr(e,"lambda");break;case"aws-iot-kinesisstreams":p=jr(e,"kinesis");break;case"aws-iot-kinesisfirehose-s3":p=jr(e,"firehose");break;case"aws-iot-sqs":p=jr(e,"sqs");break;case"aws-iot-s3":p=jr(e,"s3");break;case"aws-sns-lambda":p=Hh(e,"lambda");break;case"aws-sns-sqs":p=Hh(e,"sqs");break;case"aws-fargate-dynamodb":case"aws-fargate-eventbridge":case"aws-fargate-kinesisfirehose":case"aws-fargate-kinesisstreams":case"aws-fargate-opensearch":case"aws-fargate-s3":case"aws-fargate-secretsmanager":case"aws-fargate-sns":case"aws-fargate-sqs":case"aws-fargate-ssmstringparameter":case"aws-fargate-stepfunctions":p=GR(e);break;case"aws-eventbridge-kinesisfirehose-s3":case"aws-eventbridge-kinesisstreams":case"aws-eventbridge-sns":case"aws-eventbridge-sqs":case"aws-eventbridge-stepfunctions":p=$h(e);break}if(!p)continue;s.push({resourceId:l.className,issue:`Possible Pattern detected: ${l.friendlyName}`,recommendation:`Consider using the AWS Solutions Construct \`${l.className}\` from \`@aws-solutions-constructs/${c}\`.`,severity:"LOW",wafPillar:"Operational Excellence",docUrl:l.documentationUrl,githubUrl:l.githubUrl,constructPath:l.className,foundBy:"cdkInsights"}),delete r[c]}}}return s};var qh=()=>({iamPolicies:jg,iamPermissionBoundary:$g,iamCrossAccountTrust:Ug,iamUserPolicies:Hg,s3Buckets:xh,s3BucketLogging:Fh,s3BucketPolicySsl:Eh,s3BucketPolicySelfLockout:wh,s3IntelligentTiering:kh,s3LifecyclePolicy:Rh,s3Replication:Ih,securityGroups:gg,ec2InstanceType:dg,ec2PublicIp:fg,ec2SubnetAutoPublicIp:hg,natGatewayUsage:mg,ebsVolumes:ag,lambdaEnvironmentVariables:Qg,lambdaMemory:Xg,lambdaReservedConcurrency:Yg,lambdaDeadLetterQueue:Jg,lambdaRuntime:nh,lambdaVpcNatWarning:rh,lambdaPermission:sh,rdsEncryption:mh,rdsMultiAZ:hh,rdsPublicAccess:yh,rdsBackupRetention:ph,rdsDeletionProtection:dh,rdsLogging:fh,rdsEnhancedMonitoring:gh,dynamoDBAutoScaling:ig,dynamoDBStreams:og,dynamoDBPitr:rg,dynamoDBEncryption:ng,cloudFrontHttpsOnly:qf,cloudFrontWafAssociation:Zf,cloudFrontLogging:Vf,cloudFrontTls:Kf,elbDeletionProtection:Rg,elbLogging:Ig,elbHttpsListeners:Fg,elbSecurityPolicy:kg,ecsSecrets:Ag,ecsLogging:Dg,ecsServiceConnectLogs:vg,ecsResources:Cg,cognitoPasswordPolicy:tg,cognitoMfa:eg,cognitoAdvancedSecurity:sg,wafWebAcl:Uh,wafLogging:Wh,cloudWatchLogRetention:Xf,cloudWatchEncryption:Qf,cloudWatchAlarms:Jf,route53Dnssec:vh,route53HealthChecks:Ch,route53QueryLogging:Ah,elastiCacheEncryption:Pg,elastiCacheAuth:Tg,elastiCacheFailover:Lg,ecrScanning:bg,ecrLifecycle:Sg,ecrImmutableTags:yg,openSearchEncryption:uh,openSearchAccessControl:ch,openSearchLogging:lh,acmValidation:Nf,backupPlans:Hf,backupVault:zf,vpcFlowLogs:Nh,vpcDefaultSecurityGroup:Mh,kinesisEncryption:zg,kinesisRetention:qg,appSyncAuth:jf,appSyncLogging:$f,appSyncWaf:Gf,eksPublicEndpoint:Eg,eksEncryption:xg,eksLogging:wg,redshiftEncryption:Sh,redshiftPublicAccess:Dh,redshiftLogging:bh,mskEncryption:oh,mskAuth:ih,mskLogging:ah,glueEncryption:Mg,glueConnections:Bg,efsEncryption:cg,autoScalingGroupHealthCheck:lg,autoScalingLaunchConfigPublicIp:pg,apiGateway:Wf,apiGatewayMethodAuth:Uf,secretsManager:Th,cloudTrailLogging:Yf,eventBridgeRules:_g,eventBusPolicy:Og,kmsKeys:Vg,kmsKeyPolicySelfLockout:Zg,sns:Ph,snsTopicPolicySelfLockout:Lh,sqs:_h,sqsQueuePolicySelfLockout:Oh,stepFunctions:Bh,crossResourceRelationships:to,stackArchitecture:so,solutionsPatterns:zh});var $r=(e={})=>{let{ttl:t=3e5,maxSize:s=1e3}=e,n=new Map,r=new Set,i=[],o=Date.now(),a=6e4,u=m=>Date.now()-m.timestamp>m.ttl,c=m=>{r.delete(m)},l=()=>{let m=0;for(let f=0;f<i.length;f++)r.has(i[f])&&(i[m++]=i[f]);i.length=m},p=()=>{let m=Date.now();if(m-o<a)return;o=m;let f=[];for(let[g,h]of n.entries())u(h)&&f.push(g);for(let g of f)n.delete(g),c(g);f.length>0&&l()},d=()=>{for(;n.size>=s&&i.length>0;){let m=i.shift();m&&r.has(m)&&(n.delete(m),r.delete(m))}};return{get(m){let f=n.get(m);if(f){if(u(f)){n.delete(m),c(m);return}return f.value}},set(m,f,g){n.size>=s*.9&&p(),d(),r.has(m)&&c(m),n.set(m,{value:f,timestamp:Date.now(),ttl:g??t}),r.add(m),i.push(m)},clear(){n.clear(),r.clear(),i.length=0},size(){return n.size},has(m){let f=n.get(m);return f?u(f)?(n.delete(m),c(m),!1):!0:!1}}},Vh=(e,t={})=>{let s=$r(t);return(...n)=>{let r;try{r=JSON.stringify(n)}catch{return e(...n)}let i=s.get(r);if(i!==void 0)return i;let o=e(...n);return s.set(r,o),o}};var Kh={IAM:["iamPolicies","iamPermissionBoundary","iamCrossAccountTrust","iamUserPolicies"],S3:["s3Buckets","s3BucketLogging","s3BucketPolicySsl","s3BucketPolicySelfLockout","s3IntelligentTiering","s3LifecyclePolicy","s3Replication"],Lambda:["lambdaEnvironmentVariables","lambdaMemory","lambdaReservedConcurrency","lambdaDeadLetterQueue","lambdaRuntime","lambdaVpcNatWarning","lambdaPermission"],DynamoDB:["dynamoDBAutoScaling","dynamoDBStreams","dynamoDBPitr","dynamoDBEncryption"],RDS:["rdsEncryption","rdsMultiAZ","rdsPublicAccess","rdsBackupRetention","rdsDeletionProtection","rdsLogging","rdsEnhancedMonitoring"],EC2:["ec2InstanceType","natGatewayUsage","securityGroups","ebsVolumes","ec2PublicIp","ec2SubnetAutoPublicIp"],SNS:["sns","snsTopicPolicySelfLockout"],SQS:["sqs","sqsQueuePolicySelfLockout"],StepFunctions:["stepFunctions"],CloudTrail:["cloudTrailLogging"],ApiGateway:["apiGateway","apiGatewayMethodAuth"],SecretsManager:["secretsManager"],KMS:["kmsKeys","kmsKeyPolicySelfLockout"],EventBridge:["eventBridgeRules","eventBusPolicy"],CloudFront:["cloudFrontHttpsOnly","cloudFrontWafAssociation","cloudFrontLogging","cloudFrontTls"],ELB:["elbDeletionProtection","elbLogging","elbHttpsListeners","elbSecurityPolicy"],ECS:["ecsSecrets","ecsLogging","ecsServiceConnectLogs","ecsResources"],Cognito:["cognitoPasswordPolicy","cognitoMfa","cognitoAdvancedSecurity"],WAF:["wafWebAcl","wafLogging"],CloudWatch:["cloudWatchLogRetention","cloudWatchEncryption","cloudWatchAlarms"],Route53:["route53Dnssec","route53HealthChecks","route53QueryLogging"],ElastiCache:["elastiCacheEncryption","elastiCacheAuth","elastiCacheFailover"],ECR:["ecrScanning","ecrLifecycle","ecrImmutableTags"],OpenSearch:["openSearchEncryption","openSearchAccessControl","openSearchLogging"],ACM:["acmValidation"],Backup:["backupPlans","backupVault"],VPC:["vpcFlowLogs","vpcDefaultSecurityGroup"],Kinesis:["kinesisEncryption","kinesisRetention"],AppSync:["appSyncAuth","appSyncLogging","appSyncWaf"],EKS:["eksPublicEndpoint","eksEncryption","eksLogging"],Redshift:["redshiftEncryption","redshiftPublicAccess","redshiftLogging"],MSK:["mskEncryption","mskAuth","mskLogging"],Glue:["glueEncryption","glueConnections"],EFS:["efsEncryption"],AutoScaling:["autoScalingGroupHealthCheck","autoScalingLaunchConfigPublicIp"]},HR=Object.entries(Kh).reduce((e,[t,s])=>{for(let n of s)e[n]=t;return e},{}),Vc=e=>{let t=new Set,s=[];for(let n of e)t.has(n)||(t.add(n),s.push(n));return s},Zh=e=>{if(!e||e.length===0)return{services:["All services"],removedAllServices:!1,defaultedToAll:!0};let t=Vc(e),s=t.includes("All services"),n=t.filter(r=>r!=="All services");return s&&n.length>0?{services:n,removedAllServices:!0,defaultedToAll:!1}:{services:s?["All services"]:t,removedAllServices:!1,defaultedToAll:!1}},Yh=(e,t)=>{if(e.length===0||e.includes("All services"))return Vc(t);let s=e.flatMap(n=>n==="All services"?t:Kh[n]??[]);return Vc(s)},Gr=e=>HR[e];var Kt=Z(hs()),er=process.env.NODE_ENV==="development",yu=process.env.CDK_INSIGHTS_VERBOSE==="true",lT=er||yu||process.env.CDK_INSIGHTS_ENABLE_LOGGING==="true",oS=yu?Kt.LogLevel.DEBUG:er?Kt.LogLevel.INFO:Kt.LogLevel.ERROR,pT=lT?[(0,Kt.createConsoleTransport)({formatter:(0,Kt.createJsonFormatter)(),level:oS,useColors:!er})]:[],ue=(0,Kt.createLogger)({config:{level:oS,serviceName:"cdk-insights",stage:er?"dev":"prod"},formatter:(0,Kt.createJsonFormatter)(),transports:pT,env:{STAGE:er?"dev":"prod",LOG_LEVEL:yu?"DEBUG":er?"INFO":"ERROR"}}),tr=e=>({debug:(t,s,n)=>ue.debug(t,{component:e,...s},n),info:(t,s,n)=>ue.info(t,{component:e,...s},n),warn:(t,s,n,r)=>ue.warn(t,{component:e,...s},n,r),error:(t,s,n,r)=>ue.error(t,{component:e,...s},n,r)}),st=tr("cli"),ye=tr("analysis"),K8=tr("license"),Ls=tr("cache"),Ro=tr("github"),qe=tr("aspect");function Jr(e,t){let s=t.split("."),n=e;for(let r of s){if(n==null||typeof n!="object")return;n=n[r]}return n}function Su(e,t){switch(e.type){case"property_exists":{let s=Jr(t,e.path),n=s!=null;return e.negate?!n:n}case"property_equals":{let s=Jr(t,e.path),n=JSON.stringify(s)===JSON.stringify(e.value);return e.negate?!n:n}case"property_matches":{let s=Jr(t,e.path);if(typeof s!="string")return!!e.negate;let n=new RegExp(e.pattern).test(s);return e.negate?!n:n}case"property_gt":{let s=Jr(t,e.path);return typeof s!="number"?!1:s>e.value}case"property_lt":{let s=Jr(t,e.path);return typeof s!="number"?!1:s<e.value}case"and":return e.conditions.every(s=>Su(s,t));case"or":return e.conditions.some(s=>Su(s,t));default:return!1}}function aS(e,t,s){if(t.length===0)return{};let n={};for(let[r,i]of Object.entries(e.Resources||{}))for(let o of t)if(o.resourceTypes.some(u=>u.endsWith("*")?i.Type.startsWith(u.slice(0,-1)):i.Type===u))try{if(Su(o.condition,i)){let c=s(r,`[${o.ruleId}] ${o.description}`,o.recommendation,o.severity,o.wafPillar,"","cdkInsights");c.ruleId=o.ruleId,n[r]||(n[r]={issues:[]}),n[r].issues.push(c)}}catch(u){ye.warn(`Error evaluating custom rule '${o.ruleId}' on resource '${r}'`,{error:u instanceof Error?u.message:String(u)})}return n}var sr={"iam-policies-overly-permissive":{ruleId:"iam-policies-overly-permissive",checkKey:"iamPolicies",name:"IAM Overly Permissive Policies",description:"Detects IAM policies with overly permissive actions like * wildcards.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Review IAM policies for overly broad permissions","Replace wildcard (*) actions with specific actions","Use IAM Access Analyzer to identify unused permissions"],resourceTypes:["AWS::IAM::Policy","AWS::IAM::Role","AWS::IAM::ManagedPolicy"]},"iam-permission-boundary-missing":{ruleId:"iam-permission-boundary-missing",checkKey:"iamPermissionBoundary",name:"IAM Permission Boundary Missing",description:"Detects IAM roles without permission boundaries.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html",complianceFrameworks:["SOC2","CIS","NIST"],remediationSteps:["Create a permission boundary policy","Attach the permission boundary to IAM roles"],resourceTypes:["AWS::IAM::Role"]},"iam-cross-account-trust":{ruleId:"iam-cross-account-trust",checkKey:"iamCrossAccountTrust",name:"IAM Cross-Account Trust",description:"Detects IAM roles with cross-account trust relationships.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_common-scenarios_aws-accounts.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Verify cross-account trust is intentional","Add conditions to restrict access (e.g., external ID)","Document the business justification"],resourceTypes:["AWS::IAM::Role"]},"iam-user-direct-policies":{ruleId:"iam-user-direct-policies",checkKey:"iamUserPolicies",name:"IAM User Direct Policies",description:"Detects IAM Users with policies attached directly (inline Policies or ManagedPolicyArns). CIS AWS Foundations 1.15 requires users to inherit permissions through groups.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#use-groups-for-permissions",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Create an IAM Group with the required policies","Add the user to the group instead of attaching policies directly","Remove Policies and ManagedPolicyArns from AWS::IAM::User resources"],resourceTypes:["AWS::IAM::User"]},"s3-bucket-public-access":{ruleId:"s3-bucket-public-access",checkKey:"s3Buckets",name:"S3 Bucket Public Access",description:"Detects S3 buckets with public access enabled.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable S3 Block Public Access settings","Review bucket policies for public access","Use VPC endpoints for private access"],resourceTypes:["AWS::S3::Bucket"]},"s3-intelligent-tiering":{ruleId:"s3-intelligent-tiering",checkKey:"s3IntelligentTiering",name:"S3 Intelligent Tiering",description:"Recommends S3 Intelligent Tiering for cost optimization.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/intelligent-tiering.html",remediationSteps:["Enable S3 Intelligent-Tiering for buckets with varying access patterns","Configure archive access tiers for infrequently accessed data"],resourceTypes:["AWS::S3::Bucket"]},"s3-lifecycle-policy-missing":{ruleId:"s3-lifecycle-policy-missing",checkKey:"s3LifecyclePolicy",name:"S3 Lifecycle Policy Missing",description:"Detects S3 buckets without lifecycle policies.",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html",remediationSteps:["Create lifecycle rules to transition objects to cheaper storage classes","Set expiration rules for temporary data","Use lifecycle rules to delete incomplete multipart uploads"],resourceTypes:["AWS::S3::Bucket"]},"s3-replication-missing":{ruleId:"s3-replication-missing",checkKey:"s3Replication",name:"S3 Replication Missing",description:"Detects critical S3 buckets without cross-region replication.",severity:"LOW",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html",remediationSteps:["Enable cross-region replication for disaster recovery","Configure replication rules for critical data"],resourceTypes:["AWS::S3::Bucket"]},"s3-bucket-access-logging-disabled":{ruleId:"s3-bucket-access-logging-disabled",checkKey:"s3BucketLogging",name:"S3 Bucket Access Logging Disabled",description:"Detects S3 buckets without server access logging configured. Required by CIS AWS Foundations 2.1.2 and useful for incident forensics.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerLogs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set LoggingConfiguration.DestinationBucketName on the bucket to capture access logs","Use a separate bucket for logs to avoid recursive logging","Configure a lifecycle rule on the log bucket to manage storage costs"],resourceTypes:["AWS::S3::Bucket"]},"s3-bucket-policy-non-ssl":{ruleId:"s3-bucket-policy-non-ssl",checkKey:"s3BucketPolicySsl",name:"S3 BucketPolicy Permits Non-SSL Requests",description:"Detects AWS::S3::BucketPolicy resources that lack a Deny statement enforcing aws:SecureTransport. Without this, the bucket accepts plain HTTP requests in addition to HTTPS.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-best-practices.html#enforce-tls",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Add a Deny statement with Action s3:* and Condition Bool aws:SecureTransport=false","Apply the Deny to both the bucket ARN and the bucket-objects ARN (arn/* )","Use BoolIfExists if the policy already accepts unsigned requests via specific clauses"],resourceTypes:["AWS::S3::BucketPolicy"]},"s3-bucket-policy-self-lockout":{ruleId:"s3-bucket-policy-self-lockout",checkKey:"s3BucketPolicySelfLockout",name:"S3 BucketPolicy Self-Lockout",description:"Detects AWS::S3::BucketPolicy resources containing a Deny statement on s3:DeleteBucket, s3:*, or * with a broad Principal and no NotPrincipal or aws:PrincipalArn carveout for the account root or admin role. Such a policy locks the account out of its own bucket \u2014 recovery requires breaking glass on the account root credentials, since AWS Support typically declines to intervene where customers have a self-service path via root.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-policy-language-overview.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Add a NotPrincipal exemption for the account root (arn:aws:iam::<account>:root) or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs","If the Deny is intended for transport security, scope it with aws:SecureTransport rather than a blanket Deny on Principal: '*'"],resourceTypes:["AWS::S3::BucketPolicy"]},"lambda-env-sensitive-data":{ruleId:"lambda-env-sensitive-data",checkKey:"lambdaEnvironmentVariables",name:"Lambda Sensitive Environment Variables",description:"Detects Lambda functions with sensitive data in environment variables.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Move sensitive data to AWS Secrets Manager","Use SSM Parameter Store with SecureString","Enable Lambda environment variable encryption"],resourceTypes:["AWS::Lambda::Function"]},"lambda-memory-optimization":{ruleId:"lambda-memory-optimization",checkKey:"lambdaMemory",name:"Lambda Memory Optimization",description:"Detects Lambda functions with suboptimal memory configuration.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-function-common.html#configuration-memory-console",remediationSteps:["Use AWS Lambda Power Tuning to find optimal memory","Consider cost vs performance tradeoffs"],resourceTypes:["AWS::Lambda::Function"]},"lambda-reserved-concurrency-missing":{ruleId:"lambda-reserved-concurrency-missing",checkKey:"lambdaReservedConcurrency",name:"Lambda Reserved Concurrency Missing",description:"Detects Lambda functions without reserved concurrency.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html",remediationSteps:["Set reserved concurrency for critical functions","Use provisioned concurrency for latency-sensitive workloads"],resourceTypes:["AWS::Lambda::Function"]},"lambda-dlq-missing":{ruleId:"lambda-dlq-missing",checkKey:"lambdaDeadLetterQueue",name:"Lambda Dead Letter Queue Missing",description:"Detects Lambda functions without dead letter queue configuration.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-dlq",remediationSteps:["Configure a dead letter queue (SQS or SNS)","Set up monitoring for DLQ messages","Implement retry logic for failed invocations"],resourceTypes:["AWS::Lambda::Function"]},"lambda-vpc-nat-cost":{ruleId:"lambda-vpc-nat-cost",checkKey:"lambdaVpcNatWarning",name:"Lambda VPC NAT Gateway Cost Warning",description:"Warns about potential NAT Gateway costs for VPC-attached Lambda functions.",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html",remediationSteps:["Use VPC endpoints instead of NAT Gateway where possible","Consider if VPC attachment is necessary","Monitor NAT Gateway data processing costs"],resourceTypes:["AWS::Lambda::Function"]},"lambda-permission-public":{ruleId:"lambda-permission-public",checkKey:"lambdaPermission",name:"Lambda Permission Permits Public Access",description:"Detects AWS::Lambda::Permission and AWS::Lambda::LayerVersionPermission resources that grant invoke / use rights with a wildcard Principal, or grant a service principal without a SourceArn / SourceAccount / PrincipalOrgID restriction (confused-deputy risk).",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Replace wildcard Principal with a specific 12-digit AWS account ID or {Ref: AWS::AccountId}","For service principals, set SourceArn to the specific resource that may invoke the function","For S3 service principal, set SourceAccount to your AWS account ID","For LayerVersionPermission, prefer OrganizationId over wildcard Principal"],resourceTypes:["AWS::Lambda::Permission","AWS::Lambda::LayerVersionPermission"]},"dynamodb-autoscaling-missing":{ruleId:"dynamodb-autoscaling-missing",checkKey:"dynamoDBAutoScaling",name:"DynamoDB Auto Scaling Missing",description:"Detects DynamoDB tables without auto-scaling enabled.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html",remediationSteps:["Enable DynamoDB auto-scaling or use on-demand capacity","Set appropriate minimum and maximum capacity units"],resourceTypes:["AWS::DynamoDB::Table"]},"dynamodb-streams-disabled":{ruleId:"dynamodb-streams-disabled",checkKey:"dynamoDBStreams",name:"DynamoDB Streams Disabled",description:"Detects DynamoDB tables without streams enabled.",severity:"LOW",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html",remediationSteps:["Enable DynamoDB Streams for change data capture","Consider point-in-time recovery for data protection"],resourceTypes:["AWS::DynamoDB::Table"]},"dynamodb-encryption-aws-owned-key":{ruleId:"dynamodb-encryption-aws-owned-key",checkKey:"dynamoDBEncryption",name:"DynamoDB Table Uses AWS-Owned Encryption Key",description:"Detects AWS::DynamoDB::Table resources without SSESpecification.SSEEnabled=true. DynamoDB always encrypts at rest, but the default AWS-owned key cannot be inspected, audited, or rotated by the customer \u2014 inadequate for HIPAA / PCI-DSS / FedRAMP workloads.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/encryption.howitworks.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set SSESpecification.SSEEnabled to true on the table","Provide SSESpecification.KMSMasterKeyId pointing at a customer-managed KMS key","Verify the KMS key has rotation enabled (kms-key-rotation-disabled covers this)"],resourceTypes:["AWS::DynamoDB::Table"]},"dynamodb-pitr-disabled":{ruleId:"dynamodb-pitr-disabled",checkKey:"dynamoDBPitr",name:"DynamoDB Point-in-Time Recovery Disabled",description:"Detects DynamoDB tables without Point-in-Time Recovery enabled. PITR provides continuous backups for the last 35 days and is required for SOC2 / HIPAA data resilience.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/PointInTimeRecovery.html",remediationSteps:["Set PointInTimeRecoverySpecification.PointInTimeRecoveryEnabled to true on the table","Verify the AWS region supports PITR for your table type (Provisioned / On-Demand)"],resourceTypes:["AWS::DynamoDB::Table"]},"rds-encryption-disabled":{ruleId:"rds-encryption-disabled",checkKey:"rdsEncryption",name:"RDS Encryption Disabled",description:"Detects RDS instances without encryption at rest.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.Encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable encryption for new RDS instances","For existing instances, create encrypted snapshot and restore"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-multi-az-disabled":{ruleId:"rds-multi-az-disabled",checkKey:"rdsMultiAZ",name:"RDS Multi-AZ Disabled",description:"Detects RDS instances without Multi-AZ deployment.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html",remediationSteps:["Enable Multi-AZ for production databases","Consider Aurora for automatic multi-AZ"],resourceTypes:["AWS::RDS::DBInstance"]},"rds-publicly-accessible":{ruleId:"rds-publicly-accessible",checkKey:"rdsPublicAccess",name:"RDS Publicly Accessible",description:"Detects RDS instances that are publicly accessible.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set PubliclyAccessible to false","Use VPC security groups to control access","Access databases through bastion hosts or VPN"],resourceTypes:["AWS::RDS::DBInstance"]},"rds-backup-retention-low":{ruleId:"rds-backup-retention-low",checkKey:"rdsBackupRetention",name:"RDS Backup Retention Low",description:"Detects RDS instances with insufficient backup retention.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html",complianceFrameworks:["SOC2","HIPAA","NIST"],remediationSteps:["Set backup retention period to at least 7 days","Consider longer retention for compliance requirements","Enable cross-region backup replication"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-deletion-protection-disabled":{ruleId:"rds-deletion-protection-disabled",checkKey:"rdsDeletionProtection",name:"RDS Deletion Protection Disabled",description:"Detects RDS instances without deletion protection.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html",remediationSteps:["Enable deletion protection for production databases","Use CloudFormation DeletionPolicy: Retain"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-logging-disabled":{ruleId:"rds-logging-disabled",checkKey:"rdsLogging",name:"RDS Logging Disabled",description:"Detects RDS DBInstance and DBCluster resources without EnableCloudwatchLogsExports configured. Engine logs (error, slow query, audit) are not exported to CloudWatch for retention or analysis.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set EnableCloudwatchLogsExports to the engine's relevant log types (e.g. ['error','slowquery'] for MySQL, ['postgresql'] for PostgreSQL)","Configure a CloudWatch Logs retention policy on the resulting log group","For Aurora, enable both DBCluster and per-instance log exports"],resourceTypes:["AWS::RDS::DBInstance","AWS::RDS::DBCluster"]},"rds-enhanced-monitoring-disabled":{ruleId:"rds-enhanced-monitoring-disabled",checkKey:"rdsEnhancedMonitoring",name:"RDS Enhanced Monitoring Disabled",description:"Detects RDS instances without enhanced monitoring (MonitoringInterval missing or set to 0). OS-level metrics are not published to CloudWatch Logs.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html",remediationSteps:["Set MonitoringInterval to one of 1, 5, 10, 15, 30, or 60 (seconds)","Provide MonitoringRoleArn pointing at an IAM role with AmazonRDSEnhancedMonitoringRole attached"],resourceTypes:["AWS::RDS::DBInstance"]},"ec2-instance-type-outdated":{ruleId:"ec2-instance-type-outdated",checkKey:"ec2InstanceType",name:"EC2 Instance Type Outdated",description:"Detects EC2 instances using older generation instance types.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html",remediationSteps:["Upgrade to current generation instance types","Use AWS Compute Optimizer for recommendations"],resourceTypes:["AWS::EC2::Instance"]},"nat-gateway-usage":{ruleId:"nat-gateway-usage",checkKey:"natGatewayUsage",name:"NAT Gateway Usage",description:"Identifies NAT Gateway usage for cost awareness.",severity:"LOW",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html",remediationSteps:["Consider VPC endpoints to reduce NAT Gateway traffic","Use NAT instances for lower traffic volumes"],resourceTypes:["AWS::EC2::NatGateway"]},"security-group-unrestricted-ingress":{ruleId:"security-group-unrestricted-ingress",checkKey:"securityGroups",name:"Security Group Unrestricted Ingress",description:"Detects security groups with unrestricted ingress (0.0.0.0/0).",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Restrict ingress to specific IP ranges","Use security group references for internal traffic","Implement least privilege network access"],resourceTypes:["AWS::EC2::SecurityGroup"]},"ebs-volume-unencrypted":{ruleId:"ebs-volume-unencrypted",checkKey:"ebsVolumes",name:"EBS Volume Unencrypted",description:"Detects EBS volumes without encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable EBS encryption by default in account settings","Use KMS customer managed keys for additional control"],resourceTypes:["AWS::EC2::Volume"]},"ec2-subnet-auto-public-ip":{ruleId:"ec2-subnet-auto-public-ip",checkKey:"ec2SubnetAutoPublicIp",name:"EC2 Subnet Auto-Assigns Public IPs",description:"Detects AWS::EC2::Subnet resources with MapPublicIpOnLaunch=true. Instances launched into the subnet inherit a public IP by default, which makes them internet-reachable without an explicit opt-in at the ENI level.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/vpc-ip-addressing.html#subnet-public-ip",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set MapPublicIpOnLaunch to false unless this is intentionally a public subnet","Have instances opt into a public IP via the ENI configuration when needed","Use VPC endpoints / NAT for outbound access from private subnets"],resourceTypes:["AWS::EC2::Subnet"]},"ec2-instance-public-ip":{ruleId:"ec2-instance-public-ip",checkKey:"ec2PublicIp",name:"EC2 Instance Public IP",description:"Detects EC2 instances whose NetworkInterfaces specify AssociatePublicIpAddress=true, exposing the instance directly to the internet.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set AssociatePublicIpAddress to false on the NetworkInterface","Place the instance in a private subnet and use a NAT Gateway / VPC endpoint for outbound","Use an ALB / NLB in a public subnet to front the workload instead"],resourceTypes:["AWS::EC2::Instance"]},"cloudfront-https-only":{ruleId:"cloudfront-https-only",checkKey:"cloudFrontHttpsOnly",name:"CloudFront HTTPS Only",description:"Detects CloudFront distributions allowing HTTP traffic.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set ViewerProtocolPolicy to https-only or redirect-to-https","Configure custom SSL certificate"],resourceTypes:["AWS::CloudFront::Distribution"]},"cloudfront-waf-missing":{ruleId:"cloudfront-waf-missing",checkKey:"cloudFrontWafAssociation",name:"CloudFront WAF Missing",description:"Detects CloudFront distributions without WAF association.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-awswaf.html",complianceFrameworks:["SOC2","PCI-DSS","NIST"],remediationSteps:["Associate AWS WAF web ACL with CloudFront distribution","Configure WAF rules for common attack patterns"],resourceTypes:["AWS::CloudFront::Distribution"]},"cloudfront-logging-disabled":{ruleId:"cloudfront-logging-disabled",checkKey:"cloudFrontLogging",name:"CloudFront Logging Disabled",description:"Detects CloudFront distributions without access logging.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable standard logging to S3","Consider real-time logs for detailed analysis"],resourceTypes:["AWS::CloudFront::Distribution"]},"cloudfront-tls-outdated":{ruleId:"cloudfront-tls-outdated",checkKey:"cloudFrontTls",name:"CloudFront TLS Outdated",description:"Detects CloudFront distributions using outdated TLS versions.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set MinimumProtocolVersion to TLSv1.2_2021 or higher","Use a custom SSL certificate"],resourceTypes:["AWS::CloudFront::Distribution"]},"elb-deletion-protection-disabled":{ruleId:"elb-deletion-protection-disabled",checkKey:"elbDeletionProtection",name:"ELB Deletion Protection Disabled",description:"Detects load balancers without deletion protection.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#deletion-protection",remediationSteps:["Enable deletion protection for production load balancers","Use CloudFormation DeletionPolicy: Retain"],resourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer"]},"elb-logging-disabled":{ruleId:"elb-logging-disabled",checkKey:"elbLogging",name:"ELB Logging Disabled",description:"Detects load balancers without access logging.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable access logging to S3","Configure log retention policy"],resourceTypes:["AWS::ElasticLoadBalancingV2::LoadBalancer"]},"elb-https-listeners-missing":{ruleId:"elb-https-listeners-missing",checkKey:"elbHttpsListeners",name:"ELB HTTPS Listeners Missing",description:"Detects load balancers with HTTP listeners not redirecting to HTTPS.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Add HTTPS listener with valid SSL certificate","Configure HTTP to HTTPS redirect"],resourceTypes:["AWS::ElasticLoadBalancingV2::Listener"]},"elb-security-policy-outdated":{ruleId:"elb-security-policy-outdated",checkKey:"elbSecurityPolicy",name:"ELB Security Policy Outdated",description:"Detects load balancers using outdated TLS security policies.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Update to ELBSecurityPolicy-TLS13-1-2-2021-06 or newer","Remove support for deprecated protocols"],resourceTypes:["AWS::ElasticLoadBalancingV2::Listener"]},"ecs-secrets-plaintext":{ruleId:"ecs-secrets-plaintext",checkKey:"ecsSecrets",name:"ECS Secrets in Plaintext",description:"Detects ECS task definitions with sensitive data in plaintext environment variables.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Use secrets property with Secrets Manager ARN","Use SSM Parameter Store SecureString"],resourceTypes:["AWS::ECS::TaskDefinition"]},"ecs-logging-disabled":{ruleId:"ecs-logging-disabled",checkKey:"ecsLogging",name:"ECS Logging Disabled",description:"Detects ECS task definitions without logging configured.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Configure awslogs log driver","Set up CloudWatch log groups with retention"],resourceTypes:["AWS::ECS::TaskDefinition"]},"ecs-service-connect-access-logs-missing":{ruleId:"ecs-service-connect-access-logs-missing",checkKey:"ecsServiceConnectLogs",name:"ECS Service Connect Access Logs Missing",description:"Detects ECS services with Service Connect enabled but no access log configuration, leaving inter-service traffic unaudited.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-logging.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set ServiceConnectConfiguration.LogConfiguration with a LogDriver such as awslogs","Send Service Connect logs to a CloudWatch log group with a retention policy","Confirm log group encryption is configured for sensitive workloads"],resourceTypes:["AWS::ECS::Service"]},"ecs-resources-missing":{ruleId:"ecs-resources-missing",checkKey:"ecsResources",name:"ECS Resource Limits Missing",description:"Detects ECS task definitions without CPU/memory limits.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size",remediationSteps:["Set CPU and memory at task level for Fargate","Set container-level memory limits for EC2"],resourceTypes:["AWS::ECS::TaskDefinition"]},"cognito-password-policy-weak":{ruleId:"cognito-password-policy-weak",checkKey:"cognitoPasswordPolicy",name:"Cognito Password Policy Weak",description:"Detects Cognito user pools with weak password policies.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-policies.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set minimum password length to at least 12 characters","Require uppercase, lowercase, numbers, and symbols"],resourceTypes:["AWS::Cognito::UserPool"]},"cognito-mfa-disabled":{ruleId:"cognito-mfa-disabled",checkKey:"cognitoMfa",name:"Cognito MFA Disabled",description:"Detects Cognito user pools without MFA enabled.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable MFA (OPTIONAL or ON)","Configure SMS or TOTP as MFA method"],resourceTypes:["AWS::Cognito::UserPool"]},"cognito-advanced-security-disabled":{ruleId:"cognito-advanced-security-disabled",checkKey:"cognitoAdvancedSecurity",name:"Cognito Advanced Security Disabled",description:"Detects Cognito user pools without advanced security features.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Enable advanced security mode (AUDIT or ENFORCED)","Configure risk-based adaptive authentication"],resourceTypes:["AWS::Cognito::UserPool"]},"api-gateway-method-auth-missing":{ruleId:"api-gateway-method-auth-missing",checkKey:"apiGatewayMethodAuth",name:"API Gateway Method Has No Authorization",description:"Detects AWS::ApiGateway::Method and AWS::ApiGatewayV2::Route resources where AuthorizationType is missing or NONE (excluding OPTIONS preflight). Public-by-default endpoints expose backend Lambdas to anyone on the internet.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/apigateway/latest/developerguide/permissions.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AuthorizationType to AWS_IAM, COGNITO_USER_POOLS, or CUSTOM (REST APIs)","Use JWT or AWS_IAM AuthorizationType for HTTP APIs (v2)","If the route is intentionally public (e.g. webhook receiver), prefer api-key + WAF rate limiting and suppress this rule explicitly"],resourceTypes:["AWS::ApiGateway::Method","AWS::ApiGatewayV2::Route"]},"api-gateway-logging-disabled":{ruleId:"api-gateway-logging-disabled",checkKey:"apiGateway",name:"API Gateway Logging Disabled",description:"Detects API Gateway stages without logging enabled.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable CloudWatch logging for API stages","Configure access logging for request/response details"],resourceTypes:["AWS::ApiGateway::Stage","AWS::ApiGatewayV2::Stage"]},"secrets-manager-rotation-disabled":{ruleId:"secrets-manager-rotation-disabled",checkKey:"secretsManager",name:"Secrets Manager Rotation Disabled",description:"Detects secrets without automatic rotation configured.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable automatic rotation","Set rotation schedule (e.g., every 30 days)"],resourceTypes:["AWS::SecretsManager::Secret"]},"cloudtrail-logging-disabled":{ruleId:"cloudtrail-logging-disabled",checkKey:"cloudTrailLogging",name:"CloudTrail Logging Disabled",description:"Detects CloudTrail trails with logging disabled.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-getting-started.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Ensure IsLogging is enabled","Configure multi-region trails","Enable log file validation"],resourceTypes:["AWS::CloudTrail::Trail"]},"eventbridge-bus-policy-wildcard-principal":{ruleId:"eventbridge-bus-policy-wildcard-principal",checkKey:"eventBusPolicy",name:"EventBridge Bus Policy Allows Wildcard Principal",description:"Detects AWS::Events::EventBusPolicy with an Allow statement targeting Principal=* (or AWS=*) without a Condition restricting access. Without the condition, any AWS account can publish events to the bus.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-event-bus-perms.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Replace wildcard Principal with specific 12-digit AWS account IDs","Or scope the policy with a Condition such as aws:PrincipalOrgID","Verify the StatementId is descriptive \u2014 easier to audit later"],resourceTypes:["AWS::Events::EventBusPolicy"]},"eventbridge-dlq-missing":{ruleId:"eventbridge-dlq-missing",checkKey:"eventBridgeRules",name:"EventBridge DLQ Missing",description:"Detects EventBridge rules without dead letter queue.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rule-dlq.html",remediationSteps:["Configure dead letter queue for failed event delivery","Set up monitoring for DLQ messages"],resourceTypes:["AWS::Events::Rule"]},"kms-key-rotation-disabled":{ruleId:"kms-key-rotation-disabled",checkKey:"kmsKeys",name:"KMS Key Rotation Disabled",description:"Detects KMS keys without automatic rotation.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Enable automatic key rotation","Key rotation occurs annually"],resourceTypes:["AWS::KMS::Key"]},"kms-key-policy-self-lockout":{ruleId:"kms-key-policy-self-lockout",checkKey:"kmsKeyPolicySelfLockout",name:"KMS Key Policy Self-Lockout",description:"Detects AWS::KMS::Key resources whose KeyPolicy contains a Deny statement on kms:*, kms:PutKeyPolicy, or * with a broad Principal and no carveout for the account root or admin role. Such a policy locks the account out of its own key \u2014 recovery requires breaking glass on the account root credentials AND scheduling a 7-30 day key deletion (which does not actually let you recover the key, just remove it). Effectively unrecoverable for any data the key has encrypted; AWS Support typically declines to intervene where customers have a self-service path via root.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Keep the auto-injected root Allow statement (CDK's defaultKeyPolicy) intact, or add an explicit Allow on Principal: { AWS: 'arn:aws:iam::<account>:root' } for Action: kms:*","Or add a NotPrincipal exemption for the account root or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs"],resourceTypes:["AWS::KMS::Key"]},"sns-encryption-disabled":{ruleId:"sns-encryption-disabled",checkKey:"sns",name:"SNS Encryption Disabled",description:"Detects SNS topics without encryption.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable server-side encryption with KMS","Use customer managed keys for additional control"],resourceTypes:["AWS::SNS::Topic"]},"sqs-encryption-disabled":{ruleId:"sqs-encryption-disabled",checkKey:"sqs",name:"SQS Encryption Disabled",description:"Detects SQS queues without encryption.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-server-side-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable server-side encryption with KMS","Use SQS-managed keys (SSE-SQS) or customer managed keys"],resourceTypes:["AWS::SQS::Queue"]},"sqs-queue-policy-self-lockout":{ruleId:"sqs-queue-policy-self-lockout",checkKey:"sqsQueuePolicySelfLockout",name:"SQS QueuePolicy Self-Lockout",description:"Detects AWS::SQS::QueuePolicy resources containing a Deny statement on sqs:DeleteQueue, sqs:RemovePermission, sqs:*, or * with a broad Principal and no NotPrincipal or aws:PrincipalArn carveout for the account root or admin role. Such a policy locks the account out of its own queue \u2014 recovery requires breaking glass on the account root credentials to remove the queue policy, or delete-and-recreate the queue if nothing else depends on its ARN. In event-driven systems that is often a multi-stack rebuild.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-access-policy-language-basic-structure.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Add a NotPrincipal exemption for the account root (arn:aws:iam::<account>:root) or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs","If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'"],resourceTypes:["AWS::SQS::QueuePolicy"]},"sns-topic-policy-self-lockout":{ruleId:"sns-topic-policy-self-lockout",checkKey:"snsTopicPolicySelfLockout",name:"SNS TopicPolicy Self-Lockout",description:"Detects AWS::SNS::TopicPolicy resources containing a Deny statement on sns:DeleteTopic, sns:RemovePermission, sns:*, or * with a broad Principal and no NotPrincipal or aws:PrincipalArn carveout for the account root or admin role. Such a policy locks the account out of its own topic \u2014 recovery requires breaking glass on the account root credentials to remove the topic policy, or delete-and-recreate the topic if no subscribers depend on its ARN. In fan-out architectures that is often a multi-stack rebuild.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/sns/latest/dg/sns-access-policy-language-key-concepts.html",complianceFrameworks:["SOC2","NIST"],remediationSteps:["Add a NotPrincipal exemption for the account root (arn:aws:iam::<account>:root) or admin role(s)","Or use a Condition with StringNotEquals on aws:PrincipalArn to exempt admin role ARNs","If the Deny is intended to scope to AWS services, use aws:PrincipalIsAWSService rather than a blanket Deny on Principal: '*'"],resourceTypes:["AWS::SNS::TopicPolicy"]},"stepfunctions-logging-disabled":{ruleId:"stepfunctions-logging-disabled",checkKey:"stepFunctions",name:"Step Functions Logging Disabled",description:"Detects Step Functions state machines without logging.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/step-functions/latest/dg/cw-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable CloudWatch Logs for state machine execution","Set appropriate log level (ALL, ERROR, FATAL, OFF)"],resourceTypes:["AWS::StepFunctions::StateMachine"]},"acm-certificate-email-validation":{ruleId:"acm-certificate-email-validation",checkKey:"acmValidation",name:"ACM Certificate Validation Hardening",description:"Detects ACM certificates using email validation or with certificate transparency logging disabled.",severity:"LOW",wafPillar:"Security",complianceFrameworks:["SOC2","NIST"],awsDocUrl:"https://docs.aws.amazon.com/acm/latest/userguide/dns-validation.html",remediationSteps:["Use DNS validation for automated certificate renewal","Enable certificate transparency logging to detect misissuance"],resourceTypes:["AWS::CertificateManager::Certificate"]},"appsync-api-key-auth":{ruleId:"appsync-api-key-auth",checkKey:"appSyncAuth",name:"AppSync API Key Authentication",description:"Detects AppSync APIs using API key authentication or lacking additional authentication providers.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/appsync/latest/devguide/security-authz.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Use AWS_IAM, Cognito User Pools, or OIDC for production workloads","Configure AdditionalAuthenticationProviders for client flexibility"],resourceTypes:["AWS::AppSync::GraphQLApi"]},"appsync-logging-disabled":{ruleId:"appsync-logging-disabled",checkKey:"appSyncLogging",name:"AppSync Logging Disabled",description:"Detects AppSync APIs without logging, field-level logging, or X-Ray tracing.",severity:"MEDIUM",wafPillar:"Operational Excellence",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],awsDocUrl:"https://docs.aws.amazon.com/appsync/latest/devguide/monitoring.html",remediationSteps:["Configure LogConfig to capture request/response logs in CloudWatch","Set FieldLogLevel to ERROR or ALL for resolver execution detail","Enable XrayEnabled for distributed tracing"],resourceTypes:["AWS::AppSync::GraphQLApi"]},"appsync-waf-missing":{ruleId:"appsync-waf-missing",checkKey:"appSyncWaf",name:"AppSync WAF Missing",description:"Detects AppSync APIs without an associated AWS WAF WebACL.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/appsync/latest/devguide/WAF-Integration.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Associate a WAFv2 WebACL with the AppSync API","Define rules to protect against common web exploits"],resourceTypes:["AWS::AppSync::GraphQLApi","AWS::WAFv2::WebACLAssociation"]},"backup-plan-misconfigured":{ruleId:"backup-plan-misconfigured",checkKey:"backupPlans",name:"Backup Plan Misconfigured",description:"Detects Backup plan rules without cross-region copy or lifecycle configuration.",severity:"LOW",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/aws-backup/latest/devguide/about-backup-plans.html",remediationSteps:["Add CopyActions to replicate backups cross-region for DR","Set DeleteAfterDays / MoveToColdStorageAfterDays to manage retention and cost"],resourceTypes:["AWS::Backup::BackupPlan"]},"backup-vault-hardening":{ruleId:"backup-vault-hardening",checkKey:"backupVault",name:"Backup Vault Hardening",description:"Detects Backup vaults using AWS-managed keys or without a vault lock for compliance.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/aws-backup/latest/devguide/vaultlock.html",complianceFrameworks:["SOC2","HIPAA","NIST"],remediationSteps:["Specify a customer-managed KMS key via EncryptionKeyArn","Add a BackupVaultLock to enforce retention and prevent deletion"],resourceTypes:["AWS::Backup::BackupVault","AWS::Backup::BackupVaultLock"]},"cloudwatch-alarm-actions-missing":{ruleId:"cloudwatch-alarm-actions-missing",checkKey:"cloudWatchAlarms",name:"CloudWatch Alarm Actions Missing",description:"Detects CloudWatch Alarms without alarm actions or missing-data handling.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html",remediationSteps:["Add AlarmActions (SNS, Lambda, SSM) for state-change notifications","Set TreatMissingData to define behaviour for missing data points"],resourceTypes:["AWS::CloudWatch::Alarm"]},"cloudwatch-logs-encryption-disabled":{ruleId:"cloudwatch-logs-encryption-disabled",checkKey:"cloudWatchEncryption",name:"CloudWatch Logs Encryption Disabled",description:"Detects CloudWatch Log Groups not encrypted with a customer-managed KMS key.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/encrypt-log-data-kms.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set KmsKeyId on the LogGroup to encrypt with a customer-managed key"],resourceTypes:["AWS::Logs::LogGroup"]},"cloudwatch-logs-retention-missing":{ruleId:"cloudwatch-logs-retention-missing",checkKey:"cloudWatchLogRetention",name:"CloudWatch Logs Retention Missing",description:"Detects CloudWatch Log Groups without an explicit retention period (logs retained indefinitely).",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html",remediationSteps:["Set RetentionInDays to control storage cost (30\u201390 days for ops, longer for compliance)"],resourceTypes:["AWS::Logs::LogGroup"]},"ecr-mutable-tags":{ruleId:"ecr-mutable-tags",checkKey:"ecrImmutableTags",name:"ECR Mutable Image Tags",description:"Detects ECR repositories that allow image tags to be overwritten.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html",complianceFrameworks:["SOC2","PCI-DSS","NIST"],remediationSteps:["Set ImageTagMutability to IMMUTABLE"],resourceTypes:["AWS::ECR::Repository"]},"ecr-lifecycle-policy-missing":{ruleId:"ecr-lifecycle-policy-missing",checkKey:"ecrLifecycle",name:"ECR Lifecycle Policy Missing",description:"Detects ECR repositories without a lifecycle policy to clean up old images.",severity:"MEDIUM",wafPillar:"Cost Optimization",awsDocUrl:"https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html",remediationSteps:["Define a LifecyclePolicy to expire untagged or excess image versions"],resourceTypes:["AWS::ECR::Repository"]},"ecr-scan-on-push-disabled":{ruleId:"ecr-scan-on-push-disabled",checkKey:"ecrScanning",name:"ECR Scan-on-Push Disabled",description:"Detects ECR repositories without image vulnerability scanning on push.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable ScanOnPush in ImageScanningConfiguration","Or use enhanced scanning at the registry level"],resourceTypes:["AWS::ECR::Repository"]},"eks-secrets-encryption-disabled":{ruleId:"eks-secrets-encryption-disabled",checkKey:"eksEncryption",name:"EKS Secrets Encryption Disabled",description:"Detects EKS clusters without envelope encryption for Kubernetes secrets in etcd.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eks/latest/userguide/enable-kms.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:['Configure EncryptionConfig with a KMS key referencing resources: ["secrets"]'],resourceTypes:["AWS::EKS::Cluster"]},"eks-control-plane-logging-disabled":{ruleId:"eks-control-plane-logging-disabled",checkKey:"eksLogging",name:"EKS Control Plane Logging Disabled",description:"Detects EKS clusters with no control plane log types enabled.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable api, audit, authenticator, controllerManager, and scheduler logs"],resourceTypes:["AWS::EKS::Cluster"]},"eks-public-endpoint-unrestricted":{ruleId:"eks-public-endpoint-unrestricted",checkKey:"eksPublicEndpoint",name:"EKS Public Endpoint Unrestricted",description:"Detects EKS clusters with the API endpoint reachable from 0.0.0.0/0 or only via the public network.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable EndpointPrivateAccess for in-VPC node communication","Restrict PublicAccessCidrs to known administrative IP ranges"],resourceTypes:["AWS::EKS::Cluster"]},"elasticache-auth-token-missing":{ruleId:"elasticache-auth-token-missing",checkKey:"elastiCacheAuth",name:"ElastiCache AUTH Token Missing",description:"Detects Redis replication groups with transit encryption but no AUTH token configured.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AuthToken to require Redis client authentication"],resourceTypes:["AWS::ElastiCache::ReplicationGroup"]},"elasticache-encryption-disabled":{ruleId:"elasticache-encryption-disabled",checkKey:"elastiCacheEncryption",name:"ElastiCache Encryption Disabled",description:"Detects ElastiCache clusters without at-rest or in-transit encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/at-rest-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AtRestEncryptionEnabled: true","Set TransitEncryptionEnabled: true"],resourceTypes:["AWS::ElastiCache::ReplicationGroup","AWS::ElastiCache::CacheCluster"]},"elasticache-failover-disabled":{ruleId:"elasticache-failover-disabled",checkKey:"elastiCacheFailover",name:"ElastiCache Automatic Failover Disabled",description:"Detects ElastiCache replication groups without automatic failover or Multi-AZ.",severity:"MEDIUM",wafPillar:"Reliability",complianceFrameworks:["SOC2","HIPAA"],awsDocUrl:"https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/AutoFailover.html",remediationSteps:["Enable AutomaticFailoverEnabled","Enable MultiAZEnabled to span availability zones"],resourceTypes:["AWS::ElastiCache::ReplicationGroup"]},"glue-connection-network-isolation":{ruleId:"glue-connection-network-isolation",checkKey:"glueConnections",name:"Glue Connection Network Isolation",description:"Detects Glue JDBC connections without VPC subnet placement or SSL enforcement.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/glue/latest/dg/setup-vpc-for-glue-access.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList","Include SSL parameters in the JDBC connection URL"],resourceTypes:["AWS::Glue::Connection"]},"glue-job-encryption-missing":{ruleId:"glue-job-encryption-missing",checkKey:"glueEncryption",name:"Glue Job Encryption Missing",description:"Detects Glue jobs without an attached SecurityConfiguration for encrypting bookmarks, S3 data, and CloudWatch logs.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/glue/latest/dg/encryption-security-configuration.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Create a SecurityConfiguration enabling KMS encryption for all targets","Reference it via the job's SecurityConfiguration property"],resourceTypes:["AWS::Glue::Job"]},"kinesis-encryption-disabled":{ruleId:"kinesis-encryption-disabled",checkKey:"kinesisEncryption",name:"Kinesis Encryption Disabled",description:"Detects Kinesis Data Streams without server-side KMS encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/streams/latest/dev/server-side-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set StreamEncryption with EncryptionType: KMS and a KeyId"],resourceTypes:["AWS::Kinesis::Stream"]},"kinesis-retention-minimum":{ruleId:"kinesis-retention-minimum",checkKey:"kinesisRetention",name:"Kinesis Minimum Retention",description:"Detects Kinesis Data Streams using the default 24-hour retention period.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/streams/latest/dev/kinesis-extended-retention.html",remediationSteps:["Increase RetentionPeriodHours to support replay/reprocessing during incidents"],resourceTypes:["AWS::Kinesis::Stream"]},"lambda-runtime-deprecated":{ruleId:"lambda-runtime-deprecated",checkKey:"lambdaRuntime",name:"Lambda Deprecated Runtime",description:"Detects Lambda functions using runtimes that have reached or are approaching end-of-life.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html",complianceFrameworks:["SOC2","PCI-DSS","NIST"],remediationSteps:["Upgrade to a currently supported runtime","Track AWS Lambda runtime deprecation announcements"],resourceTypes:["AWS::Lambda::Function"]},"msk-client-authentication-missing":{ruleId:"msk-client-authentication-missing",checkKey:"mskAuth",name:"MSK Client Authentication Missing",description:"Detects MSK clusters without client authentication or that allow unauthenticated access.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/msk/latest/developerguide/kafka_apis_iam.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable SASL/SCRAM, IAM auth, or mTLS in ClientAuthentication","Disable Unauthenticated access"],resourceTypes:["AWS::MSK::Cluster"]},"msk-encryption-weak":{ruleId:"msk-encryption-weak",checkKey:"mskEncryption",name:"MSK Encryption Weak",description:"Detects MSK clusters without TLS for client-broker traffic, without inter-broker encryption, or using AWS-managed keys for at-rest encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/msk/latest/developerguide/msk-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set ClientBroker to TLS in EncryptionInTransit","Set InCluster to true in EncryptionInTransit","Specify DataVolumeKMSKeyId for at-rest encryption"],resourceTypes:["AWS::MSK::Cluster"]},"msk-broker-logging-disabled":{ruleId:"msk-broker-logging-disabled",checkKey:"mskLogging",name:"MSK Broker Logging Disabled",description:"Detects MSK clusters without broker logs configured.",severity:"MEDIUM",wafPillar:"Operational Excellence",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],awsDocUrl:"https://docs.aws.amazon.com/msk/latest/developerguide/msk-logging.html",remediationSteps:["Enable broker logs to CloudWatch Logs, Firehose, or S3"],resourceTypes:["AWS::MSK::Cluster"]},"opensearch-access-control-weak":{ruleId:"opensearch-access-control-weak",checkKey:"openSearchAccessControl",name:"OpenSearch Access Control Weak",description:"Detects OpenSearch domains without fine-grained access control or VPC placement.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/fgac.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable AdvancedSecurityOptions","Configure VPCOptions to deploy the domain inside a VPC"],resourceTypes:["AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain"]},"opensearch-encryption-disabled":{ruleId:"opensearch-encryption-disabled",checkKey:"openSearchEncryption",name:"OpenSearch Encryption Disabled",description:"Detects OpenSearch domains without at-rest encryption or node-to-node encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/encryption-at-rest.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable EncryptionAtRestOptions with a KMS key","Enable NodeToNodeEncryptionOptions"],resourceTypes:["AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain"]},"opensearch-logging-disabled":{ruleId:"opensearch-logging-disabled",checkKey:"openSearchLogging",name:"OpenSearch Logging Disabled",description:"Detects OpenSearch domains without audit logs or application logs published to CloudWatch.",severity:"LOW",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/opensearch-service/latest/developerguide/audit-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Enable AUDIT_LOGS in LogPublishingOptions","Enable ES_APPLICATION_LOGS in LogPublishingOptions"],resourceTypes:["AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain"]},"redshift-encryption-disabled":{ruleId:"redshift-encryption-disabled",checkKey:"redshiftEncryption",name:"Redshift Encryption Disabled",description:"Detects Redshift clusters without at-rest encryption.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-db-encryption.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set Encrypted: true and specify a KmsKeyId"],resourceTypes:["AWS::Redshift::Cluster"]},"redshift-audit-logging-disabled":{ruleId:"redshift-audit-logging-disabled",checkKey:"redshiftLogging",name:"Redshift Audit Logging Disabled",description:"Detects Redshift clusters without audit logging to S3 (connection, user, query activity).",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/redshift/latest/mgmt/db-auditing.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set LoggingProperties with a target S3 bucket and key prefix"],resourceTypes:["AWS::Redshift::Cluster"]},"redshift-publicly-accessible":{ruleId:"redshift-publicly-accessible",checkKey:"redshiftPublicAccess",name:"Redshift Publicly Accessible",description:"Detects Redshift clusters reachable from the public internet.",severity:"CRITICAL",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/redshift/latest/mgmt/managing-clusters-vpc.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Set PubliclyAccessible: false","Use VPC endpoints, bastion hosts, or VPN for access"],resourceTypes:["AWS::Redshift::Cluster"]},"route53-dnssec-disabled":{ruleId:"route53-dnssec-disabled",checkKey:"route53Dnssec",name:"Route 53 DNSSEC Disabled",description:"Detects Route 53 hosted zones without DNSSEC signing enabled.",severity:"LOW",wafPillar:"Security",complianceFrameworks:["SOC2","NIST"],awsDocUrl:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html",remediationSteps:["Create an AWS::Route53::DNSSEC resource for the hosted zone","Configure a key-signing key (KSK)"],resourceTypes:["AWS::Route53::HostedZone","AWS::Route53::DNSSEC"]},"route53-health-check-suboptimal":{ruleId:"route53-health-check-suboptimal",checkKey:"route53HealthChecks",name:"Route 53 Health Check Suboptimal",description:"Detects Route 53 health checks using HTTP instead of HTTPS or the standard request interval.",severity:"LOW",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html",remediationSteps:["Use HTTPS to validate certificate and endpoint security","Use a 10-second request interval for critical endpoints"],resourceTypes:["AWS::Route53::HealthCheck"]},"route53-query-logging-disabled":{ruleId:"route53-query-logging-disabled",checkKey:"route53QueryLogging",name:"Route 53 Query Logging Disabled",description:"Detects Route 53 hosted zones without query logging.",severity:"LOW",wafPillar:"Security",complianceFrameworks:["SOC2","HIPAA","NIST"],awsDocUrl:"https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html",remediationSteps:["Create an AWS::Route53::QueryLoggingConfig pointing to a CloudWatch Logs group"],resourceTypes:["AWS::Route53::HostedZone","AWS::Route53::QueryLoggingConfig"]},"vpc-default-security-group-rules-present":{ruleId:"vpc-default-security-group-rules-present",checkKey:"vpcDefaultSecurityGroup",name:"VPC Default Security Group Has Rules",description:"Detects default VPC security groups with ingress or egress rules; defaults should be empty.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/default-security-group.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Remove all rules from the default security group","Use purpose-built security groups instead"],resourceTypes:["AWS::EC2::SecurityGroup"]},"vpc-flow-logs-missing":{ruleId:"vpc-flow-logs-missing",checkKey:"vpcFlowLogs",name:"VPC Flow Logs Missing",description:"Detects VPCs without flow logs configured.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","CIS","NIST"],remediationSteps:["Create an AWS::EC2::FlowLog resource targeting the VPC","Send logs to CloudWatch Logs or S3"],resourceTypes:["AWS::EC2::VPC","AWS::EC2::FlowLog"]},"waf-logging-disabled":{ruleId:"waf-logging-disabled",checkKey:"wafLogging",name:"WAF Logging Disabled",description:"Detects WAFv2 WebACLs without logging configuration for analysed requests.",severity:"MEDIUM",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/waf/latest/developerguide/logging.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Create an AWS::WAFv2::LoggingConfiguration for the WebACL"],resourceTypes:["AWS::WAFv2::WebACL","AWS::WAFv2::LoggingConfiguration"]},"autoscaling-group-no-elb-healthcheck":{ruleId:"autoscaling-group-no-elb-healthcheck",checkKey:"autoScalingGroupHealthCheck",name:"AutoScaling Group Not Using ELB Health Checks",description:"Detects AWS::AutoScaling::AutoScalingGroup resources attached to a load balancer (LoadBalancerNames or TargetGroupARNs) but using EC2 health checks. EC2 health checks miss app-level outages the load balancer would otherwise detect.",severity:"MEDIUM",wafPillar:"Reliability",awsDocUrl:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html",remediationSteps:["Set HealthCheckType to ELB on the AutoScalingGroup","Set HealthCheckGracePeriod to give instances time to bootstrap before the LB starts probing","Verify the ALB / NLB target group has appropriate health-check thresholds"],resourceTypes:["AWS::AutoScaling::AutoScalingGroup"]},"autoscaling-launch-config-public-ip":{ruleId:"autoscaling-launch-config-public-ip",checkKey:"autoScalingLaunchConfigPublicIp",name:"AutoScaling LaunchConfiguration Assigns Public IP",description:"Detects AWS::AutoScaling::LaunchConfiguration with AssociatePublicIpAddress=true. Instances launched from this configuration get a public IP and are internet-reachable directly.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupExamples.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set AssociatePublicIpAddress to false on the LaunchConfiguration","Place instances in private subnets behind an ALB / NLB","Use a NAT Gateway / VPC endpoints for outbound traffic","Migrate to AWS::EC2::LaunchTemplate (LaunchConfiguration is deprecated)"],resourceTypes:["AWS::AutoScaling::LaunchConfiguration"]},"efs-encryption-disabled":{ruleId:"efs-encryption-disabled",checkKey:"efsEncryption",name:"EFS Encryption Disabled",description:"Detects AWS::EFS::FileSystem resources without Encrypted=true. The CFN default is unencrypted (unlike the EFS console default), and encryption can only be enabled at filesystem creation.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/efs/latest/ug/encryption-at-rest.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Set Encrypted to true on the AWS::EFS::FileSystem resource","Provide KmsKeyId pointing at a customer-managed KMS key for additional control","For existing unencrypted filesystems, migrate data to a new encrypted filesystem"],resourceTypes:["AWS::EFS::FileSystem"]},"waf-webacl-misconfigured":{ruleId:"waf-webacl-misconfigured",checkKey:"wafWebAcl",name:"WAF WebACL Misconfigured",description:"Detects WAFv2 WebACLs with no rules, default Allow action, or CloudWatch metrics disabled.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/waf/latest/developerguide/web-acl.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Add WAF rules covering the OWASP Top 10 baseline","Set DefaultAction to Block for defence-in-depth","Enable CloudWatchMetricsEnabled in VisibilityConfig"],resourceTypes:["AWS::WAFv2::WebACL"]},"cross-resource-misconfiguration":{ruleId:"cross-resource-misconfiguration",checkKey:"crossResourceRelationships",name:"Cross-Resource Misconfiguration",description:"Detects misconfigurations only visible across multiple resources: Lambda functions referencing VPC-only resources without VpcConfig, S3 replication without encryption configuration, and security groups exposing non-standard ports to the public when used by sensitive services.",severity:"HIGH",wafPillar:"Security",awsDocUrl:"https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/welcome.html",complianceFrameworks:["SOC2","HIPAA","PCI-DSS","NIST"],remediationSteps:["Configure VpcConfig on Lambda functions that reach VPC-only resources (RDS, ElastiCache, Redshift, OpenSearch, ECS Service)","Specify EncryptionConfiguration on S3 replication rules so replicated objects retain encryption at the destination","Restrict 0.0.0.0/0 ingress on non-standard ports for security groups attached to sensitive services"],resourceTypes:["AWS::Lambda::Function","AWS::S3::Bucket","AWS::EC2::SecurityGroup","AWS::RDS::DBInstance","AWS::ElastiCache::CacheCluster","AWS::Redshift::Cluster","AWS::OpenSearchService::Domain","AWS::Elasticsearch::Domain","AWS::ECS::Service"]},"stack-architecture-recommendations":{ruleId:"stack-architecture-recommendations",checkKey:"stackArchitecture",name:"Stack Architecture Recommendations",description:"Detects architectural omissions across the stack: missing CloudWatch Alarms on critical resources, Lambda functions without X-Ray tracing, public-facing resources without WAF, RDS databases without Secrets Manager rotation, and excessive NAT Gateway usage.",severity:"MEDIUM",wafPillar:"Operational Excellence",awsDocUrl:"https://docs.aws.amazon.com/wellarchitected/latest/framework/welcome.html",remediationSteps:["Add CloudWatch Alarms on key metrics (Lambda errors, ECS task failures, RDS connections)","Enable X-Ray tracing on Lambda functions for distributed-request visibility","Associate AWS WAF with public-facing API Gateway, ALB, or CloudFront distributions","Use Secrets Manager with automatic rotation for RDS database credentials","Audit NAT Gateway count and consider VPC endpoints or NAT instances for cost reduction"],resourceTypes:["AWS::Lambda::Function","AWS::ApiGateway::RestApi","AWS::ApiGatewayV2::Api","AWS::ElasticLoadBalancingV2::LoadBalancer","AWS::CloudFront::Distribution","AWS::RDS::DBInstance","AWS::EC2::NatGateway","AWS::CloudWatch::Alarm"]}};var dT=(()=>{let e=new Map;for(let t of Object.values(sr))t.checkKey&&t.ruleId&&e.set(t.checkKey,t.ruleId);return e})(),mT={IAM:["AWS::IAM::"],S3:["AWS::S3::"],Lambda:["AWS::Lambda::"],DynamoDB:["AWS::DynamoDB::"],RDS:["AWS::RDS::"],EC2:["AWS::EC2::"],SNS:["AWS::SNS::"],SQS:["AWS::SQS::"],StepFunctions:["AWS::StepFunctions::"],CloudTrail:["AWS::CloudTrail::"],ApiGateway:["AWS::ApiGateway::","AWS::ApiGatewayV2::"],SecretsManager:["AWS::SecretsManager::"],KMS:["AWS::KMS::"],EventBridge:["AWS::Events::"],CloudFront:["AWS::CloudFront::"],ELB:["AWS::ElasticLoadBalancing::","AWS::ElasticLoadBalancingV2::"],ECS:["AWS::ECS::"],Cognito:["AWS::Cognito::"],WAF:["AWS::WAFv2::","AWS::WAF::"],CloudWatch:["AWS::CloudWatch::","AWS::Logs::"],Route53:["AWS::Route53::"],ElastiCache:["AWS::ElastiCache::"],ECR:["AWS::ECR::"],OpenSearch:["AWS::OpenSearchService::","AWS::Elasticsearch::"],ACM:["AWS::CertificateManager::"],Backup:["AWS::Backup::"],VPC:["AWS::EC2::VPC","AWS::EC2::FlowLog","AWS::EC2::SecurityGroup"],Kinesis:["AWS::Kinesis::"],AppSync:["AWS::AppSync::"],EKS:["AWS::EKS::"],Redshift:["AWS::Redshift::"],MSK:["AWS::MSK::"],Glue:["AWS::Glue::"],EFS:["AWS::EFS::"],AutoScaling:["AWS::AutoScaling::"]},iz=$r({ttl:3e5,maxSize:100});var fT=Vh(qh,{ttl:6e5,maxSize:10}),gT=e=>{if(e.includes("All services")||e.length===0)return s=>!s.Type.startsWith("AWS::CDK::");let t=[];for(let s of e){if(s==="All services")continue;let n=mT[s];n&&t.push(...n)}return t.length===0?s=>!s.Type.startsWith("AWS::CDK::"):s=>!s.Type.startsWith("AWS::CDK::")&&t.some(n=>s.Type.startsWith(n))},hT=e=>{let t=new Map,s={CRITICAL:4,HIGH:3,MEDIUM:2,LOW:1};for(let n of e){let r=n.issue,i=t.get(r);i?s[n.severity]>s[i.severity]&&t.set(r,n):t.set(r,n)}return Array.from(t.values())},yT=(e,t,s,n)=>{let r={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},i={},o=0;for(let a of Object.values(e))for(let u of a.issues){o++,r[u.severity]++;let c=u.ruleId?Gr(u.ruleId)??"Other":"Other";i[c]=(i[c]||0)+1}return{totalResources:t,analyzedResources:Object.keys(e).length,totalFindings:o,findingsBySeverity:r,findingsByService:i,analysisTimeMs:Date.now()-n,servicesAnalyzed:s}},Fo=(e,t,s=[],n={},r=[],i)=>ST(e,t,{selectedServices:s,solutionsRegistry:n,deduplicateFindings:!0,includeStatistics:!1,customRules:r,ruleContext:i}).findings,ST=(e,t,s={})=>{let n=Date.now(),{selectedServices:r=[],solutionsRegistry:i={},deduplicateFindings:o=!0,customRules:a=[],ruleContext:u}=s,c=fT(),l=new Set(["solutionsPatterns","stackArchitecture","crossResourceRelationships"]),p=Object.keys(c).filter(E=>!l.has(E)),{services:d}=Zh(r),m=Yh(d,p),f={},g=gT(d),h=Object.keys(e.Resources||{}).length,y=Object.entries(e.Resources||{}).filter(([,E])=>g(E)).reduce((E,[O,M])=>(E[O]=M,E),{}),b=[];for(let E of m)try{let O=c[E];if(typeof O!="function"){let X=Gr(E)??E;ye.warn(`\u26A0\uFE0F Service check function for ${X} (${E}) is not available`);continue}let M=O({Resources:y},t,u);b.push(E);let P=dT.get(E);for(let[X,B]of Object.entries(M)){if(f[X]||(f[X]={issues:[]}),P)for(let z of B.issues)z.ruleId||(z.ruleId=P);f[X].issues.push(...B.issues)}}catch(O){let M=Gr(E)??E;ye.warn(`\u26A0\uFE0F Error in ${M} analysis (${E})`,{error:O instanceof Error?O.message:String(O)})}if(Object.keys(i).length>0)try{let E=c.solutionsPatterns({Resources:y},i);for(let O of E){let M=O.resourceId;f[M]||(f[M]={issues:[]}),f[M].issues.push(O)}}catch(E){ye.warn("\u26A0\uFE0F Error in solutions pattern analysis",{error:E instanceof Error?E.message:String(E)})}if(a.length>0)try{let E=aS(e,a,t);for(let[O,M]of Object.entries(E))f[O]||(f[O]={issues:[]}),f[O].issues.push(...M.issues);ye.info(`Custom rules evaluated: ${a.length} rule(s)`)}catch(E){ye.warn("\u26A0\uFE0F Error evaluating custom rules",{error:E instanceof Error?E.message:String(E)})}if(o)for(let E of Object.keys(f))f[E].issues=hT(f[E].issues);Object.keys(f).length===0&&ye.info(`\x1B[32m\u2705 No security or cost issues detected!\x1B[0m
|
|
92
92
|
`);let x=[...new Set(b.map(E=>Gr(E)).filter(E=>E!==void 0))],v=yT(f,h,x,n);return{findings:f,statistics:v}};var bu=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),bT=e=>{if(!bu(e))return null;let t=e["Fn::GetStackOutput"];if(!bu(t))return null;let s=t.StackName,n=t.OutputName;if(typeof s!="string"||typeof n!="string")return null;let r=typeof t.Region=="string"?t.Region:void 0;return{stackName:s,outputName:n,region:r}},Io=e=>{let t=[],s=n=>{let r=bT(n);if(r){t.push(r);return}if(Array.isArray(n)){for(let i of n)s(i);return}if(bu(n))for(let i of Object.values(n))s(i)};return s(e),t};var DT=(e,t)=>{if(e===t)return 0;if(e.length===0)return t.length;if(t.length===0)return e.length;let s=Array.from({length:t.length+1},(r,i)=>i),n=new Array(t.length+1).fill(0);for(let r=1;r<=e.length;r++){n[0]=r;for(let i=1;i<=t.length;i++){let o=e.charCodeAt(r-1)===t.charCodeAt(i-1)?0:1;n[i]=Math.min(n[i-1]+1,s[i]+1,s[i-1]+o)}[s,n]=[n,s]}return s[t.length]},cS=(e,t,s=3)=>{let n=null,r=s+1;for(let i of t){let o=DT(e,i);o<r&&(r=o,n=i)}return n};var uS=(e,t,s)=>{let n={};if(!s)return n;let{outputsByStack:r}=s,i=e.Resources||{};for(let[o,a]of Object.entries(i)){let u=Io(a);if(u.length!==0)for(let c of u){let l=r.get(c.stackName);if(!l||l.has(c.outputName))continue;let p=a.Metadata?.["aws:cdk:path"]||o,d=c.region?` (region: ${c.region})`:"",m=cS(c.outputName,l),f=m&&m!==c.outputName?` Did you mean "${m}"?`:"";n[o]||(n[o]={issues:[]}),n[o].issues.push(t(o,`Fn::GetStackOutput references output "${c.outputName}" on stack "${c.stackName}"${d}, but no such output is declared by that stack in this CDK app.${f} Deploy will fail at resolution time with Outputs.NoSuchOutput.`,m?`Verify the output logical ID matches what the producer stack declares. The closest declared output on "${c.stackName}" is "${m}" \u2014 if that is the intended target, fix the reference. If the producer is deployed outside this app, this finding is a false positive and can be ignored.`:`Verify the output logical ID matches what the producer stack declares. If the producer is in this app, check its CfnOutput logical IDs against "${c.outputName}". If the producer is deployed outside this app, this finding is a false positive and can be ignored.`,"CRITICAL","Reliability",p,"cdkInsights"))}}return n};var Dt=e=>e?JSON.stringify(e).length:0,lS=e=>{if(!e||typeof e!="object")return 0;let s=e.Statement;return Array.isArray(s)?s.length:s&&typeof s=="object"?1:0},ko=(e,t)=>{if(!e)return null;if(typeof e=="string"&&t.has(e))return e;if(typeof e!="object")return null;let s=e;if("Ref"in s&&typeof s.Ref=="string"&&t.has(s.Ref))return s.Ref;if("Fn::GetAtt"in s){let n=s["Fn::GetAtt"];if(Array.isArray(n)&&typeof n[0]=="string"&&t.has(n[0]))return n[0];if(typeof n=="string"){let r=n.split(".")[0];if(t.has(r))return r}}return null};var Zt=e=>{if(!e||typeof e!="object")return[];let s=e.Statement;return Array.isArray(s)?s:s&&typeof s=="object"?[s]:[]},be=(e,t)=>t<=0?0:e/t,de=e=>e<1024?`${e} bytes`:`${(e/1024).toFixed(1)}KB`,_s=e=>{let s=(e.Properties||{}).Policies;return Array.isArray(s)?s.map(n=>({name:n.PolicyName||"unnamed",document:n.PolicyDocument})):[]};var le=(e,t)=>Object.entries(e).filter(([,s])=>s.Type===t),pS=e=>{let t=new Set(Object.keys(e)),s=new Map;for(let[n,r]of Object.entries(e)){if(r.Type!=="AWS::Events::Rule")continue;let o=(r.Properties||{}).Targets;if(Array.isArray(o))for(let a of o){let u=a.DeadLetterConfig;if(!u?.Arn)continue;let c=ko(u.Arn,t);if(!c)continue;let l=s.get(c)||[];l.push(n),s.set(c,l)}}return s},dS=e=>{let t=new Map;for(let[s,n]of Object.entries(e)){if(n.Type!=="AWS::Events::Rule")continue;let r=n.Properties||{},i="default";typeof r.EventBusName=="string"?i=r.EventBusName:r.EventBusName&&typeof r.EventBusName=="object"&&(i=JSON.stringify(r.EventBusName));let o=t.get(i)||[];o.push(s),t.set(i,o)}return t};var mS=(e,t,s)=>{let n=new Set(Object.keys(s)),r=t.Properties||{},i=r.SecurityGroupIngress||[],o=r.SecurityGroupEgress||[],a=Array.isArray(i)?i.length:0,u=Array.isArray(o)?o.length:0;for(let[,c]of Object.entries(s))c.Type==="AWS::EC2::SecurityGroupIngress"&&ko(c.Properties?.GroupId,n)===e&&a++,c.Type==="AWS::EC2::SecurityGroupEgress"&&ko(c.Properties?.GroupId,n)===e&&u++;return{inbound:a,outbound:u}};var fS=e=>{let t=e.Effect||"Allow",s=Array.isArray(e.Action)?[...e.Action].sort():typeof e.Action=="string"?[e.Action]:[],n=Array.isArray(e.Resource)?[...e.Resource].sort():typeof e.Resource=="string"?[e.Resource]:[];return`${t}|${s.join(",")}|${n.join(",")}`},gS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role"),i=le(n,"AWS::IAM::Policy");for(let[o,a]of r){let u=a.Metadata?.["aws:cdk:path"]||o,c=[],l=_s(a);for(let m of l){if(!m.document)continue;let f=Zt(m.document);for(let g of f)c.push({key:fS(g),source:`inline policy "${m.name}"`})}for(let[,m]of i){let f=m.Properties||{},g=f.Roles;if(!Array.isArray(g)||!g.some(v=>typeof v=="string"?v===o:v&&typeof v=="object"?v.Ref===o:!1))continue;let y=f.PolicyDocument;if(!y)continue;let b=Zt(y),x=f.PolicyName||"unnamed";for(let v of b)c.push({key:fS(v),source:`attached policy "${x}"`})}let p=new Map;for(let{key:m,source:f}of c){let g=p.get(m)||[];g.push(f),p.set(m,g)}let d=0;for(let[,m]of p)m.length>1&&(d+=m.length-1);d>0&&(s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`IAM role has ${d} duplicate policy statement(s) across its inline and attached policies. Duplicate statements increase policy size without adding permissions.`,"Consolidate duplicate statements into a single policy. Review inline policies and attached AWS::IAM::Policy resources for overlapping Effect + Action + Resource combinations.","LOW","Security",u,"cdkInsights")))}return s};var vT=e=>{for(let[,t]of Object.entries(e)){let s=t.Metadata?.["aws:cdk:path"];if(s&&/prod/i.test(s))return!0;if(t.Metadata){for(let n of Object.values(t.Metadata))if(typeof n=="string"&&/prod/i.test(n))return!0}}return!1},hS=(e,t)=>{let s={},n=e.Resources||{},r=vT(n),i=[...le(n,"AWS::DynamoDB::Table"),...le(n,"AWS::DynamoDB::GlobalTable")];for(let[o,a]of i)if(!((a.Properties||{}).PointInTimeRecoverySpecification?.PointInTimeRecoveryEnabled===!0)){let p=a.Metadata?.["aws:cdk:path"]||o,d=r?"HIGH":"MEDIUM",m=r?" This appears to be a production stack, making data recovery capabilities especially important.":"";s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`DynamoDB table does not have Point-in-Time Recovery (PITR) enabled.${m} Without PITR, accidental data deletions or corruption cannot be recovered.`,"Enable PointInTimeRecoverySpecification.PointInTimeRecoveryEnabled on this table to allow restoration to any point within the last 35 days.",d,"Reliability",p,"cdkInsights"))}return s};var yS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::Events::Rule");for(let[i,o]of r){let u=(o.Properties||{}).Targets;if(!Array.isArray(u))continue;let c=o.Metadata?.["aws:cdk:path"]||i,l=[];for(let p=0;p<u.length;p++)u[p].DeadLetterConfig||l.push(p);l.length>0&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`EventBridge rule has ${l.length} target(s) without a DeadLetterConfig. Failed invocations will be silently dropped after exhausting retries.`,"Configure a DeadLetterConfig with an SQS queue on each target to capture failed invocations for debugging and reprocessing.","MEDIUM","Reliability",c,"cdkInsights")))}return s};var SS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::Lambda::Function"),i=le(n,"AWS::Logs::LogGroup"),o=new Set;for(let[,a]of i){let u=a.Properties?.LogGroupName;typeof u=="string"&&o.add(u)}for(let[a,u]of r){let l=(u.Properties||{}).FunctionName;if(typeof l!="string")continue;let p=`/aws/lambda/${l}`;if(!o.has(p)){let d=u.Metadata?.["aws:cdk:path"]||a;s[a]||(s[a]={issues:[]}),s[a].issues.push(t(a,`Lambda function "${l}" does not have an explicit AWS::Logs::LogGroup resource. CloudWatch will auto-create a log group with no retention policy, leading to indefinite log retention and increased costs.`,"Define an explicit AWS::Logs::LogGroup with a RetentionInDays property for this Lambda function to control log retention and avoid unbounded storage costs.","LOW","Operational Excellence",d,"cdkInsights"))}}return s};var CT=new Set(["Custom::CrossRegionExportWriter","Custom::CrossRegionExportReader"]),bS=(e,t)=>{let s={},n=e.Resources||{},r=[];for(let[o,a]of Object.entries(n))CT.has(a.Type)&&r.push(o);if(r.length===0||!Object.values(n).some(o=>Io(o).length>0))return s;for(let o of r){let a=n[o],u=a.Metadata?.["aws:cdk:path"]||o;s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`Stack contains both a legacy ${a.Type} (from the pre-2.253.0 \`crossRegionReferences\` SSM mechanism) and one or more \`Fn::GetStackOutput\` calls (the new cross-region path). Partial migrations leak SSM parameters and can fail subsequent deploys with \`ParameterAlreadyExists\` (see aws/aws-cdk#37845).`,"Finish the migration in one of two orderings: (1) deploy the new `Fn::GetStackOutput`-based code first, drift-check, then remove the old code paths in a follow-up deploy; or (2) revert to the old mechanism if your CDK toolchain is not consistently on 2.253.0+. Do not leave both forms coexisting across deploys.","HIGH","Reliability",u,"cdkInsights"))}return s};var DS=(e,t)=>{let s={},n=e.Resources||{},r=pS(n);for(let[i,o]of r){let a=o.length;if(a<=10)continue;let c=n[i]?.Metadata?.["aws:cdk:path"]||i,l=a>15?"HIGH":"MEDIUM",p=a>15?`SQS queue is used as a shared DLQ by ${a} EventBridge rules. This many targets will cause CDK to auto-generate excessive per-target SQS policy statements, risking policy size limit breaches.`:`SQS queue is used as a shared DLQ by ${a} EventBridge rules. As more rules are added, CDK will auto-generate per-target SQS policy statements that may exceed the policy size limit.`;s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,p,"Use dedicated DLQs per rule group, or create a single consolidated SQS policy using Queue.fromQueueArn() to prevent CDK from auto-generating per-target policy statements.",l,"Reliability",c,"cdkInsights"))}return s};To();var ir=Z(require("node:fs")),Xr=Z(require("node:path")),xT=["bin","lib","src"],wT=/["']?crossRegionReferences["']?\s*:\s*true/,ET=new Set([".ts",".tsx",".js",".jsx",".mts",".cts"]),RT=new Set(["node_modules","dist","build",".git","cdk.out",".cdk.staging","coverage",".next",".turbo"]),FT=e=>{try{let s=ir.readFileSync(e,"utf-8").split(`
|
|
93
|
-
`);for(let n=0;n<s.length;n++){let r=wT.exec(s[n]);if(r)return{filePath:e,line:n+1,excerpt:r[0]}}}catch{}return null},wS=e=>{let t;try{t=ir.readdirSync(e,{withFileTypes:!0})}catch{return null}for(let s of t){if(s.name.startsWith(".")||RT.has(s.name))continue;let n=Xr.join(e,s.name);if(s.isDirectory()){let r=wS(n);if(r)return r}else if(s.isFile()){let r=Xr.extname(s.name);if(!ET.has(r))continue;let i=FT(n);if(i)return i}}return null},ES=(e,t=xT)=>{for(let s of t){let n=Xr.join(e,s);if(!ir.existsSync(n))continue;let r=wS(n);if(r)return r}return null};var Du="2.253.0",RS=!1;var FS=(e,t)=>{if(RS)return{};let{version:s}=rr();if(!s)return{};if(nr(s,Du)<0)return{};let n=ES(process.cwd());if(!n)return{};RS=!0;let r=n.filePath.startsWith(process.cwd())?n.filePath.slice(process.cwd().length+1):n.filePath;return{Global:{issues:[t("Global",`Stack prop \`crossRegionReferences: true\` is set in \`${r}:${n.line}\` but your aws-cdk-lib is ${s} (>= ${Du}). This flag is a no-op on this version \u2014 CDK now takes the \`Fn::GetStackOutput\` path unconditionally for cross-region references (aws/aws-cdk#37724) and the legacy SSM-custom-resource path it used to enable has been removed.`,`Remove the \`crossRegionReferences: true\` Stack prop. Cross-region references work out of the box on aws-cdk-lib >= ${Du}. If you have legacy \`Custom::CrossRegionExportWriter\` / \`Reader\` resources in deployed stacks, see TL-XRES-007 for the migration ordering.`,"LOW","Operational Excellence","Global","cdkInsights")]}}};var IS=(e,t)=>{let s={},n=e.Resources||{},r=new Set,i,o,a=0;for(let[c,l]of Object.entries(n))(l.__appliedMixins??[]).some(m=>m.isCustom)&&(r.add(l.Type),a++,i||(i=c,o=l.Metadata?.["aws:cdk:path"]||c));if(r.size<3||!i)return s;let u=Array.from(r).sort().join(", ");return s[i]={issues:[]},s[i].issues.push(t(i,`A user-defined CDK Mixin appears on ${a} resources across ${r.size} distinct CFN types in this stack (${u}). This is the template-visible signature of \`.with(customMixin)\` recursing through every descendant via \`target.node.findAll()\` \u2014 likely because the custom mixin's \`supports()\` filter accepts every construct.`,"Verify your custom mixin's `supports()` method narrows correctly to the intended resource type(s). If the broad application is intentional, you can suppress this finding via `Validations.of(scope).acknowledge({ id: 'cdk-insights::TL-MIXIN-002', reason: '...' })`.","LOW","Operational Excellence",o??i,"cdkInsights")),s};var kS=[{fqn:"aws-cdk-lib.aws_s3.mixins.BucketVersioning",cfnResourceType:"AWS::S3::Bucket",displayName:"BucketVersioning"},{fqn:"aws-cdk-lib.aws_s3.mixins.BucketEncryption",cfnResourceType:"AWS::S3::Bucket",displayName:"BucketEncryption"},{fqn:"aws-cdk-lib.aws_s3.mixins.BucketBlockPublicAccess",cfnResourceType:"AWS::S3::Bucket",displayName:"BucketBlockPublicAccess"}];var TS=(e,t)=>{let s={},n=e.Resources||{};for(let r of kS){let i=le(n,r.cfnResourceType);if(i.length<2)continue;let o=[],a=[];for(let[u,c]of i)(c.__appliedMixins??[]).some(d=>d.fqn===r.fqn)?o.push(u):a.push([u,c]);if(!(o.length===0||a.length===0))for(let[u,c]of a){let l=c.Metadata?.["aws:cdk:path"]||u;s[u]||(s[u]={issues:[]}),s[u].issues.push(t(u,`CDK Mixin \`${r.displayName}\` is applied to ${o.length}/${i.length} ${r.cfnResourceType} resources in this stack but missing from this one. This is the signature of \`Mixins.of(scope).apply(...)\` silently skipping resources outside the selector.`,`Either apply \`${r.displayName}\` to this resource explicitly via \`.with()\`, or switch the stack-wide application to \`Mixins.of(scope).requireAll().apply(new ${r.displayName}())\` so synth fails when the mixin can't be applied to a selected construct.`,"LOW","Security",l,"cdkInsights"))}}return s};var IT=new Set(["aws:SourceArn","aws:SourceAccount","aws:PrincipalOrgID","aws:SourceVpce"]),kT=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},TT=e=>{if(!e||typeof e!="object")return!1;let t=e;for(let s of Object.values(t))if(s&&typeof s=="object"){let n=s;for(let r of Object.keys(n))if(IT.has(r))return!0}return!1},PS=(e,t)=>{let s={},n=e.Resources||{},r=[];for(let[i,o]of le(n,"AWS::SQS::QueuePolicy")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.PolicyDocument,a])}for(let[i,o]of le(n,"AWS::SNS::TopicPolicy")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.PolicyDocument,a])}for(let[i,o]of le(n,"AWS::S3::BucketPolicy")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.PolicyDocument,a])}for(let[i,o]of le(n,"AWS::KMS::Key")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.KeyPolicy,a])}for(let[i,o,a]of r){if(!o)continue;let u=Zt(o);for(let c of u){if((c.Effect||"Allow")!=="Allow"||!kT(c.Principal))continue;let p=c.Condition,d=p!=null;d&&TT(p)||(d?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,'Resource policy has a statement with Principal: "*" and a Condition that does not use a strongly restrictive key (aws:SourceArn, aws:SourceAccount, aws:PrincipalOrgID, or aws:SourceVpce). The current condition may not sufficiently limit access.',"Replace or supplement the existing Condition with aws:SourceArn, aws:SourceAccount, aws:PrincipalOrgID, or aws:SourceVpce to ensure only trusted sources can access this resource.","MEDIUM","Security",a,"cdkInsights"))):(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,'Resource policy has a statement with Principal: "*" and no Condition. This allows any AWS account or anonymous user to invoke the allowed actions.',"Add a restrictive Condition using aws:SourceArn, aws:SourceAccount, aws:PrincipalOrgID, or aws:SourceVpce to limit access to trusted sources.","HIGH","Security",a,"cdkInsights"))))}}return s};var PT=[{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/service-role\/AWSLambdaBasicExecutionRole$/,name:"AWSLambdaBasicExecutionRole",actions:["logs:CreateLogGroup","logs:CreateLogStream","logs:PutLogEvents"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/service-role\/AWSLambdaVPCAccessExecutionRole$/,name:"AWSLambdaVPCAccessExecutionRole",actions:["logs:CreateLogGroup","logs:CreateLogStream","logs:PutLogEvents","ec2:CreateNetworkInterface","ec2:DescribeNetworkInterfaces","ec2:DeleteNetworkInterface"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonDynamoDBReadOnlyAccess$/,name:"AmazonDynamoDBReadOnlyAccess",actions:["dynamodb:BatchGetItem","dynamodb:GetItem","dynamodb:Query","dynamodb:Scan","dynamodb:DescribeTable","dynamodb:DescribeReservedCapacity","dynamodb:DescribeReservedCapacityOfferings","dynamodb:ListTables","dynamodb:DescribeStream","dynamodb:ListStreams"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonDynamoDBFullAccess$/,name:"AmazonDynamoDBFullAccess",actions:["dynamodb:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonS3ReadOnlyAccess$/,name:"AmazonS3ReadOnlyAccess",actions:["s3:Get*","s3:List*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonS3FullAccess$/,name:"AmazonS3FullAccess",actions:["s3:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonSQSFullAccess$/,name:"AmazonSQSFullAccess",actions:["sqs:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonSNSFullAccess$/,name:"AmazonSNSFullAccess",actions:["sns:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/CloudWatchFullAccess$/,name:"CloudWatchFullAccess",actions:["cloudwatch:*","logs:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AWSStepFunctionsFullAccess$/,name:"AWSStepFunctionsFullAccess",actions:["states:*"]}],LT=(e,t)=>{if(e===t)return!0;let s=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${s}$`,"i").test(e)},LS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role");for(let[i,o]of r){let u=(o.Properties||{}).ManagedPolicyArns;if(!Array.isArray(u)||u.length===0)continue;let c=[];for(let f of u)if(typeof f=="string"){for(let g of PT)if(g.pattern.test(f))for(let h of g.actions)c.push({action:h,policyName:g.name})}if(c.length===0)continue;let l=_s(o),p=[];for(let f of l){if(!f.document)continue;let g=Zt(f.document);for(let h of g){if((h.Effect||"Allow")!=="Allow")continue;let b=Array.isArray(h.Action)?h.Action:typeof h.Action=="string"?[h.Action]:[];for(let x of b)for(let v of c)if(LT(x,v.action)){p.push({action:x,policyName:v.policyName,inlinePolicy:f.name});break}}}if(p.length===0)continue;let d=o.Metadata?.["aws:cdk:path"]||i,m=[...new Set(p.map(f=>f.policyName))];s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`IAM role has ${p.length} inline action(s) that overlap with permissions already granted by managed policy(ies): ${m.join(", ")}. Redundant inline statements increase policy size without adding permissions.`,"Remove redundant inline policy statements that are already covered by attached managed policies. Review the managed policy permissions before adding inline actions.","LOW","Security",d,"cdkInsights"))}return s};var _T="cloudformation:DescribeStacks",OT=(e,t)=>typeof e=="string"?e===t||e==="*":Array.isArray(e)?e.some(s=>typeof s=="string"&&(s===t||s==="*")):!1,BT=e=>!!(e==="*"||Array.isArray(e)&&e.includes("*")),MT=e=>{let t=e.Properties?.Policies;return Array.isArray(t)?t.map(s=>s&&typeof s=="object"?s.PolicyDocument:void 0).filter(s=>s!==void 0):[]},_S=(e,t)=>{let s={},n=e.Resources||{},r=[];for(let[i,o]of le(n,"AWS::IAM::Policy")){let a=o.Metadata?.["aws:cdk:path"]||i,u=o.Properties?.PolicyDocument;u&&r.push([i,u,a])}for(let[i,o]of le(n,"AWS::IAM::ManagedPolicy")){let a=o.Metadata?.["aws:cdk:path"]||i,u=o.Properties?.PolicyDocument;u&&r.push([i,u,a])}for(let[i,o]of le(n,"AWS::IAM::Role")){let a=o.Metadata?.["aws:cdk:path"]||i;for(let u of MT(o))r.push([i,u,a])}for(let[i,o,a]of r)for(let u of Zt(o))(u.Effect||"Allow")==="Allow"&&OT(u.Action,_T)&&BT(u.Resource)&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,'IAM policy grants `cloudformation:DescribeStacks` with `Resource: "*"`. This is the permission CDK 2.253.0\'s auto-generated cross-account `Fn::GetStackOutput` flow grants \u2014 but CDK scopes it to a specific producer stack ARN. A wildcard here lets the holder enumerate every stack in the account, including ones the consumer never references.','Replace `Resource: "*"` with the specific producer stack ARN, e.g. `arn:aws:cloudformation:<region>:<account>:stack/<producer-stack-name>/*`. If you are not using `Fn::GetStackOutput` and this permission is for something else, scope it to the stacks the role actually needs to describe.',"MEDIUM","Security",a,"cdkInsights")));return s};var NT=e=>{let t=e.Effect||"Allow",s=JSON.stringify(e.Principal||"*"),n=JSON.stringify(e.Condition||null);return`${t}|${s}|${n}`},WT=e=>{let t=e.Action;return Array.isArray(t)?t:typeof t=="string"?[t]:[]},OS=(e,t)=>{let s={},n=e.Resources||{},r=[...le(n,"AWS::SQS::QueuePolicy"),...le(n,"AWS::SNS::TopicPolicy")];for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Zt(u);if(c.length<=2)continue;let l=o.Metadata?.["aws:cdk:path"]||i,p=new Map;for(let h=0;h<c.length;h++){let y=NT(c[h]),b=WT(c[h]),x=p.get(y)||[];x.push({actions:b,index:h}),p.set(y,x)}let d=0;for(let[,h]of p)h.length>1&&(d+=h.length-1);if(d<=0||d<2)continue;let m=c.length,g=d/m>.5?"MEDIUM":"LOW";s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Policy has ${m} statements, of which ${d} could be consolidated. Multiple statements share the same Effect, Principal, and Condition but differ only in Action values.`,"Consolidate statements that share the same Effect, Principal, and Condition into a single statement with an Action array. This reduces policy size and improves readability.",g,"Reliability",l,"cdkInsights"))}return s};var BS={"2.251.0":[{resourceType:"AWS::ElasticLoadBalancing::LoadBalancer",removedAttributes:["SourceSecurityGroup"],removedTypes:["PolicyItem","SourceSecurityGroup"],releaseUrl:"https://github.com/aws/aws-cdk/releases/tag/v2.251.0",notes:"Verified 2026-05-03 against release v2.251.0 (commit 9e6c2ef). Classic ELB v1 only. The removed names are GetAtt return attribute and authoring-time jsii types \u2014 synthesized CFN property shape is unchanged, and no CFN property additions affect covered resource types."}]};To();var UT=(e,t)=>{let s=[];for(let[n,r]of Object.entries(t))if(!(nr(n,e)>0))for(let i of r)s.push({...i,introducedIn:n});return s},jT=(e,t)=>Object.values(t).filter(s=>s.resourceTypes.includes(e)).map(s=>s.ruleId),MS=(e,t,s,n="regression",r=BS,i=sr)=>{let o={};if(!s)return o;let a=UT(s,r);if(a.length===0)return o;let u=new Map;for(let[c,l]of Object.entries(e.Resources??{})){let p=u.get(l.Type)??[];p.push(c),u.set(l.Type,p)}for(let c of a){let l=u.get(c.resourceType);if(!l||l.length===0)continue;let p=jT(c.resourceType,i);if(p.length!==0)if(n==="regression"){let d=c.removedProperties??[],m=c.renamedProperties??[];if(d.length===0&&m.length===0)continue;let f=[...d.map(g=>`removed property "${g}"`),...m.map(g=>`renamed "${g.from}" \u2192 "${g.to}"`)].join(", ");for(let g of l)o[g]||(o[g]={issues:[]}),o[g].issues.push(t(g,`aws-cdk-lib v${c.introducedIn} regenerated the L1 schema for ${c.resourceType} (${f}). Existing cdk-insights rule(s) [${p.join(", ")}] may have silently lost coverage.`,`Verify rule coverage against the current schema. Release notes: ${c.releaseUrl}`,"LOW","Operational Excellence",g,"cdkInsights"))}else{let d=c.addedProperties??[];if(d.length===0)continue;let m=d.map(f=>`"${f}"`).join(", ");for(let f of l)o[f]||(o[f]={issues:[]}),o[f].issues.push(t(f,`aws-cdk-lib v${c.introducedIn} added new propert${d.length===1?"y":"ies"} ${m} to ${c.resourceType}. Existing cdk-insights rule(s) [${p.join(", ")}] don't evaluate ${d.length===1?"it":"them"} \u2014 consider whether a rule should.`,`Review the new propert${d.length===1?"y":"ies"} for security, cost, or compliance implications. Release notes: ${c.releaseUrl}`,"LOW","Operational Excellence",f,"cdkInsights"))}}return o},NS=(e,t)=>{let{version:s}=rr();return MS(e,t,s,"regression")},WS=(e,t)=>{let{version:s}=rr();return MS(e,t,s,"coverage-gap")};var j={SQS_POLICY_MAX_BYTES:8192,SQS_POLICY_MAX_STATEMENTS:20,IAM_INLINE_POLICY_MAX_BYTES:2048,IAM_MANAGED_POLICY_MAX_BYTES:6144,IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES:10240,LAMBDA_ENV_MAX_BYTES:4096,LAMBDA_MAX_LAYERS:5,S3_BUCKET_POLICY_MAX_BYTES:20480,SNS_TOPIC_POLICY_MAX_BYTES:30720,EVENTBRIDGE_RULES_PER_BUS_DEFAULT:300,CFN_MAX_RESOURCES:500,CFN_TEMPLATE_MAX_BYTES_DIRECT:51200,CFN_TEMPLATE_MAX_BYTES_S3:460800,SECURITY_GROUP_MAX_INBOUND_RULES:60,SECURITY_GROUP_MAX_OUTBOUND_RULES:60},Me=.8;var US=(e,t)=>{let s={},n=Object.keys(e.Resources||{}).length,r="__TEMPLATE_LEVEL__";return n>=j.CFN_MAX_RESOURCES?(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template contains ${n} resources, reaching or exceeding the ${j.CFN_MAX_RESOURCES}-resource limit. Deployment will fail.`,"Split the stack into multiple nested stacks or separate stacks to stay within the CloudFormation resource limit.","CRITICAL","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))):be(n,j.CFN_MAX_RESOURCES)>=Me&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template contains ${n} resources (${Math.round(be(n,j.CFN_MAX_RESOURCES)*100)}% of the ${j.CFN_MAX_RESOURCES}-resource limit).`,"Consider splitting the stack into multiple nested stacks or separate stacks before this limit is reached.","HIGH","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))),s};var jS=(e,t)=>{let s={},n=JSON.stringify(e).length,r="__TEMPLATE_LEVEL__";return n>=j.CFN_TEMPLATE_MAX_BYTES_S3?(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)}, exceeding the ${de(j.CFN_TEMPLATE_MAX_BYTES_S3)} S3 upload limit. Deployment will fail regardless of deployment method.`,"Split the stack into multiple nested stacks or separate stacks to reduce template size.","CRITICAL","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))):be(n,j.CFN_TEMPLATE_MAX_BYTES_S3)>=Me&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)} (${Math.round(be(n,j.CFN_TEMPLATE_MAX_BYTES_S3)*100)}% of the ${de(j.CFN_TEMPLATE_MAX_BYTES_S3)} S3 upload limit).`,"Consider splitting the stack into multiple nested stacks or separate stacks before this limit is reached.","MEDIUM","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))),n>=j.CFN_TEMPLATE_MAX_BYTES_DIRECT?(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)}, exceeding the ${de(j.CFN_TEMPLATE_MAX_BYTES_DIRECT)} direct upload limit.`,"CDK uploads templates via S3 by default so this is informational. If deploying outside CDK with `aws cloudformation create-stack --template-body=...`, switch to `--template-url` or use S3.","LOW","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))):be(n,j.CFN_TEMPLATE_MAX_BYTES_DIRECT)>=Me&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)} (${Math.round(be(n,j.CFN_TEMPLATE_MAX_BYTES_DIRECT)*100)}% of the ${de(j.CFN_TEMPLATE_MAX_BYTES_DIRECT)} direct upload limit).`,"CDK uploads templates via S3 by default so this is informational. The S3-upload limit (450KB) is the one that actually applies to CDK deployments.","LOW","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))),s};var $S=(e,t)=>{let s={},n=e.Resources||{},r=dS(n);for(let[i,o]of r){let a=o.length,u=o[0],l=n[u]?.Metadata?.["aws:cdk:path"]||u;a>=j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT?(s[u]||(s[u]={issues:[]}),s[u].issues.push(t(u,`EventBridge bus "${i}" has ${a} rules, reaching or exceeding the ${j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT}-rule default limit. Deployment may fail.`,"Request a service quota increase for EventBridge rules per bus, or split rules across multiple event buses.","HIGH","Reliability",l,"cdkInsights"))):be(a,j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT)>=Me&&(s[u]||(s[u]={issues:[]}),s[u].issues.push(t(u,`EventBridge bus "${i}" has ${a} rules (${Math.round(be(a,j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT)*100)}% of the ${j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT}-rule default limit).`,"Consider requesting a service quota increase or splitting rules across multiple event buses before this limit is reached.","MEDIUM","Reliability",l,"cdkInsights")))}return s};var GS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role"),i=le(n,"AWS::IAM::User");for(let[o,a]of[...r,...i]){let u=a.Metadata?.["aws:cdk:path"]||o,c=_s(a);for(let l of c){if(!l.document)continue;let p=Dt(l.document);p>=j.IAM_INLINE_POLICY_MAX_BYTES?(s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`Inline policy "${l.name}" is ${de(p)}, exceeding the ${de(j.IAM_INLINE_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Convert this inline policy to a managed policy, or reduce the number of statements and actions. Use wildcard patterns where appropriate to consolidate permissions.","CRITICAL","Reliability",u,"cdkInsights"))):be(p,j.IAM_INLINE_POLICY_MAX_BYTES)>=Me&&(s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`Inline policy "${l.name}" is ${de(p)} (${Math.round(be(p,j.IAM_INLINE_POLICY_MAX_BYTES)*100)}% of the ${de(j.IAM_INLINE_POLICY_MAX_BYTES)} limit). Adding more permissions may cause deployment failure.`,"Consider converting this inline policy to a managed policy before the limit is reached.","HIGH","Reliability",u,"cdkInsights")))}}return s};var HS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::ManagedPolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.IAM_MANAGED_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Managed policy is ${de(c)}, exceeding the ${de(j.IAM_MANAGED_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Split this managed policy into multiple smaller policies, or consolidate statements using wildcard patterns to reduce size.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.IAM_MANAGED_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Managed policy is ${de(c)} (${Math.round(be(c,j.IAM_MANAGED_POLICY_MAX_BYTES)*100)}% of the ${de(j.IAM_MANAGED_POLICY_MAX_BYTES)} limit). Adding more permissions may cause deployment failure.`,"Consider splitting this managed policy into multiple policies before the limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var zS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role");for(let[i,o]of r){let a=o.Metadata?.["aws:cdk:path"]||i,u=_s(o),c=0;for(let l of u)l.document&&(c+=Dt(l.document));c!==0&&(c>=j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Aggregate inline policy size is ${de(c)} across ${u.length} policies, exceeding the ${de(j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)} limit. Deployment will fail.`,"Convert some inline policies to managed policies to reduce the aggregate inline size. Consider consolidating overlapping permissions across policies.","CRITICAL","Reliability",a,"cdkInsights"))):be(c,j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Aggregate inline policy size is ${de(c)} across ${u.length} policies (${Math.round(be(c,j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)*100)}% of the ${de(j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)} limit). Adding more inline policies may cause deployment failure.`,"Consider converting some inline policies to managed policies before the aggregate limit is reached.","HIGH","Reliability",a,"cdkInsights"))))}return s};var qS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::Lambda::Function");for(let[i,o]of r){let u=(o.Properties||{}).Environment;if(!u?.Variables)continue;let c=Dt(u.Variables),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.LAMBDA_ENV_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda environment variables are ${de(c)}, exceeding the ${de(j.LAMBDA_ENV_MAX_BYTES)} limit. Deployment will fail.`,"Move large configuration values to SSM Parameter Store or Secrets Manager. Use a single JSON-encoded parameter instead of many individual environment variables.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.LAMBDA_ENV_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda environment variables are ${de(c)} (${Math.round(be(c,j.LAMBDA_ENV_MAX_BYTES)*100)}% of the ${de(j.LAMBDA_ENV_MAX_BYTES)} limit). Adding more variables may cause deployment failure.`,"Consider moving some configuration values to SSM Parameter Store or Secrets Manager before the limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var KS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::Lambda::Function");for(let[i,o]of r){let u=(o.Properties||{}).Layers;if(!Array.isArray(u))continue;let c=u.length,l=o.Metadata?.["aws:cdk:path"]||i;c>j.LAMBDA_MAX_LAYERS?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda function has ${c} layers, exceeding the maximum of ${j.LAMBDA_MAX_LAYERS} layers. Deployment will fail.`,"Consolidate layers by combining related dependencies into a single layer, or move some dependencies into the deployment package itself.","CRITICAL","Reliability",l,"cdkInsights"))):c===j.LAMBDA_MAX_LAYERS&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda function has ${c} of ${j.LAMBDA_MAX_LAYERS} maximum layers. There is no headroom to add additional layers.`,"Consider consolidating layers by combining related dependencies into a single layer to free up a layer slot for future needs.","HIGH","Reliability",l,"cdkInsights")))}return s};var VS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::S3::BucketPolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.S3_BUCKET_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`S3 bucket policy is ${de(c)}, exceeding the ${de(j.S3_BUCKET_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Consolidate policy statements or split resources across multiple buckets to reduce policy size.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.S3_BUCKET_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`S3 bucket policy is ${de(c)} (${Math.round(be(c,j.S3_BUCKET_POLICY_MAX_BYTES)*100)}% of the ${de(j.S3_BUCKET_POLICY_MAX_BYTES)} limit). Adding more statements may cause deployment failure.`,"Consider consolidating policy statements or splitting resources across multiple buckets before this limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var ZS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::EC2::SecurityGroup");for(let[i,o]of r){let{inbound:a,outbound:u}=mS(i,o,n),c=o.Metadata?.["aws:cdk:path"]||i;a>=j.SECURITY_GROUP_MAX_INBOUND_RULES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${a} inbound rules, reaching or exceeding the ${j.SECURITY_GROUP_MAX_INBOUND_RULES}-rule limit. Deployment will fail.`,"Consolidate rules using CIDR ranges or prefix lists, or split workloads across multiple security groups.","CRITICAL","Reliability",c,"cdkInsights"))):be(a,j.SECURITY_GROUP_MAX_INBOUND_RULES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${a} inbound rules (${Math.round(be(a,j.SECURITY_GROUP_MAX_INBOUND_RULES)*100)}% of the ${j.SECURITY_GROUP_MAX_INBOUND_RULES}-rule limit).`,"Consider consolidating rules using CIDR ranges or prefix lists before this limit is reached.","HIGH","Reliability",c,"cdkInsights"))),u>=j.SECURITY_GROUP_MAX_OUTBOUND_RULES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${u} outbound rules, reaching or exceeding the ${j.SECURITY_GROUP_MAX_OUTBOUND_RULES}-rule limit. Deployment will fail.`,"Consolidate rules using CIDR ranges or prefix lists, or split workloads across multiple security groups.","CRITICAL","Reliability",c,"cdkInsights"))):be(u,j.SECURITY_GROUP_MAX_OUTBOUND_RULES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${u} outbound rules (${Math.round(be(u,j.SECURITY_GROUP_MAX_OUTBOUND_RULES)*100)}% of the ${j.SECURITY_GROUP_MAX_OUTBOUND_RULES}-rule limit).`,"Consider consolidating rules using CIDR ranges or prefix lists before this limit is reached.","HIGH","Reliability",c,"cdkInsights")))}return s};var YS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::SNS::TopicPolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.SNS_TOPIC_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SNS topic policy is ${de(c)}, exceeding the ${de(j.SNS_TOPIC_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Consolidate policy statements or split subscriptions across multiple topics to reduce policy size.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.SNS_TOPIC_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SNS topic policy is ${de(c)} (${Math.round(be(c,j.SNS_TOPIC_POLICY_MAX_BYTES)*100)}% of the ${de(j.SNS_TOPIC_POLICY_MAX_BYTES)} limit). Adding more statements may cause deployment failure.`,"Consider consolidating policy statements or splitting subscriptions across multiple topics before this limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var JS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::SQS::QueuePolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=lS(u),p=o.Metadata?.["aws:cdk:path"]||i;c>=j.SQS_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy is ${de(c)}, exceeding the ${de(j.SQS_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Consolidate policy statements into a single statement with broader conditions, or split targets across multiple queues. If using a shared DLQ with EventBridge targets, use Queue.fromQueueArn() to prevent CDK from auto-generating per-target statements.","CRITICAL","Reliability",p,"cdkInsights"))):be(c,j.SQS_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy is ${de(c)} (${Math.round(be(c,j.SQS_POLICY_MAX_BYTES)*100)}% of the ${de(j.SQS_POLICY_MAX_BYTES)} limit). Adding more targets may cause deployment failure.`,"Consider consolidating policy statements or splitting targets across multiple queues before this limit is reached.","HIGH","Reliability",p,"cdkInsights"))),l>=j.SQS_POLICY_MAX_STATEMENTS?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy has ${l} statements, reaching or exceeding the ${j.SQS_POLICY_MAX_STATEMENTS}-statement limit.`,"Consolidate statements using wildcard conditions or array-valued Action/Resource fields instead of one statement per target.","CRITICAL","Reliability",p,"cdkInsights"))):be(l,j.SQS_POLICY_MAX_STATEMENTS)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy has ${l} of ${j.SQS_POLICY_MAX_STATEMENTS} maximum statements (${Math.round(be(l,j.SQS_POLICY_MAX_STATEMENTS)*100)}%).`,"Consider consolidating policy statements before this limit is reached.","HIGH","Reliability",p,"cdkInsights")))}return s};var $T=[{ruleId:"TL-LIMIT-001",title:"SQS Queue Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:JS,description:"SQS queue policies must be under 8KB / 20 statements. Commonly exceeded when CDK auto-generates per-target policy statements for shared DLQs."},{ruleId:"TL-LIMIT-002",title:"IAM Inline Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:GS,description:"Each IAM inline policy must be under 2,048 bytes when URL-encoded."},{ruleId:"TL-LIMIT-003",title:"IAM Managed Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:HS,description:"IAM managed policies must be under 6,144 bytes."},{ruleId:"TL-LIMIT-004",title:"IAM Role Aggregate Inline Policy Size",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:zS,description:"Total size of all inline policies on a single IAM role must be under 10,240 bytes."},{ruleId:"TL-LIMIT-005",title:"Lambda Environment Variables Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:qS,description:"Lambda environment variables must total under 4KB including keys and values."},{ruleId:"TL-LIMIT-006",title:"Lambda Layers Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:KS,description:"Lambda functions can have a maximum of 5 layers."},{ruleId:"TL-LIMIT-007",title:"S3 Bucket Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:VS,description:"S3 bucket policies must be under 20KB."},{ruleId:"TL-LIMIT-008",title:"SNS Topic Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:YS,description:"SNS topic policies must be under 30KB."},{ruleId:"TL-LIMIT-009",title:"EventBridge Rules Per Bus Limit",category:"serviceLimits",defaultSeverity:"HIGH",wafPillar:"Reliability",check:$S,description:"Default quota is 300 EventBridge rules per event bus."},{ruleId:"TL-LIMIT-010",title:"CloudFormation Stack Resource Count",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:US,description:"CloudFormation stacks have a hard limit of 500 resources."},{ruleId:"TL-LIMIT-011",title:"CloudFormation Template Size",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:jS,description:"CloudFormation templates have a 51KB limit (direct) or 460KB limit (S3)."},{ruleId:"TL-LIMIT-012",title:"Security Group Rules Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:ZS,description:"Security groups have a default limit of 60 inbound and 60 outbound rules."},{ruleId:"TL-XRES-001",title:"Shared DLQ with Too Many EventBridge Targets",category:"crossResourceAntiPatterns",defaultSeverity:"HIGH",wafPillar:"Reliability",check:DS,description:"CDK generates one SQS policy statement per EventBridge target. Too many targets sharing a DLQ causes the policy to exceed the 8KB limit."},{ruleId:"TL-XRES-002",title:"EventBridge Targets Without DLQ",category:"crossResourceAntiPatterns",defaultSeverity:"MEDIUM",wafPillar:"Reliability",check:yS,description:"EventBridge rule targets should have a Dead Letter Queue for failed event delivery."},{ruleId:"TL-XRES-003",title:"Lambda Without Explicit Log Group",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:SS,description:"Lambda functions without explicit CloudWatch Log Groups use auto-created groups with infinite retention."},{ruleId:"TL-XRES-004",title:"DynamoDB Without Point-in-Time Recovery",category:"crossResourceAntiPatterns",defaultSeverity:"MEDIUM",wafPillar:"Reliability",check:hS,description:"DynamoDB tables should have PITR enabled, especially in production stacks."},{ruleId:"TL-XRES-005",title:"Duplicate IAM Policy Statements",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Security",check:gS,description:"Duplicate policy statements across a role waste policy size budget and may indicate copy-paste errors."},{ruleId:"TL-XRES-006",title:"Dangling Fn::GetStackOutput Reference",category:"crossResourceAntiPatterns",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:uS,description:"Fn::GetStackOutput (CDK >= 2.253.0) references a stack or output that does not exist in any sibling stack in the same CDK app. Deploy will fail at resolution time with Outputs.NoSuchOutput."},{ruleId:"TL-XRES-007",title:"Mixed Cross-Region Reference Migration State",category:"crossResourceAntiPatterns",defaultSeverity:"HIGH",wafPillar:"Reliability",check:bS,description:"Stack contains both the legacy SSM-custom-resource cross-region reference path (Custom::CrossRegionExportWriter / Reader) and the new Fn::GetStackOutput intrinsic. Partial migrations leak SSM parameters and can fail subsequent deploys with ParameterAlreadyExists (aws/aws-cdk#37845)."},{ruleId:"TL-XRES-008",title:"Stale crossRegionReferences Stack Prop",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:FS,description:"Stack prop `crossRegionReferences: true` is set in user source but aws-cdk-lib is >= 2.253.0, where the flag is a no-op \u2014 CDK takes the Fn::GetStackOutput path unconditionally. Advisory; remove the prop to reduce surprise on future readers."},{ruleId:"TL-POL-001",title:"Redundant SQS/SNS Policy Statements",category:"policyAnalysis",defaultSeverity:"MEDIUM",wafPillar:"Reliability",check:OS,description:"Policy statements that could be consolidated to reduce policy size."},{ruleId:"TL-POL-002",title:"IAM Overlapping Managed and Inline Policies",category:"policyAnalysis",defaultSeverity:"LOW",wafPillar:"Security",check:LS,description:"Inline policy statements that duplicate permissions from attached managed policies."},{ruleId:"TL-POL-003",title:"Overly Broad Resource Policy Principals",category:"policyAnalysis",defaultSeverity:"HIGH",wafPillar:"Security",check:PS,description:"Resource policies with wildcard (*) principals without restrictive conditions."},{ruleId:"TL-POL-004",title:"Over-Scoped cloudformation:DescribeStacks Permission",category:"policyAnalysis",defaultSeverity:"MEDIUM",wafPillar:"Security",check:_S,description:`IAM policy grants cloudformation:DescribeStacks with Resource: "*". CDK 2.253.0's auto-generated cross-account Fn::GetStackOutput flow scopes this permission to the specific producer stack ARN \u2014 a wildcard here is escape-hatch over-privilege and grants enumeration of every stack in the account.`},{ruleId:"TL-DRIFT-001",title:"CDK L1 Schema Drift",category:"schemaDrift",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:NS,description:"Detects when the user's aws-cdk-lib version regenerated an L1 CloudFormation resource schema in a way that may silently invalidate cdk-insights rule coverage."},{ruleId:"TL-DRIFT-002",title:"CDK L1 Schema Coverage Gap",category:"schemaDrift",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:WS,description:"Surfaces newly-added L1 CloudFormation properties on resource types already covered by cdk-insights rules. Hint that a new rule may be worth opening; not a regression."},{ruleId:"TL-MIXIN-001",title:"Compliance-Critical Mixin Applied Without Stack Coverage",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Security",check:TS,description:"A compliance-critical CDK Mixin (e.g., BucketEncryption, BucketVersioning) is applied to some but not all resources of its target type in the stack \u2014 the template-visible signature of `Mixins.of(scope).apply(...)` silently skipping resources. Recommends `requireAll()` enforcement."},{ruleId:"TL-MIXIN-002",title:"Custom Mixin Applied Across Many Resource Types",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:IS,description:"A user-defined CDK Mixin appears on resources spanning 3+ distinct CFN types in the same stack \u2014 the template-visible signature of `.with(customMixin)` recursing through descendants because the mixin's `supports()` filter accepts every construct. Verify the supports() narrows to the intended resource type."}],vu=(e,t,s,n)=>{let r={};for(let i of $T)if(!(s&&s.length>0&&!s.some(a=>i.ruleId.toLowerCase().includes(a.toLowerCase())||i.category.toLowerCase().includes(a.toLowerCase())||i.title.toLowerCase().includes(a.toLowerCase()))))try{let o=i.check(e,t,n);for(let[a,u]of Object.entries(o)){r[a]||(r[a]={issues:[]});for(let c of u.issues)c.ruleId=i.ruleId;r[a].issues.push(...u.issues)}}catch{}return r};var ei={DEFAULT_MAX_CONCURRENT:5,DEFAULT_RETRY_ATTEMPTS:3,DEFAULT_RETRY_DELAY_MS:1e3,DEFAULT_TIMEOUT_MS:60*1e3};var Wo=Z(require("node:crypto")),Ve=Z(require("node:fs")),cr=Z(require("node:path"));var GT=["CI","BUILD_ID","BUILD_NUMBER","CIRCLECI","TRAVIS","GITHUB_ACTIONS","GITLAB_CI","JENKINS_URL","BITBUCKET_BUILD_NUMBER","TEAMCITY_VERSION","BAMBOO_BUILDKEY","GO_PIPELINE_NAME","BUILDKITE","DRONE","SEMAPHORE","APPVEYOR","WERCKER","CODEBUILD_BUILD_ID","AWS_CODEBUILD_BUILD_ID","TF_BUILD","CIRRUS_CI","NETLIFY","VERCEL","RENDER","HEROKU_TEST_RUN_ID"],HT=()=>GT.some(e=>!!process.env[e]),ti=()=>{if(!HT())return!1;let e=process.env.CDK_INSIGHTS_ENABLE_CACHE_IN_CI;return!(e&&e!=="false"&&e!=="0")};var yn="3";var Et=Z(require("node:fs")),XS=Z(require("node:os")),_o=Z(require("node:path"));var zT={features:{staticAnalysis:{free:!0,pro:!0,trial:!0,team:!0},multiStackAnalysis:{free:!0,pro:!0,trial:!0,team:!0},localAnalysis:{free:!0,pro:!0,trial:!0,team:!0},basicServiceChecks:{free:!0,pro:!0,trial:!0,team:!0},aiAnalysis:{free:!0,pro:!0,trial:!0,team:!0},contextualFixes:{free:!1,pro:!0,trial:!0,team:!0},smartPrioritization:{free:!1,pro:!0,trial:!0,team:!0},naturalLanguageExplanations:{free:!1,pro:!0,trial:!0,team:!0},customAITraining:{free:!1,pro:!1,trial:!1,team:!0},githubIntegration:{free:!1,pro:!0,trial:!0,team:!0},teamDashboards:{free:!1,pro:!0,trial:!0,team:!0},collaborativeCommenting:{free:!1,pro:!1,trial:!1,team:!0},sharedConfigurations:{free:!1,pro:!0,trial:!0,team:!0},jsonOutput:{free:!0,pro:!0,trial:!0,team:!0},tableOutput:{free:!0,pro:!0,trial:!0,team:!0},markdownOutput:{free:!0,pro:!0,trial:!0,team:!0},pdfReports:{free:!1,pro:!0,trial:!0,team:!0},executiveSummaries:{free:!1,pro:!1,trial:!1,team:!0},customBrandedReports:{free:!1,pro:!1,trial:!1,team:!0},customRuleSets:{free:!1,pro:!0,trial:!0,team:!0},advancedCompliance:{free:!1,pro:!0,trial:!0,team:!0},cloudAnalysis:{free:!1,pro:!0,trial:!0,team:!0},parallelAnalysis:{free:!1,pro:!0,trial:!0,team:!0},caching:{free:!1,pro:!0,trial:!0,team:!0},largeProjectSupport:{free:!1,pro:!0,trial:!0,team:!0},advancedFiltering:{free:!1,pro:!1,trial:!1,team:!0},apiAccess:{free:!1,pro:!1,trial:!1,team:!0},webhookNotifications:{free:!1,pro:!1,trial:!1,team:!0},cicdIntegration:{free:!1,pro:!1,trial:!1,team:!0},customIntegrations:{free:!1,pro:!1,trial:!1,team:!0},roleBasedAccess:{free:!1,pro:!1,trial:!1,team:!0},teamAnalytics:{free:!1,pro:!1,trial:!1,team:!0},auditTrails:{free:!1,pro:!1,trial:!1,team:!0},ssoIntegration:{free:!1,pro:!1,trial:!1,team:!0},multiTenantSupport:{free:!1,pro:!1,trial:!1,team:!0},whiteLabeling:{free:!1,pro:!1,trial:!1,team:!0},customBranding:{free:!1,pro:!1,trial:!1,team:!0},communitySupport:{free:!0,pro:!0,trial:!0,team:!0},emailSupport:{free:!1,pro:!0,trial:!0,team:!0},prioritySupport:{free:!1,pro:!1,trial:!1,team:!0},dedicatedAccountManager:{free:!1,pro:!1,trial:!1,team:!0},customTraining:{free:!1,pro:!1,trial:!1,team:!0},soc2Compliance:{free:!1,pro:!0,trial:!0,team:!0},hipaaCompliance:{free:!1,pro:!0,trial:!0,team:!0},fedrampCompliance:{free:!1,pro:!1,trial:!1,team:!0},customCompliance:{free:!1,pro:!1,trial:!1,team:!0}}},qT=(e=zT)=>({isFeatureEnabled:(o,a)=>e.features[o]?.[a]??!1,getEnabledFeatures:o=>Object.entries(e.features).filter(([,a])=>a[o]).map(([a])=>a),getAllFeatures:()=>Object.keys(e.features),getFeatureTiers:o=>e.features[o],getUpgradePath:(o,a)=>{let u=["free","pro","trial","team"],c=u.indexOf(a);for(let l=c+1;l<u.length;l++){let p=u[l];if(e.features[o]?.[p])return{required:!0,tier:p,path:`https://cdkinsights.dev/pricing?tier=${p}&feature=${o}`}}return null}}),si=qT();var QS=(e,t,s)=>{let n=si.getUpgradePath(e,t),r=s?` for ${s}`:"";return n?`\u{1F4A1} Upgrade to ${n.tier} to access ${e}${r}. Visit: ${n.path}`:`\u26A0\uFE0F ${e}${r} is not available for your current tier.`};var Po=_o.join(XS.homedir(),".cdk-insights","cache"),Tq=_o.join(Po,"analysis-cache.json"),Cu=_o.join(Po,"cache-stats.json"),Sn={totalHits:0,totalMisses:0,totalSets:0,totalClears:0,cacheSize:0,maxCacheSize:1e3},or=null,Lo=!1,KT=()=>{try{if(Et.existsSync(Cu)){let e=Et.readFileSync(Cu,"utf-8");try{Sn={...Sn,...JSON.parse(e)}}catch(t){Ls.warn("Could not parse cache statistics file",{error:t instanceof Error?t.message:String(t)})}}}catch(e){Ls.warn("Could not load cache statistics",{error:e instanceof Error?e.message:String(e)})}},Au=()=>{Lo=!0,!or&&(or=setTimeout(()=>{Lo&&eb(),or=null},5e3))},eb=()=>{try{VT(),Et.writeFileSync(Cu,JSON.stringify(Sn,null,2),"utf-8"),Lo=!1}catch(e){Ls.warn("Could not save cache statistics",{error:e instanceof Error?e.message:String(e)})}},xu=()=>{or&&(clearTimeout(or),or=null),Lo&&eb()};process.on("exit",xu);process.on("SIGINT",()=>{xu(),process.exit(0)});process.on("SIGTERM",()=>{xu(),process.exit(0)});KT();var VT=()=>{Et.existsSync(Po)||Et.mkdirSync(Po,{recursive:!0})};var tb=()=>{Sn.totalHits++,Au()},Oo=()=>{Sn.totalMisses++,Au()},sb=()=>{Sn.totalSets++,Sn.cacheSize++,Au()};var ar=cr.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights","cache","analysis-cache.json"),ZT=()=>{let e=cr.dirname(ar);Ve.existsSync(e)||Ve.mkdirSync(e,{recursive:!0})},YT=()=>{if(ti())return new Map;try{if(Ve.existsSync(ar)){let e=JSON.parse(Ve.readFileSync(ar,"utf-8")),t=new Map,s=Date.now();for(let[n,r]of e.entries||[])s-r.timestamp>r.ttl||r.schemaVersion===yn&&t.set(n,r);return t}}catch(e){Ls.warn("Could not load cache from disk",{error:e instanceof Error?e.message:String(e)})}return new Map},nb=e=>{if(!ti())try{ZT();let t={entries:Array.from(e.entries()),timestamp:Date.now(),version:"1.0"};Ve.writeFileSync(ar,JSON.stringify(t,null,2),"utf-8")}catch(t){Ls.warn("Could not save cache to disk",{error:t instanceof Error?t.message:String(t)})}},Bo=new Map,ib=()=>cr.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights","cache","file-hashes.json"),rb=5e3,Os=null,Mo=!1,JT=()=>{if(Os!==null)return Os;let e=ib();try{if(Ve.existsSync(e)){let t=Ve.readFileSync(e,"utf-8"),s=JSON.parse(t);if(s&&s.version===1&&s.entries)return Os=s,Os}}catch{}return Os={version:1,entries:{}},Os},QT=()=>{if(!Mo||Os===null)return;let e=ib();try{let t=Os,s=Object.keys(t.entries);if(s.length>rb){let r=s.map(o=>[o,t.entries[o].lastAccessedAt]).sort((o,a)=>o[1]-a[1]),i=s.length-rb;for(let o=0;o<i;o++)delete t.entries[r[o][0]]}let n=cr.dirname(e);Ve.existsSync(n)||Ve.mkdirSync(n,{recursive:!0}),Ve.writeFileSync(e,JSON.stringify(t),"utf-8"),Mo=!1}catch{}};process.on("exit",QT);var XT=e=>{let t=Bo.get(e);if(t!==void 0)return t;try{let s=Ve.statSync(e),n=s.mtime.getTime(),r=s.size,i=JT(),o=i.entries[e];if(o&&o.mtime===n&&o.size===r){o.lastAccessedAt=Date.now(),Mo=!0;let l={filePath:e,lastModified:n,hash:o.hash};return Bo.set(e,l),l}let a=Ve.readFileSync(e,"utf-8"),u=Wo.createHash("sha256").update(a).digest("hex"),c={filePath:e,lastModified:n,hash:u};return Bo.set(e,c),i.entries[e]={size:r,mtime:n,hash:u,lastAccessedAt:Date.now()},Mo=!0,c}catch{return Bo.set(e,null),null}};var eP=e=>{let t={};for(let s of e){let n=XT(s);n&&(t[s]=n)}return t},tP=(e,t)=>e?Wo.createHash("sha256").update(`${e}:${t||""}`).digest("hex").slice(0,16):"no-auth",sP=e=>Wo.createHash("sha256").update(JSON.stringify(e)).digest("hex"),wu=(e,t,s,n,r=[])=>{let i=tP(s,n),o=sP(t),a=eP(r);return{resourceId:e,authContext:i,resourceHash:o,fileHashes:a,schemaVersion:yn}},Eu=e=>{let t=Object.entries(e.fileHashes).sort(([s],[n])=>s.localeCompare(n)).map(([s,n])=>`${s}:${n.hash}`).join("|");return`v${e.schemaVersion}:${e.resourceId}:${e.authContext}:${e.resourceHash}:${t}`};var No=class{cache;ttl;maxSize;disabled=!1;constructor(t={}){this.ttl=t.ttl||6*60*60*1e3,this.maxSize=t.maxSize||1e3,this.disabled=t.disabled||!1,this.disabled?this.cache=new Map:this.cache=YT()}setDisabled(t){this.disabled=t,t&&this.cache.clear()}get(t){if(this.disabled){Oo();return}let s=this.cache.get(t);if(!s){Oo();return}if(Date.now()-s.timestamp>s.ttl){this.cache.delete(t),Oo();return}return tb(),s.value}set(t,s,n,r){this.disabled||(this.cache.size>=this.maxSize&&this.evictOldest(),this.cache.set(t,{value:s,timestamp:Date.now(),ttl:r??this.ttl,fileHashes:n.fileHashes,authContext:n.authContext,resourceHash:n.resourceHash,schemaVersion:n.schemaVersion}),sb(),this.cache.size%10===0&&nb(this.cache))}has(t){return this.cache.has(t)}clear(){if(this.cache.clear(),!ti())try{Ve.existsSync(ar)&&Ve.unlinkSync(ar)}catch(t){Ls.warn("Could not clear disk cache",{error:t instanceof Error?t.message:String(t)})}}saveToDisk(){nb(this.cache)}size(){return this.cache.size}evictOldest(){let t,s=Date.now();for(let[n,r]of Array.from(this.cache.entries()))r.timestamp<s&&(s=r.timestamp,t=n);t&&this.cache.delete(t)}getStats(){return{size:this.cache.size,maxSize:this.maxSize,hitRate:0,totalHits:0,totalMisses:0}}getAllCachedResults(){return new Map(this.cache)}getCachedResultsForResources(t){let s=new Map;for(let[n,r]of Array.from(this.cache.entries())){let i=n.split(":")[0];t.includes(i)&&Date.now()-r.timestamp<=r.ttl&&s.set(i,r.value)}return s}hasCachedResult(t){for(let s of Array.from(this.cache.keys()))if(s.split(":")[0]===t)return!0;return!1}};var nP=new Set(["the","a","an","is","are","was","were","be","been","has","have","had","do","does","did","will","would","could","should","may","might","must","shall","can","this","that","these","those","it","its","to","for","of","in","on","at","by","with","from","or","and","not","no","but","if","then","else","when","where","resource","configuration","setting","configured","property","properties","which","lead","leads","leading","means","using","use","used","ensure","consider","also","such","most","more","any","all","some","other","each","every","necessary","unnecessary","recommended","default","specific","current","potential","possible","workloads","workload"]),rP=[["lacks","missing","without","absent","none","defined"],["encryption","encrypted","encrypt"],["configured","configuration","config","settings","setting"],["enabled","enable","active","activated"],["disabled","disable","inactive"],["public","publicly","open"],["access","accessible","accessibility"],["transit","transfer","transmission"],["rest","stored","storage"],["logging","logs","logged","log"],["dlq","dead","letter","queue"],["monitor","monitoring","observability"],["alarm","alarms","alert","alerts"],["unrestricted","permissive","overly"],["egress","outbound"],["ingress","inbound"],["recovery","backup","restore"],["pitr","point"],["function","functions"],["cluster","clusters"],["instance","instances"],["bucket","buckets"],["table","tables"],["domain","domains"],["node","nodes"],["policy","policies"],["rule","rules"],["subnet","subnets"],["high","higher","excessive","elevated"],["allocation","allocated","allocate"],["provisioned","provision"],["scaling","autoscaling","auto"],["restrict","restricted","restriction"],["expose","exposed","exposing","exposure"],["allow","allows","allowing"],["prevent","prevents","preventing"],["memory","ram","2gb","1gb"]],cb=new Map;for(let e of rP){let t=e[0];for(let s of e)cb.set(s,t)}var iP=e=>cb.get(e)||e,ob=e=>{if(!e)return new Set;let t=e.toLowerCase().replace(/[^\w\s]/g," ").replace(/\s+/g," ").trim().split(" ").filter(s=>s.length>2&&!nP.has(s)).map(iP);return new Set(t)},oP=(e,t)=>{if(e.size===0&&t.size===0)return 1;if(e.size===0||t.size===0)return 0;let s=[...e].filter(r=>t.has(r)).length,n=new Set([...e,...t]).size;return n>0?s/n:0},aP=.4,ab=3,Ru=(e,t)=>{let s=ob(e.issue),n=ob(t.issue);return s.size<ab||n.size<ab?!1:oP(s,n)>=aP},Fu=e=>`${e.issue}::${e.severity}::${e.wafPillar}`,bn=e=>{let{existing:t,incoming:s}=e,n=new Set(t.map(Fu)),r=[];for(let i of s){let o=Fu(i);n.has(o)||t.some(c=>Ru(i,c))||r.some(c=>Ru(i,c))||(n.add(o),r.push(i))}return r},Uo=(e,t)=>{let s=new Set,n=[];for(let r of e){let i=Fu(r);s.has(i)||n.some(a=>Ru(r,a))||(s.add(i),n.push(r))}return n};var ub=Z(require("node:crypto")),ur=(e,t)=>{let s=`${e}:${t}`;return ub.createHash("sha256").update(s).digest("hex").slice(0,32)};var lb=e=>t=>{let s={},n={};return Object.entries(t).forEach(([r,i])=>{let o=e(i);s[o]=r,n[o]=i}),{redactedResources:n,mapping:s}};var pb=(e,t,s={})=>{let n=[];return e.forEach(r=>{let i=r.resourceId,o=s[i];if(!o&&i.includes("/")){let u=i.split("/"),c=u[u.length-2],l=Object.entries(t).find(([p,d])=>d.startsWith(c));l&&(o=l[1])}if(!o)return;let a=Object.entries(t).find(([,u])=>u===o)?.[0];if(!a){ue.warn(`\u26A0\uFE0F Unable to find redacted ID for logical resource: ${o}`);return}n.push({...r,resourceId:a})}),n};var db=(e=0)=>t=>`\x1B[${t+e}m`,mb=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,fb=(e=0)=>(t,s,n)=>`\x1B[${38+e};2;${t};${s};${n}m`,We={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},$q=Object.keys(We.modifier),cP=Object.keys(We.color),uP=Object.keys(We.bgColor),Gq=[...cP,...uP];function lP(){let e=new Map;for(let[t,s]of Object.entries(We)){for(let[n,r]of Object.entries(s))We[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},s[n]=We[n],e.set(r[0],r[1]);Object.defineProperty(We,t,{value:s,enumerable:!1})}return Object.defineProperty(We,"codes",{value:e,enumerable:!1}),We.color.close="\x1B[39m",We.bgColor.close="\x1B[49m",We.color.ansi=db(),We.color.ansi256=mb(),We.color.ansi16m=fb(),We.bgColor.ansi=db(10),We.bgColor.ansi256=mb(10),We.bgColor.ansi16m=fb(10),Object.defineProperties(We,{rgbToAnsi256:{value(t,s,n){return t===s&&s===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return[0,0,0];let[n]=s;n.length===3&&(n=[...n].map(i=>i+i).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>We.rgbToAnsi256(...We.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,n,r;if(t>=232)s=((t-232)*10+8)/255,n=s,r=s;else{t-=16;let a=t%36;s=Math.floor(t/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let i=Math.max(s,n,r)*2;if(i===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,n)=>We.ansi256ToAnsi(We.rgbToAnsi256(t,s,n)),enumerable:!1},hexToAnsi:{value:t=>We.ansi256ToAnsi(We.hexToAnsi256(t)),enumerable:!1}}),We}var pP=lP(),Yt=pP;var $o=Z(require("node:process"),1),hb=Z(require("node:os"),1),Iu=Z(require("node:tty"),1);function Wt(e,t=globalThis.Deno?globalThis.Deno.args:$o.default.argv){let s=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}var{env:Ge}=$o.default,jo;Wt("no-color")||Wt("no-colors")||Wt("color=false")||Wt("color=never")?jo=0:(Wt("color")||Wt("colors")||Wt("color=true")||Wt("color=always"))&&(jo=1);function dP(){if("FORCE_COLOR"in Ge)return Ge.FORCE_COLOR==="true"?1:Ge.FORCE_COLOR==="false"?0:Ge.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Ge.FORCE_COLOR,10),3)}function mP(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fP(e,{streamIsTTY:t,sniffFlags:s=!0}={}){let n=dP();n!==void 0&&(jo=n);let r=s?jo:n;if(r===0)return 0;if(s){if(Wt("color=16m")||Wt("color=full")||Wt("color=truecolor"))return 3;if(Wt("color=256"))return 2}if("TF_BUILD"in Ge&&"AGENT_NAME"in Ge)return 1;if(e&&!t&&r===void 0)return 0;let i=r||0;if(Ge.TERM==="dumb")return i;if($o.default.platform==="win32"){let o=hb.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Ge)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Ge)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Ge)||Ge.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Ge)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ge.TEAMCITY_VERSION)?1:0;if(Ge.COLORTERM==="truecolor"||Ge.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Ge){let o=Number.parseInt((Ge.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ge.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ge.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ge.TERM)||"COLORTERM"in Ge?1:i}function gb(e,t={}){let s=fP(e,{streamIsTTY:e&&e.isTTY,...t});return mP(s)}var gP={stdout:gb({isTTY:Iu.default.isatty(1)}),stderr:gb({isTTY:Iu.default.isatty(2)})},yb=gP;function Sb(e,t,s){let n=e.indexOf(t);if(n===-1)return e;let r=t.length,i=0,o="";do o+=e.slice(i,n)+t+s,i=n+r,n=e.indexOf(t,i);while(n!==-1);return o+=e.slice(i),o}function bb(e,t,s,n){let r=0,i="";do{let o=e[n-1]==="\r";i+=e.slice(r,o?n-1:n)+t+(o?`\r
|
|
93
|
+
`);for(let n=0;n<s.length;n++){let r=wT.exec(s[n]);if(r)return{filePath:e,line:n+1,excerpt:r[0]}}}catch{}return null},wS=e=>{let t;try{t=ir.readdirSync(e,{withFileTypes:!0})}catch{return null}for(let s of t){if(s.name.startsWith(".")||RT.has(s.name))continue;let n=Xr.join(e,s.name);if(s.isDirectory()){let r=wS(n);if(r)return r}else if(s.isFile()){let r=Xr.extname(s.name);if(!ET.has(r))continue;let i=FT(n);if(i)return i}}return null},ES=(e,t=xT)=>{for(let s of t){let n=Xr.join(e,s);if(!ir.existsSync(n))continue;let r=wS(n);if(r)return r}return null};var Du="2.253.0",RS=!1;var FS=(e,t)=>{if(RS)return{};let{version:s}=rr();if(!s)return{};if(nr(s,Du)<0)return{};let n=ES(process.cwd());if(!n)return{};RS=!0;let r=n.filePath.startsWith(process.cwd())?n.filePath.slice(process.cwd().length+1):n.filePath;return{Global:{issues:[t("Global",`Stack prop \`crossRegionReferences: true\` is set in \`${r}:${n.line}\` but your aws-cdk-lib is ${s} (>= ${Du}). This flag is a no-op on this version \u2014 CDK now takes the \`Fn::GetStackOutput\` path unconditionally for cross-region references (aws/aws-cdk#37724) and the legacy SSM-custom-resource path it used to enable has been removed.`,`Remove the \`crossRegionReferences: true\` Stack prop. Cross-region references work out of the box on aws-cdk-lib >= ${Du}. If you have legacy \`Custom::CrossRegionExportWriter\` / \`Reader\` resources in deployed stacks, see TL-XRES-007 for the migration ordering.`,"LOW","Operational Excellence","Global","cdkInsights")]}}};var IS=(e,t)=>{let s={},n=e.Resources||{},r=new Set,i,o,a=0;for(let[c,l]of Object.entries(n))(l.__appliedMixins??[]).some(m=>m.isCustom)&&(r.add(l.Type),a++,i||(i=c,o=l.Metadata?.["aws:cdk:path"]||c));if(r.size<3||!i)return s;let u=Array.from(r).sort().join(", ");return s[i]={issues:[]},s[i].issues.push(t(i,`A user-defined CDK Mixin appears on ${a} resources across ${r.size} distinct CFN types in this stack (${u}). This is the template-visible signature of \`.with(customMixin)\` recursing through every descendant via \`target.node.findAll()\` \u2014 likely because the custom mixin's \`supports()\` filter accepts every construct.`,"Verify your custom mixin's `supports()` method narrows correctly to the intended resource type(s). If the broad application is intentional, you can suppress this finding via `Validations.of(scope).acknowledge({ id: 'cdk-insights::TL-MIXIN-002', reason: '...' })`.","LOW","Operational Excellence",o??i,"cdkInsights")),s};var kS=[{fqn:"aws-cdk-lib.aws_s3.mixins.BucketVersioning",cfnResourceType:"AWS::S3::Bucket",displayName:"BucketVersioning"},{fqn:"aws-cdk-lib.aws_s3.mixins.BucketEncryption",cfnResourceType:"AWS::S3::Bucket",displayName:"BucketEncryption"},{fqn:"aws-cdk-lib.aws_s3.mixins.BucketBlockPublicAccess",cfnResourceType:"AWS::S3::Bucket",displayName:"BucketBlockPublicAccess"}];var TS=(e,t)=>{let s={},n=e.Resources||{};for(let r of kS){let i=le(n,r.cfnResourceType);if(i.length<2)continue;let o=[],a=[];for(let[u,c]of i)(c.__appliedMixins??[]).some(d=>d.fqn===r.fqn)?o.push(u):a.push([u,c]);if(!(o.length===0||a.length===0))for(let[u,c]of a){let l=c.Metadata?.["aws:cdk:path"]||u;s[u]||(s[u]={issues:[]}),s[u].issues.push(t(u,`CDK Mixin \`${r.displayName}\` is applied to ${o.length}/${i.length} ${r.cfnResourceType} resources in this stack but missing from this one. This is the signature of \`Mixins.of(scope).apply(...)\` silently skipping resources outside the selector.`,`Either apply \`${r.displayName}\` to this resource explicitly via \`.with()\`, or switch the stack-wide application to \`Mixins.of(scope).requireAll().apply(new ${r.displayName}())\` so synth fails when the mixin can't be applied to a selected construct.`,"LOW","Security",l,"cdkInsights"))}}return s};var IT=new Set(["aws:SourceArn","aws:SourceAccount","aws:PrincipalOrgID","aws:SourceVpce"]),kT=e=>{if(e==="*")return!0;if(e&&typeof e=="object"&&!Array.isArray(e)){let t=e,s=t.AWS;if(s==="*"||Array.isArray(s)&&s.includes("*")||t.Service==="*")return!0}return!1},TT=e=>{if(!e||typeof e!="object")return!1;let t=e;for(let s of Object.values(t))if(s&&typeof s=="object"){let n=s;for(let r of Object.keys(n))if(IT.has(r))return!0}return!1},PS=(e,t)=>{let s={},n=e.Resources||{},r=[];for(let[i,o]of le(n,"AWS::SQS::QueuePolicy")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.PolicyDocument,a])}for(let[i,o]of le(n,"AWS::SNS::TopicPolicy")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.PolicyDocument,a])}for(let[i,o]of le(n,"AWS::S3::BucketPolicy")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.PolicyDocument,a])}for(let[i,o]of le(n,"AWS::KMS::Key")){let a=o.Metadata?.["aws:cdk:path"]||i;r.push([i,o.Properties?.KeyPolicy,a])}for(let[i,o,a]of r){if(!o)continue;let u=Zt(o);for(let c of u){if((c.Effect||"Allow")!=="Allow"||!kT(c.Principal))continue;let p=c.Condition,d=p!=null;d&&TT(p)||(d?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,'Resource policy has a statement with Principal: "*" and a Condition that does not use a strongly restrictive key (aws:SourceArn, aws:SourceAccount, aws:PrincipalOrgID, or aws:SourceVpce). The current condition may not sufficiently limit access.',"Replace or supplement the existing Condition with aws:SourceArn, aws:SourceAccount, aws:PrincipalOrgID, or aws:SourceVpce to ensure only trusted sources can access this resource.","MEDIUM","Security",a,"cdkInsights"))):(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,'Resource policy has a statement with Principal: "*" and no Condition. This allows any AWS account or anonymous user to invoke the allowed actions.',"Add a restrictive Condition using aws:SourceArn, aws:SourceAccount, aws:PrincipalOrgID, or aws:SourceVpce to limit access to trusted sources.","HIGH","Security",a,"cdkInsights"))))}}return s};var PT=[{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/service-role\/AWSLambdaBasicExecutionRole$/,name:"AWSLambdaBasicExecutionRole",actions:["logs:CreateLogGroup","logs:CreateLogStream","logs:PutLogEvents"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/service-role\/AWSLambdaVPCAccessExecutionRole$/,name:"AWSLambdaVPCAccessExecutionRole",actions:["logs:CreateLogGroup","logs:CreateLogStream","logs:PutLogEvents","ec2:CreateNetworkInterface","ec2:DescribeNetworkInterfaces","ec2:DeleteNetworkInterface"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonDynamoDBReadOnlyAccess$/,name:"AmazonDynamoDBReadOnlyAccess",actions:["dynamodb:BatchGetItem","dynamodb:GetItem","dynamodb:Query","dynamodb:Scan","dynamodb:DescribeTable","dynamodb:DescribeReservedCapacity","dynamodb:DescribeReservedCapacityOfferings","dynamodb:ListTables","dynamodb:DescribeStream","dynamodb:ListStreams"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonDynamoDBFullAccess$/,name:"AmazonDynamoDBFullAccess",actions:["dynamodb:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonS3ReadOnlyAccess$/,name:"AmazonS3ReadOnlyAccess",actions:["s3:Get*","s3:List*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonS3FullAccess$/,name:"AmazonS3FullAccess",actions:["s3:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonSQSFullAccess$/,name:"AmazonSQSFullAccess",actions:["sqs:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AmazonSNSFullAccess$/,name:"AmazonSNSFullAccess",actions:["sns:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/CloudWatchFullAccess$/,name:"CloudWatchFullAccess",actions:["cloudwatch:*","logs:*"]},{pattern:/^arn:aws[a-z-]*:iam::aws:policy\/AWSStepFunctionsFullAccess$/,name:"AWSStepFunctionsFullAccess",actions:["states:*"]}],LT=(e,t)=>{if(e===t)return!0;let s=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*");return new RegExp(`^${s}$`,"i").test(e)},LS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role");for(let[i,o]of r){let u=(o.Properties||{}).ManagedPolicyArns;if(!Array.isArray(u)||u.length===0)continue;let c=[];for(let f of u)if(typeof f=="string"){for(let g of PT)if(g.pattern.test(f))for(let h of g.actions)c.push({action:h,policyName:g.name})}if(c.length===0)continue;let l=_s(o),p=[];for(let f of l){if(!f.document)continue;let g=Zt(f.document);for(let h of g){if((h.Effect||"Allow")!=="Allow")continue;let b=Array.isArray(h.Action)?h.Action:typeof h.Action=="string"?[h.Action]:[];for(let x of b)for(let v of c)if(LT(x,v.action)){p.push({action:x,policyName:v.policyName,inlinePolicy:f.name});break}}}if(p.length===0)continue;let d=o.Metadata?.["aws:cdk:path"]||i,m=[...new Set(p.map(f=>f.policyName))];s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`IAM role has ${p.length} inline action(s) that overlap with permissions already granted by managed policy(ies): ${m.join(", ")}. Redundant inline statements increase policy size without adding permissions.`,"Remove redundant inline policy statements that are already covered by attached managed policies. Review the managed policy permissions before adding inline actions.","LOW","Security",d,"cdkInsights"))}return s};var _T="cloudformation:DescribeStacks",OT=(e,t)=>typeof e=="string"?e===t||e==="*":Array.isArray(e)?e.some(s=>typeof s=="string"&&(s===t||s==="*")):!1,BT=e=>!!(e==="*"||Array.isArray(e)&&e.includes("*")),MT=e=>{let t=e.Properties?.Policies;return Array.isArray(t)?t.map(s=>s&&typeof s=="object"?s.PolicyDocument:void 0).filter(s=>s!==void 0):[]},_S=(e,t)=>{let s={},n=e.Resources||{},r=[];for(let[i,o]of le(n,"AWS::IAM::Policy")){let a=o.Metadata?.["aws:cdk:path"]||i,u=o.Properties?.PolicyDocument;u&&r.push([i,u,a])}for(let[i,o]of le(n,"AWS::IAM::ManagedPolicy")){let a=o.Metadata?.["aws:cdk:path"]||i,u=o.Properties?.PolicyDocument;u&&r.push([i,u,a])}for(let[i,o]of le(n,"AWS::IAM::Role")){let a=o.Metadata?.["aws:cdk:path"]||i;for(let u of MT(o))r.push([i,u,a])}for(let[i,o,a]of r)for(let u of Zt(o))(u.Effect||"Allow")==="Allow"&&OT(u.Action,_T)&&BT(u.Resource)&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,'IAM policy grants `cloudformation:DescribeStacks` with `Resource: "*"`. This is the permission CDK 2.253.0\'s auto-generated cross-account `Fn::GetStackOutput` flow grants \u2014 but CDK scopes it to a specific producer stack ARN. A wildcard here lets the holder enumerate every stack in the account, including ones the consumer never references.','Replace `Resource: "*"` with the specific producer stack ARN, e.g. `arn:aws:cloudformation:<region>:<account>:stack/<producer-stack-name>/*`. If you are not using `Fn::GetStackOutput` and this permission is for something else, scope it to the stacks the role actually needs to describe.',"MEDIUM","Security",a,"cdkInsights")));return s};var NT=e=>{let t=e.Effect||"Allow",s=JSON.stringify(e.Principal||"*"),n=JSON.stringify(e.Condition||null);return`${t}|${s}|${n}`},WT=e=>{let t=e.Action;return Array.isArray(t)?t:typeof t=="string"?[t]:[]},OS=(e,t)=>{let s={},n=e.Resources||{},r=[...le(n,"AWS::SQS::QueuePolicy"),...le(n,"AWS::SNS::TopicPolicy")];for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Zt(u);if(c.length<=2)continue;let l=o.Metadata?.["aws:cdk:path"]||i,p=new Map;for(let h=0;h<c.length;h++){let y=NT(c[h]),b=WT(c[h]),x=p.get(y)||[];x.push({actions:b,index:h}),p.set(y,x)}let d=0;for(let[,h]of p)h.length>1&&(d+=h.length-1);if(d<=0||d<2)continue;let m=c.length,g=d/m>.5?"MEDIUM":"LOW";s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Policy has ${m} statements, of which ${d} could be consolidated. Multiple statements share the same Effect, Principal, and Condition but differ only in Action values.`,"Consolidate statements that share the same Effect, Principal, and Condition into a single statement with an Action array. This reduces policy size and improves readability.",g,"Reliability",l,"cdkInsights"))}return s};var BS={"2.251.0":[{resourceType:"AWS::ElasticLoadBalancing::LoadBalancer",removedAttributes:["SourceSecurityGroup"],removedTypes:["PolicyItem","SourceSecurityGroup"],releaseUrl:"https://github.com/aws/aws-cdk/releases/tag/v2.251.0",notes:"Verified 2026-05-03 against release v2.251.0 (commit 9e6c2ef). Classic ELB v1 only. The removed names are GetAtt return attribute and authoring-time jsii types \u2014 synthesized CFN property shape is unchanged, and no CFN property additions affect covered resource types."}]};To();var UT=(e,t)=>{let s=[];for(let[n,r]of Object.entries(t))if(!(nr(n,e)>0))for(let i of r)s.push({...i,introducedIn:n});return s},jT=(e,t)=>Object.values(t).filter(s=>s.resourceTypes.includes(e)).map(s=>s.ruleId),MS=(e,t,s,n="regression",r=BS,i=sr)=>{let o={};if(!s)return o;let a=UT(s,r);if(a.length===0)return o;let u=new Map;for(let[c,l]of Object.entries(e.Resources??{})){let p=u.get(l.Type)??[];p.push(c),u.set(l.Type,p)}for(let c of a){let l=u.get(c.resourceType);if(!l||l.length===0)continue;let p=jT(c.resourceType,i);if(p.length!==0)if(n==="regression"){let d=c.removedProperties??[],m=c.renamedProperties??[];if(d.length===0&&m.length===0)continue;let f=[...d.map(g=>`removed property "${g}"`),...m.map(g=>`renamed "${g.from}" \u2192 "${g.to}"`)].join(", ");for(let g of l)o[g]||(o[g]={issues:[]}),o[g].issues.push(t(g,`aws-cdk-lib v${c.introducedIn} regenerated the L1 schema for ${c.resourceType} (${f}). Existing cdk-insights rule(s) [${p.join(", ")}] may have silently lost coverage.`,`Verify rule coverage against the current schema. Release notes: ${c.releaseUrl}`,"LOW","Operational Excellence",g,"cdkInsights"))}else{let d=c.addedProperties??[];if(d.length===0)continue;let m=d.map(f=>`"${f}"`).join(", ");for(let f of l)o[f]||(o[f]={issues:[]}),o[f].issues.push(t(f,`aws-cdk-lib v${c.introducedIn} added new propert${d.length===1?"y":"ies"} ${m} to ${c.resourceType}. Existing cdk-insights rule(s) [${p.join(", ")}] don't evaluate ${d.length===1?"it":"them"} \u2014 consider whether a rule should.`,`Review the new propert${d.length===1?"y":"ies"} for security, cost, or compliance implications. Release notes: ${c.releaseUrl}`,"LOW","Operational Excellence",f,"cdkInsights"))}}return o},NS=(e,t)=>{let{version:s}=rr();return MS(e,t,s,"regression")},WS=(e,t)=>{let{version:s}=rr();return MS(e,t,s,"coverage-gap")};var j={SQS_POLICY_MAX_BYTES:8192,SQS_POLICY_MAX_STATEMENTS:20,IAM_INLINE_POLICY_MAX_BYTES:2048,IAM_MANAGED_POLICY_MAX_BYTES:6144,IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES:10240,LAMBDA_ENV_MAX_BYTES:4096,LAMBDA_MAX_LAYERS:5,S3_BUCKET_POLICY_MAX_BYTES:20480,SNS_TOPIC_POLICY_MAX_BYTES:30720,EVENTBRIDGE_RULES_PER_BUS_DEFAULT:300,CFN_MAX_RESOURCES:500,CFN_TEMPLATE_MAX_BYTES_DIRECT:51200,CFN_TEMPLATE_MAX_BYTES_S3:460800,SECURITY_GROUP_MAX_INBOUND_RULES:60,SECURITY_GROUP_MAX_OUTBOUND_RULES:60},Me=.8;var US=(e,t)=>{let s={},n=Object.keys(e.Resources||{}).length,r="__TEMPLATE_LEVEL__";return n>=j.CFN_MAX_RESOURCES?(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template contains ${n} resources, reaching or exceeding the ${j.CFN_MAX_RESOURCES}-resource limit. Deployment will fail.`,"Split the stack into multiple nested stacks or separate stacks to stay within the CloudFormation resource limit.","CRITICAL","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))):be(n,j.CFN_MAX_RESOURCES)>=Me&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template contains ${n} resources (${Math.round(be(n,j.CFN_MAX_RESOURCES)*100)}% of the ${j.CFN_MAX_RESOURCES}-resource limit).`,"Consider splitting the stack into multiple nested stacks or separate stacks before this limit is reached.","HIGH","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))),s};var jS=(e,t)=>{let s={},n=JSON.stringify(e).length,r="__TEMPLATE_LEVEL__";return n>=j.CFN_TEMPLATE_MAX_BYTES_S3?(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)}, exceeding the ${de(j.CFN_TEMPLATE_MAX_BYTES_S3)} S3 upload limit. Deployment will fail regardless of deployment method.`,"Split the stack into multiple nested stacks or separate stacks to reduce template size.","CRITICAL","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))):be(n,j.CFN_TEMPLATE_MAX_BYTES_S3)>=Me&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)} (${Math.round(be(n,j.CFN_TEMPLATE_MAX_BYTES_S3)*100)}% of the ${de(j.CFN_TEMPLATE_MAX_BYTES_S3)} S3 upload limit).`,"Consider splitting the stack into multiple nested stacks or separate stacks before this limit is reached.","MEDIUM","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))),n>=j.CFN_TEMPLATE_MAX_BYTES_DIRECT?(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)}, exceeding the ${de(j.CFN_TEMPLATE_MAX_BYTES_DIRECT)} direct upload limit.`,"CDK uploads templates via S3 by default so this is informational. If deploying outside CDK with `aws cloudformation create-stack --template-body=...`, switch to `--template-url` or use S3.","LOW","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))):be(n,j.CFN_TEMPLATE_MAX_BYTES_DIRECT)>=Me&&(s[r]||(s[r]={issues:[]}),s[r].issues.push(t(r,`CloudFormation template is ${de(n)} (${Math.round(be(n,j.CFN_TEMPLATE_MAX_BYTES_DIRECT)*100)}% of the ${de(j.CFN_TEMPLATE_MAX_BYTES_DIRECT)} direct upload limit).`,"CDK uploads templates via S3 by default so this is informational. The S3-upload limit (450KB) is the one that actually applies to CDK deployments.","LOW","Reliability","__TEMPLATE_LEVEL__","cdkInsights"))),s};var $S=(e,t)=>{let s={},n=e.Resources||{},r=dS(n);for(let[i,o]of r){let a=o.length,u=o[0],l=n[u]?.Metadata?.["aws:cdk:path"]||u;a>=j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT?(s[u]||(s[u]={issues:[]}),s[u].issues.push(t(u,`EventBridge bus "${i}" has ${a} rules, reaching or exceeding the ${j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT}-rule default limit. Deployment may fail.`,"Request a service quota increase for EventBridge rules per bus, or split rules across multiple event buses.","HIGH","Reliability",l,"cdkInsights"))):be(a,j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT)>=Me&&(s[u]||(s[u]={issues:[]}),s[u].issues.push(t(u,`EventBridge bus "${i}" has ${a} rules (${Math.round(be(a,j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT)*100)}% of the ${j.EVENTBRIDGE_RULES_PER_BUS_DEFAULT}-rule default limit).`,"Consider requesting a service quota increase or splitting rules across multiple event buses before this limit is reached.","MEDIUM","Reliability",l,"cdkInsights")))}return s};var GS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role"),i=le(n,"AWS::IAM::User");for(let[o,a]of[...r,...i]){let u=a.Metadata?.["aws:cdk:path"]||o,c=_s(a);for(let l of c){if(!l.document)continue;let p=Dt(l.document);p>=j.IAM_INLINE_POLICY_MAX_BYTES?(s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`Inline policy "${l.name}" is ${de(p)}, exceeding the ${de(j.IAM_INLINE_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Convert this inline policy to a managed policy, or reduce the number of statements and actions. Use wildcard patterns where appropriate to consolidate permissions.","CRITICAL","Reliability",u,"cdkInsights"))):be(p,j.IAM_INLINE_POLICY_MAX_BYTES)>=Me&&(s[o]||(s[o]={issues:[]}),s[o].issues.push(t(o,`Inline policy "${l.name}" is ${de(p)} (${Math.round(be(p,j.IAM_INLINE_POLICY_MAX_BYTES)*100)}% of the ${de(j.IAM_INLINE_POLICY_MAX_BYTES)} limit). Adding more permissions may cause deployment failure.`,"Consider converting this inline policy to a managed policy before the limit is reached.","HIGH","Reliability",u,"cdkInsights")))}}return s};var HS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::ManagedPolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.IAM_MANAGED_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Managed policy is ${de(c)}, exceeding the ${de(j.IAM_MANAGED_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Split this managed policy into multiple smaller policies, or consolidate statements using wildcard patterns to reduce size.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.IAM_MANAGED_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Managed policy is ${de(c)} (${Math.round(be(c,j.IAM_MANAGED_POLICY_MAX_BYTES)*100)}% of the ${de(j.IAM_MANAGED_POLICY_MAX_BYTES)} limit). Adding more permissions may cause deployment failure.`,"Consider splitting this managed policy into multiple policies before the limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var zS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::IAM::Role");for(let[i,o]of r){let a=o.Metadata?.["aws:cdk:path"]||i,u=_s(o),c=0;for(let l of u)l.document&&(c+=Dt(l.document));c!==0&&(c>=j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Aggregate inline policy size is ${de(c)} across ${u.length} policies, exceeding the ${de(j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)} limit. Deployment will fail.`,"Convert some inline policies to managed policies to reduce the aggregate inline size. Consider consolidating overlapping permissions across policies.","CRITICAL","Reliability",a,"cdkInsights"))):be(c,j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Aggregate inline policy size is ${de(c)} across ${u.length} policies (${Math.round(be(c,j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)*100)}% of the ${de(j.IAM_ROLE_AGGREGATE_INLINE_MAX_BYTES)} limit). Adding more inline policies may cause deployment failure.`,"Consider converting some inline policies to managed policies before the aggregate limit is reached.","HIGH","Reliability",a,"cdkInsights"))))}return s};var qS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::Lambda::Function");for(let[i,o]of r){let u=(o.Properties||{}).Environment;if(!u?.Variables)continue;let c=Dt(u.Variables),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.LAMBDA_ENV_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda environment variables are ${de(c)}, exceeding the ${de(j.LAMBDA_ENV_MAX_BYTES)} limit. Deployment will fail.`,"Move large configuration values to SSM Parameter Store or Secrets Manager. Use a single JSON-encoded parameter instead of many individual environment variables.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.LAMBDA_ENV_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda environment variables are ${de(c)} (${Math.round(be(c,j.LAMBDA_ENV_MAX_BYTES)*100)}% of the ${de(j.LAMBDA_ENV_MAX_BYTES)} limit). Adding more variables may cause deployment failure.`,"Consider moving some configuration values to SSM Parameter Store or Secrets Manager before the limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var VS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::Lambda::Function");for(let[i,o]of r){let u=(o.Properties||{}).Layers;if(!Array.isArray(u))continue;let c=u.length,l=o.Metadata?.["aws:cdk:path"]||i;c>j.LAMBDA_MAX_LAYERS?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda function has ${c} layers, exceeding the maximum of ${j.LAMBDA_MAX_LAYERS} layers. Deployment will fail.`,"Consolidate layers by combining related dependencies into a single layer, or move some dependencies into the deployment package itself.","CRITICAL","Reliability",l,"cdkInsights"))):c===j.LAMBDA_MAX_LAYERS&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Lambda function has ${c} of ${j.LAMBDA_MAX_LAYERS} maximum layers. There is no headroom to add additional layers.`,"Consider consolidating layers by combining related dependencies into a single layer to free up a layer slot for future needs.","HIGH","Reliability",l,"cdkInsights")))}return s};var KS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::S3::BucketPolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.S3_BUCKET_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`S3 bucket policy is ${de(c)}, exceeding the ${de(j.S3_BUCKET_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Consolidate policy statements or split resources across multiple buckets to reduce policy size.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.S3_BUCKET_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`S3 bucket policy is ${de(c)} (${Math.round(be(c,j.S3_BUCKET_POLICY_MAX_BYTES)*100)}% of the ${de(j.S3_BUCKET_POLICY_MAX_BYTES)} limit). Adding more statements may cause deployment failure.`,"Consider consolidating policy statements or splitting resources across multiple buckets before this limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var ZS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::EC2::SecurityGroup");for(let[i,o]of r){let{inbound:a,outbound:u}=mS(i,o,n),c=o.Metadata?.["aws:cdk:path"]||i;a>=j.SECURITY_GROUP_MAX_INBOUND_RULES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${a} inbound rules, reaching or exceeding the ${j.SECURITY_GROUP_MAX_INBOUND_RULES}-rule limit. Deployment will fail.`,"Consolidate rules using CIDR ranges or prefix lists, or split workloads across multiple security groups.","CRITICAL","Reliability",c,"cdkInsights"))):be(a,j.SECURITY_GROUP_MAX_INBOUND_RULES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${a} inbound rules (${Math.round(be(a,j.SECURITY_GROUP_MAX_INBOUND_RULES)*100)}% of the ${j.SECURITY_GROUP_MAX_INBOUND_RULES}-rule limit).`,"Consider consolidating rules using CIDR ranges or prefix lists before this limit is reached.","HIGH","Reliability",c,"cdkInsights"))),u>=j.SECURITY_GROUP_MAX_OUTBOUND_RULES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${u} outbound rules, reaching or exceeding the ${j.SECURITY_GROUP_MAX_OUTBOUND_RULES}-rule limit. Deployment will fail.`,"Consolidate rules using CIDR ranges or prefix lists, or split workloads across multiple security groups.","CRITICAL","Reliability",c,"cdkInsights"))):be(u,j.SECURITY_GROUP_MAX_OUTBOUND_RULES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`Security group has ${u} outbound rules (${Math.round(be(u,j.SECURITY_GROUP_MAX_OUTBOUND_RULES)*100)}% of the ${j.SECURITY_GROUP_MAX_OUTBOUND_RULES}-rule limit).`,"Consider consolidating rules using CIDR ranges or prefix lists before this limit is reached.","HIGH","Reliability",c,"cdkInsights")))}return s};var YS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::SNS::TopicPolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=o.Metadata?.["aws:cdk:path"]||i;c>=j.SNS_TOPIC_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SNS topic policy is ${de(c)}, exceeding the ${de(j.SNS_TOPIC_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Consolidate policy statements or split subscriptions across multiple topics to reduce policy size.","CRITICAL","Reliability",l,"cdkInsights"))):be(c,j.SNS_TOPIC_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SNS topic policy is ${de(c)} (${Math.round(be(c,j.SNS_TOPIC_POLICY_MAX_BYTES)*100)}% of the ${de(j.SNS_TOPIC_POLICY_MAX_BYTES)} limit). Adding more statements may cause deployment failure.`,"Consider consolidating policy statements or splitting subscriptions across multiple topics before this limit is reached.","HIGH","Reliability",l,"cdkInsights")))}return s};var JS=(e,t)=>{let s={},n=e.Resources||{},r=le(n,"AWS::SQS::QueuePolicy");for(let[i,o]of r){let u=(o.Properties||{}).PolicyDocument;if(!u)continue;let c=Dt(u),l=lS(u),p=o.Metadata?.["aws:cdk:path"]||i;c>=j.SQS_POLICY_MAX_BYTES?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy is ${de(c)}, exceeding the ${de(j.SQS_POLICY_MAX_BYTES)} limit. Deployment will fail.`,"Consolidate policy statements into a single statement with broader conditions, or split targets across multiple queues. If using a shared DLQ with EventBridge targets, use Queue.fromQueueArn() to prevent CDK from auto-generating per-target statements.","CRITICAL","Reliability",p,"cdkInsights"))):be(c,j.SQS_POLICY_MAX_BYTES)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy is ${de(c)} (${Math.round(be(c,j.SQS_POLICY_MAX_BYTES)*100)}% of the ${de(j.SQS_POLICY_MAX_BYTES)} limit). Adding more targets may cause deployment failure.`,"Consider consolidating policy statements or splitting targets across multiple queues before this limit is reached.","HIGH","Reliability",p,"cdkInsights"))),l>=j.SQS_POLICY_MAX_STATEMENTS?(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy has ${l} statements, reaching or exceeding the ${j.SQS_POLICY_MAX_STATEMENTS}-statement limit.`,"Consolidate statements using wildcard conditions or array-valued Action/Resource fields instead of one statement per target.","CRITICAL","Reliability",p,"cdkInsights"))):be(l,j.SQS_POLICY_MAX_STATEMENTS)>=Me&&(s[i]||(s[i]={issues:[]}),s[i].issues.push(t(i,`SQS queue policy has ${l} of ${j.SQS_POLICY_MAX_STATEMENTS} maximum statements (${Math.round(be(l,j.SQS_POLICY_MAX_STATEMENTS)*100)}%).`,"Consider consolidating policy statements before this limit is reached.","HIGH","Reliability",p,"cdkInsights")))}return s};var $T=[{ruleId:"TL-LIMIT-001",title:"SQS Queue Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:JS,description:"SQS queue policies must be under 8KB / 20 statements. Commonly exceeded when CDK auto-generates per-target policy statements for shared DLQs."},{ruleId:"TL-LIMIT-002",title:"IAM Inline Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:GS,description:"Each IAM inline policy must be under 2,048 bytes when URL-encoded."},{ruleId:"TL-LIMIT-003",title:"IAM Managed Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:HS,description:"IAM managed policies must be under 6,144 bytes."},{ruleId:"TL-LIMIT-004",title:"IAM Role Aggregate Inline Policy Size",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:zS,description:"Total size of all inline policies on a single IAM role must be under 10,240 bytes."},{ruleId:"TL-LIMIT-005",title:"Lambda Environment Variables Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:qS,description:"Lambda environment variables must total under 4KB including keys and values."},{ruleId:"TL-LIMIT-006",title:"Lambda Layers Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:VS,description:"Lambda functions can have a maximum of 5 layers."},{ruleId:"TL-LIMIT-007",title:"S3 Bucket Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:KS,description:"S3 bucket policies must be under 20KB."},{ruleId:"TL-LIMIT-008",title:"SNS Topic Policy Size Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:YS,description:"SNS topic policies must be under 30KB."},{ruleId:"TL-LIMIT-009",title:"EventBridge Rules Per Bus Limit",category:"serviceLimits",defaultSeverity:"HIGH",wafPillar:"Reliability",check:$S,description:"Default quota is 300 EventBridge rules per event bus."},{ruleId:"TL-LIMIT-010",title:"CloudFormation Stack Resource Count",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:US,description:"CloudFormation stacks have a hard limit of 500 resources."},{ruleId:"TL-LIMIT-011",title:"CloudFormation Template Size",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:jS,description:"CloudFormation templates have a 51KB limit (direct) or 460KB limit (S3)."},{ruleId:"TL-LIMIT-012",title:"Security Group Rules Limit",category:"serviceLimits",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:ZS,description:"Security groups have a default limit of 60 inbound and 60 outbound rules."},{ruleId:"TL-XRES-001",title:"Shared DLQ with Too Many EventBridge Targets",category:"crossResourceAntiPatterns",defaultSeverity:"HIGH",wafPillar:"Reliability",check:DS,description:"CDK generates one SQS policy statement per EventBridge target. Too many targets sharing a DLQ causes the policy to exceed the 8KB limit."},{ruleId:"TL-XRES-002",title:"EventBridge Targets Without DLQ",category:"crossResourceAntiPatterns",defaultSeverity:"MEDIUM",wafPillar:"Reliability",check:yS,description:"EventBridge rule targets should have a Dead Letter Queue for failed event delivery."},{ruleId:"TL-XRES-003",title:"Lambda Without Explicit Log Group",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:SS,description:"Lambda functions without explicit CloudWatch Log Groups use auto-created groups with infinite retention."},{ruleId:"TL-XRES-004",title:"DynamoDB Without Point-in-Time Recovery",category:"crossResourceAntiPatterns",defaultSeverity:"MEDIUM",wafPillar:"Reliability",check:hS,description:"DynamoDB tables should have PITR enabled, especially in production stacks."},{ruleId:"TL-XRES-005",title:"Duplicate IAM Policy Statements",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Security",check:gS,description:"Duplicate policy statements across a role waste policy size budget and may indicate copy-paste errors."},{ruleId:"TL-XRES-006",title:"Dangling Fn::GetStackOutput Reference",category:"crossResourceAntiPatterns",defaultSeverity:"CRITICAL",wafPillar:"Reliability",check:uS,description:"Fn::GetStackOutput (CDK >= 2.253.0) references a stack or output that does not exist in any sibling stack in the same CDK app. Deploy will fail at resolution time with Outputs.NoSuchOutput."},{ruleId:"TL-XRES-007",title:"Mixed Cross-Region Reference Migration State",category:"crossResourceAntiPatterns",defaultSeverity:"HIGH",wafPillar:"Reliability",check:bS,description:"Stack contains both the legacy SSM-custom-resource cross-region reference path (Custom::CrossRegionExportWriter / Reader) and the new Fn::GetStackOutput intrinsic. Partial migrations leak SSM parameters and can fail subsequent deploys with ParameterAlreadyExists (aws/aws-cdk#37845)."},{ruleId:"TL-XRES-008",title:"Stale crossRegionReferences Stack Prop",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:FS,description:"Stack prop `crossRegionReferences: true` is set in user source but aws-cdk-lib is >= 2.253.0, where the flag is a no-op \u2014 CDK takes the Fn::GetStackOutput path unconditionally. Advisory; remove the prop to reduce surprise on future readers."},{ruleId:"TL-POL-001",title:"Redundant SQS/SNS Policy Statements",category:"policyAnalysis",defaultSeverity:"MEDIUM",wafPillar:"Reliability",check:OS,description:"Policy statements that could be consolidated to reduce policy size."},{ruleId:"TL-POL-002",title:"IAM Overlapping Managed and Inline Policies",category:"policyAnalysis",defaultSeverity:"LOW",wafPillar:"Security",check:LS,description:"Inline policy statements that duplicate permissions from attached managed policies."},{ruleId:"TL-POL-003",title:"Overly Broad Resource Policy Principals",category:"policyAnalysis",defaultSeverity:"HIGH",wafPillar:"Security",check:PS,description:"Resource policies with wildcard (*) principals without restrictive conditions."},{ruleId:"TL-POL-004",title:"Over-Scoped cloudformation:DescribeStacks Permission",category:"policyAnalysis",defaultSeverity:"MEDIUM",wafPillar:"Security",check:_S,description:`IAM policy grants cloudformation:DescribeStacks with Resource: "*". CDK 2.253.0's auto-generated cross-account Fn::GetStackOutput flow scopes this permission to the specific producer stack ARN \u2014 a wildcard here is escape-hatch over-privilege and grants enumeration of every stack in the account.`},{ruleId:"TL-DRIFT-001",title:"CDK L1 Schema Drift",category:"schemaDrift",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:NS,description:"Detects when the user's aws-cdk-lib version regenerated an L1 CloudFormation resource schema in a way that may silently invalidate cdk-insights rule coverage."},{ruleId:"TL-DRIFT-002",title:"CDK L1 Schema Coverage Gap",category:"schemaDrift",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:WS,description:"Surfaces newly-added L1 CloudFormation properties on resource types already covered by cdk-insights rules. Hint that a new rule may be worth opening; not a regression."},{ruleId:"TL-MIXIN-001",title:"Compliance-Critical Mixin Applied Without Stack Coverage",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Security",check:TS,description:"A compliance-critical CDK Mixin (e.g., BucketEncryption, BucketVersioning) is applied to some but not all resources of its target type in the stack \u2014 the template-visible signature of `Mixins.of(scope).apply(...)` silently skipping resources. Recommends `requireAll()` enforcement."},{ruleId:"TL-MIXIN-002",title:"Custom Mixin Applied Across Many Resource Types",category:"crossResourceAntiPatterns",defaultSeverity:"LOW",wafPillar:"Operational Excellence",check:IS,description:"A user-defined CDK Mixin appears on resources spanning 3+ distinct CFN types in the same stack \u2014 the template-visible signature of `.with(customMixin)` recursing through descendants because the mixin's `supports()` filter accepts every construct. Verify the supports() narrows to the intended resource type."}],vu=(e,t,s,n)=>{let r={};for(let i of $T)if(!(s&&s.length>0&&!s.some(a=>i.ruleId.toLowerCase().includes(a.toLowerCase())||i.category.toLowerCase().includes(a.toLowerCase())||i.title.toLowerCase().includes(a.toLowerCase()))))try{let o=i.check(e,t,n);for(let[a,u]of Object.entries(o)){r[a]||(r[a]={issues:[]});for(let c of u.issues)c.ruleId=i.ruleId;r[a].issues.push(...u.issues)}}catch{}return r};var ei={DEFAULT_MAX_CONCURRENT:5,DEFAULT_RETRY_ATTEMPTS:3,DEFAULT_RETRY_DELAY_MS:1e3,DEFAULT_TIMEOUT_MS:60*1e3};var Wo=Z(require("node:crypto")),Ke=Z(require("node:fs")),cr=Z(require("node:path"));var GT=["CI","BUILD_ID","BUILD_NUMBER","CIRCLECI","TRAVIS","GITHUB_ACTIONS","GITLAB_CI","JENKINS_URL","BITBUCKET_BUILD_NUMBER","TEAMCITY_VERSION","BAMBOO_BUILDKEY","GO_PIPELINE_NAME","BUILDKITE","DRONE","SEMAPHORE","APPVEYOR","WERCKER","CODEBUILD_BUILD_ID","AWS_CODEBUILD_BUILD_ID","TF_BUILD","CIRRUS_CI","NETLIFY","VERCEL","RENDER","HEROKU_TEST_RUN_ID"],HT=()=>GT.some(e=>!!process.env[e]),ti=()=>{if(!HT())return!1;let e=process.env.CDK_INSIGHTS_ENABLE_CACHE_IN_CI;return!(e&&e!=="false"&&e!=="0")};var yn="3";var Et=Z(require("node:fs")),XS=Z(require("node:os")),_o=Z(require("node:path"));var zT={features:{staticAnalysis:{free:!0,pro:!0,trial:!0,team:!0},multiStackAnalysis:{free:!0,pro:!0,trial:!0,team:!0},localAnalysis:{free:!0,pro:!0,trial:!0,team:!0},basicServiceChecks:{free:!0,pro:!0,trial:!0,team:!0},aiAnalysis:{free:!0,pro:!0,trial:!0,team:!0},contextualFixes:{free:!1,pro:!0,trial:!0,team:!0},smartPrioritization:{free:!1,pro:!0,trial:!0,team:!0},naturalLanguageExplanations:{free:!1,pro:!0,trial:!0,team:!0},customAITraining:{free:!1,pro:!1,trial:!1,team:!0},githubIntegration:{free:!1,pro:!0,trial:!0,team:!0},teamDashboards:{free:!1,pro:!0,trial:!0,team:!0},collaborativeCommenting:{free:!1,pro:!1,trial:!1,team:!0},sharedConfigurations:{free:!1,pro:!0,trial:!0,team:!0},jsonOutput:{free:!0,pro:!0,trial:!0,team:!0},tableOutput:{free:!0,pro:!0,trial:!0,team:!0},markdownOutput:{free:!0,pro:!0,trial:!0,team:!0},pdfReports:{free:!1,pro:!0,trial:!0,team:!0},executiveSummaries:{free:!1,pro:!1,trial:!1,team:!0},customBrandedReports:{free:!1,pro:!1,trial:!1,team:!0},customRuleSets:{free:!1,pro:!0,trial:!0,team:!0},advancedCompliance:{free:!1,pro:!0,trial:!0,team:!0},cloudAnalysis:{free:!1,pro:!0,trial:!0,team:!0},parallelAnalysis:{free:!1,pro:!0,trial:!0,team:!0},caching:{free:!1,pro:!0,trial:!0,team:!0},largeProjectSupport:{free:!1,pro:!0,trial:!0,team:!0},advancedFiltering:{free:!1,pro:!1,trial:!1,team:!0},apiAccess:{free:!1,pro:!1,trial:!1,team:!0},webhookNotifications:{free:!1,pro:!1,trial:!1,team:!0},cicdIntegration:{free:!1,pro:!1,trial:!1,team:!0},customIntegrations:{free:!1,pro:!1,trial:!1,team:!0},roleBasedAccess:{free:!1,pro:!1,trial:!1,team:!0},teamAnalytics:{free:!1,pro:!1,trial:!1,team:!0},auditTrails:{free:!1,pro:!1,trial:!1,team:!0},ssoIntegration:{free:!1,pro:!1,trial:!1,team:!0},multiTenantSupport:{free:!1,pro:!1,trial:!1,team:!0},whiteLabeling:{free:!1,pro:!1,trial:!1,team:!0},customBranding:{free:!1,pro:!1,trial:!1,team:!0},communitySupport:{free:!0,pro:!0,trial:!0,team:!0},emailSupport:{free:!1,pro:!0,trial:!0,team:!0},prioritySupport:{free:!1,pro:!1,trial:!1,team:!0},dedicatedAccountManager:{free:!1,pro:!1,trial:!1,team:!0},customTraining:{free:!1,pro:!1,trial:!1,team:!0},soc2Compliance:{free:!1,pro:!0,trial:!0,team:!0},hipaaCompliance:{free:!1,pro:!0,trial:!0,team:!0},fedrampCompliance:{free:!1,pro:!1,trial:!1,team:!0},customCompliance:{free:!1,pro:!1,trial:!1,team:!0}}},qT=(e=zT)=>({isFeatureEnabled:(o,a)=>e.features[o]?.[a]??!1,getEnabledFeatures:o=>Object.entries(e.features).filter(([,a])=>a[o]).map(([a])=>a),getAllFeatures:()=>Object.keys(e.features),getFeatureTiers:o=>e.features[o],getUpgradePath:(o,a)=>{let u=["free","pro","trial","team"],c=u.indexOf(a);for(let l=c+1;l<u.length;l++){let p=u[l];if(e.features[o]?.[p])return{required:!0,tier:p,path:`https://cdkinsights.dev/pricing?tier=${p}&feature=${o}`}}return null}}),si=qT();var QS=(e,t,s)=>{let n=si.getUpgradePath(e,t),r=s?` for ${s}`:"";return n?`\u{1F4A1} Upgrade to ${n.tier} to access ${e}${r}. Visit: ${n.path}`:`\u26A0\uFE0F ${e}${r} is not available for your current tier.`};var Po=_o.join(XS.homedir(),".cdk-insights","cache"),Tq=_o.join(Po,"analysis-cache.json"),Cu=_o.join(Po,"cache-stats.json"),Sn={totalHits:0,totalMisses:0,totalSets:0,totalClears:0,cacheSize:0,maxCacheSize:1e3},or=null,Lo=!1,VT=()=>{try{if(Et.existsSync(Cu)){let e=Et.readFileSync(Cu,"utf-8");try{Sn={...Sn,...JSON.parse(e)}}catch(t){Ls.warn("Could not parse cache statistics file",{error:t instanceof Error?t.message:String(t)})}}}catch(e){Ls.warn("Could not load cache statistics",{error:e instanceof Error?e.message:String(e)})}},Au=()=>{Lo=!0,!or&&(or=setTimeout(()=>{Lo&&eb(),or=null},5e3))},eb=()=>{try{KT(),Et.writeFileSync(Cu,JSON.stringify(Sn,null,2),"utf-8"),Lo=!1}catch(e){Ls.warn("Could not save cache statistics",{error:e instanceof Error?e.message:String(e)})}},xu=()=>{or&&(clearTimeout(or),or=null),Lo&&eb()};process.on("exit",xu);process.on("SIGINT",()=>{xu(),process.exit(0)});process.on("SIGTERM",()=>{xu(),process.exit(0)});VT();var KT=()=>{Et.existsSync(Po)||Et.mkdirSync(Po,{recursive:!0})};var tb=()=>{Sn.totalHits++,Au()},Oo=()=>{Sn.totalMisses++,Au()},sb=()=>{Sn.totalSets++,Sn.cacheSize++,Au()};var ar=cr.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights","cache","analysis-cache.json"),ZT=()=>{let e=cr.dirname(ar);Ke.existsSync(e)||Ke.mkdirSync(e,{recursive:!0})},YT=()=>{if(ti())return new Map;try{if(Ke.existsSync(ar)){let e=JSON.parse(Ke.readFileSync(ar,"utf-8")),t=new Map,s=Date.now();for(let[n,r]of e.entries||[])s-r.timestamp>r.ttl||r.schemaVersion===yn&&t.set(n,r);return t}}catch(e){Ls.warn("Could not load cache from disk",{error:e instanceof Error?e.message:String(e)})}return new Map},nb=e=>{if(!ti())try{ZT();let t={entries:Array.from(e.entries()),timestamp:Date.now(),version:"1.0"};Ke.writeFileSync(ar,JSON.stringify(t,null,2),"utf-8")}catch(t){Ls.warn("Could not save cache to disk",{error:t instanceof Error?t.message:String(t)})}},Bo=new Map,ib=()=>cr.join(process.env.HOME||process.env.USERPROFILE||"",".cdk-insights","cache","file-hashes.json"),rb=5e3,Os=null,Mo=!1,JT=()=>{if(Os!==null)return Os;let e=ib();try{if(Ke.existsSync(e)){let t=Ke.readFileSync(e,"utf-8"),s=JSON.parse(t);if(s&&s.version===1&&s.entries)return Os=s,Os}}catch{}return Os={version:1,entries:{}},Os},QT=()=>{if(!Mo||Os===null)return;let e=ib();try{let t=Os,s=Object.keys(t.entries);if(s.length>rb){let r=s.map(o=>[o,t.entries[o].lastAccessedAt]).sort((o,a)=>o[1]-a[1]),i=s.length-rb;for(let o=0;o<i;o++)delete t.entries[r[o][0]]}let n=cr.dirname(e);Ke.existsSync(n)||Ke.mkdirSync(n,{recursive:!0}),Ke.writeFileSync(e,JSON.stringify(t),"utf-8"),Mo=!1}catch{}};process.on("exit",QT);var XT=e=>{let t=Bo.get(e);if(t!==void 0)return t;try{let s=Ke.statSync(e),n=s.mtime.getTime(),r=s.size,i=JT(),o=i.entries[e];if(o&&o.mtime===n&&o.size===r){o.lastAccessedAt=Date.now(),Mo=!0;let l={filePath:e,lastModified:n,hash:o.hash};return Bo.set(e,l),l}let a=Ke.readFileSync(e,"utf-8"),u=Wo.createHash("sha256").update(a).digest("hex"),c={filePath:e,lastModified:n,hash:u};return Bo.set(e,c),i.entries[e]={size:r,mtime:n,hash:u,lastAccessedAt:Date.now()},Mo=!0,c}catch{return Bo.set(e,null),null}};var eP=e=>{let t={};for(let s of e){let n=XT(s);n&&(t[s]=n)}return t},tP=(e,t)=>e?Wo.createHash("sha256").update(`${e}:${t||""}`).digest("hex").slice(0,16):"no-auth",sP=e=>Wo.createHash("sha256").update(JSON.stringify(e)).digest("hex"),wu=(e,t,s,n,r=[])=>{let i=tP(s,n),o=sP(t),a=eP(r);return{resourceId:e,authContext:i,resourceHash:o,fileHashes:a,schemaVersion:yn}},Eu=e=>{let t=Object.entries(e.fileHashes).sort(([s],[n])=>s.localeCompare(n)).map(([s,n])=>`${s}:${n.hash}`).join("|");return`v${e.schemaVersion}:${e.resourceId}:${e.authContext}:${e.resourceHash}:${t}`};var No=class{cache;ttl;maxSize;disabled=!1;constructor(t={}){this.ttl=t.ttl||6*60*60*1e3,this.maxSize=t.maxSize||1e3,this.disabled=t.disabled||!1,this.disabled?this.cache=new Map:this.cache=YT()}setDisabled(t){this.disabled=t,t&&this.cache.clear()}get(t){if(this.disabled){Oo();return}let s=this.cache.get(t);if(!s){Oo();return}if(Date.now()-s.timestamp>s.ttl){this.cache.delete(t),Oo();return}return tb(),s.value}set(t,s,n,r){this.disabled||(this.cache.size>=this.maxSize&&this.evictOldest(),this.cache.set(t,{value:s,timestamp:Date.now(),ttl:r??this.ttl,fileHashes:n.fileHashes,authContext:n.authContext,resourceHash:n.resourceHash,schemaVersion:n.schemaVersion}),sb(),this.cache.size%10===0&&nb(this.cache))}has(t){return this.cache.has(t)}clear(){if(this.cache.clear(),!ti())try{Ke.existsSync(ar)&&Ke.unlinkSync(ar)}catch(t){Ls.warn("Could not clear disk cache",{error:t instanceof Error?t.message:String(t)})}}saveToDisk(){nb(this.cache)}size(){return this.cache.size}evictOldest(){let t,s=Date.now();for(let[n,r]of Array.from(this.cache.entries()))r.timestamp<s&&(s=r.timestamp,t=n);t&&this.cache.delete(t)}getStats(){return{size:this.cache.size,maxSize:this.maxSize,hitRate:0,totalHits:0,totalMisses:0}}getAllCachedResults(){return new Map(this.cache)}getCachedResultsForResources(t){let s=new Map;for(let[n,r]of Array.from(this.cache.entries())){let i=n.split(":")[0];t.includes(i)&&Date.now()-r.timestamp<=r.ttl&&s.set(i,r.value)}return s}hasCachedResult(t){for(let s of Array.from(this.cache.keys()))if(s.split(":")[0]===t)return!0;return!1}};var nP=new Set(["the","a","an","is","are","was","were","be","been","has","have","had","do","does","did","will","would","could","should","may","might","must","shall","can","this","that","these","those","it","its","to","for","of","in","on","at","by","with","from","or","and","not","no","but","if","then","else","when","where","resource","configuration","setting","configured","property","properties","which","lead","leads","leading","means","using","use","used","ensure","consider","also","such","most","more","any","all","some","other","each","every","necessary","unnecessary","recommended","default","specific","current","potential","possible","workloads","workload"]),rP=[["lacks","missing","without","absent","none","defined"],["encryption","encrypted","encrypt"],["configured","configuration","config","settings","setting"],["enabled","enable","active","activated"],["disabled","disable","inactive"],["public","publicly","open"],["access","accessible","accessibility"],["transit","transfer","transmission"],["rest","stored","storage"],["logging","logs","logged","log"],["dlq","dead","letter","queue"],["monitor","monitoring","observability"],["alarm","alarms","alert","alerts"],["unrestricted","permissive","overly"],["egress","outbound"],["ingress","inbound"],["recovery","backup","restore"],["pitr","point"],["function","functions"],["cluster","clusters"],["instance","instances"],["bucket","buckets"],["table","tables"],["domain","domains"],["node","nodes"],["policy","policies"],["rule","rules"],["subnet","subnets"],["high","higher","excessive","elevated"],["allocation","allocated","allocate"],["provisioned","provision"],["scaling","autoscaling","auto"],["restrict","restricted","restriction"],["expose","exposed","exposing","exposure"],["allow","allows","allowing"],["prevent","prevents","preventing"],["memory","ram","2gb","1gb"]],cb=new Map;for(let e of rP){let t=e[0];for(let s of e)cb.set(s,t)}var iP=e=>cb.get(e)||e,ob=e=>{if(!e)return new Set;let t=e.toLowerCase().replace(/[^\w\s]/g," ").replace(/\s+/g," ").trim().split(" ").filter(s=>s.length>2&&!nP.has(s)).map(iP);return new Set(t)},oP=(e,t)=>{if(e.size===0&&t.size===0)return 1;if(e.size===0||t.size===0)return 0;let s=[...e].filter(r=>t.has(r)).length,n=new Set([...e,...t]).size;return n>0?s/n:0},aP=.4,ab=3,Ru=(e,t)=>{let s=ob(e.issue),n=ob(t.issue);return s.size<ab||n.size<ab?!1:oP(s,n)>=aP},Fu=e=>`${e.issue}::${e.severity}::${e.wafPillar}`,bn=e=>{let{existing:t,incoming:s}=e,n=new Set(t.map(Fu)),r=[];for(let i of s){let o=Fu(i);n.has(o)||t.some(c=>Ru(i,c))||r.some(c=>Ru(i,c))||(n.add(o),r.push(i))}return r},Uo=(e,t)=>{let s=new Set,n=[];for(let r of e){let i=Fu(r);s.has(i)||n.some(a=>Ru(r,a))||(s.add(i),n.push(r))}return n};var ub=Z(require("node:crypto")),ur=(e,t)=>{let s=`${e}:${t}`;return ub.createHash("sha256").update(s).digest("hex").slice(0,32)};var lb=e=>t=>{let s={},n={};return Object.entries(t).forEach(([r,i])=>{let o=e(i);s[o]=r,n[o]=i}),{redactedResources:n,mapping:s}};var pb=(e,t,s={})=>{let n=[];return e.forEach(r=>{let i=r.resourceId,o=s[i];if(!o&&i.includes("/")){let u=i.split("/"),c=u[u.length-2],l=Object.entries(t).find(([p,d])=>d.startsWith(c));l&&(o=l[1])}if(!o)return;let a=Object.entries(t).find(([,u])=>u===o)?.[0];if(!a){ue.warn(`\u26A0\uFE0F Unable to find redacted ID for logical resource: ${o}`);return}n.push({...r,resourceId:a})}),n};var db=(e=0)=>t=>`\x1B[${t+e}m`,mb=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,fb=(e=0)=>(t,s,n)=>`\x1B[${38+e};2;${t};${s};${n}m`,We={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},$q=Object.keys(We.modifier),cP=Object.keys(We.color),uP=Object.keys(We.bgColor),Gq=[...cP,...uP];function lP(){let e=new Map;for(let[t,s]of Object.entries(We)){for(let[n,r]of Object.entries(s))We[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},s[n]=We[n],e.set(r[0],r[1]);Object.defineProperty(We,t,{value:s,enumerable:!1})}return Object.defineProperty(We,"codes",{value:e,enumerable:!1}),We.color.close="\x1B[39m",We.bgColor.close="\x1B[49m",We.color.ansi=db(),We.color.ansi256=mb(),We.color.ansi16m=fb(),We.bgColor.ansi=db(10),We.bgColor.ansi256=mb(10),We.bgColor.ansi16m=fb(10),Object.defineProperties(We,{rgbToAnsi256:{value(t,s,n){return t===s&&s===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(t){let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return[0,0,0];let[n]=s;n.length===3&&(n=[...n].map(i=>i+i).join(""));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>We.rgbToAnsi256(...We.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,n,r;if(t>=232)s=((t-232)*10+8)/255,n=s,r=s;else{t-=16;let a=t%36;s=Math.floor(t/36)/5,n=Math.floor(a/6)/5,r=a%6/5}let i=Math.max(s,n,r)*2;if(i===0)return 30;let o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,n)=>We.ansi256ToAnsi(We.rgbToAnsi256(t,s,n)),enumerable:!1},hexToAnsi:{value:t=>We.ansi256ToAnsi(We.hexToAnsi256(t)),enumerable:!1}}),We}var pP=lP(),Yt=pP;var $o=Z(require("node:process"),1),hb=Z(require("node:os"),1),Iu=Z(require("node:tty"),1);function Wt(e,t=globalThis.Deno?globalThis.Deno.args:$o.default.argv){let s=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(s+e),r=t.indexOf("--");return n!==-1&&(r===-1||n<r)}var{env:Ge}=$o.default,jo;Wt("no-color")||Wt("no-colors")||Wt("color=false")||Wt("color=never")?jo=0:(Wt("color")||Wt("colors")||Wt("color=true")||Wt("color=always"))&&(jo=1);function dP(){if("FORCE_COLOR"in Ge)return Ge.FORCE_COLOR==="true"?1:Ge.FORCE_COLOR==="false"?0:Ge.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(Ge.FORCE_COLOR,10),3)}function mP(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fP(e,{streamIsTTY:t,sniffFlags:s=!0}={}){let n=dP();n!==void 0&&(jo=n);let r=s?jo:n;if(r===0)return 0;if(s){if(Wt("color=16m")||Wt("color=full")||Wt("color=truecolor"))return 3;if(Wt("color=256"))return 2}if("TF_BUILD"in Ge&&"AGENT_NAME"in Ge)return 1;if(e&&!t&&r===void 0)return 0;let i=r||0;if(Ge.TERM==="dumb")return i;if($o.default.platform==="win32"){let o=hb.default.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in Ge)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in Ge)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in Ge)||Ge.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in Ge)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ge.TEAMCITY_VERSION)?1:0;if(Ge.COLORTERM==="truecolor"||Ge.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in Ge){let o=Number.parseInt((Ge.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ge.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ge.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ge.TERM)||"COLORTERM"in Ge?1:i}function gb(e,t={}){let s=fP(e,{streamIsTTY:e&&e.isTTY,...t});return mP(s)}var gP={stdout:gb({isTTY:Iu.default.isatty(1)}),stderr:gb({isTTY:Iu.default.isatty(2)})},yb=gP;function Sb(e,t,s){let n=e.indexOf(t);if(n===-1)return e;let r=t.length,i=0,o="";do o+=e.slice(i,n)+t+s,i=n+r,n=e.indexOf(t,i);while(n!==-1);return o+=e.slice(i),o}function bb(e,t,s,n){let r=0,i="";do{let o=e[n-1]==="\r";i+=e.slice(r,o?n-1:n)+t+(o?`\r
|
|
94
94
|
`:`
|
|
95
95
|
`)+s,r=n+1,n=e.indexOf(`
|
|
96
96
|
`,r)}while(n!==-1);return i+=e.slice(r),i}var{stdout:Db,stderr:vb}=yb,ku=Symbol("GENERATOR"),lr=Symbol("STYLER"),ni=Symbol("IS_EMPTY"),Cb=["ansi","ansi","ansi256","ansi16m"],pr=Object.create(null),hP=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let s=Db?Db.level:0;e.level=t.level===void 0?s:t.level};var yP=e=>{let t=(...s)=>s.join(" ");return hP(t,e),Object.setPrototypeOf(t,ri.prototype),t};function ri(e){return yP(e)}Object.setPrototypeOf(ri.prototype,Function.prototype);for(let[e,t]of Object.entries(Yt))pr[e]={get(){let s=Go(this,Pu(t.open,t.close,this[lr]),this[ni]);return Object.defineProperty(this,e,{value:s}),s}};pr.visible={get(){let e=Go(this,this[lr],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Tu=(e,t,s,...n)=>e==="rgb"?t==="ansi16m"?Yt[s].ansi16m(...n):t==="ansi256"?Yt[s].ansi256(Yt.rgbToAnsi256(...n)):Yt[s].ansi(Yt.rgbToAnsi(...n)):e==="hex"?Tu("rgb",t,s,...Yt.hexToRgb(...n)):Yt[s][e](...n),SP=["rgb","hex","ansi256"];for(let e of SP){pr[e]={get(){let{level:s}=this;return function(...n){let r=Pu(Tu(e,Cb[s],"color",...n),Yt.color.close,this[lr]);return Go(this,r,this[ni])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);pr[t]={get(){let{level:s}=this;return function(...n){let r=Pu(Tu(e,Cb[s],"bgColor",...n),Yt.bgColor.close,this[lr]);return Go(this,r,this[ni])}}}}var bP=Object.defineProperties(()=>{},{...pr,level:{enumerable:!0,get(){return this[ku].level},set(e){this[ku].level=e}}}),Pu=(e,t,s)=>{let n,r;return s===void 0?(n=e,r=t):(n=s.openAll+e,r=t+s.closeAll),{open:e,close:t,openAll:n,closeAll:r,parent:s}},Go=(e,t,s)=>{let n=(...r)=>DP(n,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(n,bP),n[ku]=e,n[lr]=t,n[ni]=s,n},DP=(e,t)=>{if(e.level<=0||!t)return e[ni]?"":t;let s=e[lr];if(s===void 0)return t;let{openAll:n,closeAll:r}=s;if(t.includes("\x1B"))for(;s!==void 0;)t=Sb(t,s.close,s.open),s=s.parent;let i=t.indexOf(`
|
|
97
97
|
`);return i!==-1&&(t=bb(t,r,n,i)),n+t+r};Object.defineProperties(ri.prototype,pr);var vP=ri(),Yq=ri({level:vb?vb.level:0});var ge=vP;var ci=Z(require("node:process"),1);var Uu=Z(require("node:process"),1);var ii=Z(require("node:process"),1);var CP=(e,t,s,n)=>{if(s==="length"||s==="prototype"||s==="arguments"||s==="caller")return;let r=Object.getOwnPropertyDescriptor(e,s),i=Object.getOwnPropertyDescriptor(t,s);!AP(r,i)&&n||Object.defineProperty(e,s,i)},AP=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},xP=(e,t)=>{let s=Object.getPrototypeOf(t);s!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,s)},wP=(e,t)=>`/* Wrapped ${e}*/
|
|
98
|
-
${t}`,EP=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),RP=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),FP=(e,t,s)=>{let n=s===""?"":`with ${s.trim()}() `,r=wP.bind(null,n,t.toString());Object.defineProperty(r,"name",RP);let{writable:i,enumerable:o,configurable:a}=EP;Object.defineProperty(e,"toString",{value:r,writable:i,enumerable:o,configurable:a})};function Lu(e,t,{ignoreNonConfigurable:s=!1}={}){let{name:n}=e;for(let r of Reflect.ownKeys(t))CP(e,t,r,s);return xP(e,t),FP(e,t,n),e}var Ho=new WeakMap,Ab=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,n=0,r=e.displayName||e.name||"<anonymous>",i=function(...o){if(Ho.set(i,++n),n===1)s=e.apply(this,o),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return s};return Lu(i,e),Ho.set(i,n),i};Ab.callCount=e=>{if(!Ho.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ho.get(e)};var xb=Ab;var Dn=[];Dn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Dn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Dn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var zo=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",_u=Symbol.for("signal-exit emitter"),Ou=globalThis,IP=Object.defineProperty.bind(Object),Bu=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ou[_u])return Ou[_u];IP(Ou,_u,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,s){this.listeners[t].push(s)}removeListener(t,s){let n=this.listeners[t],r=n.indexOf(s);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(t,s,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let i of this.listeners[t])r=i(s,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",s,n)||r),r}},qo=class{},kP=e=>({onExit(t,s){return e.onExit(t,s)},load(){return e.load()},unload(){return e.unload()}}),Mu=class extends qo{onExit(){return()=>{}}load(){}unload(){}},Nu=class extends qo{#o=Wu.platform==="win32"?"SIGINT":"SIGHUP";#s=new Bu;#e;#r;#d;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let s of Dn)this.#t[s]=()=>{let n=this.#e.listeners(s),{count:r}=this.#s,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let o=this.#s.emit("exit",null,s),a=s==="SIGHUP"?this.#o:s;o||t.kill(t.pid,a)}};this.#d=t.reallyExit,this.#r=t.emit}onExit(t,s){if(!zo(this.#e))return()=>{};this.#i===!1&&this.load();let n=s?.alwaysLast?"afterExit":"exit";return this.#s.on(n,t),()=>{this.#s.removeListener(n,t),this.#s.listeners.exit.length===0&&this.#s.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#s.count+=1;for(let t of Dn)try{let s=this.#t[t];s&&this.#e.on(t,s)}catch{}this.#e.emit=(t,...s)=>this.#m(t,...s),this.#e.reallyExit=t=>this.#n(t)}}unload(){this.#i&&(this.#i=!1,Dn.forEach(t=>{let s=this.#t[t];if(!s)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,s)}catch{}}),this.#e.emit=this.#r,this.#e.reallyExit=this.#d,this.#s.count-=1)}#n(t){return zo(this.#e)?(this.#e.exitCode=t||0,this.#s.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#m(t,...s){let n=this.#r;if(t==="exit"&&zo(this.#e)){typeof s[0]=="number"&&(this.#e.exitCode=s[0]);let r=n.call(this.#e,t,...s);return this.#s.emit("exit",this.#e.exitCode,null),r}else return n.call(this.#e,t,...s)}},Wu=globalThis.process,{onExit:wb,load:n9,unload:r9}=kP(zo(Wu)?new Nu(Wu):new Mu);var Eb=ii.default.stderr.isTTY?ii.default.stderr:ii.default.stdout.isTTY?ii.default.stdout:void 0,TP=Eb?xb(()=>{wb(()=>{Eb.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Rb=TP;var Ko=!1,dr={};dr.show=(e=Uu.default.stderr)=>{e.isTTY&&(Ko=!1,e.write("\x1B[?25h"))};dr.hide=(e=Uu.default.stderr)=>{e.isTTY&&(Rb(),Ko=!0,e.write("\x1B[?25l"))};dr.toggle=(e,t)=>{e!==void 0&&(Ko=e),Ko?dr.show(t):dr.hide(t)};var ju=dr;var ui=Z($u(),1);var Ut=Z(require("node:process"),1);function Gu(){return Ut.default.platform!=="win32"?Ut.default.env.TERM!=="linux":!!Ut.default.env.CI||!!Ut.default.env.WT_SESSION||!!Ut.default.env.TERMINUS_SUBLIME||Ut.default.env.ConEmuTask==="{cmd::Cmder}"||Ut.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ut.default.env.TERM_PROGRAM==="vscode"||Ut.default.env.TERM==="xterm-256color"||Ut.default.env.TERM==="alacritty"||Ut.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var LP={info:ge.blue("\u2139"),success:ge.green("\u2714"),warning:ge.yellow("\u26A0"),error:ge.red("\u2716")},_P={info:ge.blue("i"),success:ge.green("\u221A"),warning:ge.yellow("\u203C"),error:ge.red("\xD7")},OP=Gu()?LP:_P,oi=OP;function Hu({onlyFirst:e=!1}={}){let s=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(s,e?void 0:"g")}var BP=Hu();function ai(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(BP,"")}function Tb(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Pb(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Lb(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function MP(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function _b(e,{ambiguousAsWide:t=!1}={}){return MP(e),Pb(e)||Lb(e)||t&&Tb(e)?2:1}var Mb=Z(Bb(),1),NP=new Intl.Segmenter,WP=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function zu(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:s=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=ai(e)),e.length===0)return 0;let r=0,i={ambiguousAsWide:!s};for(let{segment:o}of NP.segment(e)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!WP.test(o)){if((0,Mb.default)().test(o)){r+=2;continue}r+=_b(a,i)}}return r}function qu({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Ku=Z(require("node:process"),1);function Vu(){let{env:e}=Ku.default,{TERM:t,TERM_PROGRAM:s}=e;return Ku.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||s==="Terminus-Sublime"||s==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Jt=Z(require("node:process"),1),UP=3,Zu=class{#o=0;start(){this.#o++,this.#o===1&&this.#s()}stop(){if(this.#o<=0)throw new Error("`stop` called more times than `start`");this.#o--,this.#o===0&&this.#e()}#s(){Jt.default.platform==="win32"||!Jt.default.stdin.isTTY||(Jt.default.stdin.setRawMode(!0),Jt.default.stdin.on("data",this.#r),Jt.default.stdin.resume())}#e(){Jt.default.stdin.isTTY&&(Jt.default.stdin.off("data",this.#r),Jt.default.stdin.pause(),Jt.default.stdin.setRawMode(!1))}#r(t){t[0]===UP&&Jt.default.emit("SIGINT")}},jP=new Zu,Yu=jP;var $P=Z($u(),1),Ju=class{#o=0;#s=!1;#e=0;#r=-1;#d=0;#t;#i;#n;#m;#g;#u;#l;#p;#h;#a;#c;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:ci.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#g=this.#t.interval,this.#n=this.#t.stream,this.#u=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:qu({stream:this.#n}),this.#l=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,ci.default.env.NODE_ENV==="test"&&(this._stream=this.#n,this._isEnabled=this.#u,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(s){this.#o=s}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#p}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#p=t,this.#f()}get interval(){return this.#g??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#r=-1,this.#g=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!Vu())this.#i=ui.default.line;else if(t===void 0)this.#i=ui.default.dots;else if(t!=="default"&&ui.default[t])this.#i=ui.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#h}set text(t=""){this.#h=t,this.#f()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#f()}get suffixText(){return this.#c}set suffixText(t=""){this.#c=t,this.#f()}get isSpinning(){return this.#m!==void 0}#y(t=this.#a,s=" "){return typeof t=="string"&&t!==""?t+s:typeof t=="function"?t()+s:""}#S(t=this.#c,s=" "){return typeof t=="string"&&t!==""?s+t:typeof t=="function"?s+t():""}#f(){let t=this.#n.columns??80,s=this.#y(this.#a,"-"),n=this.#S(this.#c,"-"),r=" ".repeat(this.#p)+s+"--"+this.#h+"--"+n;this.#e=0;for(let i of ai(r).split(`
|
|
98
|
+
${t}`,EP=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),RP=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),FP=(e,t,s)=>{let n=s===""?"":`with ${s.trim()}() `,r=wP.bind(null,n,t.toString());Object.defineProperty(r,"name",RP);let{writable:i,enumerable:o,configurable:a}=EP;Object.defineProperty(e,"toString",{value:r,writable:i,enumerable:o,configurable:a})};function Lu(e,t,{ignoreNonConfigurable:s=!1}={}){let{name:n}=e;for(let r of Reflect.ownKeys(t))CP(e,t,r,s);return xP(e,t),FP(e,t,n),e}var Ho=new WeakMap,Ab=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,n=0,r=e.displayName||e.name||"<anonymous>",i=function(...o){if(Ho.set(i,++n),n===1)s=e.apply(this,o),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return s};return Lu(i,e),Ho.set(i,n),i};Ab.callCount=e=>{if(!Ho.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Ho.get(e)};var xb=Ab;var Dn=[];Dn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Dn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Dn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var zo=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",_u=Symbol.for("signal-exit emitter"),Ou=globalThis,IP=Object.defineProperty.bind(Object),Bu=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Ou[_u])return Ou[_u];IP(Ou,_u,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,s){this.listeners[t].push(s)}removeListener(t,s){let n=this.listeners[t],r=n.indexOf(s);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(t,s,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let i of this.listeners[t])r=i(s,n)===!0||r;return t==="exit"&&(r=this.emit("afterExit",s,n)||r),r}},qo=class{},kP=e=>({onExit(t,s){return e.onExit(t,s)},load(){return e.load()},unload(){return e.unload()}}),Mu=class extends qo{onExit(){return()=>{}}load(){}unload(){}},Nu=class extends qo{#o=Wu.platform==="win32"?"SIGINT":"SIGHUP";#s=new Bu;#e;#r;#d;#t={};#i=!1;constructor(t){super(),this.#e=t,this.#t={};for(let s of Dn)this.#t[s]=()=>{let n=this.#e.listeners(s),{count:r}=this.#s,i=t;if(typeof i.__signal_exit_emitter__=="object"&&typeof i.__signal_exit_emitter__.count=="number"&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let o=this.#s.emit("exit",null,s),a=s==="SIGHUP"?this.#o:s;o||t.kill(t.pid,a)}};this.#d=t.reallyExit,this.#r=t.emit}onExit(t,s){if(!zo(this.#e))return()=>{};this.#i===!1&&this.load();let n=s?.alwaysLast?"afterExit":"exit";return this.#s.on(n,t),()=>{this.#s.removeListener(n,t),this.#s.listeners.exit.length===0&&this.#s.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#i){this.#i=!0,this.#s.count+=1;for(let t of Dn)try{let s=this.#t[t];s&&this.#e.on(t,s)}catch{}this.#e.emit=(t,...s)=>this.#m(t,...s),this.#e.reallyExit=t=>this.#n(t)}}unload(){this.#i&&(this.#i=!1,Dn.forEach(t=>{let s=this.#t[t];if(!s)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,s)}catch{}}),this.#e.emit=this.#r,this.#e.reallyExit=this.#d,this.#s.count-=1)}#n(t){return zo(this.#e)?(this.#e.exitCode=t||0,this.#s.emit("exit",this.#e.exitCode,null),this.#d.call(this.#e,this.#e.exitCode)):0}#m(t,...s){let n=this.#r;if(t==="exit"&&zo(this.#e)){typeof s[0]=="number"&&(this.#e.exitCode=s[0]);let r=n.call(this.#e,t,...s);return this.#s.emit("exit",this.#e.exitCode,null),r}else return n.call(this.#e,t,...s)}},Wu=globalThis.process,{onExit:wb,load:n9,unload:r9}=kP(zo(Wu)?new Nu(Wu):new Mu);var Eb=ii.default.stderr.isTTY?ii.default.stderr:ii.default.stdout.isTTY?ii.default.stdout:void 0,TP=Eb?xb(()=>{wb(()=>{Eb.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Rb=TP;var Vo=!1,dr={};dr.show=(e=Uu.default.stderr)=>{e.isTTY&&(Vo=!1,e.write("\x1B[?25h"))};dr.hide=(e=Uu.default.stderr)=>{e.isTTY&&(Rb(),Vo=!0,e.write("\x1B[?25l"))};dr.toggle=(e,t)=>{e!==void 0&&(Vo=e),Vo?dr.show(t):dr.hide(t)};var ju=dr;var ui=Z($u(),1);var Ut=Z(require("node:process"),1);function Gu(){return Ut.default.platform!=="win32"?Ut.default.env.TERM!=="linux":!!Ut.default.env.CI||!!Ut.default.env.WT_SESSION||!!Ut.default.env.TERMINUS_SUBLIME||Ut.default.env.ConEmuTask==="{cmd::Cmder}"||Ut.default.env.TERM_PROGRAM==="Terminus-Sublime"||Ut.default.env.TERM_PROGRAM==="vscode"||Ut.default.env.TERM==="xterm-256color"||Ut.default.env.TERM==="alacritty"||Ut.default.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var LP={info:ge.blue("\u2139"),success:ge.green("\u2714"),warning:ge.yellow("\u26A0"),error:ge.red("\u2716")},_P={info:ge.blue("i"),success:ge.green("\u221A"),warning:ge.yellow("\u203C"),error:ge.red("\xD7")},OP=Gu()?LP:_P,oi=OP;function Hu({onlyFirst:e=!1}={}){let s=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(s,e?void 0:"g")}var BP=Hu();function ai(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(BP,"")}function Tb(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Pb(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Lb(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function MP(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function _b(e,{ambiguousAsWide:t=!1}={}){return MP(e),Pb(e)||Lb(e)||t&&Tb(e)?2:1}var Mb=Z(Bb(),1),NP=new Intl.Segmenter,WP=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function zu(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:s=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=ai(e)),e.length===0)return 0;let r=0,i={ambiguousAsWide:!s};for(let{segment:o}of NP.segment(e)){let a=o.codePointAt(0);if(!(a<=31||a>=127&&a<=159)&&!(a>=8203&&a<=8207||a===65279)&&!(a>=768&&a<=879||a>=6832&&a<=6911||a>=7616&&a<=7679||a>=8400&&a<=8447||a>=65056&&a<=65071)&&!(a>=55296&&a<=57343)&&!(a>=65024&&a<=65039)&&!WP.test(o)){if((0,Mb.default)().test(o)){r+=2;continue}r+=_b(a,i)}}return r}function qu({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}var Vu=Z(require("node:process"),1);function Ku(){let{env:e}=Vu.default,{TERM:t,TERM_PROGRAM:s}=e;return Vu.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||s==="Terminus-Sublime"||s==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Jt=Z(require("node:process"),1),UP=3,Zu=class{#o=0;start(){this.#o++,this.#o===1&&this.#s()}stop(){if(this.#o<=0)throw new Error("`stop` called more times than `start`");this.#o--,this.#o===0&&this.#e()}#s(){Jt.default.platform==="win32"||!Jt.default.stdin.isTTY||(Jt.default.stdin.setRawMode(!0),Jt.default.stdin.on("data",this.#r),Jt.default.stdin.resume())}#e(){Jt.default.stdin.isTTY&&(Jt.default.stdin.off("data",this.#r),Jt.default.stdin.pause(),Jt.default.stdin.setRawMode(!1))}#r(t){t[0]===UP&&Jt.default.emit("SIGINT")}},jP=new Zu,Yu=jP;var $P=Z($u(),1),Ju=class{#o=0;#s=!1;#e=0;#r=-1;#d=0;#t;#i;#n;#m;#g;#u;#l;#p;#h;#a;#c;color;constructor(t){typeof t=="string"&&(t={text:t}),this.#t={color:"cyan",stream:ci.default.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#t.color,this.spinner=this.#t.spinner,this.#g=this.#t.interval,this.#n=this.#t.stream,this.#u=typeof this.#t.isEnabled=="boolean"?this.#t.isEnabled:qu({stream:this.#n}),this.#l=typeof this.#t.isSilent=="boolean"?this.#t.isSilent:!1,this.text=this.#t.text,this.prefixText=this.#t.prefixText,this.suffixText=this.#t.suffixText,this.indent=this.#t.indent,ci.default.env.NODE_ENV==="test"&&(this._stream=this.#n,this._isEnabled=this.#u,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(s){this.#o=s}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#r}}),Object.defineProperty(this,"_lineCount",{get(){return this.#e}}))}get indent(){return this.#p}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#p=t,this.#f()}get interval(){return this.#g??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#r=-1,this.#g=void 0,typeof t=="object"){if(t.frames===void 0)throw new Error("The given spinner must have a `frames` property");this.#i=t}else if(!Ku())this.#i=ui.default.line;else if(t===void 0)this.#i=ui.default.dots;else if(t!=="default"&&ui.default[t])this.#i=ui.default[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#h}set text(t=""){this.#h=t,this.#f()}get prefixText(){return this.#a}set prefixText(t=""){this.#a=t,this.#f()}get suffixText(){return this.#c}set suffixText(t=""){this.#c=t,this.#f()}get isSpinning(){return this.#m!==void 0}#y(t=this.#a,s=" "){return typeof t=="string"&&t!==""?t+s:typeof t=="function"?t()+s:""}#S(t=this.#c,s=" "){return typeof t=="string"&&t!==""?s+t:typeof t=="function"?s+t():""}#f(){let t=this.#n.columns??80,s=this.#y(this.#a,"-"),n=this.#S(this.#c,"-"),r=" ".repeat(this.#p)+s+"--"+this.#h+"--"+n;this.#e=0;for(let i of ai(r).split(`
|
|
99
99
|
`))this.#e+=Math.max(1,Math.ceil(zu(i,{countAnsiEscapeCodes:!0})/t))}get isEnabled(){return this.#u&&!this.#l}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#u=t}get isSilent(){return this.#l}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#l=t}frame(){let t=Date.now();(this.#r===-1||t-this.#d>=this.interval)&&(this.#r=++this.#r%this.#i.frames.length,this.#d=t);let{frames:s}=this.#i,n=s[this.#r];this.color&&(n=ge[this.color](n));let r=typeof this.#a=="string"&&this.#a!==""?this.#a+" ":"",i=typeof this.text=="string"?" "+this.text:"",o=typeof this.#c=="string"&&this.#c!==""?" "+this.#c:"";return r+n+i+o}clear(){if(!this.#u||!this.#n.isTTY)return this;this.#n.cursorTo(0);for(let t=0;t<this.#o;t++)t>0&&this.#n.moveCursor(0,-1),this.#n.clearLine(1);return(this.#p||this.lastIndent!==this.#p)&&this.#n.cursorTo(this.#p),this.lastIndent=this.#p,this.#o=0,this}render(){return this.#l?this:(this.clear(),this.#n.write(this.frame()),this.#o=this.#e,this)}start(t){return t&&(this.text=t),this.#l?this:this.#u?this.isSpinning?this:(this.#t.hideCursor&&ju.hide(this.#n),this.#t.discardStdin&&ci.default.stdin.isTTY&&(this.#s=!0,Yu.start()),this.render(),this.#m=setInterval(this.render.bind(this),this.interval),this):(this.text&&this.#n.write(`- ${this.text}
|
|
100
100
|
`),this)}stop(){return this.#u?(clearInterval(this.#m),this.#m=void 0,this.#r=0,this.clear(),this.#t.hideCursor&&ju.show(this.#n),this.#t.discardStdin&&ci.default.stdin.isTTY&&this.#s&&(Yu.stop(),this.#s=!1),this):this}succeed(t){return this.stopAndPersist({symbol:oi.success,text:t})}fail(t){return this.stopAndPersist({symbol:oi.error,text:t})}warn(t){return this.stopAndPersist({symbol:oi.warning,text:t})}info(t){return this.stopAndPersist({symbol:oi.info,text:t})}stopAndPersist(t={}){if(this.#l)return this;let s=t.prefixText??this.#a,n=this.#y(s," "),r=t.symbol??" ",i=t.text??this.text,a=typeof i=="string"?(r?" ":"")+i:"",u=t.suffixText??this.#c,c=this.#S(u," "),l=n+r+a+c+`
|
|
101
101
|
`;return this.stop(),this.#n.write(l),this}};function Zo(e){return new Ju(e)}var Te={text:ge.hex("#E4E4E7"),success:ge.hex("#22C55E"),info:ge.hex("#3B82F6"),warning:ge.hex("#F59E0B"),error:ge.hex("#EF4444"),comment:ge.hex("#71717A"),primary:ge.hex("#8B5CF6"),secondary:ge.hex("#06B6D4"),severity:{critical:ge.hex("#EF4444"),high:ge.hex("#F97316"),medium:ge.hex("#F59E0B"),low:ge.hex("#22C55E"),info:ge.hex("#3B82F6")}},Ze={success:"\u2705",info:"\u2139\uFE0F",warning:"\u26A0\uFE0F",error:"\u274C",loading:"\u23F3",done:"\u{1F389}",analyze:"\u{1F50D}",scan:"\u{1F50E}",stack:"\u{1F4E6}",resource:"\u{1F527}",service:"\u2699\uFE0F",security:"\u{1F512}",performance:"\u26A1",cost:"\u{1F4B0}",phase1:"\u{1F4CB}",phase2:"\u{1F916}",phase3:"\u{1F4CA}",github:"\u{1F419}",issue:"\u{1F4CB}",gist:"\u{1F4C4}",critical:"\u{1F534}",high:"\u{1F7E0}",medium:"\u{1F7E1}",low:"\u{1F7E2}",sparkles:"\u2728",rocket:"\u{1F680}",brain:"\u{1F9E0}",shield:"\u{1F6E1}\uFE0F",lightning:"\u26A1",chart:"\u{1F4CA}",clock:"\u23F1\uFE0F",target:"\u{1F3AF}"},Qu=class e{static instance;static getInstance(){return e.instance||(e.instance=new e),e.instance}async runAnalysis(t){let{title:s,steps:n,showSummary:r=!0}=t;console.log(`
|
|
@@ -119,12 +119,12 @@ ${q.primary.bold(`\u{1F680} ${_}`)}`),e.log(`${q.comment("\u2500".repeat(60))}
|
|
|
119
119
|
${q.primary.bold(`${Ye.chart} Analysis Summary`)}`),e.log(q.comment("\u2500".repeat(40))),e.log(q.text(`Total Resources: ${_.totalResources}`)),e.log(q.text(`Resources with Issues: ${_.resourcesWithIssues} (${_.percentWithIssues}%)`)),e.log(q.text(`Total Issues: ${_.totalIssues}`)),e.log(`
|
|
120
120
|
${q.primary.bold("Severity Breakdown:")}`),e.log(` ${E("CRITICAL")}: ${_.severityCounts.CRITICAL}`),e.log(` ${E("HIGH")}: ${_.severityCounts.HIGH}`),e.log(` ${E("MEDIUM")}: ${_.severityCounts.MEDIUM}`),e.log(` ${E("LOW")}: ${_.severityCounts.LOW}`);let U=Object.entries(_.wafIssues).filter(([,Y])=>Y>0);if(U.length>0){e.log(`
|
|
121
121
|
${q.primary.bold("WAF Pillar Impact:")}`);for(let[Y,ae]of U)e.log(q.text(` ${Y}: ${ae}`))}},githubIssueCreated:_=>{e.log(q.success(`${Ye.github} GitHub issue created successfully!`)),e.log(q.info(` ${_}`))},githubGistCreated:_=>{e.log(q.success(`${Ye.gist} Gist created for detailed report`)),e.log(q.info(` ${_}`))},createProgressBar:(_,U)=>yL(_,U,e),spinner:(_,U)=>{let Y=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],ae=0,W=null,ee=()=>{W&&(clearInterval(W),W=null),e.write(`\r${" ".repeat(_.length+3)}\r`)},te=()=>ee();return process.once("exit",te),process.once("SIGINT",te),process.once("SIGTERM",te),W=setInterval(()=>{e.write(`\r${q.info(Y[ae])} ${_}`),ae=(ae+1)%Y.length},80),U().finally(()=>{process.removeListener("exit",te),process.removeListener("SIGINT",te),process.removeListener("SIGTERM",te),ee()})},divider:()=>e.log(q.comment("\u2500".repeat(60))),newline:()=>e.log(""),clearLine:()=>{e.write(`\r${" ".repeat(e.columns())}\r`)},displayTrialStatus:_=>{if(!_.isTrial)return;let{currentResourcesAnalyzed:U,maxResources:Y,remainingResources:ae,trialExpired:W,trialStart:ee,trialEnd:te,tier:pe}=_,ce=Y>0?U/Y*100:0,Le=q.success,De="\u{1F3AF}",re="Active";W?(Le=q.error,De="\u23F0",re="Expired"):ce>=90?(Le=q.error,De="\u26A0\uFE0F",re="Critical"):ce>=80?(Le=q.warning,De="\u26A1",re="Warning"):ce>=50&&(Le=q.info,De="\u{1F4CA}",re="Good"),e.log(`
|
|
122
|
-
${q.primary.bold("\u{1F381} CDK Insights Trial")}`),e.log(q.comment("\u2500".repeat(50))),e.log(`${De} Status: ${Le.bold(re)}`),pe&&e.log(`\u{1F4E6} Plan: ${q.info.bold(pe.charAt(0).toUpperCase()+pe.slice(1))}`);let G=30,k=Math.max(0,Math.min(100,ce)),J=Math.round(k/100*G),Se=Math.max(0,G-J);if(e.log(`\u{1F4CA} Usage: ${"\u2588".repeat(J)}${"\u2591".repeat(Se)} ${ce.toFixed(1)}%`),e.log(` ${U} / ${Y} AI credits used`),e.log(` ${ae} AI credits remaining`),ee&&te){let
|
|
122
|
+
${q.primary.bold("\u{1F381} CDK Insights Trial")}`),e.log(q.comment("\u2500".repeat(50))),e.log(`${De} Status: ${Le.bold(re)}`),pe&&e.log(`\u{1F4E6} Plan: ${q.info.bold(pe.charAt(0).toUpperCase()+pe.slice(1))}`);let G=30,k=Math.max(0,Math.min(100,ce)),J=Math.round(k/100*G),Se=Math.max(0,G-J);if(e.log(`\u{1F4CA} Usage: ${"\u2588".repeat(J)}${"\u2591".repeat(Se)} ${ce.toFixed(1)}%`),e.log(` ${U} / ${Y} AI credits used`),e.log(` ${ae} AI credits remaining`),ee&&te){let V=Math.floor(e.now()/1e3),he=te-ee,He=V-ee,xe=te-V,mt=he>0?Math.max(0,Math.min(100,He/he*100)):0,It=Math.round(mt/100*G),Ue=Math.max(0,G-It);if(e.log(`\u23F1\uFE0F Trial Period: ${"\u2588".repeat(It)}${"\u2591".repeat(Ue)} ${mt.toFixed(1)}%`),xe>0){let bs=Math.ceil(xe/86400);e.log(` ${bs} day${bs!==1?"s":""} remaining`)}else e.log(" Trial expired")}e.log(`
|
|
123
123
|
${q.comment("\u{1F4A1} Next Steps:")}`),W?(e.log(q.error(" \u274C Trial expired - upgrade to continue")),e.log(q.comment(" \u{1F517} https://cdkinsights.dev/pricing"))):ce>=90?(e.log(q.warning(" \u26A0\uFE0F Usage limit nearly reached")),e.log(q.comment(" \u{1F517} https://cdkinsights.dev/pricing"))):ce>=80?(e.log(q.info(" \u{1F4C8} Consider upgrading for unlimited analysis")),e.log(q.comment(" \u{1F517} https://cdkinsights.dev/pricing"))):e.log(q.success(" \u2705 Continue analyzing your infrastructure")),e.log(`${q.comment("\u2500".repeat(50))}
|
|
124
124
|
`)},displayQuotaWarning:_=>{let{currentResourcesAnalyzed:U,maxResources:Y,requestedResources:ae,isTrial:W}=_;if(!W)return;U+ae>Y&&(e.log(`
|
|
125
125
|
${q.warning.bold("\u26A0\uFE0F AI credit allowance exceeded")}`),e.log(q.comment("\u2500".repeat(40))),e.log(q.warning(` You've used ${U}/${Y} AI credits`)),e.log(q.warning(` This analysis would add ${ae} more`)),e.log(q.warning(` Total would be ${U+ae}/${Y}`)),e.log(`
|
|
126
126
|
${q.info("\u{1F4CB} Falling back to static analysis only")}`),e.log(q.comment("\u{1F4A1} Upgrade to Pro for unlimited AI analysis: https://cdkinsights.dev/pricing")),e.log(`${q.comment("\u2500".repeat(40))}
|
|
127
|
-
`))}}},V=SL();var CD=e=>e&&(e.Name||e.ResourceName||e.FunctionName)||"Unnamed";var pl=null,AD=e=>{pl=e};var dl=()=>{if(pl&&!process.env.CI)try{pl.saveToDisk(),st.info("\u{1F4BE} Cache saved to disk on exit")}catch(e){st.warn("\u26A0\uFE0F Could not save cache on exit",{error:e instanceof Error?e.message:String(e)})}};process.on("exit",dl);process.on("SIGINT",()=>{dl(),process.exit(0)});process.on("SIGTERM",()=>{dl(),process.exit(0)});var bL={maxConcurrent:ei.DEFAULT_MAX_CONCURRENT,retryAttempts:ei.DEFAULT_RETRY_ATTEMPTS,retryDelay:ei.DEFAULT_RETRY_DELAY_MS,timeoutMs:ei.DEFAULT_TIMEOUT_MS},DL=e=>{if(!(e instanceof Error))return!1;let t=e.message??"";return t.startsWith("Polling timed out")||t==="Analysis timeout"||t.toLowerCase().includes("timeout")},Qo=(e,t)=>{let s=e.match(/^(.+?)(\s\([^)]+\))?$/);if(!s)return e;let[,n,r=""]=s;return`${ur(t,n)}${r}`},vL=e=>{let t=$r({ttl:6e4,maxSize:1e3});return({analysisError:s,redactedId:n})=>{let r=s instanceof Error?s.message:"unknown",i=`${n}:${r}`,o=t.get(i)||0;return DL(s)?{status:"timeout",redactedId:n}:(t.set(i,o+1),o>e.retryAttempts?{status:"skipped",redactedId:n}:{status:"fail",redactedId:n,error:s})}},CL=({analyzeResource:e,redactionMapping:t,aggregatedResult:s,errorHandler:n,config:r,authToken:i,fingerprint:o,stackName:a,analysisCache:u,originalResources:c,relationships:l,aiModelId:p})=>async({redactedId:d,redactedResources:m,findingsByResource:f,progressTracker:g})=>{let h=f.get(d)||[],y=m[d];if(!y)return{status:"skipped",redactedId:d};let x=wu(d,y,i,o,[]),v=Eu(x),E=t[d];if(!E)return{status:"skipped",redactedId:d};let O=E,M=()=>(s[O]||(s[O]={issues:[]}),s[O]),P=u.get(v);if(P){let ie=(P.issues||[]).map(_=>({..._,resource:O,resourceId:O})),se=M();return se.issues.push(...bn({existing:se.issues,incoming:ie})),se.resourceName=P.resourceName,{status:"success",redactedId:d,resourceKey:O,remappedIssues:ie,resourceName:P.resourceName}}let X=ur(a,E),B=ur("cdk-insights-stack",a),z=eo(E,l,c),ne={dependencies:z.dependencies.map(ie=>Qo(ie,a)),dependents:z.dependents.map(ie=>Qo(ie,a)),usageDescription:z.usageDescription};for(let ie=1;ie<=r.retryAttempts;ie++)try{let se=await Promise.race([e(B,X,y,y.Type,i,o,h,g,ne,p),new Promise((Y,ae)=>setTimeout(()=>ae(new Error("Analysis timeout")),r.timeoutMs))]);se.resourceId=O;let _=(se.issues||[]).map(Y=>({...Y,resource:O,resourceId:O})),U=M();return U.issues.push(...bn({existing:U.issues,incoming:_})),U.resourceName=se.resourceName,u.set(v,se,x),{status:"success",redactedId:d,resourceKey:O,remappedIssues:_,resourceName:se.resourceName}}catch(se){if(ie===r.retryAttempts)return n({analysisError:se,redactedId:d});await new Promise(_=>setTimeout(_,r.retryDelay*2**(ie-1)))}return{status:"fail",redactedId:d,error:new Error("Max retries exceeded")}},AL=async(e,t,s)=>{let n=Math.max(1,Math.floor(t)),r=0,i=Array.from({length:Math.min(n,e.length)}).map(async()=>{for(;r<e.length;){let o=r;r+=1;let a=e[o];await s(a)}});await Promise.allSettled(i)},xL=10,xD=({analyzeResource:e,analyzeResourcesBatch:t,redactResources:s,config:n=bL})=>async({stackName:r,resources:i,authToken:o,existingFindingsMap:a,pathToLogicalId:u,fingerprint:c,noCache:l=!1,cacheConfig:p,aiModelId:d,aiBatchSize:m})=>{let f={},g=[],h={startTime:Date.now(),processedCount:0,successCount:0,failureCount:0,timeoutCount:0},{redactedResources:y,mapping:b}=s(i),x=pb(a,b,u),v=new Map;for(let W of x){let ee=v.get(W.resourceId);ee?ee.push(W):v.set(W.resourceId,[W])}let E=Object.keys(y),O=E.length,M=Ks(i),P=new No({ttl:p?.ttl||6*60*60*1e3,maxSize:p?.maxSize||5e3,disabled:l||!p?.enabled});AD(P);let X=vL(n),B=CL({analyzeResource:e,redactionMapping:b,aggregatedResult:f,errorHandler:X,config:n,authToken:o,fingerprint:c,stackName:r,analysisCache:P,originalResources:i,relationships:M,aiModelId:d}),z=Yo.createSingleLineProgressTracker(O,"Analyzing resources with AI"),ne=Math.min(Math.max(1,Math.floor(m??1)),xL);if(ne>1&&!!t&&t){st.debug("Batched analysis enabled",{batchSize:ne,totalResources:O});let W=ur("cdk-insights-stack",r),ee=te=>{let pe=eo(te,M,i);return{dependencies:pe.dependencies.map(ce=>Qo(ce,r)),dependents:pe.dependents.map(ce=>Qo(ce,r)),usageDescription:pe.usageDescription}};for(let te=0;te<E.length;te+=ne){let pe=E.slice(te,te+ne),ce=async()=>{for(let re of pe){let G=await B({redactedId:re,redactedResources:y,findingsByResource:v,progressTracker:z});switch(h.processedCount++,G.status){case"success":h.successCount++;break;case"timeout":h.timeoutCount++,g.push({redactedId:re,resourceData:y[re],resourceType:y[re].Type,existingFindings:v.get(re)||[]});break;case"fail":case"skipped":h.failureCount++;break}}},Le=new Map,De=[];for(let re of pe){let G=y[re],k=b[re];if(!G||!k){h.processedCount++,h.failureCount++;continue}let J=wu(re,G,o,c,[]),Se=Eu(J),K=P.get(Se);if(K){let He=(K.issues||[]).map(mt=>({...mt,resource:k,resourceId:k}));f[k]||(f[k]={issues:[]});let xe=f[k];xe.issues.push(...bn({existing:xe.issues,incoming:He})),xe.resourceName=K.resourceName,h.processedCount++,h.successCount++;continue}let he=ur(r,k);Le.set(he,{redactedId:re,originalResourceId:k,cacheKey:Se,cacheComponents:J}),De.push({stableResourceId:he,resourceData:G,resourceType:G.Type,context:ee(k),existingFindings:v.get(re)||[]})}if(De.length!==0)try{let re=await Promise.race([t(W,De,o,c,d),new Promise((G,k)=>setTimeout(()=>k(new Error("Analysis timeout")),n.timeoutMs))]);for(let[G,k]of Le){let J=re.get(G);if(h.processedCount++,!J){st.warn(`Batched response missing entry for resource ${k.originalResourceId}`,{stableResourceId:G,redactedId:k.redactedId}),h.failureCount++;continue}let Se=(J.issues||[]).map(he=>({...he,resource:k.originalResourceId,resourceId:k.originalResourceId}));f[k.originalResourceId]||(f[k.originalResourceId]={issues:[]});let K=f[k.originalResourceId];K.issues.push(...bn({existing:K.issues,incoming:Se})),K.resourceName=J.resourceName,P.set(k.cacheKey,{resourceId:k.originalResourceId,issues:J.issues||[],resourceName:J.resourceName},k.cacheComponents),h.successCount++}}catch(re){st.warn("Batched analysis call failed \u2014 falling back to per-resource for this chunk",{error:re instanceof Error?re.message:String(re),chunkSize:pe.length}),await ce()}}}else await AL(E,n.maxConcurrent,async W=>{st.debug(`Starting analysis for resource ${W}`,{redactedId:W,maxConcurrent:n.maxConcurrent});let ee=await B({redactedId:W,redactedResources:y,findingsByResource:v,progressTracker:z});switch(h.processedCount++,st.debug(`Resource ${W} analysis result: ${ee.status}`,{redactedId:W,status:ee.status,hasProgressTracker:!!z}),ee.status){case"success":h.successCount++,st.debug(`Resource ${W} completed successfully`,{redactedId:W,resourceKey:ee.resourceKey});break;case"timeout":h.timeoutCount++,st.warn(`Resource ${W} timed out`,{redactedId:W}),g.push({redactedId:W,resourceData:y[W],resourceType:y[W].Type,existingFindings:v.get(W)||[]});break;case"fail":case"skipped":h.failureCount++,st.warn(`Resource ${W} failed or was skipped`,{redactedId:W,status:ee.status});break}});let se=Date.now()-h.startTime,_=z.getStats();if(st.debug("Analysis completed with progress tracker stats",{progressTrackerStats:_,performanceMetrics:h,totalTime:se,totalResources:O,maxConcurrent:n.maxConcurrent}),V.analysisComplete(se,h.successCount,h.failureCount,h.timeoutCount),h.failureCount>0||h.timeoutCount>0){V.newline(),V.info("\u{1F4CA} Performance Analysis:");let W=h.successCount>0?Math.round(se/1e3/h.successCount):0;V.comment(` \u23F1\uFE0F Average completion time: ${W}s`),V.comment(` \u{1F4CA} Success rate: ${(h.successCount/O*100).toFixed(1)}%`)}if(g.length>0){V.newline(),V.warning("\u23F0 Timed Out Resources:"),V.comment(` \u{1F4CB} Total timed out: ${g.length}`);for(let W of g){if(V.comment(` \u274C ${W.resourceType}: ${W.redactedId}`),W.resourceData?.Properties){let te=W.resourceData.Properties,pe=CD(te);V.comment(` \u{1F4DD} Name: ${pe}`)}W.existingFindings.length>0&&V.comment(` \u{1F50D} Existing findings: ${W.existingFindings.length}`),W.resourceData?.Metadata&&V.comment(" \u{1F4CD} Has metadata: Yes"),["AWS::CloudFormation::Stack","AWS::Serverless::Application","AWS::ECS::Service"].includes(W.resourceType)&&V.comment(" \u26A0\uFE0F Complex resource type - may require extended analysis time")}V.newline(),V.info("\u{1F4A1} Tip: Some resources are taking longer to analyze than expected."),V.comment(" This is normal for complex resources. The analysis will continue with the remaining resources."),V.warning(`Retrying ${g.length} resource${g.length===1?"":"s"} that need a little more time...`)}let U=new Set(Object.keys(f)),Y=new Set(Object.values(b)),ae=Array.from(Y).filter(W=>!U.has(W)||!f[W]?.issues?.length);if(ae.length>0){let W=P.getCachedResultsForResources(ae),ee=0;for(let[te,pe]of Array.from(W.entries())){if(f[te]?.issues?.length>0)continue;let ce=(pe.issues||[]).map(Le=>({...Le,resource:te,resourceId:te}));ce.length>0&&(f[te]||(f[te]={issues:[]}),f[te].issues.push(...ce),f[te].resourceName=pe.resourceName,ee+=ce.length)}ee>0}return f};var fl=require("node:child_process"),nt=Z(require("node:fs")),gl=Z(require("node:os")),li=Z(require("node:path"));var ED="1.41.2",wL={Security:"https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/",Reliability:"https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/","Performance Efficiency":"https://docs.aws.amazon.com/wellarchitected/latest/performance-efficiency-pillar/","Cost Optimization":"https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/","Operational Excellence":"https://docs.aws.amazon.com/wellarchitected/latest/operational-excellence-pillar/",Sustainability:"https://docs.aws.amazon.com/wellarchitected/latest/sustainability-pillar/"},wD=e=>e.toLowerCase().replace(/[^\w\s-]/g,"").trim().replace(/\s+/g,"-").replace(/-+/g,"-"),EL=(e,t)=>{let s=0;if(s+=2e3,t){let n=Object.values(e).filter(r=>{let i=r.sources.cdkInsights?.issues??[],o=r.sources.cdkNag?.issues??[];return i.length>0||o.length>0});s+=n.length*100}for(let[,n]of Object.entries(e)){let r=n.sources.cdkInsights?.issues??[],i=n.sources.cdkNag?.issues??[];for(let o of[...r,...i])s+=o.issue.length,s+=o.recommendation?.length||0,s+=o.codeSnippet?.length||0,s+=500}return s},RL=e=>e?e.split(`
|
|
127
|
+
`))}}},K=SL();var CD=e=>e&&(e.Name||e.ResourceName||e.FunctionName)||"Unnamed";var pl=null,AD=e=>{pl=e};var dl=()=>{if(pl&&!process.env.CI)try{pl.saveToDisk(),st.info("\u{1F4BE} Cache saved to disk on exit")}catch(e){st.warn("\u26A0\uFE0F Could not save cache on exit",{error:e instanceof Error?e.message:String(e)})}};process.on("exit",dl);process.on("SIGINT",()=>{dl(),process.exit(0)});process.on("SIGTERM",()=>{dl(),process.exit(0)});var bL={maxConcurrent:ei.DEFAULT_MAX_CONCURRENT,retryAttempts:ei.DEFAULT_RETRY_ATTEMPTS,retryDelay:ei.DEFAULT_RETRY_DELAY_MS,timeoutMs:ei.DEFAULT_TIMEOUT_MS},DL=e=>{if(!(e instanceof Error))return!1;let t=e.message??"";return t.startsWith("Polling timed out")||t==="Analysis timeout"||t.toLowerCase().includes("timeout")},Qo=(e,t)=>{let s=e.match(/^(.+?)(\s\([^)]+\))?$/);if(!s)return e;let[,n,r=""]=s;return`${ur(t,n)}${r}`},vL=e=>{let t=$r({ttl:6e4,maxSize:1e3});return({analysisError:s,redactedId:n})=>{let r=s instanceof Error?s.message:"unknown",i=`${n}:${r}`,o=t.get(i)||0;return DL(s)?{status:"timeout",redactedId:n}:(t.set(i,o+1),o>e.retryAttempts?{status:"skipped",redactedId:n}:{status:"fail",redactedId:n,error:s})}},CL=({analyzeResource:e,redactionMapping:t,aggregatedResult:s,errorHandler:n,config:r,authToken:i,fingerprint:o,stackName:a,analysisCache:u,originalResources:c,relationships:l,aiModelId:p})=>async({redactedId:d,redactedResources:m,findingsByResource:f,progressTracker:g})=>{let h=f.get(d)||[],y=m[d];if(!y)return{status:"skipped",redactedId:d};let x=wu(d,y,i,o,[]),v=Eu(x),E=t[d];if(!E)return{status:"skipped",redactedId:d};let O=E,M=()=>(s[O]||(s[O]={issues:[]}),s[O]),P=u.get(v);if(P){let ie=(P.issues||[]).map(_=>({..._,resource:O,resourceId:O})),se=M();return se.issues.push(...bn({existing:se.issues,incoming:ie})),se.resourceName=P.resourceName,{status:"success",redactedId:d,resourceKey:O,remappedIssues:ie,resourceName:P.resourceName}}let X=ur(a,E),B=ur("cdk-insights-stack",a),z=eo(E,l,c),ne={dependencies:z.dependencies.map(ie=>Qo(ie,a)),dependents:z.dependents.map(ie=>Qo(ie,a)),usageDescription:z.usageDescription};for(let ie=1;ie<=r.retryAttempts;ie++)try{let se=await Promise.race([e(B,X,y,y.Type,i,o,h,g,ne,p),new Promise((Y,ae)=>setTimeout(()=>ae(new Error("Analysis timeout")),r.timeoutMs))]);se.resourceId=O;let _=(se.issues||[]).map(Y=>({...Y,resource:O,resourceId:O})),U=M();return U.issues.push(...bn({existing:U.issues,incoming:_})),U.resourceName=se.resourceName,u.set(v,se,x),{status:"success",redactedId:d,resourceKey:O,remappedIssues:_,resourceName:se.resourceName}}catch(se){if(ie===r.retryAttempts)return n({analysisError:se,redactedId:d});await new Promise(_=>setTimeout(_,r.retryDelay*2**(ie-1)))}return{status:"fail",redactedId:d,error:new Error("Max retries exceeded")}},AL=async(e,t,s)=>{let n=Math.max(1,Math.floor(t)),r=0,i=Array.from({length:Math.min(n,e.length)}).map(async()=>{for(;r<e.length;){let o=r;r+=1;let a=e[o];await s(a)}});await Promise.allSettled(i)},xL=10,xD=({analyzeResource:e,analyzeResourcesBatch:t,redactResources:s,config:n=bL})=>async({stackName:r,resources:i,authToken:o,existingFindingsMap:a,pathToLogicalId:u,fingerprint:c,noCache:l=!1,cacheConfig:p,aiModelId:d,aiBatchSize:m})=>{let f={},g=[],h={startTime:Date.now(),processedCount:0,successCount:0,failureCount:0,timeoutCount:0},{redactedResources:y,mapping:b}=s(i),x=pb(a,b,u),v=new Map;for(let W of x){let ee=v.get(W.resourceId);ee?ee.push(W):v.set(W.resourceId,[W])}let E=Object.keys(y),O=E.length,M=Vs(i),P=new No({ttl:p?.ttl||6*60*60*1e3,maxSize:p?.maxSize||5e3,disabled:l||!p?.enabled});AD(P);let X=vL(n),B=CL({analyzeResource:e,redactionMapping:b,aggregatedResult:f,errorHandler:X,config:n,authToken:o,fingerprint:c,stackName:r,analysisCache:P,originalResources:i,relationships:M,aiModelId:d}),z=Yo.createSingleLineProgressTracker(O,"Analyzing resources with AI"),ne=Math.min(Math.max(1,Math.floor(m??1)),xL);if(ne>1&&!!t&&t){st.debug("Batched analysis enabled",{batchSize:ne,totalResources:O});let W=ur("cdk-insights-stack",r),ee=te=>{let pe=eo(te,M,i);return{dependencies:pe.dependencies.map(ce=>Qo(ce,r)),dependents:pe.dependents.map(ce=>Qo(ce,r)),usageDescription:pe.usageDescription}};for(let te=0;te<E.length;te+=ne){let pe=E.slice(te,te+ne),ce=async()=>{for(let re of pe){let G=await B({redactedId:re,redactedResources:y,findingsByResource:v,progressTracker:z});switch(h.processedCount++,G.status){case"success":h.successCount++;break;case"timeout":h.timeoutCount++,g.push({redactedId:re,resourceData:y[re],resourceType:y[re].Type,existingFindings:v.get(re)||[]});break;case"fail":case"skipped":h.failureCount++;break}}},Le=new Map,De=[];for(let re of pe){let G=y[re],k=b[re];if(!G||!k){h.processedCount++,h.failureCount++;continue}let J=wu(re,G,o,c,[]),Se=Eu(J),V=P.get(Se);if(V){let He=(V.issues||[]).map(mt=>({...mt,resource:k,resourceId:k}));f[k]||(f[k]={issues:[]});let xe=f[k];xe.issues.push(...bn({existing:xe.issues,incoming:He})),xe.resourceName=V.resourceName,h.processedCount++,h.successCount++;continue}let he=ur(r,k);Le.set(he,{redactedId:re,originalResourceId:k,cacheKey:Se,cacheComponents:J}),De.push({stableResourceId:he,resourceData:G,resourceType:G.Type,context:ee(k),existingFindings:v.get(re)||[]})}if(De.length!==0)try{let re=await Promise.race([t(W,De,o,c,d),new Promise((G,k)=>setTimeout(()=>k(new Error("Analysis timeout")),n.timeoutMs))]);for(let[G,k]of Le){let J=re.get(G);if(h.processedCount++,!J){st.warn(`Batched response missing entry for resource ${k.originalResourceId}`,{stableResourceId:G,redactedId:k.redactedId}),h.failureCount++;continue}let Se=(J.issues||[]).map(he=>({...he,resource:k.originalResourceId,resourceId:k.originalResourceId}));f[k.originalResourceId]||(f[k.originalResourceId]={issues:[]});let V=f[k.originalResourceId];V.issues.push(...bn({existing:V.issues,incoming:Se})),V.resourceName=J.resourceName,P.set(k.cacheKey,{resourceId:k.originalResourceId,issues:J.issues||[],resourceName:J.resourceName},k.cacheComponents),h.successCount++}}catch(re){st.warn("Batched analysis call failed \u2014 falling back to per-resource for this chunk",{error:re instanceof Error?re.message:String(re),chunkSize:pe.length}),await ce()}}}else await AL(E,n.maxConcurrent,async W=>{st.debug(`Starting analysis for resource ${W}`,{redactedId:W,maxConcurrent:n.maxConcurrent});let ee=await B({redactedId:W,redactedResources:y,findingsByResource:v,progressTracker:z});switch(h.processedCount++,st.debug(`Resource ${W} analysis result: ${ee.status}`,{redactedId:W,status:ee.status,hasProgressTracker:!!z}),ee.status){case"success":h.successCount++,st.debug(`Resource ${W} completed successfully`,{redactedId:W,resourceKey:ee.resourceKey});break;case"timeout":h.timeoutCount++,st.warn(`Resource ${W} timed out`,{redactedId:W}),g.push({redactedId:W,resourceData:y[W],resourceType:y[W].Type,existingFindings:v.get(W)||[]});break;case"fail":case"skipped":h.failureCount++,st.warn(`Resource ${W} failed or was skipped`,{redactedId:W,status:ee.status});break}});let se=Date.now()-h.startTime,_=z.getStats();if(st.debug("Analysis completed with progress tracker stats",{progressTrackerStats:_,performanceMetrics:h,totalTime:se,totalResources:O,maxConcurrent:n.maxConcurrent}),K.analysisComplete(se,h.successCount,h.failureCount,h.timeoutCount),h.failureCount>0||h.timeoutCount>0){K.newline(),K.info("\u{1F4CA} Performance Analysis:");let W=h.successCount>0?Math.round(se/1e3/h.successCount):0;K.comment(` \u23F1\uFE0F Average completion time: ${W}s`),K.comment(` \u{1F4CA} Success rate: ${(h.successCount/O*100).toFixed(1)}%`)}if(g.length>0){K.newline(),K.warning("\u23F0 Timed Out Resources:"),K.comment(` \u{1F4CB} Total timed out: ${g.length}`);for(let W of g){if(K.comment(` \u274C ${W.resourceType}: ${W.redactedId}`),W.resourceData?.Properties){let te=W.resourceData.Properties,pe=CD(te);K.comment(` \u{1F4DD} Name: ${pe}`)}W.existingFindings.length>0&&K.comment(` \u{1F50D} Existing findings: ${W.existingFindings.length}`),W.resourceData?.Metadata&&K.comment(" \u{1F4CD} Has metadata: Yes"),["AWS::CloudFormation::Stack","AWS::Serverless::Application","AWS::ECS::Service"].includes(W.resourceType)&&K.comment(" \u26A0\uFE0F Complex resource type - may require extended analysis time")}K.newline(),K.info("\u{1F4A1} Tip: Some resources are taking longer to analyze than expected."),K.comment(" This is normal for complex resources. The analysis will continue with the remaining resources."),K.warning(`Retrying ${g.length} resource${g.length===1?"":"s"} that need a little more time...`)}let U=new Set(Object.keys(f)),Y=new Set(Object.values(b)),ae=Array.from(Y).filter(W=>!U.has(W)||!f[W]?.issues?.length);if(ae.length>0){let W=P.getCachedResultsForResources(ae),ee=0;for(let[te,pe]of Array.from(W.entries())){if(f[te]?.issues?.length>0)continue;let ce=(pe.issues||[]).map(Le=>({...Le,resource:te,resourceId:te}));ce.length>0&&(f[te]||(f[te]={issues:[]}),f[te].issues.push(...ce),f[te].resourceName=pe.resourceName,ee+=ce.length)}ee>0}return f};var fl=require("node:child_process"),nt=Z(require("node:fs")),gl=Z(require("node:os")),li=Z(require("node:path"));var ED="1.41.4",wL={Security:"https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/",Reliability:"https://docs.aws.amazon.com/wellarchitected/latest/reliability-pillar/","Performance Efficiency":"https://docs.aws.amazon.com/wellarchitected/latest/performance-efficiency-pillar/","Cost Optimization":"https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/","Operational Excellence":"https://docs.aws.amazon.com/wellarchitected/latest/operational-excellence-pillar/",Sustainability:"https://docs.aws.amazon.com/wellarchitected/latest/sustainability-pillar/"},wD=e=>e.toLowerCase().replace(/[^\w\s-]/g,"").trim().replace(/\s+/g,"-").replace(/-+/g,"-"),EL=(e,t)=>{let s=0;if(s+=2e3,t){let n=Object.values(e).filter(r=>{let i=r.sources.cdkInsights?.issues??[],o=r.sources.cdkNag?.issues??[];return i.length>0||o.length>0});s+=n.length*100}for(let[,n]of Object.entries(e)){let r=n.sources.cdkInsights?.issues??[],i=n.sources.cdkNag?.issues??[];for(let o of[...r,...i])s+=o.issue.length,s+=o.recommendation?.length||0,s+=o.codeSnippet?.length||0,s+=500}return s},RL=e=>e?e.split(`
|
|
128
128
|
`).map(t=>t.trim()).filter(Boolean).join(`
|
|
129
129
|
`):"",ml=e=>{let t=`- **Issue:** ${e.issue}`;return e.recommendation&&(t+=`
|
|
130
130
|
- **Recommendation:** ${RL(e.recommendation)}`),e.context&&(e.context.property&&(t+=`
|
|
@@ -204,16 +204,16 @@ ${z}
|
|
|
204
204
|
`);let X=(f.sources.validationReport?.issues??[]).slice();if(X.length){o.push(`**Validation Report Issues:**
|
|
205
205
|
`);let B=X.sort((z,ne)=>fr[z.severity]-fr[ne.severity]);for(let z of B){let ne=z.validationPluginName??"validation report";o.push(`### ${mr(z.severity)} ${z.severity} Severity from ${ne} ${mr(z.severity)}
|
|
206
206
|
`),o.push(ml(z)),o.push("")}}}return o.join(`
|
|
207
|
-
`)};var ID=require("node:child_process");var TL=e=>/^[a-zA-Z0-9_.-]+$/.test(e),kD=(e="origin")=>{try{if(!TL(e))return Ro.error(`Invalid remote name: ${e}`),null;let s=(0,ID.execFileSync)("git",["remote","get-url",e],{encoding:"utf-8"}).trim().match(/(?:git@[^:]+:|https?:\/\/[^/]+\/)([^/]+)\/(.+?)(?:\.git)?$/);if(!s)return Ro.error("\u274C Could not determine GitHub repository. Make sure you are in a git repository with a GitHub remote."),null;let[,n,r]=s;return{owner:n,repo:r}}catch(t){return Ro.error(`Failed to get GitHub remote '${e}'`,{error:t instanceof Error?t.message:String(t)}),null}};var PL=8e3,PD=async({stackName:e,issueTitle:t,issueBody:s,ghCli:n,recommendations:r,summary:i})=>{let o=s,a=process.env.GITHUB_TOKEN,u=kD();if(!u){
|
|
207
|
+
`)};var ID=require("node:child_process");var TL=e=>/^[a-zA-Z0-9_.-]+$/.test(e),kD=(e="origin")=>{try{if(!TL(e))return Ro.error(`Invalid remote name: ${e}`),null;let s=(0,ID.execFileSync)("git",["remote","get-url",e],{encoding:"utf-8"}).trim().match(/(?:git@[^:]+:|https?:\/\/[^/]+\/)([^/]+)\/(.+?)(?:\.git)?$/);if(!s)return Ro.error("\u274C Could not determine GitHub repository. Make sure you are in a git repository with a GitHub remote."),null;let[,n,r]=s;return{owner:n,repo:r}}catch(t){return Ro.error(`Failed to get GitHub remote '${e}'`,{error:t instanceof Error?t.message:String(t)}),null}};var PL=8e3,PD=async({stackName:e,issueTitle:t,issueBody:s,ghCli:n,recommendations:r,summary:i})=>{let o=s,a=process.env.GITHUB_TOKEN,u=kD();if(!u){K.error("Could not determine GitHub repository. Make sure you are in a git repository with a GitHub remote.");return}if(o.length>65536){K.warning("Report too long; creating gist for full content and using summary for issue body\u2026");let c,l=r&&i?gr(e,r,i,!0,{},!0):s;if(a){let p={description:`Full CDK Insights report for stack ${e}`,public:!1,files:{"cdk-insights-report.md":{content:l}}};c=(await Lt.post("https://api.github.com/gists",p,{headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json"}})).data.html_url}else if(n){let p,d;try{p=nt.mkdtempSync(li.join(gl.tmpdir(),"cdk-insights-gist-")),d=li.join(p,"cdk-insights-report.md"),nt.writeFileSync(d,l);let m=`Full CDK Insights report for stack ${e}`;c=(0,fl.execFileSync)("gh",["gist","create","--desc",m,"--",d],{encoding:"utf-8"}).trim()}catch(m){K.warning(`Failed to create gist: ${m instanceof Error?m.message:String(m)}`)}finally{if(d&&nt.existsSync(d))try{nt.unlinkSync(d)}catch{}if(p&&nt.existsSync(p))try{nt.rmdirSync(p)}catch{}}}c&&(K.githubGistCreated(c),r&&i?o=RD(e,i,c):o=`${s.split(`
|
|
208
208
|
---
|
|
209
209
|
`)[0]}
|
|
210
210
|
|
|
211
|
-
\u26A0\uFE0F Full report available at ${c}`)}if(a){let c={title:t,body:o};await Lt.post(`https://api.github.com/repos/${u.owner}/${u.repo}/issues`,c,{headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json"}}),
|
|
212
|
-
${a}`),
|
|
213
|
-
Issue body has been saved to: cdk-insights-issue-body.md`);try{nt.writeFileSync("cdk-insights-issue-body.md",s)}catch(u){
|
|
211
|
+
\u26A0\uFE0F Full report available at ${c}`)}if(a){let c={title:t,body:o};await Lt.post(`https://api.github.com/repos/${u.owner}/${u.repo}/issues`,c,{headers:{Authorization:`Bearer ${a}`,Accept:"application/vnd.github+json"}}),K.githubIssueCreated(`https://github.com/${u.owner}/${u.repo}/issues`)}else if(n){let c,l;try{c=nt.mkdtempSync(li.join(gl.tmpdir(),"cdk-insights-")),l=li.join(c,"issue-body.md"),nt.writeFileSync(l,o);let d=(0,fl.execFileSync)("gh",["issue","create","--title",t,"--body-file",l],{encoding:"utf-8"}).trim().match(/https:\/\/github\.com\/[^\s]+/),m=d?d[0]:`https://github.com/${u.owner}/${u.repo}/issues`;K.githubIssueCreated(m)}catch(p){K.warning("GitHub CLI failed. You may need to authenticate with `gh auth login`"),K.warning(`Error: ${p instanceof Error?p.message:"Unknown error"}`),K.warning("Falling back to web interface..."),TD(u,t,o)}finally{if(l&&nt.existsSync(l))try{nt.unlinkSync(l)}catch{}if(c&&nt.existsSync(c))try{nt.rmdirSync(c)}catch{}}}else TD(u,t,o)},TD=(e,t,s)=>{let n=`https://github.com/${e.owner}/${e.repo}/issues/new`,r=encodeURIComponent(t),i=encodeURIComponent(s),o=`${n}?title=${r}&body=${i}`;if(o.length>PL){K.warning(`Issue body is too long for URL (${o.length} chars). The content may be truncated in the browser.`),K.comment("Consider setting GITHUB_TOKEN environment variable or installing GitHub CLI (gh) for full support.");let a=`${n}?title=${r}`;K.info(`Please open this URL and paste the issue body manually:
|
|
212
|
+
${a}`),K.info(`
|
|
213
|
+
Issue body has been saved to: cdk-insights-issue-body.md`);try{nt.writeFileSync("cdk-insights-issue-body.md",s)}catch(u){K.warning(`Failed to save issue body to file: ${u instanceof Error?u.message:String(u)}`)}}else K.info(`Please open this URL to create the issue:
|
|
214
214
|
${o}`)};var LD=require("node:child_process"),_D=()=>{try{return(0,LD.execFileSync)("gh",["--version"],{stdio:"ignore"}),!0}catch{return!1}};var BD=Z(require("node:crypto"));var LL=[/^AWS::/,/^arn:aws[a-z-]*:/,/^\[REDACTED\]$/,/^(true|false|enabled|disabled)$/i,/^(us|eu|ap|sa|ca|me|af)-(north|south|east|west|central)-\d$/,/^https:\/\/[a-z0-9-]+\.(amazonaws\.com|aws\.amazon\.com)/],_L=new Set(["Ref","Fn::GetAtt","Fn::Sub","Fn::Join","Fn::Select","Fn::Split","Fn::If","Fn::Equals","Fn::And","Fn::Or","Fn::Not","Fn::Condition","Fn::Base64","Fn::Cidr","Fn::FindInMap","Fn::GetAZs","Fn::ImportValue","Fn::Transform","Condition"]),OL=new Set(["SSEAlgorithm","Algorithm","KeySpec","CustomerMasterKeySpec","Protocol","Scheme","HttpMethod","AuthorizationType","Type","SslPolicy","SecurityPolicy","MinimumProtocolVersion","Runtime","Engine","EngineVersion","Handler","PackageType","Effect","Action","Principal","Resource","Condition","LogLevel","MetricsLevel","Status","State","Enabled","IpProtocol","CidrIp","CidrIpv6","FromPort","ToPort","Version","SchemaVersion"]),BL=e=>LL.some(t=>t.test(e)),ML=e=>{if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.keys(e);return t.length===1&&_L.has(t[0])},Xo=(e,t,s=0)=>{if(s>50)return"[DEEP_NESTED]";if(e==null||typeof e=="boolean"||typeof e=="number")return e;if(typeof e=="string")return e===""?"":t&&OL.has(t)||BL(e)?e:e.length>100?"[REDACTED_LONG_STRING]":"[REDACTED]";if(Array.isArray(e))return e.map(n=>Xo(n,void 0,s+1));if(typeof e=="object"){if(ML(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=Xo(i,r,s+1);return n}return"[REDACTED]"},pi=e=>{let t={Type:e.Type};return e.Properties&&(t.Properties=Xo(e.Properties,void 0,0)),e.Metadata&&(t.Metadata=Xo(e.Metadata,void 0,0)),e.DependsOn&&(t.DependsOn=e.DependsOn),e.Condition&&(t.Condition=e.Condition),e.DeletionPolicy&&(t.DeletionPolicy=e.DeletionPolicy),e.UpdateReplacePolicy&&(t.UpdateReplacePolicy=e.UpdateReplacePolicy),t};var NL=e=>{let t=JSON.stringify(e,Object.keys(e).sort());return BD.createHash("sha256").update(t).digest("hex").slice(0,32)},OD=(e,t)=>({Authorization:`Bearer ${e}`,"Content-Type":"application/json","x-cdk-insights-fingerprint":t,"x-cdk-insights-client":"cli","x-cdk-insights-prompt-schema":yn}),MD=(e,t)=>async(s,n,r,i,o,a,u,c,l,p)=>{let g=M=>new Promise(P=>setTimeout(P,M)),h,y=Date.now(),b=async()=>{let M=pi(r),P=NL(M),X={stackName:s,resourceId:n,resource:M,resourceType:i,resourceContentHash:P};l&&(X.context=l),p&&(X.modelId=p);let{data:B}=await e.post(`${t}/analyze`,X,{headers:OD(o,a)});if(!B?.jobId)throw new Error(`No jobId returned from analysis API for resource ${n}`);return B.jobId};try{h=await b(),c&&c.startJob(h,n),ye.info(`Started analysis job ${h} for resource ${n} (${i})`)}catch(M){let{message:P}=M,X=Lt.isAxiosError(M)&&M.response?.status===403;throw ue.error(`Failed to start analysis for resource ${n}:`,{error:M}),X?new Error(`Authentication failed (403) for resource ${n}. Your auth token may be invalid or expired. Try running 'npx cdk-insights clear-cache' to refresh your authentication.`):new Error(`Failed to start analysis for resource ${n}: ${P||M}`)}let x=1e3,v=0,E=Date.now();for(let M=1;M<=30;M++){try{let P=Date.now()-y;ye.info(`Polling job ${h} for resource ${n} on attempt ${M}/30 (interval: ${x}ms, total elapsed: ${P}ms)`),c&&c.updateJobStatus(h,n,"polling",M);let X=await e.get(`${t}/analyze/${h}`,{headers:OD(o,a)});ye.info(`API Response for job ${h}: status=${X.data.status}, hasResult=${!!X.data.result}, resultType=${typeof X.data.result}`);let{status:B,result:z,error:ne}=X.data;if(B==="completed"){if(!z)throw ye.error(`Job ${h} completed without result payload. Raw response: ${JSON.stringify(X.data)}`),new Error(`Job ${h} completed without result payload`);c&&c.completeJob(h,n);let se=Date.now()-E,_=Date.now()-y;return ye.info(`Job ${h} completed successfully in ${se}ms (attempt ${M}, total time: ${_}ms)`),z}if(B==="failed"){c&&c.failJob(h,n,"Job failed");let se=Date.now()-y,_=ne||"Unknown error";throw ye.error(`Job ${h} failed after ${se}ms (attempt ${M}): ${_}`),new Error(`Analysis job ${h} failed for resource ${n}: ${_}`)}let ie=Date.now()-E;if(ie>5e3){let se=Math.min(x*1.5,3e3),_=Math.random()*500;x=Math.min(se+_,3e3),v=0,ye.info(`Job ${h} running for ${ie}ms, using exponential backoff: ${Math.round(x)}ms`)}else v===0&&(x=1e3);E=Date.now()}catch(P){if(v++,P instanceof Error){if(P.message.startsWith(`Analysis job ${h}`))throw P;ue.error(`Error polling job ${h} for resource ${n} on attempt ${M}:`,{error:P.message})}else if(typeof P=="object"&&P!==null&&"response"in P){let X=P;X.response?.status===404?x=Math.min(x*1.2,3e3):(ue.error(`Error polling job ${h} for resource ${n} on attempt ${M}:`,{error:X}),x=Math.min(x*1.5,3e3))}else ue.error(`Unknown error polling job ${h} for resource ${n} on attempt ${M}:`,{error:P}),x=Math.min(x*1.5,3e3)}await g(x)}c&&c.timeoutJob(h,n);let O=Date.now()-y;throw ye.error(`Job ${h} timed out after ${O}ms (30 attempts, max interval: 3000ms)`),new Error(`Polling timed out after 30 attempts for job ${h} (resource ${n}) - total time: ${O}ms`)};var WD=Z(require("node:crypto"));var ND=(e,t)=>({Authorization:`Bearer ${e}`,"Content-Type":"application/json","x-cdk-insights-fingerprint":t,"x-cdk-insights-client":"cli","x-cdk-insights-prompt-schema":yn}),WL=e=>WD.createHash("sha256").update(JSON.stringify(e,Object.keys(e).sort())).digest("hex").slice(0,32),UD=(e,t)=>async(s,n,r,i,o)=>{if(n.length===0)return new Map;let a=30,u=1e3,c=3e3,l=g=>new Promise(h=>setTimeout(h,g)),p={stackName:s,resources:n.map(g=>{let h=pi(g.resourceData);return{resourceId:g.stableResourceId,resource:h,resourceType:g.resourceType,resourceContentHash:WL(h),...g.context?{context:g.context}:{},...g.existingFindings?{existingFindings:g.existingFindings}:{}}})};o&&(p.modelId=o);let d;try{let{data:g}=await e.post(`${t}/analyze/batch`,p,{headers:ND(r,i)});if(!g?.jobId)throw new Error("No jobId returned from batch analyze API");d=g.jobId}catch(g){throw Lt.isAxiosError(g)&&g.response?.status===403?new Error("Authentication failed (403) on batch analyze. Your auth token may be invalid or expired. Try running 'npx cdk-insights clear-cache' to refresh authentication."):g}ye.info(`Started batch analysis job ${d} (size=${n.length})`);let m=u,f=Date.now();for(let g=1;g<=a;g++){try{let h=await e.get(`${t}/analyze/${d}`,{headers:ND(r,i)}),{status:y,result:b,error:x}=h.data;if(y==="completed"){if(!b)throw new Error(`Batch job ${d} completed without result payload`);let v=typeof b=="string"?JSON.parse(b):b;if(!v.results)return ye.warn(`Batch job ${d} returned without a results map`,{rawShape:typeof v}),new Map;let E=new Map;for(let[O,M]of Object.entries(v.results))E.set(O,{resourceId:O,resourceName:M.resourceName,issues:M.issues??[],cacheHit:M.cacheHit??!1});return ye.info(`Batch job ${d} completed in ${Date.now()-f}ms (${E.size}/${n.length} resources returned)`),E}if(y==="failed")throw new Error(`Batch analysis job ${d} failed: ${x||"Unknown error"}`)}catch(h){if(h instanceof Error&&h.message.startsWith("Batch analysis job"))throw h;typeof h=="object"&&h!==null&&"response"in h&&h.response?.status===404?m=Math.min(m*1.2,c):(ue.error(`Error polling batch job ${d} (attempt ${g})`,{error:h instanceof Error?h.message:String(h)}),m=Math.min(m*1.5,c))}if(Date.now()-f>5e3){let h=Math.random()*500;m=Math.min(m*1.5+h,c)}await l(m)}throw new Error(`Batch analysis polling timed out after ${a} attempts for job ${d}`)};var jD="cdk-insights";var UL=e=>{let t=(e??"").toUpperCase();return t==="CRITICAL"||t==="HIGH"||t==="MEDIUM"||t==="LOW"?t:t==="ERROR"?"HIGH":t==="WARNING"||t==="WARN"?"MEDIUM":t==="INFO"||t==="INFORMATION"?"LOW":"MEDIUM"},jL=(e,t)=>{let{templatePath:s,constructPath:n}=t.resource;return!!(s&&(s.endsWith(`/${e}.template.json`)||s.endsWith(`\\${e}.template.json`)||s===`${e}.template.json`)||n&&(n===e||n.startsWith(`${e}/`)))},$L=(e,t,s)=>{let n=e[t];if(n)return n;let r=s(t);return e[t]=r,r},GL=(e,t)=>{if(t.resourceLogicalId&&e[t.resourceLogicalId])return t.resourceLogicalId;if(t.constructPath)for(let[s,n]of Object.entries(e)){let r=n.cdkPath;if(r&&(r===t.constructPath||r.startsWith(`${t.constructPath}/`)))return s}},$D=({stackName:e,validationReportFindings:t,recommendationMap:s,createIssueGroup:n})=>{for(let r of t){if(!jL(e,r))continue;let{pluginName:i,ruleName:o,description:a,fix:u,resource:c,ruleMetadata:l}=r;if(i===jD){let f=c.resourceLogicalId,h=(f?s[f]:void 0)?.sources?.cdkInsights?.issues.filter(y=>y.ruleId===o&&(y.constructPath===c.constructPath||y.resourceId===c.resourceLogicalId));if(h&&h.length>0)for(let y of h)y.seenInSynth=!0;continue}let p=GL(s,c)??c.resourceLogicalId??c.constructPath?.split("/").pop()??"unknown",d=$L(s,p,n);d.sources.validationReport||(d.sources.validationReport={issues:[]});let m={resourceId:p,issue:a,severity:UL(r.severity),wafPillar:"Security",foundBy:"validationReport",validationPluginName:i,ruleId:o,...u?{recommendation:u}:{},...c.constructPath?{constructPath:c.constructPath}:{},...l&&Object.keys(l).length>0?{context:{property:JSON.stringify(l)}}:{}};d.sources.validationReport.issues.push(m)}};var GD=require("node:crypto"),hl=(e,t,s)=>{let n=e||"_",r=t.cdkPath||t.resourceId||"_";if(s.ruleId)return`${n}::${r}::${s.ruleId}`;let i=(s.issue||"").replace(/\s+/g," ").trim().toLowerCase(),o=(0,GD.createHash)("sha256").update(i).digest("hex").slice(0,12);return`${n}::${r}::issue:${o}`},HD=function*(e,t){for(let s of Object.values(t)){let n=[...s.sources?.cdkInsights?.issues??[],...s.sources?.cdkNag?.issues??[]];for(let r of n)yield{fingerprint:hl(e,s,r),group:s,issue:r}}};var yl=(e,t)=>e.filter(s=>t.some(n=>s.issue.toLowerCase().includes(n.toLowerCase())||s.wafPillar&&s.wafPillar.toLowerCase()===n.toLowerCase()));var pt=Z(require("node:fs")),ZD=Z(require("node:os")),ct=Z(require("node:path"));var Sl=ZD.tmpdir(),HL=(()=>{try{return pt.realpathSync(Sl)}catch{return Sl}})(),zL=e=>{if(!e||!/[\\/]lib[\\/]program\.js$/i.test(e))return!1;let t=s=>{if(!s)return!1;let n=ct.relative(s,e);return n!==""&&!n.startsWith("..")&&!ct.isAbsolute(n)};return t(Sl)||t(HL)},YD="aws:cdk:propertyAssignment",JD=["aws:cdk:creationStack","aws:cdk:cloudformation:stack-trace"],jt=new Map,vl=3e4,zD=500,qL=()=>{if(jt.size<=zD)return;let t=Array.from(jt.entries()).sort((s,n)=>s[1].timestamp-n[1].timestamp).slice(0,jt.size-zD);for(let[s]of t)jt.delete(s)},Cl=e=>{let t=jt.get(e);if(t&&Date.now()-t.timestamp<vl)return t.content;try{let s=pt.readFileSync(e,"utf-8");return qL(),jt.set(e,{content:s,timestamp:Date.now()}),s}catch{return null}},qD=(e,t=process.cwd())=>{try{let s=e.split("/").pop()||"",n=[s.replace(/Resource$/,""),s.replace(/Construct$/,""),s.replace(/Stack$/,""),s.replace(/[A-F0-9]{8,10}$/,""),s.replace(/[A-F0-9]{8}$/,""),s.replace(/[A-F0-9]{10}$/,""),s].filter(i=>i.length>2),r=[ct.join(t,"src"),ct.join(t,"lib"),ct.join(t,"cdk"),t];for(let i of r){if(!pt.existsSync(i))continue;let o=Al(i);for(let a of o){let u=Cl(a);if(u){for(let c of n)if(c&&c.length>2){let l=[new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*['"]${c}['"]`,"g"),new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*["']${c}["']`,"g"),new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*\`${c}\``,"g"),new RegExp(`new\\s+(\\w+)\\s*\\(\\s*this\\s*,\\s*${c}\\b`,"g"),new RegExp(`(\\w+)\\s*\\(\\s*this\\s*,\\s*['"]${c}['"]`,"g")];for(let p of l){let d=u.match(p);if(d){let m=u.split(`
|
|
215
|
-
`);for(let f=0;f<m.length;f++){let g=m[f];if(g.includes("this")&&p.test(g)){let h=d[1]||"Unknown";return{filePath:ct.relative(t,a),line:f+1,column:g.indexOf("new")+1,constructType:h}}}}}}}}}}catch{}return null},Al=e=>{let t=[],s=`ts_files_${e}`,n=jt.get(s);if(n&&Date.now()-n.timestamp<vl)try{return JSON.parse(n.content)}catch{jt.delete(s)}try{let r=pt.readdirSync(e);for(let i of r){let o=ct.join(e,i),a=pt.statSync(o);a.isDirectory()&&!i.startsWith(".")&&i!=="node_modules"&&i!=="dist"&&i!=="build"&&i!==".git"?t.push(...Al(o)):a.isFile()&&i.endsWith(".ts")&&!i.endsWith(".d.ts")&&t.push(o)}jt.set(s,{content:JSON.stringify(t),timestamp:Date.now()})}catch{}return t},
|
|
216
|
-
`):[],s=[];for(let n of t){let r=n.trim();if(!r||ZL(r))continue;let o=r.replace(/^at\s+(?:.*?\s+)?/,"").match(
|
|
215
|
+
`);for(let f=0;f<m.length;f++){let g=m[f];if(g.includes("this")&&p.test(g)){let h=d[1]||"Unknown";return{filePath:ct.relative(t,a),line:f+1,column:g.indexOf("new")+1,constructType:h}}}}}}}}}}catch{}return null},Al=e=>{let t=[],s=`ts_files_${e}`,n=jt.get(s);if(n&&Date.now()-n.timestamp<vl)try{return JSON.parse(n.content)}catch{jt.delete(s)}try{let r=pt.readdirSync(e);for(let i of r){let o=ct.join(e,i),a=pt.statSync(o);a.isDirectory()&&!i.startsWith(".")&&i!=="node_modules"&&i!=="dist"&&i!=="build"&&i!==".git"?t.push(...Al(o)):a.isFile()&&i.endsWith(".ts")&&!i.endsWith(".d.ts")&&t.push(o)}jt.set(s,{content:JSON.stringify(t),timestamp:Date.now()})}catch{}return t},VL=e=>{let t=[],s=`stack_files_${e}`,n=jt.get(s);if(n&&Date.now()-n.timestamp<vl)try{return JSON.parse(n.content)}catch{jt.delete(s)}try{let r=pt.readdirSync(e);for(let i of r){let o=ct.join(e,i),a=pt.statSync(o);if(a.isDirectory()&&!i.startsWith(".")&&i!=="node_modules"&&i!=="dist")(i==="cdk"||i==="lib"||i==="src")&&t.push(...Al(o));else if(a.isFile()&&i.endsWith(".ts")&&!i.endsWith(".d.ts")){let u=Cl(o);u?.includes("Stack")&&u.includes("extends")&&t.push(o)}}jt.set(s,{content:JSON.stringify(t),timestamp:Date.now()})}catch{}return t};var KL=/\(?([^()]+\.(ts|tsx|js|jsx)):(\d+):(\d+)\)?/,ZL=e=>e.includes("/dist/")||e.includes("\\dist\\")||e.includes("/node_modules/")||e.includes("\\node_modules\\")||e.startsWith("...")||/^\(no user code in /.test(e.trim()),bl=e=>{let t=Array.isArray(e)?e.map(String):typeof e=="string"?e.split(`
|
|
216
|
+
`):[],s=[];for(let n of t){let r=n.trim();if(!r||ZL(r))continue;let o=r.replace(/^at\s+(?:.*?\s+)?/,"").match(KL);if(!o)continue;let[,a,,u,c]=o;zL(a)||s.push({filePath:a.startsWith("/")?a:`./${a}`,line:Number(u),column:Number(c),kind:"unknown"})}return s},Dl=e=>{if(e.length===0)return e;let t=e.findIndex(n=>/\.tsx?$/.test(n.filePath));if(t<=0)return e;let[s]=e.splice(t,1);return[s,...e]},YL=e=>{if(e.type===YD){let t=e.data,s=Dl(bl(t?.stackTrace));return s.length===0?null:s.map((n,r)=>({...n,kind:r===0?"property":n.kind,...r===0&&t.propertyName?{propertyName:t.propertyName}:{}}))}if(JD.includes(e.type)){let t=Dl(bl(e.data));return t.length===0?null:t.map((s,n)=>({...s,kind:n===0?"creation":s.kind}))}return null},QD=e=>{if(e.length===0)return null;let[t]=e;return{filePath:t.filePath,line:t.line,column:t.column,frames:e}},VD=(e,t)=>QD(Dl(bl(e))),XD=(e,t,s=process.cwd())=>{try{if(e&&typeof e=="object"&&"artifacts"in e){let u=e,c=t,l={};for(let m of Object.values(u.artifacts??{}))if(m.metadata)for(let[f,g]of Object.entries(m.metadata))l[f]=g;let p=Object.entries(l).filter(([,m])=>m.some(f=>f.type==="aws:cdk:logicalId"&&f.data===c));for(let[m,f]of p){let g=f.find(x=>x.type==="aws:cdk:info"&&typeof x.data=="string"&&x.data.startsWith("cdk-insights::")&&!x.data.startsWith("cdk-insights::nagFinding::"));if(g)try{let x=JSON.parse(g.data.replace("cdk-insights::",""));if(x.sourceLocation)return{filePath:x.sourceLocation.filePath,line:x.sourceLocation.line||1,column:x.sourceLocation.column||1,constructPath:m,stackName:m.split("/")[0]||"",logicalId:c,confidence:"high"}}catch{}let h=[...f.filter(x=>x.type===YD),...f.filter(x=>JD.includes(x.type))];for(let x of h){let v=YL(x),E=v?QD(v):null;if(!E?.filePath)continue;let O=ct.resolve(s,E.filePath);if(pt.existsSync(O))return{...E,line:E.line??1,column:E.column??1,constructPath:m,stackName:m.split("/")[0]||"",logicalId:c,confidence:"high"}}let b=f.find(x=>x.type==="aws:cdk:logicalId"&&x.data===c)?.trace;if(b){let x=VD(b,m);if(x?.filePath){let v=ct.resolve(s,x.filePath);if(pt.existsSync(v))return{...x,line:x.line??1,column:x.column??1,constructPath:m,stackName:m.split("/")[0]||"",logicalId:c,confidence:"high"}}}}for(let[m]of p){let f=qD(m,s);if(f)return{...f,line:f.line??1,column:f.column??1,constructPath:m,stackName:m.split("/")[0]||"",logicalId:c,confidence:"medium"}}let d=p[0]?.[0]||c;return KD(d,c,s)}let r=e,i=t,o=VD(r,i);if(o?.filePath){let u=ct.resolve(s,o.filePath);if(pt.existsSync(u))return{...o,line:o.line??1,column:o.column??1,constructPath:i,confidence:"high"}}let a=qD(i,s);return a?{...a,line:a.line??1,column:a.column??1,constructPath:i,confidence:"medium"}:KD(i,i,s)}catch{return{filePath:t,line:1,column:1,constructPath:t,confidence:"low"}}},KD=(e,t,s)=>{let n=e.split("/").pop()||"",r=e.split("/")[0]||"",i=VL(s);for(let o of i)try{let a=Cl(o);if(!a)continue;let u=a.split(`
|
|
217
217
|
`);for(let c=0;c<u.length;c++){let l=u[c];if(l.includes("new")&&l.includes("this")&&(l.includes(n)||l.includes(r)))return{filePath:ct.relative(s,o),line:c+1,column:l.indexOf("new")+1,constructPath:e,stackName:r,logicalId:t,confidence:"low"}}}catch{}return null};var xl=Z(require("node:fs")),JL=e=>{switch(e){case"CRITICAL":case"HIGH":return"error";case"MEDIUM":return"warning";default:return"notice"}},QL=e=>e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A"),ev=e=>e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C"),XL=(e,t)=>{let s=[];for(let[n,r]of Object.entries(t)){let i=[...r.sources?.cdkInsights?.issues||[],...r.sources?.cdkNag?.issues||[]];for(let o of i){let a=JL(o.severity),u=`[${o.severity}] ${o.issue.slice(0,100)}`,c=o.recommendation||o.issue,l=[`title=${ev(u)}`];o.sourceLocation?.filePath&&(l.push(`file=${ev(o.sourceLocation.filePath)}`),l.push(`line=${o.sourceLocation.line}`),o.sourceLocation.column&&l.push(`col=${o.sourceLocation.column}`)),s.push(`::${a} ${l.join(",")}::${QL(c)}`)}}return s},e_=(e,t,s,n)=>{let r=Object.values(s).reduce((a,u)=>a+u,0),i=`# \u{1F50D} CDK Insights Analysis: ${e}
|
|
218
218
|
|
|
219
219
|
`;i+=`| Metric | Value |
|
|
@@ -249,8 +249,8 @@ ${o}`)};var LD=require("node:child_process"),_D=()=>{try{return(0,LD.execFileSyn
|
|
|
249
249
|
`)}catch(a){console.error("Failed to write GitHub outputs:",a)}};var _l=Z(require("node:fs"));var ta=e=>{switch(e.toUpperCase()){case"CRITICAL":return"\u{1F534}";case"HIGH":return"\u{1F7E0}";case"MEDIUM":return"\u{1F7E1}";case"LOW":return"\u{1F7E2}";default:return"\u26AA"}},tv=(e,t)=>{ue.info(`
|
|
250
250
|
\u{1F4DD} Analysis Summary for stack: ${e}`),ue.info(`Total Resources Scanned: ${t.totalResources}`),ue.info(`Resources with Issues: ${t.resourcesWithIssues} (${t.percentWithIssues}%)`),ue.info(`Total Issues Found: ${t.totalIssues}
|
|
251
251
|
`),ue.info("Severity Breakdown:"),ue.info(` ${ta("CRITICAL")} Critical: ${t.severityCounts.CRITICAL}`),ue.info(` ${ta("HIGH")} High: ${t.severityCounts.HIGH}`),ue.info(` ${ta("MEDIUM")} Medium: ${t.severityCounts.MEDIUM}`),ue.info(` ${ta("LOW")} Low: ${t.severityCounts.LOW}
|
|
252
|
-
`),ue.info("WAF Pillar Impact:");for(let[s,n]of Object.entries(t.wafIssues))ue.info(` ${s}: ${n}`);ue.info(""),ue.info("Top Priorities:"),t.severityCounts.CRITICAL>0&&ue.info(" \u{1F534} Address Critical issues immediately (highest risk)"),t.severityCounts.HIGH>0&&ue.info(" \u{1F7E0} Then handle High-severity issues"),t.severityCounts.MEDIUM>0&&ue.info(" \u{1F7E1} Schedule Medium-severity tasks soon"),t.severityCounts.LOW>0&&ue.info(" \u{1F7E2} Plan Low-severity enhancements at your convenience"),ue.info("")};var O_=qv(),B_=e=>{switch(e){case"CRITICAL":return"\u{1F534}";case"HIGH":return"\u{1F536}";case"MEDIUM":return"\u{1F7E1}";case"LOW":return"\u{1F7E2}";default:return"\u26AA"}},M_=(e,t)=>{let s=e.sourceLocation||t?.sourceLocation;if(s){let{filePath:n,line:r,column:i,confidence:o}=s,a=o==="high"?"\u{1F3AF}":o==="medium"?"\u{1F4CD}":"\u2753",u=n.length>40?`...${n.slice(-37)}`:n;return`${a} ${u}:${r}:${i}`}if(t?.rootSourceLocation){let{filePath:n,line:r,column:i}=t.rootSourceLocation;return`\u{1F517} ${n.length>40?`...${n.slice(-37)}`:n}:${r}:${i}`}return t?.createdBy?`\u{1F517} ${t.createdBy.length>28?`${t.createdBy.slice(0,25)}...`:t.createdBy}`:""};var
|
|
253
|
-
`);break}case"sarif":{let i=oa(t,s),o=`${t}_analysis_report.sarif`;try{_l.writeFileSync(o,JSON.stringify(i,null,2)),ue.info(`\u{1F4C4} SARIF report written to: ${o}`),console.log(JSON.stringify(i,null,2))}catch(a){let u=a instanceof Error?a.message:String(a);throw ue.error(`\u274C Failed to write SARIF report to ${o}: ${u}`),new Error(`Failed to write SARIF report: ${u}`)}break}case"github-actions":{ea(t,s,r.severityCounts,r.totalResources);break}default:tv(t,r);break}};var aa=(e,t,s,n)=>{let r=0,i=0,o={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},a={"Operational Excellence":0,Security:0,"Cost Optimization":0,Reliability:0,"Performance Efficiency":0,Sustainability:0};for(let l in e){let p=[...e[l].sources.cdkInsights?.issues??[],...e[l].sources.cdkNag?.issues??[]],d=!s||s.has(l);p.length>0&&d&&i++,r+=p.length;for(let m of p)o[m.severity]+=1,a[m.wafPillar]+=1}let u=t,c=u>0?Number.parseFloat((i/u*100).toFixed(1)):0;return{totalResources:u,resourcesWithIssues:i,percentWithIssues:c,totalIssues:r,severityCounts:o,wafIssues:a,generatedBy:"cdk-insights",generatedAt:new Date().toISOString(),...n?{aiSkippedReason:n}:{}}};var Xv=Z(require("node:crypto")),eC=e=>Xv.createHash("sha256").update(JSON.stringify(e)).digest("hex");var ca=(e,t)=>t.endsWith("*")?e.startsWith(t.slice(0,-1)):e===t,H_=(e,t)=>{if(!e)return!1;let s=e.startsWith("/")?e.slice(1):e,n=t.startsWith("/")?t.slice(1):t;return n?s===n||s.startsWith(`${n}/`):!0},z_=(e,t,s)=>!e.ruleId||s.length===0||t.length===0?!1:s.some(n=>n.ruleId===e.ruleId&&t.some(r=>H_(r,n.constructPath))),ua=(e,t,s)=>{let{ignoreRules:n=[],ignorePaths:r=[],acknowledgements:i=[]}=s;return n.length===0&&r.length===0&&i.length===0?!1:r.some(a=>t.some(u=>ca(u,a)))||e.ruleId&&n.some(u=>ca(e.ruleId,u))?!0:z_(e,t,i)};var Sr=Z(require("node:fs")),Ol=Z(require("node:path")),tC=e=>{let t=Ol.join(e,"manifest.json");if(!Sr.existsSync(t))return{};let s;try{s=JSON.parse(Sr.readFileSync(t,"utf-8"))}catch{return{}}if(!s.artifacts)return s;for(let n of Object.values(s.artifacts)){let r=n?.additionalMetadataFile;if(!r||n.metadata)continue;let i=Ol.join(e,r);if(Sr.existsSync(i))try{let o=JSON.parse(Sr.readFileSync(i,"utf-8"));o&&typeof o=="object"&&(n.metadata=o)}catch{}}return s};var q_=[/depends\s*on.*(?:not\s*(?:be\s*)?available|may\s*not\s*exist|circular)/i,/dependson.*relationship/i,/resource.*depends.*another.*resource/i,/dependency.*(?:not\s*)?(?:be\s*)?ready/i,/lacks?\s*(?:meaningful\s*)?tags?(?:\s*for)?/i,/missing.*tags?.*(?:metadata|identification)/i,/no\s*tags?\s*(?:defined|configured|specified)/i,/does\s*not\s*have\s*any\s*tags/i,/tags?.*(?:auditing|cost\s*allocation|management)/i,/\[redacted\].*(?:incomplete|invalid|malformed|missing)/i,/incomplete.*\[redacted\]/i,/placeholder.*value/i,/missing.*closing.*brace/i,/replac(?:e|ing).*\[redacted\]/i,/\[redacted\].*(?:should|could|must)\s*be/i,/trust.*policy.*any.*service.*\[redacted\]/i,/any.*service.*within.*account.*\[redacted\]/i,/cdk.*metadata.*exposed/i,/metadata.*cdk.*path/i,/nat\s*gateway.*(?:move|associated).*(?:private\s*subnet|public\s*subnet.*risk)/i,/move.*nat\s*gateway.*private/i,/eip.*not\s*associated.*(?:instance|resource)/i,/elastic\s*ip.*not.*(?:associated|utilized|being\s*used)/i,/userdata\s*(?:script\s*)?is\s*empty/i,/empty.*userdata/i,/routetable.*(?:tags?|metadata)/i,/iam.*(?:policy|role).*(?:grants?|has).*(?:sts:assumerole|administratoraccess).*(?:overly\s*)?permissive/i,/inline\s*policy\s*grants?\s*unrestricted\s*access\s*to\s*all/i,/subnet.*mappubliciponlaunch.*(?:true|set)/i,/mappubliciponlaunch.*(?:expose|public\s*ip|internet)/i,/instances.*launched.*subnet.*public\s*ip/i],K_=[/tags?/i,/naming\s*convention/i,/resource\s*name.*not.*descriptive/i,/lacks?\s*description/i,/missing\s*description/i,/default\s*iam\s*role.*(?:broad|permissive)/i,/security\s*group.*(?:all\s*outbound|all\s*egress|unrestricted\s*egress)/i,/allows?\s*all\s*outbound\s*traffic/i],V_=e=>q_.some(t=>t.test(e)),Z_=e=>K_.some(t=>t.test(e)),sC=(e,t=!1)=>e.filter(s=>{let n=s.issue||"";return!(V_(n)||t&&Z_(n))});var nC=({staticRecommendations:e,aiRecommendations:t,recommendationMap:s,ruleFilter:n,filterIssuesByRule:r,_displayNameMap:i={}})=>{let o={...s};for(let[p,{issues:d}]of Object.entries(e))o[p]&&(o[p].sources||(o[p].sources={cdkInsights:{issues:[]},cdkNag:{issues:[]}}),o[p].sources.cdkInsights||(o[p].sources.cdkInsights={issues:[]}),o[p].sources.cdkInsights.issues.push(...d));let a=0,u=0,c=0,l=0;for(let[p,d]of Object.entries(t)){if(!d||!Array.isArray(d.issues)){ue.warn(`\u26A0\uFE0F No AI issues for resource '${p}', skipping.`);continue}let m=p;if(!o[m]){ue.warn(`\u26A0\uFE0F AI recommendations for unknown resource '${m}', skipping enrichment.`);continue}let f=o[m],g=n.length>0?r(d.issues,n):d.issues,y=sC(g,f.isGenerated).map(x=>{switch(x.severity||(ue.debug(`AI recommendation missing severity for resource '${m}', defaulting to MEDIUM`),x.severity="MEDIUM"),x.severity.toUpperCase()==="CRITICAL"&&(ue.debug(`Capping AI finding from CRITICAL \u2192 HIGH for resource '${m}' (AI findings are advisory)`),x.severity="HIGH"),x.severity.toUpperCase()){case"CRITICAL":a++;break;case"HIGH":u++;break;case"MEDIUM":c++;break;case"LOW":l++;break;default:ue.warn(`\u26A0\uFE0F Unknown severity '${x.severity}' for resource '${m}', defaulting to MEDIUM`),x.severity="MEDIUM",c++;break}return{resourceName:x.resourceName||f.resourceName,resourceId:m,friendlyName:f.friendlyName,displayName:f.displayName,locationHint:x.locationHint||f.locationHint,constructPath:f.cdkPath,githubUrl:f.githubUrl,docUrl:f.docUrl,issue:x.issue||"AI analysis issue",recommendation:x.recommendation||"No specific recommendation provided",severity:x.severity,wafPillar:(()=>{if(x.wafPillar)switch(x.wafPillar.toLowerCase().trim()){case"security":return"Security";case"operational excellence":return"Operational Excellence";case"cost optimization":return"Cost Optimization";case"reliability":return"Reliability";case"performance efficiency":return"Performance Efficiency";case"sustainability":return"Sustainability";default:return"Security"}return"Security"})(),codeSnippet:x.codeSnippet||"",foundBy:x.foundBy??"cdkInsights"}}),b=Uo(y,f.cdkPath);f.sources||(f.sources={cdkInsights:{issues:[]},cdkNag:{issues:[]}}),f.sources.cdkInsights||(f.sources.cdkInsights={issues:[]}),f.sources.cdkInsights.issues.push(...b)}return{updatedMap:o,criticalCount:a,highCount:u,mediumCount:c,lowCount:l}};var la=e=>{if(!e||e.length===0)return 0;let t=e.length,s=new Map;for(let r of e)s.set(r,(s.get(r)||0)+1);let n=0;for(let r of s.values()){let i=r/t;n-=i*Math.log2(i)}return n},Bl=(e,t=!1)=>{if(e.length<16||Y_(e)||la(e)<(t?4:4.5))return!1;let r=/[A-Z]/.test(e),i=/[a-z]/.test(e),o=/[0-9]/.test(e),a=/[^A-Za-z0-9]/.test(e),u=[r,i,o,a].filter(Boolean).length;return t?u>=1:u>=2},Y_=e=>{if(/^https?:\/\//i.test(e)||/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d*:/.test(e)||/^(\/|\.\/|\.\.\/|[A-Za-z]:\\)/.test(e)||/^s3:\/\/[a-z0-9.-]+\//.test(e)||/^[A-Za-z][A-Za-z0-9]*(DefaultPolicy|DefaultRole|ServiceRole|EventsRole|ExecutionRole|LogRetention|LambdaFunction|Handler|Function|Role|Policy)[A-F0-9]{8,}$/.test(e)||/^sha256:[a-f0-9]{64}$/.test(e)||/^[a-f0-9]{40}$/.test(e)||/^Z[A-Z0-9]{14,22}$/.test(e)||/^[a-z]{2}-[a-z]+-\d_[A-Za-z0-9]{9,}$/.test(e)||/^(vpc|subnet|sg|igw|nat|rtb|acl|eni|i|ami|vol|snap|eipalloc)-[a-f0-9]{8,17}$/.test(e)||/^E[A-Z0-9]{13}$/.test(e))return!0;if(/^[A-Za-z0-9+/]{4,}={0,2}$/.test(e)){let t=new Set(e).size;if(e.length>50&&t<10)return!0}return!!J_(e)},J_=e=>{let t=e.length;for(let s=1;s<=t/2;s++)if(e.slice(0,s).repeat(Math.ceil(t/s)).slice(0,t)===e)return!0;return!1};var Ml=[/api[_-]?key/i,/secret[_-]?key/i,/^password$/i,/^passwd$/i,/credential/i,/private[_-]?key/i,/access[_-]?key/i,/auth[_-]?token/i,/bearer[_-]?token/i,/refresh[_-]?token/i,/client[_-]?secret/i,/app[_-]?secret/i,/secret[_-]?value/i,/aws[_-]?secret/i,/aws[_-]?access[_-]?key/i,/aws[_-]?session[_-]?token/i,/db[_-]?password/i,/database[_-]?password/i,/master[_-]?password/i,/master[_-]?user[_-]?password/i,/admin[_-]?password/i,/root[_-]?password/i,/connection[_-]?string/i,/stripe[_-]?key/i,/stripe[_-]?secret/i,/github[_-]?token/i,/gitlab[_-]?token/i,/slack[_-]?token/i,/slack[_-]?webhook/i,/discord[_-]?token/i,/twilio[_-]?token/i,/sendgrid[_-]?key/i,/mailgun[_-]?key/i,/datadog[_-]?key/i,/new[_-]?relic[_-]?key/i,/sentry[_-]?dsn/i,/webhook[_-]?secret/i,/signing[_-]?key/i,/signing[_-]?secret/i,/encryption[_-]?key/i,/jwt[_-]?secret/i,/hmac[_-]?key/i,/ssh[_-]?key/i,/ssh[_-]?private/i,/pem[_-]?key/i,/rsa[_-]?key/i],Nl=[/^A[BGIK-Z][A-Z]{2}[0-9A-Z]{16}$/,/^[A-Za-z0-9/+=]{40}$/,/-----BEGIN (RSA |EC |DSA |OPENSSH |ENCRYPTED )?PRIVATE KEY-----/,/-----BEGIN PGP PRIVATE KEY BLOCK-----/,/^eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^gh[pousr]_[A-Za-z0-9]{36,}$/,/^[srp]k_(live|test)_[A-Za-z0-9]{24,}$/,/^xox[bpas]-[A-Za-z0-9-]+$/,/^SK[a-f0-9]{32}$/i,/^SG\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/],Q_=[/\{\{resolve:secretsmanager:/,/{{resolve:secretsmanager:/,/\{\{resolve:ssm:/,/{{resolve:ssm:/,/\{\{resolve:ssm-secure:/,/{{resolve:ssm-secure:/,/^\/[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+(\/[a-zA-Z0-9_.-]+)+$/,/!Ref\s+\w+/,/!GetAtt\s+[\w.]+/,/!Sub\s+/,/\$\{[\w:.]+\}/,/\$\{Token\[/,/\[\[token:/i,/\${Token\[TOKEN\.\d+\]\}/,/^arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d*:/],X_=[/^<[^>]+>$/,/^CHANGE[_-]?ME$/i,/^REPLACE[_-]?ME$/i,/^TODO$/i,/^TODO:/i,/^FIXME$/i,/^XXX$/i,/^YOUR[_-]/i,/^INSERT[_-]/i,/^ENTER[_-]/i,/^\*+$/,/^x+$/i,/^\s*$/,/^default$/i,/^example$/i,/^sample$/i,/^test$/i,/^demo$/i,/^dummy$/i,/^fake$/i,/^mock$/i,/^placeholder$/i],eO=[/^Description$/i,/^AlarmDescription$/i,/^Comment$/i,/^Label$/i,/^Summary$/i,/^DisplayName$/i,/^Name$/i,/^PolicyName$/i,/^RoleName$/i,/^FunctionName$/i,/^QueueName$/i,/^TopicName$/i,/^BucketName$/i,/^TableName$/i,/^StreamName$/i,/^LogGroupName$/i,/^ParameterName$/i,/^SecretName$/i,/^StateMachineName$/i,/^RuleName$/i,/^AliasName$/i,/^StackName$/i,/^GroupName$/i,/^UserName$/i,/^PolicyDocument$/i,/^ClientId$/i,/^UserPoolClientId$/i,/^UserPoolId$/i,/^IdentityPoolId$/i,/^DistributionId$/i,/^HostedZoneId$/i,/^CertificateArn$/i,/^TopicArn$/i,/^QueueArn$/i,/^FunctionArn$/i,/^Arn$/i,/^EventPattern$/i,/^Definition$/i,/^DefinitionString$/i,/^Template$/i,/^TemplateURL$/i,/^TemplateBody$/i,/^EventSourceName$/i,/^PartnerEventSource$/i];var tO=[/(?:^|\.)Targets\[\d+\]\.Input$/,/(?:^|\.)Create$/,/(?:^|\.)Update$/,/(?:^|\.)Delete$/,/(?:^|\.)DefinitionString$/,/(?:^|\.)Code\.ZipFile$/,/(?:^|\.)Statement\[\d+\]\.Resource$/,/(?:^|\.)Statement\[\d+\]\.Resource\[\d+\]$/,/(?:^|\.)Statement\[\d+\]\.Sid$/],rC=e=>eO.some(t=>t.test(e));var iC=e=>tO.some(t=>t.test(e)),Wl=e=>Ml.some(t=>t.test(e)),Ul=e=>Nl.some(t=>t.test(e)),jl=e=>Q_.some(t=>t.test(e)),$l=e=>X_.some(t=>t.test(e)),pa=e=>{if(typeof e!="object"||e===null)return!1;let t=["Ref","Fn::GetAtt","Fn::Sub","Fn::Join","Fn::ImportValue","Fn::If","Fn::Select","Fn::Split","Fn::Base64","Fn::Cidr","Fn::FindInMap","Fn::GetAZs","Fn::Transform"],s=Object.keys(e);return s.length===1&&t.includes(s[0])},Gl=e=>{let t=[{patterns:[/api[_-]?key/i,/access[_-]?key/i],category:"api_key"},{patterns:[/password/i,/passwd/i],category:"password"},{patterns:[/private[_-]?key/i,/ssh[_-]?key/i,/pem[_-]?key/i,/rsa[_-]?key/i],category:"private_key"},{patterns:[/aws[_-]?secret/i,/aws[_-]?access/i],category:"aws_credentials"},{patterns:[/token/i,/bearer/i],category:"token"},{patterns:[/secret/i,/credential/i],category:"secret"},{patterns:[/connection[_-]?string/i,/database/i,/db[_-]/i],category:"database"},{patterns:[/webhook/i,/signing/i,/encryption/i,/hmac/i,/jwt/i],category:"encryption_key"}];for(let{patterns:s,category:n}of t)if(s.some(r=>r.test(e)))return n;return"secret"};var yi=e=>{let t={api_key:`Use AWS Secrets Manager to store API keys securely:
|
|
252
|
+
`),ue.info("WAF Pillar Impact:");for(let[s,n]of Object.entries(t.wafIssues))ue.info(` ${s}: ${n}`);ue.info(""),ue.info("Top Priorities:"),t.severityCounts.CRITICAL>0&&ue.info(" \u{1F534} Address Critical issues immediately (highest risk)"),t.severityCounts.HIGH>0&&ue.info(" \u{1F7E0} Then handle High-severity issues"),t.severityCounts.MEDIUM>0&&ue.info(" \u{1F7E1} Schedule Medium-severity tasks soon"),t.severityCounts.LOW>0&&ue.info(" \u{1F7E2} Plan Low-severity enhancements at your convenience"),ue.info("")};var O_=qv(),B_=e=>{switch(e){case"CRITICAL":return"\u{1F534}";case"HIGH":return"\u{1F536}";case"MEDIUM":return"\u{1F7E1}";case"LOW":return"\u{1F7E2}";default:return"\u26AA"}},M_=(e,t)=>{let s=e.sourceLocation||t?.sourceLocation;if(s){let{filePath:n,line:r,column:i,confidence:o}=s,a=o==="high"?"\u{1F3AF}":o==="medium"?"\u{1F4CD}":"\u2753",u=n.length>40?`...${n.slice(-37)}`:n;return`${a} ${u}:${r}:${i}`}if(t?.rootSourceLocation){let{filePath:n,line:r,column:i}=t.rootSourceLocation;return`\u{1F517} ${n.length>40?`...${n.slice(-37)}`:n}:${r}:${i}`}return t?.createdBy?`\u{1F517} ${t.createdBy.length>28?`${t.createdBy.slice(0,25)}...`:t.createdBy}`:""};var Vv={CRITICAL:4,HIGH:3,MEDIUM:2,LOW:1},hi=e=>{let t=new O_({head:["Resource","Stack","Severity","Service","Issue","Location"],colWidths:[20,15,10,15,40,30],wordWrap:!0}),s=[];for(let[,n]of Object.entries(e)){let r=[...n.sources?.cdkInsights?.issues??[],...n.sources?.cdkNag?.issues??[]];for(let i of r){let o=i.constructType||n.constructType||n.type||"Unknown",a=M_(i,n);s.push({issue:i,group:n,service:o,sourceLocation:a})}}s.sort((n,r)=>{let i=Vv[n.issue.severity]||0;return(Vv[r.issue.severity]||0)-i});for(let{issue:n,group:r,service:i,sourceLocation:o}of s)t.push([r.friendlyName||r.resourceId,n.stackName||"Unknown",`${B_(n.severity)} ${n.severity}`,i,n.issue,o||n.locationHint||""]);console.log(t.toString())};var Zv=Z(require("node:fs"));var{version:W_}=Ll(),Kv={CRITICAL:0,HIGH:1,MEDIUM:2,LOW:3},U_=(e,t,s)=>{let n=Object.entries(s).map(([r,i])=>{let o=[...i.sources?.cdkInsights?.issues??[],...i.sources?.cdkNag?.issues??[],...i.sources?.validationReport?.issues??[]].slice().sort((u,c)=>Kv[u.severity]-Kv[c.severity]),a=Uo(o,i.cdkPath);return{resourceId:i.resourceId,logicalId:i.logicalId,cdkName:i.friendlyName,resourceName:i.resourceName,cdkPath:i.cdkPath,githubUrl:i.githubUrl,docUrl:i.docUrl,constructType:i.constructType,parentPath:i.parentPath,childCount:i.childCount,tags:i.tags,sourceLocation:i.sourceLocation,constructHierarchy:i.constructHierarchy,serviceCategory:i.serviceCategory,dependencies:i.dependencies,sensitiveProperties:i.sensitiveProperties,usesDefaults:i.usesDefaults,l2ConstructType:i.l2ConstructType,l2ConstructId:i.l2ConstructId,createdBy:i.createdBy,rootSourceLocation:i.rootSourceLocation,searchHint:i.searchHint,issues:a.map(u=>({issue:u.issue,recommendation:u.recommendation,severity:u.severity,wafPillar:u.wafPillar,codeSnippet:u.codeSnippet,locationHint:u.locationHint,foundBy:u.foundBy,sourceLocation:u.sourceLocation,stackName:u.stackName,ruleId:u.ruleId,seenInSynth:u.seenInSynth,validationPluginName:u.validationPluginName}))}});return{stackName:e,generatedAt:new Date().toISOString(),version:W_,summary:t,recommendations:n}},Yv=(e,t,s)=>{let n=U_(e,t,s),r=`${e}_analysis_report.json`;try{Zv.writeFileSync(r,JSON.stringify(n,null,2),"utf-8"),ue.info(`\u{1F4C4} JSON report written to ${r}`)}catch(i){let o=i instanceof Error?i.message:String(i);throw ue.error(`\u274C Failed to write JSON report to ${r}: ${o}`),new Error(`Failed to write analysis report: ${o}`)}return n};var{version:j_}=Ll(),$_=e=>{switch(e){case"CRITICAL":case"HIGH":return"error";case"MEDIUM":return"warning";default:return"note"}},Jv=e=>{switch(e){case"CRITICAL":return 9;case"HIGH":return 7;case"MEDIUM":return 4;case"LOW":return 2;default:return 1}},oa=(e,t)=>{let s=[],n=[],r=new Set;for(let[i,o]of Object.entries(t)){let a=[...o.sources?.cdkInsights?.issues||[],...o.sources?.cdkNag?.issues||[]];for(let u of a){let c=G_(u);r.has(c)||(r.add(c),s.push({id:c,name:u.issue.slice(0,100),shortDescription:{text:u.issue},fullDescription:u.recommendation?{text:u.recommendation}:void 0,helpUri:u.docUrl||u.githubUrl,properties:{"security-severity":Jv(u.severity).toString(),tags:[u.wafPillar,u.severity,u.foundBy].filter(Boolean)}}));let p=(u.sourceLocation?.frames?.slice(1)??[]).map(d=>({physicalLocation:{artifactLocation:{uri:d.filePath,uriBaseId:"%SRCROOT%"},region:{startLine:d.line,startColumn:d.column}},message:{text:d.kind==="property"&&d.propertyName?`Property set: ${d.propertyName}`:d.kind==="creation"?"Construct created here":"Related call site"}}));n.push({ruleId:c,level:$_(u.severity),message:{text:u.recommendation||u.issue},locations:[{physicalLocation:{artifactLocation:{uri:u.sourceLocation?.filePath||`cdk.out/${e}.template.json`,uriBaseId:"%SRCROOT%"},region:u.sourceLocation?{startLine:u.sourceLocation.line,startColumn:u.sourceLocation.column}:void 0}}],...p.length>0?{relatedLocations:p}:{},properties:{"security-severity":Jv(u.severity).toString(),wafPillar:u.wafPillar,recommendation:u.recommendation}})}}return{$schema:"https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",version:"2.1.0",runs:[{tool:{driver:{name:"cdk-insights",version:j_,informationUri:"https://cdkinsights.dev",rules:s}},results:n}]}},G_=e=>{let t=e.issue.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,50);return`CDK-${e.severity}-${t}`};var Qv=(e,t,s,n,r)=>{switch(ue.info(`Generating output in format: ${e}`),e){case"markdown":{let i=gr(t,s,r,n),o=`${t}_analysis_report.md`;try{_l.writeFileSync(o,i),ue.info(`\u{1F4C4} Saved Markdown report to ${o}`)}catch(a){let u=a instanceof Error?a.message:String(a);throw ue.error(`\u274C Failed to write Markdown report to ${o}: ${u}`),new Error(`Failed to write Markdown report: ${u}`)}break}case"table":{hi(s);break}case"json":{let i=Yv(t,r,s);process.stdout.write(`${JSON.stringify(i,null,2)}
|
|
253
|
+
`);break}case"sarif":{let i=oa(t,s),o=`${t}_analysis_report.sarif`;try{_l.writeFileSync(o,JSON.stringify(i,null,2)),ue.info(`\u{1F4C4} SARIF report written to: ${o}`),console.log(JSON.stringify(i,null,2))}catch(a){let u=a instanceof Error?a.message:String(a);throw ue.error(`\u274C Failed to write SARIF report to ${o}: ${u}`),new Error(`Failed to write SARIF report: ${u}`)}break}case"github-actions":{ea(t,s,r.severityCounts,r.totalResources);break}default:tv(t,r);break}};var aa=(e,t,s,n)=>{let r=0,i=0,o={CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0},a={"Operational Excellence":0,Security:0,"Cost Optimization":0,Reliability:0,"Performance Efficiency":0,Sustainability:0};for(let l in e){let p=[...e[l].sources.cdkInsights?.issues??[],...e[l].sources.cdkNag?.issues??[]],d=!s||s.has(l);p.length>0&&d&&i++,r+=p.length;for(let m of p)o[m.severity]+=1,a[m.wafPillar]+=1}let u=t,c=u>0?Number.parseFloat((i/u*100).toFixed(1)):0;return{totalResources:u,resourcesWithIssues:i,percentWithIssues:c,totalIssues:r,severityCounts:o,wafIssues:a,generatedBy:"cdk-insights",generatedAt:new Date().toISOString(),...n?{aiSkippedReason:n}:{}}};var Xv=Z(require("node:crypto")),eC=e=>Xv.createHash("sha256").update(JSON.stringify(e)).digest("hex");var ca=(e,t)=>t.endsWith("*")?e.startsWith(t.slice(0,-1)):e===t,H_=(e,t)=>{if(!e)return!1;let s=e.startsWith("/")?e.slice(1):e,n=t.startsWith("/")?t.slice(1):t;return n?s===n||s.startsWith(`${n}/`):!0},z_=(e,t,s)=>!e.ruleId||s.length===0||t.length===0?!1:s.some(n=>n.ruleId===e.ruleId&&t.some(r=>H_(r,n.constructPath))),ua=(e,t,s)=>{let{ignoreRules:n=[],ignorePaths:r=[],acknowledgements:i=[]}=s;return n.length===0&&r.length===0&&i.length===0?!1:r.some(a=>t.some(u=>ca(u,a)))||e.ruleId&&n.some(u=>ca(e.ruleId,u))?!0:z_(e,t,i)};var Sr=Z(require("node:fs")),Ol=Z(require("node:path")),tC=e=>{let t=Ol.join(e,"manifest.json");if(!Sr.existsSync(t))return{};let s;try{s=JSON.parse(Sr.readFileSync(t,"utf-8"))}catch{return{}}if(!s.artifacts)return s;for(let n of Object.values(s.artifacts)){let r=n?.additionalMetadataFile;if(!r||n.metadata)continue;let i=Ol.join(e,r);if(Sr.existsSync(i))try{let o=JSON.parse(Sr.readFileSync(i,"utf-8"));o&&typeof o=="object"&&(n.metadata=o)}catch{}}return s};var q_=[/depends\s*on.*(?:not\s*(?:be\s*)?available|may\s*not\s*exist|circular)/i,/dependson.*relationship/i,/resource.*depends.*another.*resource/i,/dependency.*(?:not\s*)?(?:be\s*)?ready/i,/lacks?\s*(?:meaningful\s*)?tags?(?:\s*for)?/i,/missing.*tags?.*(?:metadata|identification)/i,/no\s*tags?\s*(?:defined|configured|specified)/i,/does\s*not\s*have\s*any\s*tags/i,/tags?.*(?:auditing|cost\s*allocation|management)/i,/\[redacted\].*(?:incomplete|invalid|malformed|missing)/i,/incomplete.*\[redacted\]/i,/placeholder.*value/i,/missing.*closing.*brace/i,/replac(?:e|ing).*\[redacted\]/i,/\[redacted\].*(?:should|could|must)\s*be/i,/trust.*policy.*any.*service.*\[redacted\]/i,/any.*service.*within.*account.*\[redacted\]/i,/cdk.*metadata.*exposed/i,/metadata.*cdk.*path/i,/nat\s*gateway.*(?:move|associated).*(?:private\s*subnet|public\s*subnet.*risk)/i,/move.*nat\s*gateway.*private/i,/eip.*not\s*associated.*(?:instance|resource)/i,/elastic\s*ip.*not.*(?:associated|utilized|being\s*used)/i,/userdata\s*(?:script\s*)?is\s*empty/i,/empty.*userdata/i,/routetable.*(?:tags?|metadata)/i,/iam.*(?:policy|role).*(?:grants?|has).*(?:sts:assumerole|administratoraccess).*(?:overly\s*)?permissive/i,/inline\s*policy\s*grants?\s*unrestricted\s*access\s*to\s*all/i,/subnet.*mappubliciponlaunch.*(?:true|set)/i,/mappubliciponlaunch.*(?:expose|public\s*ip|internet)/i,/instances.*launched.*subnet.*public\s*ip/i],V_=[/tags?/i,/naming\s*convention/i,/resource\s*name.*not.*descriptive/i,/lacks?\s*description/i,/missing\s*description/i,/default\s*iam\s*role.*(?:broad|permissive)/i,/security\s*group.*(?:all\s*outbound|all\s*egress|unrestricted\s*egress)/i,/allows?\s*all\s*outbound\s*traffic/i],K_=e=>q_.some(t=>t.test(e)),Z_=e=>V_.some(t=>t.test(e)),sC=(e,t=!1)=>e.filter(s=>{let n=s.issue||"";return!(K_(n)||t&&Z_(n))});var nC=({staticRecommendations:e,aiRecommendations:t,recommendationMap:s,ruleFilter:n,filterIssuesByRule:r,_displayNameMap:i={}})=>{let o={...s};for(let[p,{issues:d}]of Object.entries(e))o[p]&&(o[p].sources||(o[p].sources={cdkInsights:{issues:[]},cdkNag:{issues:[]}}),o[p].sources.cdkInsights||(o[p].sources.cdkInsights={issues:[]}),o[p].sources.cdkInsights.issues.push(...d));let a=0,u=0,c=0,l=0;for(let[p,d]of Object.entries(t)){if(!d||!Array.isArray(d.issues)){ue.warn(`\u26A0\uFE0F No AI issues for resource '${p}', skipping.`);continue}let m=p;if(!o[m]){ue.warn(`\u26A0\uFE0F AI recommendations for unknown resource '${m}', skipping enrichment.`);continue}let f=o[m],g=n.length>0?r(d.issues,n):d.issues,y=sC(g,f.isGenerated).map(x=>{switch(x.severity||(ue.debug(`AI recommendation missing severity for resource '${m}', defaulting to MEDIUM`),x.severity="MEDIUM"),x.severity.toUpperCase()==="CRITICAL"&&(ue.debug(`Capping AI finding from CRITICAL \u2192 HIGH for resource '${m}' (AI findings are advisory)`),x.severity="HIGH"),x.severity.toUpperCase()){case"CRITICAL":a++;break;case"HIGH":u++;break;case"MEDIUM":c++;break;case"LOW":l++;break;default:ue.warn(`\u26A0\uFE0F Unknown severity '${x.severity}' for resource '${m}', defaulting to MEDIUM`),x.severity="MEDIUM",c++;break}return{resourceName:x.resourceName||f.resourceName,resourceId:m,friendlyName:f.friendlyName,displayName:f.displayName,locationHint:x.locationHint||f.locationHint,constructPath:f.cdkPath,githubUrl:f.githubUrl,docUrl:f.docUrl,issue:x.issue||"AI analysis issue",recommendation:x.recommendation||"No specific recommendation provided",severity:x.severity,wafPillar:(()=>{if(x.wafPillar)switch(x.wafPillar.toLowerCase().trim()){case"security":return"Security";case"operational excellence":return"Operational Excellence";case"cost optimization":return"Cost Optimization";case"reliability":return"Reliability";case"performance efficiency":return"Performance Efficiency";case"sustainability":return"Sustainability";default:return"Security"}return"Security"})(),codeSnippet:x.codeSnippet||"",foundBy:x.foundBy??"cdkInsights"}}),b=Uo(y,f.cdkPath);f.sources||(f.sources={cdkInsights:{issues:[]},cdkNag:{issues:[]}}),f.sources.cdkInsights||(f.sources.cdkInsights={issues:[]}),f.sources.cdkInsights.issues.push(...b)}return{updatedMap:o,criticalCount:a,highCount:u,mediumCount:c,lowCount:l}};var la=e=>{if(!e||e.length===0)return 0;let t=e.length,s=new Map;for(let r of e)s.set(r,(s.get(r)||0)+1);let n=0;for(let r of s.values()){let i=r/t;n-=i*Math.log2(i)}return n},Bl=(e,t=!1)=>{if(e.length<16||Y_(e)||la(e)<(t?4:4.5))return!1;let r=/[A-Z]/.test(e),i=/[a-z]/.test(e),o=/[0-9]/.test(e),a=/[^A-Za-z0-9]/.test(e),u=[r,i,o,a].filter(Boolean).length;return t?u>=1:u>=2},Y_=e=>{if(/^https?:\/\//i.test(e)||/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)||/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d*:/.test(e)||/^(\/|\.\/|\.\.\/|[A-Za-z]:\\)/.test(e)||/^s3:\/\/[a-z0-9.-]+\//.test(e)||/^[A-Za-z][A-Za-z0-9]*(DefaultPolicy|DefaultRole|ServiceRole|EventsRole|ExecutionRole|LogRetention|LambdaFunction|Handler|Function|Role|Policy)[A-F0-9]{8,}$/.test(e)||/^sha256:[a-f0-9]{64}$/.test(e)||/^[a-f0-9]{40}$/.test(e)||/^Z[A-Z0-9]{14,22}$/.test(e)||/^[a-z]{2}-[a-z]+-\d_[A-Za-z0-9]{9,}$/.test(e)||/^(vpc|subnet|sg|igw|nat|rtb|acl|eni|i|ami|vol|snap|eipalloc)-[a-f0-9]{8,17}$/.test(e)||/^E[A-Z0-9]{13}$/.test(e))return!0;if(/^[A-Za-z0-9+/]{4,}={0,2}$/.test(e)){let t=new Set(e).size;if(e.length>50&&t<10)return!0}return!!J_(e)},J_=e=>{let t=e.length;for(let s=1;s<=t/2;s++)if(e.slice(0,s).repeat(Math.ceil(t/s)).slice(0,t)===e)return!0;return!1};var Ml=[/api[_-]?key/i,/secret[_-]?key/i,/^password$/i,/^passwd$/i,/credential/i,/private[_-]?key/i,/access[_-]?key/i,/auth[_-]?token/i,/bearer[_-]?token/i,/refresh[_-]?token/i,/client[_-]?secret/i,/app[_-]?secret/i,/secret[_-]?value/i,/aws[_-]?secret/i,/aws[_-]?access[_-]?key/i,/aws[_-]?session[_-]?token/i,/db[_-]?password/i,/database[_-]?password/i,/master[_-]?password/i,/master[_-]?user[_-]?password/i,/admin[_-]?password/i,/root[_-]?password/i,/connection[_-]?string/i,/stripe[_-]?key/i,/stripe[_-]?secret/i,/github[_-]?token/i,/gitlab[_-]?token/i,/slack[_-]?token/i,/slack[_-]?webhook/i,/discord[_-]?token/i,/twilio[_-]?token/i,/sendgrid[_-]?key/i,/mailgun[_-]?key/i,/datadog[_-]?key/i,/new[_-]?relic[_-]?key/i,/sentry[_-]?dsn/i,/webhook[_-]?secret/i,/signing[_-]?key/i,/signing[_-]?secret/i,/encryption[_-]?key/i,/jwt[_-]?secret/i,/hmac[_-]?key/i,/ssh[_-]?key/i,/ssh[_-]?private/i,/pem[_-]?key/i,/rsa[_-]?key/i],Nl=[/^A[BGIK-Z][A-Z]{2}[0-9A-Z]{16}$/,/^[A-Za-z0-9/+=]{40}$/,/-----BEGIN (RSA |EC |DSA |OPENSSH |ENCRYPTED )?PRIVATE KEY-----/,/-----BEGIN PGP PRIVATE KEY BLOCK-----/,/^eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,/^gh[pousr]_[A-Za-z0-9]{36,}$/,/^[srp]k_(live|test)_[A-Za-z0-9]{24,}$/,/^xox[bpas]-[A-Za-z0-9-]+$/,/^SK[a-f0-9]{32}$/i,/^SG\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/],Q_=[/\{\{resolve:secretsmanager:/,/{{resolve:secretsmanager:/,/\{\{resolve:ssm:/,/{{resolve:ssm:/,/\{\{resolve:ssm-secure:/,/{{resolve:ssm-secure:/,/^\/[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+(\/[a-zA-Z0-9_.-]+)+$/,/!Ref\s+\w+/,/!GetAtt\s+[\w.]+/,/!Sub\s+/,/\$\{[\w:.]+\}/,/\$\{Token\[/,/\[\[token:/i,/\${Token\[TOKEN\.\d+\]\}/,/^arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:\d*:/],X_=[/^<[^>]+>$/,/^CHANGE[_-]?ME$/i,/^REPLACE[_-]?ME$/i,/^TODO$/i,/^TODO:/i,/^FIXME$/i,/^XXX$/i,/^YOUR[_-]/i,/^INSERT[_-]/i,/^ENTER[_-]/i,/^\*+$/,/^x+$/i,/^\s*$/,/^default$/i,/^example$/i,/^sample$/i,/^test$/i,/^demo$/i,/^dummy$/i,/^fake$/i,/^mock$/i,/^placeholder$/i],eO=[/^Description$/i,/^AlarmDescription$/i,/^Comment$/i,/^Label$/i,/^Summary$/i,/^DisplayName$/i,/^Name$/i,/^PolicyName$/i,/^RoleName$/i,/^FunctionName$/i,/^QueueName$/i,/^TopicName$/i,/^BucketName$/i,/^TableName$/i,/^StreamName$/i,/^LogGroupName$/i,/^ParameterName$/i,/^SecretName$/i,/^StateMachineName$/i,/^RuleName$/i,/^AliasName$/i,/^StackName$/i,/^GroupName$/i,/^UserName$/i,/^PolicyDocument$/i,/^ClientId$/i,/^UserPoolClientId$/i,/^UserPoolId$/i,/^IdentityPoolId$/i,/^DistributionId$/i,/^HostedZoneId$/i,/^CertificateArn$/i,/^TopicArn$/i,/^QueueArn$/i,/^FunctionArn$/i,/^Arn$/i,/^EventPattern$/i,/^Definition$/i,/^DefinitionString$/i,/^Template$/i,/^TemplateURL$/i,/^TemplateBody$/i,/^EventSourceName$/i,/^PartnerEventSource$/i];var tO=[/(?:^|\.)Targets\[\d+\]\.Input$/,/(?:^|\.)Create$/,/(?:^|\.)Update$/,/(?:^|\.)Delete$/,/(?:^|\.)DefinitionString$/,/(?:^|\.)Code\.ZipFile$/,/(?:^|\.)Statement\[\d+\]\.Resource$/,/(?:^|\.)Statement\[\d+\]\.Resource\[\d+\]$/,/(?:^|\.)Statement\[\d+\]\.Sid$/],rC=e=>eO.some(t=>t.test(e));var iC=e=>tO.some(t=>t.test(e)),Wl=e=>Ml.some(t=>t.test(e)),Ul=e=>Nl.some(t=>t.test(e)),jl=e=>Q_.some(t=>t.test(e)),$l=e=>X_.some(t=>t.test(e)),pa=e=>{if(typeof e!="object"||e===null)return!1;let t=["Ref","Fn::GetAtt","Fn::Sub","Fn::Join","Fn::ImportValue","Fn::If","Fn::Select","Fn::Split","Fn::Base64","Fn::Cidr","Fn::FindInMap","Fn::GetAZs","Fn::Transform"],s=Object.keys(e);return s.length===1&&t.includes(s[0])},Gl=e=>{let t=[{patterns:[/api[_-]?key/i,/access[_-]?key/i],category:"api_key"},{patterns:[/password/i,/passwd/i],category:"password"},{patterns:[/private[_-]?key/i,/ssh[_-]?key/i,/pem[_-]?key/i,/rsa[_-]?key/i],category:"private_key"},{patterns:[/aws[_-]?secret/i,/aws[_-]?access/i],category:"aws_credentials"},{patterns:[/token/i,/bearer/i],category:"token"},{patterns:[/secret/i,/credential/i],category:"secret"},{patterns:[/connection[_-]?string/i,/database/i,/db[_-]/i],category:"database"},{patterns:[/webhook/i,/signing/i,/encryption/i,/hmac/i,/jwt/i],category:"encryption_key"}];for(let{patterns:s,category:n}of t)if(s.some(r=>r.test(e)))return n;return"secret"};var yi=e=>{let t={api_key:`Use AWS Secrets Manager to store API keys securely:
|
|
254
254
|
|
|
255
255
|
// CDK TypeScript example:
|
|
256
256
|
import { Secret } from 'aws-cdk-lib/aws-secretsmanager';
|
|
@@ -407,14 +407,14 @@ ${o}`)};var LD=require("node:child_process"),_D=()=>{try{return(0,LD.execFileSyn
|
|
|
407
407
|
See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html`};return t[e]||t.secret||`Use AWS Secrets Manager or SSM Parameter Store to securely manage this value.
|
|
408
408
|
See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html`};var Si=(e,t)=>{switch(e){case"property_name":return t?`Property name "${t}" suggests this contains sensitive data`:"Property name suggests sensitive data";case"value_pattern":return"Value matches a known secret pattern (API key, token, or credential format)";case"high_entropy":return"Value has high entropy (appears random), which is characteristic of secrets";default:return"Value appears to contain sensitive data"}};var bi={WAF_PILLAR:"Security",RULE_ID_PREFIX:"CDK-INSIGHTS-SENSITIVE",FOUND_BY:"cdkInsights"},oC=e=>{switch(e){case"value_pattern":return"CRITICAL";case"property_name":return"HIGH";case"high_entropy":return"MEDIUM"}},aC=e=>{let t=["CRITICAL","HIGH","MEDIUM","LOW"],s="MEDIUM",n=t.indexOf(s);for(let r of e){let i=oC(r.detectionReason),o=t.indexOf(i);o>=0&&o<n&&(s=i,n=o)}return s};var Hl=(e,t)=>{let s=e.length,n=s>=20?`${e.slice(0,4)}\u2026${e.slice(-4)}`:null;return{valueLength:s,valueShape:n,...t}},iO=e=>{for(let t of Ml)if(t.test(e))return t.source},oO=e=>{for(let t of Nl)if(t.test(e))return t.source},cC=(e,t,s={})=>{let n=[];return s.disabled?{hasSensitiveData:!1,resourceId:t,resourceType:e.Type,findings:[]}:(e.Properties&&da(e.Properties,"",n,s),{hasSensitiveData:n.length>0,resourceId:t,resourceType:e.Type,findings:n})},aO=new Set(["Tags"]),cO=e=>{if(!Array.isArray(e)||e.length===0)return!1;let t=e[0];return typeof t=="object"&&t!==null&&"Key"in t&&"Value"in t},da=(e,t,s,n)=>{if(e!=null){if(typeof e=="string"){uO(e,t,s,n);return}if(Array.isArray(e)){if(cO(e))return;e.forEach((r,i)=>{da(r,`${t}[${i}]`,s,n)});return}if(typeof e=="object"){if(pa(e))return;for(let[r,i]of Object.entries(e)){let o=t?`${t}.${r}`:r;if(!(aO.has(r)&&(Array.isArray(i)||typeof i=="object"))&&!n.ignoreProperties?.includes(o)&&!rC(r)&&!iC(o)){if(Wl(r)){if(typeof i=="string"){if(!uC(i,n)){let a=Gl(r)||"secret";s.push({propertyPath:o,propertyName:r,detectionReason:"property_name",detectionReasonMessage:Si("property_name",r),recommendation:yi(a),diagnostics:Hl(i,{matchedPropertyPattern:iO(r)})})}}else pa(i)||da(i,o,s,n);continue}da(i,o,s,n)}}}}},uO=(e,t,s,n)=>{if(!uC(e,n)){if(Ul(e)){let r=t.split(".").pop()??t;s.push({propertyPath:t,propertyName:r,detectionReason:"value_pattern",detectionReasonMessage:Si("value_pattern"),recommendation:yi("secret"),diagnostics:Hl(e,{matchedValuePattern:oO(e)})});return}if(Bl(e,n.strictMode)){let r=t.split(".").pop()??t,i=la(e),o=n.strictMode?4:4.5;s.push({propertyPath:t,propertyName:r,detectionReason:"high_entropy",detectionReasonMessage:Si("high_entropy"),recommendation:yi("secret"),diagnostics:Hl(e,{entropy:Math.round(i*100)/100,entropyThreshold:o})})}}},uC=(e,t)=>!!(!e||e.trim()===""||jl(e)||$l(e)||t.allowPatterns?.some(s=>e.includes(s)));var zl=(e,t)=>({resourceId:e.resourceId,issue:lO(e),recommendation:dO(e),severity:aC(e.findings),wafPillar:bi.WAF_PILLAR,foundBy:bi.FOUND_BY,constructPath:e.resourceId,constructType:e.resourceType,stackName:t,ruleId:bi.RULE_ID_PREFIX,context:{property:e.findings.map(s=>s.propertyPath).join(", "),value:"[REDACTED]",expected:"AWS Secrets Manager or SSM Parameter Store reference",diagnostics:e.findings.map(s=>({propertyPath:s.propertyPath,detectionReason:s.detectionReason,...s.diagnostics}))}}),lO=e=>{let t=e.findings.length===1?"Sensitive data detected in a resource property":`Sensitive data detected in ${e.findings.length} resource properties`,s=e.findings.map(n=>{let r=pO(n),i=n.diagnostics?.valueShape?` [shape: ${n.diagnostics.valueShape}]`:n.diagnostics?.valueLength?` [length: ${n.diagnostics.valueLength}]`:"";return` - ${n.propertyPath}: ${r}${i}`});return[`${t}:`,...s,"","This resource was NOT sent to CDK Insights servers."].join(`
|
|
409
409
|
`)},pO=e=>{let t=e.diagnostics;switch(e.detectionReason){case"high_entropy":return t?.entropy!==void 0&&t?.entropyThreshold!==void 0?`high entropy (${t.entropy} bits/char, threshold ${t.entropyThreshold})`:"high entropy";case"value_pattern":return t?.matchedValuePattern?`value matches known-secret pattern /${t.matchedValuePattern}/`:"value matches a known-secret pattern";case"property_name":return`sensitive property name "${e.propertyName}"`;default:return"value appears sensitive"}},dO=e=>{let t=e.findings.map(i=>`'${i.propertyPath}'`).join(", "),s=e.findings.some(i=>i.detectionReason==="high_entropy"),n=e.findings.some(i=>i.detectionReason==="property_name"),r=[];return r.push(" - A hardcoded API key, token, or password \u2192 move to AWS Secrets Manager or SSM Parameter Store."),s&&(r.push(" - A CDK-auto-generated resource name (likely if the property is a *Name) \u2192 provide an explicit name on the construct, or trust the short-circuit shipped with cdk-insights 1.2.7+."),r.push(" - A content hash (git SHA, Docker digest, JWT) \u2192 already exempt in 1.2.7+; upgrade the CLI if this is still firing.")),n&&r.push(" - An SSM parameter path or similar safe reference stored in a sensitive-sounding env var \u2192 pass it via CloudFormation intrinsics (Fn::Sub, !Ref) or SSM dynamic references ({{resolve:ssm:...}}) so the scanner can recognise it."),["Likely causes (in rough order of likelihood):",...r,"","If this is a known false positive, suppress it via the scanner config:",` { "ignoreProperties": [${t}] }`,"","See: https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html"].join(`
|
|
410
|
-
`)},ql=(e,t={})=>{let s=[],n=[],r=0;for(let[i,o]of Object.entries(e)){let a=cC(o,i,t);s.push(a),a.hasSensitiveData&&(n.push(i),r+=a.findings.length)}return{totalResourcesScanned:Object.keys(e).length,resourcesWithSensitiveData:n.length,totalFindings:r,hasSkippedResources:n.length>0,skippedResourceIds:n,detectionResults:s}};var fa=Z(require("node:fs")),lC=Z(require("node:path"));var ma=".cdk-insights-rules.json",mO=new Set(["CRITICAL","HIGH","MEDIUM","LOW"]),fO=new Set(["Operational Excellence","Security","Cost Optimization","Reliability","Performance Efficiency","Sustainability"]),gO=new Set(["property_exists","property_equals","property_matches","property_gt","property_lt","and","or"]);function pC(e,t){if(!e||typeof e!="object")return ye.warn(`Custom rule '${t}': condition must be an object`),!1;let s=e;if(!s.type||!gO.has(s.type))return ye.warn(`Custom rule '${t}': invalid condition type '${s.type}'`),!1;if(s.type==="and"||s.type==="or")return!Array.isArray(s.conditions)||s.conditions.length===0?(ye.warn(`Custom rule '${t}': '${s.type}' condition requires non-empty conditions array`),!1):s.conditions.every(n=>pC(n,t));if(typeof s.path!="string"||s.path.length===0)return ye.warn(`Custom rule '${t}': condition requires a non-empty 'path'`),!1;if(s.type==="property_matches")try{new RegExp(s.pattern)}catch{return ye.warn(`Custom rule '${t}': invalid regex pattern '${s.pattern}'`),!1}return(s.type==="property_gt"||s.type==="property_lt")&&typeof s.value!="number"?(ye.warn(`Custom rule '${t}': '${s.type}' requires a numeric value`),!1):!0}function hO(e,t){if(!e||typeof e!="object")return ye.warn(`Custom rule at index ${t}: must be an object`),null;let s=e;return typeof s.ruleId!="string"||s.ruleId.length===0?(ye.warn(`Custom rule at index ${t}: ruleId is required`),null):typeof s.name!="string"||s.name.length===0?(ye.warn(`Custom rule '${s.ruleId}': name is required`),null):typeof s.description!="string"?(ye.warn(`Custom rule '${s.ruleId}': description is required`),null):mO.has(s.severity)?fO.has(s.wafPillar)?!Array.isArray(s.resourceTypes)||s.resourceTypes.length===0?(ye.warn(`Custom rule '${s.ruleId}': resourceTypes must be a non-empty array`),null):typeof s.recommendation!="string"?(ye.warn(`Custom rule '${s.ruleId}': recommendation is required`),null):pC(s.condition,s.ruleId)?s:null:(ye.warn(`Custom rule '${s.ruleId}': invalid wafPillar '${s.wafPillar}'`),null):(ye.warn(`Custom rule '${s.ruleId}': invalid severity '${s.severity}'`),null)}function dC(e=process.cwd()){let t=lC.join(e,ma);if(!fa.existsSync(t))return[];try{let s=fa.readFileSync(t,"utf-8"),n=JSON.parse(s);if(!n.rules||!Array.isArray(n.rules))return ye.warn(`${ma}: 'rules' must be an array`),[];let r=[];for(let i=0;i<n.rules.length;i++){let o=hO(n.rules[i],i);o&&r.push(o)}return r.length>0&&ye.info(`Loaded ${r.length} custom rule(s) from ${ma}`),r}catch(s){return ye.warn(`Failed to load ${ma}: ${s instanceof Error?s.message:String(s)}`),[]}}var mC=e=>{if(!e)return;let t=e.trim();if(t)return t.replace(/\/+$/,"")},fC=e=>{let t=mC(e);return t||(mC("https://api.cdkinsights.dev/analysis/v1")??"")};var Xt=Z(require("node:fs")),Ft=Z(require("node:path")),es=require("aws-cdk-lib"),ts=require("cdk-nag");var Jl="2.2.0",va="cdk-insights::",ya=`${va}nagFinding::`,Ql=()=>{if(process.env.CDK_DEBUG==="true"||process.env.CDK_CONTEXT_JSON?.includes('"@aws-cdk/core:stackTrace":true')||process.env.CDK_CONTEXT_JSON?.includes('"@aws-cdk/core:stackTrace": true'))return!0;try{let{isStackTraceContextEnabledInCdkJson:e}=(yC(),Fa(hC));return e(process.cwd())===!0}catch{return!1}},
|
|
410
|
+
`)},ql=(e,t={})=>{let s=[],n=[],r=0;for(let[i,o]of Object.entries(e)){let a=cC(o,i,t);s.push(a),a.hasSensitiveData&&(n.push(i),r+=a.findings.length)}return{totalResourcesScanned:Object.keys(e).length,resourcesWithSensitiveData:n.length,totalFindings:r,hasSkippedResources:n.length>0,skippedResourceIds:n,detectionResults:s}};var fa=Z(require("node:fs")),lC=Z(require("node:path"));var ma=".cdk-insights-rules.json",mO=new Set(["CRITICAL","HIGH","MEDIUM","LOW"]),fO=new Set(["Operational Excellence","Security","Cost Optimization","Reliability","Performance Efficiency","Sustainability"]),gO=new Set(["property_exists","property_equals","property_matches","property_gt","property_lt","and","or"]);function pC(e,t){if(!e||typeof e!="object")return ye.warn(`Custom rule '${t}': condition must be an object`),!1;let s=e;if(!s.type||!gO.has(s.type))return ye.warn(`Custom rule '${t}': invalid condition type '${s.type}'`),!1;if(s.type==="and"||s.type==="or")return!Array.isArray(s.conditions)||s.conditions.length===0?(ye.warn(`Custom rule '${t}': '${s.type}' condition requires non-empty conditions array`),!1):s.conditions.every(n=>pC(n,t));if(typeof s.path!="string"||s.path.length===0)return ye.warn(`Custom rule '${t}': condition requires a non-empty 'path'`),!1;if(s.type==="property_matches")try{new RegExp(s.pattern)}catch{return ye.warn(`Custom rule '${t}': invalid regex pattern '${s.pattern}'`),!1}return(s.type==="property_gt"||s.type==="property_lt")&&typeof s.value!="number"?(ye.warn(`Custom rule '${t}': '${s.type}' requires a numeric value`),!1):!0}function hO(e,t){if(!e||typeof e!="object")return ye.warn(`Custom rule at index ${t}: must be an object`),null;let s=e;return typeof s.ruleId!="string"||s.ruleId.length===0?(ye.warn(`Custom rule at index ${t}: ruleId is required`),null):typeof s.name!="string"||s.name.length===0?(ye.warn(`Custom rule '${s.ruleId}': name is required`),null):typeof s.description!="string"?(ye.warn(`Custom rule '${s.ruleId}': description is required`),null):mO.has(s.severity)?fO.has(s.wafPillar)?!Array.isArray(s.resourceTypes)||s.resourceTypes.length===0?(ye.warn(`Custom rule '${s.ruleId}': resourceTypes must be a non-empty array`),null):typeof s.recommendation!="string"?(ye.warn(`Custom rule '${s.ruleId}': recommendation is required`),null):pC(s.condition,s.ruleId)?s:null:(ye.warn(`Custom rule '${s.ruleId}': invalid wafPillar '${s.wafPillar}'`),null):(ye.warn(`Custom rule '${s.ruleId}': invalid severity '${s.severity}'`),null)}function dC(e=process.cwd()){let t=lC.join(e,ma);if(!fa.existsSync(t))return[];try{let s=fa.readFileSync(t,"utf-8"),n=JSON.parse(s);if(!n.rules||!Array.isArray(n.rules))return ye.warn(`${ma}: 'rules' must be an array`),[];let r=[];for(let i=0;i<n.rules.length;i++){let o=hO(n.rules[i],i);o&&r.push(o)}return r.length>0&&ye.info(`Loaded ${r.length} custom rule(s) from ${ma}`),r}catch(s){return ye.warn(`Failed to load ${ma}: ${s instanceof Error?s.message:String(s)}`),[]}}var mC=e=>{if(!e)return;let t=e.trim();if(t)return t.replace(/\/+$/,"")},fC=e=>{let t=mC(e);return t||(mC("https://api.cdkinsights.dev/analysis/v1")??"")};var Xt=Z(require("node:fs")),Ft=Z(require("node:path")),es=require("aws-cdk-lib"),ts=require("cdk-nag");var Jl="2.2.0",va="cdk-insights::",ya=`${va}nagFinding::`,Ql=()=>{if(process.env.CDK_DEBUG==="true"||process.env.CDK_CONTEXT_JSON?.includes('"@aws-cdk/core:stackTrace":true')||process.env.CDK_CONTEXT_JSON?.includes('"@aws-cdk/core:stackTrace": true'))return!0;try{let{isStackTraceContextEnabledInCdkJson:e}=(yC(),Fa(hC));return e(process.cwd())===!0}catch{return!1}},Kl=!1,bO=()=>{if(!Kl){if(!Ql()){let e="\u{1F4A1} Tip: enable CDK stack traces for accurate source-location capture. Easiest path: `npx cdk-insights setup` writes `@aws-cdk/core:stackTrace: true` into your cdk.json context (durable). One-shot alternative: `CDK_DEBUG=true cdk synth`.";try{let{detectCdkVersion:t}=(To(),Fa(xS)),{version:s,supportsBoxTraces:n}=t();s&&!n&&(e+=` Detected aws-cdk-lib ${s}; upgrading to >= 2.252.0 unlocks per-property traces for Lazy/deferred values.`)}catch{}qe.info(e)}Kl=!0}},Sa=new Map,br=new Map,Ms=new Map,DO=e=>{let i={},o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let l=0;l<o.length;l++)i[o[l]]=l;let a=[],u=0,c=0;for(let l of e){let p=i[l];if(p!==void 0)if(c+=(p&31)<<u,(p&32)!==0)u+=5;else{let d=c&1;c>>=1,a.push(d?-c:c),c=0,u=0}}return a},vO=e=>{let t=e;if(Ms.has(t))return Ms.get(t)??null;try{let s=Xt.readFileSync(e,"utf-8"),n=s.match(/\/\/# sourceMappingURL=data:application\/json;base64,(.+)$/m);if(n){let o=Buffer.from(n[1],"base64").toString("utf-8"),a=JSON.parse(o);return Ms.set(t,a),a}let r=s.match(/\/\/# sourceMappingURL=(.+)$/m);if(r){let o=Ft.resolve(Ft.dirname(e),r[1]);if(Xt.existsSync(o)){let a=JSON.parse(Xt.readFileSync(o,"utf-8"));return Ms.set(t,a),a}}let i=`${e}.map`;if(Xt.existsSync(i)){let o=JSON.parse(Xt.readFileSync(i,"utf-8"));return Ms.set(t,o),o}}catch{}return Ms.set(t,null),null},CO=(e,t,s)=>{let n=vO(e);if(!n)return null;try{let r=n.mappings.split(";");if(t>r.length)return null;let i=0,o=0,a=0,u=0;for(let m=0;m<=Math.min(t-1,r.length-1);m++){let f=r[m].split(","),g=0;for(let h of f){if(!h)continue;let y=DO(h);if(y.length!==0&&(g+=y[0],y.length>=4&&(i+=y[1],o+=y[2],a+=y[3],y.length>=5&&(u+=y[4])),m===t-1&&g>=s))break}}let c=n.sources[i];if(!c)return null;let l=Ft.dirname(e),p=Ft.resolve(l,c),d=Ft.relative(process.cwd(),p);return{source:d.startsWith(".")?d:`./${d}`,line:o+1,column:a+1,name:n.names?.[u]}}catch{return null}},SC=(e,t="fallback")=>{let s=e.split(`
|
|
411
411
|
`),n=null,r;for(let i of s){if(i.includes("node_modules")||i.includes("aws-cdk-lib")||i.includes("cdk-insights"))continue;let o=i.match(/at\s+(?:new\s+)?(\w+(?:\.\w+)*)\s+\(/);o&&!r&&(r=o[1]);let a=i.match(/\(?([^()]+\.(ts|js|tsx|jsx)):(\d+):(\d+)\)?/);if(a){let[,u,c,l,p]=a,d=u.trim();!d.startsWith("/")&&!d.startsWith(".")&&(d=`./${d}`);let m=Number(l),f=Number(p);if((c==="js"||c==="jsx")&&(d.includes("/dist/")||d.includes("\\dist\\"))){let h=Ft.resolve(process.cwd(),d),y=CO(h,m,f);if(y)return{filePath:y.source,line:y.line,column:y.column,confidence:"high",method:"source_map",enclosingScope:y.name||r,originalFile:d}}let g={filePath:d,line:m,column:f,confidence:t==="creation_stack"?"high":"medium",method:t,enclosingScope:r};if(c==="ts"||c==="tsx")return g;n||(n=g)}}return n??void 0},AO=(e,t,s,n)=>{let r=`${s}:${t}`;if(br.has(r))return br.get(r)??void 0;try{let i=process.cwd(),o=["lib","cdk","src","bin","stacks","cdk/stacks","infrastructure","apps"],a=t.split("/"),u=a.length>1?a[a.length-2]:"",c=e==="Resource"||e==="Default"?n||u||e:e||t.split("/").pop()||"";for(let l of o){let p=Ft.join(i,l);if(!Xt.existsSync(p))continue;let d=bC(p);for(let m of d){let f=EO(m,c,u,i);if(f)return br.set(r,f),f}}}catch{}br.set(r,null)},bC=(e,t=[])=>{try{let s=Xt.readdirSync(e,{withFileTypes:!0});for(let n of s){let r=Ft.join(e,n.name);n.isDirectory()&&!n.name.startsWith(".")&&n.name!=="node_modules"?bC(r,t):n.isFile()&&(n.name.endsWith(".ts")||n.name.endsWith(".tsx"))&&t.push(r)}}catch{}return t},xO=(e,t,s=2)=>{let n=e.split(`
|
|
412
412
|
`),r=Math.max(0,t-1-s),i=Math.min(n.length,t+s);return n.slice(r,i).map((o,a)=>{let u=r+a+1;return`${u===t?">":" "}${u.toString().padStart(4)} | ${o}`}).join(`
|
|
413
413
|
`)},wO=(e,t)=>{let s=e.split(`
|
|
414
414
|
`),n,r=0,i=0;for(let o=0;o<Math.min(t,s.length);o++){let a=s[o],u=a.match(/class\s+(\w+)/),c=a.match(/(?:function\s+(\w+)|(\w+)\s*[=:]\s*(?:async\s*)?\(|(\w+)\s*\([^)]*\)\s*(?:=>|\{))/);if(u)n=u[1],i=r;else if(c){let l=c[1]||c[2]||c[3];l&&n?n=`${n}.${l}`:l&&(n=l),i=r}if(r+=(a.match(/{/g)||[]).length,r-=(a.match(/}/g)||[]).length,r<=i&&n){let l=n.split(".");l.length>1&&(n=l.slice(0,-1).join("."))}}return n},EO=(e,t,s,n)=>{try{let r=Sa.get(e);r||(r=Xt.readFileSync(e,"utf-8"),Sa.set(e,r));let i=r.split(`
|
|
415
415
|
`),o=[],a=new RegExp(`new\\s+(\\w+)\\s*\\(\\s*(?:this|\\w+)\\s*,\\s*['"\`]${ha(t)}['"\`]`,"g"),u=new RegExp(`(?:const|let|var)\\s+(${ha(t.replace(/[^a-zA-Z0-9]/g,""))})\\s*=\\s*new\\s+(\\w+)`,"gi"),c=new RegExp(`\\w+\\s*[=:]\\s*new\\s+(\\w+)\\s*\\(\\s*(?:this|\\w+)\\s*,\\s*['"\`]${ha(t)}['"\`]`,"g"),l=new RegExp(`\\.\\w+\\s*\\(\\s*['"\`]${ha(t)}['"\`]`,"g");for(let p=0;p<i.length;p++){let d=i[p],m=a.exec(d);if(m){o.push({line:p+1,column:m.index+1,constructorName:m[1],confidence:"high"}),a.lastIndex=0;continue}if(m=c.exec(d),m){o.push({line:p+1,column:m.index+1,constructorName:m[1],confidence:"high"}),c.lastIndex=0;continue}if(m=u.exec(d),m){o.push({line:p+1,column:m.index+1,constructorName:m[2],confidence:"medium"}),u.lastIndex=0;continue}m=l.exec(d),m&&(o.push({line:p+1,column:m.index+1,confidence:"low"}),l.lastIndex=0)}if(o.length>0){o.sort((x,v)=>{let E={high:0,medium:1,low:2};return E[x.confidence]-E[v.confidence]});let p=o[0],d=Ft.relative(n,e),m=wO(r,p.line),f=xO(r,p.line),g=p.line,h=0,y=0,b=!1;for(let x=p.line-1;x<i.length&&x<p.line+50;x++){let v=i[x];for(let E of v)if(E==="("||E==="{")E==="("?y++:h++,b=!0;else if((E===")"||E==="}")&&(E===")"?y--:h--,b&&y<=0&&h<=0)){g=x+1;break}if(g>p.line)break}return{filePath:d.startsWith(".")?d:`./${d}`,line:p.line,column:p.column,endLine:g>p.line?g:void 0,confidence:p.confidence,method:"source_analysis",enclosingScope:m,codeSnippet:f}}}catch{}},ha=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),RO=e=>{let t=e;if(t._creationStack?.length)return t._creationStack;if(t.creationStack?.length)return t.creationStack;let s=e.node.defaultChild;if(s?._creationStack?.length)return s._creationStack;if(s?.creationStack?.length)return s.creationStack;let n=e.node.scope;for(;n;){let r=n;if(r._creationStack?.length)return r._creationStack;if(r.creationStack?.length)return r.creationStack;n=n.node?.scope}},DC=(e,t)=>{try{let s=RO(e);if(s?.length){let a=s.join(`
|
|
416
416
|
`),u=SC(a,"creation_stack");if(u)return{...u,confidence:"high"}}for(let a of e.node.metadata)if(a.trace&&Array.isArray(a.trace)){let u=a.trace.join(`
|
|
417
|
-
`),c=SC(u,"metadata_trace");if(c)return c}let n=e.node.id,r=e.node.path,i=es.Stack.of(e),o=AO(n,r,i.stackName,t);return o||void 0}catch{}},FO=(e,t=10)=>{let s=e.node.scope,n=0;for(;s&&n<t;){let r=s.node.id,i=s.constructor.name;if(i==="Stack"||i==="App"||!r){s=s.node.scope,n++;continue}let o=DC(s,r);if(o)return{location:o,ancestorId:r,ancestorType:i};s=s.node.scope,n++}},IO=(e,t,s)=>{let n=e.constructor.name,r={CfnSubnet:"Vpc",CfnRouteTable:"Vpc or Subnet",CfnRoute:"Vpc or Subnet",CfnSubnetRouteTableAssociation:"Subnet",CfnInternetGateway:"Vpc",CfnVPCGatewayAttachment:"Vpc",CfnNatGateway:"Vpc (public subnet)",CfnEIP:"Vpc (for NAT Gateway)",CfnSecurityGroup:"Vpc or other L2 construct",CfnSecurityGroupIngress:"SecurityGroup",CfnSecurityGroupEgress:"SecurityGroup",CfnDBSubnetGroup:"DatabaseInstance or DatabaseCluster",CfnLogGroup:"Lambda Function or other service",CfnRole:"Lambda Function, ECS Task, or other service",CfnPolicy:"Role or User",CfnInstanceProfile:"Role"};if(t&&s)return`Created by ${t.replace(/\d+$/,"")} construct '${s}'`;let i=r[n];if(i){let o=e.node.scope;if(o&&o.node){let a=o.node.id,u=o.constructor.name.replace(/\d+$/,"");if(a&&u!=="Stack")return`Created by ${u} construct '${a}'`}return`Implicitly created by ${i}`}},kO=(e,t,s,n)=>{let r=[];t&&r.push(`'${t}'`);let i=e.split("/").filter(a=>a&&a!=="Resource"&&a!=="Default"&&!a.startsWith("Cfn")),o=i[i.length-1];if(o&&o!==t&&r.push(`'${o}'`),i.length>1){let a=i[i.length-2];a&&a!==t&&a!==o&&r.push(`'${a}'`)}if(s){let a=s.replace(/\d+$/,"");r.push(`new ${a}(`)}if(n){let a=n.split("::").pop()??"";a&&!r.some(u=>u.includes(a))&&r.push(`${a}`)}return r.length===0?`Search for: ${e}`:`Search for: ${r.slice(0,3).join(" or ")}`},TO={"AWS::S3":"Storage","AWS::DynamoDB":"Database","AWS::RDS":"Database","AWS::Lambda":"Compute","AWS::EC2":"Compute","AWS::ECS":"Containers","AWS::EKS":"Containers","AWS::IAM":"Security","AWS::KMS":"Security","AWS::SecretsManager":"Security","AWS::CloudWatch":"Management","AWS::CloudTrail":"Management","AWS::SNS":"Messaging","AWS::SQS":"Messaging","AWS::EventBridge":"Messaging","AWS::ApiGateway":"Networking","AWS::CloudFront":"Networking","AWS::ELB":"Networking","AWS::ElasticLoadBalancing":"Networking","AWS::VPC":"Networking","AWS::Route53":"Networking","AWS::Cognito":"Security","AWS::WAF":"Security","AWS::StepFunctions":"Integration","AWS::Kinesis":"Analytics","AWS::Glue":"Analytics","AWS::Athena":"Analytics","AWS::Redshift":"Analytics"},PO=[{pattern:/encryption|encrypted|kmsKey|sseSpecification/i,recommendation:"Enable encryption for data at rest",checkDefault:e=>e===!1||e===void 0||e===null},{pattern:/publicAccess|publicRead|publiclyAccessible/i,recommendation:"Restrict public access unless explicitly required",checkDefault:e=>e===!0},{pattern:/logging|accessLog|trailName/i,recommendation:"Enable logging for audit and compliance",checkDefault:e=>e===!1||e===void 0},{pattern:/versioning|versioningConfiguration/i,recommendation:"Enable versioning for data protection",checkDefault:e=>e===void 0||typeof e=="object"&&e!==null&&e.status!=="Enabled"},{pattern:/backupRetention|deletionProtection|deleteProtection/i,recommendation:"Configure backup and deletion protection",checkDefault:e=>e===!1||e===0||e===void 0},{pattern:/multiAz|multiAZ/i,recommendation:"Enable Multi-AZ for high availability",checkDefault:e=>e===!1},{pattern:/securityGroup|ingressRules|egressRules/i,recommendation:"Review security group rules"},{pattern:/iamRole|assumeRolePolicy|policyDocument/i,recommendation:"Review IAM permissions for least privilege"}],LO=e=>{try{let t=e.node.scope;if(!t)return{};let s=t.constructor.name;if(s.startsWith("Cfn")){let n=t.node?.scope;if(n)return{l2Type:n.constructor.name,l2Id:n.node?.id,l2Fqn:Zl(n)}}else return{l2Type:s,l2Id:t.node?.id,l2Fqn:Zl(t)}}catch{}return{}},Zl=e=>{try{let t=e;if(t.constructor.__jsii__?.fqn)return t.constructor.__jsii__.fqn;if(typeof t.constructor.fqn=="string")return t.constructor.fqn;let s=e.constructor.name;return s.startsWith("Cfn")?`aws-cdk-lib.${s}`:s}catch{return}},_O=e=>{let t=[];try{let s=e;for(;s;)t.unshift({id:s.node.id,type:s.constructor.name,fqn:Zl(s)}),s=s.node.scope}catch{}return t},OO=e=>{for(let[t,s]of Object.entries(TO))if(e.startsWith(t))return s},BO=e=>{let t=[];try{let n=e.cfnProperties;if(!n)return t;let r=(o,a)=>{for(let{pattern:u,recommendation:c,checkDefault:l}of PO)if(u.test(o)){let p=l?l(a):void 0,d=null;typeof a=="boolean"||typeof a=="number"?d=a:a==null?d=null:typeof a=="string"&&!es.Token.isUnresolved(a)?d=a.length>50?`${a.substring(0,47)}...`:a:typeof a=="string"?d="[Token]":d="[Object]",t.push({path:o,value:d,isDefault:p,recommendation:p?c:void 0});break}},i=(o,a="")=>{for(let[u,c]of Object.entries(o)){let l=a?`${a}.${u}`:u;r(l,c),c&&typeof c=="object"&&!Array.isArray(c)&&!es.Token.isUnresolved(c)&&i(c,l)}};i(n)}catch{}return t},MO=e=>{try{let s=e.cfnProperties;if(!s)return!0;let n=0;for(let r of Object.values(s))r!==void 0&&!es.Token.isUnresolved(r)&&n++;return n<3}catch{return!1}},NO=(e,t={})=>{let{captureSourceLocation:s=!0,captureTags:n=!0,captureRelationships:r=!0,captureHierarchy:i=!0,captureDependencies:o=!0,captureSensitiveProperties:a=!0}=t;if(!("cfnResourceType"in e))return null;let u=es.Stack.of(e),c=e.node.path,l=e.constructor.name,p=e.node.id,d=e,m=d.cfnResourceType,f;try{f=u.getLogicalId(d)}catch{}let{l2Type:g,l2Id:h}=LO(e),y=h?`${h} (${g||l})`:`${p} (${l})`,b={source:"cdk_insights",version:Jl,stackName:u.stackName,stackId:u.node.id,constructPath:c,constructType:l,friendlyName:y,timestamp:new Date().toISOString(),cfnResourceType:m};p&&(b.id=p),f&&(b.logicalId=f),g&&(b.l2ConstructType=g),h&&(b.l2ConstructId=h);let x=OO(m);if(x&&(b.serviceCategory=x),s){let v=DC(e,h);if(v)b.sourceLocation=v;else{let O=FO(e);O&&(b.rootSourceLocation=O.location),b.searchHint=kO(c,h,g,m)}let E=IO(e,g,h);E&&(b.createdBy=E)}if(r){let v=e.node.scope;v&&(b.parentPath=v.node.path),b.childCount=e.node.children.length}if(i){let v=_O(e);v.length>0&&(b.constructHierarchy=v)}if(o)try{let v=e.node.dependencies;if(v.length>0){let E=[];for(let O of v)if("cfnResourceType"in O)try{let M=u.getLogicalId(O);M&&E.push(M)}catch{}E.length>0&&(b.dependencies=E)}}catch{}if(a){let v=BO(e);v.length>0&&(b.sensitiveProperties=v),b.usesDefaults=MO(e)}if(n)try{let v=d.tagsRaw;if(v&&Object.keys(v).length>0)b.tags=v;else{let E=d.tags;if(E&&typeof E.renderTags=="function"){let O=E.renderTags();O&&Object.keys(O).length>0&&(b.tags=O)}}}catch{}try{let v=u.cdkVersion;v&&(b.cdkVersion=v)}catch{}return b},WO=new Set(["nodejs18.x","nodejs20.x","nodejs22.x","python3.11","python3.12","python3.13","java17","java21","dotnet8","ruby3.3","ruby3.4","provided.al2023"]),UO="Runtime is a current AWS Lambda LTS runtime (cdk-insights-maintained allowlist). cdk-nag's AwsSolutions-L1 check is heuristic and lags new LTS releases.",jO=["Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaENIManagementAccess","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaDynamoDBExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaMSKExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaAMQExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaSelfManagedKafkaExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaInvocation-DynamoDB","Policy::arn:<AWS::Partition>:iam::aws:policy/AWSXRayDaemonWriteAccess"],$O="AWS-managed Lambda execution policy that CDK auto-attaches based on event source bindings or tracing configuration. Each policy is narrowly scoped to a single AWS service (logs, VPC networking + ENI management, SQS, DDB streams, Kinesis, MSK, MQ, self-managed Kafka, DDB invocation, X-Ray daemon write); replacing them with customer-managed copies of identical permissions is busywork with no security gain. Other managed policies attached to the same role are not suppressed.",GO=e=>{if(!("cfnResourceType"in e))return;let t=e.cfnResourceType;if(t==="AWS::Lambda::Function"){let s=e.runtime;typeof s=="string"&&WO.has(s)&&ts.NagSuppressions.addResourceSuppressions(e,[{id:"AwsSolutions-L1",reason:UO}],!1)}t==="AWS::IAM::Role"&&ts.NagSuppressions.addResourceSuppressions(e,[{id:"AwsSolutions-IAM4",reason:$O,appliesTo:[...jO]}],!1)},HO='Suppressed via createCdkInsightsAspect({ suppressNagRules: [...] }). Replace this string entry with `{ id, reason: "<written justification>" }` to make the suppression auditable in checked-in code.',zO=e=>typeof e=="string"?{id:e,reason:HO}:e,vC=(e,t,s)=>{if(s.value||t.length===0)return;let n=e;for(;n.node.scope;)n=n.node.scope;ts.NagSuppressions.addResourceSuppressions(n,t.map(zO),!0),s.value=!0},CC=(e,t,s={})=>{if(bO(),s.cdkBoilerplateSuppressions&&GO(e),t)try{t.visit(e)}catch(r){qe.warn(`CDK-Nag error suppressed for ${e.node.path}: ${r.message}`)}let n=NO(e,{captureSourceLocation:s.captureSourceLocation,captureTags:s.captureTags,captureRelationships:s.captureRelationships,captureHierarchy:s.captureHierarchy,captureDependencies:s.captureDependencies,captureSensitiveProperties:s.captureSensitiveProperties});n&&es.Annotations.of(e).addInfo(`${va}${JSON.stringify(n)}`)},AC=(e={})=>{let{logCompliance:t=!1,logNotApplicable:s=!1,verbose:n=!1}=e;return{onCompliance:r=>{t&&qe.debug(`\u2713 ${r.resource.logicalId} is compliant with ${r.ruleId}`)},onNonCompliance:r=>{qe.warn(`\u2717 ${r.resource.logicalId} is non-compliant with ${r.ruleId}: ${r.ruleInfo}`)},onSuppressed:r=>{n&&qe.info(`\u2298 ${r.ruleId} suppressed on ${r.resource.logicalId}: ${r.suppressionReason}`)},onError:r=>{qe.error(`\u26A0 ${r.ruleId} error during validation: ${r.errorMessage}`)},onSuppressedError:r=>{n&&qe.warn(`\u2298 ${r.ruleId} error suppressed: ${r.errorSuppressionReason}`)},onNotApplicable:r=>{s&&n&&qe.debug(`- ${r.ruleId} not applicable to ${r.resource.logicalId}`)}}},xC=(e={})=>{let{logCompliance:t=!0,logNotApplicable:s=!1,verbose:n=!1}=e;return{onCompliance:r=>{t&&qe.info(`Yay! ${r.resource.logicalId} is compliant with ${r.ruleId}`)},onNonCompliance:r=>{qe.warn(`Boo! ${r.resource.logicalId} is non-compliant with ${r.ruleId}`)},onSuppressed:r=>{n&&qe.info(`Hmmmm... ${r.ruleId} has been suppressed on ${r.resource.logicalId} with reason: ${r.suppressionReason}`)},onError:r=>{qe.error(`WHAT?!?! ${r.ruleId} encountered an error during validation!`)},onSuppressedError:r=>{n&&qe.warn(`PHEW! ${r.ruleId} error was suppressed: ${r.errorSuppressionReason}`)},onNotApplicable:r=>{s&&n&&qe.debug(`Meh. ${r.ruleId} and ${r.resource.logicalId} aren't related at all.`)}}},Yl=class{onCompliance(t){}onNonCompliance(t){let s={source:"cdk-nag",ruleId:t.ruleId,ruleOriginalName:t.ruleOriginalName,ruleInfo:t.ruleInfo,ruleExplanation:t.ruleExplanation,severity:t.ruleLevel===ts.NagMessageLevel.ERROR?"HIGH":"MEDIUM",level:t.ruleLevel===ts.NagMessageLevel.ERROR?"Error":"Warning",resourcePath:t.resource.node.path,logicalId:t.resource.logicalId,...t.findingId?{findingId:t.findingId}:{}};es.Annotations.of(t.resource).addInfo(`${ya}${JSON.stringify(s)}`)}onSuppressed(t){}onError(t){es.Annotations.of(t.resource).addInfo(`${ya}${JSON.stringify({source:"cdk-nag",ruleId:t.ruleId,ruleOriginalName:t.ruleOriginalName,ruleInfo:t.ruleInfo,ruleExplanation:t.ruleExplanation,severity:"MEDIUM",level:"Warning",resourcePath:t.resource.node.path,logicalId:t.resource.logicalId,evaluationError:t.errorMessage})}`)}onSuppressedError(t){}onNotApplicable(t){}},ba=class extends ts.AwsSolutionsChecks{constructor(t){super(t);let s=[];for(let n of this.loggers)n.constructor.name!=="AnnotationLogger"&&s.push(n);s.push(new Yl),this.loggers=s}},wC=(e={})=>{let{runNagChecks:t=!0,captureSourceLocation:s=!0,captureTags:n=!0,captureRelationships:r=!0,captureHierarchy:i=!0,captureDependencies:o=!0,captureSensitiveProperties:a=!0,cdkBoilerplateSuppressions:u=!1,suppressNagRules:c}=e,l=t?new ba:null,p={value:!1};return{visit:d=>{c?.length&&vC(d,c,p),CC(d,l,{captureSourceLocation:s,captureTags:n,captureRelationships:r,captureHierarchy:i,captureDependencies:o,captureSensitiveProperties:a,cdkBoilerplateSuppressions:u})}}},Di=class{options;constructor(t={}){this.options={logCompliance:!0,logNotApplicable:!1,verbose:!1,...t}}onCompliance(t){this.options.logCompliance&&qe.info(`Yay! ${t.resource.logicalId} is compliant with ${t.ruleId}`)}onNonCompliance(t){qe.warn(`Boo! ${t.resource.logicalId} is non-compliant with ${t.ruleId}`)}onSuppressed(t){this.options.verbose&&qe.info(`Hmmmm... ${t.ruleId} has been suppressed on ${t.resource.logicalId} with reason: ${t.suppressionReason}`)}onError(t){qe.error(`WHAT?!?! ${t.ruleId} encountered an error during validation!`)}onSuppressedError(t){this.options.verbose&&qe.warn(`PHEW! ${t.ruleId} error was suppressed: ${t.errorSuppressionReason}`)}onNotApplicable(t){this.options.logNotApplicable&&this.options.verbose&&qe.debug(`Meh. ${t.ruleId} and ${t.resource.logicalId} aren't related at all.`)}},Da=class extends ts.NagPack{delegate;options;userSuppressionsApplied={value:!1};constructor(t){super(t),this.packName="CdkInsights",this.options={runNagChecks:t?.runNagChecks??!0,captureSourceLocation:t?.captureSourceLocation??!0,captureTags:t?.captureTags??!0,captureRelationships:t?.captureRelationships??!0,captureHierarchy:t?.captureHierarchy??!0,captureDependencies:t?.captureDependencies??!0,captureSensitiveProperties:t?.captureSensitiveProperties??!0,cdkBoilerplateSuppressions:t?.cdkBoilerplateSuppressions??!1,suppressNagRules:t?.suppressNagRules,logger:t?.logger},this.loggers.push(new Di(this.options.logger)),this.delegate=new ba}visit(t){this.options.suppressNagRules?.length&&vC(t,this.options.suppressNagRules,this.userSuppressionsApplied),CC(t,this.options.runNagChecks?this.delegate:null,this.options)}};var EC=()=>{Sa.clear(),br.clear(),Ms.clear(),Vl=!1},RC=()=>({sourceFiles:Sa.size,constructLocations:br.size,sourceMaps:Ms.size});var FC="1.0.0";var MC=Z(require("node:fs"));var IC=(e,t,s,n,r,i,o)=>({resourceId:e,issue:t,recommendation:s,severity:n,wafPillar:r,constructPath:i,foundBy:o});var Ca=Z(require("node:fs")),Aa=Z(require("node:path")),kC="cdk-insights::",qO="aws:cdk:acknowledged-rules",TC=e=>{let t=Aa.join(Aa.dirname(e),"manifest.json");if(!Ca.existsSync(t))return[];let s;try{s=JSON.parse(Ca.readFileSync(t,"utf-8"))}catch{return[]}let n=[],r=s.artifacts??{};for(let i of Object.values(r)){let o=i.metadata??{};for(let[a,u]of Object.entries(o))for(let c of u)if(c.type===qO&&!(!c.data||typeof c.data!="object"))for(let[l,p]of Object.entries(c.data)){if(!l.startsWith(kC))continue;let d=l.slice(kC.length);if(!d)continue;let m=typeof p=="string"?p:"";n.push({constructPath:a,ruleId:d,reason:m})}}return n};var xa=Z(require("node:fs")),_C=Z(require("node:path")),PC={ignoreRules:[],ignorePaths:[]},LC=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.length>0):[],OC=(e=process.cwd())=>{let t=_C.join(e,".cdk-insights.json");if(!xa.existsSync(t))return PC;try{let s=JSON.parse(xa.readFileSync(t,"utf-8"));return{ignoreRules:LC(s.ignoreRules),ignorePaths:LC(s.ignorePaths)}}catch{return PC}};var BC={LOW:1,MEDIUM:2,HIGH:3,CRITICAL:4},NC="cdk-insights",KO=()=>Array.from(new Set(Object.values(sr).map(e=>e.ruleId).filter(e=>typeof e=="string"))),VO=(e,t,s)=>{let n=e.constructPath?[e.constructPath]:[],r={wafPillar:e.wafPillar,foundBy:e.foundBy},i={ruleName:e.ruleId??NC,description:e.issue,severity:e.severity,violatingResources:[{resourceLogicalId:t,templatePath:s,locations:n}],ruleMetadata:r};return e.recommendation?{...i,fix:e.recommendation}:i},vi=class{name=NC;version;ruleIds;options;constructor(t={}){this.options=t,this.version=t.version,this.ruleIds=KO()}validate(t){let s=BC[this.options.minimumSeverity??"LOW"],n=[],r=this.options.ignoreProjectConfig?{ignoreRules:[],ignorePaths:[]}:OC(this.options.cwd??process.cwd());for(let i of t.templatePaths){let o;try{o=JSON.parse(MC.readFileSync(i,"utf-8"))}catch{continue}let a=this.options.ignoreInlineAcknowledgements?[]:TC(i),u=Fo(o,IC,this.options.selectedServices??[],{},this.options.customRules??[]);for(let[c,l]of Object.entries(u))for(let p of l.issues){if(BC[p.severity]<s)continue;let d=[c,p.constructPath].filter(m=>typeof m=="string"&&m.length>0);ua(p,d,{ignoreRules:r.ignoreRules,ignorePaths:r.ignorePaths,acknowledgements:a})||n.push(VO(p,c,i))}}return{violations:n,success:n.length===0,...this.version?{pluginVersion:this.version}:{}}}},WC=(e={})=>new vi(e);var Ea=async(e,t)=>{try{return await e()}catch(s){return st.warn(`\u26A0\uFE0F Error in ${t.operationName}:`,{error:s}),t.fallbackValue}},ZO=e=>!e||e.length===0||e.includes("All services"),YO=(e,t)=>{if(ZO(t))return e;let s=new Set((t??[]).map(n=>`AWS::${n}::`));return Object.fromEntries(Object.entries(e).filter(([,n])=>{for(let r of s)if(n.Type.startsWith(r))return!0;return!1}))},JO=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>!t.Type.startsWith("AWS::CDK::"))),QO=e=>{let{stackName:t,pathToLogicalId:s}=e;return n=>({resourceId:n,friendlyName:s[n]??n,cdkPath:`${t}/${n}`,isGenerated:!1,sources:{cdkInsights:{issues:[]},cdkNag:{issues:[]}}})},Ns=(e,t,s)=>{let n=e[t];if(n)return n;let r=s(t);return e[t]=r,r},HC=e=>[...e.sources?.cdkInsights?.issues??[],...e.sources?.cdkNag?.issues??[],...e.sources?.validationReport?.issues??[]],UC=e=>{for(let t of Object.values(e))for(let s of HC(t))if(s.severity==="CRITICAL")return!0;return!1},XO=e=>{for(let[t,s]of Object.entries(e))(s.sources?.cdkInsights?.issues?.length??0)>0||(s.sources?.cdkNag?.issues?.length??0)>0||(s.sources?.validationReport?.issues?.length??0)>0||delete e[t];return e},wa=(e,t,s,n,r,i,o)=>({resourceId:e,issue:t,recommendation:s,severity:n,wafPillar:r,foundBy:o,constructPath:i}),e2=e=>{let{recommendationMap:t,stackName:s,stackResources:n,manifest:r}=e;try{let i=new Map,o=a=>{let u=i.get(a);if(u)return u;let c=XD(r,a);return i.set(a,c),c};return Object.entries(t).reduce((a,[u,c])=>{let l=c.cdkPath||u,p=o(l),d=n[u]?.Type||"Unknown",m=g=>({...g,...p?.filePath&&{sourceLocation:{filePath:p.filePath,line:p.line||1,column:p.column||1,confidence:p.confidence||"low"}},stackName:s,constructType:d}),f=(c.sources?.validationReport?.issues??[]).map(m);return a[u]={...c,sources:{cdkInsights:{issues:(c.sources?.cdkInsights?.issues??[]).map(m)},cdkNag:{issues:(c.sources?.cdkNag?.issues??[]).map(m)},...f.length>0?{validationReport:{issues:f}}:{}}},a},{})}catch(i){return st.warn("\u26A0\uFE0F Could not enrich issues with source location:",{error:i}),t}},t2=e=>{let{authToken:t,fingerprint:s,tier:n,quotaValidation:r}=e,i=!!(t&&s&&n),o=!r||r.canRunStaticAnalysis,a=!r||r.canRunAIAnalysis,u=!!(n&&si.isFeatureEnabled("aiAnalysis",n));return{hasAuth:i,canRunStatic:o,canRunAI:i&&u&&a,isAiEnabledByTier:u,canRunAIByQuota:a}},s2=async e=>{let{userResources:t,selectedServices:s,constructRegistry:n,canRunStatic:r,customRules:i=[],ruleContext:o}=e,a=Object.keys(t).length;return a===0?{}:r?(V.phase1(`Static analysis on ${a} resource${a===1?"":"s"}`),await Ea(()=>Promise.resolve(Fo({Resources:t},wa,s||[],n,i,o)),{operationName:"static analysis",fallbackValue:{}})??{}):(V.warning("\u26A0\uFE0F Static analysis skipped due to license restrictions"),{})},n2=async e=>{let{stackName:t,userResources:s,inlineFindings:n,pathToLogicalId:r,authToken:i,fingerprint:o,tier:a,noCache:u=!1,cache:c,capabilities:l,aiModelId:p,aiBatchSize:d}=e,m=Object.keys(s).length;if(m===0)return{results:{}};if(!l.hasAuth)return{results:{},skippedReason:"auth"};if(a&&!l.isAiEnabledByTier)return V.comment("\u{1F4A1} AI analysis is available with Pro tier - upgrade for deeper insights"),{results:{},skippedReason:"unavailable"};if(!l.canRunAIByQuota&&l.canRunStatic)return a==="pro"?V.comment("\u{1F4A1} AI analysis skipped \u2014 monthly AI credit allowance reached. Static scans continue; AI resumes next billing cycle."):V.comment("\u{1F4A1} AI analysis skipped \u2014 credit allowance reached. Upgrade to Pro for 5,000 AI credits/month."),{results:{},skippedReason:"cap-reached"};if(!l.canRunAI)return{results:{},skippedReason:"unavailable"};if(!i||!o)return st.warn("AI analysis skipped: missing authToken or fingerprint"),{results:{},skippedReason:"auth"};V.phase2(`AI analysis on ${m} resource${m===1?"":"s"}`);let f=fC(),g=MD(Lt,f),h=UD(Lt,f),y=lb(eC),b=xD({analyzeResource:g,analyzeResourcesBatch:h,redactResources:y});return{results:await Ea(()=>b({stackName:t,resources:s,authToken:i,existingFindingsMap:n,pathToLogicalId:r,fingerprint:o,noCache:u,cacheConfig:c,aiModelId:p,aiBatchSize:d}),{operationName:"AI analysis",fallbackValue:{}})??{}}},jC=e=>{let{recommendationMap:t,ignoreRules:s=[],ignorePaths:n=[],acknowledgements:r=[],baselineExclude:i,stackName:o=""}=e;if(s.length===0&&n.length===0&&r.length===0&&(!i||i.size===0))return t;for(let[a,u]of Object.entries(t)){let c=[a,u.cdkPath,u.friendlyName,u.displayName].filter(d=>typeof d=="string"&&d.length>0);if(n.some(d=>c.some(m=>ca(m,d)))){delete t[a];continue}let p=[u.cdkPath].concat(c).filter(d=>typeof d=="string"&&d.length>0);for(let d of["cdkInsights","cdkNag","validationReport"]){let m=u.sources?.[d];m&&(m.issues=m.issues.filter(f=>{let g=[f.constructPath,...p].filter(y=>typeof y=="string"&&y.length>0);if(ua(f,g,{ignoreRules:s,acknowledgements:r}))return!1;if(i&&i.size>0){let y=hl(o,u,f);if(i.has(y))return!1}return!0}))}}return t},r2=e=>{let{recommendationMap:t,ruleFilter:s}=e;if(s.length===0)return t;for(let[n,r]of Object.entries(t)){let i=HC(r),o=yl(i,s);if(o.length===0){delete t[n];continue}r.sources||(r.sources={cdkInsights:{issues:[]},cdkNag:{issues:[]}}),r.sources.cdkInsights||(r.sources.cdkInsights={issues:[]}),r.sources.cdkNag||(r.sources.cdkNag={issues:[]}),r.sources.cdkInsights.issues=o.filter(u=>u.foundBy==="cdkInsights"),r.sources.cdkNag.issues=o.filter(u=>u.foundBy==="cdkNag");let a=o.filter(u=>u.foundBy==="validationReport");a.length>0?r.sources.validationReport={issues:a}:r.sources.validationReport&&(r.sources.validationReport.issues=[])}return t},i2=async e=>{let{stackName:t,recommendationMap:s,summary:n,tier:r}=e;if(!r||!si.isFeatureEnabled("githubIntegration",r)){V.warning("GitHub integration is not available for your current tier"),V.comment(QS("githubIntegration",r??"free","GitHub integration"));return}let i=_D(),o=!!process.env.GITHUB_TOKEN;if(!i&&!o){V.warning("GitHub CLI not found and GITHUB_TOKEN not set. Skipping issue creation."),V.comment("Install GitHub CLI (gh) or set GITHUB_TOKEN environment variable to enable issue creation.");return}V.section("Creating GitHub Issue","\u{1F419}");let a=gr(t,s,n);await Ea(()=>PD({stackName:t,issueTitle:`CDK Insights Analysis for ${t}`,issueBody:a,ghCli:i,recommendations:s,summary:n}),{operationName:"creating GitHub issue"})},$C=async({stackName:e,stack:t,selectedServices:s,inlineFindings:n,validationReportFindings:r,recommendationMapPerStack:i,pathToLogicalId:o,constructRegistry:a,ruleFilter:u,ignoreRules:c,ignorePaths:l,acknowledgements:p=[],authToken:d,fingerprint:m,output:f,withIssue:g,tier:h,noCache:y=!1,warnSensitive:b=!1,sensitiveDataDetection:x={},cache:v,quotaValidation:E,manifest:O,customRules:M=[],cdkContext:P,resourceIdMetadata:X,aiModelId:B,aiBatchSize:z,forceLocal:ne=!1,baselineExclude:ie,collectFingerprints:se,skipRendering:_=!1,appContext:U})=>{let Y=t.Resources??{},ae=YO(Y,s),W=JO(ae),ee=new Set(Object.keys(W)),te=ee.size,pe=t2({authToken:d,fingerprint:m,tier:h,quotaValidation:E}),ce=QO({stackName:e,pathToLogicalId:o}),Le=i[e]||{},De=Re=>{let je=ce(Re),lt=Le[Re];return lt?{...je,...lt,sources:je.sources}:je},re=pe.canRunAI?Object.fromEntries(Object.keys(W).map(Re=>[Re,De(Re)])):{};for(let[Re,je]of Object.entries(Le)){let lt=je.sources?.cdkNag?.issues??[];if(lt.length===0)continue;Ns(re,Re,De).sources.cdkNag.issues.push(...lt)}for(let Re of n)Ns(re,Re.resourceId,De).sources.cdkNag.issues.push(Re);let G=P||X?{cdkContext:P,resourceIdMetadata:X}:void 0,k=await s2({userResources:W,selectedServices:s,constructRegistry:a,canRunStatic:pe.canRunStatic,customRules:M,ruleContext:G});for(let[Re,je]of Object.entries(k)){let lt=Ns(re,Re,De),Ci=je.issues??[];lt.sources.cdkInsights.issues.push(...Ci)}let J=vu(t,wa,u,U);for(let[Re,je]of Object.entries(J))Ns(re,Re,De).sources.cdkInsights.issues.push(...je.issues);let Se=so(t,wa);for(let[Re,je]of Object.entries(Se))Ns(re,Re,De).sources.cdkInsights.issues.push(...je.issues);let K=to(t,wa);for(let[Re,je]of Object.entries(K))Ns(re,Re,De).sources.cdkInsights.issues.push(...je.issues);let he=ql(W,{disabled:x.disabled,ignoreProperties:x.ignoreProperties,allowPatterns:x.allowPatterns,strictMode:x.strictMode}),He=W;if(he.hasSkippedResources){let Re=he.resourcesWithSensitiveData;V.warning(`\u{1F512} Sensitive data detected in ${Re} resource${Re===1?"":"s"} - NOT sent to CDK Insights servers`),He=Object.fromEntries(Object.entries(W).filter(([je])=>!he.skippedResourceIds.includes(je)));for(let je of he.detectionResults)if(je.hasSensitiveData){let lt=Ns(re,je.resourceId,De),Ci=zl(je,e);lt.sources.cdkInsights.issues.push(Ci)}}let xe=new Set(Object.entries(re).filter(([,Re])=>Re.sources.cdkInsights.issues.length>0||Re.sources.cdkNag.issues.length>0).map(([Re])=>Re)),mt=Object.fromEntries(Object.entries(He).filter(([Re])=>xe.has(Re))),It=Object.keys(He).length-Object.keys(mt).length;It>0&&pe.canRunAI&&V.comment(`\u{1F3AF} Skipping AI analysis on ${It} resource${It===1?"":"s"} with no static findings`);let Ue=await n2({stackName:e,userResources:mt,inlineFindings:n,pathToLogicalId:o,authToken:d,fingerprint:m,tier:h,noCache:y,cache:v,capabilities:pe,aiModelId:B,aiBatchSize:z}),bs=Ue.results,zC=ne?"local-mode":Ue.skippedReason;d&&m&&Object.keys(bs).length>0&&V.phase3("Processing results...");let qC=nC({staticRecommendations:{},aiRecommendations:bs,recommendationMap:re,ruleFilter:u,filterIssuesByRule:yl});for(let[Re,je]of Object.entries(qC.updatedMap)){let lt=Ns(re,Re,De);lt.sources.cdkInsights.issues.push(...bn({existing:lt.sources.cdkInsights.issues,incoming:je.sources.cdkInsights.issues}))}if($D({stackName:e,validationReportFindings:r,recommendationMap:re,createIssueGroup:De}),r2({recommendationMap:re,ruleFilter:u}),jC({recommendationMap:re,ignoreRules:c,ignorePaths:l,acknowledgements:p}),se)for(let{fingerprint:Re}of HD(e,re))se.add(Re);ie&&ie.size>0&&jC({recommendationMap:re,baselineExclude:ie,stackName:e}),XO(re);let An=e2({recommendationMap:re,stackName:e,stackResources:W,manifest:O}),Ra=aa(An,te,ee,zC),Xl=Object.keys(An).length>0;return i[e]=An,!_&&f&&f!=="table"&&Qv(f,e,An,!0,Ra),g&&Xl&&await i2({stackName:e,recommendationMap:An,summary:Ra,tier:h}),{recommendationMap:An,summary:Ra,hasIssues:Xl,scannedResourceCount:te,scannedResourceIds:ee,stackName:e,sensitiveDataSummary:he,hasSensitiveData:he.hasSkippedResources}},o2=async({stacks:e,inlineFindings:t,validationReportFindings:s=[],pathToLogicalId:n,output:r,recommendationMapPerStack:i,withIssue:o,services:a,ruleFilter:u=[],ignoreRules:c=[],ignorePaths:l=[],acknowledgementsPerStack:p={},authToken:d,fingerprint:m,failOnCritical:f,tier:g,noCache:h=!1,allowOveruse:y=!1,warnSensitive:b=!1,sensitiveDataDetection:x={},cache:v,quotaValidation:E,cdkContext:O,resourceIdMetadata:M,aiModelId:P,aiBatchSize:X,forceLocal:B=!1,baselineExclude:z,collectFingerprints:ne,skipRendering:ie=!1})=>{if(st.info("\u{1F680} Starting CDK Insights analysis",{stackCount:Object.keys(e).length,stackNames:Object.keys(e),hasAuthToken:!!d,hasFingerprint:!!m,tier:g||"unknown",quotaValidation:E?{canRunStaticAnalysis:E.canRunStaticAnalysis,canRunAIAnalysis:E.canRunAIAnalysis,isTrial:E.quota?.isTrial}:null,services:a||["All services"],output:r||"table"}),E&&!E.quota.isTrial&&E.canRunAIAnalysis&&y){let k=E.quota.currentResourcesAnalyzed>=E.quota.maxResources,J=E.quota.wouldExceed;k?(V.warning(`\u26A0\uFE0F You have used ${E.quota.currentResourcesAnalyzed}/${E.quota.maxResources} AI credits this billing period.`),V.warning(" Proceeding with AI analysis as --allow-overuse is enabled.")):J&&(V.warning(`\u26A0\uFE0F This analysis will exceed your AI credit allowance (${E.quota.currentResourcesAnalyzed}/${E.quota.maxResources}).`),V.warning(" Proceeding with AI analysis as --allow-overuse is enabled."))}let se=dC(),_=tC("cdk.out"),U=await Ea(()=>Of(Lf()),{operationName:"loading construct metadata",fallbackValue:{}})??{},Y={},ae=!1,W=!1,ee=0,te=new Set,pe=Object.keys(e),ce=pe.length,Le=new Map;for(let k of pe){let J=e[k]?.Outputs??{};Le.set(k,new Set(Object.keys(J)))}let De={outputsByStack:Le},re=k=>{let{stackName:J,map:Se}=k;for(let[K,he]of Object.entries(Se))Y[`${J}:${K}`]=he};if(ce>1)await Yo.runAnalysis({title:`Deep Analysis of ${ce} CDK Stacks`,steps:pe.map((k,J)=>({title:`Analyzing stack ${J+1}/${ce}: ${k}`,task:async()=>{let Se=e[k],K=await $C({stackName:k,stack:Se,selectedServices:a,inlineFindings:t,validationReportFindings:s,recommendationMapPerStack:i,pathToLogicalId:n,constructRegistry:U,ruleFilter:u,ignoreRules:c,ignorePaths:l,acknowledgements:p[k]??[],authToken:d,fingerprint:m,output:r,withIssue:o,tier:g,noCache:h,warnSensitive:b,sensitiveDataDetection:x,cache:v,quotaValidation:E,manifest:_,customRules:se,cdkContext:O,resourceIdMetadata:M,aiModelId:P,aiBatchSize:X,forceLocal:B,baselineExclude:z,collectFingerprints:ne,skipRendering:ie,appContext:De});re({stackName:K.stackName,map:K.recommendationMap}),ee+=K.scannedResourceCount;for(let he of K.scannedResourceIds)te.add(`${K.stackName}:${he}`);return!ae&&K.hasIssues&&(ae=UC(K.recommendationMap)),K.hasSensitiveData&&(W=!0),!ie&&(r==="summary"||r==="table")&&V.summary(K.summary),K}})),showSummary:!0});else{let[k,J]=Object.entries(e)[0]??[];if(!k||!J)return{recommendationMaps:{},hasCriticalIssues:!1,scannedResourceIds:new Set};let Se=Object.entries(J.Resources||{}).filter(([,he])=>!he.Type.startsWith("AWS::CDK::")).length;V.analysisStart(k,Se);let K=await $C({stackName:k,stack:J,selectedServices:a,inlineFindings:t,validationReportFindings:s,recommendationMapPerStack:i,pathToLogicalId:n,constructRegistry:U,ruleFilter:u,ignoreRules:c,ignorePaths:l,acknowledgements:p[k]??[],authToken:d,fingerprint:m,output:r,withIssue:o,tier:g,noCache:h,warnSensitive:b,sensitiveDataDetection:x,cache:v,quotaValidation:E,manifest:_,customRules:se,cdkContext:O,resourceIdMetadata:M,aiModelId:P,aiBatchSize:X,forceLocal:B,baselineExclude:z,collectFingerprints:ne,skipRendering:ie,appContext:De});re({stackName:K.stackName,map:K.recommendationMap}),ee+=K.scannedResourceCount;for(let he of K.scannedResourceIds)te.add(`${K.stackName}:${he}`);K.hasIssues&&(ae=UC(K.recommendationMap)),K.hasSensitiveData&&(W=!0),!ie&&(r==="summary"||r==="table")&&V.summary(K.summary)}if(ie)return{recommendationMaps:Y,hasCriticalIssues:!1,hasSensitiveData:W,scannedResourceIds:te};if(Object.keys(Y).length>0&&ce>1){let k=aa(Y,ee,te);if(r==="table"||r==="summary")V.section("Overall Analysis Summary","\u{1F4CA}"),V.summary(k),r==="table"&&(hi(Y),V.section("Overall Analysis Summary (continued)","\u{1F4CA}"),V.summary(k));else if(r==="sarif"){let J=oa("consolidated",Y),Se="consolidated_analysis_report.sarif";GC.writeFileSync(Se,JSON.stringify(J,null,2)),V.info(`\u{1F4C4} Consolidated SARIF report written to: ${Se}`)}else r==="github-actions"&&ea("consolidated",Y,k.severityCounts,ee)}else if(r==="table"||r==="summary")if(Object.keys(Y).length>0){let k=aa(Y,ee,te);V.section("Overall Analysis Summary","\u{1F4CA}"),V.summary(k),r==="table"&&(hi(Y),V.section("Overall Analysis Summary (continued)","\u{1F4CA}"),V.summary(k))}else V.success("No issues found across all stacks!");return{recommendationMaps:Y,hasCriticalIssues:!!f&&ae||W&&!b,hasSensitiveData:W,scannedResourceIds:te}};0&&(module.exports={CDK_INSIGHTS_ANNOTATION_PREFIX,CDK_INSIGHTS_METADATA_VERSION,CDK_INSIGHTS_NAG_FINDING_PREFIX,CdkInsightsAspect,CdkInsightsPolicyValidationPlugin,ExtremelyHelpfulConsoleLogger,SCAN_REPORT_SCHEMA_VERSION,clearCaches,createCdkInsightsAspect,createCdkInsightsLogger,createCdkInsightsPolicyValidationPlugin,createExtremelyHelpfulConsoleLogger,getCacheStats,isCdkDebugEnabled,runAnalysis});
|
|
417
|
+
`),c=SC(u,"metadata_trace");if(c)return c}let n=e.node.id,r=e.node.path,i=es.Stack.of(e),o=AO(n,r,i.stackName,t);return o||void 0}catch{}},FO=(e,t=10)=>{let s=e.node.scope,n=0;for(;s&&n<t;){let r=s.node.id,i=s.constructor.name;if(i==="Stack"||i==="App"||!r){s=s.node.scope,n++;continue}let o=DC(s,r);if(o)return{location:o,ancestorId:r,ancestorType:i};s=s.node.scope,n++}},IO=(e,t,s)=>{let n=e.constructor.name,r={CfnSubnet:"Vpc",CfnRouteTable:"Vpc or Subnet",CfnRoute:"Vpc or Subnet",CfnSubnetRouteTableAssociation:"Subnet",CfnInternetGateway:"Vpc",CfnVPCGatewayAttachment:"Vpc",CfnNatGateway:"Vpc (public subnet)",CfnEIP:"Vpc (for NAT Gateway)",CfnSecurityGroup:"Vpc or other L2 construct",CfnSecurityGroupIngress:"SecurityGroup",CfnSecurityGroupEgress:"SecurityGroup",CfnDBSubnetGroup:"DatabaseInstance or DatabaseCluster",CfnLogGroup:"Lambda Function or other service",CfnRole:"Lambda Function, ECS Task, or other service",CfnPolicy:"Role or User",CfnInstanceProfile:"Role"};if(t&&s)return`Created by ${t.replace(/\d+$/,"")} construct '${s}'`;let i=r[n];if(i){let o=e.node.scope;if(o&&o.node){let a=o.node.id,u=o.constructor.name.replace(/\d+$/,"");if(a&&u!=="Stack")return`Created by ${u} construct '${a}'`}return`Implicitly created by ${i}`}},kO=(e,t,s,n)=>{let r=[];t&&r.push(`'${t}'`);let i=e.split("/").filter(a=>a&&a!=="Resource"&&a!=="Default"&&!a.startsWith("Cfn")),o=i[i.length-1];if(o&&o!==t&&r.push(`'${o}'`),i.length>1){let a=i[i.length-2];a&&a!==t&&a!==o&&r.push(`'${a}'`)}if(s){let a=s.replace(/\d+$/,"");r.push(`new ${a}(`)}if(n){let a=n.split("::").pop()??"";a&&!r.some(u=>u.includes(a))&&r.push(`${a}`)}return r.length===0?`Search for: ${e}`:`Search for: ${r.slice(0,3).join(" or ")}`},TO={"AWS::S3":"Storage","AWS::DynamoDB":"Database","AWS::RDS":"Database","AWS::Lambda":"Compute","AWS::EC2":"Compute","AWS::ECS":"Containers","AWS::EKS":"Containers","AWS::IAM":"Security","AWS::KMS":"Security","AWS::SecretsManager":"Security","AWS::CloudWatch":"Management","AWS::CloudTrail":"Management","AWS::SNS":"Messaging","AWS::SQS":"Messaging","AWS::EventBridge":"Messaging","AWS::ApiGateway":"Networking","AWS::CloudFront":"Networking","AWS::ELB":"Networking","AWS::ElasticLoadBalancing":"Networking","AWS::VPC":"Networking","AWS::Route53":"Networking","AWS::Cognito":"Security","AWS::WAF":"Security","AWS::StepFunctions":"Integration","AWS::Kinesis":"Analytics","AWS::Glue":"Analytics","AWS::Athena":"Analytics","AWS::Redshift":"Analytics"},PO=[{pattern:/encryption|encrypted|kmsKey|sseSpecification/i,recommendation:"Enable encryption for data at rest",checkDefault:e=>e===!1||e===void 0||e===null},{pattern:/publicAccess|publicRead|publiclyAccessible/i,recommendation:"Restrict public access unless explicitly required",checkDefault:e=>e===!0},{pattern:/logging|accessLog|trailName/i,recommendation:"Enable logging for audit and compliance",checkDefault:e=>e===!1||e===void 0},{pattern:/versioning|versioningConfiguration/i,recommendation:"Enable versioning for data protection",checkDefault:e=>e===void 0||typeof e=="object"&&e!==null&&e.status!=="Enabled"},{pattern:/backupRetention|deletionProtection|deleteProtection/i,recommendation:"Configure backup and deletion protection",checkDefault:e=>e===!1||e===0||e===void 0},{pattern:/multiAz|multiAZ/i,recommendation:"Enable Multi-AZ for high availability",checkDefault:e=>e===!1},{pattern:/securityGroup|ingressRules|egressRules/i,recommendation:"Review security group rules"},{pattern:/iamRole|assumeRolePolicy|policyDocument/i,recommendation:"Review IAM permissions for least privilege"}],LO=e=>{try{let t=e.node.scope;if(!t)return{};let s=t.constructor.name;if(s.startsWith("Cfn")){let n=t.node?.scope;if(n)return{l2Type:n.constructor.name,l2Id:n.node?.id,l2Fqn:Zl(n)}}else return{l2Type:s,l2Id:t.node?.id,l2Fqn:Zl(t)}}catch{}return{}},Zl=e=>{try{let t=e;if(t.constructor.__jsii__?.fqn)return t.constructor.__jsii__.fqn;if(typeof t.constructor.fqn=="string")return t.constructor.fqn;let s=e.constructor.name;return s.startsWith("Cfn")?`aws-cdk-lib.${s}`:s}catch{return}},_O=e=>{let t=[];try{let s=e;for(;s;)t.unshift({id:s.node.id,type:s.constructor.name,fqn:Zl(s)}),s=s.node.scope}catch{}return t},OO=e=>{for(let[t,s]of Object.entries(TO))if(e.startsWith(t))return s},BO=e=>{let t=[];try{let n=e.cfnProperties;if(!n)return t;let r=(o,a)=>{for(let{pattern:u,recommendation:c,checkDefault:l}of PO)if(u.test(o)){let p=l?l(a):void 0,d=null;typeof a=="boolean"||typeof a=="number"?d=a:a==null?d=null:typeof a=="string"&&!es.Token.isUnresolved(a)?d=a.length>50?`${a.substring(0,47)}...`:a:typeof a=="string"?d="[Token]":d="[Object]",t.push({path:o,value:d,isDefault:p,recommendation:p?c:void 0});break}},i=(o,a="")=>{for(let[u,c]of Object.entries(o)){let l=a?`${a}.${u}`:u;r(l,c),c&&typeof c=="object"&&!Array.isArray(c)&&!es.Token.isUnresolved(c)&&i(c,l)}};i(n)}catch{}return t},MO=e=>{try{let s=e.cfnProperties;if(!s)return!0;let n=0;for(let r of Object.values(s))r!==void 0&&!es.Token.isUnresolved(r)&&n++;return n<3}catch{return!1}},NO=(e,t={})=>{let{captureSourceLocation:s=!0,captureTags:n=!0,captureRelationships:r=!0,captureHierarchy:i=!0,captureDependencies:o=!0,captureSensitiveProperties:a=!0}=t;if(!("cfnResourceType"in e))return null;let u=es.Stack.of(e),c=e.node.path,l=e.constructor.name,p=e.node.id,d=e,m=d.cfnResourceType,f;try{f=u.getLogicalId(d)}catch{}let{l2Type:g,l2Id:h}=LO(e),y=h?`${h} (${g||l})`:`${p} (${l})`,b={source:"cdk_insights",version:Jl,stackName:u.stackName,stackId:u.node.id,constructPath:c,constructType:l,friendlyName:y,timestamp:new Date().toISOString(),cfnResourceType:m};p&&(b.id=p),f&&(b.logicalId=f),g&&(b.l2ConstructType=g),h&&(b.l2ConstructId=h);let x=OO(m);if(x&&(b.serviceCategory=x),s){let v=DC(e,h);if(v)b.sourceLocation=v;else{let O=FO(e);O&&(b.rootSourceLocation=O.location),b.searchHint=kO(c,h,g,m)}let E=IO(e,g,h);E&&(b.createdBy=E)}if(r){let v=e.node.scope;v&&(b.parentPath=v.node.path),b.childCount=e.node.children.length}if(i){let v=_O(e);v.length>0&&(b.constructHierarchy=v)}if(o)try{let v=e.node.dependencies;if(v.length>0){let E=[];for(let O of v)if("cfnResourceType"in O)try{let M=u.getLogicalId(O);M&&E.push(M)}catch{}E.length>0&&(b.dependencies=E)}}catch{}if(a){let v=BO(e);v.length>0&&(b.sensitiveProperties=v),b.usesDefaults=MO(e)}if(n)try{let v=d.tagsRaw;if(v&&Object.keys(v).length>0)b.tags=v;else{let E=d.tags;if(E&&typeof E.renderTags=="function"){let O=E.renderTags();O&&Object.keys(O).length>0&&(b.tags=O)}}}catch{}try{let v=u.cdkVersion;v&&(b.cdkVersion=v)}catch{}return b},WO=new Set(["nodejs18.x","nodejs20.x","nodejs22.x","python3.11","python3.12","python3.13","java17","java21","dotnet8","ruby3.3","ruby3.4","provided.al2023"]),UO="Runtime is a current AWS Lambda LTS runtime (cdk-insights-maintained allowlist). cdk-nag's AwsSolutions-L1 check is heuristic and lags new LTS releases.",jO=["Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaENIManagementAccess","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaSQSQueueExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaDynamoDBExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaKinesisExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaMSKExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaAMQExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaSelfManagedKafkaExecutionRole","Policy::arn:<AWS::Partition>:iam::aws:policy/service-role/AWSLambdaInvocation-DynamoDB","Policy::arn:<AWS::Partition>:iam::aws:policy/AWSXRayDaemonWriteAccess"],$O="AWS-managed Lambda execution policy that CDK auto-attaches based on event source bindings or tracing configuration. Each policy is narrowly scoped to a single AWS service (logs, VPC networking + ENI management, SQS, DDB streams, Kinesis, MSK, MQ, self-managed Kafka, DDB invocation, X-Ray daemon write); replacing them with customer-managed copies of identical permissions is busywork with no security gain. Other managed policies attached to the same role are not suppressed.",GO=e=>{if(!("cfnResourceType"in e))return;let t=e.cfnResourceType;if(t==="AWS::Lambda::Function"){let s=e.runtime;typeof s=="string"&&WO.has(s)&&ts.NagSuppressions.addResourceSuppressions(e,[{id:"AwsSolutions-L1",reason:UO}],!1)}t==="AWS::IAM::Role"&&ts.NagSuppressions.addResourceSuppressions(e,[{id:"AwsSolutions-IAM4",reason:$O,appliesTo:[...jO]}],!1)},HO='Suppressed via createCdkInsightsAspect({ suppressNagRules: [...] }). Replace this string entry with `{ id, reason: "<written justification>" }` to make the suppression auditable in checked-in code.',zO=e=>typeof e=="string"?{id:e,reason:HO}:e,vC=(e,t,s)=>{if(s.value||t.length===0)return;let n=e;for(;n.node.scope;)n=n.node.scope;ts.NagSuppressions.addResourceSuppressions(n,t.map(zO),!0),s.value=!0},CC=(e,t,s={})=>{if(bO(),s.cdkBoilerplateSuppressions&&GO(e),t)try{t.visit(e)}catch(r){qe.warn(`CDK-Nag error suppressed for ${e.node.path}: ${r.message}`)}let n=NO(e,{captureSourceLocation:s.captureSourceLocation,captureTags:s.captureTags,captureRelationships:s.captureRelationships,captureHierarchy:s.captureHierarchy,captureDependencies:s.captureDependencies,captureSensitiveProperties:s.captureSensitiveProperties});n&&es.Annotations.of(e).addInfo(`${va}${JSON.stringify(n)}`)},AC=(e={})=>{let{logCompliance:t=!1,logNotApplicable:s=!1,verbose:n=!1}=e;return{onCompliance:r=>{t&&qe.debug(`\u2713 ${r.resource.logicalId} is compliant with ${r.ruleId}`)},onNonCompliance:r=>{qe.warn(`\u2717 ${r.resource.logicalId} is non-compliant with ${r.ruleId}: ${r.ruleInfo}`)},onSuppressed:r=>{n&&qe.info(`\u2298 ${r.ruleId} suppressed on ${r.resource.logicalId}: ${r.suppressionReason}`)},onError:r=>{qe.error(`\u26A0 ${r.ruleId} error during validation: ${r.errorMessage}`)},onSuppressedError:r=>{n&&qe.warn(`\u2298 ${r.ruleId} error suppressed: ${r.errorSuppressionReason}`)},onNotApplicable:r=>{s&&n&&qe.debug(`- ${r.ruleId} not applicable to ${r.resource.logicalId}`)}}},xC=(e={})=>{let{logCompliance:t=!0,logNotApplicable:s=!1,verbose:n=!1}=e;return{onCompliance:r=>{t&&qe.info(`Yay! ${r.resource.logicalId} is compliant with ${r.ruleId}`)},onNonCompliance:r=>{qe.warn(`Boo! ${r.resource.logicalId} is non-compliant with ${r.ruleId}`)},onSuppressed:r=>{n&&qe.info(`Hmmmm... ${r.ruleId} has been suppressed on ${r.resource.logicalId} with reason: ${r.suppressionReason}`)},onError:r=>{qe.error(`WHAT?!?! ${r.ruleId} encountered an error during validation!`)},onSuppressedError:r=>{n&&qe.warn(`PHEW! ${r.ruleId} error was suppressed: ${r.errorSuppressionReason}`)},onNotApplicable:r=>{s&&n&&qe.debug(`Meh. ${r.ruleId} and ${r.resource.logicalId} aren't related at all.`)}}},Yl=class{onCompliance(t){}onNonCompliance(t){let s={source:"cdk-nag",ruleId:t.ruleId,ruleOriginalName:t.ruleOriginalName,ruleInfo:t.ruleInfo,ruleExplanation:t.ruleExplanation,severity:t.ruleLevel===ts.NagMessageLevel.ERROR?"HIGH":"MEDIUM",level:t.ruleLevel===ts.NagMessageLevel.ERROR?"Error":"Warning",resourcePath:t.resource.node.path,logicalId:t.resource.logicalId,...t.findingId?{findingId:t.findingId}:{}};es.Annotations.of(t.resource).addInfo(`${ya}${JSON.stringify(s)}`)}onSuppressed(t){}onError(t){es.Annotations.of(t.resource).addInfo(`${ya}${JSON.stringify({source:"cdk-nag",ruleId:t.ruleId,ruleOriginalName:t.ruleOriginalName,ruleInfo:t.ruleInfo,ruleExplanation:t.ruleExplanation,severity:"MEDIUM",level:"Warning",resourcePath:t.resource.node.path,logicalId:t.resource.logicalId,evaluationError:t.errorMessage})}`)}onSuppressedError(t){}onNotApplicable(t){}},ba=class extends ts.AwsSolutionsChecks{constructor(t){super(t);let s=[];for(let n of this.loggers)n.constructor.name!=="AnnotationLogger"&&s.push(n);s.push(new Yl),this.loggers=s}},wC=(e={})=>{let{runNagChecks:t=!0,captureSourceLocation:s=!0,captureTags:n=!0,captureRelationships:r=!0,captureHierarchy:i=!0,captureDependencies:o=!0,captureSensitiveProperties:a=!0,cdkBoilerplateSuppressions:u=!1,suppressNagRules:c}=e,l=t?new ba:null,p={value:!1};return{visit:d=>{c?.length&&vC(d,c,p),CC(d,l,{captureSourceLocation:s,captureTags:n,captureRelationships:r,captureHierarchy:i,captureDependencies:o,captureSensitiveProperties:a,cdkBoilerplateSuppressions:u})}}},Di=class{options;constructor(t={}){this.options={logCompliance:!0,logNotApplicable:!1,verbose:!1,...t}}onCompliance(t){this.options.logCompliance&&qe.info(`Yay! ${t.resource.logicalId} is compliant with ${t.ruleId}`)}onNonCompliance(t){qe.warn(`Boo! ${t.resource.logicalId} is non-compliant with ${t.ruleId}`)}onSuppressed(t){this.options.verbose&&qe.info(`Hmmmm... ${t.ruleId} has been suppressed on ${t.resource.logicalId} with reason: ${t.suppressionReason}`)}onError(t){qe.error(`WHAT?!?! ${t.ruleId} encountered an error during validation!`)}onSuppressedError(t){this.options.verbose&&qe.warn(`PHEW! ${t.ruleId} error was suppressed: ${t.errorSuppressionReason}`)}onNotApplicable(t){this.options.logNotApplicable&&this.options.verbose&&qe.debug(`Meh. ${t.ruleId} and ${t.resource.logicalId} aren't related at all.`)}},Da=class extends ts.NagPack{delegate;options;userSuppressionsApplied={value:!1};constructor(t){super(t),this.packName="CdkInsights",this.options={runNagChecks:t?.runNagChecks??!0,captureSourceLocation:t?.captureSourceLocation??!0,captureTags:t?.captureTags??!0,captureRelationships:t?.captureRelationships??!0,captureHierarchy:t?.captureHierarchy??!0,captureDependencies:t?.captureDependencies??!0,captureSensitiveProperties:t?.captureSensitiveProperties??!0,cdkBoilerplateSuppressions:t?.cdkBoilerplateSuppressions??!1,suppressNagRules:t?.suppressNagRules,logger:t?.logger},this.loggers.push(new Di(this.options.logger)),this.delegate=new ba}visit(t){this.options.suppressNagRules?.length&&vC(t,this.options.suppressNagRules,this.userSuppressionsApplied),CC(t,this.options.runNagChecks?this.delegate:null,this.options)}};var EC=()=>{Sa.clear(),br.clear(),Ms.clear(),Kl=!1},RC=()=>({sourceFiles:Sa.size,constructLocations:br.size,sourceMaps:Ms.size});var FC="1.0.0";var MC=Z(require("node:fs"));var IC=(e,t,s,n,r,i,o)=>({resourceId:e,issue:t,recommendation:s,severity:n,wafPillar:r,constructPath:i,foundBy:o});var Ca=Z(require("node:fs")),Aa=Z(require("node:path")),kC="cdk-insights::",qO="aws:cdk:acknowledged-rules",TC=e=>{let t=Aa.join(Aa.dirname(e),"manifest.json");if(!Ca.existsSync(t))return[];let s;try{s=JSON.parse(Ca.readFileSync(t,"utf-8"))}catch{return[]}let n=[],r=s.artifacts??{};for(let i of Object.values(r)){let o=i.metadata??{};for(let[a,u]of Object.entries(o))for(let c of u)if(c.type===qO&&!(!c.data||typeof c.data!="object"))for(let[l,p]of Object.entries(c.data)){if(!l.startsWith(kC))continue;let d=l.slice(kC.length);if(!d)continue;let m=typeof p=="string"?p:"";n.push({constructPath:a,ruleId:d,reason:m})}}return n};var xa=Z(require("node:fs")),_C=Z(require("node:path")),PC={ignoreRules:[],ignorePaths:[]},LC=e=>Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.length>0):[],OC=(e=process.cwd())=>{let t=_C.join(e,".cdk-insights.json");if(!xa.existsSync(t))return PC;try{let s=JSON.parse(xa.readFileSync(t,"utf-8"));return{ignoreRules:LC(s.ignoreRules),ignorePaths:LC(s.ignorePaths)}}catch{return PC}};var BC={LOW:1,MEDIUM:2,HIGH:3,CRITICAL:4},NC="cdk-insights",VO=()=>Array.from(new Set(Object.values(sr).map(e=>e.ruleId).filter(e=>typeof e=="string"))),KO=(e,t,s)=>{let n=e.constructPath?[e.constructPath]:[],r={wafPillar:e.wafPillar,foundBy:e.foundBy},i={ruleName:e.ruleId??NC,description:e.issue,severity:e.severity,violatingResources:[{resourceLogicalId:t,templatePath:s,locations:n}],ruleMetadata:r};return e.recommendation?{...i,fix:e.recommendation}:i},vi=class{name=NC;version;ruleIds;options;constructor(t={}){this.options=t,this.version=t.version,this.ruleIds=VO()}validate(t){let s=BC[this.options.minimumSeverity??"LOW"],n=[],r=this.options.ignoreProjectConfig?{ignoreRules:[],ignorePaths:[]}:OC(this.options.cwd??process.cwd());for(let i of t.templatePaths){let o;try{o=JSON.parse(MC.readFileSync(i,"utf-8"))}catch{continue}let a=this.options.ignoreInlineAcknowledgements?[]:TC(i),u=Fo(o,IC,this.options.selectedServices??[],{},this.options.customRules??[]);for(let[c,l]of Object.entries(u))for(let p of l.issues){if(BC[p.severity]<s)continue;let d=[c,p.constructPath].filter(m=>typeof m=="string"&&m.length>0);ua(p,d,{ignoreRules:r.ignoreRules,ignorePaths:r.ignorePaths,acknowledgements:a})||n.push(KO(p,c,i))}}return{violations:n,success:n.length===0,...this.version?{pluginVersion:this.version}:{}}}},WC=(e={})=>new vi(e);var Ea=async(e,t)=>{try{return await e()}catch(s){return st.warn(`\u26A0\uFE0F Error in ${t.operationName}:`,{error:s}),t.fallbackValue}},ZO=e=>!e||e.length===0||e.includes("All services"),YO=(e,t)=>{if(ZO(t))return e;let s=new Set((t??[]).map(n=>`AWS::${n}::`));return Object.fromEntries(Object.entries(e).filter(([,n])=>{for(let r of s)if(n.Type.startsWith(r))return!0;return!1}))},JO=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>!t.Type.startsWith("AWS::CDK::"))),QO=e=>{let{stackName:t,pathToLogicalId:s}=e;return n=>({resourceId:n,friendlyName:s[n]??n,cdkPath:`${t}/${n}`,isGenerated:!1,sources:{cdkInsights:{issues:[]},cdkNag:{issues:[]}}})},Ns=(e,t,s)=>{let n=e[t];if(n)return n;let r=s(t);return e[t]=r,r},HC=e=>[...e.sources?.cdkInsights?.issues??[],...e.sources?.cdkNag?.issues??[],...e.sources?.validationReport?.issues??[]],UC=e=>{for(let t of Object.values(e))for(let s of HC(t))if(s.severity==="CRITICAL")return!0;return!1},XO=e=>{for(let[t,s]of Object.entries(e))(s.sources?.cdkInsights?.issues?.length??0)>0||(s.sources?.cdkNag?.issues?.length??0)>0||(s.sources?.validationReport?.issues?.length??0)>0||delete e[t];return e},wa=(e,t,s,n,r,i,o)=>({resourceId:e,issue:t,recommendation:s,severity:n,wafPillar:r,foundBy:o,constructPath:i}),e2=e=>{let{recommendationMap:t,stackName:s,stackResources:n,manifest:r}=e;try{let i=new Map,o=a=>{let u=i.get(a);if(u)return u;let c=XD(r,a);return i.set(a,c),c};return Object.entries(t).reduce((a,[u,c])=>{let l=c.cdkPath||u,p=o(l),d=n[u]?.Type||"Unknown",m=g=>({...g,...p?.filePath&&{sourceLocation:{filePath:p.filePath,line:p.line||1,column:p.column||1,confidence:p.confidence||"low"}},stackName:s,constructType:d}),f=(c.sources?.validationReport?.issues??[]).map(m);return a[u]={...c,sources:{cdkInsights:{issues:(c.sources?.cdkInsights?.issues??[]).map(m)},cdkNag:{issues:(c.sources?.cdkNag?.issues??[]).map(m)},...f.length>0?{validationReport:{issues:f}}:{}}},a},{})}catch(i){return st.warn("\u26A0\uFE0F Could not enrich issues with source location:",{error:i}),t}},t2=e=>{let{authToken:t,fingerprint:s,tier:n,quotaValidation:r}=e,i=!!(t&&s&&n),o=!r||r.canRunStaticAnalysis,a=!r||r.canRunAIAnalysis,u=!!(n&&si.isFeatureEnabled("aiAnalysis",n));return{hasAuth:i,canRunStatic:o,canRunAI:i&&u&&a,isAiEnabledByTier:u,canRunAIByQuota:a}},s2=async e=>{let{userResources:t,selectedServices:s,constructRegistry:n,canRunStatic:r,customRules:i=[],ruleContext:o}=e,a=Object.keys(t).length;return a===0?{}:r?(K.phase1(`Static analysis on ${a} resource${a===1?"":"s"}`),await Ea(()=>Promise.resolve(Fo({Resources:t},wa,s||[],n,i,o)),{operationName:"static analysis",fallbackValue:{}})??{}):(K.warning("\u26A0\uFE0F Static analysis skipped due to license restrictions"),{})},n2=async e=>{let{stackName:t,userResources:s,inlineFindings:n,pathToLogicalId:r,authToken:i,fingerprint:o,tier:a,noCache:u=!1,cache:c,capabilities:l,aiModelId:p,aiBatchSize:d}=e,m=Object.keys(s).length;if(m===0)return{results:{}};if(!l.hasAuth)return{results:{},skippedReason:"auth"};if(a&&!l.isAiEnabledByTier)return K.comment("\u{1F4A1} AI analysis is available with Pro tier - upgrade for deeper insights"),{results:{},skippedReason:"unavailable"};if(!l.canRunAIByQuota&&l.canRunStatic)return a==="pro"?K.comment("\u{1F4A1} AI analysis skipped \u2014 monthly AI credit allowance reached. Static scans continue; AI resumes next billing cycle."):K.comment("\u{1F4A1} AI analysis skipped \u2014 credit allowance reached. Upgrade to Pro for 5,000 AI credits/month."),{results:{},skippedReason:"cap-reached"};if(!l.canRunAI)return{results:{},skippedReason:"unavailable"};if(!i||!o)return st.warn("AI analysis skipped: missing authToken or fingerprint"),{results:{},skippedReason:"auth"};K.phase2(`AI analysis on ${m} resource${m===1?"":"s"}`);let f=fC(),g=MD(Lt,f),h=UD(Lt,f),y=lb(eC),b=xD({analyzeResource:g,analyzeResourcesBatch:h,redactResources:y});return{results:await Ea(()=>b({stackName:t,resources:s,authToken:i,existingFindingsMap:n,pathToLogicalId:r,fingerprint:o,noCache:u,cacheConfig:c,aiModelId:p,aiBatchSize:d}),{operationName:"AI analysis",fallbackValue:{}})??{}}},jC=e=>{let{recommendationMap:t,ignoreRules:s=[],ignorePaths:n=[],acknowledgements:r=[],baselineExclude:i,stackName:o=""}=e;if(s.length===0&&n.length===0&&r.length===0&&(!i||i.size===0))return t;for(let[a,u]of Object.entries(t)){let c=[a,u.cdkPath,u.friendlyName,u.displayName].filter(d=>typeof d=="string"&&d.length>0);if(n.some(d=>c.some(m=>ca(m,d)))){delete t[a];continue}let p=[u.cdkPath].concat(c).filter(d=>typeof d=="string"&&d.length>0);for(let d of["cdkInsights","cdkNag","validationReport"]){let m=u.sources?.[d];m&&(m.issues=m.issues.filter(f=>{let g=[f.constructPath,...p].filter(y=>typeof y=="string"&&y.length>0);if(ua(f,g,{ignoreRules:s,acknowledgements:r}))return!1;if(i&&i.size>0){let y=hl(o,u,f);if(i.has(y))return!1}return!0}))}}return t},r2=e=>{let{recommendationMap:t,ruleFilter:s}=e;if(s.length===0)return t;for(let[n,r]of Object.entries(t)){let i=HC(r),o=yl(i,s);if(o.length===0){delete t[n];continue}r.sources||(r.sources={cdkInsights:{issues:[]},cdkNag:{issues:[]}}),r.sources.cdkInsights||(r.sources.cdkInsights={issues:[]}),r.sources.cdkNag||(r.sources.cdkNag={issues:[]}),r.sources.cdkInsights.issues=o.filter(u=>u.foundBy==="cdkInsights"),r.sources.cdkNag.issues=o.filter(u=>u.foundBy==="cdkNag");let a=o.filter(u=>u.foundBy==="validationReport");a.length>0?r.sources.validationReport={issues:a}:r.sources.validationReport&&(r.sources.validationReport.issues=[])}return t},i2=async e=>{let{stackName:t,recommendationMap:s,summary:n,tier:r}=e;if(!r||!si.isFeatureEnabled("githubIntegration",r)){K.warning("GitHub integration is not available for your current tier"),K.comment(QS("githubIntegration",r??"free","GitHub integration"));return}let i=_D(),o=!!process.env.GITHUB_TOKEN;if(!i&&!o){K.warning("GitHub CLI not found and GITHUB_TOKEN not set. Skipping issue creation."),K.comment("Install GitHub CLI (gh) or set GITHUB_TOKEN environment variable to enable issue creation.");return}K.section("Creating GitHub Issue","\u{1F419}");let a=gr(t,s,n);await Ea(()=>PD({stackName:t,issueTitle:`CDK Insights Analysis for ${t}`,issueBody:a,ghCli:i,recommendations:s,summary:n}),{operationName:"creating GitHub issue"})},$C=async({stackName:e,stack:t,selectedServices:s,inlineFindings:n,validationReportFindings:r,recommendationMapPerStack:i,pathToLogicalId:o,constructRegistry:a,ruleFilter:u,ignoreRules:c,ignorePaths:l,acknowledgements:p=[],authToken:d,fingerprint:m,output:f,withIssue:g,tier:h,noCache:y=!1,warnSensitive:b=!1,sensitiveDataDetection:x={},cache:v,quotaValidation:E,manifest:O,customRules:M=[],cdkContext:P,resourceIdMetadata:X,aiModelId:B,aiBatchSize:z,forceLocal:ne=!1,baselineExclude:ie,collectFingerprints:se,skipRendering:_=!1,appContext:U})=>{let Y=t.Resources??{},ae=YO(Y,s),W=JO(ae),ee=new Set(Object.keys(W)),te=ee.size,pe=t2({authToken:d,fingerprint:m,tier:h,quotaValidation:E}),ce=QO({stackName:e,pathToLogicalId:o}),Le=i[e]||{},De=Re=>{let je=ce(Re),lt=Le[Re];return lt?{...je,...lt,sources:je.sources}:je},re=pe.canRunAI?Object.fromEntries(Object.keys(W).map(Re=>[Re,De(Re)])):{};for(let[Re,je]of Object.entries(Le)){let lt=je.sources?.cdkNag?.issues??[];if(lt.length===0)continue;Ns(re,Re,De).sources.cdkNag.issues.push(...lt)}for(let Re of n)Ns(re,Re.resourceId,De).sources.cdkNag.issues.push(Re);let G=P||X?{cdkContext:P,resourceIdMetadata:X}:void 0,k=await s2({userResources:W,selectedServices:s,constructRegistry:a,canRunStatic:pe.canRunStatic,customRules:M,ruleContext:G});for(let[Re,je]of Object.entries(k)){let lt=Ns(re,Re,De),Ci=je.issues??[];lt.sources.cdkInsights.issues.push(...Ci)}let J=vu(t,wa,u,U);for(let[Re,je]of Object.entries(J))Ns(re,Re,De).sources.cdkInsights.issues.push(...je.issues);let Se=so(t,wa);for(let[Re,je]of Object.entries(Se))Ns(re,Re,De).sources.cdkInsights.issues.push(...je.issues);let V=to(t,wa);for(let[Re,je]of Object.entries(V))Ns(re,Re,De).sources.cdkInsights.issues.push(...je.issues);let he=ql(W,{disabled:x.disabled,ignoreProperties:x.ignoreProperties,allowPatterns:x.allowPatterns,strictMode:x.strictMode}),He=W;if(he.hasSkippedResources){let Re=he.resourcesWithSensitiveData;K.warning(`\u{1F512} Sensitive data detected in ${Re} resource${Re===1?"":"s"} - NOT sent to CDK Insights servers`),He=Object.fromEntries(Object.entries(W).filter(([je])=>!he.skippedResourceIds.includes(je)));for(let je of he.detectionResults)if(je.hasSensitiveData){let lt=Ns(re,je.resourceId,De),Ci=zl(je,e);lt.sources.cdkInsights.issues.push(Ci)}}let xe=new Set(Object.entries(re).filter(([,Re])=>Re.sources.cdkInsights.issues.length>0||Re.sources.cdkNag.issues.length>0).map(([Re])=>Re)),mt=Object.fromEntries(Object.entries(He).filter(([Re])=>xe.has(Re))),It=Object.keys(He).length-Object.keys(mt).length;It>0&&pe.canRunAI&&K.comment(`\u{1F3AF} Skipping AI analysis on ${It} resource${It===1?"":"s"} with no static findings`);let Ue=await n2({stackName:e,userResources:mt,inlineFindings:n,pathToLogicalId:o,authToken:d,fingerprint:m,tier:h,noCache:y,cache:v,capabilities:pe,aiModelId:B,aiBatchSize:z}),bs=Ue.results,zC=ne?"local-mode":Ue.skippedReason;d&&m&&Object.keys(bs).length>0&&K.phase3("Processing results...");let qC=nC({staticRecommendations:{},aiRecommendations:bs,recommendationMap:re,ruleFilter:u,filterIssuesByRule:yl});for(let[Re,je]of Object.entries(qC.updatedMap)){let lt=Ns(re,Re,De);lt.sources.cdkInsights.issues.push(...bn({existing:lt.sources.cdkInsights.issues,incoming:je.sources.cdkInsights.issues}))}if($D({stackName:e,validationReportFindings:r,recommendationMap:re,createIssueGroup:De}),r2({recommendationMap:re,ruleFilter:u}),jC({recommendationMap:re,ignoreRules:c,ignorePaths:l,acknowledgements:p}),se)for(let{fingerprint:Re}of HD(e,re))se.add(Re);ie&&ie.size>0&&jC({recommendationMap:re,baselineExclude:ie,stackName:e}),XO(re);let An=e2({recommendationMap:re,stackName:e,stackResources:W,manifest:O}),Ra=aa(An,te,ee,zC),Xl=Object.keys(An).length>0;return i[e]=An,!_&&f&&f!=="table"&&Qv(f,e,An,!0,Ra),g&&Xl&&await i2({stackName:e,recommendationMap:An,summary:Ra,tier:h}),{recommendationMap:An,summary:Ra,hasIssues:Xl,scannedResourceCount:te,scannedResourceIds:ee,stackName:e,sensitiveDataSummary:he,hasSensitiveData:he.hasSkippedResources}},o2=async({stacks:e,inlineFindings:t,validationReportFindings:s=[],pathToLogicalId:n,output:r,recommendationMapPerStack:i,withIssue:o,services:a,ruleFilter:u=[],ignoreRules:c=[],ignorePaths:l=[],acknowledgementsPerStack:p={},authToken:d,fingerprint:m,failOnCritical:f,tier:g,noCache:h=!1,allowOveruse:y=!1,warnSensitive:b=!1,sensitiveDataDetection:x={},cache:v,quotaValidation:E,cdkContext:O,resourceIdMetadata:M,aiModelId:P,aiBatchSize:X,forceLocal:B=!1,baselineExclude:z,collectFingerprints:ne,skipRendering:ie=!1})=>{if(st.info("\u{1F680} Starting CDK Insights analysis",{stackCount:Object.keys(e).length,stackNames:Object.keys(e),hasAuthToken:!!d,hasFingerprint:!!m,tier:g||"unknown",quotaValidation:E?{canRunStaticAnalysis:E.canRunStaticAnalysis,canRunAIAnalysis:E.canRunAIAnalysis,isTrial:E.quota?.isTrial}:null,services:a||["All services"],output:r||"table"}),E&&!E.quota.isTrial&&E.canRunAIAnalysis&&y){let k=E.quota.currentResourcesAnalyzed>=E.quota.maxResources,J=E.quota.wouldExceed;k?(K.warning(`\u26A0\uFE0F You have used ${E.quota.currentResourcesAnalyzed}/${E.quota.maxResources} AI credits this billing period.`),K.warning(" Proceeding with AI analysis as --allow-overuse is enabled.")):J&&(K.warning(`\u26A0\uFE0F This analysis will exceed your AI credit allowance (${E.quota.currentResourcesAnalyzed}/${E.quota.maxResources}).`),K.warning(" Proceeding with AI analysis as --allow-overuse is enabled."))}let se=dC(),_=tC("cdk.out"),U=await Ea(()=>Of(Lf()),{operationName:"loading construct metadata",fallbackValue:{}})??{},Y={},ae=!1,W=!1,ee=0,te=new Set,pe=Object.keys(e),ce=pe.length,Le=new Map;for(let k of pe){let J=e[k]?.Outputs??{};Le.set(k,new Set(Object.keys(J)))}let De={outputsByStack:Le},re=k=>{let{stackName:J,map:Se}=k;for(let[V,he]of Object.entries(Se))Y[`${J}:${V}`]=he};if(ce>1)await Yo.runAnalysis({title:`Deep Analysis of ${ce} CDK Stacks`,steps:pe.map((k,J)=>({title:`Analyzing stack ${J+1}/${ce}: ${k}`,task:async()=>{let Se=e[k],V=await $C({stackName:k,stack:Se,selectedServices:a,inlineFindings:t,validationReportFindings:s,recommendationMapPerStack:i,pathToLogicalId:n,constructRegistry:U,ruleFilter:u,ignoreRules:c,ignorePaths:l,acknowledgements:p[k]??[],authToken:d,fingerprint:m,output:r,withIssue:o,tier:g,noCache:h,warnSensitive:b,sensitiveDataDetection:x,cache:v,quotaValidation:E,manifest:_,customRules:se,cdkContext:O,resourceIdMetadata:M,aiModelId:P,aiBatchSize:X,forceLocal:B,baselineExclude:z,collectFingerprints:ne,skipRendering:ie,appContext:De});re({stackName:V.stackName,map:V.recommendationMap}),ee+=V.scannedResourceCount;for(let he of V.scannedResourceIds)te.add(`${V.stackName}:${he}`);return!ae&&V.hasIssues&&(ae=UC(V.recommendationMap)),V.hasSensitiveData&&(W=!0),!ie&&(r==="summary"||r==="table")&&K.summary(V.summary),V}})),showSummary:!0});else{let[k,J]=Object.entries(e)[0]??[];if(!k||!J)return{recommendationMaps:{},hasCriticalIssues:!1,scannedResourceIds:new Set};let Se=Object.entries(J.Resources||{}).filter(([,he])=>!he.Type.startsWith("AWS::CDK::")).length;K.analysisStart(k,Se);let V=await $C({stackName:k,stack:J,selectedServices:a,inlineFindings:t,validationReportFindings:s,recommendationMapPerStack:i,pathToLogicalId:n,constructRegistry:U,ruleFilter:u,ignoreRules:c,ignorePaths:l,acknowledgements:p[k]??[],authToken:d,fingerprint:m,output:r,withIssue:o,tier:g,noCache:h,warnSensitive:b,sensitiveDataDetection:x,cache:v,quotaValidation:E,manifest:_,customRules:se,cdkContext:O,resourceIdMetadata:M,aiModelId:P,aiBatchSize:X,forceLocal:B,baselineExclude:z,collectFingerprints:ne,skipRendering:ie,appContext:De});re({stackName:V.stackName,map:V.recommendationMap}),ee+=V.scannedResourceCount;for(let he of V.scannedResourceIds)te.add(`${V.stackName}:${he}`);V.hasIssues&&(ae=UC(V.recommendationMap)),V.hasSensitiveData&&(W=!0),!ie&&(r==="summary"||r==="table")&&K.summary(V.summary)}if(ie)return{recommendationMaps:Y,hasCriticalIssues:!1,hasSensitiveData:W,scannedResourceIds:te};if(Object.keys(Y).length>0&&ce>1){let k=aa(Y,ee,te);if(r==="table"||r==="summary")K.section("Overall Analysis Summary","\u{1F4CA}"),K.summary(k),r==="table"&&(hi(Y),K.section("Overall Analysis Summary (continued)","\u{1F4CA}"),K.summary(k));else if(r==="sarif"){let J=oa("consolidated",Y),Se="consolidated_analysis_report.sarif";GC.writeFileSync(Se,JSON.stringify(J,null,2)),K.info(`\u{1F4C4} Consolidated SARIF report written to: ${Se}`)}else r==="github-actions"&&ea("consolidated",Y,k.severityCounts,ee)}else if(r==="table"||r==="summary")if(Object.keys(Y).length>0){let k=aa(Y,ee,te);K.section("Overall Analysis Summary","\u{1F4CA}"),K.summary(k),r==="table"&&(hi(Y),K.section("Overall Analysis Summary (continued)","\u{1F4CA}"),K.summary(k))}else K.success("No issues found across all stacks!");return{recommendationMaps:Y,hasCriticalIssues:!!f&&ae||W&&!b,hasSensitiveData:W,scannedResourceIds:te}};0&&(module.exports={CDK_INSIGHTS_ANNOTATION_PREFIX,CDK_INSIGHTS_METADATA_VERSION,CDK_INSIGHTS_NAG_FINDING_PREFIX,CdkInsightsAspect,CdkInsightsPolicyValidationPlugin,ExtremelyHelpfulConsoleLogger,SCAN_REPORT_SCHEMA_VERSION,clearCaches,createCdkInsightsAspect,createCdkInsightsLogger,createCdkInsightsPolicyValidationPlugin,createExtremelyHelpfulConsoleLogger,getCacheStats,isCdkDebugEnabled,runAnalysis});
|
|
418
418
|
/*! Bundled license information:
|
|
419
419
|
|
|
420
420
|
mime-db/index.js:
|