{"version":3,"sources":["../../src/lib/mkcert.ts"],"names":["fs","path","getCacheDirectory","Log","execSync","fetch","require","MKCERT_VERSION","getBinaryName","platform","process","arch","Error","downloadBinary","binaryName","cacheDirectory","binaryPath","join","existsSync","downloadUrl","promises","mkdir","recursive","info","response","ok","body","status","arrayBuffer","buffer","Buffer","from","writeFile","chmod","err","error","createSelfSignedCertificate","host","certDir","resolvedCertDir","resolve","cwd","keyPath","certPath","defaultHosts","hosts","includes","stdio","caLocation","toString","trim","gitignorePath","gitignore","readFile","appendFile","key","cert","rootCA"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AACvB,SAASC,iBAAiB,QAAQ,gCAA+B;AACjE,YAAYC,SAAS,sBAAqB;AAC1C,SAASC,QAAQ,QAAQ,gBAAe;AAExC,MAAM,EAAEC,KAAK,EAAE,GAAGC,QAAQ;AAI1B,MAAMC,iBAAiB;AAQvB,SAASC;IACP,MAAMC,WAAWC,QAAQD,QAAQ;IACjC,MAAME,OAAOD,QAAQC,IAAI,KAAK,QAAQ,UAAUD,QAAQC,IAAI;IAE5D,IAAIF,aAAa,SAAS;QACxB,OAAO,CAAC,OAAO,EAAEF,eAAe,SAAS,EAAEI,KAAK,IAAI,CAAC;IACvD;IACA,IAAIF,aAAa,UAAU;QACzB,OAAO,CAAC,OAAO,EAAEF,eAAe,QAAQ,EAAEI,KAAK,CAAC;IAClD;IACA,IAAIF,aAAa,SAAS;QACxB,OAAO,CAAC,OAAO,EAAEF,eAAe,OAAO,EAAEI,KAAK,CAAC;IACjD;IAEA,MAAM,IAAIC,MAAM,CAAC,sBAAsB,EAAEH,SAAS,CAAC;AACrD;AAEA,eAAeI;IACb,IAAI;QACF,MAAMC,aAAaN;QACnB,MAAMO,iBAAiBb,kBAAkB;QACzC,MAAMc,aAAaf,KAAKgB,IAAI,CAACF,gBAAgBD;QAE7C,IAAId,GAAGkB,UAAU,CAACF,aAAa;YAC7B,OAAOA;QACT;QAEA,MAAM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